【www.gdgbn.com--留言】
//php mysql留言板代码
$tp_time = $other->shortTime();
if ($_POST["tp_nam"] != "") {
//-------添加开始-------------
$tp_name = $_POST["tp_nam"];
$tp_contents = $_POST["message"];
$at_id = $_POST["at_id"];
if (!isset($_POST["chkkd"])) {
exit();
}
if ($_POST["chkkd"] == $_SESSION["CodeNum"]) {
$_SESSION["CodeNum"] = "";
$res = $tpEdit->tpInsert($tp_name, $tp_contents, $tp_time, $at_id, $col_id, 0, 0);
} else {
echo "<script> alert("验证码输入错误 ");window.location.href="www.111cn.net";</script>";
}
//-----------添加结束-----------
if ($res == 1) {
echo "<script>alert("操作成功!");window.close();</script>";
exit();
} else {
echo "<script>alert("请勿重复发帖,五分钟后再来!");window.close();</script>";
}
}
?>