<?php
/**
 * @package		Ad Platform
 * @author		Uta Marian - Alexandru ( -uMarian- )
 * @license		http://codecanyon.net/licenses
 * @link		http://www.uta-marian.com
 * @version		Version 1.0
 */
require_once(dirname(__FILE__).'/../../config.php');
require_once(DIR_SYSTEM.'/admin/session.admin.php');




$ID			=	$prepare->sanitize($_GET['ad'],'input');
$view->ad	=	$ad = $db->Query("SELECT `aau_id`, `aau_campaign`, `aau_user_id`, `aau_type`, `aau_size`, `aau_target_device`, `aau_target_country`, `aau_language_id`, `aau_adult`, `aau_title`, `aau_summary`, `aau_summary_2`, `aau_url`, `aau_target_url`, `aau_file`, `aau_status` FROM advertisers_ad_units where aau_id=?","i",$ID);


$USER_ID	=	$ad['0']['aau_user_id'];

$view->profile = $db->Query("SELECT `user_id`, `user_email`, `up_first_name`, `up_last_name`, `up_phone` from users left join users_profiles on users_profiles.up_user_id = users.user_id where user_id=? limit 1","i",$USER_ID);




$view->ky	=	$db->Query("SELECT `aauk_id`, `aauk_ad_id`, `aauk_keyword`, `aauk_price`, `aauk_status` FROM advertisers_ad_units_keywords where aauk_ad_id=?","i",$ID);








//**DEFINE CUSTOM CSS/JS FILLES**//
$view->customCode = '<link href="'.HTTP_SERVER_WEBSITE.'templates/'.ADMIN_TEMPLATE.'/assets/css/dashboard.css" rel="stylesheet">';

/* set page title */
$view->title = $LANG["WBS_ADMIN_ADS_DETAILS_SEO"];
$view->description = $LANG["WBS_ADMIN_ADS_DETAILS_SEO"];
$view->keywords = $LANG["WBS_ADMIN_ADS_DETAILS_SEO"];

$view->header = $view->render(DIR_TEMPLATE.ADMIN_TEMPLATE.'/header.php');
$view->footer = $view->render(DIR_TEMPLATE.ADMIN_TEMPLATE.'/footer.php');

echo $view->render(DIR_TEMPLATE.ADMIN_TEMPLATE.'/ads/details.php');
?>