<?php 
//引入语言包
	$mp_langpackage=new mypalslp;
//引入小纸条模块功能
	require("foundation/adata_count.php");
	require("foundation/module_scrip.php");
//变量区
  $user_id=get_sess_userid();
  $user_name=get_sess_username();
  $userico=get_sess_userico();
  $req_id=short_check(get_argg('req_id'));
  $req_user_id=short_check(get_argg('req_user_id'));
//数据表定义区
	$t_users=$tablePreStr."users";
	$t_mypals=$tablePreStr."pals_mine";
	$t_pals_request=$tablePreStr."pals_request";
	$dbo=new dbex();
//定义写操作
	dbtarget('w',$dbServs);
	$sql="update $t_mypals set accepted=1 where pals_id=$user_id and user_id=$req_user_id";
	if($dbo->exeUpdate($sql)){
		update_count($dbo,$req_user_id,"pals_num",1);
	}
	$sql="delete from $t_pals_request where user_id=$user_id and id=$req_id";
	$dbo->exeUpdate($sql);
	send_scrip($dbo,$user_name,$user_id,$userico,$req_user_id,1);
//刷新提醒页面
  echo "<script type='text/javascript'>
  parent.frames['remind'].location.reload();
  </script>";
//缓存功能区
	require($webRoot.$baseLibsPath."action/mypals_update.action.cache.php");
	action_return(0,'',"");				
?>