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


PHP Check::ContCategoryViews方法代码示例

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


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

示例1: filter_input

<?php

/**
 * ****************************************
 * ***** Pagina de redirecionamento *******
 * **************************************** 
 */
/**
 * Executa o redirecionamento para os links e faz a contagem de views
 */
echo "redirecionamento...<br>";
$link = filter_input(INPUT_GET, "url", FILTER_DEFAULT);
$link = explode("/", $link);
if (!empty($link[1]) && $link[1] == "post") {
    $post_id = $link[2];
    $url = Check::ContPostViews($post_id);
    var_dump($url);
    header("Location: {$url}");
} elseif (!empty($link[1]) && $link[1] == "categoria") {
    $category_id = $link[2];
    Check::ContCategoryViews($category_id);
}
echo "<div class='well'><h1>Se estiver vendo esta mensagem, <small>algo deu errado! entre em contato com o CPD.</small></h1></div>";
开发者ID:adrianosilvareis,项目名称:intranet,代码行数:23,代码来源:url.php

示例2: getSeo

 private function getSeo()
 {
     switch ($this->File) {
         //SEO:: Indicadores
         case 'indicadores':
             $this->Data = ['Indicadores de qualidade - ' . SITENAME . ' - ' . SITEDESC, SITEDESC, HOME, INCLUDE_PATH . '/images/site.png'];
             break;
         case 'profile':
             $this->Data = ['Dados cadastrais - ' . SITENAME . ' - ' . SITEDESC, SITEDESC, HOME, INCLUDE_PATH . '/images/site.png'];
             break;
             //SEO:: ARTIGO
         //SEO:: ARTIGO
         case 'artigo':
             $Admin = isset($_SESSION['userlogin']['user_level']) && $_SESSION['userlogin']['user_level'] == 3 ? true : false;
             $Check = $Admin ? '' : 'post_status = 1 AND ';
             $ReadSeo = new WsPosts();
             $ReadSeo->setPost_name($this->Link);
             $ReadSeo->Execute()->Query("{$Check} #post_name#");
             if (!$ReadSeo->Execute()->getResult()) {
                 $this->seoData = null;
                 $this->seoTags = null;
             } else {
                 extract((array) $ReadSeo->Execute()->getResult()[0]);
                 $this->seoData = (array) $ReadSeo->Execute()->getResult()[0];
                 $this->Data = [$post_title . ' - ' . SITENAME, $post_content, HOME . "/artigo/{$post_name}", HOME . "/uploads/{$post_cover}"];
                 //post:: conta viws do post
                 Check::ContPostViews($post_id);
             }
             break;
             //SEO:: NOTICIAS
         //SEO:: NOTICIAS
         case 'noticias':
             $ReadSeo = new WsPosts();
             $ReadSeo->setPost_type($this->Link);
             $ReadSeo->Execute()->Query("#post_type#");
             if (!$ReadSeo->Execute()->getResult()) {
                 $this->seoData = null;
                 $this->seoTags = null;
             } else {
                 extract((array) $ReadSeo->Execute()->getResult()[0]);
                 $this->seoData = (array) $ReadSeo->Execute()->getResult();
                 $this->Data = [$post_type . ' - ' . SITENAME, $post_content, HOME . "/noticias/{$post_type}", INCLUDE_PATH . '/images/site.png'];
             }
             break;
             //SEO:: CATEGORIA
         //SEO:: CATEGORIA
         case 'categoria':
             $ReadSeo = new WsCategories();
             $ReadSeo->setCategory_name($this->Link);
             $ReadSeo->Execute()->Query("#category_name#");
             if (!$ReadSeo->Execute()->getResult()) {
                 $this->seoData = null;
                 $this->seoTags = null;
             } else {
                 extract((array) $ReadSeo->Execute()->getResult()[0]);
                 $this->seoData = (array) $ReadSeo->Execute()->getResult()[0];
                 $this->Data = [$category_title . ' - ' . SITENAME, $category_content, HOME . "/categoria/{$category_name}", INCLUDE_PATH . '/images/site.png'];
                 //categories:: conta views da categoria
                 Check::ContCategoryViews($category_id);
             }
             break;
             //SEO:: Grupo
         //SEO:: Grupo
         case 'grupo':
             $ReadSeo = new WsCategories();
             $ReadSeo->setCategory_name($this->Link);
             $ReadSeo->Execute()->Query("#category_name#");
             if (!$ReadSeo->Execute()->getResult()) {
                 $this->seoData = null;
                 $this->seoTags = null;
             } else {
                 extract((array) $ReadSeo->Execute()->getResult()[0]);
                 $this->seoData = (array) $ReadSeo->Execute()->getResult()[0];
                 $this->Data = [$category_title . ' - ' . SITENAME, $category_content, HOME . "/categoria/{$category_name}", INCLUDE_PATH . '/images/site.png'];
                 //categories:: conta views da categoria
                 Check::ContCategoryViews($category_id);
             }
             break;
             //SEO:: membros
         //SEO:: membros
         case 'membros':
             $ReadSeo = new WsCategories();
             $ReadSeo->setCategory_name($this->Link);
             $ReadSeo->Execute()->Query("#category_name#");
             if (!$ReadSeo->Execute()->getResult()) {
                 $this->seoData = null;
                 $this->seoTags = null;
             } else {
                 extract((array) $ReadSeo->Execute()->getResult()[0]);
                 $this->seoData = (array) $ReadSeo->Execute()->getResult()[0];
                 $this->Data = [$category_title . ' - ' . SITENAME, $category_content, HOME . "/membros/{$category_name}", INCLUDE_PATH . '/images/site.png'];
                 //categories:: conta views da categoria
                 Check::ContCategoryViews($category_id);
             }
             break;
             //SEO::PESQUISA
         //SEO::PESQUISA
         case 'pesquisa':
             $ReadSeo = new WsPosts();
             $ReadSeo->Execute()->Query("post_status = 1 AND (post_title LIKE '%' :link '%' OR post_content LIKE '%' :link '%')", "link={$this->Link}");
//.........这里部分代码省略.........
开发者ID:adrianosilvareis,项目名称:intranet,代码行数:101,代码来源:Seo.class.php


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