Esempio n. 1
0
<?php

$date = date("Ymd");
$banner_promo_show = false;
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/banner_promo.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/kwords.php";
$ban_promo = new banner_promo();
$ban_promo->setType($ban_promo->getActiveBanner(), 1);
if (($no_banner != 1 || $no_banner != true) && $date >= date('Ymd', strtotime($ban_promo->info['from_date'])) && $date <= date('Ymd', strtotime($ban_promo->info['to_date']))) {
    $banner_promo_show = false;
    $banner_promo_type_ban = $ban_promo->info['type_ban'];
    $banner_promo_img = $ban_promo->info['name_img'];
    $banner_promo_code = $ban_promo->info['code_text'];
    $banner_promo_image_style = $ban_promo->info['img_style'] != "" ? 'style="' . $ban_promo->info['img_style'] . '"' : '';
    $banner_promo_title = htmlspecialchars(stripslashes($ban_promo->info['img_title']));
    $banner_promo_text = htmlspecialchars(stripslashes($ban_promo->info['linktext']));
    $banner_promo_link_style = htmlspecialchars(stripslashes($ban_promo->info['link_style']));
    $banner_promo_type = intval($ban_promo->info['id']);
    $banner_link = $ban_promo->info['banner_link'];
    $ban_promo->writeViewStat();
    if ($ban_promo->info['page_target'] == '0|0' || $ban_promo->info['page_target'] == $g_page_id) {
        $banner_promo_show = true;
    }
}
// Типовые услуги - главная страница для неавторизованных и заказчиков
if (get_uid(false) == 0 || is_emp()) {
    $projects_url = '/projects/';
    $projects_active = $grey_main && $kind != 8 && $kind != 2;
    $tservice_url = '/';
    $tservice_active = $_SERVER['REQUEST_URI'] == '/' || preg_match("#^/tu/#", $_SERVER["REQUEST_URI"], $m);
} else {
Esempio n. 2
0
<?php

define('IS_ACCESS_PAGE', 1);
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/stdf.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/banner_promo.php';
session_start();
if (!get_uid(false)) {
    include '../403.php';
    exit;
}
//просмотр информации о статистике баннера
if (isset($_GET['type'])) {
    $type = __paramInit('int', 'type');
    $bpromo = new banner_promo();
    $access = $bpromo->isAccess($type);
    $type = $bpromo->setType(intval($type), true);
    if ($type > 0 && ($access || hasPermissions('advstat') || hasPermissions('adm'))) {
        $count = $bpromo->getCountStat();
        $stats = $bpromo->getStat();
        $banner = $bpromo->info;
        $content = 'inner_index.php';
    } else {
        include '../403.php';
        exit;
    }
} else {
    include '../403.php';
    exit;
}
$content = 'inner_index.php';
include $_SERVER['DOCUMENT_ROOT'] . '/template2.php';
Esempio n. 3
0
if (isset($_GET['type'])) {
    $type = $bpromo->setType(intval($_GET['type']), true);
    if ($type > 0) {
        $inner_page = "inner_index.php";
    } else {
        include "../../404.php";
        exit;
    }
} else {
    $bpromo = new banner_promo();
    $banners = $bpromo->getInfoBanners();
}
//редактирование
if (isset($_GET['edit'])) {
    $edit = intval($_GET['edit']);
    $bpromo->setType($edit, true);
    $advChecked = '';
    $activeChecked = '';
    if ($bpromo->info['advertising'] == 't') {
        $advChecked = 'checked="checked"';
    }
    if ($bpromo->info['is_activity'] == 't') {
        $activeChecked = 'checked="checked"';
    }
    if ($bpromo->info['is_pro'][0] == '1') {
        $isPROChecked = 'checked="checked"';
    }
    if ($bpromo->info['is_pro'][1] == '1') {
        $isNotPROChecked = 'checked="checked"';
    }
    if ($bpromo->info['is_role'][0] == '1') {