本文整理汇总了PHP中PostCheck函数的典型用法代码示例。如果您正苦于以下问题:PHP PostCheck函数的具体用法?PHP PostCheck怎么用?PHP PostCheck使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PostCheck函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: PostCheck
} else {
if ($db_cloudgdcode && defined('AJAX') && S::inArray($action, array('reply', 'quote'))) {
$keepCloudCaptchaCode = true;
}
PostCheck(1, $db_gdcheck & 4 && (!$db_postgd || $winddb['postnum'] < $db_postgd), $db_ckquestion & 4 && (!$postq || $winddb['postnum'] < $postq) && $db_question);
!$windid && ($windid = '游客');
/*
if ($db_xforwardip && $_POST['_hexie'] != GetVerify($onlineip.$winddb['regdate'].$fid.$tid)) {
Showmsg('undefined_action');
}
*/
}
//默认动漫表情处理
if ($db_windmagic && ($action == 'new' || $action == 'modify' && $pid == 'tpc')) {
$mDef = '';
//* @include_once pwCache::getPath(D_P."data/bbscache/myshow_default.php");
pwCache::getData(D_P . "data/bbscache/myshow_default.php");
}
//校验token
if ($pwServer['REQUEST_METHOD'] == 'POST') {
PostCheck(1, 0, 0, 1);
}
if ($action == "new") {
require_once R_P . 'require/postnew.php';
} elseif ($action == "reply" || $action == "quote") {
require_once R_P . 'require/postreply.php';
} elseif ($action == "modify") {
require_once R_P . 'require/postmodify.php';
} else {
Showmsg('undefined_action');
}
示例2: TwitterOAuth
$file = 'lastupdate.txt';
//flickrのid
$f_id = "";
// OAuthオブジェクト生成
$to = new TwitterOAuth($consumer_key, $consumer_secret, $access_token, $access_token_secret);
$url = 'http://api.flickr.com/services/feeds/photos_public.gne?id=' . $f_id . '&lang=en-us&format=rss_200';
// 投稿するRSS
$rss = file_get_contents($url);
$oXML = simplexml_load_string($rss);
$oItems = $oXML->channel->item;
$i = 0;
foreach ($oItems as $Item) {
if ($i >= CHECK_RSS_COUNT) {
break 1;
}
if (!PostCheck($Item->link, $file)) {
$sLink = Shorten($Item->link);
$text = $Item->title . " " . $sLink;
// ツイート文言
$res = $to->OAuthRequest("http://api.twitter.com/1/statuses/update.xml", "POST", array("status" => $text));
// 成功したらfileに書き込む
file_put_contents($file, (string) $Item->link);
}
$i++;
}
// twitterAPIの返りオブジェクト,RSSオブジェクトのタイトル
function PostCheck($sHead, $file)
{
$sHead = (string) $sHead;
// fileから最後に投稿したlinkとマッチするかチェック
if (mb_strpos(file_get_contents($file), $sHead) !== false) {
示例3: deleteThreadsHander
function deleteThreadsHander($tidarray)
{
global $windid, $manager, $groupid;
PostCheck();
(!CkInArray($windid, $manager) || $groupid != 3) && Showmsg('mawhole_right');
if ($tidarray == "") {
Showmsg('data_error');
}
$tidarray = explode("|", $tidarray);
if (!is_array($tidarray)) {
Showmsg('data_error');
}
$forums = array();
foreach ($tidarray as $v) {
if ($v == "") {
continue;
}
list($fid, $tid) = explode("_", $v);
if (intval($fid) < 0 && intval($tid) < 0) {
continue;
}
$forums[$fid][] = $tid;
}
$threadManager = L::loadclass('threadmanager');
foreach ($forums as $fid => $threadIds) {
$threadManager->deleteByThreadIds($fid, $threadIds);
}
echo getLangInfo('other', 'search_manager_success');
ajax_footer();
}
示例4: deleteThreadsHander
function deleteThreadsHander($tidarray)
{
global $windid, $manager, $groupid, $SYSTEM;
PostCheck();
(!$SYSTEM['superright'] || !$SYSTEM['delatc']) && Showmsg('mawhole_right');
if ($tidarray == "") {
Showmsg('data_error');
}
$tidarray = explode("|", $tidarray);
if (!is_array($tidarray)) {
Showmsg('data_error');
}
$forums = $threadIds = array();
foreach ($tidarray as $v) {
if ($v == "") {
continue;
}
if (intval($v) < 0) {
continue;
}
$threadIds[] = $v;
}
/**
$threadManager = L::loadclass('threadmanager', 'forum');
foreach($forums as $fid=>$threadIds){
$threadManager->deleteByThreadIds($fid,$threadIds);
}**/
$threadService = L::loadclass('threads', 'forum');
foreach ($forums as $fid => $_threadIds) {
$threadService->deleteByThreadIds($_threadIds);
Perf::gatherInfo('changeThreadWithForumIds', array('fid' => $fid));
}
$delarticle = L::loadClass('DelArticle', 'forum');
$delarticle->delTopicByTids($threadIds, true);
echo getLangInfo('other', 'search_manager_success');
ajax_footer();
}
示例5: exit
<?php
!defined('P_W') && exit('Forbidden');
define('AJAX', '1');
require_once R_P . 'require/functions.php';
!$winduid && Showmsg('not_login');
S::gp(array('action'));
if ($action == 'delatt') {
PostCheck();
S::gp(array('did', 'aid'));
empty($aid) && Showmsg('job_attach_error');
$attach = $db->get_one("SELECT * FROM pw_attachs WHERE aid=" . S::sqlEscape($aid));
!$attach && Showmsg('job_attach_error');
if (empty($attach['attachurl']) || strpos($attach['attachurl'], '..') !== false) {
Showmsg('job_attach_error');
}
$aid = $attach['aid'];
//获取管理权限
$isGM = S::inArray($windid, $manager);
!$isGM && ($groupid = 3 && ($isGM = 1));
if ($isGM) {
$admincheck = 1;
} else {
$admincheck = 0;
}
$attach['attachurl'] = "diary/" . $attach['attachurl'];
if ($admincheck || $attach['uid'] == $winduid) {
pwDelatt($attach['attachurl'], $db_ifftp);
pwFtpClose($ftp);
$diaryService = L::loadClass('Diary', 'diary');
/* @var $diaryService PW_Diary */
示例6: foreach
if (is_array($db_enhideset['type'])) {
foreach ($db_enhideset['type'] as $key => $value) {
$enhidetype .= "<option value=\"{$value}\">" . $credit->cType[$value] . "</option>";
}
}
require_once R_P . 'require/showimg.php';
list($postFaceUrl) = showfacedesign($winddb['icon'], 1, 's');
/**
* 标题表情
*/
$icondb = array('1' => '1.gif', '2' => '2.gif', '3' => '3.gif', '4' => '4.gif', '5' => '5.gif', '6' => '6.gif', '7' => '7.gif', '8' => '8.gif');
if ($db_allowupload && $_G['allowupload']) {
$mutiupload = $db->get_value("SELECT COUNT(*) AS sum FROM pw_attachs WHERE tid=0 AND pid='0' AND uid=" . pwEscape($winduid));
}
} else {
PostCheck(1, $db_gdcheck & 4 && $winddb['postnum'] < $db_postgd, $winddb['postnum'] < $postq);
!$windid && ($windid = '游客');
/*
if ($db_xforwardip && $_POST['_hexie'] != GetVerify($onlineip.$winddb['regdate'].$fid.$tid)) {
Showmsg('undefined_action');
}
*/
}
//默认动漫表情处理
if ($db_windmagic && ($action == 'new' || $action == 'modify' && $pid == 'tpc')) {
$mDef = '';
@(include_once D_P . "data/bbscache/myshow_default.php");
}
if ($action == "new") {
require_once R_P . 'require/postnew.php';
} elseif ($action == "reply" || $action == "quote") {
示例7: foreach
foreach ($o_classdb as $key => $value) {
$o_cate[$forum[$key]['fup']][$key] = $value;
}
}
$cnimg_1 = array();
$filetype = is_array($db_uploadfiletype) ? $db_uploadfiletype : unserialize($db_uploadfiletype);
$default_type = array('gif', 'jpg', 'jpeg', 'bmp', 'png');
foreach ($default_type as $value) {
$cnimg_1[$value] = $o_imgsize ? $o_imgsize : $filetype[$value];
}
$jsStyle = pwJsonEncode($o_styledb);
$jsStyleRelation = pwJsonEncode($o_style_relation);
//list($isheader,$isfooter,$tplname,$isleft) = array(true,true,"m_groups",true);
} else {
require_once R_P . 'require/postfunc.php';
PostCheck(1, $o_groups_gdcheck, $o_groups_qcheck);
S::gp(array('cname', 'descrip'), 'P');
S::gp(array('cid', 'firstgradestyle', 'secondgradestyle'), 'P', 2);
(!$cname || strlen(stripslashes(html_entity_decode($cname, ENT_QUOTES))) > 20) && Showmsg('colony_emptyname');
$descrip = str_replace('=', '=', $descrip);
strlen(stripslashes(html_entity_decode($descrip, ENT_QUOTES))) > 255 && Showmsg('colony_descrip');
//!$cid && Showmsg('colony_class');
require_once R_P . 'require/bbscode.php';
$wordsfb = L::loadClass('FilterUtil', 'filter');
if (($banword = $wordsfb->comprise($cname)) !== false) {
Showmsg('title_wordsfb');
}
if (($banword = $wordsfb->comprise($descrip)) !== false) {
Showmsg('title_wordsfb');
}
$styleid = 0;
示例8: exit
<?php
!function_exists('adminmsg') && exit('Forbidden');
$basename = "{$admin_file}?adminjob=sendmsg";
if (empty($action)) {
include PrintEot('sendmsg');
exit;
} elseif ($action == "send") {
$messageServer = L::loadClass('message', 'message');
$pwServer['REQUEST_METHOD'] != 'POST' && PostCheck($verify);
S::gp(array('step', 'by', 'sendto', 'touser', 'subject', 'atc_content'));
if ($by == 1) {
!$sendto && adminmsg('mes_send_name_long');
empty($step) && ($step = 1);
is_array($sendto) || ($sendto = explode(',', $sendto));
if ($step == 1) {
if (empty($subject) || empty($atc_content)) {
adminmsg('sendmsg_empty');
}
$sendGroup = $sendto;
if (in_array('-1', $sendto)) {
$query = $db->query("SELECT gid FROM pw_usergroups WHERE gptype='member'");
while ($rs = $db->fetch_array($query)) {
$sendGroup[] = $rs['gid'];
}
$sendGroup = array_diff($sendGroup, array('-1'));
}
$subject = S::escapeChar($subject);
$sendmessage = S::escapeChar($atc_content);
$messageInfo = array('create_uid' => $winduid, 'create_username' => $windid, 'title' => $subject, 'content' => $sendmessage);
$messageServer->createMessageTasks($sendGroup, $messageInfo);
示例9: InitGP
$arr_logintype[] = $i;
}
}
} else {
$arr_logintype[0] = 0;
}
if (GetCookie('o_invite') && $db_modes['o']['ifopen'] == 1) {
InitGP(array('jumpurl'));
} else {
$jumpurl = $pre_url;
}
require_once R_P . 'require/header.php';
require_once PrintEot('login');
footer();
} else {
PostCheck(0, $db_gdcheck & 2, $loginq, 0);
require_once R_P . 'require/checkpass.php';
InitGP(array('pwuser', 'pwpwd', 'question', 'customquest', 'answer', 'cktime', 'hideid', 'jumpurl', 'lgt', 'keepyear'), 'P');
$jumpurl = str_replace(array('=', '&'), array('=', '&'), $jumpurl);
if (!$pwuser || !$pwpwd) {
Showmsg('login_empty');
}
$md5_pwpwd = md5($pwpwd);
$safecv = $db_ifsafecv ? questcode($question, $customquest, $answer) : '';
//list($winduid, $groupid, $windpwd, $showmsginfo) = checkpass($pwuser, $md5_pwpwd, $safecv, $lgt);
$logininfo = checkpass($pwuser, $md5_pwpwd, $safecv, $lgt);
if (!is_array($logininfo)) {
Showmsg($logininfo);
}
list($winduid, $groupid, $windpwd, $showmsginfo) = $logininfo;
/*update cache*/
示例10: array
S::gp(array('action'));
!CkInArray($action, array('getback', 'getverify', 'checkverify')) && ($action = 'sendpwd');
//!CkInArray($action ,array('getverify','checkverify')) && require_once(R_P.'require/header.php');;
if ($action == 'sendpwd') {
if ($_POST['step'] != 2) {
if ($db_authstate && $db_authgetpwd) {
$authService = L::loadClass('Authentication', 'user');
list($authStep, $remainTime, $waitTime, $mobile) = $authService->getStatus('findpwd');
$authStep_1 = $authStep_2 = 'none';
${'authStep_' . $authStep} = '';
$verifyUsername = $authStep == 1 ? '' : getCookie('findpwd_verifyUsername');
}
require_once PrintEot('sendpwd');
footer();
} else {
PostCheck(0, $db_gdcheck & 16);
S::gp(array('type', 'pwuser', 'email', 'authmobile', 'question', 'customquest', 'answer'));
$userService = L::loadClass('UserService', 'user');
/* @var $userService PW_UserService */
$userarray = $userService->getByUserName($pwuser);
if ($db_ifsafecv) {
require_once R_P . 'require/checkpass.php';
$safecv = questcode($question, $customquest, $answer);
if ($userarray['safecv'] != $safecv) {
Showmsg('safecv_error', 1);
}
}
if ($userarray) {
if ($type == 1) {
//手机取回
S::gp(array('authverify', 'new_pwd', 'pwdreapt'));
示例11: Showmsg
$hasReceiver = true;
}
if (empty($step)) {
if ($hasReceiver && !getstatus($userdb['userstatus'], PW_USERSTATUS_RECEIVEMAIL) && $groupid != '3' && $groupid != '4') {
Showmsg('sendeamil_refused');
}
$to_mail = $hasReceiver ? $userdb['email'] : $db_ceoemail;
$to_user = $hasReceiver ? $userdb['username'] : '';
$hiddenmail = 0;
if ($hasReceiver && !getstatus($userdb['userstatus'], PW_USERSTATUS_PUBLICMAIL) && $groupid != '3' && $groupid != '4') {
$hiddenmail = 1;
}
require_once PrintEot('sendmail');
footer();
} else {
PostCheck(1, $db_gdcheck & 16);
if ($hasReceiver && !getstatus($userdb['userstatus'], PW_USERSTATUS_RECEIVEMAIL) && $groupid != '3' && $groupid != '4') {
Showmsg('sendeamil_refused');
}
$sendtoemail = $hasReceiver ? $userdb['email'] : $db_ceoemail;
S::gp(array('subject', 'atc_content', 'fromname', 'fromemail', 'sendtoname'));
if (empty($subject)) {
Showmsg('sendeamil_subject_limit');
}
if (empty($atc_content) || strlen($atc_content) <= 20) {
Showmsg('sendeamil_content_limit');
} elseif (!ereg("^[-a-zA-Z0-9_\\.]+\\@([0-9A-Za-z][0-9A-Za-z-]+\\.)+[A-Za-z]{2,5}\$", $sendtoemail) || !ereg("^[-a-zA-Z0-9_\\.]+\\@([0-9A-Za-z][0-9A-Za-z-]+\\.)+[A-Za-z]{2,5}\$", $fromemail)) {
Showmsg('illegal_email');
}
$userService = L::loadClass('UserService', 'user');
/* @var $userService PW_UserService */
示例12: Showmsg
$share['topic']['abstract'] = $replydb['content'];
$share['topic']['imgs'] = $attimages;
}
}
/*
* 用户组分享权限
*/
//* include pwCache::getPath(D_P . 'data/bbscache/o_config.php');
pwCache::getData(D_P . 'data/bbscache/o_config.php');
if ($groupid != 3 && $o_share_groups && strpos($o_share_groups, ",{$groupid},") === false) {
$shareGM = 1;
}
if ($shareGM == 1) {
Showmsg('share_group_right');
}
PostCheck(true);
/**
* 禁止受限制用户发言
*/
banUser();
$ifhidden != 0 && $ifhidden != 1 && ($ifhidden = 0);
if (!$link) {
Showmsg('链接地址不能为空');
}
!preg_match("/^https?\\:\\/\\/.{4,255}\$/i", $link) && Showmsg('mode_share_link_error');
if (strlen($descrip) > 300) {
Showmsg('mode_share_descrip_toolang');
}
require_once R_P . 'require/postfunc.php';
require_once R_P . 'require/bbscode.php';
$wordsfb = L::loadClass('FilterUtil', 'filter');
示例13: PrintEot
require_once PrintEot('header_login_pop');
ajax_footer();
}
}
if ($ajax && $ajaxstep == 2) {
if ($db_gdcheck & 2) {
$checkCode = GdConfirm(S::getGp('gdcode', 'P'), true);
!$checkCode && showLoginAjaxMessage('gdcodeerror');
}
if ($db_ckquestion & 2) {
list($qanswer, $questionKey) = array(S::getGp('qanswer', 'P'), S::getGp('qkey', 'P'));
$checkAnswer = Qcheck($qanswer, $questionKey, true);
!$checkAnswer && showLoginAjaxMessage('ckquestionerror');
}
} else {
PostCheck(0, $db_gdcheck & 2, $db_ckquestion & 2 && $db_question, 0);
}
$jumpurl = str_replace(array('=', '&'), array('=', '&'), $jumpurl);
if (!$pwuser || !$pwpwd) {
Showmsg('login_empty');
}
$md5_pwpwd = md5($pwpwd);
$safecv = $db_ifsafecv ? questcode($question, $customquest, $answer) : '';
$logininfo = checkpass($pwuser, $md5_pwpwd, $safecv, $lgt, true);
if (!is_array($logininfo)) {
if ($logininfo == 'login_jihuo') {
$regEmail = getRegEmail($pwuser);
ObHeader("{$db_registerfile}?step=finish&email={$regEmail}");
}
// defend start
CloudWind::yunUserDefend('login', CloudWind::getNotLoginUid(), $pwuser, $timestamp, 0, 102, $logininfo, '', '', '');
示例14: getLangInfo
$admin_level = getLangInfo('other', 'admin_level');
//'manager';
}
$_postdata = $_POST ? PostLog($_POST) : '';
$new_record = '|' . str_replace('|', '|', Char_cv($admin_name)) . '||' . str_replace('|', '|', Char_cv($REQUEST_URI)) . "|{$onlineip}|{$timestamp}|{$_postdata}|\n";
writeover($bbsrecordfile, $new_record, "ab");
if ($pwServer['REQUEST_METHOD'] == 'POST') {
$referer_a = @parse_url($pwServer['HTTP_REFERER']);
if ($referer_a['host']) {
list($http_host) = explode(':', $pwServer['HTTP_HOST']);
if ($referer_a['host'] != $http_host) {
adminmsg('undefined_action');
}
}
unset($referer_a);
PostCheck($verify);
}
unset($_postdata, $new_record, $bbsrecordfile, $dbhost, $dbuser, $dbpw, $dbname, $pconnect, $newmanager, $newmngpwd);
function HtmlConvert(&$array)
{
if (is_array($array)) {
foreach ($array as $key => $value) {
if (!is_array($value)) {
$array[$key] = htmlspecialchars($value);
} else {
HtmlConvert($array[$key]);
}
}
} else {
$array = htmlspecialchars($array);
}
示例15: while
$diary['privacy'] == '2' && ($disabled = 'disabled');
$query = $db->query("SELECT * FROM pw_diarytype WHERE uid=" . S::sqlEscape($winduid) . " ORDER BY dtid");
while ($rs = $db->fetch_array($query)) {
$selected = '';
$rs['dtid'] == $diary['dtid'] && ($selected .= 'selected');
$dtsel .= "<option value=\"{$rs['dtid']}\" {$selected}>{$rs['name']}</option>";
}
if (strpos($atc_content, $db_bbsurl) !== false) {
$atc_content = str_replace('p_w_picpath', $db_picpath, $atc_content);
$atc_content = str_replace('p_w_upload', $db_attachname, $atc_content);
}
} elseif ($_POST['step'] == 2) {
S::gp(array('did', 'dtid', 'dtided', 'privacy', 'privacyed', 'ifcopy', 'flashatt'), 'P');
require_once R_P . 'require/bbscode.php';
require_once R_P . 'require/postfunc.php';
PostCheck(1, $o_diary_gdcheck, $o_diary_qcheck);
$wordsfb = L::loadClass('FilterUtil', 'filter');
if (($banword = $wordsfb->comprise($_POST['atc_title'])) !== false) {
Showmsg('diary_title_wordsfb');
}
if (($banword = $wordsfb->comprise($_POST['atc_content'], false)) !== false) {
Showmsg('diary_content_wordsfb');
}
list($atc_title, $atc_content, $ifconvert, $ifwordsfb) = check_data('modify');
//$db_tcheck && $winddb['postcheck'] == tcheck($atc_content) && Showmsg('diary_content_same'); //内容验证
$dtid = (int) $dtid;
$dtided = (int) $dtided;
$privacy = (int) $privacy;
$ifcopy = (int) $ifcopy;
$ifupload = 0;
/**