示例#1
0
$p = (int) get_http_var('p');
$d = get_http_var('d');
if (!preg_match('#^\\d\\d\\d\\d-\\d\\d-\\d\\d$#', $d)) {
    $d = '';
}
$link = '<p align="center"><a href="./"><strong>List all MPs and Register editions</strong></a></p>';
if ($f) {
    register_history($f);
} elseif ($p) {
    person_history($p);
} elseif ($d) {
    show_register($d);
} else {
    $this_page = 'regmem';
    $PAGE->stripe_start();
    front_page();
}
$PAGE->stripe_end();
$PAGE->page_end();
function person_history($p)
{
    global $files, $dir, $DATA, $PAGE, $this_page, $link, $cats;
    $this_page = 'regmem_mp';
    $name = '';
    $nil = array();
    $earliest = $files[0];
    foreach ($files as $_) {
        $file = file_get_contents($_);
        $data[$_] = array();
        if (preg_match('#<regmem personid="uk.org.publicwhip/person/' . $p . '" memberid="(.*?)" membername="(.*?)" date="(.*?)">(.*?)</regmem>#s', $file, $m)) {
            $earliest = $_;
示例#2
0
文件: header.php 项目: besimhu/legacy
?>


		
							
					

				<div id="rssfeeds">
        <a href="<?php 
bloginfo_rss('rss2_url');
?>
"></a>      </div></div><!-- end #menug -->

				<div id="contentg">
				

				<?php 
if (function_exists('bcn_display') && !front_page()) {
    /* Generate the Breadcrumbs NavXT if is installed */
    ?>
<div id="breadcrumb"><?php 
    bcn_display();
    ?>
</div>
				<?php 
}
?>

			

			
 function myServiceLog($author, $question_type, $ask_time, $ask_status, $Page, $pagesize)
 {
     $z_cid = $this->getType(1);
     $j_cid = $this->getType(2);
     $t_cid = $this->getType(3);
     $l_cid = $this->getType(4);
     // 获取专属客服条件
     if ($author == '游客') {
         $selfAuthor_where = '';
     } else {
         $operatorInfo = $_ENV['operator']->getMySelfAuthor($author);
         if ($question_type == "selfAuthor") {
             $selfAuthor_where = $this->front_selfAuthor_where($operatorInfo['login_name'], $ask_time, $ask_status, $t_cid, $author);
         } else {
             $selfAuthor_where = $this->front_selfAuthor_where($operatorInfo['login_name'], 0, -1, $t_cid, $author);
         }
     }
     if ($question_type == "complain") {
         $t_where = $_ENV['complain']->front_myComWhere($author, $ask_time, $ask_status, '0,2');
     } else {
         $t_where = $_ENV['complain']->front_myComWhere($author, 0, -1, '0,2');
     }
     if ($question_type == "ask") {
         $z_where = $this->front_myQueWhere($author, 'zx', $ask_time, $ask_status, $z_cid);
     } else {
         $z_where = $this->front_myQueWhere($author, 'zx', '', -1, $z_cid);
     }
     if ($question_type == "suggest") {
         $j_where = $this->front_myQueWhere($author, 'jy', $ask_time, $ask_status, $j_cid);
     } else {
         $j_where = $this->front_myQueWhere($author, 'jy', '', -1, $j_cid);
     }
     $l_where = $this->front_myDustbinWhere($author, $ask_time, $l_cid);
     $ServiceLog['logCount']['ask'] = $z_where ? $this->front_myQueNum($z_where) : '0';
     $ServiceLog['logCount']['suggest'] = $j_where ? $this->front_myQueNum($j_where) : '0';
     $ServiceLog['logCount']['complain'] = $t_where ? $_ENV['complain']->front_myComNum($t_where) : '0';
     $ServiceLog['logCount']['dustbin'] = $l_where ? $this->front_myDustbinNum($l_where) : '0';
     $ServiceLog['logCount']['selfAuthor'] = $selfAuthor_where ? $this->front_myQueNum($selfAuthor_where) : '0';
     switch ($question_type) {
         case "ask":
             if ($z_where) {
                 $totalPage = @ceil($ServiceLog['logCount']['ask'] / $pagesize);
                 $totalPage = $Page > $totalPage ? $totalPage : $Page;
                 $startindex = ($Page - 1) * $pagesize;
                 $ServiceLog['question_list'] = $this->front_myQueList($z_where, $startindex, $pagesize);
                 $ServiceLog['questr'] = front_page($ServiceLog['logCount']['ask'], $pagesize, $Page, "question/my_ask/{$ask_time}/{$ask_status}");
             }
             break;
         case "suggest":
             if ($j_where) {
                 $totalPage = @ceil($ServiceLog['logCount']['suggest'] / $pagesize);
                 $totalPage = $Page > $totalPage ? $totalPage : $Page;
                 $startindex = ($Page - 1) * $pagesize;
                 $ServiceLog['question_list'] = $this->front_myQueList($j_where, $startindex, $pagesize);
                 $ServiceLog['questr'] = front_page($ServiceLog['logCount']['suggest'], $pagesize, $Page, "question/my_suggest/{$ask_time}/{$ask_status}");
             }
             break;
         case "complain":
             if ($t_where) {
                 $totalPage = @ceil($ServiceLog['logCount']['complain'] / $pagesize);
                 $totalPage = $Page > $totalPage ? $totalPage : $Page;
                 $startindex = ($Page - 1) * $pagesize;
                 $ServiceLog['question_list'] = $_ENV['complain']->front_myComList($t_where, $startindex, $pagesize);
                 $ServiceLog['questr'] = front_page($ServiceLog['logCount']['complain'], $pagesize, $Page, "question/my_complain/{$ask_time}/{$ask_status}");
             }
             break;
         case "dustbin":
             if ($l_where) {
                 $totalPage = @ceil($ServiceLog['logCount']['dustbin'] / $pagesize);
                 $totalPage = $Page > $totalPage ? $totalPage : $Page;
                 $startindex = ($Page - 1) * $pagesize;
                 $ServiceLog['question_list'] = $this->front_myQueList($l_where, $startindex, $pagesize);
                 $ServiceLog['questr'] = front_page($ServiceLog['logCount']['dustbin'], $pagesize, $Page, "question/my_dustbin/{$ask_time}");
             }
             break;
         case "selfAuthor":
             if ($selfAuthor_where) {
                 $totalPage = @ceil($ServiceLog['logCount']['selfAuthor'] / $pagesize);
                 $totalPage = $Page > $totalPage ? $totalPage : $Page;
                 $startindex = ($Page - 1) * $pagesize;
                 $ServiceLog['question_list'] = $this->front_myQueList($selfAuthor_where, $startindex, $pagesize);
                 $ServiceLog['questr'] = front_page($ServiceLog['logCount']['selfAuthor'], $pagesize, $Page, "question/my_selfAuthor/{$ask_time}");
             }
             break;
     }
     return $ServiceLog;
 }
示例#4
0
 /**
  * 我的专属客服历史回复记录
  */
 function onselfHistoryQuestion()
 {
     $title = "专属客服历史回复记录";
     $all_num = $_ENV['question']->total_question();
     $ask_status = isset($this->post['ask_status']) ? intval($this->post['ask_status']) : (isset($this->get[3]) ? intval($this->get[3]) : -2);
     $js_kf = isset($this->post['js_kf']) && !empty($this->post['js_kf']) ? trim($this->post['js_kf']) : (isset($this->get[2]) ? trim($this->get[2]) : '');
     $t_cid = $_ENV['question']->getType(3);
     $selfAuthor_where = $_ENV['question']->front_selfAuthor_where(urldecode(trim($js_kf)), '', $ask_status, $t_cid);
     $selfAuthorNum = 0;
     $operatorInfo = $_ENV['operator']->getUser(urldecode(trim($js_kf)));
     if ($selfAuthor_where) {
         $selfAuthorNum = $_ENV['question']->front_mySelfAuthorNum($selfAuthor_where);
         if (empty($selfAuthorNum)) {
             $question_list = array();
         } else {
             $pagesize = $this->setting['list_default'];
             @($quePage = max(1, intval($this->get[4])));
             $totalPage = @ceil($selfAuthorNum / $pagesize);
             $quePage > $totalPage && ($quePage = $totalPage);
             $startindex = ($quePage - 1) * $pagesize;
             $question_list = $_ENV['question']->front_mySelfAuthorList($selfAuthor_where, $startindex, $pagesize);
             foreach ($question_list as $k => $v) {
                 if ($question_list[$k]['pid'] > 0) {
                     $parentInfo = $_ENV['question']->Get($question_list[$k]['pid']);
                     $qtype = $_ENV['qtype']->GetQType($parentInfo['qtype']);
                     $categoryInfo = $_ENV['category']->get($parentInfo['cid'], 'name');
                     $question_list[$k]['type'] = $categoryInfo['name'];
                 } else {
                     $qtype = $_ENV['qtype']->GetQType($v['qtype']);
                     $categoryInfo = $_ENV['category']->get($v['cid'], 'name');
                     $question_list[$k]['type'] = $categoryInfo['name'];
                 }
                 if (!empty($qtype)) {
                     $question_list[$k]['category'] = $qtype['name'];
                 } else {
                     $otherQtypeId = $this->db->fetch_first("SELECT id FROM " . DB_TABLEPRE . "qtype WHERE name='其他问题'");
                     $question_list[$k]['qtype'] = $otherQtypeId['id'];
                     // 其他交易
                     $question_list[$k]['category'] = '其他问题 ';
                 }
                 $question_list[$k]['Atime'] = !empty($v['Atime']) ? date('Y-m-d', $v['Atime']) : '-';
                 $question_list[$k]['views'] = intval($v['views']);
                 $question_list[$k]['QuestionUrl'] = $_ENV['question']->getQuestionLink($question_list[$k]['id'], "question");
             }
             $questr = front_page($selfAuthorNum, $pagesize, $quePage, "question/selfHistoryQuestion/{$js_kf}/{$ask_status}");
         }
     }
     include template('selfHistoryQuestion');
 }