<?php
require_once(dirname(__FILE__).'/../../config.php');
require_once(DIR_SYSTEM.'/admin/class.session.php');

$t	=	$prepare->sanitize( $_GET['t'], 'input');


if ( $t == 'ad-status' ) {
	$mode	=	$prepare->sanitize($_POST['mode'],'input');

	if ( $mode == 'start' ) {
			$id	=	$prepare->sanitize($_POST['id'],'input');
			$db->NoQuery("update advertisers_ad_units set aau_status=? where aau_id=?","ii",1,$id);
	}

	if ( $mode == 'stop' ) {
			$id	=	$prepare->sanitize($_POST['id'],'input');
			$db->NoQuery("update advertisers_ad_units set aau_status=? where aau_id=?","ii",3,$id);
	}

}




if ( $t == 'rmv-rpt' ) {
$id	=	$prepare->sanitize( $_POST['id'], 'input');
	$db->NoQuery("DELETE FROM reported_ads WHERE ra_ad_id=?","i",$id);
	echo $id;
}





?>