<?php
include(dirname(__file__)."/../includes.php");
include(dirname(__file__)."/../../foundation/adata_count.php");

function scrip_send($sender,$title,$content,$to_id){
	global $tablePreStr;
	$uid=get_sess_userid();
	$uico=get_sess_userico();
	$t_scrip=$tablePreStr."msg_inbox";
	$dbo=new dbex;
  dbplugin('w');
	$sql="insert into $t_scrip (mess_title,mess_content,from_user,from_user_ico,user_id,add_time,from_user_id)"
	                    ."value('$title','$content','$sendor','$uico',$to_id,NOW(),$uid)";
  $dbo->exeUpdate($sql);
	update_count($dbo,$to_id,"scrip_num",1);
}
?>