示例#1
0
<?php

G::metaTags();
$Page = new Page();
$Page->PagesList("menu");
$tpl->Assign('list_menu', $Page->list);
if (isset($_SESSION['member']['promo_code']) && $_SESSION['member']['promo_code'] != '') {
    header('Location: ' . _base_url . '/cabinet/');
}
unset($parsed_res);
$page = $Page->PagesListByType('main');
// if(!empty($page)){
$tpl->Assign('data', !empty($page) ? $page[0] : false);
// }
unset($Page, $page);
$products = $Products->GetRandomList();
if (isset($products) && !empty($products)) {
    foreach ($products as &$p) {
        $p['images'] = $Products->GetPhotoById($p['id_product']);
    }
    $tpl->Assign('list', $products);
}
unset($products);
$header = 'Главная';
$ii = count($GLOBALS['IERA_LINKS']);
$GLOBALS['IERA_LINKS'][$ii]['title'] = $header;
$GLOBALS['IERA_LINKS'][$ii++]['url'] = _base_url;
$products_list = $tpl->Parse($GLOBALS['PATH_tpl_global'] . 'products_list.tpl');
$tpl->Assign('products_list', $products_list);
$parsed_res = array('issuccess' => true, 'html' => $tpl->Parse($GLOBALS['PATH_tpl'] . 'cp_page.tpl'));
if (true == $parsed_res['issuccess']) {
示例#2
0
        unset($_SESSION['search']);
        unset($_SESSION['filters']);
    }
} else {
    unset($_SESSION['search']);
    unset($_SESSION['filters']);
}
// Получаем строку поискового запроса ======================
if (isset($_POST['query']) && !isset($_GET['query']) && $_POST['query'] != '') {
    $query = preg_replace('/[()*|,.*"^&@#$%\\/]/', ' ', $_POST['query']);
    $query = trim($query);
} elseif (isset($_GET['query']) && !isset($_POST['query']) && $_GET['query'] != '') {
    $query = preg_replace('/[()*|,.*"^&@#$%]/', ' ', $_GET['query']);
    $query = trim($query);
}
G::metaTags(array('page_title' => $header . ' по запросу "' . isset($query) . '"'));
$tpl->Assign('header', $header . ' по запросу "' . isset($query) . '"');
if (isset($_SESSION['search']['query']) && isset($query) && $query != '' && $query != $_SESSION['search']['query']) {
    $_SESSION['search']['newsearch'] = 1;
    $_POST['dropfilters'] = 1;
} else {
    $_SESSION['search']['newsearch'] = 0;
}
if (isset($_SESSION['search']['query']) && $_SESSION['search']['query'] != '' && (!isset($query) || $query == '')) {
    $query = $_SESSION['search']['query'];
} elseif (isset($query) && $query != '' || !isset($_SESSION['search']['query']) || $_SESSION['search']['query'] == '') {
    if (isset($query)) {
        $_SESSION['search']['query'] = $query;
    } else {
        $_SESSION['search']['query'] = $query = '';
    }
示例#3
0
if (!isset($GLOBALS['REQAR'][1]) || !is_numeric($GLOBALS['REQAR'][1])) {
    header('Location: /404/');
    exit;
}
$id_order = $GLOBALS['REQAR'][1];
if (isset($GLOBALS['REQAR'][2]) && $GLOBALS['REQAR'][2] == "pret") {
    $tpl->Assign('show_pretense', true);
} else {
    $tpl->Assign('show_pretense', false);
}
unset($parsed_res);
$Page = new Page();
$Page->PagesList();
$tpl->Assign('list_menu', $Page->list);
$header = 'Просмотр заказа';
G::metaTags(array('page_title' => $header));
$GLOBALS['IERA_LINKS'][] = array('title' => "Личный кабинет", 'url' => _base_url . '/cabinet/');
$GLOBALS['IERA_LINKS'][] = array('title' => $header, 'url' => _base_url . '/customer_order/' . $id_order);
$User = new Users();
$User->SetUser($_SESSION['member']);
if ($User->fields['gid'] == _ACL_CUSTOMER_ or $User->fields['gid'] == _ACL_DILER_ or $User->fields['gid'] == _ACL_CONTRAGENT_) {
    $tpl->Assign('gid', $User->fields['gid']);
    $Order = new Orders();
    $Order->SetFieldsById($id_order);
    $tpl->Assign('order', $Order->fields);
    $header .= ' № ' . $Order->fields['id_order'] . ' <p class="subtext"> от ' . date('d.m.Y', $Order->fields['creation_date']);
    if ($User->fields['gid'] == _ACL_CONTRAGENT_ && $Order->fields['target_date'] != NULL) {
        $header .= ' на ' . date('d.m.Y', $Order->fields['target_date']);
    }
    $header .= '</p>';
    if (isset($_POST['smb_pretense'])) {
示例#4
0
<?php

$Page = new Page();
$Page->PagesList();
$tpl->Assign('list_menu', $Page->list);
unset($parsed_res);
if (isset($GLOBALS['Rewrite'])) {
    if (!$Page->SetFieldsByRewrite($GLOBALS['Rewrite'])) {
        header('Location: ' . _base_url . '/404/');
        exit;
    }
    $page = $Page->fields;
    G::metaTags($page);
    $header = $page['title'];
    $tpl->Assign('header', $header);
    $tpl->Assign('data', $page);
    $tpl->Assign('indexation', $page['indexation']);
    $title = explode(' | ', $header);
    $GLOBALS['IERA_LINKS'][] = array('title' => $title[0], 'descr' => $header, 'url' => Link::Custom('page', $page['translit']));
    $template = 'cp_page.tpl';
} else {
    $header = 'Статьи оптового торгового центра xt.ua';
    $tpl->Assign('header', $header);
    $GLOBALS['IERA_LINKS'][] = array('title' => $header, 'descr' => 'Подборка самых интересных статей от службы снабжения xt.ua. Все самое полезное о покупках, оптовой торговли, особенностях выбора. Здесь Вы найдете рекомендации, полезные советы от специалистов и постоянных покупателей', 'url' => Link::Custom('page'));
    if (!($pagelist = $Page->PagesListByType('katalog'))) {
        header('Location: ' . _base_url . '/404/');
        exit;
    }
    rsort($pagelist);
    $tpl->Assign('data', $pagelist);
    $template = 'cp_pages_list.tpl';
示例#5
0
<?php

header("HTTP/1.0 404 Not Found");
// header("HTTP/1.0 410 Gone");
$Page = new Page();
$Page->PagesList();
$tpl->Assign('header', '');
$tpl->Assign('list_menu', $Page->list);
// ---- center ----
G::metaTags(array('page_title' => 'Странице не найдена'));
$tpl_center .= $tpl->Parse($GLOBALS['PATH_tpl'] . 'cp_404.tpl');
示例#6
0
<?php

unset($parsed_res);
$Page = new Page();
$Page->PagesList();
$tpl->Assign('list_menu', $Page->list);
$id_category = (int) $GLOBALS['CURRENT_ID_CATEGORY'];
// Настройка панели действий ===============================
$list_controls = array('layout', 'sorting', 'filtering');
$tpl->Assign('list_controls', $list_controls);
// =========================================================
$dbtree->SetFieldsById($id_category);
$category = $dbtree->fields;
G::metaTags($category);
$category['subcats'] = $Products->GetSubCatsTop($id_category);
$tpl->Assign('category', $category);
$tpl->Assign('indexation', $category['indexation']);
$tpl->Assign('header', $category['name']);
// если отправили комментарий
if (isset($_POST['com_qtn'])) {
    $put = $_POST['id_product'];
    $text = nl2br($_POST['feedback_text'], false);
    $text = stripslashes($text);
    $author = 07;
    $author_name = $_SESSION['member']['id_user'];
    $authors_email = $_SESSION['member']['email'];
    $Products->SubmitProductComment($text, $author, $author_name, $authors_email, $put);
    header('Location: ' . $_SERVER['REQUEST_URI']);
    exit;
}
if (isset($_POST['available_today'])) {
示例#7
0
if (!isset($GLOBALS['Rewrite']) || !$Products->SetFieldsByRewrite($GLOBALS['Rewrite'], 1)) {
    header('Location: ' . Link::Custom('404'));
    exit;
}
$Page = new Page();
$Page->PagesList();
$tpl->Assign('list_menu', $Page->list);
unset($parsed_res);
$User = new Users();
if (isset($_SESSION['member'])) {
    $User->SetUser($_SESSION['member']);
}
$tpl->Assign('User', $User->fields['name']);
$product = $Products->fields;
G::metaTags($product);
$id_product = $product['id_product'];
$product['specifications'] = $Products->GetSpecificationList($id_product);
$product['images'] = $Products->GetPhotoById($id_product);
$product['videos'] = $Products->GetVideoById($id_product);
$GLOBALS['prod_title'] = $product['name'];
$GLOBALS['product_canonical'] = Link::Product($product['translit']);
/* product comments ======================================== */
$res = $Products->GetComentByProductId($id_product);
$tpl->Assign('comment', $res);
/* product comments ======================================== */
/* product rating ========================================== */
// $rating = $Products->GetProductRating($id_product);
// $tpl->Assign('rating', $rating);
/* product rating ========================================== */
$tpl->Assign('data', $Page->fields);