<?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');

$USER_ID	=	$_SESSION[USER_SESSION]['0']['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);


$view->channels = $db->Query("SELECT `pc_title`, `pc_details`, `pc_domain`, `pcs_impressions`, `pcs_clicks`, `pcs_money` FROM publisher_channels left join publisher_channels_statistics on publisher_channels_statistics.pcs_channel_id = publisher_channels.pc_id where pc_user_id=?","i",$USER_ID);







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

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

$view->menu = $view->render(DIR_TEMPLATE.WEBSITE_TEMPLATE.'/plugins/users/dashboard-menu.php');
$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/users/dashboard.php');
?>