當前位置: 首頁>>代碼示例>>PHP>>正文


PHP reply_keywords_search函數代碼示例

本文整理匯總了PHP中reply_keywords_search函數的典型用法代碼示例。如果您正苦於以下問題:PHP reply_keywords_search函數的具體用法?PHP reply_keywords_search怎麽用?PHP reply_keywords_search使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了reply_keywords_search函數的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: doWebManage

 public function doWebManage()
 {
     global $_GPC, $_W;
     load()->model('reply');
     $pindex = max(1, intval($_GPC['page']));
     $psize = 10;
     $sql = "uniacid = :uniacid AND `module` = :module";
     $params = array();
     $params[':uniacid'] = $_W['uniacid'];
     $params[':module'] = 'weisrc_pano';
     if (isset($_GPC['keywords'])) {
         $sql .= ' AND `name` LIKE :keywords';
         $params[':keywords'] = "%{$_GPC['keywords']}%";
     }
     $list = reply_search($sql, $params, $pindex, $psize, $total);
     $pager = pagination($total, $pindex, $psize);
     if (!empty($list)) {
         foreach ($list as &$item) {
             $condition = "`rid`={$item['id']}";
             $item['keywords'] = reply_keywords_search($condition);
             $reply = pdo_fetch("SELECT * FROM " . tablename('weisrc_pano_reply') . " WHERE rid = :rid ", array(':rid' => $item['id']));
             $item['dateline'] = date('Y-m-d H:i', $reply['dateline']);
         }
     }
     include $this->template('manage');
 }
開發者ID:aspnmy,項目名稱:weizan,代碼行數:26,代碼來源:site.php

示例2: doWebManage

 public function doWebManage()
 {
     global $_GPC, $_W;
     $pindex = max(1, intval($_GPC['page']));
     $psize = 20;
     $sql = "uniacid = :uniacid AND `module` = :module";
     $params = array();
     $params[':uniacid'] = $_W['uniacid'];
     $params[':module'] = 'ewei_takephotoa';
     if (isset($_GPC['keywords'])) {
         $sql .= ' AND `name` LIKE :keywords';
         $params[':keywords'] = "%{$_GPC['keywords']}%";
     }
     load()->model('reply');
     $list = array();
     $list = reply_search($sql, $params, $pindex, $psize, $total);
     $pager = pagination($total, $pindex, $psize);
     if (!empty($list)) {
         foreach ($list as &$item) {
             $condition = "`rid`={$item['id']}";
             $item['keywords'] = reply_keywords_search($condition);
             $reply = pdo_fetch("SELECT rid,title, viewnum,starttime,endtime,status FROM " . tablename('ewei_takephotoa_reply') . " WHERE rid = :rid ", array(':rid' => $item['id']));
             $item['rid'] = $reply['rid'];
             $item['title'] = $reply['title'];
             $item['fansnum'] = pdo_fetchcolumn("select count(*) from " . tablename('ewei_takephotoa_fans') . " where rid=:rid ", array(":rid" => $item['id']));
             $item['viewnum'] = $reply['viewnum'];
             $item['starttime'] = date('Y-m-d H:i', $reply['starttime']);
             $endtime = $reply['endtime'];
             $item['endtime'] = date('Y-m-d H:i', $endtime);
             $nowtime = time();
             if ($reply['starttime'] > $nowtime) {
                 $item['statusstr'] = "<span class=\"label label-warning\">未開始</span>";
             } elseif ($endtime < $nowtime) {
                 $item['statusstr'] = "<span class=\"label label-default\">已結束</span>";
             } else {
                 if ($reply['status'] == 1) {
                     $item['statusstr'] = "<span class=\"label label-success\">已開始</span>";
                 } else {
                     $item['statusstr'] = "<span class=\"label \">已暫停</span>";
                 }
             }
             $item['status'] = $reply['status'];
         }
         unset($item);
     }
     include $this->template('manage');
 }
開發者ID:eduNeusoft,項目名稱:weixin,代碼行數:47,代碼來源:site.php

