本文整理汇总了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;
}
}