예제 #1
0
    if ($prevtag_pre) {
        $prevtag .= " | ";
    }
    print "{$prevtag} <a onFocus='this.blur()' href='?mode=pbx&display=" . $dispnum . "&skip={$nextskip}'>[NEXT]</a>";
}
print "</div></center></li>";
?>
</div>

<div class="content">
<?php 
if ($action == 'delGRP') {
    echo '<br><h3>Group ' . ltrim($extdisplay, 'GRP-') . ' deleted!</h3><br>';
} else {
    if (!isset($grptime) || !isset($grppre) || !isset($grplist)) {
        if (!getgroupinfo(ltrim($extdisplay, 'GRP-'), $strategy, $grptime, $grppre, $grplist, $callerannounce, $alertinfo, $ringing, $description)) {
        }
    }
    if (!is_array($grplist)) {
        $grplist = explode("-", $grplist);
    }
    $delURL = $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'] . '&mode=pbx&action=delGRP';
    ?>
			<h3><?php 
    echo _("Ring Group");
    ?>
: <?php 
    echo ltrim($extdisplay, 'GRP-');
    ?>
</h3>
<?php 
 function searchTopic()
 {
     $keywords = t($_POST['keywords']);
     if (!$keywords) {
         $this->error('关键字太少');
     }
     $where = "is_del=0 AND title like '%{$keywords}%'";
     $topiclist = D('Topic')->order('top DESC,replytime DESC')->where($where)->findPage(3);
     foreach ($topiclist['data'] as $k => $v) {
         $topiclist['data'][$k]['tid'] = $topiclist['data'][$k]['id'];
         $topiclist['data'][$k]['title'] = red($topiclist['data'][$k]['title'], $keywords);
         $content = D('Post')->getField('content', 'tid=' . $v['id'] . " AND istopic=1");
         $topiclist['data'][$k]['content'] = msubstr(t($content), 0, 100);
         $topiclist['data'][$k]['group_name'] = getgroupinfo($topiclist['data'][$k]['gid'], 'name');
         $topiclist['data'][$k]['group_id'] = $topiclist['data'][$k]['gid'];
     }
     $this->assign('keywords', $keywords);
     $this->assign('topiclist', $topiclist);
     $this->display();
 }