本文整理汇总了PHP中wap_msg函数的典型用法代码示例。如果您正苦于以下问题:PHP wap_msg函数的具体用法?PHP wap_msg怎么用?PHP wap_msg使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wap_msg函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: wap_login
function wap_login($username, $password, $safecv, $lgt = 0)
{
global $db, $timestamp, $onlineip, $db_ckpath, $db_ckdomain, $db_bbsurl, $db_ifsafecv;
$men = $db->get_one("SELECT m.uid,m.password,m.safecv,m.groupid,m.yz,md.onlineip FROM pw_members m LEFT JOIN pw_memberdata md ON md.uid=m.uid WHERE m." . ($lgt ? 'uid' : 'username') . "=" . pwEscape($username));
if ($men) {
$e_login = explode("|", $men['onlineip']);
if ($e_login[0] != $onlineip . ' *' || $timestamp - $e_login[1] > 600 || $e_login[2] > 1) {
$men_uid = $men['uid'];
$men_pwd = $men['password'];
$check_pwd = $password;
if ($men['yz'] > 2) {
wap_msg('login_jihuo');
}
if (strlen($men_pwd) == 16) {
$check_pwd = substr($password, 8, 16);
/*支持 16 位 md5截取密码*/
}
if ($men_pwd == $check_pwd && (!$db_ifsafecv || $men['safecv'] == $safecv)) {
if (strlen($men_pwd) == 16) {
$db->update("UPDATE pw_members SET password=" . pwEscape($password) . " WHERE uid=" . pwEscape($men_uid));
}
$L_groupid = (int) $men['groupid'];
Cookie("ck_info", $db_ckpath . "\t" . $db_ckdomain);
} else {
global $L_T;
$L_T = $e_login[2];
$L_T ? $L_T-- : ($L_T = 5);
$F_login = "{$onlineip} *|{$timestamp}|{$L_T}";
$db->update("UPDATE pw_memberdata SET onlineip=" . pwEscape($F_login) . " WHERE uid=" . pwEscape($men_uid));
wap_msg('login_pwd_error');
}
} else {
global $L_T;
$L_T = 600 - ($timestamp - $e_login[1]);
wap_msg('login_forbid');
}
} else {
global $errorname;
$errorname = $username;
wap_msg('user_not_exists');
}
Cookie("winduser", StrCode($men_uid . "\t" . PwdCode($password) . "\t" . $safecv));
Cookie('lastvisit', '', 0);
wap_msg('wap_login', 'index.php');
}
开发者ID:adi00,项目名称:wumaproject,代码行数:45,代码来源:wap_mod.php
示例2: wap_check
function wap_check($fid, $action)
{
global $db, $groupid, $_G, $_time, $db_titlemax, $db_postmin, $db_postmax, $subject, $content;
$subject = trim($subject);
$content = trim($content);
if ($action == 'new' && (!$subject || strlen($subject) > $db_titlemax)) {
wap_msg('subject_limit');
}
if (strlen($content) >= $db_postmax || strlen($content) < $db_postmin) {
wap_msg('content_limit');
}
$fm = $db->get_one("SELECT f.forumadmin,f.fupadmin,f.password,f.allowvisit,f.f_type,f.f_check,f.allowpost,f.allowrp,fe.forumset FROM pw_forums f LEFT JOIN pw_forumsextra fe USING(fid) WHERE f.fid=" . pwEscape($fid));
$forumset = unserialize($fm['forumset']);
if (!$fm || $fm['password'] != '' || $fm['f_type'] == 'hidden' || $fm['allowvisit'] && @strpos($fm['allowvisit'], ",{$groupid},") === false) {
wap_msg('post_right');
}
if ($action == 'new') {
$isGM = CkInArray($GLOBALS['windid'], $GLOBALS['manager']);
$isBM = admincheck($fm['forumadmin'], $fm['fupadmin'], $GLOBALS['windid']);
if ($fm['f_check'] == '1' || $fm['f_check'] == '3') {
wap_msg('post_right');
}
if ($fm['allowpost'] && strpos($fm['allowpost'], ",{$groupid},") === false) {
wap_msg('post_right');
}
if (!$fm['allowpost'] && $_G['allowpost'] == 0) {
wap_msg('post_group');
}
if ($forumset['allowtime'] && !$isGM && !allowcheck($forumset['allowtime'], "{$_time['hours']}", '') && !pwRights($isBM, 'allowtime')) {
wap_msg('post_right');
}
} elseif ($action == 'reply') {
if ($fm['f_check'] == '2' || $fm['f_check'] == '3') {
wap_msg('reply_right');
}
if ($fm['allowrp'] && strpos($fm['allowrp'], ",{$groupid},") === false) {
wap_msg('reply_right');
}
if (!$fm['allowrp'] && $_G['allowrp'] == 0) {
wap_msg('reply_group');
}
}
}
开发者ID:adi00,项目名称:wumaproject,代码行数:43,代码来源:wap_global.php
示例3: COUNT
}
if ($keyword) {
$condition .= " AND title LIKE '%{$keyword}%'";
}
$r = $db->get_one("SELECT COUNT(*) AS num FROM {$DT_PRE}message WHERE {$condition}");
$pages = wap_pages($r['num'], $page, $pagesize);
$lists = array();
$result = $db->query("SELECT * FROM {$DT_PRE}message WHERE {$condition} ORDER BY itemid DESC LIMIT {$offset},{$pagesize}");
while ($r = $db->fetch_array($result)) {
$r['adddate'] = timetodate($r['addtime'], 'm/d H:i');
$r['type'] = $TYPE[$r['typeid']];
$lists[] = $r;
}
if ($TP == 'touch') {
$back_link = 'index.php?moduleid=' . $moduleid;
}
}
include template('message', $TP);
break;
default:
if ($TP == 'touch') {
if (!$_userid) {
wap_msg($L['please_login'], 'index.php?moduleid=' . $moduleid . '&action=login');
}
$back_link = 'index.php';
include template('member', $TP);
} else {
dheader('index.php');
}
break;
}
开发者ID:hcd2008,项目名称:destoon,代码行数:31,代码来源:member.inc.php
示例4: timetodate
$fromdate = timetodate($fromtime, 3);
$todate = timetodate($totime, 3);
$update = '';
include DT_ROOT . '/include/update.inc.php';
$head_title = $title . $DT['seo_delimiter'] . $MOD['name'] . $DT['seo_delimiter'] . $head_title;
} else {
if ($kw) {
check_group($_groupid, $MOD['group_search']) or wap_msg($L['msg_no_search']);
} else {
if ($catid) {
$CAT or wap_msg($L['msg_not_cate']);
if (!check_group($_groupid, $MOD['group_list']) || !check_group($_groupid, $CAT['group_list'])) {
wap_msg($L['msg_no_right']);
}
} else {
check_group($_groupid, $MOD['group_index']) or wap_msg($L['msg_no_right']);
}
}
$head_title = $MOD['name'] . $DT['seo_delimiter'] . $head_title;
if ($kw) {
$head_title = $kw . $DT['seo_delimiter'] . $head_title;
}
$condition = "status>2";
if ($keyword) {
$condition .= " AND keyword LIKE '%{$keyword}%'";
}
if ($catid) {
$condition .= $CAT ? " AND catid IN (" . $CAT['arrchildid'] . ")" : " AND catid={$catid}";
}
if ($areaid) {
$condition .= $ARE['child'] ? " AND areaid IN (" . $ARE['arrchildid'] . ")" : " AND areaid={$areaid}";
开发者ID:hcd2008,项目名称:destoon,代码行数:31,代码来源:exhibit.inc.php
示例5: pwSqlSingle
$db->update("INSERT INTO pw_attachbuy SET " . pwSqlSingle(array('aid' => $aid, 'uid' => $winduid, 'ctype' => $attach['ctype'], 'cost' => $attach['needrvrc'])));
$credit->addLog('topic_attbuy', array($attach['ctype'] => -$attach['needrvrc']), array('uid' => $winduid, 'username' => $windid, 'ip' => $onlineip));
$credit->set($winduid, $attach['ctype'], -$attach['needrvrc'], false);
if ($db_sellset['income'] < 1 || ($income = $db->get_value("SELECT SUM(cost) AS sum FROM pw_attachbuy WHERE aid=" . pwEscape($aid))) < $db_sellset['income']) {
$username = $db->get_value("SELECT username FROM pw_members WHERE uid=" . pwEscape($attach['uid'], false));
$credit->addLog('topic_attsell', array($attach['ctype'] => $attach['needrvrc']), array('uid' => $attach['uid'], 'username' => $username, 'ip' => $onlineip, 'buyer' => $windid));
$credit->set($attach['uid'], $attach['ctype'], $attach['needrvrc'], false);
}
}
} else {
!$attach['ctype'] && ($attach['ctype'] = 'rvrc');
$usercredit = $credit->get($winduid, $attach['ctype']);
if ($usercredit < $attach['needrvrc']) {
$needrvrc = $attach['needrvrc'];
$creditName = $credit->cType[$attach['ctype']];
wap_msg($downloadmoney > 0 && $uploadcredit == $attach['ctype'] ? 'job_attach_rvrc_download' : 'job_attach_rvrc');
}
}
}
if (isset($credit) && $credit->setUser) {
$credit->runsql();
}
$pw_attachs->increaseField($aid, 'hits');
if ($db_attachhide && $attach['size'] > $db_attachhide && $attach['type'] == 'zip' && !defined('FX')) {
ObHeader($fgeturl[0]);
} elseif ($fgeturl[1] == 'Local') {
$filename = "{$attachdir}/" . $attach['attachurl'];
$filesize = filesize($filename);
}
$ctype = '';
switch ($fileext) {
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:job.php
示例6: forum_sell
function forum_sell($fid)
{
global $db, $winduid, $timestamp;
$rt = $db->get_one("SELECT MAX(overdate) AS u FROM pw_forumsell WHERE uid=" . pwEscape($winduid) . ' AND fid=' . pwEscape($fid));
if ($rt['u'] < $timestamp) {
wap_msg('本版块为出售版块', 'index.php?a=list');
}
}
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:8,代码来源:forum.php
示例7: checkWapPost
function checkWapPost($iftitle = 1)
{
global $subject, $content, $db_titlemax, $db_postmax, $db_postmin, $refer;
if ($iftitle && (empty($subject) || strlen($subject) > $db_titlemax)) {
wap_msg("标题不能为空,且长度必须小于{$db_titlemax}字节", $refer);
}
if (strlen(trim($content)) >= $db_postmax || strlen(trim($content)) < $db_postmin) {
$msg = $db_postmin ? "内容长度必须大于{$db_postmin}字节" : '';
$msg .= $db_postmax ? "且小于{$db_postmax}字节" : '';
wap_msg($msg, $refer);
}
}
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:12,代码来源:post.php
示例8: Copyright
<?php
/*
[Destoon B2B System] Copyright (c) 2008-2013 Destoon.COM
This is NOT a freeware, use is subject to license.txt
*/
define('DT_MEMBER', true);
define('DT_WAP', true);
require '../common.inc.php';
header("Content-type:text/html; charset=utf-8");
require DT_ROOT . '/include/module.func.php';
require 'global.func.php';
include load('wap.lang');
$EXT['wap_enable'] or wap_msg($L['msg_wap_close']);
if ($DT_BOT) {
$TP = 'touch';
} else {
$UA = strtoupper($_SERVER['HTTP_USER_AGENT']);
if (strpos($UA, 'WINDOWS NT') !== false) {
dheader($EXT['wap_url'] . 'mobile.php?action=pc');
}
$TP = 'wap';
$CK = get_cookie('mobile');
if ($CK == 'wap') {
//
} else {
if ($CK == 'touch') {
$TP = 'touch';
} else {
if (preg_match("/(iPhone|iPad|iPod|Android)/i", $UA)) {
$TP = 'touch';
开发者ID:hcd2008,项目名称:destoon,代码行数:31,代码来源:index.php
示例9: defined
<?php
defined('W_P') or exit('Forbidden');
if (empty($wind_action)) {
wap_header();
require_once PrintWAP('forumpwd');
wap_footer();
} else {
if ($forum['password'] == md5($wind_pwd) && $groupid != 'guest') {
Cookie("pwdcheck[{$fid}]", $forum['password']);
} elseif ($groupid == 'guest') {
wap_msg('forumpw_guest', 'index.php?a=list');
} else {
wap_msg('forumpw_pwd_error', 'index.php?a=forum&fid=' . $fid);
}
}
开发者ID:jechiy,项目名称:PHPWind,代码行数:16,代码来源:forumpwd.php
示例10: exit
<?php
!defined('W_P') && exit('Forbidden');
include_once D_P . "data/bbscache/dbreg.php";
InitGP(array('lgt', 'pwuser', 'pwpwd', 'question', 'customquest', 'answer'), 'P');
if ($windid) {
wap_msg('login_have');
} elseif ($pwuser && $pwpwd) {
$safecv = $db_ifsafecv ? wap_quest($question, $customquest, $answer) : '';
wap_login($pwuser, md5($pwpwd), $safecv, $lgt);
}
$returnUrl = getReturnUrl();
wap_header();
require_once PrintWAP('login');
wap_footer();
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:15,代码来源:login.php
示例11: GetVerify
// 发送邮件
@(include_once D_P . 'data/bbscache/mail_config.php');
if ($rg_emailcheck) {
$verifyhash = GetVerify();
$rg_yz = md5($rg_yz . substr(md5($db_sitehash), 0, 5) . substr(md5($regname), 0, 5));
require_once R_P . 'require/sendemail.php';
$sendinfo = sendemail($regemail, 'email_check_subject', 'email_check_content', 'email_additional');
if ($sendinfo === true) {
ObHeader("{$db_registerfile}?step=finish&email={$regemail}&verify={$verifyhash}");
} else {
wap_msg(is_string($sendinfo) ? $sendinfo : 'reg_email_fail', $basename);
}
} elseif ($rg_regsendemail && $ml_mailifopen) {
require_once R_P . 'require/sendemail.php';
sendemail($regemail, 'email_welcome_subject', 'email_welcome_content', 'email_additional');
}
// 发送结束
if ($db_pptifopen && $db_ppttype == 'server' && ($db_ppturls || $forward)) {
$action = 'login';
$jumpurl = $forward ? $forward : $db_ppturls;
empty($forward) && ($forward = $db_bbsurl);
require_once R_P . 'require/passport_server.php';
}
$verifyhash = GetVerify($winduid);
wap_msg('reg_success', 'index.php');
exit;
}
$returnUrl = getReturnUrl();
wap_header();
require_once PrintWAP('register');
wap_footer();
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:register.php
示例12: exit
<?php
!defined('W_P') && exit('Forbidden');
$defaultType = '';
if ($db_waprecommend) {
InitGP(array('type', 'page'), 'GP');
require_once W_P . 'include/db/recommend.db.php';
$recommend = new RecommendDB();
$recommendTypes = $recommend->getRecommendActiveType();
$recommendbs = $recommend->getRecommendByType($type, $page);
$url = "index.php?a=recommend&" . ($type ? "&type={$type}" : "") . '&';
$pages = getPages($page, count($recommendbs), $url);
} else {
wap_msg('recommend_close');
}
Cookie("wap_scr", serialize(array("page" => "recommend")));
wap_header();
require_once PrintWAP('recommend');
wap_footer();
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:19,代码来源:recommend.php
示例13: nextReply
$prer = nextReply($tid, $pid, $rt['ptable'], -1);
} else {
wap_msg('illegal_tid');
}
} elseif ($action == 'modify') {
InitGP(array('step'), 'GP', 2);
$pw_tmsgs = GetTtable($tid);
$rt = $db->get_one("SELECT t.fid,t.tid,t.subject,t.author,t.authorid,t.replies,t.locked,t.postdate,t.anonymous,t.ptable,tm.content FROM pw_threads t LEFT JOIN {$pw_tmsgs} tm ON tm.tid=t.tid WHERE t.tid=" . pwEscape($tid) . " AND ifcheck=1");
//读取板块信息
if (!($foruminfo = L::forum($rt[fid]))) {
wap_msg('data_error');
}
$isBM = admincheck($foruminfo['forumadmin'], $foruminfo['fupadmin'], $windid);
//获得管理权限
$pw_posts = GetPtable($rt['ptable']);
$reply = $db->get_one("SELECT * FROM {$pw_posts} WHERE pid = " . pwEscape($pid));
$editright = $isGM || pwRights($isBM, 'deltpcs') || $reply['authorid'] == $winduid;
!$editright && wap_msg('您没有权限编辑此回复', 'index.php?a=reply&tid=' . $tid . '&pid=' . $pid);
if (empty($step)) {
$reply['content'] = str_replace(array('<', '>', ' '), array('<', '>', ' '), $reply['content']);
} elseif ($step == 2) {
InitGP(array('content'), 'GP');
$pw_posts = GetPtable('N', $tid);
$db->update("UPDATE {$pw_posts} SET content = " . pwEscape(wap_cv($content)) . " WHERE pid = " . pwEscape($pid));
wap_msg('operate_success', 'index.php?a=reply&tid=' . $tid . '&pid=' . $pid);
}
}
Cookie("wap_scr", serialize(array("page" => "reply", "extra" => array("tid" => $tid, "pid" => $pid))));
wap_header();
require_once PrintWAP('reply');
wap_footer();
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:reply.php
示例14: checkupload
function checkupload(&$upatt)
{
global $db_allowupload, $returnedit;
if (!$db_allowupload) {
wap_msg('upload_close', $returnedit);
} elseif (!$upatt->forum->allowupload($upatt->post->user, $upatt->post->groupid)) {
wap_msg('upload_forum_right', $returnedit);
} elseif (!$upatt->forum->foruminfo['allowupload'] && $upatt->post->_G['allowupload'] == 0) {
wap_msg('upload_group_right', $returnedit);
}
if ($upatt->post->user['uploadtime'] < $GLOBALS['tdtime']) {
$upatt->post->user['uploadnum'] = 0;
}
if ($upatt->post->_G['allownum'] > 0 && $upatt->post->user['uploadnum'] + count($_FILES) + count($upatt->flashatt) >= $upatt->post->_G['allownum']) {
wap_msg('upload_num_error', $returnedit);
}
if ($upatt->post->_G['allowupload'] == 1 && $upatt->uploadmoney) {
global $credit;
require_once R_P . 'require/credit.php';
if ($upatt->uploadmoney < 0 && $credit->get($upatt->post->uid, $upatt->uploadcredit) < abs($upatt->uploadmoney)) {
$GLOBALS['creditname'] = $credit->cType[$upatt->uploadcredit];
wap_msg('upload_money_limit', $returnedit);
}
}
}
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:25,代码来源:upload.php
示例15: pwEscape
!$uid && !$username && ($uid = $winduid);
if ($uid) {
$sql = 'm.uid=' . pwEscape($uid);
$uid == $winduid && ($isU = true);
} else {
$sql = 'm.username=' . pwEscape($username);
$username == $windid && ($isU = true);
}
$userdb = $db->get_one("SELECT m.uid,m.username,m.email,m.groupid,m.memberid,m.icon,m.gender,m.regdate,m.signature,m.introduce,m.oicq,m.msn,m.yahoo,m.site,m.honor,m.bday,m.medals,m.userstatus,md.thisvisit,md.onlinetime,md.postnum,md.digests,md.rvrc,md.money,md.credit,md.currency,md.lastvisit,md.lastpost,md.todaypost,md.onlineip FROM pw_members m LEFT JOIN pw_memberdata md ON m.uid=md.uid WHERE {$sql}");
if (empty($userdb)) {
$errorname = '';
wap_msg('user_not_exists');
}
$userdb['honor'] = substrs($userdb['honor'], 90);
if (!$isU && !$_G['allowprofile'] && !$userdb['isfriend']) {
wap_msg('profile_right');
}
$uid = $userdb['uid'];
include_once D_P . 'data/bbscache/level.php';
$systitle = $userdb['groupid'] == '-1' ? '' : $ltitle[$userdb['groupid']];
$p_list = $db_plist ? explode(',', $db_plist) : array();
if (!$winduid && !$_G['allowprofile']) {
Showmsg('not_login');
}
include_once D_P . 'data/bbscache/md_config.php';
require_once R_P . 'require/credit.php';
require_once R_P . 'require/forum.php';
require_once R_P . 'require/postfunc.php';
$customdata = $custominfo = $colonydb = array();
$user_icon = explode('|', $userdb['icon']);
if ($user_icon[4] && $userdb['tooltime'] < $timestamp - 86400) {
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:showu.php
示例16: array
$delarticle->delReply($readdb, $db_recycle, $ifdel, true, array('reason' => $atc_content));
$jurl = "index.php?a=read&tid={$seltid}";
} else {
$delarticle->delTopic($readdb, $db_recycle, $ifdel, array('reason' => $atc_content));
}
$credit->runsql();
foreach ($msgdb as $key => $val) {
pwSendMsg($val);
}
if ($db_ifpwcache ^ 1) {
$db->update("DELETE FROM pw_elements WHERE type !='usersort' AND id IN(" . pwImplode($delids) . ')');
}
P_unlink(D_P . 'data/bbscache/c_cache.php');
wap_msg("wap_post_del", $jurl);
} else {
$sql = "SELECT * FROM pw_threads WHERE tid = " . pwEscape($seltid);
$threadb = $db->get_one($sql);
if (!$threadb) {
wap_msg('data_error');
}
$threadb['postdate'] = get_date($threadb['postdate'], "m-d H:i");
//获取回复信息
if ($selpid) {
$ptables = GetPtable('N', $seltid);
$replydb = $db->get_one("SELECT * FROM {$ptables} WHERE pid=" . pwEscape($selpid));
}
$template = 'mawhole';
}
wap_header();
require_once PrintWAP($template);
wap_footer();
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:mawhole.php
示例17: wap_msg
$attachpath = $db_bbsurl . '/' . $attachpath;
$wapImages = './images';
$wap_perpage = 10;
if (!$db_wapifopen) {
wap_msg('wap_closed');
}
if ($db_charset != 'utf8') {
L::loadClass('Chinese', 'utility/lang', false);
$chs = new Chinese('UTF8', $db_charset, true);
foreach ($_POST as $key => $value) {
$_POST[$key] = addslashes($chs->Convert(stripslashes($value)));
}
}
$basename = substr($_SERVER['PHP_SELF'], strrpos($_SERVER['PHP_SELF'], '/') + 1);
$headTitle = $db_bbsname;
$isGM = CkInArray($windid, $manager);
if ($_GET['token']) {
$token = deWindToken($_GET['token']);
if ($token) {
Cookie("winduser", $token);
//自动获取勋章_start
require_once R_P . 'require/functions.php';
doMedalBehavior($winduid, 'continue_login');
//自动获取勋章_end
wap_msg("欢迎来到{$db_bbsname}", 'index.php');
} else {
wap_msg("链接已失效,请重新登录", 'index.php');
}
}
$tokenURL = "{$db_bbsurl}/index.php?token=" . enWindToken(GetCookie('winduser'));
$scrMap = array("realy_all" => "index.php?a=realy_all", "reply" => "index.php?a=reply", "read" => "index.php?a=read", "forum" => "index.php?a=forum", "list" => "index.php?a=list", "bbsinfo" => "index.php?a=bbsinfo", "index" => "index.php", "recommend" => "index.php?a=recommend");
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:wap_global.php
示例18: defined
<?php
defined('P_W') || exit('Forbidden');
$forumName = $db_bbsname;
InitGP(array('page', 'fid', 'q'));
$q = trim(str_replace("%", "", $q));
(!is_numeric($page) || $page < 1) && ($page = 1);
(!is_numeric($fid) || $page < 1) && ($fid = 0);
$thisp = 0;
if ($_G['allowsearch'] == '0') {
wap_msg('您所在的用户组没有搜索权限', 'index.php');
}
function search($fid)
{
global $page, $thisp, $q, $db, $wap_perpage;
/* 调用搜索Service -- searchThreads 搜索帖子内容 */
$searcherService = L::loadclass('searcher', 'search');
$result = $searcherService->searchThreads($q, 1, '', '', '', array(), $page, $wap_perpage, array());
$start = ($page - 1) * $wap_perpage;
if (is_array($result[1])) {
foreach ($result[1] as $k => $v) {
$id++;
$v['anonymous'] && ($v['author'] = $db_anonymousname);
$v['id'] = $id;
$hots[] = $v;
}
}
return $hots;
}
wap_header();
require_once PrintWAP('search');
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:search.php
示例19: viewOneReply
function viewOneReply($tid, $pid, $ptable)
{
global $db, $db_waplimit, $c_page, $db_anonymousname, $pwAnonyHide, $winduid;
$pw_posts = GetPtable($ptable);
$sql = "SELECT pid,subject,author,authorid,content,postdate,anonymous,aid FROM {$pw_posts} WHERE pid=" . pwEscape($pid);
$ct = $db->get_one($sql);
if ($ct) {
$ct['subject'] = str_replace(' ', '', wap_cv($ct['subject']));
$content = viewContent($ct['content']);
$yxqw = "";
/*************对内容进行分页**********/
(int) $c_page < 1 && ($c_page = 1);
$clen = wap_strlen($content, $db_charset);
//TODO mbstring
$maxp = ceil($clen / $db_waplimit);
$c_nextp = $c_page + 1;
$c_prep = $c_page - 1;
if ($c_nextp > $maxp) {
$c_nextp = $maxp;
}
if ($c_prep <= 0) {
$c_prep = 1;
}
$yxqw = "";
if ($maxp > 1) {
$content = wap_substr($content, $db_waplimit * ($c_page - 1), $db_waplimit, $db_charset);
$content = wap_img2($content);
if (empty($content)) {
wap_msg("已到最后一页", "index.php?a=read&tid={$tid}");
}
if ($c_page == 1) {
$yxqw = "<a href='index.php?a=reply&pid=" . $pid . "&tid=" . $tid . "&c_page={$c_nextp}'>下一页</a>";
} elseif ($c_page == $maxp) {
$yxqw = "<a href='index.php?a=reply&pid=" . $pid . "&tid=" . $tid . "&c_page={$c_prep}'>上一页</a> ";
} else {
$yxqw = "<a href='index.php?a=reply&pid=" . $pid . "&tid=" . $tid . "&c_page={$c_nextp}'>下一页</a>";
$yxqw .= "<a href='index.php?a=reply&pid=" . $pid . "&tid=" . $tid . "&c_page={$c_prep}'>上一页</a> ";
}
$yxqw .= " ({$c_page}/{$maxp})<br/>";
} else {
$content = wap_img2($content);
}
$ct['content'] = $content;
/*************对内容进行分页**********/
if ($ct['anonymous'] && $ct['authorid'] != $winduid && !$pwAnonyHide) {
$ct['author'] = $db_anonymousname;
$ct['authorid'] = 0;
}
list(, $ct['postdate']) = getLastDate($ct['postdate']);
$ct['id'] = $id;
//$ct ['author'] = $ct ['anonymous'] ? $db_anonymousname : $ct ['author'];
$ct['author'] = wap_cv($ct['author']);
$ct['yxqw'] = $yxqw;
if ($ct['aid'] && $ct['aid'] != '') {
$ct['aidimgs'] = viewAidsForHtml($tid, $pid);
$ct['aidatts'] = viewDownloads($tid, $pid);
} else {
$ct['aidimgs'] = '';
$ct['aidatts'] = '';
}
}
return $ct;
}
开发者ID:jechiy,项目名称:PHPWind,代码行数:63,代码来源:threadfunction.php
示例20: exit
<?php
!defined('W_P') && exit('Forbidden');
!$winduid && (wap_msg('not_login') && exit);
$returnUrl = "index.php";
$pwServer['HTTP_ACCEPT_LANGUAGE'] = GetServer('HTTP_ACCEPT_LANGUAGE');
wap_header();
require_once PrintWAP('myphone');
wap_footer();
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:9,代码来源:myphone.php
注:本文中的wap_msg函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论