本文整理汇总了PHP中strexists函数的典型用法代码示例。如果您正苦于以下问题:PHP strexists函数的具体用法?PHP strexists怎么用?PHP strexists使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了strexists函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: getAttachment
public function getAttachment()
{
global $_G;
try {
$taskData = $this->checkTask();
} catch (Exception $e) {
throw new Cloud_Exception($e);
}
$task = $taskData['task'];
$attach = $taskData['attach'];
$taskId = $task['taskid'];
C::t('#qqconnect#connect_disktask')->update($taskId, array('status' => 1, 'downloadtime' => $_G['timestamp']));
$db = DB::object();
$db->close();
ob_end_clean();
$attach['filename'] = '"' . (strtolower(CHARSET) == 'utf-8' && strexists($_SERVER['HTTP_USER_AGENT'], 'MSIE') ? urlencode($attach['filename']) : $attach['filename']) . '"';
dheader('Content-Type: application/octet-stream');
dheader('Content-Length: ' . $attach['filesize']);
dheader('Content-Disposition: attachment; filename=' . $attach['filename']);
self::_checkXSendFile($attach['attachment']);
if ($attach['remote']) {
self::_getRemoteFile($attach['attachment']);
} else {
self::_getLocalFile($attach['attachment']);
}
exit;
}
开发者ID:Jaedeok-seol,项目名称:discuz_template,代码行数:27,代码来源:Disk.php
示例2: respond
public function respond()
{
global $_W;
load()->func('compat.biz');
$rid = $this->rule;
$sql = "SELECT * FROM " . tablename('bm_top_reply') . " WHERE `rid`=:rid LIMIT 1";
$row = pdo_fetch($sql, array(':rid' => $rid));
if (empty($row['id'])) {
return $this->respText("系统升级中,请稍候!");
}
$desc = $row['desc'];
//描述
$n = $row['n'];
//粉丝基数
$fromuser = $this->message['from'];
$num = mc_fansinfo($fromuser);
$numx = $n + $num['fanid'];
$name = $_W['account']['name'];
//公众号名称
$str = str_replace('{name}', $name, $desc);
$str = str_replace('{numx}', $numx, $str);
if ($row['pictype'] == 1) {
//$str = "嗨,欢迎关注【".$name."】,您是第".$numx."位关注人!\n".$desc."\n <a href='".$url."'>".$urltext."</a>";
return $this->respText($str);
} else {
$response['FromUserName'] = $this->message['to'];
$response['ToUserName'] = $this->message['from'];
$response['MsgType'] = 'news';
$response['ArticleCount'] = 1;
$response['Articles'] = array();
$response['Articles'][] = array('Title' => $row['title'], 'Description' => $str, 'PicUrl' => !strexists($row['picurl'], 'http://') ? $_W['attachurl'] . $row['picurl'] : $row['picurl'], 'Url' => $row['urlx'], 'TagName' => 'item');
return $response;
}
}
开发者ID:ChainBoy,项目名称:wxfx,代码行数:34,代码来源:processor.php
示例3: tpl_form_field_clock
function tpl_form_field_clock($name, $value = '')
{
$s = '';
if (!defined('TPL_INIT_CLOCK_TIME')) {
$s .= '
<script type="text/javascript">
require(["clockpicker"], function($){
$(function(){
$(".clockpicker").clockpicker({
autoclose: true
});
});
});
</script>
';
define('TPL_INIT_CLOCK_TIME', 1);
}
$time = date('H:i');
if (!empty($value)) {
if (!strexists($value, ':')) {
$time = date('H:i', $value);
} else {
$time = $value;
}
}
$s .= ' <div class="input-group clockpicker">
<span class="input-group-addon"><i class="fa fa-clock-o"></i></span>
<input type="text" name="' . $name . '" value="' . $time . '" class="form-control">
</div>';
return $s;
}
开发者ID:aspnmy,项目名称:weizan,代码行数:31,代码来源:tpl.func.php
示例4: respond
public function respond()
{
global $_W;
load()->func('compat.biz');
$rid = $this->rule;
$sql = "SELECT * FROM " . tablename('bm_qrsign_reply') . " WHERE `rid`=:rid LIMIT 1";
$reply = pdo_fetch($sql, array(':rid' => $rid));
if (empty($reply['id'])) {
return $this->respText("系统升级中,请稍候!");
}
if (time() > strtotime($reply['endtime'])) {
if (empty($reply['memo2'])) {
$msg = '对不起,活动已经于' . $reply['endtime'] . '结束,感谢您的参与!!!';
} else {
$msg = $reply['memo2'];
}
return $this->respText($msg);
}
if (time() < strtotime($reply['starttime'])) {
if (empty($reply['memo1'])) {
$msg = '对不起,活动将于' . $reply['starttime'] . '开始,敬请期待!!!';
} else {
$msg = $reply['memo1'];
}
return $this->respText($msg);
}
$url = $_W['siteroot'] . 'app/' . $this->createMobileUrl('show', array('rid' => $rid, 'from_user' => $this->message['from']));
$response['FromUserName'] = $this->message['to'];
$response['ToUserName'] = $this->message['from'];
$response['MsgType'] = 'news';
$response['ArticleCount'] = 1;
$response['Articles'] = array();
$response['Articles'][] = array('Title' => $reply['title'], 'Description' => $reply['desc'], 'PicUrl' => !strexists($reply['picurl'], 'http://') ? $_W['attachurl'] . $reply['picurl'] : $reply['picurl'], 'Url' => $url, 'TagName' => 'item');
return $response;
}
开发者ID:aspnmy,项目名称:weizan,代码行数:35,代码来源:processor.php
示例5: del
/**
* 删除指定ID信息
*
* @param unknown_type $id
* @return unknown
*/
function del($id, $uname = "", $other = "")
{
if (is_numeric($id)) {
$wherestr[] = $this->idname . " = " . $id;
} elseif (is_array($id)) {
$ids = getdotstring($id, 'int');
$wherestr[] = $this->idname . " in ({$ids})";
} elseif (is_string($id) && (strexists($id, ',') || strexists($id, '|'))) {
if (strexists($id, ',')) {
$ids = getdotstring($id, 'int');
} else {
$ids = getdotstring(explode('|', $ids), 'int');
}
$wherestr[] = $this->idname . " in ({$ids})";
} else {
return lang('ID_format_error');
}
if ($uname != "") {
$wherestr[] = "uname = '" . $uname . "'";
}
if ($other != "") {
$wherestr[] = $other;
}
$wheresql = implode(' AND ', $wherestr);
//条件汇总
$this->db->query("delete from {$this->table} where " . $wheresql);
return "OK";
}
开发者ID:dalinhuang,项目名称:c2my,代码行数:34,代码来源:table.class.php
示例6: fans_search
function fans_search($user, $fields = array())
{
global $_W;
$struct = cache_load('fansfields');
if (empty($fields)) {
$select = '*';
} else {
foreach ($fields as $field) {
if (!in_array($field, $struct)) {
unset($fields[$field]);
}
}
$select = '`from_user`, `' . implode('`,`', $fields) . '`';
}
$result = pdo_fetchall("SELECT {$select} FROM " . tablename('fans') . " WHERE from_user IN ('" . implode("','", is_array($user) ? $user : array($user)) . "')", array(), 'from_user');
if (!empty($result)) {
foreach ($result as &$row) {
if (!empty($row['avatar'])) {
if (strexists($row['avatar'], 'avatar_')) {
$row['avatar'] = $_W['siteroot'] . 'resource/image/avatar/' . $row['avatar'];
} elseif (strexists($row['avatar'], 'http')) {
} else {
$row['avatar'] = $_W['attachurl'] . $row['avatar'];
}
}
}
if (is_array($user)) {
return $result;
} else {
return $result[$user];
}
} else {
return array();
}
}
开发者ID:keycoolkui,项目名称:weixinfenxiao,代码行数:35,代码来源:fans.mod.php
示例7: LocationLogoupload
public function LocationLogoupload($logo)
{
global $_W;
if (!strexists($logo, 'http://') && !strexists($logo, 'https://')) {
$path = rtrim(IA_ROOT . '/' . $_W['config']['upload']['attachdir'], '/') . '/';
if (empty($logo) || !file_exists($path . $logo)) {
return error(-1, '商户LOGO不存在');
}
} else {
return error(-1, '商户LOGO只能上传本地图片');
}
$token = $this->fetch_token();
if (is_error($token)) {
return $token;
}
$url = "https://api.weixin.qq.com/cgi-bin/media/uploadimg?access_token={$token}";
$data = array('buffer' => '@' . $path . $logo);
load()->func('communication');
$response = ihttp_request($url, $data);
if (is_error($response)) {
return error(-1, "访问公众平台接口失败, 错误: {$response['message']}");
}
$result = @json_decode($response['content'], true);
if (empty($result)) {
return error(-1, "接口调用失败, 元数据: {$response['meta']}");
} elseif (!empty($result['errcode'])) {
return error(-1, "访问微信接口错误, 错误代码: {$result['errcode']}, 错误信息: {$result['errmsg']},信息详情:{$this->error_code($result['errcode'])}");
}
return $result;
}
开发者ID:7demo,项目名称:we7,代码行数:30,代码来源:coupon.class.php
示例8: checkmagicperm
function checkmagicperm($perms, $id)
{
$id = $id ? intval($id) : '';
if (!strexists("\t" . trim($perms) . "\t", "\t" . trim($id) . "\t") && $perms) {
showmessage('magics_target_nopermission');
}
}
开发者ID:BGCX067,项目名称:f2cont-svn-to-git,代码行数:7,代码来源:magic.func.php
示例9: runlog
function runlog($log, $file = 'wechat', $halt = 0)
{
global $_SGLOBAL, $_SERVER;
$nowurl = $_SERVER['REQUEST_URI'] ? $_SERVER['REQUEST_URI'] : ($_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME']);
$log = gmdate('Y-m-d H:i:s', $_SGLOBAL['timestamp']) . "\t{$type}\t" . "\t{$nowurl}\t" . str_replace(array("\r", "\n"), array(' ', ' '), trim($log)) . "\n";
$yearmonth = gmdate('Ym', $_SGLOBAL['timestamp']);
$logdir = './data/log/';
if (!is_dir($logdir)) {
mkdir($logdir, 0777);
}
$logfile = $logdir . $yearmonth . '_' . $file . '.php';
if (@filesize($logfile) > 2048000) {
$dir = opendir($logdir);
$length = strlen($file);
$maxid = $id = 0;
while ($entry = readdir($dir)) {
if (strexists($entry, $yearmonth . '_' . $file)) {
$id = intval(substr($entry, $length + 8, -4));
$id > $maxid && ($maxid = $id);
}
}
closedir($dir);
$logfilebak = $logdir . $yearmonth . '_' . $file . '_' . ($maxid + 1) . '.php';
@rename($logfile, $logfilebak);
}
if ($fp = @fopen($logfile, 'a')) {
@flock($fp, 2);
fwrite($fp, "<?PHP exit;?>\t" . str_replace(array('<?', '?>', "\r", "\n"), '', $log) . "\n");
fclose($fp);
}
if ($halt) {
exit;
}
}
开发者ID:NaturalWill,项目名称:dawnwx,代码行数:34,代码来源:function_common.php
示例10: fieldsFormDisplay
public function fieldsFormDisplay($rid = 0)
{
global $_W;
if (!empty($rid)) {
$row = pdo_fetch("SELECT * FROM " . tablename($this->tablename) . " WHERE rid = :rid ORDER BY `id` DESC", array(':rid' => $rid));
if (!strexists($row['apiurl'], 'http://') && !strexists($row['apiurl'], 'https://')) {
$row['apilocal'] = $row['apiurl'];
$row['apiurl'] = '';
}
} else {
$row = array('cachetime' => 0);
}
$path = IA_ROOT . '/source/modules/userapi/api';
if (is_dir($path)) {
$apis = array();
if ($handle = opendir($path)) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
$apis[] = $file;
}
}
}
}
include $this->template('form');
}
开发者ID:yunsite,项目名称:my-we7,代码行数:25,代码来源:module.php
示例11: helplist
function helplist($num, $id = '', $aids = "", $orderby = "aid asc")
{
if (is_numeric($id)) {
$wherestr[] = "typeid = " . $id;
} elseif (is_array($id)) {
$ids = getdotstring($id, 'int');
$wherestr[] = "typeid in ({$ids})";
} elseif (is_string($id) && (strexists($id, ',') || strexists($id, '|'))) {
if (strexists($id, ',')) {
$ids = getdotstring($id, 'int');
} else {
$ids = getdotstring(explode('|', $ids), 'int');
}
$wherestr[] = "typeid in ({$ids})";
} else {
$wherestr[] = "";
}
if (!empty($aids)) {
$aids = getdotstring($aids, 'int');
$wherestr[] = "aid in ({$ids})";
}
$num = GetNum($num);
$wheresql = implode(' AND ', $wherestr);
//条件汇总
$articleobj = new TableClass('article', 'aid');
$articlearray = $articleobj->getdata($num, $wheresql, $orderby, 'aid,typeid,title');
return $articlearray;
}
开发者ID:dalinhuang,项目名称:c2my,代码行数:28,代码来源:m.php
示例12: respond
public function respond()
{
global $_W;
$content = $this->message['content'];
$reply = pdo_fetch('SELECT * FROM ' . tablename('cover_reply') . ' WHERE `rid`=:rid', array(':rid' => $this->rule));
if (!empty($reply)) {
load()->model('module');
$module = module_fetch($reply['module']);
if (empty($module) && !in_array($reply['module'], array('site', 'mc', 'card'))) {
return '';
}
$url = $reply['url'];
if (empty($reply['url'])) {
$entry = pdo_fetch("SELECT eid FROM " . tablename('modules_bindings') . " WHERE module = :module AND do = :do", array(':module' => $reply['module'], ':do' => $reply['do']));
$url = url('entry', array('eid' => $entry['eid']));
}
if (!strexists($url, '&j=') && !empty($_W['acid'])) {
$url = str_replace("?i={$_W['uniacid']}&", "?i={$_W['uniacid']}&j={$_W['acid']}&", $url);
}
$news = array();
$news[] = array('title' => $reply['title'], 'description' => $reply['description'], 'picurl' => $reply['thumb'], 'url' => $url);
return $this->respNews($news);
}
return '';
}
开发者ID:6662680,项目名称:qday_wx,代码行数:25,代码来源:processor.php
示例13: doMobileDetail
public function doMobileDetail()
{
global $_W, $_GPC;
checkauth();
$rid = intval($_GPC['rid']);
$reply = pdo_fetch("SELECT * FROM " . tablename('shake_reply') . " WHERE rid = :rid", array(':rid' => $rid));
if (empty($reply)) {
message('抱歉,此活动不存在或是还未开始!', 'refresh', 'error');
}
$member = pdo_fetch("SELECT * FROM " . tablename('shake_member') . " WHERE rid = :rid AND openid = :openid", array(':rid' => $reply['rid'], ':openid' => $_W['member']['uid']));
if (empty($member)) {
$member = array('rid' => $rid, 'openid' => $_W['member']['uid'], 'createtime' => TIMESTAMP, 'shakecount' => 0, 'status' => 0);
$maxjoin = pdo_fetchcolumn("SELECT COUNT(*) FROM " . tablename('shake_member') . " WHERE rid = '{$reply['rid']}' AND status = '1'");
if ($maxjoin < $reply['maxjoin']) {
mt_srand((double) microtime() * 1000000);
$rand = mt_rand(1, 100);
if ($rand <= $reply['joinprobability']) {
$member['status'] = 1;
}
}
pdo_insert('shake_member', $member);
}
if (strexists(strtolower($_SERVER['HTTP_USER_AGENT']), 'android')) {
$reply['speed'] = $reply['speedandroid'];
}
include $this->template('detail');
}
开发者ID:eduNeusoft,项目名称:weixin,代码行数:27,代码来源:site.php
示例14: message
function message($msg, $redirect = '', $type = '')
{
global $_W;
if ($redirect == 'refresh') {
$redirect = $_W['script_name'] . '?' . $_SERVER['QUERY_STRING'];
} elseif (!empty($redirect) && !strexists($redirect, 'http://')) {
$urls = parse_url($redirect);
$redirect = $_W['siteroot'] . 'app/index.php?' . $urls['query'];
}
if ($redirect == '') {
$type = in_array($type, array('success', 'error', 'info', 'warning', 'ajax', 'sql')) ? $type : 'info';
} else {
$type = in_array($type, array('success', 'error', 'info', 'warning', 'ajax', 'sql')) ? $type : 'success';
}
if ($_W['isajax'] || $type == 'ajax') {
$vars = array();
$vars['message'] = $msg;
$vars['redirect'] = $redirect;
$vars['type'] = $type;
exit(json_encode($vars));
}
if (empty($msg) && !empty($redirect)) {
header('location: ' . $redirect);
}
$label = $type;
if ($type == 'error') {
$label = 'danger';
}
if ($type == 'ajax' || $type == 'sql') {
$label = 'warning';
}
include template('common/message', TEMPLATE_INCLUDEPATH);
exit;
}
开发者ID:keycoolkui,项目名称:weixinfenxiao,代码行数:34,代码来源:common.func.php
示例15: tpl_form_field_clock
function tpl_form_field_clock($name, $value = '')
{
$s = '';
if (!defined('TPL_INIT_CLOCK_TIME')) {
app()->view->registerJs(<<<EOF
require(['clockpicker'], function(\$) {
\$(".clockpicker").clockpicker({
autoclose: true
});
});
EOF
);
define('TPL_INIT_CLOCK_TIME', 1);
}
$time = date('H:i');
if (!empty($value)) {
if (!strexists($value, ':')) {
$time = date('H:i', $value);
} else {
$time = $value;
}
}
$s .= ' <div class="input-group clockpicker">
<span class="input-group-addon"><i class="fa fa-clock-o"></i></span>
<input type="text" name="' . $name . '" value="' . $time . '" class="form-control">
</div>';
return $s;
}
开发者ID:weikit,项目名称:wechat-addon,代码行数:28,代码来源:tpl.func.php
示例16: respond
public function respond()
{
global $_W;
$rid = $this->rule;
$sql = "SELECT * FROM " . tablename('weisrc_pano_reply') . " WHERE `rid`=:rid LIMIT 1";
$row = pdo_fetch($sql, array(':rid' => $rid));
$url = $this->createMobileUrl('view', array('rid' => $row['rid']));
return $this->respNews(array('Title' => $row['title'], 'Description' => $row['description'], 'PicUrl' => !strexists($row['picture'], 'http://') ? $_W['attachurl'] . $row['picture'] : $row['picture'], 'Url' => $url));
}
开发者ID:eduNeusoft,项目名称:weixin,代码行数:9,代码来源:processor.php
示例17: pagebar
public function pagebar($pageinfo)
{
$totals = $pageinfo['totals'];
$perpage = $pageinfo['length'];
$curpage = $pageinfo['curpage'];
$mpurl = url($pageinfo['udi']);
if (isset($pageinfo['param'])) {
$mpurl .= $pageinfo['param'];
}
$maxpages = isset($pageinfo['maxpages']) ? $pageinfo['maxpages'] : false;
//最大页数限制
$page = isset($pageinfo['showpage']) ? $pageinfo['showpage'] : false;
//一次显示多少页码
$shownum = isset($pageinfo['shownum']) ? $pageinfo['shownum'] : false;
$showkbd = isset($pageinfo['showkbd']) ? $pageinfo['showkbd'] : false;
$simple = isset($pageinfo['simple']) ? $pageinfo['simple'] : false;
$autogoto = true;
$ajaxtarget = '';
// getgpc('g.ajaxtarget') ? " ajaxtarget=\"" . getgpc('g.ajaxtarget', '', 'input_char') . "\" " : '';
$aname = '';
if (strexists($mpurl, '#')) {
$astrs = explode('#', $mpurl);
$mpurl = $astrs[0];
$aname = '#' . $astrs[1];
}
$lang['prev'] = '上一页';
$lang['next'] = '下一页';
$mpurl .= strexists($mpurl, '?') ? '&' : '?';
$offset = floor($page * 0.5);
$realpages = ceil($totals / $perpage);
$pages = $maxpages && $maxpages < $realpages ? $maxpages : $realpages;
if ($page > $pages) {
$from = 1;
$to = $pages;
} else {
$from = $curpage - $offset;
$to = $from + $page - 1;
if ($from < 1) {
$to = $curpage + 1 - $from;
$from = 1;
if ($to - $from < $page) {
$to = $page;
}
} elseif ($to > $pages) {
$from = $pages - $page + 1;
$to = $pages;
}
}
$multipage = ($curpage - $offset > 1 && $pages > $page ? '<a href="' . $mpurl . 'page=1' . $aname . '" class="first"' . $ajaxtarget . '>1 ...</a>' : '') . ($curpage > 1 && !$simple ? '<a href="' . $mpurl . 'page=' . ($curpage - 1) . $aname . '" class="prev"' . $ajaxtarget . '>' . $lang['prev'] . '</a>' : '');
for ($i = $from; $i <= $to; $i++) {
$multipage .= $i == $curpage ? '<strong>' . $i . '</strong>' : '<a href="' . $mpurl . 'page=' . $i . ($ajaxtarget && $i == $pages && $autogoto ? '#' : $aname) . '"' . $ajaxtarget . '>' . $i . '</a>';
}
$multipage .= ($to < $pages ? '<a href="' . $mpurl . 'page=' . $pages . $aname . '" class="last"' . $ajaxtarget . '>... ' . $realpages . '</a>' : '') . ($curpage < $pages && !$simple ? '<a href="' . $mpurl . 'page=' . ($curpage + 1) . $aname . '" class="nxt"' . $ajaxtarget . '>' . $lang['next'] . '</a>' : '') . ($showkbd && !$simple && $pages > $page && !$ajaxtarget ? '<kbd><input type="text" name="custompage" size="3" onkeydown="if(event.keyCode==13) {window.location=\'' . $mpurl . 'page=\'+this.value; doane(event);}" /></kbd>' : '');
$multipage = '<div class="pg">' . ($shownum && !$simple ? '<em> ' . $totals . ' </em>' : '') . $multipage . '</div>';
//$maxpage = $realpages;
return $multipage;
}
开发者ID:locphp,项目名称:rsf,代码行数:57,代码来源:Pager.php
示例18: output
function output()
{
extract($GLOBALS);
$_G['forum_thread']['replies'] = $_G['forum_thread']['replies'] >= 0 ? $_G['forum_thread']['replies'] : 0;
if ($_G['page'] > @ceil(($_G['forum_thread']['replies'] + 1) / $_G['ppp'])) {
$content = '';
} elseif ($postlist) {
if (!function_exists('mobileoem_template')) {
include_once DISCUZ_ROOT . './source/plugin/mobileoem/discuzcode.func.php';
}
$variable = array();
foreach ($GLOBALS['aimgs'] as $pid => $aids) {
foreach ($aids as $aid) {
$_url = parse_url($postlist[$pid]['attachments'][$aid]['url']);
$variable['imagelist'][$aid] = (!$postlist[$pid]['attachments'][$aid]['remote'] && !$_url['scheme'] ? $_G['siteurl'] : '') . $postlist[$pid]['attachments'][$aid]['url'] . $postlist[$pid]['attachments'][$aid]['attachment'];
if (strexists($postlist[$pid]['message'], '[attach]' . $aid . '[/attach]')) {
$postlist[$pid]['message'] = str_replace('[attach]' . $aid . '[/attach]', mobileoem_parseimg($postlist[$pid]['attachments'][$aid]['width'], 0, $variable['imagelist'][$aid]), $postlist[$pid]['message']);
} else {
$postlist[$pid]['message'] .= '<br /><br />' . mobileoem_parseimg($postlist[$pid]['attachments'][$aid]['width'], 0, $variable['imagelist'][$aid]);
}
}
}
foreach ($postlist as $pid => $post) {
if ($post['attachlist']) {
foreach ($post['attachlist'] as $aid) {
$aidencode = packaids($postlist[$pid]['attachments'][$aid]);
$_code = parseurl('/forum.php?mod=attachment&aid=' . $aidencode, $postlist[$pid]['attachments'][$aid]['filename'], 0);
if (strexists($postlist[$pid]['message'], '[attach]' . $aid . '[/attach]')) {
$postlist[$pid]['message'] = str_replace('[attach]' . $aid . '[/attach]', $_code, $postlist[$pid]['message']);
} else {
$postlist[$pid]['message'] .= '<br /><br />' . $_code;
}
}
}
$postlist[$pid]['message'] = preg_replace("/\\[attach\\]\\d+\\[\\/attach\\]/i", '', $postlist[$pid]['message']);
}
$get = $_GET;
unset($get['page'], $get['debug']);
$nexturl = http_build_query($get);
include mobileoem_template('forum/viewthread');
if (!empty($_GET['debug'])) {
exit;
}
$content = ob_get_contents();
ob_end_clean();
}
$variable['forumname'] = $forum['name'];
$variable['datatype'] = $_G['page'] == 1 ? 0 : 1;
$variable['webview_page'] = $content;
$variable['ppp'] = $_G['ppp'];
$variable['posts'] = count($postlist);
$variable['page'] = $_G['page'];
if ($_G['forum_discuzcode']['passwordauthor']) {
$variable['passwordpid'] = array_keys($_G['forum_discuzcode']['passwordauthor']);
}
mobile_core::result(mobile_core::variable($variable));
}
开发者ID:tang86,项目名称:discuz-utf8,代码行数:57,代码来源:viewthread.php
示例19: site_slide_search_new
function site_slide_search_new($params = array())
{
global $_GPC, $_W;
extract($params);
$sql = "SELECT * FROM " . tablename('xcommunity_slide') . " WHERE weid = '{$_W['weid']}' ORDER BY id DESC";
$list = pdo_fetchall($sql);
if (!empty($list)) {
foreach ($list as &$row) {
$row['url'] = strexists($row['url'], 'http') ? $row['url'] : '';
}
}
return $list;
}
开发者ID:guohuadeng,项目名称:wuyeWq,代码行数:13,代码来源:model.php
示例20: respond
public function respond()
{
global $_W;
$rid = $this->rule;
$sql = "SELECT * FROM " . tablename('weisrc_audio_reply') . " WHERE `rid`=:rid LIMIT 1";
$row = pdo_fetch($sql, array(':rid' => $rid));
if (empty($row['id'])) {
return array();
}
$title = pdo_fetchcolumn("SELECT name FROM " . tablename('rule') . " WHERE id = :rid LIMIT 1", array(':rid' => $rid));
$url = $_W['siteroot'] . createMobileUrl('index', array('rid' => $row['rid'], 'from_user' => base64_encode(authcode($this->message['from'], 'ENCODE'))));
return $this->respNews(array('Title' => $title, 'Description' => $row['description'], 'PicUrl' => !strexists($row['picture'], 'http://') ? $_W['attachurl'] . $row['picture'] : $row['picture'], 'Url' => $url));
}
开发者ID:keycoolkui,项目名称:weixinfenxiao,代码行数:13,代码来源:processor.php
注:本文中的strexists函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论