Example #1
0
//更新访问次数
$row = getArticleInfo($aid);
if (empty($row['id'])) {
    head404();
}
if (!empty($row['redirecturl'])) {
    head301($row['redirecturl']);
}
$prenext = GetPreNext($aid);
//获取上一条,下一条
foreach ($prenext as $k => $v) {
    $pv->Fields[$k] = $v;
}
if (is_array($row)) {
    $row['litpic'] = !empty($row['litpic']) ? $row['litpic'] : getDefaultImage();
    $row['taglook'] = GetTagsLink($row['tagword']);
    $row['description'] = !empty($row['description']) ? "<meta name=\"description\" content=\"" . $row['description'] . "\"/>" : "";
    $row['keyword'] = !empty($row['keyword']) ? "<meta name=\"keywords\" content=\"" . $row['keyword'] . "\"/>" : "";
    $row['subname'] = $row['title'];
    $row['commentnum'] = Helper_Archive::getCommentNum($row['id'], 4);
    $row['commenthomeid'] = $row['id'];
    $row['id'] = strlen($row['id']) == 1 ? "0" . $row['id'] : $row['id'];
    $row['pkname'] = get_par_value($row['kindlist'], $typeid);
    $row['yesjian'] = is_null($row['yesjian']) ? 0 : $row['yesjian'];
    $row['destid'] = array_remove_value($row['kindlist']);
    $row['pinyin'] = Helper_Archive::getDestPinyin($row['destid']);
    $row['destname'] = !empty($row['destid']) ? '[<a href="/raiders/' . $row['pinyin'] . '">' . Helper_Archive::getBelongDestName($row['kindlist']) . '</a>]' : '';
    //所属目的地
    $row['destarcnum'] = getArticleNum($row['destid']);
    $row['attrlist'] = getArticleAttrlist($row['attrid']);
    $row['summary'] = empty($row['summary']) ? cutstr_html($row['content'], 140) : $row['summary'];
Example #2
0
    $sql = "select a.* from #@__article a left join {$left_table} on (b.classid='{$attrid}' and a.id=b.aid  and b.typeid=4) {$where} order by b.isding desc,b.displayorder asc,a.modtime desc,a.addtime desc";
} else {
    $left_table = '#@__kindorderlist b';
    $sql = "select a.* from #@__article a left join {$left_table} on (b.classid='{$dest_id}' and a.id=b.aid  and b.typeid=4 ) {$where} order by b.isding desc,b.displayorder asc,a.modtime desc,a.addtime desc";
}
//SEO信息
$dest_id = empty($dest_id) ? 0 : $dest_id;
$seoarr = array();
//seo信息数组
$attr_str = str_replace('_', ',', $attrid);
$attrname = getAttName($attr_str);
//属性
$arr = getArticleSeoInfo($typeid, $dest_id);
$seoarr = generateInfo($arr);
//生成seo信息
$tagwords = GetTagsLink($arr['tagwords']);
$seoarr['typename'] = GetTypeName($typeid);
$seoarr['pkname'] = get_par_value($dest_id, $typeid);
//获取上级开启了导航的目的地
getTopNavDest($dest_id);
//当前页数->title里面使用
$seoarr['pageno'] = !empty($pageno) ? '第' . $pageno . '页-' : "";
$pv = new ListView($typeid);
$dest_pinyin = getArticleDestPinyin($dest_id);
$dest_url = empty($dest_pinyin) ? '/destination/' : '/' . $dest_pinyin . '/';
//目的地列表
$destlist = getArticleChildDest($dest_id);
//目的地面包
$mianbao = getArticleMianbaoHtml($dest_id);
$destname = Helper_Archive::getDestName($dest_id);
$pv->Fields['destjieshao'] = getArticleDestJieshao($dest_id);
Example #3
0
 function listGetChannelKeywords($typeid = 0)
 {
     global $dsql;
     //如果typeid=0则读取首页默认关键词.标题
     if ($typeid == 0) {
         $this->Fields['seotitle'] = $GLOBALS['cfg_seotitle'];
         $this->Fields['keywords'] = $GLOBALS['cfg_keywords'];
         $this->Fields['description'] = $GLOBALS['cfg_description'];
     } else {
         $sql = "select seotitle,shortname as typename ,tagword,url,keyword,description,jieshao from #@__nav where typeid ={$typeid} and webid='0'";
         $row = $dsql->GetOne($sql);
         if (is_array($row)) {
             foreach ($row as $k => $v) {
                 $this->Fields[$k] = $v;
             }
             //print_r($this->Fields);
         }
         $this->Fields['taglook'] = GetTagsLink($row['tagwords']);
     }
 }
Example #4
0
 function GetChannelKeywords($typeid = 0)
 {
     global $dsql;
     $webid = $GLOBALS['sys_child_webid'];
     //webid赋值
     //如果typeid=0则读取首页默认关键词.标题
     if ($typeid == 0) {
         $this->Fields['seotitle'] = $GLOBALS['cfg_seotitle'];
         $this->Fields['keywords'] = $GLOBALS['cfg_keywords'];
         $this->Fields['description'] = $GLOBALS['cfg_description'];
     } else {
         $sql = "select seotitle,shortname as typename ,linktitle,tagword,url,keyword as seokeyword,description as seodescription,jieshao from #@__nav where typeid ={$typeid} and webid='{$webid}'";
         $row = $dsql->GetOne($sql);
         if (is_array($row)) {
             $row['seotitle'] = empty($row['seotitle']) ? $row['typename'] : $row['seotitle'];
             $row['typename'] = !empty($row['linktitle']) ? $row['linktitle'] : $row['typename'];
             foreach ($row as $k => $v) {
                 $this->Fields[$k] = $v;
             }
             //print_r($this->Fields);
         }
         $this->Fields['taglook'] = GetTagsLink($row['tagword']);
     }
 }