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




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


$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->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);








//**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_USERS_PROFILE_SEO"];
$view->description = $LANG["WBS_ADMIN_USERS_PROFILE_SEO"];
$view->keywords = $LANG["WBS_ADMIN_USERS_PROFILE_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.'/users/profile.php');
?>	