本文整理汇总了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');
}
示例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');
}
示例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');
}
示例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');
}
示例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;
}
示例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');
}
示例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) {
示例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');
}