<?php


require_once( "_inc.php" );
util::auth( );
$adId = !empty( $_GET['aId'] ) ? trim( $_GET['aId'] ) : "";
$backUrl = !empty( $_GET['back'] ) ? trim( $_GET['back'] ) : base64_encode( "ad_list.php" );
if ( empty( $adId ) )
{
	$tpl->assign( "msg", "缺少参数" );
	$tpl->display( "_msg.tpl" );
	exit( );
}
$sql = "DELETE FROM ".$gDb['prefix'].( "ads WHERE (f_id='".$adId."')" );
$db->query( $sql );
$tpl->assign( "msg", "删除成功。" );
$tpl->assign( "backUrl", base64_decode( $backUrl ) );
$tpl->display( "_msg.tpl" );
?>
