<?php
	require("session_check.php");	
	require("../foundation/aintegral.php");

	//语言包引入
	$m_langpackage=new modulelp;
	
	//变量取得
	$recommend_id=short_check(get_argg('recom_id'));
	$user_id=short_check(get_argg('uid'));
	
	//数据表定义区
	$t_recommend=$tablePreStr."recommend";
	$t_users=$tablePreStr."users";

	$dbo = new dbex;
	//读写分离定义函数
	dbtarget('w',$dbServs);
	$sql="select show_ico from $t_recommend where recommend_id=$recommend_id";
	$recom=$dbo->getRow($sql);
	unlink("../".$recom['show_ico']);
	//删除评论
	$sql="delete from $t_recommend where recommend_id=$recommend_id";
	$sql1="update $t_users set is_recommend=0 where user_id=$user_id";
	if($dbo -> exeUpdate($sql) && $dbo->exeUpdate($sql1)){
		echo $m_langpackage->m_del_suc;
	}else{
		echo $m_langpackage->m_del_lose;
	}
?>
