<?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.'/users/session.user.php');

//** CHECK IF ADVERTISER IS ON or OFF **//
if ( ADVERTISER != 'ON' ) { header ( 'Location: '.HTTP_SERVER_WEBSITE.'dashboard' ); exit; }
//** END CHECK **//

$USER_ID	=	$_SESSION[USER_SESSION]['0']['user_id'];


$view->profile = $db->Query("SELECT `adv_profile_deposits`, `adv_profile_spent`, `adv_profile_campaigns`, `adv_profile_ads` FROM advertisers_profiles where adv_profile_user_id=?","i",$USER_ID);


$view->campaigns = $db->Query("SELECT `adv_campaign_title`, `adv_campaign_daily_budget`, `adv_campaign_daily_spent`, `acs_impressions`, `acs_clicks`, `acs_money_spent` FROM advertisers_campaigns left join advertisers_campaigns_statistics on advertisers_campaigns_statistics.acs_campaign_id = advertisers_campaigns.adv_campaign_id where adv_campaign_user_id=?","i",$USER_ID);










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

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

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

echo $view->render(DIR_TEMPLATE.WEBSITE_TEMPLATE.'/plugins/advertiser/advertiser.php');
?>