本文整理汇总了PHP中wap_msg函数的典型用法代码示例。如果您正苦于以下问题:PHP wap_msg函数的具体用法?PHP wap_msg怎么用?PHP wap_msg使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wap_msg函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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');
}
示例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');
}
}
}
示例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;
}
示例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}";
示例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) {
示例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');
}
}
示例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);
}
}
示例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';
示例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);
}
}
示例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();
示例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();
示例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();
示例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();
示例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);
}
}
}
示例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) {