function common_base()
 {
     global $_G;
     if (!isset($_G['connect'])) {
         $_G['connect']['url'] = 'http://connect.discuz.qq.com';
         $_G['connect']['api_url'] = 'http://api.discuz.qq.com';
         $_G['connect']['avatar_url'] = 'http://avatar.connect.discuz.qq.com';
         $_G['connect']['qzone_public_share_url'] = 'http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey';
         $_G['connect']['referer'] = !$_G['inajax'] && CURSCRIPT != 'member' ? $_G['basefilename'] . ($_SERVER['QUERY_STRING'] ? '?' . $_SERVER['QUERY_STRING'] : '') : dreferer();
         $_G['connect']['weibo_public_appkey'] = 'ce7fb946290e4109bdc9175108b6db3a';
         $_G['connect']['login_url'] = $_G['siteurl'] . 'connect.php?mod=login&op=init&referer=' . urlencode($_G['connect']['referer'] ? $_G['connect']['referer'] : 'index.php');
         $_G['connect']['callback_url'] = $_G['siteurl'] . 'connect.php?mod=login&op=callback';
         $_G['connect']['discuz_new_feed_url'] = $_G['siteurl'] . 'connect.php?mod=feed&op=new';
         $_G['connect']['discuz_remove_feed_url'] = $_G['siteurl'] . 'connect.php?mod=feed&op=remove';
         $_G['connect']['discuz_new_share_url'] = $_G['siteurl'] . 'connect.php?mod=share&op=new';
         $_G['connect']['discuz_new_share_url'] = $_G['siteurl'] . 'home.php?mod=spacecp&ac=plugin&id=qqconnect:spacecp&pluginop=new';
         $_G['connect']['discuz_change_qq_url'] = $_G['siteurl'] . 'connect.php?mod=login&op=change';
         $_G['connect']['auth_fields'] = array('is_user_info' => 1, 'is_feed' => 2);
         if ($_G['uid']) {
             dsetcookie('connect_is_bind', $_G['member']['conisbind'], 31536000);
             if (!$_G['member']['conisbind'] && $_G['cookie']['connect_login']) {
                 $_G['cookie']['connect_login'] = 0;
                 dsetcookie('connect_login');
             }
         }
         if (!$_G['uid'] && !defined('IN_MOBILE')) {
             $_G['setting']['pluginhooks']['global_login_text'] = tpl_login_bar();
         }
     }
 }
    function login_action()
    {
        if (submitcheck('commit')) {
            $data['email'] = global_addslashes(trim($_POST['user_name']));
            $data['pwd'] = md52($_POST['pwd']);
            $user = $this->user->GetOne('and email="' . $data['email'] . '" and pwd="' . $data['pwd'] . '" and usertype!="nulluser"');
            if ($user) {
                if ($user['usertype'] == 'adminuser') {
                    $GLOBALS['session']->set(array('adminid' => $user['uid'], 'username' => $user['email']));
                    exit('<SCRIPT LANGUAGE="JavaScript">
					<!--
						window.open("index.php?con=admin","_top","");
					//-->
					</SCRIPT>');
                } else {
                    $GLOBALS['session']->set(array('uid' => $user['uid'], 'username' => $user['email']));
                    sheader($_POST['referer'] ? $_POST['referer'] : 'index.php', 3, '登录成功');
                }
            } else {
                sheader(url('user', 'login'), 3, '登录失败,请重新登录');
            }
        } else {
            $referer = dreferer();
            include template('login');
        }
    }
Beispiel #3
0
 function usesubmit()
 {
     global $_G;
     if (empty($_G['gp_pid'])) {
         showmessage(lang('magic/repent', 'repent_info_nonexistence'));
     }
     $_G['tid'] = $_G['gp_ptid'];
     $post = getpostinfo($_G['gp_pid'], 'pid', array('p.first', 'p.tid', 'p.fid', 'p.authorid', 'p.replycredit', 't.status as thread_status'));
     $this->_check($post);
     require_once libfile('function/post');
     require_once libfile('function/delete');
     if ($post['first']) {
         if ($have_replycredit = DB::fetch_first("SELECT * FROM " . DB::table('forum_replycredit') . " WHERE tid ='{$post['tid']}' LIMIT 1")) {
             if ($replycredit = DB::result_first("SELECT replycredit FROM " . DB::table('forum_thread') . " WHERE tid = '{$post['tid']}'")) {
                 updatemembercount($post['authorid'], array($_G['setting']['creditstransextra'][10] => $replycredit));
             }
             DB::delete('forum_replycredit', "tid = '{$post['tid']}'");
             DB::delete('common_credit_log', "operation IN ('RCT', 'RCA', 'RCB') AND relatedid IN({$post['tid']})");
         }
         deletethread(array($post['tid']));
         updateforumcount($post['fid']);
     } else {
         if ($post['replycredit'] > 0) {
             updatemembercount($post['authorid'], array($_G['setting']['creditstransextra'][10] => -$post['replycredit']));
             DB::delete('common_credit_log', "uid = '{$post['authorid']}' AND operation = 'RCA' AND relatedid IN({$post['tid']})");
         }
         deletepost(array($_G['gp_pid']));
         updatethreadcount($post['tid']);
     }
     usemagic($this->magic['magicid'], $this->magic['num']);
     updatemagiclog($this->magic['magicid'], '2', '1', '0', 0, 'tid', $_G['tid']);
     showmessage(lang('magic/repent', 'repent_succeed'), $post['first'] ? 'forum.php?mod=forumdisplay&fid=' . $post['fid'] : dreferer(), array(), array('showdialog' => 1, 'locationtime' => true));
 }
Beispiel #4
0
 function on_load()
 {
     if ($_GET['action'] != 'register') {
         return;
     }
     if (!$_POST) {
         return;
     }
     list($a, $b, $c, $d) = explode('.', $_SERVER['REMOTE_ADDR']);
     $a = intval($a);
     $b = intval($b);
     $c = intval($c);
     $d = intval($d);
     $count = DB::result_first("SELECT count FROM kk_ip_limit WHERE a='{$a}' AND b='{$b}' AND c='{$c}' AND d='{$d}'");
     $time = TIMESTAMP;
     DB::query("DELETE FROM kk_ip_limit WHERE lastact<{$time}-86400");
     if ($count > 0) {
         DB::query("UPDATE kk_ip_limit SET lastact='{$time}' WHERE a='{$a}' AND b='{$b}' AND c='{$c}' AND d='{$d}'");
     }
     if ($count >= getSetting('ip_reglimit')) {
         showmessage('达到单 IP 注册上限,禁止注册。', dreferer());
     }
     if ($count > 0) {
         DB::query("UPDATE kk_ip_limit SET count=count+1 WHERE a='{$a}' AND b='{$b}' AND c='{$c}' AND d='{$d}'");
     } else {
         DB::query("INSERT INTO kk_ip_limit SET count=1, lastact='{$time}', a='{$a}', b='{$b}', c='{$c}', d='{$d}'");
     }
 }
Beispiel #5
0
 function usesubmit()
 {
     global $_G;
     if (empty($_G['gp_tid'])) {
         showmessage(lang('magic/sofa', 'sofa_info_nonexistence'));
     }
     $thread = getpostinfo($_G['gp_tid'], 'tid', array('fid', 'authorid', 'dateline', 'subject'));
     $this->_check($thread);
     $firstsofa = DB::result_first("SELECT COUNT(*) FROM " . DB::table('forum_threadmod') . " WHERE magicid='" . $this->magic['magicid'] . "' AND tid='{$_G['gp_tid']}'");
     if ($firstsofa >= 1) {
         showmessage(lang('magic/sofa', 'sofa_info_sofaexistence'), '', array(), array('login' => 1));
     }
     $sofamessage = lang('magic/sofa', 'sofa_text', array('actor' => $_G['member']['username'], 'time' => dgmdate(TIMESTAMP), 'magicname' => $this->magic['name']));
     $dateline = $thread['dateline'] + 1;
     insertpost(array('fid' => $thread['fid'], 'tid' => $_G['gp_tid'], 'first' => '0', 'author' => $_G['username'], 'authorid' => $_G['uid'], 'dateline' => $dateline, 'message' => $sofamessage, 'useip' => $_G['clientip'], 'usesig' => '1'));
     DB::query("UPDATE " . DB::table('forum_thread') . " SET replies=replies+1, moderated='1' WHERE tid='{$_G['tid']}'", 'UNBUFFERED');
     DB::query("UPDATE " . DB::table('forum_forum') . " SET posts=posts+1, todayposts=todayposts+1 WHERE fid='{$post['fid']}'", 'UNBUFFERED');
     usemagic($this->magic['magicid'], $this->magic['num']);
     updatemagiclog($this->magic['magicid'], '2', '1', '0', 0, 'tid', $_G['gp_tid']);
     updatemagicthreadlog($_G['gp_tid'], $this->magic['magicid']);
     if ($thread['authorid'] != $_G['uid']) {
         notification_add($thread['authorid'], 'magic', lang('magic/sofa', 'sofa_notification'), array('tid' => $_G['gp_tid'], 'subject' => $thread['subject'], 'magicname' => $this->magic['name']));
     }
     showmessage(lang('magic/sofa', 'sofa_succeed'), dreferer(), array(), array('showdialog' => 1, 'locationtime' => 1));
 }
Beispiel #6
0
 function usesubmit()
 {
     global $_G;
     if (empty($_GET['pid'])) {
         showmessage(lang('magic/repent', 'repent_info_nonexistence'));
     }
     $_G['tid'] = $_GET['ptid'];
     $post = getpostinfo($_GET['pid'], 'pid', array('p.first', 'p.tid', 'p.fid', 'p.authorid', 'p.replycredit', 't.status as thread_status'));
     $this->_check($post);
     require_once libfile('function/post');
     require_once libfile('function/delete');
     if ($post['first']) {
         if ($have_replycredit = C::t('forum_replycredit')->fetch($post['tid'])) {
             $thread = C::t('forum_thread')->fetch($post['tid']);
             if ($thread['replycredit']) {
                 updatemembercount($post['authorid'], array($_G['setting']['creditstransextra'][10] => $replycredit));
             }
             C::t('forum_replycredit')->delete($post['tid']);
             C::t('common_credit_log')->delete_by_operation_relatedid(array('RCT', 'RCA', 'RCB'), $post['tid']);
         }
         deletethread(array($post['tid']));
         updateforumcount($post['fid']);
     } else {
         if ($post['replycredit'] > 0) {
             updatemembercount($post['authorid'], array($_G['setting']['creditstransextra'][10] => -$post['replycredit']));
             C::t('common_credit_log')->delete_by_uid_operation_relatedid($post['authorid'], 'RCA', $post['tid']);
         }
         deletepost(array($_GET['pid']));
         updatethreadcount($post['tid']);
     }
     usemagic($this->magic['magicid'], $this->magic['num']);
     updatemagiclog($this->magic['magicid'], '2', '1', '0', 0, 'tid', $_G['tid']);
     showmessage(lang('magic/repent', 'repent_succeed'), $post['first'] ? 'forum.php?mod=forumdisplay&fid=' . $post['fid'] : dreferer(), array(), array('alert' => 'right', 'showdialog' => 1, 'locationtime' => true));
 }
Beispiel #7
0
 function usesubmit()
 {
     global $_G;
     if (empty($_G['gp_pid'])) {
         showmessage(lang('magic/namepost', 'namepost_info_nonexistence'));
     }
     $_G['tid'] = $_G['gp_ptid'];
     $post = getpostinfo($_G['gp_pid'], 'pid', array('p.first', 'p.tid', 'p.fid', 'p.authorid', 'p.dateline', 'p.anonymous'));
     $this->_check($post);
     $query = DB::query("SELECT username FROM " . DB::table('common_member') . " WHERE uid='{$post['authorid']}'");
     $author = daddslashes(DB::result($query, 0), 1);
     $thread = getpostinfo($post['tid'], 'tid', array('tid', 'subject', 'author', 'replies', 'lastposter'));
     $posttable = getposttablebytid($post['tid']);
     if ($post['first']) {
         $lastposter = $thread['replies'] > 0 ? $thread['lastposter'] : $author;
         DB::query("UPDATE " . DB::table($posttable) . " SET anonymous='0' WHERE tid='{$post['tid']}' AND first='1'");
     } else {
         $lastposter = $author;
         $author = $thread['author'];
         DB::query("UPDATE " . DB::table($posttable) . " SET anonymous='0' WHERE pid='{$_G['gp_pid']}'");
     }
     $forum['lastpost'] = explode("\t", DB::result_first("SELECT lastpost FROM " . DB::table('forum_forum') . " WHERE fid='{$post['fid']}'"));
     if ($thread['subject'] == $forum['lastpost'][1] && ($forum['lastpost'][3] == '' && $post['anonymous'])) {
         $lastpost = "{$thread['tid']}\t{$thread['subject']}\t{$_G['timestamp']}\t{$lastposter}";
         DB::query("UPDATE " . DB::table('forum_forum') . " SET lastpost='{$lastpost}' WHERE fid='{$post['fid']}'", 'UNBUFFERED');
     }
     DB::query("UPDATE " . DB::table('forum_thread') . " SET author='{$author}', lastposter='{$lastposter}' WHERE tid='{$post['tid']}'");
     usemagic($this->magic['magicid'], $this->magic['num']);
     updatemagiclog($this->magic['magicid'], '2', '1', '0', 0, 'tid', $_G['gp_tid']);
     if ($post['authorid'] != $_G['uid']) {
         notification_add($post['authorid'], 'magic', lang('magic/namepost', 'namepost_notification'), array('pid' => $_G['gp_pid'], 'tid' => $_G['gp_tid'], 'subject' => $thread['subject'], 'magicname' => $this->magic['name']));
     }
     showmessage(lang('magic/namepost', 'namepost_succeed'), dreferer(), array(), array('showdialog' => 1, 'locationtime' => true));
 }
 function usesubmit()
 {
     global $_G;
     $info = array('credits' => intval($_POST['credits']), 'percredit' => intval($_POST['percredit']), 'credittype' => $_G['gp_credittype'], 'left' => intval($_POST['credits']), 'magicid' => intval($this->magic['magicid']), 'receiver' => array());
     if ($info['credits'] < 1) {
         showmessage(lang('magic/gift', 'gift_bad_credits_input'));
     }
     if ($info['percredit'] < 1 || $info['percredit'] > $info['credits']) {
         showmessage(lang('magic/gift', 'gift_bad_percredit_input'));
     }
     $member = array();
     if (preg_match('/^extcredits[1-8]$/', $info['credittype'])) {
         $member = DB::fetch_first('SELECT * FROM ' . DB::table('common_member_count') . " WHERE uid = '{$_G['uid']}'");
         if ($member[$info['credittype']] < $info['credits']) {
             showmessage(lang('magic/gift', 'gift_credits_out_of_own'));
         }
         $extcredits = str_replace('extcredits', '', $info['credittype']);
         updatemembercount($_G['uid'], array($extcredits => -$info['credits']), 1, 'BGC', $this->magic['magicid']);
     } else {
         showmessage(lang('magic/gift', 'gift_bad_credittype_input'));
     }
     DB::update('common_member_field_home', array('magicgift' => addslashes(serialize($info))), array('uid' => $_G['uid']));
     usemagic($this->magic['magicid'], $this->magic['num']);
     updatemagiclog($this->magic['magicid'], '2', '1', '0', '0', 'uid', $_G['uid']);
     showmessage(lang('magic/gift', 'gift_succeed'), dreferer(), array(), array('showdialog' => 1, 'locationtime' => true));
 }
 function usesubmit()
 {
     global $_G;
     C::t('home_comment')->update($_GET['id'], array('magicflicker' => 1), $_G['uid']);
     usemagic($this->magic['magicid'], $this->magic['num']);
     updatemagiclog($this->magic['magicid'], '2', '1', '0');
     showmessage(lang('magic/flicker', 'flicker_succeed'), dreferer(), array(), array('alert' => 'right', 'showdialog' => 1, 'closetime' => true, 'locationtime' => true));
 }
Beispiel #10
0
 function common_base()
 {
     global $_G;
     if (!isset($_G['connect'])) {
         $_G['connect']['url'] = 'http://connect.discuz.qq.com';
         $_G['connect']['api_url'] = 'http://api.discuz.qq.com';
         $_G['connect']['avatar_url'] = 'http://avatar.connect.discuz.qq.com';
         // QZone公共分享页面URL
         $_G['connect']['qzone_public_share_url'] = 'http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey';
         $_G['connect']['referer'] = !$_G['inajax'] && CURSCRIPT != 'member' ? $_G['basefilename'] . ($_SERVER['QUERY_STRING'] ? '?' . $_SERVER['QUERY_STRING'] : '') : dreferer();
         // 微薄公共分享Appkey
         $_G['connect']['weibo_public_appkey'] = 'ce7fb946290e4109bdc9175108b6db3a';
         // 新版Connect登录本地代理页
         $_G['connect']['login_url'] = $_G['siteurl'] . 'connect.php?mod=login&op=init&referer=' . urlencode($_G['connect']['referer'] ? $_G['connect']['referer'] : 'index.php');
         // 新版Connect本地Callback代理页
         $_G['connect']['callback_url'] = $_G['siteurl'] . 'connect.php?mod=login&op=callback';
         // 发feed js通知本地代理页
         $_G['connect']['discuz_new_feed_url'] = $_G['siteurl'] . 'connect.php?mod=feed&op=new&formhash=' . formhash();
         $_G['connect']['discuz_new_post_feed_url'] = $_G['siteurl'] . 'connect.php?mod=feed&op=new&action=post&formhash=' . formhash();
         // 发分享js通知本地代理页
         //$_G['connect']['discuz_new_share_url'] = $_G['siteurl'].'connect.php?mod=share&op=new';
         $_G['connect']['discuz_new_share_url'] = $_G['siteurl'] . 'home.php?mod=spacecp&ac=plugin&id=qqconnect:spacecp&pluginop=new';
         // 分享到微博后的回流处理地址
         $_G['connect']['discuz_sync_tthread_url'] = $_G['siteurl'] . 'home.php?mod=spacecp&ac=plugin&id=qqconnect:spacecp&pluginop=sync_tthread&formhash=' . formhash();
         // 更换QQ号登录本地代理页
         $_G['connect']['discuz_change_qq_url'] = $_G['siteurl'] . 'connect.php?mod=login&op=change';
         // QC授权项对应关系
         $_G['connect']['auth_fields'] = array('is_user_info' => 1, 'is_feed' => 2);
         if ($_G['uid']) {
             dsetcookie('connect_is_bind', $_G['member']['conisbind'], 31536000);
             if (!$_G['member']['conisbind'] && $_G['cookie']['connect_login']) {
                 $_G['cookie']['connect_login'] = 0;
                 dsetcookie('connect_login');
             }
         }
         // QQ互联游客更换用户名为QQ昵称
         if (!$_G['uid'] && $_G['connectguest']) {
             if ($_G['cookie']['connect_qq_nick']) {
                 $_G['member']['username'] = $_G['cookie']['connect_qq_nick'];
             } else {
                 $connectGuest = C::t('#qqconnect#common_connect_guest')->fetch($conopenid);
                 if ($connectGuest['conqqnick']) {
                     $_G['member']['username'] = $connectGuest['conqqnick'];
                 }
             }
         }
         if ($this->allow && !$_G['uid'] && !defined('IN_MOBILE')) {
             $_G['setting']['pluginhooks']['global_login_text'] = tpl_login_bar();
         }
     }
 }
Beispiel #11
0
 function on_logout()
 {
     global $_G;
     $ucsynlogout = uc_user_synlogout();
     if ($_G['gp_formhash'] != $_G['formhash']) {
         showmessage('logout_succeed', dreferer(), array('formhash' => FORMHASH, 'ucsynlogout' => $ucsynlogout));
     }
     clearcookies();
     $_G['groupid'] = $_G['member']['groupid'] = 7;
     $_G['uid'] = $_G['member']['uid'] = 0;
     $_G['username'] = $_G['member']['username'] = $_G['member']['password'] = '';
     $_G['setting']['styleid'] = $_G['setting']['styleid'];
     showmessage('logout_succeed', dreferer(), array('formhash' => FORMHASH, 'ucsynlogout' => $ucsynlogout, 'module' => $_G['showmessage']['module'], 'tpl' => $_G['showmessage']['tpl']));
 }
Beispiel #12
0
    function show()
    {
        global $_G;
        $id = !empty($_GET['id']) ? dhtmlspecialchars($_GET['id']) : '';
        $idtype = !empty($_GET['idtype']) ? $_GET['idtype'] : '';
        if (!in_array($idtype, $this->idtypearray)) {
            showmessage(lang('magic/highlight', 'highlight_info_notype'), dreferer(), array(), array('showdialog' => 1, 'locationtime' => true));
        }
        if ($id) {
            $info = getpostinfo($_GET['id'], $idtype);
            if ($idtype == 'tid') {
                $this->_check($info['fid']);
                $this->parameters['expiration'] = $this->parameters['expiration'] && $idtype == 'tid' ? intval($this->parameters['expiration']) : 24;
            }
        }
        magicshowtype('top');
        $lang = lang('magic/highlight');
        magicshowsetting(lang('magic/highlight', 'highlight_info_' . $idtype, array('expiration' => $this->parameters['expiration'])), 'id', $id, 'hidden');
        echo <<<EOF
\t<p class="mtm mbn">{$lang['highlight_color']}</p>
\t<div class="hasd mbm cl">
\t\t<input type="hidden" id="highlight_color" name="highlight_color" />
\t\t<input type="hidden" id="highlight_idtype" name="idtype" value="{$idtype}"/>
\t\t<input type="text" id="highlight_color_show" class="crl readonly="readonly"" />
\t\t<a href="javascript:;" id="highlight_color_ctrl" class="dpbtn" onclick="showHighLightColor('highlight_color')">^</a>
\t</div>
\t<script type="text/javascript" reload="1">
\t\tfunction showHighLightColor(hlid) {
\t\t\tvar showid = hlid + '_show';
\t\t\tif(!\$(showid + '_menu')) {
\t\t\t\tvar str = '';
\t\t\t\tvar coloroptions = {'0' : '#000', '1' : '#EE1B2E', '2' : '#EE5023', '3' : '#996600', '4' : '#3C9D40', '5' : '#2897C5', '6' : '#2B65B7', '7' : '#8F2A90', '8' : '#EC1282'};
\t\t\t\tvar menu = document.createElement('div');
\t\t\t\tmenu.id = showid + '_menu';
\t\t\t\tmenu.className = 'cmen';
\t\t\t\tmenu.style.display = 'none';
\t\t\t\tfor(var i in coloroptions) {
\t\t\t\t\tstr += '<a href="javascript:;" onclick="\$(\\'' + hlid + '\\').value=' + i + ';\$(\\'' + showid + '\\').style.backgroundColor=\\'' + coloroptions[i] + '\\';hideMenu(\\'' + menu.id + '\\')" style="background:' + coloroptions[i] + ';color:' + coloroptions[i] + ';">' + coloroptions[i] + '</a>';
\t\t\t\t}
\t\t\t\tmenu.innerHTML = str;
\t\t\t\t\$('append_parent').appendChild(menu);
\t\t\t}
\t\t\tshowMenu({'ctrlid':hlid + '_ctrl','evt':'click','showid':showid});
\t\t}
\t</script>
EOF;
        magicshowtype('bottom');
    }
Beispiel #13
0
 function usesubmit()
 {
     global $_G;
     if (empty($_G['gp_tid'])) {
         showmessage(lang('magic/bump', 'bump_info_nonexistence'));
     }
     $thread = getpostinfo($_G['gp_tid'], 'tid', array('fid', 'authorid', 'subject'));
     $this->_check($thread['fid']);
     DB::query("UPDATE " . DB::table('forum_thread') . " SET lastpost='" . TIMESTAMP . "', moderated='1' WHERE tid='{$_G['gp_tid']}'");
     usemagic($this->magic['magicid'], $this->magic['num']);
     updatemagiclog($this->magic['magicid'], '2', '1', '0', 0, 'tid', $_G['gp_tid']);
     updatemagicthreadlog($_G['gp_tid'], $this->magic['magicid'], 'BMP');
     if ($thread['authorid'] != $_G['uid']) {
         notification_add($thread['authorid'], 'magic', lang('magic/bump', 'bump_notification'), array('tid' => $_G['gp_tid'], 'subject' => $thread['subject'], 'magicname' => $this->magic['name']));
     }
     showmessage(lang('magic/bump', 'bump_succeed'), dreferer(), array(), array('showdialog' => 1, 'locationtime' => true));
 }
Beispiel #14
0
 function usesubmit()
 {
     global $_G;
     if (empty($_GET['tid'])) {
         showmessage(lang('magic/bump', 'bump_info_nonexistence'));
     }
     $thread = getpostinfo($_GET['tid'], 'tid', array('fid', 'authorid', 'subject'));
     $this->_check($thread['fid']);
     C::t('forum_thread')->update($_GET['tid'], array('moderated' => 1, 'lastpost' => TIMESTAMP));
     usemagic($this->magic['magicid'], $this->magic['num']);
     updatemagiclog($this->magic['magicid'], '2', '1', '0', 0, 'tid', $_GET['tid']);
     updatemagicthreadlog($_GET['tid'], $this->magic['magicid'], 'BMP');
     if ($thread['authorid'] != $_G['uid']) {
         notification_add($thread['authorid'], 'magic', lang('magic/bump', 'bump_notification'), array('tid' => $_GET['tid'], 'subject' => $thread['subject'], 'magicname' => $this->magic['name']));
     }
     showmessage(lang('magic/bump', 'bump_succeed'), dreferer(), array(), array('alert' => 'right', 'showdialog' => 1, 'locationtime' => true));
 }
Beispiel #15
0
 function usesubmit()
 {
     global $_G;
     if (empty($_GET['tid'])) {
         showmessage(lang('magic/close', 'close_info_nonexistence'));
     }
     $thread = getpostinfo($_GET['tid'], 'tid', array('fid', 'authorid', 'subject'));
     $this->_check($thread);
     magicthreadmod($_GET['tid']);
     C::t('forum_thread')->update($_GET['tid'], array('closed' => 1, 'moderated' => 1));
     $this->parameters['expiration'] = $this->parameters['expiration'] ? intval($this->parameters['expiration']) : 24;
     $expiration = TIMESTAMP + $this->parameters['expiration'] * 3600;
     usemagic($this->magic['magicid'], $this->magic['num']);
     updatemagiclog($this->magic['magicid'], '2', '1', '0', 0, 'tid', $_GET['tid']);
     updatemagicthreadlog($_GET['tid'], $this->magic['magicid'], $expiration > 0 ? 'ECL' : 'CLS', $expiration);
     if ($thread['authorid'] != $_G['uid']) {
         notification_add($thread['authorid'], 'magic', lang('magic/close', 'close_notification'), array('tid' => $_GET['tid'], 'subject' => $thread['subject'], 'magicname' => $this->magic['name']));
     }
     showmessage(lang('magic/close', 'close_succeed'), dreferer(), array(), array('alert' => 'right', 'showdialog' => 1, 'locationtime' => true));
 }
Beispiel #16
0
 function usesubmit()
 {
     global $_G;
     if (empty($_G['gp_tid'])) {
         showmessage(lang('magic/highlight', 'highlight_info_nonexistence'));
     }
     $thread = getpostinfo($_G['gp_tid'], 'tid', array('fid', 'authorid', 'subject'));
     $this->_check($thread['fid']);
     magicthreadmod($_G['gp_tid']);
     DB::query("UPDATE " . DB::table('forum_thread') . " SET highlight='{$_G['gp_highlight_color']}', moderated='1' WHERE tid='{$_G['gp_tid']}'");
     $this->parameters['expiration'] = $this->parameters['expiration'] ? intval($this->parameters['expiration']) : 24;
     $expiration = TIMESTAMP + $this->parameters['expiration'] * 3600;
     usemagic($this->magic['magicid'], $this->magic['num']);
     updatemagiclog($this->magic['magicid'], '2', '1', '0', 0, 'tid', $_G['gp_tid']);
     updatemagicthreadlog($_G['gp_tid'], $this->magic['magicid'], 'HLT', $expiration);
     if ($thread['authorid'] != $_G['uid']) {
         notification_add($thread['authorid'], 'magic', lang('magic/stick', 'highlight_notification'), array('tid' => $_G['gp_tid'], 'subject' => $thread['subject'], 'magicname' => $this->magic['name']));
     }
     showmessage(lang('magic/highlight', 'highlight_succeed'), dreferer(), array(), array('showdialog' => 1, 'locationtime' => 1));
 }
Beispiel #17
0
 function usesubmit()
 {
     global $_G;
     if (empty($_G['gp_pid'])) {
         showmessage(lang('magic/repent', 'repent_info_nonexistence'));
     }
     $_G['tid'] = $_G['gp_ptid'];
     $post = getpostinfo($_G['gp_pid'], 'pid', array('p.first', 'p.tid', 'p.fid', 'p.authorid'));
     $this->_check($post);
     require_once libfile('function/post');
     require_once libfile('function/delete');
     if ($post['first']) {
         deletethread("tid='{$post['tid']}'");
         updateforumcount($post['fid']);
     } else {
         deletepost("pid='{$_G['gp_pid']}'");
         updatethreadcount($post['tid']);
     }
     usemagic($this->magic['magicid'], $this->magic['num']);
     updatemagiclog($this->magic['magicid'], '2', '1', '0', 0, 'tid', $_G['tid']);
     showmessage(lang('magic/repent', 'repent_succeed'), $post['first'] ? 'forum.php?mod=forumdisplay&fid=' . $post['fid'] : dreferer(), array(), array('showdialog' => 1, 'locationtime' => 1));
 }
Beispiel #18
0
 public function actionLogout()
 {
     global $_G;
     if (!$_G['uid']) {
         dheader('location: index.php?r=site/index');
     }
     if ($_GET['formhash'] != $_G['formhash']) {
         exit('请求来路不明');
     } else {
         global $_G;
         require_once libfile('function/member');
         $ucsynlogout = $this->setting['allowsynlogin'] ? uc_user_synlogout() : '';
         clearcookies();
         $_G['groupid'] = $_G['member']['groupid'] = 7;
         $_G['uid'] = $_G['member']['uid'] = 0;
         $_G['username'] = $_G['member']['username'] = $_G['member']['password'] = '';
         $_G['setting']['styleid'] = $this->setting['styleid'];
         //退出登录成功
         dheader('location: ' . dreferer());
     }
     return true;
 }
Beispiel #19
0
 function usesubmit()
 {
     global $_G;
     if (empty($_GET['tid'])) {
         showmessage(lang('magic/jack', 'jack_info_nonexistence'));
     }
     $thread = getpostinfo($_GET['tid'], 'tid', array('fid', 'authorid', 'subject', 'lastpost'));
     $this->_check($thread['fid']);
     magicthreadmod($_GET['tid']);
     $this->parameters['expiration'] = $this->parameters['expiration'] ? intval($this->parameters['expiration']) : 1;
     $magicnum = intval($_GET['magicnum']);
     if (empty($magicnum) || $magicnum > $this->magic['num']) {
         showmessage(lang('magic/jack', 'jack_num_not_enough'));
     }
     $expiration = ($thread['lastpost'] > TIMESTAMP ? $thread['lastpost'] : TIMESTAMP) + $this->parameters['expiration'] * $magicnum * 3600;
     C::t('forum_thread')->update($_GET['tid'], array('lastpost' => $expiration));
     usemagic($this->magic['magicid'], $this->magic['num'], $magicnum);
     updatemagiclog($this->magic['magicid'], '2', $magicnum, '0', 0, 'tid', $_GET['tid']);
     if ($thread['authorid'] != $_G['uid']) {
         notification_add($thread['authorid'], 'magic', lang('magic/jack', 'jack_notification'), array('tid' => $_GET['tid'], 'subject' => $thread['subject'], 'magicname' => $this->magic['name']));
     }
     showmessage(lang('magic/jack', 'jack_succeed'), dreferer(), array(), array('alert' => 'right', 'showdialog' => 1, 'locationtime' => true));
 }
Beispiel #20
0
            updatecreditbyaction('sendpm');
            showmessage('do_success', "home.php?mod=space&do=pm&filter=privatepm", array(), array('msgtype' => $_G['gp_inajax'] ? 3 : 1, 'showmsg' => true));
        } else {
            if (in_array($return, array(-1, -2, -3, -4))) {
                showmessage('message_can_not_send' . abs($return));
            } else {
                showmessage('message_can_not_send');
            }
        }
    }
} elseif ($_GET['op'] == 'ignore') {
    if (submitcheck('ignoresubmit')) {
        $single = intval($_G['gp_single']);
        if ($single) {
            uc_pm_blackls_add($_G['uid'], $_POST['ignoreuser']);
            showmessage('do_success', dreferer(), array(), array('showdialog' => 1, 'showmsg' => true, 'closetime' => 1));
        } else {
            uc_pm_blackls_set($_G['uid'], $_POST['ignorelist']);
            showmessage('do_success', 'home.php?mod=space&do=pm&view=ignore', array(), array('showdialog' => 1, 'showmsg' => true, 'closetime' => 1));
        }
    }
} else {
    cknewuser();
    if (!checkperm('allowsendpm')) {
        showmessage('no_privilege');
    }
    $friends = array();
    if ($space['friendnum']) {
        $query = DB::query("SELECT fuid AS uid, fusername AS username FROM " . DB::table('home_friend') . " WHERE uid={$_G['uid']} AND status='1' ORDER BY num DESC, dateline DESC LIMIT 0,100");
        while ($value = DB::fetch($query)) {
            $value['username'] = daddslashes($value['username']);
Beispiel #21
0
                    $adminidnew = $groupterms['main']['adminid'];
                } else {
                    $groupidnew = $db->result_first("SELECT groupid FROM {$tablepre}usergroups WHERE type='member' AND '{$credits}'>=creditshigher AND '{$credits}'<creditslower LIMIT 1");
                    if (in_array($adminid, array(1, 2, 3))) {
                        $query = $db->query("SELECT groupid FROM {$tablepre}usergroups WHERE groupid IN ('" . implode('\',\'', $extgroupidarray) . "') AND radminid='{$adminid}' LIMIT 1");
                        $adminidnew = $db->num_rows($query) ? $adminid : 0;
                    } else {
                        $adminidnew = 0;
                    }
                }
                unset($groupterms['main']);
            }
            unset($groupterms['ext'][$expgroupid]);
        }
        $groupexpirynew = groupexpiry($groupterms);
        $extgroupidsnew = implode("\t", $extgroupidarray);
        $grouptermsnew = addslashes(serialize($groupterms));
        $db->query("UPDATE {$tablepre}members SET adminid='{$adminidnew}', groupid='{$groupidnew}', extgroupids='{$extgroupidsnew}', groupexpiry='{$groupexpirynew}' WHERE uid='{$discuz_uid}'");
        $db->query("UPDATE {$tablepre}memberfields SET groupterms='{$grouptermsnew}' WHERE uid='{$discuz_uid}'");
    }
    include template('groupexpiry');
} elseif ($action == 'switchstatus' && $discuz_uid) {
    if (!$allowinvisible) {
        showmessage('group_nopermission', NULL, 'NOPERM');
    }
    $db->query("UPDATE {$tablepre}members SET invisible = !invisible WHERE uid='{$discuz_uid}'", 'UNBUFFERED');
    include language('misc');
    showmessage($invisible ? '<a href="member.php?action=switchstatus" title="' . $language['login_switch_invisible_mode'] . '" ajaxtarget="loginstatus">' . $language['login_normal_mode'] . '</a>' : '<a href="member.php?action=switchstatus" title="' . $language['login_switch_normal_mode'] . '" ajaxtarget="loginstatus">' . $language['login_invisible_mode'] . '</a>', dreferer());
} else {
    showmessage('undefined_action', NULL, 'HALTED');
}
Beispiel #22
0
                    $valueparse = parse_url($parameters['url']);
                    if (!isset($valueparse['host'])) {
                        @unlink($parameters['url']);
                    }
                }
            }
            DB::query("DELETE FROM " . DB::table('advertisement') . " WHERE advid IN ({$advids})");
        }
        if (is_array($_G['gp_titlenew'])) {
            foreach ($_G['gp_titlenew'] as $advid => $title) {
                DB::query("UPDATE " . DB::table('advertisement') . " SET available='" . $_G['gp_availablenew'][$advid] . "', displayorder='" . $_G['gp_displayordernew'][$advid] . "', title='" . cutstr($_G['gp_titlenew'][$advid], 50) . "' WHERE advid='{$advid}'", 'UNBUFFERED');
            }
        }
        updatecache('advs');
        updatecache('setting');
        cpmsg('adv_update_succeed', dreferer(), 'succeed');
    }
} elseif ($operation == 'add' && !empty($_G['gp_type']) || $operation == 'edit' && !empty($_G['gp_advid'])) {
    if (!submitcheck('advsubmit')) {
        if ($operation == 'edit') {
            $advid = $_G['gp_advid'];
            $adv = DB::fetch_first("SELECT * FROM " . DB::table('advertisement') . " WHERE advid='{$advid}'");
            if (!$adv) {
                cpmsg('undefined_action', '', 'error');
            }
            $adv['parameters'] = unserialize($adv['parameters']);
            $type = $adv['type'];
        } else {
            $adv['parameters']['style'] = 'code';
            $type = $_G['gp_type'];
        }
Beispiel #23
0
if (!getViewPerm($news)) {
    showmessage('您没有查看此信息的权限,请联系管理员', dreferer());
}
//获取分类名称
if ($news['catid']) {
    $news['catname'] = DB::result_first("select name from %t where catid=%d", array('news_cat', $news['catid']));
}
if ($news['opuid'] && ($opuser = getuserbyuid($news['opuid']))) {
    $news['opauthor'] = $opuser['username'];
}
if ($news['moduid'] && ($moduser = getuserbyuid($news['moduid']))) {
    $news['modusername'] = $moduser['username'];
}
$navtitle = $news['subject'];
$navlast = getstr($news['subject'], 15);
$refer = empty($_GET['refer']) ? dreferer() : $_GET['refer'];
//获取信息的发布范围
$sel = array();
$sel_org = array();
$sel_user = array();
if ($news['orgids']) {
    $orgids = explode(',', $news['orgids']);
    $sel_org = C::t('organization')->fetch_all($orgids);
    foreach ($sel_org as $value) {
        $sel[] = $value['orgid'];
    }
    if (in_array('other', $orgids)) {
        $sel[] = 'other';
        $sel_org[] = array('orgname' => '无机构人员', 'orgid' => 'other', 'forgid' => 1);
    }
}
Beispiel #24
0
    if (!empty($_G['inajax'])) {
        $_G['setting']['msgforward'] = unserialize($_G['setting']['msgforward']);
        $mrefreshtime = intval($_G['setting']['msgforward']['refreshtime']) * 1000;
        $message = 1;
        if ($_G['setting']['regverify'] != 1) {
            include template('member/register');
        }
    }
    $param = array('bbname' => $_G['setting']['bbname'], 'username' => $_G['username'], 'uid' => $_G['uid']);
    switch ($_G['setting']['regverify']) {
        case 1:
            $idstring = random(6);
            $authstr = $_G['setting']['regverify'] == 1 ? "{$_G['timestamp']}\t2\t{$idstring}" : '';
            DB::query("UPDATE " . DB::table('common_member_field_forum') . " SET authstr='{$authstr}' WHERE uid='{$_G['uid']}'");
            $verifyurl = "{$_G[siteurl]}member.php?mod=activate&amp;uid={$_G[uid]}&amp;id={$idstring}";
            $email_verify_message = lang('email', 'email_verify_message', array('username' => $_G['member']['username'], 'bbname' => $_G['setting']['bbname'], 'siteurl' => $_G['siteurl'], 'url' => $verifyurl));
            sendmail("{$username} <{$email}>", lang('email', 'email_verify_subject'), $email_verify_message);
            if (!empty($_G['inajax'])) {
                include template('member/register');
            } else {
                showmessage('profile_email_verify', '', $param);
            }
            break;
        case 2:
            showmessage('register_manual_verify', 'home.php?mod=space&do=home', $param);
            break;
        default:
            showmessage('register_succeed', dreferer(), $param);
            break;
    }
}
                        $slash = ' / ';
                    }
                }
            }
            C::t('forum_postcache')->delete($_GET['pid']);
            writelog('ratelog', $logs);
            if ($sendreasonpm) {
                sendreasonpm($post, 'rate_removereason', array('tid' => $thread['tid'], 'pid' => $_GET['pid'], 'subject' => $thread['subject'], 'ratescore' => $ratescore, 'reason' => $reason, 'from_id' => 0, 'from_idtype' => 'removerate'));
            }
            C::t('forum_post')->increase_rate_by_pid('tid:' . $_G['tid'], $_GET['pid'], $rate, $ratetimes);
            if ($post['first']) {
                $threadrate = @intval(@($post['rate'] + $rate) / abs($post['rate'] + $rate));
                C::t('forum_thread')->update($_G['tid'], array('rate' => $threadrate));
            }
        }
        showmessage('thread_rate_removesucceed', dreferer());
    }
} elseif ($_GET['action'] == 'viewratings' && $_GET['pid']) {
    $loglist = $logcount = array();
    $post = C::t('forum_post')->fetch('tid:' . $_G['tid'], $_GET['pid']);
    if ($post['invisible'] != 0) {
        $post = array();
    }
    if ($post) {
        $loglist = C::t('forum_ratelog')->fetch_all_by_pid($_GET['pid']);
    }
    if (empty($post) || empty($loglist)) {
        showmessage('thread_rate_log_nonexistence');
    }
    if ($post['tid'] != $thread['tid']) {
        showmessage('targetpost_donotbelongto_thisthread');
Beispiel #26
0
    }
    $thide = explode('|', $_G['cookie']['thide']);
    $thide = array_slice($thide, -20);
    if (!in_array($_GET['tid'], $thide)) {
        $thide[] = $_GET['tid'];
    }
    dsetcookie('thide', implode('|', $thide), 2592000);
    showmessage('thread_hidden_success', dreferer(), array(), array('showdialog' => true, 'closetime' => true, 'extrajs' => '<script type="text/javascript" reload="1">$(\'normalthread_' . $_GET['tid'] . '\').style.display = \'none\'</script>'));
} elseif ($_GET['action'] == 'hiderecover') {
    if ($_GET['formhash'] != FORMHASH) {
        showmessage('undefined_action', NULL);
    }
    $seccodecheck = true;
    if (submitcheck('hiderecoversubmit')) {
        C::t('forum_threadhidelog')->delete_by_tid($_GET['tid']);
        showmessage('thread_hiderecover_success', dreferer());
    } else {
        include template('forum/hiderecover');
    }
}
function getratelist($raterange)
{
    global $_G;
    $maxratetoday = getratingleft($raterange);
    $ratelist = array();
    foreach ($raterange as $id => $rating) {
        if (isset($_G['setting']['extcredits'][$id])) {
            $ratelist[$id] = '';
            $rating['max'] = $rating['max'] < $maxratetoday[$id] ? $rating['max'] : $maxratetoday[$id];
            $rating['min'] = -$rating['min'] < $maxratetoday[$id] ? $rating['min'] : -$maxratetoday[$id];
            $offset = abs(ceil(($rating['max'] - $rating['min']) / 10));
Beispiel #27
0
            } else {
                showmessage('article_move_select_cat', dreferer());
            }
        }
    }
} elseif ($op == 'verify') {
    if ($aid) {
        check_articleperm($article['catid'], $aid, $article);
    } else {
        showmessage('article_not_exist', dreferer());
    }
} elseif ($op == 'pushplus') {
    if ($aid) {
        check_articleperm($article['catid'], $aid, $article);
    } else {
        showmessage('no_article_specified_for_pushplus', dreferer());
    }
    $pids = (array) $_POST['topiclist'];
    $tid = intval($_GET['tid']);
    $pushedids = array();
    $pushcount = $pushedcount = 0;
    if (!empty($pids)) {
        foreach (C::t('portal_article_content')->fetch_all($aid) as $value) {
            $pushedids[] = intval($value['id']);
            $pushedcount++;
        }
        $pids = array_diff($pids, $pushedids);
    }
    $pushcount = count($pids);
    if (empty($pids)) {
        showmessage($pushedids ? 'all_posts_pushed_already' : 'no_posts_for_pushplus');
    if ($_G['setting']['maxpostsize'] && strlen($_GET['message']) > $_G['setting']['maxpostsize']) {
        showmessage('post_message_toolong', '', array('maxpostsize' => $_G['setting']['maxpostsize']));
    }
    $newcomment = array('ctid' => $_G['collection']['ctid'], 'uid' => $_G['uid'], 'username' => $_G['username'], 'message' => censor($_GET['message']), 'dateline' => $_G['timestamp'], 'useip' => $_G['clientip']);
    if (!$memberrate) {
        $newcomment['rate'] = $_GET['ratescore'];
    } else {
        $_GET['ratescore'] = 0;
    }
    C::t('forum_collectioncomment')->insert($newcomment);
    C::t('forum_collection')->update_by_ctid($_G['collection']['ctid'], 0, 0, 1, 0, $_GET['ratescore'], $_G['collection']['ratenum']);
    if ($_G['collection']['uid'] != $_G['uid']) {
        notification_add($_G['collection']['uid'], "system", 'collection_becommented', array('from_id' => $_G['collection']['ctid'], 'from_idtype' => 'collectioncomment', 'ctid' => $_G['collection']['ctid'], 'collectionname' => $_G['collection']['name']), 1);
    }
    C::t('common_member_status')->update($_G['uid'], array('lastpost' => TIMESTAMP), 'UNBUFFERED');
    showmessage('collection_comment_succ', $tid ? 'forum.php?mod=viewthread&tid=' . $tid : dreferer());
} elseif ($op == 'del') {
    if (!submitcheck('formhash')) {
        showmessage('undefined_action', NULL);
    } else {
        if (!$_G['collection']['ctid'] || !checkcollectionperm($_G['collection'], $_G['uid']) || count($_GET['delcomment']) == 0) {
            showmessage('undefined_action', NULL);
        }
        $delrows = C::t('forum_collectioncomment')->delete_by_cid_ctid($_GET['delcomment'], $_G['collection']['ctid']);
        C::t('forum_collection')->update_by_ctid($_G['collection']['ctid'], 0, 0, -$delrows);
        showmessage('collection_comment_remove_succ', 'forum.php?mod=collection&action=view&op=comment&ctid=' . $ctid);
    }
} elseif ($op == 'pop') {
    $collectionthread = C::t('forum_collectionthread')->fetch_by_ctid_tid($ctid, $tid);
    if (!$collectionthread['ctid']) {
        showmessage('collection_permission_deny');
Beispiel #29
0
    $sql = "SELECT * FROM " . DB::table('forum_alliance_rl') . " WHERE sid='{$sid}' AND uid='{$uid}'";
    $ps = DB::fetch(DB::query($sql));
    if (!submitcheck('applysubrl')) {
        if ($_G['groupid'] == 7) {
            showmessage($php_lang['yyoukewuq'], '', array(), array('login' => true));
        }
    } else {
        if (empty($ps['uid'])) {
            $author = addslashes($_G['username']);
            $subject = addslashes($_GET['subject']);
            $display = intval($displays) == 1 ? 1 : 0;
            $timestamp = $_G['timestamp'];
            DB::insert('forum_alliance_rl', array('id' => '', 'sid' => $sid, 'uid' => $uid, 'author' => $author, 'subject' => $subject, 'display' => $display, 'dateline' => $timestamp));
            showmessage($php_lang['tijiaosher'], dreferer(), array(), array('locationtime' => 2, 'showdialog' => 1, 'showmsg' => true, 'closetime' => 2));
        } else {
            showmessage($php_lang['qwuchongfu'], dreferer(), array(), array('locationtime' => 2, 'showdialog' => 1, 'showmsg' => true, 'closetime' => 2));
        }
    }
    include template('dz55625_haodian:renling');
}
if ($action == 'ercode') {
    include_once 'haodian_code.php';
    if (!isset($_G['cache']['plugin'])) {
        loadcache('plugin');
    }
    @extract($_G['cache']['plugin']['dz55625_haodian']);
    $curls = '?id=dz55625_haodian:haodian&mod=view&sid=';
    $sid = intval($_GET['sid']);
    if ($RewriteStart == 1) {
        $value = 'http://' . $_SERVER['HTTP_HOST'] . '/haodian_' . $sid . '.html';
    } else {
Beispiel #30
0
<?php

/*
 * @copyright   Leyun internet Technology(Shanghai)Co.,Ltd
 * @license     http://www.dzzoffice.com/licenses/license.txt
 * @package     DzzOffice
 * @link        http://www.dzzoffice.com
 * @author      zyx(zyx@dzz.cc)
 */
if (!defined('IN_DZZ') || !defined('IN_ADMIN')) {
    exit('Access Denied');
}
$refer = dreferer();
$operation = trim($_GET['operation']);
$do = trim($_GET['do']);
if ($operation == 'color') {
    $page = intval($_GET['page']) < 1 ? 1 : intval($_GET['page']);
    $list = array();
    $perpage = 20;
    $start = ($page - 1) * $perpage;
    $count = DB::result_first("SELECT COUNT(*) FROM " . DB::table('wallpaper') . " where type='color'");
    if ($count) {
        $query = DB::query("SELECT * FROM " . DB::table('wallpaper') . " where type='color' ORDER BY dateline DESC LIMIT {$start},{$perpage}");
        while ($value = DB::fetch($query)) {
            $value['dateline'] = dgmdate($value['dateline']);
            $list[] = $value;
        }
    }
    $multi = multi($count, $perpage, $page, BASESCRIPT . "?mod={$mod}&operation={$operation}");
} elseif ($operation == 'syscolor') {
    $page = intval($_GET['page']) < 1 ? 1 : intval($_GET['page']);