本文整理汇总了PHP中userinfo函数的典型用法代码示例。如果您正苦于以下问题:PHP userinfo函数的具体用法?PHP userinfo怎么用?PHP userinfo使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了userinfo函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: clearsession
/**
* 清空session
*
*/
function clearsession()
{
global $_MooClass, $dbTablePre;
$user = userinfo();
$uid = $user['uid'];
//$_MooClass['MooMySQL']->query("DELETE FROM `{$dbTablePre}membersession` WHERE `uid` = '$uid'");
}
开发者ID:noikiy,项目名称:zays,代码行数:11,代码来源:function.php
示例2: chatlist
function chatlist()
{
//Set The number of posts you want to see here in the variable $viewableposts
$msg = "";
$viewableposts = 5;
$postsearch = 'SELECT * FROM `chat_list` ORDER BY id ASC';
$postresults = mysql_query($postsearch);
$numposts = mysql_num_rows($postresults);
$startingpost = $numposts - $viewableposts;
$x = 0;
while ($row = mysql_fetch_array($postresults)) {
if ($startingpost > 0 && $x < $startingpost) {
} else {
$userinfo = userinfo($row['user_id']);
$msg .= "<div class='post'><table width=99%>\n";
$msg .= "<tr><td width=450><div class='postusericon'><img src='" . $userinfo['icon'] . "'></div></td>\n";
$msg .= "<td><div class='postuserinfo'>\n";
$msg .= "<div class='postuser'>" . $userinfo['username'] . "</div>";
$msg .= "<div class='postdate'>(" . $row['date_posted'] . ")</div><br>\n";
$msg .= "<div class='postmessage'>" . $row['message'] . "</div>\n";
$msg .= "<div class='postsignature'>" . $userinfo['signature'] . "</div>\n";
$msg .= "</div>\n</td></tr></table></div><br><hr><br>\n";
//$msg.=$message;
}
$x++;
}
$msg .= "<p id='bottom'></p>";
return $msg;
}
开发者ID:BackupTheBerlios,项目名称:phpajaxchat-svn,代码行数:29,代码来源:functions.php
示例3: logaction
function logaction($message,$rawobj=null,$syncobj=null){
$user=userinfo();
$userid=$user['userid']+0;
$logname=$user['login'];
$logname=str_replace("'",'',$logname);
global $db;
$wssid=$_GET['wssid_']+0;
if (!isset($rawobj)) $rawobj=array();
$message=noapos($message);
$cobj=array();
foreach ($rawobj as $k=>$v){
if (is_array($v)) continue;
$v=noapos($v);
$v=str_replace('"','"',$v);
$cobj[$k]=$v;
}
$obj=json_encode($cobj);
$obj=str_replace("\\'","'",$obj);
$now=time();
$query="insert into ".TABLENAME_ACTIONLOG."(userid,logname,logdate,logmessage,rawobj) values ($userid,'$logname','$now','$message','$obj')";
if ($syncobj!=''){
$sid=$wssid;
$rectype=$syncobj['rectype'];
$recid=$syncobj['recid']+0;
$query="insert into ".TABLENAME_ACTIONLOG."(userid,logname,logdate,logmessage,rawobj,sid,rectype,recid) values ($userid,'$logname','$now','$message','$obj',$sid,'$rectype',$recid)";
}
sql_query($query,$db);
}
开发者ID:artcrawl,项目名称:artcrawlbackend,代码行数:34,代码来源:forminput.php
示例4: sign
public function sign()
{
$data = I('post.');
if (!$this->check_verify($data['verify'])) {
$this->error("验证码错误!");
}
$data['password'] = md5($data['password']);
$user = M('user');
if (!$user->create($data)) {
exit($user->getError());
}
if (!($info = $user->where($data)->find())) {
$this->error("邮箱或密码错误!");
}
$data['id'] = $info['id'];
$userinfo = D('Userinfo');
$userinfo->create($data);
$userinfo->save();
$userinfo = $userinfo->where("id='%s'", $data['id'])->find();
if ($data['remember'] == 'on') {
cookie('auth', $userinfo['authcode'], 1296000);
} else {
cookie('auth', $userinfo['authcode']);
}
//缓存用户信息
userinfo($userinfo['authcode'], $data['remember']);
$this->success("登录成功,正在进入首页:)", U('Index/index'));
}
开发者ID:iixcai,项目名称:INBBS,代码行数:28,代码来源:SignController.class.php
示例5: edit
function edit($post)
{
global $DT_PRE, $_username, $DT_TIME, $GROUP, $L;
$item = $this->get_one();
$user = $item['username'] ? userinfo($item['username']) : array();
$gsql = $msql = $csql = '';
$gsql = "edittime={$DT_TIME},editor='{$_username}',status={$post['status']},note='{$post['note']}'";
if ($post['status'] == 1) {
//reject
if ($user) {
if ($post['message'] && $post['content']) {
send_message($user['username'], lang($L['grade_fail'], array($GROUP[$item['groupid']]['groupname'])), nl2br($post['content']));
$gsql .= ",message=1";
}
if ($item['amount']) {
money_add($item['username'], $item['amount']);
money_record($item['username'], $item['amount'], $L['in_site'], 'system', $L['grade_title'], $L['grade_return']);
}
}
} else {
if ($post['status'] == 2) {
//
} else {
if ($post['status'] == 3) {
if ($user) {
if (isset($post['pay']) && $post['pay']) {
if ($user['money'] < $post['pay']) {
return $this->_($L['grade_pass_balance']);
} else {
money_add($item['username'], -$post['pay']);
money_record($item['username'], -$post['pay'], $L['in_site'], 'system', $L['grade_title'], $L['grade_upto'] . $GROUP[$item['groupid']]['groupname']);
}
}
$msql = $csql = "groupid={$item['groupid']},company='{$item['company']}'";
$vip = $GROUP[$item['groupid']]['vip'];
$csql .= ",vip={$vip},vipt={$vip}";
if (isset($post['pay'])) {
$csql .= ",fromtime=" . strtotime($post['fromtime']) . ",totime=" . strtotime($post['totime']) . ",validtime=" . strtotime($post['validtime']) . ",validator='{$post['validator']}',validated={$post['validated']}";
}
if ($post['message'] && $post['content']) {
send_message($user['username'], lang($L['grade_success'], array($GROUP[$item['groupid']]['groupname'])), nl2br($post['content']));
$gsql .= ",message=1";
}
}
}
}
}
$this->db->query("UPDATE {$this->table} SET {$gsql} WHERE itemid={$this->itemid}");
if ($msql) {
$this->db->query("UPDATE {$DT_PRE}member SET {$msql} WHERE userid={$item['userid']}");
}
if ($csql) {
$this->db->query("UPDATE {$DT_PRE}company SET {$csql} WHERE userid={$item['userid']}");
}
return true;
}
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:56,代码来源:grade.class.php
示例6: better
function better($content)
{
foreach ($content as $test) {
if (strpos($test, "email") !== FALSE) {
emailinfo($test);
} else {
if (strpos($test, "POST") !== FALSE) {
echo "<br>" . $test;
} else {
userinfo($test);
}
}
}
}
开发者ID:ArneSchoonvliet,项目名称:INFSEC_ArneBart,代码行数:14,代码来源:index.php
示例7: send_notice
function send_notice($username, $subject, $body)
{
global $DT, $msg, $eml, $sms, $wec;
if (!$username || !$subject || !$body) {
return;
}
if (isset($msg)) {
send_message($username, $subject, $body);
}
if (isset($wec)) {
send_weixin($username, $subject);
}
if (isset($eml) || isset($sms)) {
$user = userinfo($username);
if (isset($eml)) {
send_mail($user['email'], $subject, $body);
}
if (isset($sms)) {
send_sms($user['mobile'], $subject . $DT['sms_sign']);
}
}
}
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:22,代码来源:index.inc.php
示例8: update
function update($itemid)
{
global $TYPE;
$item = $this->db->get_one("SELECT * FROM {$this->table} WHERE itemid={$itemid}");
$update = '';
$keyword = $item['title'] . ',' . $TYPE[$item['typeid']] . ',' . strip_tags(cat_pos(get_cat($item['catid']), ','));
if ($keyword != $item['keyword']) {
$keyword = str_replace("//", '', addslashes($keyword));
$update .= ",keyword='{$keyword}'";
} else {
$keyword = str_replace("//", '', addslashes($keyword));
}
$item['itemid'] = $itemid;
$linkurl = itemurl($item);
if ($linkurl != $item['linkurl']) {
$update .= ",linkurl='{$linkurl}'";
}
$member = $item['username'] ? userinfo($item['username']) : array();
if ($member) {
$update .= update_user($member, $item);
}
if ($update) {
$this->db->query("UPDATE {$this->table} SET " . substr($update, 1) . " WHERE itemid={$itemid}");
}
$sorttime = $this->get_sorttime($item['edittime'], $item['vip']);
$this->db->query("REPLACE INTO {$this->table_search} (itemid,catid,areaid,status,content,sorttime) VALUES ({$itemid},'{$item['catid']}','{$item['areaid']}','{$item['status']}','{$keyword}','{$sorttime}')");
}
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:27,代码来源:sell.class.php
示例9: time
// All correct?
if ($error != "1") {
// Check 5 min after last submit
if (!isset($_SESSION['ip-sperre_ticket']) || $_SESSION['ip-sperre_ticket'] < time() - 0 * 60) {
// Set time in session
$_SESSION["ip-sperre_ticket"] = time();
$mysqli = getConnected("account");
// SQL Injection Prevention
$f_subject_todb1 = htmlentities($f_subject);
$f_subject_todb = mysqli_real_escape_string($mysqli, $f_subject_todb1);
$f_message_todb1 = htmlentities($f_message);
$f_message_todb = mysqli_real_escape_string($mysqli, $f_message_todb1);
$f_cat_todb = mysqli_real_escape_string($mysqli, $f_cat);
$f_pri_todb = mysqli_real_escape_string($mysqli, $f_pri);
$username = userinfo(id);
$usermail = userinfo(email);
// Generate Ticket ID
$genticketid = genticketid();
// Insert to database
$sql = mysqli_query($mysqli, "INSERT INTO cms_tickets (ticketid, subject, message, priority, ufrom, usermail, status, categorie, time) VALUES ('{$genticketid}','{$f_subject_todb}','{$f_message_todb}','{$f_pri_todb}','{$username}','{$usermail}','1','{$f_cat_todb}',now())");
if ($sql) {
echo "<div class=\"success\"><b>" . lang('TICKETID') . ": " . $genticketid . "</b><br><br>" . lang('TICKET_OK') . "</div>";
} else {
echo "<div class=\"error\">" . lang('TICKET_ERR') . "</div>";
}
mysqli_close($mysqli);
// Set hideform to 1
$hideform = 1;
} else {
echo "<div class=\"error\">" . lang('TICKET_TIME') . "</div>";
}
开发者ID:TiberiuD,项目名称:metin2cms,代码行数:31,代码来源:newticket.php
示例10: update
function update($itemid)
{
global $TYPE;
$item = $this->db->get_one("SELECT * FROM {$this->table} WHERE itemid={$itemid}");
$update = '';
$keyword = $item['title'] . ',' . ($item['tag'] ? $item['tag'] . ',' : '') . $TYPE[$item['typeid']] . ',' . strip_tags(cat_pos(get_cat($item['catid']), ','));
if ($keyword != $item['keyword']) {
$keyword = str_replace("//", '', addslashes($keyword));
$update .= ",keyword='{$keyword}'";
}
$item['itemid'] = $itemid;
$linkurl = itemurl($item);
if ($linkurl != $item['linkurl']) {
$update .= ",linkurl='{$linkurl}'";
}
$member = $item['username'] ? userinfo($item['username']) : array();
if ($member) {
$update .= update_user($member, $item);
}
if ($update) {
$this->db->query("UPDATE {$this->table} SET " . substr($update, 1) . " WHERE itemid={$itemid}");
}
}
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:23,代码来源:buy.class.php
示例11: userinfo
$user_status = 3;
} else {
$mid = $moduleid;
if ($_userid) {
if (check_pay($mid, $itemid)) {
$user_status = 3;
} else {
$user_status = 2;
}
} else {
$user_status = 0;
}
}
} else {
$user_status = 3;
}
} else {
$user_status = $_userid ? 1 : 0;
}
if ($_username && $_username == $item['username']) {
$user_status = 3;
}
if ($user_status == 3) {
$member = $item['username'] ? userinfo($item['username']) : array();
}
if ($moduleid == 9 && $item['username']) {
foreach (array('truename', 'telephone', 'mobile', 'address', 'msn', 'qq') as $v) {
$member[$v] = $item[$v];
}
$member['mail'] = $item['email'];
}
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:31,代码来源:contact.inc.php
示例12: userinfo
}
?>
</ul>
</div>
<div id="charEscribir" style="
margin-top: 20px;
">
<h3 class="widget-title">
<a class="circle-picture mn-ls-user-profile" style="width: 50px;
margin-right: 8px;
vertical-align: middle;" href="#"><img src="<?php
echo userinfo(avatar);
?>
" style="width: 50px; height: 50px" alt=""></a>
<input type="hidden" id="userId" value="<?php
echo $id;
?>
">
<script>
$('#enviarChat').keypress(function(event){
var keycode = (event.keyCode ? event.keyCode : event.which);
if(keycode == '13'){
var id = $("#userId").val();
var contenido = $("#enviarChat").val();
d = 'post/enviarChat.php';
$.post(d, { id: id, contenido: contenido}, function(h){
开发者ID:PabloValor,项目名称:voxed,代码行数:31,代码来源:chat.php
示例13: pages
$items = $r['num'];
}
$pages = pages($items, $page, $pagesize);
$lists = array();
$result = $db->query("SELECT * FROM {$DT_PRE}member_check WHERE {$condition} ORDER BY addtime DESC LIMIT {$offset},{$pagesize}");
while ($r = $db->fetch_array($result)) {
$r['addtime'] = timetodate($r['addtime'], 6);
$lists[] = $r;
}
include tpl('validate_member', $module);
break;
case 'show':
check_name($username) or msg();
$t = $db->get_one("SELECT * FROM {$DT_PRE}member_check WHERE username='{$username}'");
$t or msg('记录不存在');
$U = userinfo($username);
$U or msg('会员不存在');
$E = dstripslashes(unserialize($t['content']));
$userid = $U['userid'];
$content_table = content_table(4, $userid, is_file(DT_CACHE . '/4.part'), $DT_PRE . 'company_data');
$t = $db->get_one("SELECT * FROM {$content_table} WHERE userid={$userid}");
$U['content'] = $t['content'];
if (isset($E['regunit']) && !isset($E['capital'])) {
$E['capital'] = $U['capital'];
}
if ($submit) {
$sql1 = $sql2 = $sql3 = '';
if (in_array('thumb', $pass) && isset($E['thumb'])) {
if ($U['thumb']) {
delete_upload($U['thumb'], $userid);
}
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:31,代码来源:validate.inc.php
示例14: foreach
$data_arr = $this->vars['data'];
foreach ($data_arr as $key => $var) {
$this->vars['data_key'] = $key;
$this->vars['data_var'] = $this->vars['data'] = $var;
?>
<tr>
<td><?php
echo $this->vars['data']['id'];
?>
</td>
<td><?php
echo $this->vars['data']['titre'];
?>
</td>
<td><?php
echo userinfo($this->vars['data']['idchef']);
?>
</td>
<td><?php
echo $this->vars['data']['entreprise'];
?>
</td>
<td>Entre <?php
echo $this->vars['data']['datedebut'];
?>
et <?php
echo $this->vars['data']['datefin'];
?>
</td>
<td>
<?php
开发者ID:OumaAmrani,项目名称:Php_Project_Final,代码行数:31,代码来源:C-wamp-www-gprojet+(3)-view-projet-liste.html.php
示例15: lang
if (logged_in()) {
if ($userlevel > 0) {
// Administration Naviagtion
echo "<div id=\"admin_box\">";
echo "<div class=\"navleft\">";
echo lang('ADMIN_CENTER');
echo "</div>";
echo "<div class=\"navright\">";
echo "<a class=\"yellow\" href=\"../index.php?page=admin_ticket\">" . lang('ADMIN_NAV_TICEKT_01') . "</a> ";
echo "<a class=\"yellow\" href=\"../index.php?page=admin_ticket&action=search\">" . lang('ADMIN_NAV_TICEKT_02') . "</a> ";
echo "</div>";
echo "</div>";
}
}
// Get username
$username_form = userinfo(id);
// Only access when admin
if (!logged_in()) {
echo "<div class=\"error\">" . lang('ERR_ADMINACCESS1') . "</div>";
} elseif ($userlevel !== "9") {
echo "<div class=\"error\">" . lang('ERR_ADMINACCESS2') . "</div>";
} else {
// Set variables from get parameter
// General variables
$id = $_GET['id'];
$action = $_GET['action'];
$status = $_GET['status'];
$answerIt = $_GET['answerIt'];
$deleteIt = $_GET['deleteIt'];
$updateIt = $_GET['updateIt'];
// Vairables from answer
开发者ID:TiberiuD,项目名称:metin2cms,代码行数:31,代码来源:admin_ticket.php
示例16: session_start
<?php
include_once "../global.php";
session_start();
$usuario_recibe = $_POST["id"];
$usuario_envia = userinfo(usuario_id);
$contenido = $_POST["contenido"];
if (status() == 1) {
mysql_query("INSERT INTO mensajes (usuario_envia, usuario_recibe, contenido) VALUES ('{$usuario_envia}','{$usuario_recibe}','{$contenido}')") or die(mysql_error());
}
开发者ID:PabloValor,项目名称:voxed,代码行数:10,代码来源:enviarChat.php
示例17: update
function update($itemid)
{
$item = $this->db->get_one("SELECT * FROM {$this->table} WHERE itemid={$itemid}");
$update = '';
$keyword = $item['title'] . ',' . $item['company'] . ',' . strip_tags(cat_pos(get_cat($item['catid']), ','));
if ($keyword != $item['keyword']) {
$keyword = str_replace("//", '', addslashes($keyword));
$update .= ",keyword='{$keyword}'";
}
$item['itemid'] = $itemid;
$linkurl = itemurl($item);
if ($linkurl != $item['linkurl']) {
$update .= ",linkurl='{$linkurl}'";
}
$member = $item['username'] ? userinfo($item['username']) : array();
if ($member) {
foreach (array('groupid', 'vip', 'validated', 'company', 'areaid', 'truename', 'telephone', 'mobile', 'address', 'qq', 'msn', 'ali', 'skype') as $v) {
if ($item[$v] != $member[$v]) {
$update .= ",{$v}='" . addslashes($member[$v]) . "'";
}
}
if ($item['email'] != $member['mail']) {
$update .= ",email='" . addslashes($member['mail']) . "'";
}
}
if ($update) {
$this->db->query("UPDATE {$this->table} SET " . substr($update, 1) . " WHERE itemid={$itemid}");
}
}
开发者ID:hcd2008,项目名称:destoon,代码行数:29,代码来源:group.class.php
示例18: session_start
<?php
include_once "../global.php";
session_start();
$id_user = userinfo(usuario_id);
$query = mysql_query("UPDATE notificaciones SET estado = 0 WHERE usuario_recibe = '{$id_user}' ");
开发者ID:PabloValor,项目名称:voxed,代码行数:6,代码来源:reset_noti.php
示例19: main
function main($user)
{
global $stop, $smilies;
if (!isset($user)) {
include "header.php";
echo '<h2>' . translate("User") . '</h2>';
if ($stop == 99) {
echo '<p class="lead text-danger text-xs-center"><i class="fa fa-exclamation"></i> ' . translate("User not yet allowed by Administrator") . '</p>';
} elseif ($stop) {
echo '<p class="lead text-danger text-xs-center"><i class="fa fa-exclamation"></i> ' . translate("Incorrect Login!") . '</p>';
}
if (!$user) {
echo '
<h3><a href="user.php?op=only_newuser" role="button" title="' . translate("New User") . '"><i class="fa fa-user-plus"></i> ' . translate("New User") . '</a></h3>
<h3><i class="fa fa-sign-in fa-lg"></i> ' . translate("Connection") . '</h3>
<form class="" role="form" action="user.php" method="post" name="userlogin">
<div class="form-group row">
<div class="col-sm-4">
<label for="inputuser" class="form-control-label">' . translate("Nickname") . '</label>
</div>
<div class="col-sm-7">
<input type="text" class="form-control" name="uname" id="inputuser" placeholder="' . translate("Nickname") . '">
</div>
</div>
<div class="form-group row">
<div class="col-sm-4">
<label for="inputPassuser" class="form-control-label">' . translate("Password") . '</label>
</div>
<div class="col-sm-7">
<input type="password" class="form-control" name="pass" id="inputPassuser" placeholder="' . translate("Password") . '">
<span class="help-block small"><a href="user.php?op=forgetpassword" role="button" title="' . translate("Lost your Password?") . '">' . translate("Lost your Password?") . '</a></span>
</div>
</div>
<input type="hidden" name="op" value="login" />
<div class="form-group row">
<div class="col-sm-offset-4 col-sm-7">
<button class="btn btn-primary" type="submit" title="' . translate("Submit") . '"><i class="fa fa-lg fa-check"></i> ' . translate("Submit") . '</button>
</div>
</div>
</form>';
echo "<script type=\"text/javascript\">\n//<![CDATA[\ndocument.userlogin.uname.focus();\n//]]>\n</script>";
// include externe file from modules/include for functions, codes ...
/* if (file_exists("modules/include/user.inc")) {
include ("modules/include/user.inc");
}*/
}
include "footer.php";
} elseif (isset($user)) {
$cookie = cookiedecode($user);
userinfo($cookie[1]);
}
}
开发者ID:Jireck-npds,项目名称:npds_dune,代码行数:54,代码来源:user.php
示例20: message
case 'print':
//订单打印
if ($td['seller'] != $_username || !$td['logistic']) {
message($L['group_msg_deny']);
}
$td['total'] = $td['amount'];
include template('group_print', $module);
exit;
break;
case 'pay':
//买家付款
if ($td['status'] != 6 || $td['buyer'] != $_username) {
message($L['group_msg_deny']);
}
$money = $td['amount'];
$seller = userinfo($td['seller']);
if ($submit) {
is_payword($_username, $password) or message($L['error_payword']);
money_add($_username, -$money);
money_record($_username, -$money, $L['in_site'], 'system', $L['group_order_credit'], $L['trade_order_id'] . $itemid);
$password = $td['logistic'] ? '' : random(6, '0123456789');
$db->query("UPDATE {$table} SET status=0,password='{$password}',updatetime={$DT_TIME} WHERE itemid={$itemid}");
if ($password) {
//send sms
if ($DT['sms']) {
$message = lang('sms->ord_group', array($td['title'], $itemid, $password));
$message = strip_sms($message);
send_sms($td['buyer_mobile'], $message);
}
//send sms
}
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:31,代码来源:group.inc.php
注:本文中的userinfo函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论