You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
107 lines
4.4 KiB
107 lines
4.4 KiB
<?php
|
|
|
|
define('IN_ASC', true);
|
|
|
|
require(dirname(__FILE__) . '/includes/init.php');
|
|
|
|
if ((DEBUG_MODE & 2) != 2)
|
|
{
|
|
$smarty->caching = true;
|
|
}
|
|
|
|
|
|
/*------------------------------------------------------ */
|
|
//-- PROCESSOR
|
|
/*------------------------------------------------------ */
|
|
|
|
$cache_id = sprintf('%X', crc32($_REQUEST['id'] . '-' . $_CFG['lang']));
|
|
|
|
if (!$smarty->is_cached('contact.html', $cache_id))
|
|
{
|
|
|
|
assign_template();
|
|
|
|
// $article = get_article_info($article_id);
|
|
|
|
// if (empty($article))
|
|
// {
|
|
// ecs_header("Location: ./\n");
|
|
// exit;
|
|
// }
|
|
|
|
// if (!empty($article['link']) && $article['link'] != 'http://' && $article['link'] != 'https://')
|
|
// {
|
|
// ecs_header("location:$article[link]\n");
|
|
// exit;
|
|
// }
|
|
|
|
// $smarty->assign('article_categories', article_categories_tree($article['cat_id'])); //文章分类树
|
|
|
|
// $smarty->assign('categories', get_categories_tree()); // 分类树
|
|
// $smarty->assign('helps', get_shop_help()); // 网店帮助
|
|
|
|
// $smarty->assign('top_goods', get_top10()); // 销售排行
|
|
// $smarty->assign('best_goods', get_recommend_goods('best')); // 推荐商品
|
|
// $smarty->assign('new_goods', get_recommend_goods('new')); // 最新商品
|
|
// $smarty->assign('hot_goods', get_recommend_goods('hot')); // 热点文章
|
|
// $smarty->assign('promotion_goods', get_promote_goods()); // 特价商品
|
|
// $smarty->assign('related_goods', article_related_goods($_REQUEST['id'])); // 特价商品
|
|
// $smarty->assign('id', $article_id);
|
|
// $smarty->assign('username', $_SESSION['user_name']);
|
|
// $smarty->assign('email', $_SESSION['email']);
|
|
// $smarty->assign('type', '1');
|
|
// $smarty->assign('promotion_info', get_promotion_info());
|
|
// $smarty->assign('new_articles', get_new_articles()); // 最新文章
|
|
|
|
// /* 验证码相关设置 */
|
|
// if ((intval($_CFG['captcha']) & CAPTCHA_COMMENT) && gd_version() > 0)
|
|
// {
|
|
// $smarty->assign('enabled_captcha', 1);
|
|
// $smarty->assign('rand', mt_rand());
|
|
// }
|
|
|
|
// $smarty->assign('article', $article);
|
|
// $smarty->assign('keywords', htmlspecialchars($article['keywords']));
|
|
// $smarty->assign('description', htmlspecialchars($article['description']));
|
|
|
|
// $catlist = array();
|
|
// foreach(get_article_parent_cats($article['cat_id']) as $k=>$v)
|
|
// {
|
|
// $catlist[] = $v['cat_id'];
|
|
// }
|
|
|
|
// assign_template('a', $catlist);
|
|
|
|
// $smarty->assign('cat_id', $article['cat_id']);
|
|
// $position = assign_ur_here($article['cat_id'], $article['title']);
|
|
// $smarty->assign('page_title', $position['title']); // 页面标题
|
|
// $smarty->assign('ur_here', $position['ur_here']); // 当前位置
|
|
// $smarty->assign('comment_type', 1);
|
|
|
|
// /* 相关商品 */
|
|
// $sql = "SELECT a.goods_id, g.goods_name " .
|
|
// "FROM " . $ecs->table('goods_article') . " AS a, " . $ecs->table('goods') . " AS g " .
|
|
// "WHERE a.goods_id = g.goods_id " .
|
|
// "AND a.article_id = '$_REQUEST[id]' ";
|
|
// $smarty->assign('goods_list', $db->getAll($sql));
|
|
|
|
// /* 上一篇下一篇文章 */
|
|
// $next_article = $db->getRow("SELECT article_id, title FROM " .$ecs->table('article'). " WHERE article_id > $article_id AND cat_id=$article[cat_id] AND is_open=1 LIMIT 1");
|
|
// if (!empty($next_article))
|
|
// {
|
|
// $next_article['url'] = build_uri('article', array('aid'=>$next_article['article_id']), $next_article['title']);
|
|
// $smarty->assign('next_article', $next_article);
|
|
// }
|
|
|
|
// $prev_aid = $db->getOne("SELECT max(article_id) FROM " . $ecs->table('article') . " WHERE article_id < $article_id AND cat_id=$article[cat_id] AND is_open=1");
|
|
// if (!empty($prev_aid))
|
|
// {
|
|
// $prev_article = $db->getRow("SELECT article_id, title FROM " .$ecs->table('article'). " WHERE article_id = $prev_aid");
|
|
// $prev_article['url'] = build_uri('article', array('aid'=>$prev_article['article_id']), $prev_article['title']);
|
|
// $smarty->assign('prev_article', $prev_article);
|
|
// }
|
|
|
|
// assign_dynamic('article');
|
|
}
|
|
$smarty->display('contact.html', $cache_id);
|