function manage() { $id = (int) $this->Get['id']; $page = empty($this->Get['page']) ? 0 : intval($this->Get['page']); $perpage = 8; if ($page == 0) { $page = 1; } $start = ($page - 1) * $perpage; $rs = array(); $count = DB::result_first("select count(*) from " . TABLE_PREFIX . "event_member where id = '{$id}' and app = 1"); $sql = "select am.fid,m.nickname,am.app_info,am.app_time,am.play from " . TABLE_PREFIX . "event_member am\r\n\t\t\t\tleft join " . TABLE_PREFIX . "members m on m.uid = am.fid\r\n\t\t\t\twhere am.id = '{$id}'\r\n\t\t\t\tand am.app = 1\r\n\t\t\t\torder by am.app_time desc\r\n\t\t\t\tlimit {$start},{$perpage}"; $multi = ajax_page($count, $perpage, $page, 'manage'); $query = $this->DatabaseHandler->Query($sql); while ($rsdb = $query->GetRow()) { if ($rsdb['play']) { $rsdb['type'] = "已参加"; $rsdb['check'] = 'checked'; } else { $rsdb['type'] = "尚未审核"; } $rsdb['app_time'] = date("m-d h:i", $rsdb['app_time']); $app_info = unserialize($rsdb['app_info']); foreach ($app_info as $key => $value) { $rsdb['app'][$key] = $value; } $rs[$rsdb['fid']] = $rsdb; } include template('event/event_manage'); exit; }
function userfans() { $page = empty($this->Get['page']) ? 0 : intval($this->Get['page']); $qid = empty($this->Get['qid']) ? 0 : intval(trim($this->Get['qid'])); if ($qid == 0) { json_error('错误的操作'); } $qun_info = $this->QunLogic->get_qun_info($qid); if (empty($qun_info)) { json_error('当前' . $this->Config[changeword][weiqun] . '不存在或已经被删除'); } $prepage = 20; if ($page == 0) { $page = 1; } $start = ($page - 1) * $prepage; $fans_ids = array(); $uid = MEMBER_ID; $count = DB::result_first("SELECT count(*)\r\n\t\t\t\t\t\t\tFROM " . DB::table("buddys") . "\r\n\t\t\t\t\t\t\tWHERE `buddyid`='{$uid}' AND uid!='{$qun_info[founderuid]}'"); if ($count) { $query = DB::query("SELECT `uid`\r\n\t\t\t\t\t\t\t\tFROM " . DB::table("buddys") . "\r\n\t\t\t\t\t\t\t\tWHERE `buddyid`='{$uid}' AND uid!='{$qun_info[founderuid]}'\r\n\t\t\t\t\t\t\t\tLIMIT {$start},{$prepage}"); while ($value = DB::fetch($query)) { $fans_ids[] = $value['uid']; } $members = $this->TopicLogic->GetMember($fans_ids); $multi = ajax_page($count, $prepage, $page, 'getUserFans', array('qid' => $qid)); } include_once template("qun/userfans"); }
function onajaxask() { $search_conf = unserialize(stripslashes($_COOKIE['search_conf'])); $tag_arr = $search_conf['tag']; $game = $search_conf['game']; $page = isset($this->post['page']) ? intval($this->post['page']) : 1; $imgType = isset($this->post['imgType']) ? intval($this->post['imgType']) : 0; $qtype = isset($this->post['qtype']) ? intval($this->post['qtype']) : 0; $pagesize = $this->setting['list_default']; $quePage = $page == 0 ? 1 : $page; $categoryType = ''; // 获取咨询 ,建议类型 1 咨询,2建议 if ($imgType == 2) { $categoryType = 1; // 咨询类型 $typeCatogary = '[咨询] '; } else { if ($imgType == 4) { $categoryType = 3; // 建议类型 $typeCatogary = '[建议] '; } } $rownum = $_ENV['question']->front_get_num($tag_arr, $game, $categoryType, $qtype); if (empty($rownum)) { $question_list = array(); } else { $totalPage = @ceil($rownum / $pagesize); $quePage > $totalPage && ($quePage = $totalPage); $startindex = ($quePage - 1) * $pagesize; $question_list = $_ENV['question']->front_question_show($qtype, $tag_arr, $game, $categoryType, $startindex, $pagesize); $questr = ajax_page($rownum, $pagesize, $quePage, "list/ajaxask", $imgType, $qtype); $allQtypeList = $_ENV['qtype']->GetAllQType(1, '', 0, 1); $allQtypeLiList = ''; $str = ''; if (!empty($allQtypeList)) { foreach ($allQtypeList as $value) { $qtypeComplain = unserialize($value['complain']); if (intval($qtypeComplain['visiable']) == 1) { $allQtypeLiList .= "<li onclick=\"gotopage('?list/ajaxask',1,{$imgType},{$value['id']})\">{$value['name']}</li>"; } if ($value['name'] == "申请理赔") { $allQtypeLiList .= "<li onclick=\"gotopage('?list/ajaxask',1,{$imgType},{$value['id']})\">{$value['name']}</li>"; } } } } if (!empty($question_list)) { $str .= '<dl class="b_top"> <dd> <span class="titlenew1 t_cen">问题描述</span> <span class="titlenew2"> <span class="listselect_type">问题类型</span> <ul class="list_select">' . $allQtypeLiList . '</ul> </span> <span class="titlenew3 color_999">提问时间</span> <span class="titlenew4 color_999">回复时间</span> <span class="titlenew5">回复状态</span> <span class="titlenew6">浏览量</span> </dd> </dl>'; $str .= '<dl id="info' . $imgType . '">'; foreach ($question_list as $key => $QueList) { $qtype = $_ENV['qtype']->GetQType($QueList['qtype']); $category = !empty($qtype['name']) ? $qtype['name'] : '其他问题 '; if ($QueList['status'] == 1) { // changed $s_class = '<span class="c_f00">回复中</span>'; } else { $s_class = '<span class="c_090">已回复</span>'; } if (mb_strlen($QueList['time'], 'UTF-8') > 9) { $classAskTime = 'titlenew3 line_h18'; } else { $classAskTime = 'titlenew3'; } $str .= '<dd>'; $category = ajax_page_single($category, $pagesize, $quePage, "list/ajaxask", $imgType, $QueList['qtype']); $str .= '<span class="titlenew1"><a href="?question/detail/' . $QueList['id'] . '/' . $imgType . '" target="_blank">' . cutstr($typeCatogary . $QueList['description'], $this->count, '..') . '</a></span>'; $str .= '<span class="titlenew2">' . $category . '</span>'; $str .= '<span class="' . $classAskTime . '">' . $QueList['time'] . '</span>'; $str .= '<span class="titlenew4">' . $QueList['Atime'] . '</span>'; $str .= '<span class="titlenew5">' . $s_class . '</span>'; $str .= '<span class="titlenew6">' . $QueList['views'] . '</span>'; $str .= '</dd>'; } $str .= '</dl>'; $str .= '<div class="pagination">' . $questr . '</div>'; } else { $str .= '<div class="message_box"><s class="ico_warning_5"></s>啊噢,没有相关的问题噢,您可以尝试修改条件重新搜索。</div>'; } echo $str . '<script type="text/javascript">$("#info' . $imgType . ' dd:even").attr("className", "bg_gray");</script>'; }
function PmGroupList() { $uid = (int) MEMBER_ID; $gid = (int) $this->Post['group_id']; if ($uid < 1) { exit('请先登录后再操作'); } $member_info = jsg_member_info($uid); $group_name = ''; $count = 0; $perpage = 7; $page = max(1, jget('page', 'int')); $uids = array(); if ($gid > 0 && ($row = $group_info = jtable('buddy_follow_group')->info($gid)) && $row['uid'] == $uid) { $group_name = $group_info['name']; $count = $group_info['count']; if ($count > 0) { $p = array('uid' => $uid, 'gid' => $gid, 'result_count' => $count, 'per_page_num' => $perpage, 'sql_order' => ' `dateline` DESC '); $uids = jtable('buddy_follow_group')->get_ids($p, 'touid'); } } else { $count = $member_info['follow_count']; if ($count > 0) { $p = array('uid' => $uid, 'result_count' => $count, 'pre_page_num' => $perpage, 'sql_order' => ' `dateline` DESC '); $uids = get_buddyids($p); } } if ($count > 0) { $page_html = ajax_page($count, $perpage, $page, 'pm_group_list', $gid); $members = $this->TopicLogic->GetMember("where `uid` in (" . jimplode($uids) . ")", "`uid`,`ucuid`,`username`,`fans_count`,`validate`,`province`,`city`,`face`,`nickname`"); foreach ($members as $_m) { $member_list[$_m['uid']]['uid'] = $_m['uid']; $member_list[$_m['uid']]['nickname'] = $_m['nickname']; $member_list[$_m['uid']]['face'] = $_m['face']; } } include template('pm/pm_follow_user_ajax'); }
function showTab() { $html = ''; $rid = (int) get_param('fid'); $id = (int) get_param('id'); if (!$rid || !$id) { return '<div>未知错误。</div>'; } else { if (MEMBER_ID < 1) { return '<div>需要登录才可以查看有奖信息。</div>'; } else { #转发规则 if ($id == 1) { $html .= '<p>1、有奖转发由发起者设定奖品、转发原文以及可参加抽奖条件; </p>'; $html .= '<p>2、活动发起者不得向参与者收取费用,否则视为无效。活动中奖结果均以系统自动下发的中奖通知为准。如出现拒绝兑现情况,将视为虚假活动; </p>'; $html .= '<p>3、所有符合转发条件的用户都可以免费参加转发及抽奖;</p>'; $html .= '<p>4、发起人将在结束后,使用系统工具对有效转发者进行抽奖,并公布中奖名单; </p>'; $html .= '<p>5、中奖结果随机产生,本着"公平、工作、公开"的原则,即开即奖; </p>'; $html .= '<p>6、中奖者请务必及时联系发起者领取奖品; </p>'; $html .= '<p>7、禁止任何不正当手段(以获奖为目的,恶意注册多个帐号)及舞弊行为参与本活动,一经发现,活动发起人有权取消该用户的获奖资格; </p>'; $html .= '<p>8、如中奖用户删除了参与本活动的转发微博,活动发起人有权取消其获奖资格;</p>'; $html .= '<p>9、本次转发活动解释权归发起人所有;</p>'; $html .= '<p>10、发起者应严格保密获奖用户提交的相关联系信息,严禁外泄。如出现问题,责任由发起者承担;</p>'; $html .= '<p>11、如中奖用户删除了参与本活动的转发微博,活动发起人有权取消其获奖资格;</p>'; } else { if ($id == 2) { $reward = jlogic('reward')->getRewardInfo($rid); if (!$reward) { $html .= '<div>有奖转发活动无效。</div>'; } $prize = $reward['prize']; $where = " where u.`rid` = '{$rid}' "; $pid = get_param('pid'); if (isset($pid)) { $where .= " and u.`pid` = '{$pid}' "; $selected[$pid] = ' selected '; } $page = empty($this->Get['page']) ? 0 : (int) $this->Get['page']; $perpage = 8; if ($page == 0) { $page = 1; } $start = ($page - 1) * $perpage; $sql = " select u.*,m.username,m.nickname\r\n\t\t\t\t\t\t from `" . TABLE_PREFIX . "reward_win_user` u\r\n\t\t\t\t\t\t left join `" . TABLE_PREFIX . "members` m on m.uid = u.uid\r\n\t\t\t\t\t\t {$where}\r\n\t\t\t\t\t\t limit {$start},{$perpage}"; $query = DB::query($sql); while ($rs = DB::fetch($query)) { $rs['dateline'] = date('Y-m-d H:i:s', $rs['dateline']); $prize_user_list[$rs['uid']] = $rs; $prize_user_list[$rs['uid']]['prize_name'] = $prize[$rs['pid']]['prize_name']; $prize_user_list[$rs['uid']]['prize'] = $prize[$rs['pid']]['prize']; } $count = DB::result_first('select count(*) from `' . TABLE_PREFIX . "reward_win_user` u {$where} "); $param = array('rid' => $rid, 'id' => $id, 'pid' => $pid); $multi = ajax_page($count, $perpage, $page, 'manage', $param); } else { if ($id == 3) { $my_prize = jlogic('reward')->getUserPrize($rid); } } } } } include_once template('reward/reward_tab_ajax'); }
function joined() { $page = empty($this->Get['page']) ? 0 : intval($this->Get['page']); $type = trim($this->Get['type']); $vid = empty($this->Get['vid']) ? 0 : intval($this->Get['vid']); if ($page == 0) { $page = 1; } $prepage = 6; $start = ($page - 1) * $prepage; $where_sql = " 1 "; $page_param = array(); if ($type == 'follow') { $this->_check_login(); $buddy_ids = get_buddyids(MEMBER_ID); $where_sql .= " AND vu.vid='{$vid}' AND uid IN(" . jimplode($buddy_ids) . ") "; $page_param = array('c' => 2); } else { $type = 'all'; $where_sql .= " AND vu.vid='{$vid}' "; $page_param = array('c' => 1); } $order_sql = " vu.dateline DESC "; $count = DB::result_first("SELECT COUNT(*) FROM " . DB::table('vote_user') . " AS vu WHERE {$where_sql}"); if ($count) { $query = DB::query("SELECT vu.*,m.nickname\r\n\t\t\t\t\t FROM " . DB::table('vote_user') . " AS vu\r\n\t\t\t\t\t LEFT JOIN " . DB::table("members") . " AS m\r\n\t\t\t\t\t USING (uid)\r\n\t\t\t\t\t WHERE {$where_sql}\r\n\t\t\t\t\t ORDER BY {$order_sql}\r\n\t\t\t\t\t LIMIT {$start},{$prepage}"); while ($value = DB::fetch($query)) { $value['option'] = unserialize($value['option']); $value['option'] = '"' . implode('","', $value['option']) . '"'; $value['dateline'] = my_date_format2($value['dateline']); if (empty($value['username'])) { $value['nickname'] = '**'; } $list[] = $value; } $multi = ajax_page($count, $prepage, $page, 'getVoteJoined', $page_param); } include template('vote/vote_ajax_joined'); }
function onajaxdustbin() { $page = isset($this->post['page']) ? intval($this->post['page']) : 1; $imgType = isset($this->post['imgType']) ? intval($this->post['imgType']) : 0; $qtype = isset($this->post['qtype']) ? intval($this->post['qtype']) : 0; $pagesize = $this->setting['list_default']; $dustbinCidType = $_ENV['question']->getType(4); // 获取垃圾箱问题分类 $where = $_ENV['question']->front_getWhere($dustbinCidType, "", $qtype, 'month'); $rownum = $_ENV['question']->front_getNum($where); if (empty($rownum)) { $question_list = array(); } else { $quePage = $page == 0 ? 1 : $page; $totalPage = @ceil($rownum / $pagesize); $quePage > $totalPage && ($quePage = $totalPage); $startindex = ($quePage - 1) * $pagesize; $question_list = $_ENV['question']->front_get_list($where, $startindex, $pagesize, 2); $questr = ajax_page($rownum, $pagesize, $quePage, "index/ajaxdustbin", $imgType, $qtype); $str .= ''; $allQtypeList = $_ENV['qtype']->GetAllQType(1, '', 0, 1); $allQtypeLiList = ''; $str = ''; if (!empty($allQtypeList)) { foreach ($allQtypeList as $value) { $qtypeComplain = unserialize($value['complain']); if (intval($qtypeComplain['visiable']) == 1) { $allQtypeLiList .= "<li onclick=\"gotopage('?index/ajaxdustbin',1,{$imgType},{$value['id']})\">{$value['name']}</li>"; } if ($value['name'] == "申请理赔") { $allQtypeLiList .= "<li onclick=\"gotopage('?index/ajaxdustbin',1,{$imgType},{$value['id']})\">{$value['name']}</li>"; } } } } if (!empty($question_list)) { $str .= '<dl class="b_top"> <dd> <span class="title7 t_cen">问题描述</span> <span class="title6 titlenew2"> <span class="listselect_type">问题类型</span> <ul class="list_select">' . $allQtypeLiList . '</ul> </span> <span class="titlenew3 color_999">提问时间</span> <span class="title4 color_999">原因</span> <span class="titlenew6">浏览量</span> </dd> </dl>'; $str .= '<dl id="info' . $imgType . '">'; foreach ($question_list as $key => $QueList) { $qtype = $_ENV['qtype']->GetQType($QueList['qtype']); $category = !empty($qtype['name']) ? $qtype['name'] : '其他问题 '; if (mb_strlen($QueList['time'], 'UTF-8') > 9) { $classAskTime = 'titlenew3 line_h18'; } else { $classAskTime = 'titlenew3'; } $str .= '<dd>'; $category = ajax_page_single($category, $pagesize, $quePage, "index/ajaxdustbin", $imgType, $QueList['qtype']); $str .= '<span class="title7"><a href="?question/detail/' . $QueList['id'] . '/' . $imgType . '" target="_blank">' . cutstr('[垃圾箱] ' . $QueList['description'], 28, '..') . '</a></span>'; $str .= '<span class="title6">' . $category . '</span>'; $str .= '<span class="' . $classAskTime . '">' . $QueList['time'] . '</span>'; $str .= '<span class="title4">' . $QueList['comment'] . '</span>'; $str .= '<span class="titlenew6">' . $QueList['views'] . '</span>'; $str .= '</dd>'; } $str .= '</dl>'; $str .= '<div class="pagination">' . $questr . '</div>'; } else { $str .= '<div class="message_box"><s class="ico_warning_5"></s>啊噢,没有相关的问题噢,您可以尝试修改条件重新搜索。</div>'; } echo $str . '<script type="text/javascript">$("#info' . $imgType . ' dd:even").attr("className", "bg_gray");</script>'; }