Forum Moderators: coopster
function comment_publish() {
global $client, $config;
if (!$client['id']) die('<div class="ferror">login please</div>');
if ( !preg_match("/^[0-9a-z]+$/i",$_POST['target_id']) ) die('no target id');
if (strlen($_POST['message'])<2) die('<div class="ferror">message is too short</div>');
limit_posting(0,1);
comment_insert($_POST['target_id'],$_POST['message']);// this code wich insert in datapage
record_this_posting($_POST['message']);
$arr = array(
'avatar'=>$client['avatar'],'message'=>stripslashes($_POST['message']),'username'=>$client['uname'],'created'=>time()
);
echo comment_display($arr); // this is the Temporary post untill refresh the page
ss_update();
exit;
}