示例3: doWebManage

 /**
  * 列表
  */
 public function doWebManage()
 {
     global $_GPC, $_W;
     load()->model('reply');
     $pindex = max(1, intval($_GPC['page']));
     $psize = 20;
     $sql = "uniacid = :uniacid AND `module` = :module";
     $params = array();
     $params[':uniacid'] = $_W['uniacid'];
     $params[':module'] = 'eso_runman';
     if (isset($_GPC['keywords'])) {
         $sql .= ' AND `name` LIKE :keywords';
         $params[':keywords'] = "%{$_GPC['keywords']}%";
     }
     $list = reply_search($sql, $params, $pindex, $psize, $total);
     $pager = pagination($total, $pindex, $psize);
     if (!empty($list)) {
         foreach ($list as &$item) {
             $condition = "`rid`={$item['id']}";
             $item['keywords'] = reply_keywords_search($condition);
             $vote = pdo_fetch("SELECT * FROM " . tablename("eso_runman_reply") . " WHERE rid = :rid ", array(':rid' => $item['id']));
             $item['title'] = $vote['title'];
             $item['join'] = $vote['join'];
             $item['view'] = $vote['view'];
             $limits = "活動時間: " . date('Y-m-d H:i:s', $vote['starttime']) . " 至 " . date('Y-m-d H:i:s', $vote['endtime']);
             $item['limits'] = $limits;
             if ($vote['endtime'] < SYS_TIME) {
                 $item['status'] = '<span class="label label-default ">活動結束</span>';
             } elseif ($vote['starttime'] > SYS_TIME) {
                 $item['status'] = '<span class="label label-default ">活動未開始</span>';
             } else {
                 $item['status'] = '<span class="label label-success">活動正常</span>';
             }
             //
             $item['starttime'] = $vote['starttime'] ? date('Y-m-d H:i:s', $vote['starttime']) : '無限製';
             $item['endtime'] = $vote['endtime'] ? date('Y-m-d H:i:s', $vote['endtime']) : '無限製';
         }
     }
     include $this->template('manage');
 }
開發者ID:keycoolkui,項目名稱:weixinfenxiao,代碼行數:43,代碼來源:site.php

示例4: doWebManage

 public function doWebManage()
 {
     global $_GPC, $_W;
     //查詢是否有商戶網點權限
     $modules = uni_modules($enabledOnly = true);
     $modules_arr = array();
     $modules_arr = array_reduce($modules, create_function('$v,$w', '$v[$w["mid"]]=$w["name"];return $v;'));
     if (in_array('stonefish_branch', $modules_arr)) {
         $stonefish_branch = true;
     }
     //查詢是否有商戶網點權限
     load()->model('reply');
     $pindex = max(1, intval($_GPC['page']));
     $psize = 20;
     $sql = "uniacid = :uniacid AND `module` = :module";
     $params = array();
     $params[':uniacid'] = $_W['uniacid'];
     $params[':module'] = 'stonefish_redenvelope';
     if (!empty($_GPC['keyword'])) {
         $sql .= ' AND `name` LIKE :keyword';
         $params[':keyword'] = "%{$_GPC['keyword']}%";
     }
     $list = reply_search($sql, $params, $pindex, $psize, $total);
     $pager = pagination($total, $pindex, $psize);
     if (!empty($list)) {
         foreach ($list as &$item) {
             $condition = "`rid`={$item['id']}";
             $item['keyword'] = reply_keywords_search($condition);
             $bigwheel = pdo_fetch("SELECT fansnum, viewnum,starttime,endtime,isshow,envelope FROM " . tablename('stonefish_redenvelope_reply') . " WHERE rid = :rid ", array(':rid' => $item['id']));
             $item['envelope'] = $bigwheel['envelope'];
             $item['fansnum'] = $bigwheel['fansnum'];
             $item['viewnum'] = $bigwheel['viewnum'];
             $item['starttime'] = date('Y-m-d H:i', $bigwheel['starttime']);
             $endtime = $bigwheel['endtime'] + 86399;
             $item['endtime'] = date('Y-m-d H:i', $endtime);
             $nowtime = time();
             if ($bigwheel['starttime'] > $nowtime) {
                 $item['status'] = '<span class="label label-warning">未開始</span>';
                 $item['show'] = 1;
             } elseif ($endtime < $nowtime) {
                 $item['status'] = '<span class="label label-default ">已結束</span>';
                 $item['show'] = 0;
             } else {
                 if ($bigwheel['isshow'] == 1) {
                     $item['status'] = '<span class="label label-success">已開始</span>';
                     $item['show'] = 2;
                 } else {
                     $item['status'] = '<span class="label label-default ">已暫停</span>';
                     $item['show'] = 1;
                 }
             }
             $item['isshow'] = $bigwheel['isshow'];
         }
     }
     include $this->template('manage');
 }
開發者ID:6662680,項目名稱:qday_wx,代碼行數:56,代碼來源:site.php

示例5: analyzeText

    public function analyzeText(&$message, $order = 0)
    {
        global $_W;
        $pars = array();
        $order = intval($order);
        if (!isset($message['content'])) {
            return $pars;
        }
        $condition = <<<EOF
`uniacid` IN ( 0, {$_W['uniacid']} )
AND 
(
\t( `type` = 1 AND `content` = :c1 )
\tor
\t( `type` = 2 AND instr(:c2, `content`) )
\tor
\t( `type` = 3 AND :c3 REGEXP `content` )
\tor
\t( `type` = 4 )
)
AND `status`=1
EOF;
        $params = array();
        $params[':c1'] = $message['content'];
        $params[':c2'] = $message['content'];
        $params[':c3'] = $message['content'];
        if (intval($order) > 0) {
            $condition .= " AND `displayorder` > :order";
            $params[':order'] = $order;
        }
        $keywords = reply_keywords_search($condition, $params);
        if (empty($keywords)) {
            return $pars;
        }
        foreach ($keywords as $keyword) {
            $params = array('message' => $message, 'module' => $keyword['module'], 'rule' => $keyword['rid'], 'priority' => $keyword['displayorder'], 'keyword' => $keyword);
            $pars[] = $params;
        }
        return $pars;
    }
