<?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 PUBLISHER IS ON or OFF **//
if ( PUBLISHER != 'ON' ) { header ( 'Location: '.HTTP_SERVER_WEBSITE.'dashboard' ); exit; }
//** END CHECK **//


$USER_ID	=	$_SESSION[USER_SESSION]['0']['user_id'];
$ID			=	$prepare->sanitize($_GET['id'],'input');

if ( !empty ( $ID ) ) {

	$view->channel	=	$campaign = $db->Query("SELECT `pc_id`, `pc_title`, `pc_details`, `pc_domain` FROM publisher_channels where pc_user_id=? and pc_id=?","ii",$USER_ID,$ID);

}

if ( empty( $campaign ) && !empty( $ID ) ) { 
	header ( 'Location: '.HTTP_SERVER_WEBSITE.'dashboard/publisher/channels' ); exit;
}








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

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

$view->publisher_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/publisher/channel.php');
?>