Exemplo n.º 1
0
 function addmobileauth($uid, $mobile)
 {
     if (!preg_match('/^\\d{11}$/', $mobile)) {
         $this->result['message'] = '手机号码非法';
         return new ApiResponse($this->result);
     }
     $userService = L::loadClass('userservice', 'user');
     /* @var $userService PW_Userservice */
     $uid = intval($uid);
     $userinfo = $userService->get($uid);
     if (!S::isArray($userinfo)) {
         $this->result['message'] = '用户名"' . $username . '"未找到';
         return new ApiResponse($this->result);
     } elseif ($userinfo['authmobile'] && getstatus($userinfo['userstatus'], PW_USERSTATUS_AUTHMOBILE)) {
         $this->result['message'] = '该用户已完成手机实名认证';
         $this->result['authmobile'] = $userinfo['authmobile'];
         return new ApiResponse($this->result);
     }
     $userService->update($userinfo['uid'], array('authmobile' => $mobile));
     $userService->setUserStatus($userinfo['uid'], PW_USERSTATUS_AUTHMOBILE, true);
     //颁发勋章
     if ($db_md_ifopen) {
         $medalService = L::loadClass('medalservice', 'medal');
         $medalService->awardMedalByIdentify($userinfo['uid'], 'shimingrenzheng');
     }
     require_once R_P . 'require/functions.php';
     initJob($userinfo['uid'], 'doAuthMobile');
     $this->result['error'] = 0;
     return new ApiResponse($this->result);
 }
	public function after_newreply() {
		global $rushinfo;
		if(getstatus($this->thread['status'], 3) && $this->param['maxposition']) {
			$rushstopfloor = $rushinfo['stopfloor'];
			if($rushstopfloor > 0 && $this->thread['closed'] == 0 && $this->param['maxposition'] >= $rushstopfloor) {
				$this->param['updatethreaddata'] = array_merge((array)$this->param['updatethreaddata'], array('closed' => 1));
			}
		}
	}
Exemplo n.º 3
0
 function post_mobile_message($message, $url_forward, $values, $extraparam, $custom)
 {
     if ($message == 'comment_add_succeed') {
         showmessage($message);
     }
     if ($values['tid'] && $values['pid']) {
         global $_G;
         $threadstatus = DB::result_first("SELECT status FROM " . DB::table('forum_thread') . " WHERE tid='{$values['tid']}'");
         $setstatusold = base_convert(getstatus($threadstatus, 13) . getstatus($threadstatus, 12) . getstatus($threadstatus, 11), 2, 10);
         $updatestatus = false;
         if (!empty($_POST['allowsound'])) {
             $setstatus = array(1, 0, 0);
             $updatestatus = $setstatusold < 4;
         } elseif (!empty($_POST['allowphoto'])) {
             $setstatus = array(0, 1, 1);
             $updatestatus = $setstatusold < 3;
         } elseif (!empty($_POST['allowlocal'])) {
             $setstatus = array(0, 1, 0);
             $updatestatus = $setstatusold < 2;
         } else {
             $setstatus = array(0, 0, 1);
         }
         if ($updatestatus) {
             foreach ($setstatus as $i => $bit) {
                 $threadstatus = setstatus(13 - $i, $bit, $threadstatus);
             }
             //note DB::update('forum_thread', array('status' => $threadstatus), "tid='$values[tid]'");
             C::t('forum_thread')->update($values['tid'], array('status' => $threadstatus));
         }
         $posttable = getposttablebytid($values['tid']);
         $poststatus = DB::result_first("SELECT status FROM " . DB::table($posttable) . " WHERE pid='{$values['pid']}'");
         $poststatus = setstatus(4, 1, $poststatus);
         if (!empty($_POST['allowlocal'])) {
             $poststatus = setstatus(6, 1, $poststatus);
         }
         if (!empty($_POST['allowsound'])) {
             $poststatus = setstatus(7, 1, $poststatus);
         }
         if (!empty($_POST['mobiletype']) && $_POST['mobiletype'] < 8) {
             $mobiletype = base_convert($_POST['mobiletype'], 10, 2);
             $mobiletype = sprintf('%03d', $mobiletype);
             for ($i = 0; $i < 3; $i++) {
                 $poststatus = setstatus(10 - $i, $mobiletype[$i], $poststatus);
             }
         }
         //note DB::update($posttable, array('status' => $poststatus), "pid='$values[pid]'");
         C::t('forum_post')->update('tid:' . $values['tid'], $values['pid'], array('status' => $poststatus));
         if ($_POST['location']) {
             list($mapx, $mapy, $location) = explode('|', dhtmlspecialchars($_POST['location']));
             C::t('forum_post_location')->insert(array('pid' => $values['pid'], 'tid' => $values['tid'], 'uid' => $_G['uid'], 'mapx' => $mapx, 'mapy' => $mapy, 'location' => $location));
         }
     }
 }
Exemplo n.º 4
0
 private function _check_post_length($message, $length)
 {
     if ($this->param['special'] || $this->thread['special'] || getstatus($this->thread['status'], 3) || !$length) {
         return 0;
     }
     require_once libfile('function/discuzcode');
     $langthread = lang('forum/thread');
     $content = discuzcode($message);
     $content = strip_tags($content);
     $content = str_replace(array(',', '.', '?', '!', $langthread['t_question'], $langthread['t_exclamatory'], $langthread['t_period'], $langthread['t_comma'], '~', $langthread['t_suspension']), '', $content);
     $content = preg_replace('/\\s+/', '', $content);
     $realLength = dstrlen($content);
     $checkQuote = preg_match("/\\s?\\[quote\\][\n\r]*(.+?)[\n\r]*\\[\\/quote\\]\\s?/is", $message) > 0 || preg_match("/\\[img=(\\d{1,4})[x|\\,](\\d{1,4})\\]\\s*([^\\[\\<\r\n]+?)\\s*\\[\\/img\\]/i", $message) > 0 || preg_match("/\\[img\\]\\s*([^\\[\\<\r\n]+?)\\s*\\[\\/img\\]/i", $message) > 0 || preg_match("/\\[attach\\](\\d+)\\[\\/attach\\]/i", $message) > 0;
     if ($checkQuote || $realLength >= $length) {
         return $realLength <= 0 ? 1 : $realLength;
     } else {
         return 0;
     }
 }
Exemplo n.º 5
0
function build_cache_founder()
{
    global $_G;
    $allowadmincp = $status0 = $status1 = array();
    $founders = explode(',', str_replace(' ', '', $_G['config']['admincp']['founder']));
    if ($founders) {
        foreach ($founders as $founder) {
            if (is_numeric($founder)) {
                $fuid[] = $founder;
            } else {
                $fuser[] = $founder;
            }
        }
        $query = DB::query('SELECT uid FROM ' . DB::table('common_member') . ' WHERE ' . ($fuid ? 'uid IN (' . dimplode($fuid) . ')' : '0') . ' OR ' . ($fuser ? 'username IN (' . dimplode($fuser) . ')' : '0'));
        while ($founder = DB::fetch($query)) {
            $allowadmincp[$founder['uid']] = $founder['uid'];
        }
    }
    $query = DB::query('SELECT uid FROM ' . DB::table('common_admincp_member'));
    while ($member = DB::fetch($query)) {
        $allowadmincp[$member['uid']] = $member['uid'];
    }
    $query = DB::query('SELECT uid, allowadmincp FROM ' . DB::table('common_member') . " WHERE allowadmincp > '0' OR uid IN (" . dimplode($allowadmincp) . ')');
    while ($user = DB::fetch($query)) {
        if (isset($allowadmincp[$user['uid']]) && !getstatus($user['allowadmincp'], 1)) {
            $status1[$user['uid']] = $user['uid'];
        } elseif (!isset($allowadmincp[$user['uid']]) && getstatus($user['allowadmincp'], 1)) {
            $status0[$user['uid']] = $user['uid'];
        }
    }
    if (!empty($status0)) {
        DB::query('UPDATE ' . DB::table('common_member') . ' SET allowadmincp=allowadmincp & 0xFE WHERE uid IN (' . dimplode($status0) . ')');
    }
    if (!empty($status1)) {
        DB::query('UPDATE ' . DB::table('common_member') . ' SET allowadmincp=allowadmincp | 1 WHERE uid IN (' . dimplode($status1) . ')');
    }
}
Exemplo n.º 6
0
function build_cache_founder()
{
    global $_G;
    $allowadmincp = $status0 = $status1 = array();
    $founders = explode(',', str_replace(' ', '', $_G['config']['admincp']['founder']));
    if ($founders) {
        foreach ($founders as $founder) {
            if (is_numeric($founder)) {
                $fuid[] = $founder;
            } else {
                $fuser[] = $founder;
            }
        }
        if ($fuid) {
            $allowadmincp = C::t('common_member')->fetch_all($fuid, false, 0);
        }
        if ($fuser) {
            $allowadmincp = $allowadmincp + C::t('common_member')->fetch_all_by_username($fuser);
        }
    }
    $allowadmincp = $allowadmincp + C::t('common_admincp_member')->range();
    $allallowadmincp = C::t('common_member')->fetch_all_by_allowadmincp('0', '>') + C::t('common_member')->fetch_all(array_keys($allowadmincp), false, 0);
    foreach ($allallowadmincp as $uid => $user) {
        if (isset($allowadmincp[$uid]) && !getstatus($user['allowadmincp'], 1)) {
            $status1[$uid] = $uid;
        } elseif (!isset($allowadmincp[$uid]) && getstatus($user['allowadmincp'], 1)) {
            $status0[$uid] = $uid;
        }
    }
    if (!empty($status0)) {
        C::t('common_member')->clean_admincp_manage($status0);
    }
    if (!empty($status1)) {
        C::t('common_member')->update_admincp_manage($status1);
    }
}
Exemplo n.º 7
0
 function isUserBanned($uid)
 {
     $uid = intval($uid);
     if ($uid < 1) {
         return $this->buildResponse(PERMISSIONS_INVALID_PARAMS);
     }
     $userService = L::loadClass('UserService', 'user');
     $userInfo = $userService->get($uid);
     if (!S::isArray($userInfo)) {
         return $this->buildResponse(PERMISSIONS_USER_NOT_EXISTS);
     }
     $groupId = $userInfo['groupid'] == -1 ? $userInfo['memberid'] : $userInfo['groupid'];
     $_G = array();
     if (file_exists(D_P . "data/groupdb/group_{$groupId}.php")) {
         require S::escapePath(D_P . "data/groupdb/group_{$groupId}.php");
     } else {
         require D_P . 'data/groupdb/group_1.php';
     }
     $code = 0;
     if ($groupId == 6 || getstatus($userInfo['userstatus'], PW_USERSTATUS_BANUSER) || !$_G['allowpost']) {
         $code = 500;
     }
     return $this->buildResponse($code);
 }
