member_guestbook_action.php

来自「强大的PHP内容管理系统尽量不要让站长把时间都花费在为您修正说明上。压缩包解压」· PHP 代码 · 共 39 行

PHP
39
字号
<?php 
require_once(dirname(__FILE__)."/config_space.php");
require_once(dirname(__FILE__)."/../include/inc_memberlogin.php");
$cfg_ml = new MemberLogin(); 

$svali = GetCkVdValue();
if(strtolower($vdcode)!=$svali || $svali==""){
  ShowMsg("验证码错误!","-1");
  exit();
}

$uidnum = trim(ereg_replace("[^0-9]","",$uidnum));
if(empty($uidnum)){
	ShowMsg("参数错误!","-1");
  exit();
}

if(strlen($title)<2||strlen($msg)<10){
	ShowMsg("你的标题不合法或留言内容太短!","-1");
  exit();
}

$title = cn_substr(html2text($title),60);
$msg = cn_substr(stripslashes($msg),2048);
if($cfg_ml->M_UserName!="" && $cfg_ml->M_ID!=$uidnum) $gid = $cfg_ml->M_UserName;
else  $gid = '';

$inquery = "
   INSERT INTO #@__member_guestbook(mid,gid,title,msg,uname,email,qq,tel,ip,dtime)
   VALUES ('$uidnum','$gid','$title','$msg','$uname','$email','$qq','$tel','".GetIP()."',".mytime().");
";
$dsql = new DedeSql(false);
$dsql->ExecuteNoneQuery($inquery);
$dsql->Close();

ShowMsg("成功提交你的留言!","-1");
exit();

?>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?