mysql getvar_杰奇登录后的东西都是在session里面的

杰奇登录后的东西都是在session里面的

2021-01-23 15:55:26404

都是在session里面的

$_SESSION['jieqiUserId']=$user->getVar('uid','n');

$_SESSION['jieqiUserUname']=$user->getVar('uname','n');

$_SESSION['jieqiUserName']=(strlen($user->getVar('name','n'))>0)?$user->getVar('name','n'):$user->getVar('uname','n');

$_SESSION['jieqiUserGroup']=$user->getVar('groupid','n');

$_SESSION['jieqiUserEmail']=$user->getVar('email','n');

$_SESSION['jieqiUserAvatar']=$user->getVar('avatar','n');

$_SESSION['jieqiUserScore']=$user->getVar('score','n');

$_SESSION['jieqiUserExperience']=$user->getVar('experience','n');

$_SESSION['jieqiUserVip']=$user->getVar('isvip','n');

$_SESSION['jieqiUserEgold']=($user->getVar('egold','n')>0||$user->getVar('esilver','n')>0)?1:0;

jieqi_getconfigs('system','honors');//头衔

$honorid=intval(jieqi_gethonorid($user->getVar('score'),$jieqiHonors));

$_SESSION['jieqiUserHonorid']=$honorid;

$_SESSION['jieqiUserHonor']=isset($jieqiHonors[$honorid]['name'][intval($user->getVar('workid','n'))])?$jieqiHonors[$honorid]['name'][intval($user->getVar('workid','n'))]:$jieqiHonors[$honorid]['caption'];

具体的应用

require_once('global.php');

include_once(JIEQI_ROOT_PATH."/class/users.php");

$users_handler=&jieqiusershandler::getinstance("JieqiUsersHandler");

$jieqiUsers=$users_handler->get($_SESSION['jieqiUserId']);

$charset=$_GET['charset'];

if(!$charset){

$charset="gb2312";

}else{

}

$checkit=$_GET['checkit'];

include("configs/obook/sort.php");

include("modules/obook/baoyuedata.php");

?>

$flag=intval($_GET['flag']);

$pagesize=intval($_GET['pagesize']);

$link=mysql_connect("localhost","username","password")

ordie("无法连接到mysql数据库".mysql_error());

mysql_select_db("ycxhxswcom",$link);

mysql_query("SETNAMES'gb2312'",$link);

$day30=time()-60*60*24*30;

$day3=time()-60*60*24*3;

$offset=0;

if(!$pagesize)$pagesize=19;

//echo$idall;

$result=mysql_query("SELECTarticleid,obookid,obookname,lastchapterid,lastchapter,lastupdate,author,sortid,baoyuedatelineFROMjieqi_obook_obookwhereobookidin(".$baoyuebooksid.")anddisplay=0orderbyobookiddesclimit$offset,$pagesize")ordie("查询".$database."数据库出错".mysql_error());

//$result=mysql_query("SELECTobookid,obookname,lastchapterid,lastchapter,lastupdate,author,sortid,baoyuedatelineFROMjieqi_obook_obookwheredisplay=0orderbyobookiddesclimit$offset,$pagesize")ordie("查询".$database."数据库出错".mysql_error());

//echo"document.write('');";

$iii=0;

functiongetchapter($dateline,$oid){

$sql="selectchaptername,lastupdate,ochapteridfromjieqi_obook_ochapterwhereobookid=".$oid."orderbylastupdatedesclimit1";

$oresult=mysql_query($sql);

$orow=mysql_fetch_array($oresult);

$dxyarr=array();

$dxyarr[]=$orow['chaptername'];

$dxyarr[]=$orow['ochapterid'];

$dxyarr[]=$orow['lastupdate'];

return$dxyarr;

mysql_free_result($oresult);

}

while($row=mysql_fetch_array($result)){

$iii++;

$obookname=$row['obookname'];

$theid=$row['obookid'];

//$chapid=$row['lastchapterid'];

$lastchapter=$row['lastchapter'];

$baoyuedateline=$row['baoyuedateline'];

$lastchapters=getchapter($baoyuedateline,$theid);

//var_dump($lastchapters);

$lastchapter2=$lastchapters[0];

$chapid=$lastchapters[1];

$artid=$row['articleid'];

$ml=floor($artid/1000);

$articleurl="http://yc.xhxsw.com/files/article/info/".$ml."/".$artid.".htm";

$artm="http://yc.xhxsw.com/modules/article/articlemanage.php?id=".$artid;

$vipm="http://yc.xhxsw.com/modules/obook/obookmanage.php?id=".$theid;

$url_obookinfo="http://yc.xhxsw.com/modules/obook/reader.php?aid=".$theid."&cid=".$chapid."";

$obookinfo="http://yc.xhxsw.com/modules/obook/obookinfo_baoyue.php?id=".$theid;

if($lastchapter2==''){

$lastchapter2="此书暂时不支持包月";

$url_obookinfo=$obookinfo;

}

$lastupdate=date("m-d",$row['lastupdate']);

//$lastupdate=date("m-d",$lastchapters[2]);

$author=$row['author'];

$leibie=$row['sortid'];

?>

"target="_blank">=$obookname?>

"target="_blank">=$lastchapter2?>

=$lastupdate?>

"target="_blank">=$obookname?>[公众]

"target="_blank">=$obookname?>[vip]

}

mysql_free_result($result);

mysql_close();

//echo"document.write('');";

functionmygb2big5($s)

{

//return$s;

//var_dump($s);

$s=iconv('gb2312','big5',$s);

//var_dump($s);

return$s;

}

?>

点击这里复制本文地址

以上内容由聚米学院网友整理呈现,如对侵犯您的权益,请联系邮箱:fzsbm@qq.com

支持Ctrl+Enter提交

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值