<?php
require_once('_approot.php');	

$code=$_POST["code"];
$id=$_POST["id"];
$comment=$_POST["comment"];


if(strtolower($code)!=strtolower($_SESSION['code'])){
	echo "e";
}else{
	$sql = sprintf("INSERT INTO ls_comments (cmtContent, proID) VALUES (%s,%s)",
		GetSQLValueString($comment, "text"),
		GetSQLValueString($id, "int")
	);
	if($opendb->query($sql)){
		echo 1;
		}else{
		echo 0;	
		}
}

?>