本文整理匯總了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;
}