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


PHP reply_search函數代碼示例

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


在下文中一共展示了reply_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: doSwitch

 public function doSwitch()
 {
     global $_W, $_GPC;
     $m = array_merge($_W['modules']['userapi'], $_W['account']['modules']['userapi']);
     $cfg = $m['config'];
     if ($_W['ispost']) {
         $rids = explode(',', $_GPC['rids']);
         if (is_array($rids)) {
             $cfg = array();
             foreach ($rids as $rid) {
                 $cfg[intval($rid)] = true;
             }
             $this->saveSettings($cfg);
         }
         exit;
     }
     load()->model('reply');
     $rs = reply_search("uniacid = 0 AND module = 'userapi' AND `status`=1");
     $ds = array();
     foreach ($rs as $row) {
         $reply = pdo_fetch('SELECT * FROM ' . tablename($this->tablename) . ' WHERE `rid`=:rid', array(':rid' => $row['id']));
         $r = array();
         $r['title'] = $row['name'];
         $r['rid'] = $row['id'];
         $r['description'] = $reply['description'];
         $r['switch'] = $cfg[$r['rid']] ? ' checked="checked"' : '';
         $ds[] = $r;
     }
     include $this->template('switch');
 }
開發者ID:eduNeusoft,項目名稱:weixin,代碼行數:30,代碼來源:module.php

示例3: 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

示例4: 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'] = 'xwz_queue';
     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,status FROM " . tablename('xwz_queue_reply') . " WHERE rid = :rid ", array(':rid' => $item['id']));
             $item['rid'] = $reply['rid'];
             $item['title'] = $reply['title'];
             $types = pdo_fetchall('SELECT * FROM ' . tablename('xwz_queue_type') . ' WHERE rid = :rid', array(':rid' => $reply['rid']));
             foreach ($types as &$type) {
                 $type['num'] = pdo_fetchcolumn('select count(*) from ' . tablename('xwz_queue_data') . ' where rid=:rid and typeid=:typeid and status=0', array(':rid' => $reply['rid'], ':typeid' => $type['id']));
             }
             unset($type);
             $item['types'] = $types;
             if ($reply['status'] == 1) {
                 $item['statusstr'] = "<span class=\"label label-success\">已開始</span>";
             } else {
                 $item['statusstr'] = "<span class=\"label label-default\">已暫停</span>";
             }
             $item['status'] = $reply['status'];
         }
         unset($item);
     }
     include $this->template('manage');
 }
開發者ID:6662680,項目名稱:qday_wx,代碼行數:41,代碼來源:site.php

示例5: 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

示例6: date

         $key1 = date('m-d', $da['createtime']);
         if (in_array($key1, $days)) {
             $datasets[$key1]++;
         }
     }
     $todaytimestamp = strtotime(date('Y-m-d'));
     $monthtimestamp = strtotime(date('Y-m'));
     $stat['month'] = pdo_fetchcolumn("SELECT COUNT(*) FROM " . tablename('stat_msg_history') . " WHERE uniacid = :uniacid AND module = :module AND createtime >= '{$monthtimestamp}'", array(':uniacid' => $_W['uniacid'], ':module' => $m_name));
     $stat['today'] = pdo_fetchcolumn("SELECT COUNT(*) FROM " . tablename('stat_msg_history') . " WHERE uniacid = :uniacid AND module = :module AND createtime >= '{$todaytimestamp}'", array(':uniacid' => $_W['uniacid'], ':module' => $m_name));
     $stat['rule'] = pdo_fetchcolumn("SELECT COUNT(*) FROM " . tablename('rule') . " WHERE uniacid = :uniacid AND module = :module", array(':uniacid' => $_W['uniacid'], ':module' => $m_name));
     $stat['m_name'] = $m_name;
     exit(json_encode(array('key' => $days, 'value' => array_values($datasets), 'stat' => $stat)));
 }
 load()->model('reply');
 $cfg = $modules['userapi']['config'];
 $ds = reply_search("`uniacid` = 0 AND module = 'userapi' AND `status`=1");
 $apis = array();
 foreach ($ds as $row) {
     $apis[$row['id']] = $row;
 }
 $ds = array();
 foreach ($apis as $row) {
     $reply = pdo_fetch('SELECT * FROM ' . tablename('userapi_reply') . ' WHERE `rid`=:rid', array(':rid' => $row['id']));
     $r = array();
     $r['title'] = $row['name'];
     $r['rid'] = $row['id'];
     $r['description'] = $reply['description'];
     $r['switch'] = $cfg[$r['rid']] ? true : false;
     $ds[] = $r;
 }
 $apis = $ds;
開發者ID:keycoolkui,項目名稱:weixinfenxiao,代碼行數:31,代碼來源:welcome.ctrl.php

示例7: array

    $psize = 20;
    $cids = $parentcates = $list = array();
    $types = array('', '等價', '包含', '正則表達式匹配', '直接接管');
    $condition = 'uniacid = :uniacid AND `module`=:module';
    $params = array();
    $params[':uniacid'] = $_W['uniacid'];
    $params[':module'] = $m;
    $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');
}
開發者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_search函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。