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