include('./include/functions.php'); include('./include/zonelist.php'); include("./include/check_login.php"); $tbpost = "post_photo"; $tbreply = "reply_photo"; if(isset($_GET['postid'])){ $Username = $_SESSION['username'] ; $userid = $_SESSION['userid'] ; $postid = $_GET[postid] ; if(isset($_POST['reply'])){ include('include/getip.php'); $message = $_POST['message']; // $Username = $_SESSION['']; $errmsg = ''; $ip = Get_IP(); //lang if(trim($message) == ''){ $errmsg = 'message cannot EMPTY!'; } if($errmsg == ''){ $addreply = "INSERT INTO $tbreply ( replyid, postid, userid, Username, message, replydate, replyIP, Views, active) VALUES ('', '$postid' , '$userid' , '$Username', '".destr(strip_tags($message))."' ,'".date("Y-m-d H:i:S" ,time() +64800 )."','$ip', '0', '1')"; mysql_query($addreply) or die('Error, insert query failed' . mysql_error()); header("Location: {$siteurl}/photo/".$postid.".html"); } } ?> if(!isset($_POST['reply']) || $errmsg != ''){ ?>