Example #1
0
//文章栏目
require_once SLINEINC . "/view.class.php";
$pv = new View($typeid);
if (!isset($aid)) {
    exit('Wrong Id');
}
$aid = RemoveXSS($aid);
//防止跨站攻击
updateVisit($aid, $typeid);
//更新访问次数
$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'];
Example #2
0
require_once dirname(__FILE__) . "/dest.func.php";
require_once SLINEINC . "/view.class.php";
$file = SLINEDATA . "/autotitle.cache.inc.php";
//载入智能title配置
if (file_exists($file)) {
    require_once $file;
}
//兼容以前老地址,如果使用以前老地址访问则301跳转到新的地址
if (preg_match("/^\\d*\$/", $destid)) {
    $py = getPinyinById($destid);
    $url = $cfg_basehost . "/{$type}/{$py}/";
    head301($url);
}
if ($type != 'raiders') {
    $url = $cfg_basehost . "/{$type}/{$destid}/";
    head301($url);
}
$destpy = $destid;
//拼音赋值
$kindid = $destid = getDestIdByPy($destpy);
//获取目的地ID
if (empty($type)) {
    exit('Error!');
}
$arr = array('lines' => '1', 'hotels' => '2', 'cars' => '3', 'raiders' => '4', 'spots' => '5', 'photos' => '6');
$destyp = Helper_Archive::getDestPinyin($destid);
$typedd = array("1" => "line", "2" => "hotel", "3" => "car", "4" => "article", 5 => "spot", 6 => "photo");
$typeid = $arr[$type];
$pv = new View($typeid);
getTopNavDest($destid);
//目的地导航信息