//留言内容处理
if(isset($action) and $action=='add')
{
if(empty($nickname) or
empty($content))
{
header('location:help.php?id=45');
exit();
}
$r = $dosql->GetOne("SELECT Max(orderid) AS orderid FROM `#@__message`");
$orderid = (empty($r['orderid']) ? 1 : ($r['orderid'] + 1));
$nickname = htmlspecialchars($nickname);
$contact = htmlspecialchars($contact);
$content = htmlspecialchars($content);
$posttime = GetMkTime(time());
$ip = gethostbyname($_SERVER['REMOTE_ADDR']);
$sql = "INSERT INTO `#@__message` (siteid, nickname, contact, content, orderid, posttime, htop, rtop, checkinfo, ip) VALUES (1, '$nickname', '$contact', '$content', '$orderid', '$posttime', '', '', 'false', '$ip')";
if($dosql->ExecNoneQuery($sql))
{
ShowMsg('Leave a message, thank you for your support!','help.php?id=45');
exit();
}
}
?>