本文整理汇总了PHP中userurl函数的典型用法代码示例。如果您正苦于以下问题:PHP userurl函数的具体用法?PHP userurl怎么用?PHP userurl使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了userurl函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
public function index()
{
//删除在线状态
$updata['zx'] = 0;
if (isset($_SESSION['cscms__id'])) {
$this->CsdjDB->get_update('user', $_SESSION['cscms__id'], $updata);
$this->CsdjDB->get_del('session', $_SESSION['cscms__id'], 'uid');
}
unset($_SESSION['cscms__id'], $_SESSION['cscms__name'], $_SESSION['cscms__login']);
//清除记住登录
$this->cookie->set_cookie("user_id");
$this->cookie->set_cookie("user_login");
//--------------------------- Ucenter ---------------------------
$log = User_Uc_Mode == 1 ? uc_user_synlogout : '';
//--------------------------- Ucenter ---------------------------
msg_url(L('logout_01') . $log, userurl(site_url('user/login')), 'ok');
//退出登录成功
}
示例2: reg_save
//.........这里部分代码省略.........
if ($usertel) {
msg_url(L('reg_13'), 'javascript:history.back();');
}
}
//判断手机强制验证
if (User_Tel == 1) {
if (empty($userinfo['tel'])) {
msg_url(L('reg_12'), 'javascript:history.back();');
}
$telcode = intval($this->input->post('telcode', TRUE));
if ($telcode == 0 || $telcode != $_SESSION['tel_code']) {
msg_url(L('reg_14'), 'javascript:history.back();');
}
}
//是否需要人工验证
if (User_RegFun == 1) {
$userinfo['yid'] = 1;
$title = L('reg_15');
}
//是否需要邮件验证
if (User_RegEmailFun == 1) {
$userinfo['yid'] = 2;
$title = L('reg_16', array($userinfo['email']));
}
//--------------------------- Ucenter ---------------------------
if (User_Uc_Mode == 1) {
include CSCMS . 'lib/Cs_Ucenter.php';
include CSCMSPATH . 'uc_client/client.php';
$uid = uc_user_register($userinfo['name'], $userinfo['pass'], $userinfo['email']);
if ($uid > 0) {
$userinfo['uid'] = $uid;
}
}
//--------------------------- Ucenter End ---------------------------
//密码加密
$userinfo['pass'] = md5(md5($userinfo['pass']) . $userinfo['code']);
$regid = $this->CsdjDB->get_insert('user', $userinfo);
if (intval($regid) == 0) {
msg_url(L('reg_17'), 'javascript:history.back();');
}
//修改第三方登录UID
$this->db->query("update " . CS_SqlPrefix . "useroauth set uid=" . $regid . " where id=" . $_SESSION['denglu__id'] . "");
//摧毁token
unset($_SESSION['token']);
unset($_SESSION['denglu__id']);
$this->load->model('CsdjEmail');
if (User_RegEmailFun == 1) {
//发送激活邮件
$key = md5($regid . $userinfo['name'] . $userinfo['pass'] . $userinfo['yid']);
$Msgs['username'] = $userinfo['name'];
$Msgs['url'] = userurl(site_url('user/reg/verify')) . "?key=" . $key . "&username=" . $userinfo['name'];
$title = Web_Name . L('reg_18');
$content = getmsgto(User_RegEmailContent, $Msgs);
$this->CsdjEmail->send($userinfo['email'], $title, $content);
}
//判断发送欢迎信息
if (User_RegMsgFun == 1) {
$Msg['username'] = $userinfo['name'];
$addmsg['uida'] = $regid;
$addmsg['uidb'] = 0;
$addmsg['name'] = L('reg_19') . Web_Name;
$addmsg['neir'] = getmsgto(User_RegMsgContent, $Msg);
$addmsg['addtime'] = time();
$this->CsdjDB->get_insert('msg', $addmsg);
//发送欢迎邮件
if (User_RegEmailFun == 0) {
$title = Web_Name . L('reg_20');
$content = $addmsg['neir'];
$this->CsdjEmail->send($userinfo['email'], $title, $content);
}
}
if ($userinfo['yid'] == 0) {
//登录
//每天登陆加积分
$updata['cion'] = User_Cion_Reg + User_Cion_Log;
$updata['zx'] = 1;
$updata['lognum'] = 1;
$updata['logtime'] = time();
$updata['logip'] = getip();
$updata['logms'] = time();
$this->CsdjDB->get_update('user', $regid, $updata);
//登录日志
$agent = ($this->agent->is_mobile() ? $this->agent->mobile() : $this->agent->platform()) . ' / ' . $this->agent->browser() . ' v' . $this->agent->version();
$add['uid'] = $regid;
$add['loginip'] = getip();
$add['logintime'] = time();
$add['useragent'] = $agent;
$this->CsdjDB->get_insert('user_log', $add);
$_SESSION['cscms__id'] = $regid;
$_SESSION['cscms__name'] = $userinfo['name'];
$_SESSION['cscms__login'] = md5($userinfo['name'] . $userinfo['pass']);
//记住登录
$user_login = md5($userinfo['name'] . $userinfo['pass'] . $userinfo['code']);
$this->cookie->set_cookie("user_id", $regid, time() + 86400);
$this->cookie->set_cookie("user_login", $user_login, time() + 86400);
msg_url(L('reg_21'), userurl(site_url('user/space')), 'ok');
} else {
msg_url(L('reg_21') . $title . '~!', userurl(site_url('user/login')), 'ok');
}
}
示例3: defined
<?php
defined('IN_DESTOON') or exit('Access Denied');
$comment = 0;
if (isset($MODULE[16])) {
$table = $DT_PRE . 'mall_comment';
$comment = 1;
$STARS = $L['star_type'];
$view = isset($view) ? 1 : 0;
$url = "file={$file}";
if ($view) {
$url .= "&view={$view}";
$condition = "buyer='{$username}' AND buyer_star>0";
} else {
$condition = "seller='{$username}' AND seller_star>0";
}
$demo_url = userurl($username, $url . '&page={destoon_page}', $domain);
$r = $db->get_one("SELECT COUNT(*) AS num FROM {$table} WHERE {$condition}", 'CACHE');
$items = $r['num'];
$pages = home_pages($items, $pagesize, $demo_url, $page);
$lists = array();
if ($items) {
$result = $db->query("SELECT * FROM {$table} WHERE {$condition} ORDER BY itemid DESC LIMIT {$offset},{$pagesize}");
while ($r = $db->fetch_array($result)) {
$lists[] = $r;
}
$db->free_result($result);
}
}
include template('credit', $template);
示例4: message
message($L['sendmail_pass_mailto']);
}
$title = trim(stripslashes($title));
if (strlen($title) < 5) {
message($L['pass_title']);
}
$content = trim(stripslashes($content));
if (strlen($content) < 10) {
message($L['pass_content']);
}
clear_upload($content);
$content = dsafe(save_local($content));
$content = ob_template('send', 'mail');
$DT['mail_name'] = $_company;
if (send_mail($email, $title, $content, '', false)) {
//$_email
message(lang($L['sendmail_success'], array($email)), 'sendmail.php');
} else {
message($L['sendmail_fail']);
}
} else {
$head_title = $L['sendmail_title'];
$email = isset($email) ? trim(stripslashes($email)) : '';
$title = isset($title) ? trim(stripslashes($title)) : '';
$content = isset($content) ? trim(stripslashes($content)) : '';
if ($action == 'page' && isset($title) && isset($linkurl)) {
$content = lang($L['sendmail_content'], array(userurl($_username), $_username, $title, $linkurl));
$title = lang($L['sendmail_title_new'], array($title));
}
include template('sendmail', $module);
}
示例5: update
function update($itemid)
{
$r = $this->db->get_one("SELECT username FROM {$this->table} WHERE itemid={$itemid}");
$linkurl = userurl($r['username'], 'file=introduce&itemid=' . $itemid);
return $this->db->query("UPDATE {$this->table} SET linkurl='{$linkurl}' WHERE itemid={$itemid}");
}
示例6: userurl
echo $t['vip'];
?>
.gif" alt="<?php
echo VIP;
?>
" title="<?php
echo VIP;
?>
:<?php
echo $t['vip'];
?>
级" align="absmiddle"/> <?php
}
?>
<a href="<?php
echo userurl($t['username']);
?>
" target="_blank"><?php
echo $t['company'];
?>
</a></td>
<td width="100" align="center">
<?php
if ($t['minsalary'] && $t['maxsalary']) {
echo $t['minsalary'];
?>
-<?php
echo $t['maxsalary'];
echo $DT['money_unit'];
?>
/月
示例7: spacelink
function spacelink($url = '', $dir = '')
{
$uarr = explode(',', $url);
$url = str_replace(",", "/", $url);
$plub = $dir;
if ($dir == '' && defined('PLUBPATH')) {
$plub = PLUBPATH;
}
if ($dir == '') {
if ($plub != '' && file_exists(FCPATH . 'plugins/' . $plub . '/controllers/user/' . $uarr[0] . '.php')) {
$url = 'http://' . Web_Url . Web_Path . 'index.php/' . $plub . '/user/' . $url;
} else {
$url = 'http://' . Web_Url . Web_Path . 'index.php/user/' . $url;
}
} else {
$url = 'http://' . Web_Url . Web_Path . 'index.php/' . $plub . '/user/' . $url;
}
//伪静态
if (Web_Mode == 3) {
$url = str_replace("/index.php/", "/", $url);
}
$url = str_replace("/user/user/", "/user/", $url);
$url = userurl($url, $plub);
return $url;
}
示例8: defined
<?php
defined('IN_DESTOON') or exit('Access Denied');
require DT_ROOT . '/module/' . $module . '/common.inc.php';
if ($action == 'master') {
$name = isset($name) ? urldecode($name) : '';
if ($name && $catid) {
$T = $db->get_one("SELECT manager FROM {$table}_group WHERE itemid={$catid}");
if ($T && $T['manager'] && strpos($T['manager'], $name) !== false) {
$username = get_user($name, 'passport', 'username');
if ($username) {
dheader(userurl($username));
}
}
}
dheader($MOD['linkurl']);
} else {
$itemid or dheader($MOD['linkurl']);
$R = $db->get_one("SELECT * FROM {$table}_reply WHERE itemid={$itemid}");
$R or dheader($MOD['linkurl']);
$tid = $R['tid'];
$T = $db->get_one("SELECT * FROM {$table} WHERE itemid={$tid}");
$T or dheader($MOD['linkurl']);
if ($MOD['reply_pagesize']) {
$pagesize = $MOD['reply_pagesize'];
}
if ($R['fid']) {
$page = ceil($R['fid'] / $pagesize);
} else {
$page = ceil(($T['reply'] + 1) / $pagesize);
}
示例9: defined
<?php
defined('IN_DESTOON') or exit('Access Denied');
require DT_ROOT . '/module/' . $module . '/common.inc.php';
$url = isset($url) ? fix_link($url) : DT_PATH;
if (isset($username)) {
if (check_name($username)) {
$r = $db->get_one("SELECT linkurl FROM {$DT_PRE}company WHERE username='{$username}'");
$url = $r ? $r['linkurl'] : userurl($username);
}
} else {
if (isset($aid)) {
$aid = intval($aid);
if ($aid) {
$r = $db->get_one("SELECT url,key_moduleid,key_id,typeid FROM {$DT_PRE}ad WHERE aid={$aid} AND fromtime<{$DT_TIME} AND totime>{$DT_TIME}");
if ($r) {
$url = $r['key_moduleid'] && $r['typeid'] > 5 ? 'redirect.php?mid=' . $r['key_moduleid'] . '&itemid=' . $r['key_id'] : $r['url'];
$db->query("UPDATE {$DT_PRE}ad SET hits=hits+1 WHERE aid={$aid}");
}
}
} else {
if ($mid) {
if (isset($MODULE[$mid]) && $itemid) {
if ($mid == 2) {
$mid = 4;
}
$condition = $mid == 4 ? "userid={$itemid}" : "itemid={$itemid}";
$r = $db->get_one("SELECT linkurl FROM " . get_table($mid) . " WHERE {$condition}");
if ($r) {
$url = strpos($r['linkurl'], '://') === false ? $MODULE[$mid]['linkurl'] . $r['linkurl'] : $r['linkurl'];
}
示例10: message
}
break;
case 'rename':
$cusername or message('当前会员名不能为空');
$nusername or message('会员名不能为空');
$user = $do->get_one($cusername);
$user or message('当前会员名不存在');
$userid = $user['userid'];
if (!$_founder && $cusername != $_username) {
if ($user['groupid'] == 1) {
msg('您无权修改其他管理员用户名');
}
}
if ($do->rename($cusername, $nusername)) {
if (!$user['domain']) {
$linkurl = userurl($nusername);
$db->query("UPDATE {$DT_PRE}company SET linkurl='{$linkurl}' WHERE userid={$userid}");
}
dmsg('修改成功', $forward);
} else {
msg($do->errmsg);
}
break;
case 'passport':
$cpassport or message('当前会员昵称不能为空');
$npassport or message('会员昵称不能为空');
$user = $db->get_one("SELECT * FROM {$DT_PRE}member WHERE passport='{$cpassport}'");
$user or message('当前会员昵称不存在');
$userid = $user['userid'];
if (!$_founder && $user['username'] != $_username) {
if ($user['groupid'] == 1) {
示例11: dheader
$itemid or dheader($MOD['linkurl']);
check_name($username) or dheader($MOD['linkurl']);
$user = userinfo($username);
$domain = $user['domain'];
if ($domain) {
$DT['rewrite'] = intval($CFG['com_rewrite']);
}
$r = $db->get_one("SELECT itemid FROM {$DT_PRE}sell_5 WHERE username='{$username}' AND itemid>{$itemid} AND status=3 ORDER BY itemid ASC");
if ($r) {
dheader(userurl($username, 'file=sell&itemid=' . $r['itemid'], $domain));
}
dheader(userurl($username, 'file=sell', $domain));
break;
case 'prev':
$itemid or dheader($MOD['linkurl']);
check_name($username) or dheader($MOD['linkurl']);
$user = userinfo($username);
$domain = $user['domain'];
if ($domain) {
$DT['rewrite'] = intval($CFG['com_rewrite']);
}
$r = $db->get_one("SELECT itemid FROM {$DT_PRE}sell_5 WHERE username='{$username}' AND itemid<{$itemid} AND status=3 ORDER BY itemid DESC");
if ($r) {
dheader(userurl($username, 'file=sell&itemid=' . $r['itemid'], $domain));
}
dheader(userurl($username, 'file=sell', $domain));
break;
default:
dheader($MOD['linkurl']);
break;
}
示例12: dmsg
}
$post['userid'] = $_userid;
$post['addtime'] = $DT_TIME;
$do->add($post);
dmsg($L['op_add_success'], 'friend.php');
} else {
message($do->errmsg);
}
} else {
$username = isset($username) ? trim($username) : '';
$truename = $homepage = $company = $career = $telephone = $msn = $qq = $ali = $skype = '';
if ($username) {
$r = userinfo($username);
if ($r) {
$truename = $r['truename'];
$homepage = userurl($username);
$company = $r['company'];
$telephone = $r['telephone'];
$career = $r['career'];
$msn = $r['msn'];
$qq = $r['qq'];
$ali = $r['ali'];
$skype = $r['skype'];
}
}
$type_select = type_select('friend-' . $_userid, 0, 'post[typeid]', $L['default_type']);
$head_title = $L['friend_title_add'];
}
break;
case 'edit':
$itemid or message();
示例13: userurl
<td class="px11"><?php
echo $v['userid'];
?>
</td>
<td align="left"> <a href="javascript:_user('<?php
echo $v['username'];
?>
');" title="<?php
echo $v['truename'];
?>
"><?php
echo $v['username'];
?>
</a></td>
<td align="left"> <a href="<?php
echo userurl($v['username']);
?>
" target="_blank"><?php
echo $v['company'];
?>
</a></td>
<td class="px11"><a href="javascript:Dwidget('?moduleid=<?php
echo $moduleid;
?>
&file=record&username=<?php
echo $v['username'];
?>
', '[<?php
echo $v['username'];
?>
] <?php
示例14: edit
function edit($member)
{
if (!$this->is_member($member)) {
return false;
}
$member = $this->set_member($member);
$r = $this->get_one();
$member['linkurl'] = userurl($r['username'], '', $member['domain']);
$member_fields = array('company', 'passport', 'sound', 'email', 'msn', 'qq', 'ali', 'skype', 'gender', 'truename', 'mobile', 'department', 'career', 'groupid', 'areaid', 'edittime', 'black', 'bank', 'account', 'vemail', 'vmobile', 'vbank', 'vtruename', 'vcompany', 'vtrade', 'trade', 'support', 'inviter');
$company_fields = array('company', 'type', 'areaid', 'catid', 'catids', 'business', 'mode', 'regyear', 'regunit', 'capital', 'size', 'address', 'postcode', 'telephone', 'fax', 'mail', 'homepage', 'sell', 'buy', 'introduce', 'thumb', 'keyword', 'linkurl', 'groupid', 'domain', 'icp', 'validated', 'validator', 'validtime', 'skin', 'template');
$member_sql = $company_sql = '';
foreach ($member as $k => $v) {
if (in_array($k, $member_fields)) {
$member_sql .= ",{$k}='{$v}'";
}
if (in_array($k, $company_fields)) {
$company_sql .= ",{$k}='{$v}'";
}
}
if ($member['password']) {
$password = md5(md5($member['password']));
$member_sql .= ",password='{$password}'";
}
if ($member['payword']) {
$payword = md5(md5($member['payword']));
$member_sql .= ",payword='{$payword}'";
}
$member_sql = substr($member_sql, 1);
$company_sql = substr($company_sql, 1);
$this->db->query("UPDATE {$this->table_member} SET {$member_sql} WHERE userid={$this->userid}");
$this->db->query("UPDATE {$this->table_company} SET {$company_sql} WHERE userid={$this->userid}");
$content_table = content_table(4, $this->userid, is_file(DT_CACHE . '/4.part'), $this->table_company_data);
$this->db->query("UPDATE {$content_table} SET content='{$member['content']}' WHERE userid={$this->userid}");
$member['userid'] = $this->userid;
$member['vip'] = $r['vip'];
userclean($member['username']);
return true;
}
示例15: edit
public function edit()
{
$token = $this->input->post('token', TRUE);
if ($token != $_SESSION['token']) {
msg_url(L('pass_04'), 'javascript:history.back();');
}
$key = $this->input->get_post('key', TRUE, TRUE);
//KEY
$username = $this->input->get_post('username', TRUE, TRUE);
//name
$userpass = $this->input->get_post('userpass', TRUE, TRUE);
$userpass2 = $this->input->get_post('userpass2', TRUE, TRUE);
if (empty($username) || empty($key)) {
msg_url(L('pass_11'), 'javascript:window.close();');
}
$row = $this->CsdjDB->get_row('user', 'id,name,code,pass,email', $username, 'name');
if (!$row) {
msg_url(L('pass_12'), 'javascript:window.close();');
}
if ($key != md5($row->id . $row->name . $row->pass . $row->email . substr(time(), 0, -6))) {
msg_url(L('pass_14'), 'javascript:window.close();');
}
if (empty($userpass)) {
msg_url(L('pass_15'), 'javascript:history.back();');
}
if ($userpass != $userpass2) {
msg_url(L('pass_16'), 'javascript:history.back();');
}
$edit['pass'] = md5(md5($userpass) . $row->code);
$this->CsdjDB->get_update('user', $row->id, $edit);
msg_url(L('pass_17'), userurl(site_url('user/login')));
}