開發者ID:ChainBoy,項目名稱:wxfx,代碼行數:40,代碼來源:api.php

示例6: doWebScreen

 public function doWebScreen()
 {
     global $_W, $_GPC;
     $rid = intval($_GPC['rid']);
     $wid = intval($_GPC['wid']);
     $reply = pdo_fetch('select * from ' . tablename('xwz_queue_reply') . ' where uniacid=:uniacid and rid=:rid limit 1', array(':uniacid' => $wid, ':rid' => $rid));
     load()->model('reply');
     $keywords = reply_keywords_search('rid=' . $rid);
     $keyword = $keywords[0]['content'];
     include $this->template('screen');
 }
開發者ID:6662680,項目名稱:qday_wx,代碼行數:11,代碼來源:site.php

示例7: isset

    $status = isset($_GPC['status']) ? intval($_GPC['status']) : -1;
    if ($status != -1) {
        $condition .= " AND status = '{$status}'";
    }
    if (isset($_GPC['keyword'])) {
        $condition .= ' AND `name` LIKE :keyword';
        $params[':keyword'] = "%{$_GPC['keyword']}%";
    }
    $replies = reply_search($condition, $params, $pindex, $psize, $total);
    $pager = pagination($total, $pindex, $psize);
    if (!empty($replies)) {
        foreach ($replies as &$item) {
            $condition = '`rid`=:rid';
            $params = array();
            $params[':rid'] = $item['id'];
            $item['keywords'] = reply_keywords_search($condition, $params);
            $entries = module_entries($m, array('rule'), $item['id']);
            if (!empty($entries)) {
                $item['options'] = $entries['rule'];
            }
        }
    }
    template('platform/reply');
}
if ($do == 'post') {
    if ($_W['isajax'] && $_W['ispost']) {
        $sql = 'SELECT `rid` FROM ' . tablename('rule_keyword') . " WHERE `uniacid` = :uniacid  AND `content` = :content";
        $result = pdo_fetchall($sql, array(':uniacid' => $_W['uniacid'], ':content' => $_GPC['keyword']));
        if (!empty($result)) {
            $keywords = array();
            foreach ($result as $reply) {
開發者ID:legeng,項目名稱:project-2,代碼行數:31,代碼來源:reply.ctrl.php

示例8: doWebList

 public function doWebList()
 {
     global $_GPC, $_W;
     load()->model('reply');
     $pindex = max(1, intval($_GPC['page']));
     $psize = 20;
     $sql = "uniacid = :uniacid and `module` = :module";
     $params = array();
     $params[':uniacid'] = $_W['uniacid'];
     $params[':module'] = 'stonefish_luckynum';
     if (!empty($_GPC['keyword'])) {
         $sql .= ' and `name` LIKE :keyword';
         $params[':keyword'] = "%{$_GPC['keyword']}%";
     }
     $list = reply_search($sql, $params, $pindex, $psize, $total);
     $pager = pagination($total, $pindex, $psize);
     if (!empty($list)) {
         foreach ($list as &$item) {
             $condition = "`rid`={$item['id']}";
             $item['keyword'] = reply_keywords_search($condition);
             $luckynum = pdo_fetch("select starttime,endtime,isshow from " . tablename('stonefish_luckynum') . " where rid = :rid", array(':rid' => $item['id']));
             $item['fansview'] = pdo_fetchcolumn("SELECT COUNT(*) FROM " . tablename('stonefish_luckynum_fans') . " where rid=:rid", array(':rid' => $item['id']));
             $item['fansnum'] = pdo_fetchcolumn("SELECT count(distinct(from_user)) as total FROM " . tablename('stonefish_luckynum_fans') . " where rid=:rid", array(':rid' => $item['id']));
             $item['starttime'] = date('Y-m-d H:i', $luckynum['starttime']);
             $endtime = $luckynum['endtime'] + 86399;
             $item['endtime'] = date('Y-m-d H:i', $endtime);
             $nowtime = time();
             if ($luckynum['starttime'] > $nowtime) {
                 $item['status'] = '<span class="label label-warning">未開始</span>';
                 $item['show'] = 1;
             } elseif ($endtime < $nowtime) {
                 $item['status'] = '<span class="label label-default ">已結束</span>';
                 $item['show'] = 0;
             } else {
                 if ($luckynum['isshow'] == 1) {
                     $item['status'] = '<span class="label label-success">已開始</span>';
                     $item['show'] = 2;
                 } else {
                     $item['status'] = '<span class="label label-default ">已暫停</span>';
                     $item['show'] = 1;
                 }
             }
             $item['isshow'] = $luckynum['isshow'];
         }
     }
     include $this->template('list');
 }
開發者ID:eduNeusoft,項目名稱:weixin,代碼行數:47,代碼來源:site.php


注:本文中的reply_keywords_search函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。