コード例 #1
0
ファイル: integration.php プロジェクト: liulingfu/madserve
$current_section = 'inventory';
require_once '../../init.php';
// Required files
require_once MAD_PATH . '/www/cp/auth.php';
require_once MAD_PATH . '/functions/adminredirect.php';
require_once MAD_PATH . '/www/cp/restricted.php';
require_once MAD_PATH . '/www/cp/admin_functions.php';
if (!check_permission('inventory', $user_detail['user_id'])) {
    exit;
}
if (is_numeric($_GET['zone']) && !is_numeric($_GET['publication'])) {
    $zone_detail = get_zone_detail($_GET['zone']);
    $_GET['publication'] = $zone_detail['publication_id'];
}
if (is_numeric($_GET['zone']) && is_numeric($_GET['publication'])) {
    $zone_detail = get_zone_detail($_GET['zone']);
    if ($zone_detail['publication_id'] != $_GET['publication']) {
        unset($_GET['zone']);
    } else {
        $integration_active = 1;
        global $publication_detail;
        $publication_detail = get_publication_detail($zone_detail['publication_id']);
    }
}
require_once MAD_PATH . '/www/cp/templates/header.tpl.php';
?>

<div id="content">		
		
		<div id="contentHeader">
			<h1>SDK / Code Snippet Integration</h1>
コード例 #2
0
ファイル: edit_zone.php プロジェクト: liulingfu/madserve
}
if (!check_permission_simple('modify_publications', $user_detail['user_id'])) {
    exit;
}
global $current_action;
$current_action = 'edit';
if (isset($_POST['update'])) {
    if (do_edit('placement', $_POST, $_GET['id'])) {
        $edited = 1;
        MAD_Admin_Redirect::redirect('edit_zone.php?edited=1&id=' . $_GET['id'] . '');
    } else {
        $edited = 2;
    }
}
if ($edited != 2) {
    $editdata = get_zone_detail($_GET['id']);
}
require_once MAD_PATH . '/www/cp/templates/header.tpl.php';
?>

<div id="content">		
		
		<div id="contentHeader">
			<h1>Edit Placement</h1>
		</div> <!-- #contentHeader -->	
		
		<div class="container">
			
				
			<div class="grid-24">
			
コード例 #3
0
function rep_sortmetric($type, $result)
{
    switch ($type) {
        case 1:
            if (is_numeric($result['campaign_id'])) {
                $campaign_detail = get_campaign_detail($result['campaign_id']);
                $identifier = $campaign_detail['campaign_name'];
            } else {
                $identifier = 'No Campaign / BackFill';
            }
            break;
        case 2:
            $creative_detail = get_creative_detail($result['creative_id']);
            $identifier = $creative_detail['adv_name'];
            break;
        case 3:
            $publication_detail = get_publication_detail($result['publication_id']);
            $identifier = $publication_detail['inv_name'];
            break;
        case 4:
            $zone_detail = get_zone_detail($result['zone_id']);
            $identifier = $zone_detail['zone_name'];
            break;
        case 5:
            $identifier = $result['MONTH(date)'] . '-' . $result['YEAR(date)'];
            break;
        case 6:
            $identifier = $result['MONTH(date)'] . '-' . $result['DAY(date)'] . '-' . $result['YEAR(date)'];
            break;
        case 7:
            $network_detail = get_network_detail($result['network_id']);
            $identifier = $network_detail['network_name'];
            break;
    }
    return $identifier;
}