Exemplo n.º 8
0
         }
         $count -= 2;
         $db->update("DELETE FROM {$pw_posts} WHERE pid=" . pwEscape($rt['pid']));
         $pwSQL = $rt['subject'] ? array('subject' => $rt['subject']) : array();
         $pwSQL += array('icon' => $rt['icon'], 'author' => $rt['author'], 'authorid' => $rt['authorid'], 'postdate' => $rt['postdate'], 'lastpost' => $lastpost, 'lastposter' => $lastposter, 'replies' => $count);
         $db->update("UPDATE pw_threads SET " . pwSqlSingle($pwSQL, false) . " WHERE tid=" . pwEscape($tid));
         # memcache reflesh
         $threadList = L::loadClass("threadlist");
         $threadList->updateThreadIdsByForumId($fid, $tid);
         $db->update("UPDATE {$pw_tmsgs} SET " . pwSqlSingle(array('aid' => $rt['aid'], 'userip' => $rt['userip'], 'ifsign' => $rt['ifsign'], 'ipfrom' => $rt['ipfrom'], 'alterinfo' => $rt['alterinfo'], 'ifconvert' => $rt['ifconvert'], 'content' => $rt['content']), false) . " WHERE tid=" . pwEscape($tid));
     }
     $msg_delrvrc = abs($creditset['Delete']['rvrc']);
     $msg_delmoney = abs($creditset['Delete']['money']);
     $credit->addLog('topic_Delete', $creditset['Delete'], array('uid' => $authorid, 'username' => $author, 'ip' => $onlineip, 'fname' => strip_tags($forum[$fid]['name']), 'operator' => $windid));
     $credit->sets($authorid, $creditset['Delete'], false);
     if ($thread_tpcstatus && getstatus($thread_tpcstatus, 1)) {
         $db->update("DELETE FROM pw_argument WHERE tid=" . pwEscape($tid));
     }
 } else {
     $deltype = 'delrp';
     $deltitle = $subject ? substrs($subject, 28) : substrs($content, 28);
     $db->update("DELETE FROM {$pw_posts} WHERE pid=" . pwEscape($pid));
     $db->update("UPDATE pw_threads SET replies=replies-1 WHERE tid=" . pwEscape($tid));
     $msg_delrvrc = abs($creditset['Deleterp']['rvrc']);
     $msg_delmoney = abs($creditset['Deleterp']['money']);
     $credit->addLog('topic_Deleterp', $creditset['Deleterp'], array('uid' => $authorid, 'username' => $author, 'ip' => $onlineip, 'fname' => strip_tags($forum[$fid]['name']), 'operator' => $windid));
     $credit->sets($authorid, $creditset['Deleterp'], false);
 }
 $credit->setMdata($authorid, 'postnum', -1);
 $credit->runsql();
 if ($db_guestread) {
Exemplo n.º 9
0
function isban($udb, $fid = null)
{
    global $db;
    $retu = $uids = array();
    if (isset($udb['groupid']) && isset($udb['userstatus'])) {
        if ($udb['groupid'] == 6) {
            $retu[$udb['uid']] = 1;
        } elseif ($fid && getstatus($udb['userstatus'], 1) && ($rt = $db->get_one("SELECT uid FROM pw_banuser WHERE uid=" . pwEscape($udb['uid']) . " AND fid=" . pwEscape($fid)))) {
            $retu[$udb['uid']] = 2;
        }
    } else {
        foreach ($udb as $key => $u) {
            if ($u['groupid'] == 6) {
                //是否全局禁言
                $retu[$u['uid']] = 1;
            } elseif (getstatus($u['userstatus'], 1)) {
                //是否版块禁言
                $uids[] = $u['uid'];
            }
        }
        if ($fid && $uids) {
            $uids = pwImplode($uids);
            $query = $db->query("SELECT uid FROM pw_banuser WHERE uid IN ({$uids}) AND fid=" . pwEscape($fid));
            while ($rt = $db->fetch_array($query)) {
                $retu[$rt['uid']] = 2;
            }
        }
    }
    return $retu;
}
Exemplo n.º 10
0
function viewread($read, $start_limit)
{
    global $db, $_G, $isGM, $pwSystem, $groupid, $attach_url, $winduid, $tablecolor, $tpc_author, $tpc_buy, $tpc_pid, $tpc_tag, $count, $orderby, $pageinverse, $timestamp, $db_onlinetime, $attachdir, $attachpath, $readcolorone, $readcolortwo, $lpic, $ltitle, $imgpath, $db_ipfrom, $db_showonline, $stylepath, $db_windpost, $db_windpic, $db_signwindcode, $fid, $tid, $pid, $db_md_ifopen, $_MEDALDB, $rewardtype, $db_shield, $db_iftag, $db_readtag, $viewpic;
    global $ping_logs;
    if ($read['istop'] == 'topped') {
        $read['lou'] = $read['floor'];
    } else {
        $read['lou'] = $count - $start_limit;
    }
    $read['jupend'] = $start_limit == $count - 1 ? "<a name=a></a><a name={$read['pid']}></a>" : "<a name={$read['pid']}></a>";
    $tpc_buy = $read['buy'];
    $tpc_pid = $read['pid'];
    $tpc_tag = NULL;
    $tpc_shield = 0;
    $read['ifsign'] < 2 && ($read['content'] = str_replace("\n", "<br />", $read['content']));
    if ($read['anonymous']) {
        $anonymous = !$isGM && $winduid != $read['authorid'] && !$pwSystem['anonyhide'];
        $read['anonymousname'] = $GLOBALS['db_anonymousname'];
    } else {
        $anonymous = false;
        $read['anonymousname'] = $read['username'];
    }
    $read['ipfrom'] = $db_ipfrom == 1 && $_G['viewipfrom'] ? $read['ipfrom'] : '';
    $read['ip'] = $isGM || $pwSystem['viewip'] ? 'IP:' . $read['userip'] : '';
    if ($read['groupid'] && !$anonymous) {
        $read['groupid'] == '-1' && ($read['groupid'] = $read['memberid']);
        !array_key_exists($read['groupid'], (array) $lpic) && ($read['groupid'] = 8);
        $read['lpic'] = $lpic[$read['groupid']];
        $read['level'] = $ltitle[$read['groupid']];
        $read['regdate'] = get_date($read['regdate'], "Y-m-d");
        $read['lastlogin'] = get_date($read['lastvisit'], "Y-m-d");
        $read['rvrc'] = floor($read['rvrc'] / 10);
        $read['author'] = $read['username'];
        $tpc_author = $read['author'];
        if (!empty($GLOBALS['showfield'])) {
            $customdata = $read['customdata'] ? (array) unserialize($read['customdata']) : array();
            $read['customdata'] = array();
            foreach ($customdata as $key => $val) {
                if ($val && in_array($key, $GLOBALS['showfield'])) {
                    $read['customdata'][$key] = $val;
                }
            }
        }
        $read['ontime'] = (int) ($read['onlinetime'] / 3600);
        $read['groupid'] == 6 && ($read['honor'] = '');
        if ($read['groupid'] != 6 && ($read['ifsign'] == 1 || $read['ifsign'] == 3)) {
            global $sign;
            if (!$sign[$read['author']]) {
                global $db_signmoney, $db_signgroup, $tdtime, $db_signcurtype;
                if ($db_signmoney && strpos($db_signgroup, ",{$read['groupid']},") !== false && (!getstatus($read['userstatus'], PW_USERSTATUS_SHOWSIGN) || !$read['starttime'] || $read[$db_signcurtype] < ($tdtime - $read['starttime']) / 86400 * $db_signmoney)) {
                    $read['signature'] = '';
                } else {
                    if ($db_signwindcode && getstatus($read['userstatus'], PW_USERSTATUS_SIGNCHANGE)) {
                        if ($GLOBALS['gp_right'][$read['groupid']]['imgwidth'] && $GLOBALS['gp_right'][$read['groupid']]['imgheight']) {
                            $db_windpic['picwidth'] = $GLOBALS['gp_right'][$read['groupid']]['imgwidth'];
                            $db_windpic['picheight'] = $GLOBALS['gp_right'][$read['groupid']]['imgheight'];
                        }
                        if ($GLOBALS['gp_right'][$read['groupid']]['fontsize']) {
                            $db_windpic['size'] = $GLOBALS['gp_right'][$read['groupid']]['fontsize'];
                        }
                        $read['signature'] = convert($read['signature'], $db_windpic, 2);
                    }
                    $read['signature'] = str_replace("\n", "<br />", $read['signature']);
                }
                $sign[$read['author']] = $read['signature'];
            } else {
                $read['signature'] = $sign[$read['author']];
            }
        } else {
            $read['signature'] = '';
        }
    } else {
        $read['lpic'] = $lpic['2'];
        $read['level'] = $read['digests'] = $read['postnum'] = $read['money'] = $read['currency'] = '*';
        $read['rvrc'] = $read['lastlogin'] = $read['credit'] = $read['regdate'] = '*';
        $read['honor'] = $read['signature'] = $read['micon'] = $read['aliww'] = '';
        if ($anonymous) {
            $read['oicq'] = $read['ip'] = $read['medals'] = $read['ipfrom'] = '';
            $read['author'] = $GLOBALS['db_anonymousname'];
            $read['authorid'] = 0;
            foreach ($GLOBALS['customfield'] as $key => $val) {
                $field = "field_" . (int) $val['id'];
                $read[$field] = '*';
            }
        }
    }
    list($read['face'], , $httpWidth, $httpHeight, , , , $read['facesize']) = showfacedesign($read['micon'], true, 'm');
    if ($httpWidth > 120 || $httpHeight > 120 || $read['facesize'] == '') {
        $read['facesize'] = ' width="120" height="120"';
    }
    list($read['posttime'], $read['postdate']) = getLastDate($read['postdate']);
    $read['mark'] = $read['reward'] = $read['tag'] = NULL;
    if ($read['ifmark']) {
        $ping_logs[$read['pid']] = $read['ifmark'];
    }
    if ($rewardtype != null) {
        if ($read['lou'] == 0 || $read['ifreward'] > 0 || $rewardtype == '0' && $winduid == $GLOBALS['authorid'] && $winduid != $read['authorid']) {
            $read['reward'] = Getrewhtml($read['lou'], $read['ifreward'], $read['pid']);
        }
    }
    if ($read['icon']) {
        $read['icon'] = "<img src=\"{$imgpath}/post/emotion/{$read['icon']}.gif\" align=\"left\" border=\"0\" />";
    } else {
        $read['icon'] = '';
    }
    if ($db_md_ifopen && $read['medals']) {
        $medals = $ifMedalNotExist = '';
        $md_a = explode(',', $read['medals']);
        foreach ($md_a as $key => $value) {
            if ($value && $_MEDALDB[$value]) {
                $medals .= "<a href=\"apps.php?q=medal\" target=\"_blank\"><img src=\"{$_MEDALDB[$value][smallimage]}\" width=\"30\" height=\"30\"  title=\"{$_MEDALDB[$value][name]}\" /></a>";
            } else {
                unset($md_a[$key]);
                $ifMedalNotExist = 1;
            }
        }
        if ($ifMedalNotExist == 1) {
            $newMedalInfo = implode(',', $md_a);
            $userService = L::loadClass('UserService', 'user');
            /* @var $userService PW_UserService */
            $userService->update($read['authorid'], array('medals' => $newMedalInfo));
        }
        $read['medals'] = $medals . '<br />';
    } else {
        $read['medals'] = '';
    }
    $read['leaveword'] && ($read['content'] .= leaveword($read['leaveword'], $read['pid']));
    if ($read['ifshield'] || $read['groupid'] == 6 && $db_shield) {
        if ($read['ifshield'] == 2) {
            $read['content'] = shield('shield_del_article');
            $read['subject'] = '';
            $tpc_shield = 1;
        } else {
            if ($groupid == '3') {
                $read['subject'] = shield('shield_title');
            } else {
                $read['content'] = shield($read['ifshield'] ? 'shield_article' : 'ban_article');
                $read['subject'] = '';
                $tpc_shield = 1;
            }
        }
        $read['icon'] = '';
    }
    if (!$tpc_shield) {
        if ($read['ifwordsfb'] != $GLOBALS['db_wordsfb']) {
            $read['content'] = wordsConvert($read['content'], array('id' => $tpc_pid == 'tpc' ? $tid : $tpc_pid, 'type' => $tpc_pid == 'tpc' ? 'topic' : 'posts', 'code' => $read['ifwordsfb']));
        }
        if ($read['ifconvert'] == 2) {
            $read['content'] = convert($read['content'], $db_windpost);
        } else {
            $tpc_tag && ($read['content'] = relatetag($read['content'], $tpc_tag));
            strpos($read['content'], '[s:') !== false && ($read['content'] = showface($read['content']));
        }
        if ($read['aid'] && $GLOBALS['attachShow']->isShow($read['ifhide'], $tid)) {
            $read += $GLOBALS['attachShow']->parseAttachs($read['pid'], $read['content'], $winduid == $read['authorid']);
        }
    }
    /**
     * convert the post content
     */
    $read['alterinfo'] && ($read['content'] .= "<div id=\"alert_{$read['pid']}\" style=\"color:gray;margin-top:30px\">[ {$read['alterinfo']} ]</div>");
    if ($read['remindinfo']) {
        $remind = explode("\t", $read['remindinfo']);
        $remind[0] = str_replace("\n", "<br />", $remind[0]);
        $remind[2] && ($remind[2] = get_date($remind[2]));
        $read['remindinfo'] = $remind;
    }
    if ($_GET['keyword']) {
        $keywords = explode("|", $_GET['keyword']);
        foreach ($keywords as $key => $value) {
            if ($value) {
                $read['content'] = preg_replace("/(?<=[\\s\"\\]>()]|[-�]|^)(" . preg_quote($value, '/') . ")([.,:;-?!()\\s\"<\\[]|[-�]|\$)/siU", "<u><font color=\"red\">\\1</font></u>\\2", $read['content']);
            }
        }
    }
    //$GLOBALS['foruminfo']['copyctrl'] && $read['content'] = preg_replace("/<br \/>/eis","copyctrl()",$read['content']);
    return $read;
}
Exemplo n.º 11
0
 function _viewthread_bottom_output()
 {
     if (!$this->allow) {
         return;
     }
     global $_G, $thread, $rushreply, $postlist, $page;
     $uids = $openids = array();
     foreach ($postlist as $pid => $post) {
         if ($post['anonymous']) {
             continue;
         }
         if ($post['authorid']) {
             $uids[$post['authorid']] = $post['authorid'];
         }
     }
     foreach (C::t('#qqconnect#common_member_connect')->fetch_all($uids) as $connect) {
         if ($connect['conisqqshow'] && $connect['conopenid']) {
             $openids[$connect['uid']] = $connect['conopenid'];
         }
     }
     foreach ($postlist as $pid => $post) {
         if (getstatus($post['status'], 5)) {
             $matches = array();
             preg_match('/\\[tthread=(.+?),(.+?)\\](.*?)\\[\\/tthread\\]/', $post['message'], $matches);
             if ($matches[1] && $matches[2]) {
                 $post['message'] = preg_replace('/\\[tthread=(.+?)\\](.*?)\\[\\/tthread\\]/', lang('plugin/qqconnect', 'connect_tthread_message', array('username' => $matches[1], 'nick' => $matches[2])), $post['message']);
             }
             $post['authorid'] = 0;
             $post['author'] = lang('plugin/qqconnect', 'connect_tthread_comment');
             $post['avatar'] = $matches[3] ? '<img src="' . $matches[3] . '/120' . '">' : '<img src="' . $_G['siteurl'] . '/static/image/common/tavatar.gif">';
             $post['groupid'] = '7';
             $postlist[$pid] = $post;
             continue;
         }
         if ($post['anonymous']) {
             continue;
         }
     }
     if ($page == 1 && $postlist[$_G['forum_firstpid']]['invisible'] == 0) {
         $jsurl = '';
         if (!$_G['cookie']['connect_last_sync_t'] && $_G['uid'] && $_G['setting']['connect']['t']['reply'] && !$thread['closed'] && !$rushreply && getstatus($_G['forum_thread']['status'], 14)) {
             $jsurl = $_G['connect']['discuz_sync_tthread_url'] . '&tid=' . $thread['tid'];
             dsetcookie('connect_last_sync_t', 1, 600);
         }
         return tpl_viewthread_bottom($jsurl);
     }
 }
Exemplo n.º 12
0
            }
        }
    } else {
        showmessage('parameters_error', '', array('haserror' => 1));
    }
    include_once template("forum/usertag");
} elseif ($_GET['action'] == 'postreview') {
    if (!$_G['setting']['repliesrank'] || empty($_G['uid'])) {
        showmessage('to_login', null, array(), array('showmsg' => true, 'login' => 1));
    }
    if (empty($_GET['hash']) || $_GET['hash'] != formhash()) {
        showmessage('submit_invalid');
    }
    $doArray = array('support', 'against');
    $post = C::t('forum_post')->fetch('tid:' . $_GET['tid'], $_GET['pid'], false);
    if (!in_array($_GET['do'], $doArray) || empty($post) || $post['first'] == 1 || $_G['setting']['threadfilternum'] && $_G['setting']['filterednovote'] && getstatus($post['status'], 11)) {
        showmessage('undefined_action', NULL);
    }
    $hotreply = C::t('forum_hotreply_number')->fetch_by_pid($post['pid']);
    if ($_G['uid'] == $post['authorid']) {
        showmessage('noreply_yourself_error', '', array(), array('msgtype' => 3));
    }
    if (empty($hotreply)) {
        $hotreply['pid'] = C::t('forum_hotreply_number')->insert(array('pid' => $post['pid'], 'tid' => $post['tid'], 'support' => 0, 'against' => 0, 'total' => 0), true);
    } else {
        if (C::t('forum_hotreply_member')->fetch($post['pid'], $_G['uid'])) {
            showmessage('noreply_voted_error', '', array(), array('msgtype' => 3));
        }
    }
    $typeid = $_GET['do'] == 'support' ? 1 : 0;
    C::t('forum_hotreply_number')->update_num($post['pid'], $typeid);
Exemplo n.º 13
0
	<td>Jenis Kelamin</td>
	<td><select name="kelamin" class="form-control">';
    $hasil = $koneksi_db->sql_query("SELECT * FROM hrd_kelamin ORDER BY kelamin");
    $admin .= '<option value="-">== Jenis Kelamin ==</option>';
    while ($datas = $koneksi_db->sql_fetchrow($hasil)) {
        $pilihan = $datas['id'] == $kelamin ? "selected" : '';
        $admin .= '<option value="' . $datas['id'] . '" ' . $pilihan . '>' . $datas['kelamin'] . '</option>';
    }
    $admin .= '</select></td>
</tr>
<tr>
	<td>Agama</td>
	<td><select name="agama" class="form-control">';
    $hasil = $koneksi_db->sql_query("SELECT * FROM hrd_agama ORDER BY nama");
    $admin .= '<option value="-">== Agama ==</option>';
    while ($datas = $koneksi_db->sql_fetchrow($hasil)) {
        $pilihan = $datas['id'] == $agama ? "selected" : '';
        $admin .= '<option value="' . $datas['id'] . '" ' . $pilihan . '>' . $datas['nama'] . '</option>';
    }
    $admin .= '</select></td>
</tr>
<tr>
	<td>Menikah</td>
	<td><select name="menikah" class="form-control">';
    $hasil = $koneksi_db->sql_query("SELECT * FROM hrd_menikah ORDER BY id");
    $admin .= '<option value="-">== Status ==</option>';
    while ($datas = $koneksi_db->sql_fetchrow($hasil)) {
        $pilihan = $datas['id'] == $menikah ? "selected" : '';
        $admin .= '<option value="' . $datas['id'] . '" ' . $pilihan . '>' . $datas['nama'] . '</option>';
    }
    $admin .= '</select></td>
Exemplo n.º 14
0
 $st_p = $_G['uid'] . '|' . TIMESTAMP;
 dsetcookie('st_p', $st_p . '|' . md5($st_p . $_G['config']['security']['authkey']));
 if ($thread['special'] == 2 && ((!isset($_GET['addtrade']) || $thread['authorid'] != $_G['uid']) && !($tradenum = C::t('forum_trade')->fetch_counter_thread_goods($_G['tid'])))) {
     showmessage('trade_newreply_nopermission', NULL);
 }
 $language = lang('forum/misc');
 $noticeauthor = $noticetrimstr = '';
 if (isset($_GET['repquote']) && ($_GET['repquote'] = intval($_GET['repquote']))) {
     $thaquote = C::t('forum_post')->fetch('tid:' . $_G['tid'], $_GET['repquote']);
     if (!($thaquote && ($thaquote['invisible'] == 0 || $thaquote['authorid'] == $_G['uid'] && $thaquote['invisible'] == -2))) {
         $thaquote = array();
     }
     if ($thaquote['tid'] != $_G['tid']) {
         showmessage('reply_quotepost_error', NULL);
     }
     if (getstatus($thread['status'], 2) && $thaquote['authorid'] != $_G['uid'] && $_G['uid'] != $thread['authorid'] && $thaquote['first'] != 1 && !$_G['forum']['ismoderator']) {
         showmessage('reply_quotepost_error', NULL);
     }
     if (!($thread['price'] && !$thread['special'] && $thaquote['first'])) {
         $quotefid = $thaquote['fid'];
         $message = $thaquote['message'];
         if (strpos($message, '[/password]') !== FALSE) {
             $message = '';
         }
         if ($_G['setting']['bannedmessages'] && $thaquote['authorid']) {
             $author = getuserbyuid($thaquote['authorid']);
             if (!$author['groupid'] || $author['groupid'] == 4 || $author['groupid'] == 5) {
                 $message = $language['post_banned'];
             } elseif ($thaquote['status'] & 1) {
                 $message = $language['post_single_banned'];
             }
Exemplo n.º 15
0
function getblockperm($bid)
{
    global $_G;
    $perm = array('allowmanage' => '0', 'allowrecommend' => '0', 'needverify' => '1');
    $bid = max(0, intval($bid));
    if (!$bid) {
        return $perm;
    }
    $allperm = array('allowmanage' => '1', 'allowrecommend' => '1', 'needverify' => '0');
    if (checkperm('allowdiy')) {
        return $allperm;
    } elseif (!getstatus($_G['member']['allowadmincp'], 4) && !getstatus($_G['member']['allowadmincp'], 5) && !getstatus($_G['member']['allowadmincp'], 6) && !checkperm('allowmanagetopic') && !checkperm('allowaddtopic')) {
        return $perm;
    }
    require_once libfile('class/blockpermission');
    $blockpermsission =& block_permission::instance();
    $perm = $blockpermsission->get_perms_by_bid($bid, $_G['uid']);
    $perm = $perm ? current($perm) : '';
    if (empty($perm)) {
        if ($block = C::t('common_block')->fetch($bid)) {
            $block = array_merge($block, C::t('common_template_block')->fetch_by_bid($bid));
        }
        if (empty($block['targettplname']) && empty($block['blocktype'])) {
            if ($_G['group']['allowmanagetopic'] || $_G['group']['allowaddtopic'] && $block['uid'] == $_G['uid']) {
                $perm = $allperm;
            }
        } elseif (substr($block['targettplname'], 0, 28) == 'portal/portal_topic_content_') {
            if (!empty($_G['group']['allowmanagetopic'])) {
                $perm = $allperm;
            } elseif ($_G['group']['allowaddtopic']) {
                $id = str_replace('portal/portal_topic_content_', '', $block['targettplname']);
                $topic = C::t('portal_topic')->fetch(intval($id));
                if ($topic['uid'] == $_G['uid']) {
                    $perm = $allperm;
                }
            }
        }
    }
    return $perm;
}
Exemplo n.º 16
0
function viewthread_procpost($post, $lastvisit, $ordertype, $maxposition = 0)
{
    global $_G, $rushreply;
    if (!$_G['forum_newpostanchor'] && $post['dateline'] > $lastvisit) {
        $post['newpostanchor'] = '<a name="newpost"></a>';
        $_G['forum_newpostanchor'] = 1;
    } else {
        $post['newpostanchor'] = '';
    }
    $post['lastpostanchor'] = $ordertype != 1 && $_G['forum_numpost'] == $_G['forum_thread']['replies'] || $ordertype == 1 && $_G['forum_numpost'] == $_G['forum_thread']['replies'] + 2 ? '<a name="lastpost"></a>' : '';
    if (!$post['hotrecommended']) {
        if ($_G['forum_pagebydesc']) {
            if ($ordertype != 1) {
                $post['number'] = $_G['forum_numpost'] + $_G['forum_ppp2']--;
            } else {
                $post['number'] = $post['first'] == 1 ? 1 : $_G['forum_numpost'] - 1 - $_G['forum_ppp2']--;
            }
        } else {
            if ($ordertype != 1) {
                $post['number'] = ++$_G['forum_numpost'];
            } else {
                $post['number'] = $post['first'] == 1 ? 1 : --$_G['forum_numpost'];
                $post['number'] = $post['number'] - 1;
            }
        }
    }
    if ($post['existinfirstpage']) {
        if ($_G['forum_pagebydesc']) {
            $_G['forum_ppp2']--;
        } else {
            if ($ordertype != 1) {
                ++$_G['forum_numpost'];
            } else {
                --$_G['forum_numpost'];
            }
        }
    }
    if ($maxposition) {
        $post['number'] = $post['position'];
    }
    if ($post['hotrecommended']) {
        $post['number'] = -1;
    }
    if (!$_G['forum_thread']['special'] && !$rushreply && !$hiddenreplies && $_G['setting']['threadfilternum'] && getstatus($post['status'], 11)) {
        $post['isWater'] = true;
        if ($_G['setting']['hidefilteredpost'] && !$_G['forum']['noforumhidewater']) {
            $post['inblacklist'] = true;
        }
    } else {
        $_G['allblocked'] = false;
    }
    if ($post['inblacklist']) {
        $_G['blockedpids'][] = $post['pid'];
    }
    $_G['forum_postcount']++;
    $post['dbdateline'] = $post['dateline'];
    $post['dateline'] = dgmdate($post['dateline'], 'u', '9999', getglobal('setting/dateformat') . ' H:i:s');
    $post['groupid'] = $_G['cache']['usergroups'][$post['groupid']] ? $post['groupid'] : 7;
    if ($post['username']) {
        $_G['forum_onlineauthors'][$post['authorid']] = 0;
        $post['usernameenc'] = rawurlencode($post['username']);
        $post['readaccess'] = $_G['cache']['usergroups'][$post['groupid']]['readaccess'];
        if ($_G['cache']['usergroups'][$post['groupid']]['userstatusby'] == 1) {
            $post['authortitle'] = $_G['cache']['usergroups'][$post['groupid']]['grouptitle'];
            $post['stars'] = $_G['cache']['usergroups'][$post['groupid']]['stars'];
        }
        $post['upgradecredit'] = false;
        if ($_G['cache']['usergroups'][$post['groupid']]['type'] == 'member' && $_G['cache']['usergroups'][$post['groupid']]['creditslower'] != 999999999) {
            $post['upgradecredit'] = $_G['cache']['usergroups'][$post['groupid']]['creditslower'] - $post['credits'];
            $post['upgradeprogress'] = 100 - ceil($post['upgradecredit'] / ($_G['cache']['usergroups'][$post['groupid']]['creditslower'] - $_G['cache']['usergroups'][$post['groupid']]['creditshigher']) * 100);
            $post['upgradeprogress'] = min(max($post['upgradeprogress'], 2), 100);
        }
        $post['taobaoas'] = addslashes($post['taobao']);
        $post['regdate'] = dgmdate($post['regdate'], 'd');
        $post['lastdate'] = dgmdate($post['lastvisit'], 'd');
        $post['authoras'] = !$post['anonymous'] ? ' ' . addslashes($post['author']) : '';
        if ($post['medals']) {
            loadcache('medals');
            foreach ($post['medals'] = explode("\t", $post['medals']) as $key => $medalid) {
                list($medalid, $medalexpiration) = explode("|", $medalid);
                if (isset($_G['cache']['medals'][$medalid]) && (!$medalexpiration || $medalexpiration > TIMESTAMP)) {
                    $post['medals'][$key] = $_G['cache']['medals'][$medalid];
                    $post['medals'][$key]['medalid'] = $medalid;
                    $_G['medal_list'][$medalid] = $_G['cache']['medals'][$medalid];
                } else {
                    unset($post['medals'][$key]);
                }
            }
        }
        $post['avatar'] = avatar($post['authorid']);
        $post['groupicon'] = $post['avatar'] ? g_icon($post['groupid'], 1) : '';
        $post['banned'] = $post['status'] & 1;
        $post['warned'] = ($post['status'] & 2) >> 1;
    } else {
        if (!$post['authorid']) {
            $post['useip'] = substr($post['useip'], 0, strrpos($post['useip'], '.')) . '.x';
        }
    }
    $post['attachments'] = array();
    $post['imagelist'] = $post['attachlist'] = '';
    if ($post['attachment']) {
        if (!empty($_G['setting']['guestviewthumb']['flag']) && !$_G['uid'] || $_G['group']['allowgetattach'] || $_G['group']['allowgetimage']) {
            $_G['forum_attachpids'][] = $post['pid'];
            $post['attachment'] = 0;
            if (preg_match_all("/\\[attach\\](\\d+)\\[\\/attach\\]/i", $post['message'], $matchaids)) {
                $_G['forum_attachtags'][$post['pid']] = $matchaids[1];
            }
        } else {
            $post['message'] = preg_replace("/\\[attach\\](\\d+)\\[\\/attach\\]/i", '', $post['message']);
        }
    }
    if ($_G['setting']['ratelogrecord'] && $post['ratetimes']) {
        $_G['forum_cachepid'][$post['pid']] = $post['pid'];
    }
    if ($_G['setting']['commentnumber'] && ($post['first'] && $_G['setting']['commentfirstpost'] || !$post['first']) && $post['comment']) {
        $_G['forum_cachepid'][$post['pid']] = $post['pid'];
    }
    $post['allowcomment'] = $_G['setting']['commentnumber'] && in_array(1, $_G['setting']['allowpostcomment']) && ($_G['setting']['commentpostself'] || $post['authorid'] != $_G['uid']) && ($post['first'] && $_G['setting']['commentfirstpost'] && in_array($_G['group']['allowcommentpost'], array(1, 3)) || !$post['first'] && in_array($_G['group']['allowcommentpost'], array(2, 3)));
    $forum_allowbbcode = $_G['forum']['allowbbcode'] ? -$post['groupid'] : 0;
    $post['signature'] = $post['usesig'] ? $_G['setting']['sigviewcond'] ? strlen($post['message']) > $_G['setting']['sigviewcond'] ? $post['signature'] : '' : $post['signature'] : '';
    $imgcontent = $post['first'] ? getstatus($_G['forum_thread']['status'], 15) : 0;
    if (!defined('IN_ARCHIVER')) {
        if ($post['first']) {
            if (!defined('IN_MOBILE')) {
                $messageindex = false;
                if (strpos($post['message'], '[/index]') !== FALSE) {
                    $post['message'] = preg_replace("/\\s?\\[index\\](.+?)\\[\\/index\\]\\s?/ies", "parseindex('\\1', '{$post['pid']}')", $post['message']);
                    $messageindex = true;
                    unset($_GET['threadindex']);
                }
                if (strpos($post['message'], '[page]') !== FALSE) {
                    if ($_GET['cp'] != 'all') {
                        $postbg = '';
                        if (strpos($post['message'], '[/postbg]') !== FALSE) {
                            preg_match("/\\s?\\[postbg\\]\\s*([^\\[\\<\r\n;'\"\\?\\(\\)]+?)\\s*\\[\\/postbg\\]\\s?/is", $post['message'], $r);
                            $postbg = $r[0];
                        }
                        $messagearray = explode('[page]', $post['message']);
                        $cp = max(intval($_GET['cp']), 1);
                        $post['message'] = $messagearray[$cp - 1];
                        if ($postbg && strpos($post['message'], '[/postbg]') === FALSE) {
                            $post['message'] = $postbg . $post['message'];
                        }
                        unset($postbg);
                    } else {
                        $cp = 0;
                        $post['message'] = preg_replace("/\\s?\\[page\\]\\s?/is", '', $post['message']);
                    }
                    if ($_GET['cp'] != 'all' && strpos($post['message'], '[/index]') === FALSE && empty($_GET['threadindex']) && !$messageindex) {
                        $_G['forum_posthtml']['footer'][$post['pid']] .= '<div id="threadpage"></div><script type="text/javascript" reload="1">show_threadpage(' . $post['pid'] . ', ' . $cp . ', ' . count($messagearray) . ', ' . ($_GET['from'] == 'preview' ? '1' : '0') . ');</script>';
                    }
                }
            }
        }
        if (!empty($_GET['threadindex'])) {
            $_G['forum_posthtml']['header'][$post['pid']] .= '<div id="threadindex"></div><script type="text/javascript" reload="1">show_threadindex(0, ' . ($_GET['from'] == 'preview' ? '1' : '0') . ');</script>';
        }
        if (!$imgcontent) {
            $post['message'] = discuzcode($post['message'], $post['smileyoff'], $post['bbcodeoff'], $post['htmlon'] & 1, $_G['forum']['allowsmilies'], $forum_allowbbcode, $_G['forum']['allowimgcode'] && $_G['setting']['showimages'] ? 1 : 0, $_G['forum']['allowhtml'], $_G['forum']['jammer'] && $post['authorid'] != $_G['uid'] ? 1 : 0, 0, $post['authorid'], $_G['cache']['usergroups'][$post['groupid']]['allowmediacode'] && $_G['forum']['allowmediacode'], $post['pid'], $_G['setting']['lazyload'], $post['dbdateline'], $post['first']);
            if ($post['first']) {
                $_G['relatedlinks'] = '';
                $relatedtype = !$_G['forum_thread']['isgroup'] ? 'forum' : 'group';
                if (!$_G['setting']['relatedlinkstatus']) {
                    $_G['relatedlinks'] = get_related_link($relatedtype);
                } else {
                    $post['message'] = parse_related_link($post['message'], $relatedtype);
                }
                if (strpos($post['message'], '[/begin]') !== FALSE) {
                    $post['message'] = preg_replace("/\\[begin(=\\s*([^\\[\\<\r\n]*?)\\s*,(\\d*),(\\d*),(\\d*),(\\d*))?\\]\\s*([^\\[\\<\r\n]+?)\\s*\\[\\/begin\\]/ies", $_G['cache']['usergroups'][$post['groupid']]['allowbegincode'] ? "parsebegin('\\2', '\\7', '\\3', '\\4', '\\5', '\\6');" : '', $post['message']);
                }
            }
        }
    }
    if (defined('IN_ARCHIVER') || defined('IN_MOBILE') || !$post['first']) {
        if (strpos($post['message'], '[page]') !== FALSE) {
            $post['message'] = preg_replace("/\\s?\\[page\\]\\s?/is", '', $post['message']);
        }
        if (strpos($post['message'], '[/index]') !== FALSE) {
            $post['message'] = preg_replace("/\\s?\\[index\\](.+?)\\[\\/index\\]\\s?/is", '', $post['message']);
        }
        if (strpos($post['message'], '[/begin]') !== FALSE) {
            $post['message'] = preg_replace("/\\[begin(=\\s*([^\\[\\<\r\n]*?)\\s*,(\\d*),(\\d*),(\\d*),(\\d*))?\\]\\s*([^\\[\\<\r\n]+?)\\s*\\[\\/begin\\]/ies", '', $post['message']);
        }
    }
    if ($imgcontent) {
        $post['message'] = '<img id="threadimgcontent" src="./' . stringtopic('', $post['tid']) . '">';
    }
    $_G['forum_firstpid'] = intval($_G['forum_firstpid']);
    $post['numbercard'] = viewthread_numbercard($post);
    $post['mobiletype'] = getstatus($post['status'], 4) ? base_convert(getstatus($post['status'], 10) . getstatus($post['status'], 9) . getstatus($post['status'], 8), 2, 10) : 0;
    return $post;
}
Exemplo n.º 17
0
 if ($uc_edit) {
     $ucuser = L::loadClass('Ucuser', 'user');
     list($ucstatus, $errmsg) = $ucuser->edit($uid, $oldinfo['username'], $uc_edit);
     if ($ucstatus < 0) {
         Showmsg($errmsg);
     }
 }
 $userService = L::loadClass('UserService', 'user');
 /* @var $userService PW_UserService */
 $userinfo = $userService->get($uid);
 $userService->setUserStatus($uid, PW_USERSTATUS_PUBLICMAIL, $publicmail);
 $userService->setUserStatus($uid, PW_USERSTATUS_RECEIVEMAIL, $receivemail);
 require_once R_P . 'require/bbscode.php';
 $cksign = convert($signature, $db_windpic, 2);
 $signstatus = $cksign != $signature ? 1 : 0;
 if ($signstatus != getstatus($userstatus, PW_USERSTATUS_SIGNCHANGE)) {
     $userService->setUserStatus($uid, PW_USERSTATUS_SIGNCHANGE, $signstatus);
 }
 if ($groupid == 6) {
     /**
     				$db->update("REPLACE INTO pw_banuser"
     					. " SET " .S::sqlSingle(array(
     						'uid'		=> $uid,
     						'fid'		=> 0,
     						'type'		=> 2,
     						'startdate'	=> $timestamp,
     						'days'		=> 0,
     						'admin'		=> $admin_name,
     						'reason'	=> ''
     				),false));
     				**/
Exemplo n.º 18
0
 function htmread($read, $start_limit)
 {
     global $imgpath, $db_ipfrom, $db_windpost, $db_windpic, $db_signwindcode, $db_shield;
     $lpic = L::config('lpic', 'cache_read');
     $ltitle = L::config('ltitle', 'cache_read');
     $_MEDALDB = L::config('_MEDALDB', 'cache_read');
     $read['lou'] = $start_limit;
     $start_limit == $count - 1 && ($read['jupend'] = '<a name=lastatc></a>');
     $read['ifsign'] < 2 && ($read['content'] = str_replace("\n", "<br>", $read['content']));
     $read['groupid'] == '-1' && ($read['groupid'] = $read['memberid']);
     $anonymous = $read['anonymous'] ? 1 : 0;
     if ($read['groupid'] != '' && $anonymous == 0) {
         !$lpic[$read['groupid']] && ($read['groupid'] = 8);
         $read['lpic'] = $lpic[$read['groupid']];
         $read['level'] = $ltitle[$read['groupid']];
         $read['regdate'] = get_date($read['regdate'], "Y-m-d");
         $read['lastlogin'] = get_date($read['lastvisit'], "Y-m-d");
         $read['aurvrc'] = floor($read['rvrc'] / 10);
         $read['author'] = $read['username'];
         $read['ontime'] = (int) ($read['onlinetime'] / 3600);
         $tpc_author = $read['author'];
         list($read['face'], , $httpWidth, $httpHeight, , , , $read['facesize']) = showfacedesign($read['micon'], true, 'm');
         if ($httpWidth > 120 || $httpHeight > 120 || $read['facesize'] == '') {
             $read['facesize'] = ' width="120" height="120"';
         }
         list($read['posttime']) = getLastDate($read['postdate']);
         if ($db_ipfrom == 1) {
             $read['ipfrom'] = ' From:' . $read['ipfrom'];
         }
         if (L::config('md_ifopen', 'cache_read') && $read['medals']) {
             $medals = '';
             $md_a = explode(',', $read['medals']);
             foreach ($md_a as $key => $value) {
                 if ($value) {
                     $medals .= "<img src=\"{$_MEDALDB[$value][smallimage]}\" title=\"{$_MEDALDB[$value][name]}\" /> ";
                 }
             }
             $read['medals'] = $medals . '<br />';
         } else {
             $read['medals'] = '';
         }
         if ($read['ifsign'] == 1 || $read['ifsign'] == 3) {
             global $sign;
             if (!$sign[$read['author']]) {
                 global $db_signmoney, $db_signgroup, $tdtime;
                 if (strpos($db_signgroup, ",{$read['groupid']},") !== false && $db_signmoney) {
                     $read['signature'] = '';
                 } else {
                     if ($db_signwindcode && getstatus($read['userstatus'], PW_USERSTATUS_SIGNCHANGE)) {
                         $read['signature'] = convert($read['signature'], $db_windpic, 2);
                     }
                     $read['signature'] = str_replace("\n", "<br>", $read['signature']);
                 }
                 $sign[$read['author']] = $read['signature'];
             } else {
                 $read['signature'] = $sign[$read['author']];
             }
         } else {
             $read['signature'] = '';
         }
     } else {
         $read['face'] = "{$imgpath}/face/none.gif";
         $read['lpic'] = '8';
         $read['level'] = $read['digests'] = $read['postnum'] = $read['money'] = $read['regdate'] = $read['lastlogin'] = $read['aurvrc'] = $read['credit'] = '*';
         if ($anonymous) {
             $read['signature'] = $read['honor'] = $read['medals'] = $read['ipfrom'] = '';
             $read['author'] = $GLOBALS['db_anonymousname'];
             $read['authorid'] = 0;
             foreach (L::config('customfield', 'cache_read') as $key => $val) {
                 $field = "field_" . (int) $val['id'];
                 $read[$field] = '*';
             }
         }
     }
     $read['postdate'] = get_date($read['postdate']);
     $read['mark'] = '';
     if ($read['ifmark']) {
         $markdb = explode("\t", $read['ifmark']);
         foreach ($markdb as $key => $value) {
             $read['mark'] .= "<li>{$value}</li>";
         }
     }
     if ($read['icon']) {
         $read['icon'] = "<img src=\"{$imgpath}/post/emotion/{$read['icon']}.gif\" align=left border=0>";
     } else {
         $read['icon'] = '';
     }
     /**
      * 动态判断发帖是否需要转换
      */
     $tpc_shield = 0;
     if ($read['ifshield'] || $read['groupid'] == 6 && $db_shield) {
         $read['subject'] = $read['icon'] = '';
         $read['content'] = shield($read['ifshield'] ? $read['ifshield'] == 1 ? 'shield_article' : 'shield_del_article' : 'ban_article');
         $tpc_shield = 1;
     }
     if (!$tpc_shield) {
         $wordsfb = L::loadClass('FilterUtil', 'filter');
         if (!$wordsfb->equal($read['ifwordsfb'])) {
             $read['content'] = $wordsfb->convert($read['content']);
         }
         if ($read['ifconvert'] == 2) {
             $read['content'] = preg_replace("/\\[sell=(.+?)\\]/is", "", $read['content']);
             $read['content'] = preg_replace("/\\[hide=(.+?)\\]/is", "", $read['content']);
             $read['content'] = str_replace(array('[/hide]', '[/sell]', '[post]', '[/post]'), '', $read['content']);
             $read['content'] = convert($read['content'], $db_windpost);
         } else {
             strpos($read['content'], '[s:') !== false && ($read['content'] = showface($read['content']));
         }
         if ($read['aid'] && $this->attachShow->isShow($read['ifhide'], $tid)) {
             $read += $this->attachShow->parseAttachs($read['pid'], $read['content'], false);
         }
     }
     if ($read['remindinfo']) {
         $remind = explode("\t", $read['remindinfo']);
         $remind[0] = str_replace("\n", "<br />", $remind[0]);
         $remind[2] && ($remind[2] = get_date($remind[2]));
         $read['remindinfo'] = $remind;
     }
     $this->forum->foruminfo['copyctrl'] && ($read['content'] = preg_replace("/<br>/eis", "copyctrl('{$read['colour']}')", $read['content']));
     $read['alterinfo'] && ($read['content'] .= "<br><br><br><font color=gray>[ {$read['alterinfo']} ]</font>");
     return $read;
 }
Exemplo n.º 19
0
$polloptions = isset($polloptions) ? censor(trim($polloptions)) : '';
$readperm = isset($_GET['readperm']) ? intval($_GET['readperm']) : 0;
$price = isset($_GET['price']) ? intval($_GET['price']) : 0;
if (empty($bbcodeoff) && !$_G['group']['allowhidecode'] && !empty($message) && preg_match("/\\[hide=?\\d*\\].*?\\[\\/hide\\]/is", preg_replace("/(\\[code\\](.+?)\\[\\/code\\])/is", ' ', $message))) {
    showmessage('post_hide_nopermission');
}
$urloffcheck = $usesigcheck = $smileyoffcheck = $codeoffcheck = $htmloncheck = $emailcheck = '';
list($seccodecheck, $secqaacheck) = seccheck('post', $_GET['action']);
$_G['group']['allowpostpoll'] = $_G['group']['allowpost'] && $_G['group']['allowpostpoll'] && $_G['forum']['allowpostspecial'] & 1;
$_G['group']['allowposttrade'] = $_G['group']['allowpost'] && $_G['group']['allowposttrade'] && $_G['forum']['allowpostspecial'] & 2;
$_G['group']['allowpostreward'] = $_G['group']['allowpost'] && $_G['group']['allowpostreward'] && $_G['forum']['allowpostspecial'] & 4;
$_G['group']['allowpostactivity'] = $_G['group']['allowpost'] && $_G['group']['allowpostactivity'] && $_G['forum']['allowpostspecial'] & 8;
$_G['group']['allowpostdebate'] = $_G['group']['allowpost'] && $_G['group']['allowpostdebate'] && $_G['forum']['allowpostspecial'] & 16;
$usesigcheck = $_G['uid'] && $_G['group']['maxsigsize'] ? 'checked="checked"' : '';
$ordertypecheck = !empty($thread['tid']) && getstatus($thread['status'], 4) ? 'checked="checked"' : '';
$imgcontentcheck = !empty($thread['tid']) && getstatus($thread['status'], 15) ? 'checked="checked"' : '';
$specialextra = !empty($_GET['specialextra']) ? $_GET['specialextra'] : '';
$_G['forum']['threadplugin'] = dunserialize($_G['forum']['threadplugin']);
if ($specialextra && $_G['group']['allowpost'] && $_G['setting']['threadplugins'] && (!array_key_exists($specialextra, $_G['setting']['threadplugins']) || !@in_array($specialextra, is_array($_G['forum']['threadplugin']) ? $_G['forum']['threadplugin'] : dunserialize($_G['forum']['threadplugin'])) || !@in_array($specialextra, $_G['group']['allowthreadplugin']))) {
    $specialextra = '';
}
if ($special == 3 && !isset($_G['setting']['extcredits'][$_G['setting']['creditstrans']])) {
    showmessage('reward_credits_closed');
}
$_G['group']['allowanonymous'] = $_G['forum']['allowanonymous'] || $_G['group']['allowanonymous'] ? 1 : 0;
if ($_GET['action'] == 'newthread' && $_G['forum']['allowspecialonly'] && !$special) {
    if ($_G['group']['allowpostpoll']) {
        $special = 1;
    } elseif ($_G['group']['allowposttrade']) {
        $special = 2;
    } elseif ($_G['group']['allowpostreward']) {
Exemplo n.º 20
0
<?php 
if ($_G['uid']) {
    ?>
<strong><a href="home.php?mod=space" target="_blank" title="访问我的空间"><?php 
    echo $_G['member']['username'];
    ?>
</a></strong>
<a href="javascript:;" id="myspace" class="showmenu xi2" onmouseover="showMenu(this.id);">快捷导航</a>
<?php 
    if (!empty($_G['setting']['pluginhooks']['global_usernav_extra1'])) {
        echo $_G['setting']['pluginhooks']['global_usernav_extra1'];
    }
    ?>
<a href="home.php?mod=spacecp">设置</a>
<?php 
    if ($_G['uid'] && ($_G['group']['radminid'] == 1 || getstatus($_G['member']['allowadmincp'], 1))) {
        ?>
<a href="admin.php" target="_blank">管理中心</a><?php 
    }
    if (!empty($_G['setting']['pluginhooks']['global_usernav_extra2'])) {
        echo $_G['setting']['pluginhooks']['global_usernav_extra2'];
    }
    ?>
<a href="member.php?mod=logging&amp;action=logout&amp;formhash=<?php 
    echo FORMHASH;
    ?>
">退出</a>
<?php 
} elseif (!empty($_G['cookie']['loginuser'])) {
    ?>
<strong><a id="loginuser"><?php 
Exemplo n.º 21
0
                    $message = preg_replace("@\\[url={$urllist[0][$key]}\\](.*?)\\[/url\\]@i", '\\1', $message);
                }
            }
        }
    }
}
$urloffcheck = $usesigcheck = $smileyoffcheck = $codeoffcheck = $htmloncheck = $emailcheck = '';
$seccodecheck = $_G['setting']['seccodestatus'] & 4 && (!$_G['setting']['seccodedata']['minposts'] || getuserprofile('posts') < $_G['setting']['seccodedata']['minposts']);
$secqaacheck = $_G['setting']['secqaa']['status'] & 2 && (!$_G['setting']['secqaa']['minposts'] || getuserprofile('posts') < $_G['setting']['secqaa']['minposts']);
$_G['group']['allowpostpoll'] = $_G['group']['allowpost'] && $_G['group']['allowpostpoll'] && $_G['forum']['allowpostspecial'] & 1;
$_G['group']['allowposttrade'] = $_G['group']['allowpost'] && $_G['group']['allowposttrade'] && $_G['forum']['allowpostspecial'] & 2;
$_G['group']['allowpostreward'] = $_G['group']['allowpost'] && $_G['group']['allowpostreward'] && $_G['forum']['allowpostspecial'] & 4 && isset($_G['setting']['extcredits'][$_G['setting']['creditstrans']]);
$_G['group']['allowpostactivity'] = $_G['group']['allowpost'] && $_G['group']['allowpostactivity'] && $_G['forum']['allowpostspecial'] & 8;
$_G['group']['allowpostdebate'] = $_G['group']['allowpost'] && $_G['group']['allowpostdebate'] && $_G['forum']['allowpostspecial'] & 16;
$usesigcheck = $_G['uid'] && $_G['group']['maxsigsize'] ? 'checked="checked"' : '';
$ordertypecheck = !empty($thread['tid']) && getstatus($thread['status'], 4) ? 'checked="checked"' : '';
$specialextra = !empty($_G['gp_specialextra']) ? $_G['gp_specialextra'] : '';
if ($specialextra && $_G['group']['allowpost'] && $_G['setting']['threadplugins'] && (!array_key_exists($specialextra, $_G['setting']['threadplugins']) || !@in_array($specialextra, is_array($_G['forum']['threadplugin']) ? $_G['forum']['threadplugin'] : unserialize($_G['forum']['threadplugin'])) || !@in_array($specialextra, $_G['group']['allowthreadplugin']))) {
    $specialextra = '';
}
$_G['group']['allowanonymous'] = $_G['forum']['allowanonymous'] || $_G['group']['allowanonymous'] ? 1 : 0;
if ($_G['gp_action'] == 'newthread' && $_G['forum']['allowspecialonly'] && !$special) {
    if ($_G['group']['allowpostpoll']) {
        $special = 1;
    } elseif ($_G['group']['allowposttrade']) {
        $special = 2;
    } elseif ($_G['group']['allowpostreward']) {
        $special = 3;
    } elseif ($_G['group']['allowpostactivity']) {
        $special = 4;
    } elseif ($_G['group']['allowpostdebate']) {
            ?>
</td>
                    <td><?php 
            echo todate($vo['end_time']);
            ?>
</td>
                    <td><?php 
            echo $vo['cart_model'];
            ?>
</td>
                    <td><?php 
            echo getstatus($vo['effect']);
            ?>
</td>
                    <td><?php 
            echo getstatus($vo['status']);
            ?>
</td>
                    <td><?php 
            echo $vo['detail'];
            ?>
</td>
                    <td><?php 
            echo todate($vo['addtime']);
            ?>
</td>
                </tr><?php 
        }
    }
} else {
    echo "";
Exemplo n.º 23
0
<?php

include 'includes/config.php';
include 'includes/mysql.php';
$idkary = int_filter($_GET['idkary']);
$id = int_filter($_GET['id']);
global $koneksi_db, $translateKal, $url_situs;
$hasil = $koneksi_db->sql_query("SELECT * FROM hrd_karyawan WHERE id='{$idkary}'");
$data = $koneksi_db->sql_fetchrow($hasil);
$nama = $data['nama'];
$jabatan = getjabatan($data['jabatan']);
$departemen = getdepartemen($data['departemen']);
$status = getstatus($data['status']);
$golongan = getgolongan($data['golongan']);
$nip = $data['nip'];
$norek = $data['norek'];
$namarek = $data['namarek'];
$hasil2 = $koneksi_db->sql_query("SELECT * FROM hrd_penggajian WHERE id='{$id}'");
$data2 = $koneksi_db->sql_fetchrow($hasil2);
$bulan = getbulan($data2['bulan']);
$tahun = $data2['tahun'];
$gajipokok = $data2['gajipokok'];
$tstruktural = $data2['tstruktural'];
$tfungsional = $data2['tfungsional'];
$tpengabdian = $data2['tpengabdian'];
$tistrianak = $data2['tistrianak'];
$tuangtransport = $data2['tuangtransport'];
$tbebantugas = $data2['tbebantugas'];
$twalikelas = $data2['twalikelas'];
$tkhusus = $data2['tkhusus'];
$tlain = $data2['tlain'];
Exemplo n.º 24
0
         unset($posts[$pid]);
         $hiddennum++;
         continue;
     } else {
         $tids[$post['tid']][] = $pid;
         $post['message'] = !getstatus($post['status'], 2) || $post['authorid'] == $_G['uid'] ? messagecutstr($post['message'], 100) : '';
         $posts[$pid] = $post;
     }
 }
 if (!empty($tids)) {
     $threads = C::t('forum_thread')->fetch_all_by_tid_displayorder(array_keys($tids), $displayorder, $dglue, array(), $closed);
     foreach ($threads as $tid => $thread) {
         $delrow = false;
         if ($_G['adminid'] != 1 && $thread['displayorder'] < 0) {
             $delrow = true;
         } elseif ($_G['adminid'] != 1 && $_G['uid'] != $thread['authorid'] && getstatus($thread['status'], 2)) {
             $delrow = true;
         } elseif (!isset($_G['cache']['forums'][$thread['fid']])) {
             if (!$_G['setting']['groupstatus']) {
                 $delrow = true;
             } else {
                 $gids[$thread['fid']] = $thread['tid'];
             }
         }
         if ($delrow) {
             foreach ($tids[$tid] as $pid) {
                 unset($posts[$pid]);
                 $hiddennum++;
             }
             unset($tids[$tid]);
             unset($threads[$tid]);
Exemplo n.º 25
0
 function _viewthread_share_method_output()
 {
     global $_G;
     require_once libfile('function/connect');
     if ($GLOBALS['page'] == 1 && $_G['forum_firstpid'] && $GLOBALS['postlist'][$_G['forum_firstpid']]['invisible'] == 0) {
         $_G['connect']['feed_js'] = $_G['connect']['t_js'] = false;
         if (!getstatus($_G['forum_thread']['status'], 7) && $_G['forum_thread']['displayorder'] >= 0) {
             $feedlogstatus = false;
             $_G['connect']['feed_log'] = DB::fetch_first("SELECT * FROM " . DB::table('connect_feedlog') . " WHERE tid='{$_G['tid']}'");
             if ($_G['connect']['feed_log']) {
                 $_G['connect']['feed_interval'] = 300;
                 $_G['connect']['feed_publish_max'] = 1000;
                 if ($_G['connect']['feed_log'] && $_G['member']['conisbind'] && $_G['uid'] == $_G['forum_thread']['authorid']) {
                     if ($_G['connect']['feed_log']['status'] == 1 || $_G['connect']['feed_log']['status'] == 2 && TIMESTAMP - $_G['connect']['feed_log']['lastpublished'] > $_G['connect']['feed_interval'] && $_G['connect']['feed_log']['publishtimes'] < $_G['connect']['feed_publish_max']) {
                         DB::query("UPDATE " . DB::table('connect_feedlog') . " SET status='2', lastpublished='{$_G['timestamp']}', publishtimes=publishtimes+1 WHERE tid='{$_G['tid']}' AND status!=4");
                         $_G['connect']['feed_js'] = $feedlogstatus = true;
                     }
                 }
             } else {
                 $feedlogstatus = true;
             }
         }
         if (!getstatus($_G['forum_thread']['status'], 8) && $_G['forum_thread']['displayorder'] >= 0) {
             $_G['connect']['t_log'] = DB::fetch_first("SELECT * FROM " . DB::table('connect_tlog') . " WHERE tid='{$_G['tid']}'");
             if ($_G['connect']['t_log']) {
                 $_G['connect']['t_interval'] = 300;
                 $_G['connect']['t_publish_max'] = 1000;
                 if ($_G['connect']['t_log'] && $_G['member']['conisbind'] && $_G['uid'] == $_G['forum_thread']['authorid']) {
                     if ($_G['connect']['t_log']['status'] == 1 || $_G['connect']['t_log']['status'] == 2 && TIMESTAMP - $_G['connect']['t_log']['lastpublished'] > $_G['connect']['t_interval'] && $_G['connect']['t_log']['publishtimes'] < $_G['connect']['t_publish_max']) {
                         DB::query("UPDATE " . DB::table('connect_tlog') . " SET status='2', lastpublished='{$_G['timestamp']}', publishtimes=publishtimes+1 WHERE tid='{$_G['tid']}' AND status!=4");
                         $_G['connect']['t_js'] = $tlogstatus = true;
                     }
                 }
             } else {
                 $tlogstatus = true;
             }
         }
         if ($feedlogstatus || $tlogstatus) {
             $newstatus = $_G['forum_thread']['status'];
             $newstatus = $feedlogstatus ? setstatus(7, 1, $newstatus) : $newstatus;
             $newstatus = $tlogstatus ? setstatus(8, 1, $newstatus) : $newstatus;
             DB::query("UPDATE " . DB::table('forum_thread') . " SET status='{$newstatus}' WHERE tid='{$_G['tid']}'");
         }
         $_G['connect']['thread_url'] = $_G['siteurl'] . $GLOBALS['canonical'];
         $_G['connect']['qzone_share_url'] = $_G['siteurl'] . 'home.php?mod=spacecp&ac=plugin&id=qqconnect:spacecp&pluginop=share&sh_type=1&thread_id=' . $_G['tid'];
         $_G['connect']['weibo_share_url'] = $_G['siteurl'] . 'home.php?mod=spacecp&ac=plugin&id=qqconnect:spacecp&pluginop=share&sh_type=2&thread_id=' . $_G['tid'];
         $_G['connect']['pengyou_share_url'] = $_G['siteurl'] . 'home.php?mod=spacecp&ac=plugin&id=qqconnect:spacecp&pluginop=share&sh_type=3&thread_id=' . $_G['tid'];
         $_G['connect']['qzone_share_api'] = $_G['connect']['qzone_public_share_url'] . '?url=' . urlencode($_G['connect']['thread_url']);
         $_G['connect']['pengyou_share_api'] = $_G['connect']['qzone_public_share_url'] . '?to=pengyou&url=' . urlencode($_G['connect']['thread_url']);
         $params = array('oauth_consumer_key' => $_G['setting']['connectappid'], 'title' => $GLOBALS['postlist'][$_G['forum_firstpid']]['subject'], 'url' => $_G['connect']['thread_url']);
         $params['sig'] = connect_get_sig($params, connect_get_sig_key());
         $_G['connect']['t_share_api'] = $_G['connect']['url'] . '/mblog/redirect?' . cloud_http_build_query($params, '', '&');
         $_G['connect']['first_post'] = daddslashes($GLOBALS['postlist'][$_G['forum_firstpid']]);
         $_G['gp_connect_autoshare'] = !empty($_G['gp_connect_autoshare']) ? 1 : 0;
         $_G['connect']['weibo_appkey'] = $_G['connect']['weibo_public_appkey'];
         if ($this->allow && $_G['setting']['connect']['mblog_app_key']) {
             $_G['connect']['weibo_appkey'] = $_G['setting']['connect']['mblog_app_key'];
         }
         $extrajs = '';
         if ($_G['connect']['feed_js'] || $_G['connect']['t_js']) {
             $params = array();
             $params['thread_id'] = $_G['tid'];
             $params['ts'] = TIMESTAMP;
             $params['type'] = bindec(($_G['connect']['t_js'] ? '1' : '0') . ($_G['connect']['feed_js'] ? '1' : '0'));
             $params['sig'] = connect_get_sig($params, connect_get_sig_key());
             $jsurl = $_G['connect']['discuz_new_feed_url'] . '&' . cloud_http_build_query($params, '', '&');
             $extrajs = connect_output_javascript($jsurl);
         }
         if (!$_G['member']['conisbind'] && $_G['group']['allowgetimage'] && $_G['thread']['price'] == 0) {
             if ($_G['connect']['first_post']['message']) {
                 require_once libfile('function/connect');
                 $post['html_content'] = connect_parse_bbcode($_G['connect']['first_post']['message'], $_G['connect']['first_post']['fid'], $_G['connect']['first_post']['pid'], $_G['connect']['first_post']['htmlon'], $attach_images);
                 if ($attach_images && is_array($attach_images)) {
                     $attach_images = array_slice($attach_images, 0, 3);
                     $share_images = array();
                     foreach ($attach_images as $attach_image) {
                         $share_images[] = urlencode($attach_image['big']);
                     }
                     $_G['connect']['share_images'] = implode('|', $share_images);
                     unset($share_images);
                 }
             }
         }
         connect_merge_member();
         return tpl_viewthread_share_method() . $extrajs;
     }
 }
Exemplo n.º 26
0
 function checkJobCondition($userId, $groupid, $job)
 {
     //用户组条件限制
     if (isset($job['usergroup']) && $job['usergroup'] != '') {
         $usergroups = explode(",", $job['usergroup']);
         if (!in_array($groupid, $usergroups)) {
             return false;
         }
     }
     //申请人数条件限制
     if (isset($job['number']) && $job['number'] > 0) {
         $number = $this->countJoberByJobId($job['id']);
         if ($number >= $job['number']) {
             return false;
         }
     }
     //前置任务
     if (isset($job['prepose']) && $job['prepose'] > 0) {
         $prepose = $this->getJob($job['prepose']);
         if ($prepose) {
             $jober = $this->getJoberByJobId($userId, $prepose['id']);
             if (!$jober) {
                 return false;
                 /*前置任务没完成*/
             }
             if ($jober['status'] != 3) {
                 return false;
             }
         }
     }
     //实名认证
     if (S::inArray($job['job'], array('doAuthAlipay', 'doAuthMobile'))) {
         global $db_authstate;
         if (!$db_authstate) {
             return false;
         }
         $userService = $this->_getUserService();
         $userdb = $userService->get($userId, true, false, false);
         if ($job['job'] == 'doAuthAlipay' && getstatus($userdb['userstatus'], PW_USERSTATUS_AUTHALIPAY)) {
             return false;
         }
         if ($job['job'] == 'doAuthMobile' && getstatus($userdb['userstatus'], PW_USERSTATUS_AUTHMOBILE)) {
             return false;
         }
     }
     return true;
 }
<?php if(!empty($_G['setting']['pluginhooks']['global_qmenu_top'])) echo $_G['setting']['pluginhooks']['global_qmenu_top'];?>
<?php if($_G['uid']) { ?>
<ul class="cl nav">
<li><a id="friendnav" href="home.php?mod=space&amp;do=friend">好友</a></li>
<li><a id="favoritenav" href="home.php?mod=space&amp;do=favorite&amp;view=me">收藏</a></li>
<li><a id="medalnav" href="home.php?mod=medal">勋章</a></li>
<li><a id="tasknav" href="home.php?mod=task">任务<?php if($_G['setting']['taskon'] && !empty($_G['cookie']['taskdoing_'.$_G['uid']])) { ?><i>N</i><?php } ?></a></li>
<li><a id="threadnav" href="home.php?mod=space&amp;do=thread&amp;view=me">帖子</a></li>
<li><a id="exchangenav" href="#">礼品兑换</a></li>
<li><a id="ranklistnav" href="misc.php?mod=ranklist">排行榜</a></li>
<li><a id="productsnav" href="#">产品注册</a></li>
<li><a id="pm_ntcnav" href="home.php?mod=space&amp;do=pm">消息<?php if($_G['member']['newpm']) { ?><i>N</i><?php } ?></a></li>
<li><a id="mypromptnav" href="home.php?mod=space&amp;do=notice">提醒<?php if($_G['member']['newprompt']) { ?><i><?php echo $_G['member']['newprompt'];?></i><?php } ?></a></li>
<li><a id="setupnav" href="home.php?mod=spacecp">设置</a></li>
<li><a id="logoutnav" href="member.php?mod=logging&amp;action=logout">退出</a></li>
<?php if(check_diy_perm($topic)) { ?><li><a id="diynav" href="javascript:saveUserdata('diy_advance_mode', '');openDiy();" alt="DIY">DIY</a></li><?php } if(($_G['group']['allowmanagearticle'] || $_G['group']['allowpostarticle'] || $_G['group']['allowdiy'] || getstatus($_G['member']['allowadmincp'], 4) || getstatus($_G['member']['allowadmincp'], 6) || getstatus($_G['member']['allowadmincp'], 2) || getstatus($_G['member']['allowadmincp'], 3))) { ?><li><a id="portalcpnav" href="portal.php?mod=portalcp"><?php if($_G['setting']['portalstatus'] ) { ?>门户管理<?php } else { ?>模块管理<?php } ?></a></li><?php } if($_G['uid'] && $_G['group']['radminid'] > 1) { ?><li><a id="modcpnav" href="forum.php?mod=modcp&amp;fid=<?php echo $_G['fid'];?>" target="_blank"><?php echo $_G['setting']['navs']['2']['navname'];?>管理</a></li><?php } if($_G['uid'] && getstatus($_G['member']['allowadmincp'], 1)) { ?><li><a id="admincpnav" href="admin.php" target="_blank">管理中心</a></li><?php } ?>
</ul>
<?php } elseif($_G['connectguest']) { ?>
<div class="ptm pbw hm">
请先<br /><a class="xi2" href="member.php?mod=connect"><strong>完善帐号信息</strong></a> 或 <a href="member.php?mod=connect&amp;ac=bind" class="xi2 xw1"><strong>绑定已有帐号</strong></a><br />后使用快捷导航
</div>
<?php } else { ?>
<div class="ptm pbw hm">
请 <a href="javascript:;" class="xi2" onclick="lsSubmit()"><strong>登录</strong></a> 后使用快捷导航<br />没有帐号?<a href="member.php?mod=<?php echo $_G['setting']['regname'];?>" class="xi2 xw1"><?php echo $_G['setting']['reglinkname'];?></a>
</div>
<?php } ?>

<?php if(!empty($_G['setting']['pluginhooks']['global_qmenu_bottom'])) echo $_G['setting']['pluginhooks']['global_qmenu_bottom'];?>
</div>
<?php } ?><?php echo adshow("headerbanner/wp a_h");?><div id="nv">
        <div id="hd">
Exemplo n.º 28
0
/**
 * 获取个人空间左侧栏信息
 */
function getAppleftinfo($u, $type = false)
{
    global $db, $db_plist, $winduid, $db_upgrade, $credit;
    $userdb = array();
    $userdb = $db->get_one("SELECT m.uid,m.username,m.email,m.groupid,m.icon,md.rvrc,md.money,md.credit,md.currency,md.digests,md.postnum,md.lastpost,md.onlinetime,ud.diarynum,ud.photonum,ud.owritenum,ud.groupnum,ud.sharenum,ud.diary_lastpost,ud.photo_lastpost,ud.owrite_lastpost,ud.group_lastpost,ud.share_lastpost FROM pw_members m LEFT JOIN pw_memberdata md ON m.uid=md.uid LEFT JOIN pw_ouserdata ud ON m.uid=ud.uid WHERE m.uid=" . pwEscape($u));
    $ismyfriend = isFriend($winduid, $u);
    $friendcheck = getstatus($userdb['userstatus'], 3, 3);
    //	$usericon = showfacedesign($userdb['icon'],true);
    list($usericon) = showfacedesign($userdb['icon'], 1, 'm');
    $usercredit = array('postnum' => $userdb['postnum'], 'digests' => $userdb['digests'], 'rvrc' => $userdb['rvrc'], 'money' => $userdb['money'], 'credit' => $userdb['credit'], 'currency' => $userdb['currency'], 'onlinetime' => $userdb['onlinetime']);
    foreach ($credit->get($userdb['uid'], 'CUSTOM') as $key => $value) {
        $usercredit[$key] = $value;
    }
    $totalcredit = CalculateCredit($usercredit, unserialize($db_upgrade));
    $userdb['rvrc'] /= 10;
    $app_with_count = array('topic', 'diary', 'photo', 'owrite', 'group', 'share');
    foreach ($app_with_count as $key => $value) {
        $postnum = $posttime = '';
        $appcount[$value] = getPostnumByType($value, $userdb, true);
    }
    $p_list = $db_plist && count($db_plist) > 1 ? $db_plist : array();
    return array($userdb, $ismyfriend, $friendcheck, $usericon, $usercredit, $totalcredit, $appcount, $p_list);
}
        
        <div class="xm_um_ex_info">
            <ul class="base_info">
                
                

            </ul>
            <div class="action">
                <ul>
            
                   
<?php if(($_G['group']['allowmanagearticle'] || $_G['group']['allowpostarticle'] || $_G['group']['allowdiy'] || getstatus($_G['member']['allowadmincp'], 4) || getstatus($_G['member']['allowadmincp'], 6) || getstatus($_G['member']['allowadmincp'], 2) || getstatus($_G['member']['allowadmincp'], 3))) { } if($_G['uid'] && $_G['group']['radminid'] > 1) { ?>
<li><a href="forum.php?mod=modcp&amp;fid=<?php echo $_G['fid'];?>" target="_blank"><?php echo $_G['setting']['navs']['2']['navname'];?>管理</a></li>
<?php } if($_G['uid'] && $_G['adminid'] == 1 && $_G['setting']['cloud_status']) { ?>
<li><a href="admin.php?frames=yes&amp;action=cloud&amp;operation=applist" target="_blank">云平台</a></li>
<?php } if($_G['uid'] && getstatus($_G['member']['allowadmincp'], 1)) { ?>
<li><a href="admin.php" target="_blank">管理中心</a></li>
<?php } ?>

                                        <!--<script language="javascript">delayShow($('myprompt'), function() {showMenu({'ctrlid':'myprompt','pos':'43','duration':3})});</script>-->
                    <script language="javascript">showMenu({'ctrlid':'pm_ntc','pos':'34','duration':3,'layer':15});</script>
                    
                    
                    
                    
                    
                    
                                        <li><a href="member.php?mod=logging&amp;action=logout&amp;formhash=<?php echo FORMHASH;?>">退出</a></li>
                </ul>
            </div>
Exemplo n.º 30
0
    $favforums = C::t('home_favorite')->fetch_all_by_uid_idtype($_G['uid'], 'fid');
    $visitedforums = array();
    if ($_G['cookie']['visitedfid']) {
        loadcache('forums');
        foreach (explode('D', $_G['cookie']['visitedfid']) as $fid) {
            $visitedforums[$fid] = $_G['cache']['forums'][$fid]['name'];
        }
    }
    $forumlist = forumselect(FALSE, 1);
    include template('forum/ajax_forumlist');
} elseif ($_GET['action'] == 'quickreply') {
    $tid = intval($_GET['tid']);
    $fid = intval($_GET['fid']);
    if ($tid) {
        $thread = C::t('forum_thread')->fetch($tid);
        if ($thread && !getstatus($thread['status'], 2)) {
            $list = C::t('forum_post')->fetch_all_by_tid('tid:' . $tid, $tid, true, 'DESC', 0, 10, null, 0);
            loadcache('smilies');
            foreach ($list as $pid => $post) {
                if ($post['first']) {
                    unset($list[$pid]);
                } else {
                    $post['message'] = preg_replace($_G['cache']['smilies']['searcharray'], '', $post['message']);
                    $post['message'] = preg_replace("/\\{\\:soso_((e\\d+)|(_\\d+_\\d))\\:\\}/e", '', $post['message']);
                    $list[$pid]['message'] = cutstr(preg_replace("/\\[.+?\\]/ies", '', dhtmlspecialchars($post['message'])), 300);
                }
            }
            krsort($list);
        }
    }
    list($seccodecheck, $secqaacheck) = seccheck('post', 'reply');