<?php
/* Nulled by Wizzywig */
/***********تعريب***********/
/**          saher        **/
/**  منتديات شباب وصبايا  **/
/**   www.shababtop.com   **/
/**  saher1986@live.com   **/
/***************************/

// ########################## INCLUDE BACK-END ###########################
include_once ("../config.php");
include_once ("../cache/data_admin_options.php");
include_once ("./functions_send.php");

// ########################### GET POST DATA #############################
$userid 	= $_POST['userid'];
$to 		= $_POST['to'];
$message 	= $_POST['message'];

// ######################### START POST MESSAGE ##########################
if (!empty($_POST['to']) && !empty($_POST['message'])) {

	if ($userid != '') {
		$sql = ("INSERT INTO arrowchat (arrowchat.from,arrowchat.to,arrowchat.message,arrowchat.sent,arrowchat.read) 
			VALUES ('".mysql_real_escape_string($userid)."', '".mysql_real_escape_string($to)."',\"".mysql_real_escape_string(sanitize($message))."\",'".time()."',0)");
		mysql_query($sql);

		echo mysql_insert_id();
		exit(0);
	}

}

?>