本文整理汇总了PHP中Getuname函数的典型用法代码示例。如果您正苦于以下问题:PHP Getuname函数的具体用法?PHP Getuname怎么用?PHP Getuname使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Getuname函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
$li = "";
foreach ($signjifen as $value) {
$create_time = date('Y-m-d H:i:s', $value['create_time']);
$jf_mingxi = $value['jf_mingxi'];
$jf_jifen = $value['jifen'];
$li .= "<li>\n\t\t\t\t\t\t\t<span class='sgTime'>{$create_time}</span>\n\t\t\t\t\t\t\t<span class='sgNum'>{$jf_mingxi}</span>\n\t\t\t\t\t\t\t<span class='sgCode'>{$jf_jifen}积分</span>\n\t\t\t\t\t\t</li>";
}
$arry["id"] = 111;
$arry["msg"] = $li;
}
}
echo json_encode($arry);
exit;
case "check_login":
if ($_SESSION['usnamese'] != "") {
$usrow = Getuname($_SESSION['usnamese'], 1);
$arry['nick'] = $usrow['name'];
$arry['usertype'] = $_SESSION['us_type'];
$arry['logimg'] = $usrow['logimg'];
$arry['score'] = $usrow['jifen'];
echo json_encode($arry);
exit;
} else {
$arry['nick'] = "";
$arry['usertype'] = $_SESSION['us_type'];
$arry['logimg'] = "guest";
$arry['score'] = 0;
echo json_encode($arry);
exit;
}
case "check_state":
示例2: substr
if ($upcount) {
echo "<script>alert('邦定成功');location='/u'</script>";
} else {
echo "<script>alert('邦定失败');location='/u'</script>";
}
} else {
$arr = $qc->get_user_info();
$nickname = substr(str_replace(' ', '', $arr["nickname"]), 0, 18);
$logimg = $arr['figureurl_1'];
if (Getuname($nickname) > 0) {
$nickname = randusname($nickname);
}
if (Getuname($nickname) > 0) {
for ($i = 0; $i <= 10; $i++) {
$nickname = randusname($nickname);
if (!Getuname($nickname)) {
break;
}
}
}
$pwd = "";
$sql = "insert into user set qq_ua='{$qqid}',email=null,logimg='{$logimg}',password='{$pwd}',name='{$nickname}',us_type=-1,signinday=0,jifen=0,ip='" . $_SERVER['REMOTE_ADDR'] . "',regtime=" . $CCtimes . ",lastlogintime=" . $CCtimes;
$result = mysql_query($sql);
$count = mysql_affected_rows();
$user_rowid = mysql_insert_id();
Kjifen($_SESSION['usnamese'], $SK['zhucesongfen'], $SK['MingxiC'] . '(' . $nick . ')');
if ($count > 0) {
$_SESSION['usnamese'] = $nickname;
$_SESSION['usidse'] = $user_rowid;
$_SESSION['us_type'] = -1;
$_SESSION['shua'] = 1;
示例3: Getvip
function Getvip($nick, $type = 0)
{
$usrow = Getuname($nick, 1);
if ($usrow['endtype'] > time() && $usrow['endtype'] > time() + 31 * 24 * 3600 && $usrow['type'] > 0) {
$vip['vip'] = 1;
$vip['viptype'] = 2;
} elseif ($usrow['endtype'] > time() && $usrow['type'] > 0) {
$vip['vip'] = 1;
$vip['viptype'] = 1;
} else {
$vip['vip'] = 0;
$vip['viptype'] = 0;
}
if ($type == 2) {
return $vip;
} else {
if ($type == 1) {
return $vip['viptype'];
} else {
if ($type == 101) {
return $usrow['jifen'];
} else {
return $vip['vip'];
}
}
}
}
示例4: GetSiteconfig
<?php
include './include/ussession.php';
include './include/conn.php';
include './include/myfunction.php';
include 'include/publish_config.php';
include 'include/publish_function.php';
$siteweb = GetSiteconfig();
$Getuname = Getuname($_SESSION['usnamese'], 1);
$do = $_GET["do"];
if ($ZBK['jifen_vip'] == 1) {
if (Getvip($_SESSION['usnamese']) < 1) {
echo "<script>location='u?show=welcome&goto=uaj_s_vip.php'</script>";
exit;
}
}
switch ($do) {
case "submit_task":
$tknum = intval(trim($_POST["tknum"]));
//多少个任务
$tkjf = intval(trim($_POST["tkjf"]));
//每个任务送多少积分
$tktitle = trim($_POST["tktitle"]);
//任务标题
$tkquestion = reditnmagic($_POST["tkquestion"]);
//任务描术
$fedate = $_POST["fedate"];
//结束日期
$fetime = $_POST["fetime"];
//结束时间
$js_fstime = 60 * 60 * intval($_POST['fetime']);
示例5: GetSiteconfig
<?php
include './include/ussession.php';
include './include/conn.php';
include './include/myfunction.php';
$siteweb = GetSiteconfig();
$Usidxx = Getuname($_SESSION['usnamese'], 1);
function GetdataName($dataName)
{
switch ($dataName) {
case "recharge":
$menoytype = "充值";
break;
case "cash":
$menoytype = "提现";
break;
case "transfer":
$menoytype = "转帐";
break;
case "publish":
$menoytype = "冻结";
break;
case "balance":
$menoytype = "解冻";
break;
case "debited":
$menoytype = "扣费";
break;
}
return $menoytype;
}