<?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();  
  $req_id=short_check(get_argg('req_id'));
  $userico=get_sess_userico();

//数据表定义区
	$t_mypals=$tablePreStr."pals_mine";
	$t_pals_request=$tablePreStr."pals_request";

//定义读操作
	dbtarget('r',$dbServs);	
	$dbo=new dbex();

	$sql="select * from $t_pals_request where user_id=$user_id and id=$req_id";
	$req_row=$dbo->getRow($sql);

  $res_uid=$req_row["req_id"];
  $res_uname=$req_row["req_name"];
  $res_usex=$req_row["req_sex"];
  $res_rpid=$req_row["from_id"];

	//定义写操作
	dbtarget('w',$dbServs);
	
	$sql="delete from $t_mypals where user_id=$res_uid and id=$res_rpid";
	$dbo->exeUpdate($sql);
	
	$sql="delete from $t_pals_request where id=$req_id and user_id=$user_id";
	$dbo->exeUpdate($sql);
	
	send_scrip($dbo,$user_name,$user_id,$userico,$res_uid,2);       

//刷新提醒页面
 echo "<script type='text/javascript'>
  parent.frames['remind'].location.reload();
  </script>";       
   			
	action_return(0,'',"");
?>

