当前位置: 首页>>代码示例>>PHP>>正文


PHP G::metaTags方法代码示例

本文整理汇总了PHP中G::metaTags方法的典型用法代码示例。如果您正苦于以下问题:PHP G::metaTags方法的具体用法?PHP G::metaTags怎么用?PHP G::metaTags使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在G的用法示例。


在下文中一共展示了G::metaTags方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Page

<?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']) {
开发者ID:Arikito,项目名称:webking.xt,代码行数:31,代码来源:main.php

示例2: unset

        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 = '';
    }
开发者ID:Arikito,项目名称:webking.xt,代码行数:31,代码来源:search.php

示例3: header

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'])) {
开发者ID:Arikito,项目名称:webking.xt,代码行数:31,代码来源:customer_order.php

示例4: Page

<?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';
开发者ID:Arikito,项目名称:webking.xt,代码行数:31,代码来源:page.php

示例5: header

<?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');
开发者ID:Arikito,项目名称:webking.xt,代码行数:11,代码来源:404.php

示例6: unset

<?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'])) {
开发者ID:Arikito,项目名称:webking.xt,代码行数:31,代码来源:products.php

示例7: header

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);
开发者ID:Arikito,项目名称:webking.xt,代码行数:30,代码来源:product.php


注:本文中的G::metaTags方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。