www.gusucode.com > 仿51.com的php源码 1.1 > ProcessInterface_CommentNoAjax.php

    <?php
 header   ("Cache-Control:   no-cache,   must-revalidate");     
 header   ("Pragma:   no-cache");   
?><?php
include("User/CheckLogined.php");
include("include/dbclass.php");
 
$dbc=new DbConn();
$uid=$_COOKIE["uid"];
if($_GET["action"]=="Save")
{



$f_DiaryComment_CommentObjId=$_POST["f_DiaryComment_CommentObjId"];
$f_DiaryComment_ObjTitle=$_POST["f_DiaryComment_ObjTitle"];
$f_DiaryComment_AddDate=$_POST["f_DiaryComment_AddDate"];
$Memo=$_POST["f_DiaryComment_Memo"];





$user=$_GET["user"];
$sqlck="select id from Diary where User_Account='$user' and Diary_UnixTimestamp='$f_DiaryComment_CommentObjId'";
$rs1=$dbc->getRs($sqlck);
if($rs1==null)
{
echo "<script>alert('参数不对');history.back();</script>";
exit();
}


include("hightck.php");


$sqlin="insert into DiaryComment (DiaryComment_CommentObjId,DiaryComment_ObjTitle,DiaryComment_UserName,DiaryComment_AddDate,DiaryComment_Memo,DiaryComment_Name) values ('$f_DiaryComment_CommentObjId','$f_DiaryComment_ObjTitle','$user','$f_DiaryComment_AddDate','$Memo','$uid')";
$dbc->Execute($sqlin);



echo "<script>alert('日记评论成功提交');history.back();</script>";

}
?>