本文整理匯總了PHP中ResetVdValue函數的典型用法代碼示例。如果您正苦於以下問題:PHP ResetVdValue函數的具體用法?PHP ResetVdValue怎麽用?PHP ResetVdValue使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了ResetVdValue函數的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: is_vdvalue
function is_vdvalue($validate)
{
if ($validate != strtolower(GetCkVdValue())) {
ResetVdValue();
return false;
}
return true;
}
示例2: AND
}
$row = $dsql->GetOne("SELECT * FROM `#@__member_pms` WHERE id='{$id}' AND (fromid='{$cfg_ml->M_ID}' OR toid='{$cfg_ml->M_ID}')");
if (!is_array($row)) {
ShowMsg('對不起,你指定的消息不存在或你沒權限查看!', '-1');
exit;
}
$dsql->ExecuteNoneQuery("UPDATE `#@__member_pms` SET hasview=1 WHERE id='{$id}' AND folder='inbox' AND toid='{$cfg_ml->M_ID}'");
$dsql->ExecuteNoneQuery("UPDATE `#@__member_pms` SET hasview=1 WHERE folder='outbox' AND toid='{$cfg_ml->M_ID}'");
include_once dirname(__FILE__) . '/templets/pm-read.htm';
exit;
} else {
if ($dopost == 'savesend') {
$svali = GetCkVdValue();
if (preg_match("/5/", $safe_gdopen)) {
if (strtolower($vdcode) != $svali || $svali == '') {
ResetVdValue();
ShowMsg('驗證碼錯誤!', '-1');
exit;
}
}
$faqkey = isset($faqkey) && is_numeric($faqkey) ? $faqkey : 0;
if ($safe_faq_msg == 1) {
if ($safefaqs[$faqkey]['answer'] != $safeanswer || $safeanswer == '') {
ShowMsg('驗證問題答案錯誤', '-1');
exit;
}
}
if ($subject == '') {
ShowMsg("請填寫信息標題!", "-1");
exit;
}
示例3: ac_edit_save
function ac_edit_save()
{
$data['askaid'] = request('askaid', '');
$data['askaid'] = is_numeric($data['askaid']) ? $data['askaid'] : 0;
$data['title'] = request('title', '');
$data['content'] = request('content', '');
$data['faqkey'] = request('faqkey', '');
$data['vdcode'] = request('vdcode', '');
$data['safeanswer'] = request('safeanswer', '');
//獲取問題的基本信息
$question = $this->question->get_one("id='{$data['askaid']}'");
//對問題進行判斷
if ($question['uid'] != $this->cfg_ml->M_ID && $this->cfg_ml->isAdmin != 1) {
ShowMsg('非法操作,請返回', '-1');
exit;
} else {
if ($question['expiredtime'] < $GLOBALS['cfg_ask_timestamp'] && $this->cfg_ml->isAdmin != 1) {
ShowMsg('問題已經過期', '-1');
exit;
} else {
if ($question['status'] == 1 && $this->cfg_ml->isAdmin != 1) {
ShowMsg('問題已經解決,不能被修改!', '-1');
exit;
}
}
}
//檢查問題名稱
if ($data['title'] == '') {
ShowMsg('問題名稱不能為空');
exit;
} else {
if (strlen($data['title']) > 80) {
ShowMsg('問題不能大於80字節');
exit;
} else {
if (strlen($data['title']) < 8) {
ShowMsg('問題不能小於8字節');
exit;
}
}
}
//檢查問題內容
if (empty($data['content'])) {
ShowMsg('問題說明內容不能為空!');
exit;
}
//檢查驗證碼
if (preg_match("#7#", $GLOBALS['safe_gdopen'])) {
$svali = GetCkVdValue();
if (strtolower($data['vdcode']) != $svali || $svali == '') {
ResetVdValue();
ShowMsg('驗證碼錯誤!', '-1');
exit;
}
}
//檢查驗證問題
$faqkey = isset($data['faqkey']) && is_numeric($data['faqkey']) ? $data['faqkey'] : 0;
if ($GLOBALS['gdfaq_ask'] == 'Y') {
global $safefaqs;
if ($safefaqs[$faqkey]['answer'] != $data['safeanswer'] || $data['safeanswer'] == '') {
ShowMsg('驗證問題答案錯誤', '-1');
exit;
}
}
$data['title'] = preg_replace("#{$GLOBALS['cfg_replacestr']}#", "***", HtmlReplace($data['title'], 1));
$data['content'] = preg_replace("#{$GLOBALS['cfg_replacestr']}#", "***", HtmlReplace($data['content'], -1));
//保存修改問題
$set = "title = '{$data['title']}',content = '{$data['content']}'";
$wheresql = "id ='{$data['askaid']}'";
$rs = $this->question->update_ask($set, $wheresql);
if ($rs) {
//保存附加信息
if ($addition == 1) {
$this->question->update_additions($addi, $data['askaid']);
}
clearmyaddon($data['askaid'], $data['title']);
ShowMsg("編輯成功!", "?ct=question&askaid=" . $data['askaid']);
exit;
} else {
ShowMsg("編輯失敗!", "?ct=question&askaid=" . $data['askaid']);
exit;
}
}