All the things after Jack's login are in the session.

Source: Internet
Author: User

All in the 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 '); // Title
$ 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 '];
Specific Application
<? Php
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 ");
?>
<? Php
$ Flag = intval ($ _ GET ['flag']);
$ Pagesize = intval ($ _ GET ['pagesize']);
$ Link = mysql_connect ("localhost", "username", "password ")
Or die ("unable to connect to mysql Database". mysql_error ());
Mysql_select_db ("ycxhxswcom", $ link );
Mysql_query ("set names '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 ("SELECT articleid, obookid, obookname, lastchapterid, lastchapter, lastupdate, author, sortid, baoyuedateline FROM jieqi_obook_obook where obookid in (". $ baoyuebooksid. ") and display = 0 order by obookid desc limit $ offset, $ pagesize") or die ("query ". $ database. "database error ". mysql_error ());
// $ Result = mysql_query ("SELECT obookid, obookname, lastchapterid, lastchapter, lastupdate, author, sortid, baoyuedateline FROM vertex where display = 0 order by obookid desc limit $ offset, $ pagesize ") or die (" query ". $ database. "database error ". mysql_error ());
// Echo "document. write ('<table width = \ "100% \" border = \ "0 \" cellspacing = \ "0 \" cellpadding = \ "0 \"> ');";
$ Iii = 0;
Function getchapter ($ dateline, $ oid ){
$ SQL = "select chaptername, lastupdate, ochapterid from jieqi_obook_ochapter where obookid =". $ oid. "order by lastupdate desc limit 1 ";
$ 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 ['bookname'];
$ Theid = $ row ['bookid'];
// $ 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 = "This book does not support monthly subscription ";
$ Url_obookinfo = $ obookinfo;
}
$ Lastupdate = date ("m-d", $ row ['lastupdate']);
// $ Lastupdate = date ("m-d", $ lastchapters [2]);
$ Author = $ row ['author'];
$ Leibie = $ row ['sortid'];
?>
<Tr>
<Td height = "17" bgcolor = "# FFFFFF" align = "center"> <a href = "<? = $ Artcleurl?> "Target =" _ blank "> <? = $ Obookname?> </A> </td>
<Td bgcolor = "# FFFFFF"> <a href = "<? = $ Url_obookinfo?> "Target =" _ blank "> <? = $ Lastchapter2?> </A> </td>
<Td bgcolor = "# FFFFFF" align = "center"> <? = $ Lastupdate?> </Td>
<Td bgcolor = "# FFFFFF"> <a href = "<? = $ Artm?> "Target =" _ blank "> <? = $ Obookname?> [Public] </a> </td>
<Td bgcolor = "# FFFFFF"> <a href = "<? = $ Vipm?> "Target =" _ blank "> <? = $ Obookname?> [<Font color = "red"> vip </font>] </a> </td>
</Tr>
<? Php
}
Mysql_free_result ($ result );
Mysql_close ();
// Echo "document. write ('</table> ');";
Function mygb2big5 ($ s)
{
// Return $ s;
// Var_dump ($ s );
$ S = iconv ('gb2312', 'big5', $ s );
// Var_dump ($ s );
Return $ s;
}
?>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.