commit | author | age
|
3e083b
|
1 |
<?php |
B |
2 |
|
|
3 |
/** |
|
4 |
* 专题前台 |
|
5 |
*/ |
|
6 |
|
|
7 |
define('IN_ECS', true); |
|
8 |
|
|
9 |
require(dirname(__FILE__) . '/includes/init.php'); |
|
10 |
|
|
11 |
if ((DEBUG_MODE & 2) != 2) |
|
12 |
{ |
|
13 |
$smarty->caching = true; |
|
14 |
} |
|
15 |
|
|
16 |
if (!$smarty->is_cached($templates, $cache_id)) |
|
17 |
{ |
|
18 |
|
|
19 |
|
|
20 |
/* 模板赋值 */ |
|
21 |
assign_template(); |
|
22 |
$position = assign_ur_here(0, $GLOBALS['_LANG']['apply_index']); |
|
23 |
$smarty->assign('page_title', $position['title']); // 页面标题 |
|
24 |
$smarty->assign('ur_here', $position['ur_here'] . '> ' . $topic['title']); // 当前位置 |
|
25 |
$smarty->assign('helps', get_shop_help()); // 网店帮助 |
|
26 |
$smarty->assign('all', $cats['all']); |
|
27 |
$smarty->assign('tuijian', $tuijian); |
|
28 |
|
|
29 |
$smarty->assign('logopath', '/'.DATA_DIR.'/supplier/logo/'); |
|
30 |
$smarty->assign('shops_list', $shop_list['shops']); |
|
31 |
$smarty->assign('filter', $shop_list['filter']); |
|
32 |
$smarty->assign('record_count', $shop_list['record_count']); |
|
33 |
$smarty->assign('page_count', $shop_list['page_count']); |
|
34 |
|
|
35 |
$page = (isset($_REQUEST['page'])) ? intval($_REQUEST['page']) : 1; |
|
36 |
|
|
37 |
$start_array = range(1,$page); |
|
38 |
$end_array = range($page,$shop_list['page_count']); |
|
39 |
if($page-5>0){ |
|
40 |
$smarty->assign('start',$page-3); |
|
41 |
$start_array = range($page,$page-2); |
|
42 |
} |
|
43 |
if($shop_list['page_count'] - $page > 5){ |
|
44 |
$smarty->assign('end',$page+3); |
|
45 |
$end_array = range($page,$page+2); |
|
46 |
} |
|
47 |
$page_array = array_merge($start_array,$end_array); |
|
48 |
sort($page_array); |
|
49 |
$smarty->assign('page_array', array_unique($page_array)); |
|
50 |
} |
|
51 |
if ($action == 'store_joinin') |
|
52 |
{ |
|
53 |
|
|
54 |
|
|
55 |
} |
|
56 |
//判断 弹框登陆 验证码是否显示 |
|
57 |
$captcha = intval($_CFG['captcha']); |
|
58 |
if(($captcha & CAPTCHA_LOGIN) && (! ($captcha & CAPTCHA_LOGIN_FAIL) || (($captcha & CAPTCHA_LOGIN_FAIL) && $_SESSION['login_fail'] > 2)) && gd_version() > 0) |
|
59 |
{ |
|
60 |
$GLOBALS['smarty']->assign('enabled_captcha', 1); |
|
61 |
$GLOBALS['smarty']->assign('rand', mt_rand()); |
|
62 |
} |
|
63 |
$smarty->display('apply_index.dwt'); |
|
64 |
|
|
65 |
?> |