1 | <?php |
---|
2 | /** |
---|
3 | * @copyright 2005-2007 OpenPNE Project |
---|
4 | * @license http://www.php.net/license/3_01.txt PHP License 3.01 |
---|
5 | */ |
---|
6 | |
---|
7 | //デフォルトページ |
---|
8 | $GLOBALS['__Framework']['default_page'] = 'h_home'; |
---|
9 | |
---|
10 | //<PCKTAI |
---|
11 | if (!OPENPNE_ENABLE_PC) { |
---|
12 | // disable pc module |
---|
13 | exit; |
---|
14 | } |
---|
15 | //> |
---|
16 | |
---|
17 | function init_pc_page(&$smarty) |
---|
18 | { |
---|
19 | //文言系 |
---|
20 | $smarty->assign('WORD_FRIEND', WORD_FRIEND); |
---|
21 | $smarty->assign('WORD_MY_FRIEND', WORD_MY_FRIEND); |
---|
22 | $smarty->assign('WORD_FRIEND_HALF', WORD_FRIEND_HALF); |
---|
23 | $smarty->assign('WORD_MY_FRIEND_HALF', WORD_MY_FRIEND_HALF); |
---|
24 | |
---|
25 | $is_secure = $GLOBALS['__Framework']['is_secure']; |
---|
26 | |
---|
27 | if ($is_secure) { |
---|
28 | @session_start(); |
---|
29 | $smarty->assign('PHPSESSID', md5(session_id())); |
---|
30 | $smarty->assign('before_after', 'after'); |
---|
31 | if (OPENPNE_USE_API) { |
---|
32 | $smarty->assign('api_params', api_get_params($GLOBALS['AUTH']->uid())); |
---|
33 | } |
---|
34 | } else { |
---|
35 | $smarty->assign('before_after', 'before'); |
---|
36 | } |
---|
37 | |
---|
38 | // INC_HEADER_* (inc_header.tpl) |
---|
39 | |
---|
40 | if (SNS_TITLE) { |
---|
41 | $title = SNS_TITLE; |
---|
42 | } else { |
---|
43 | $title = SNS_NAME; |
---|
44 | } |
---|
45 | $smarty->assign('INC_HEADER_title', $title); |
---|
46 | $smarty->assign('INC_HEADER_inc_html_head', p_common_c_siteadmin4target_pagename('inc_html_head')); |
---|
47 | $smarty->assign('INC_HEADER_inc_custom_css', p_common_c_siteadmin4target_pagename('inc_custom_css')); |
---|
48 | $smarty->assign('INC_HEADER_color_config', db_select_c_sns_config()); |
---|
49 | $smarty->assign('INC_HEADER_top_banner', db_banner_get_top_banner($is_secure)); |
---|
50 | $smarty->assign('INC_HEADER_page_name', $GLOBALS['__Framework']['current_action']); |
---|
51 | if ($is_secure) { |
---|
52 | $smarty->assign('INC_HEADER_top_banner_html_after', p_common_c_siteadmin4target_pagename('top_banner_html_after')); |
---|
53 | $smarty->assign('INC_HEADER_global_navi', util_get_c_navi('global')); |
---|
54 | } else { |
---|
55 | $smarty->assign('INC_HEADER_top_banner_html_before', p_common_c_siteadmin4target_pagename('top_banner_html_before')); |
---|
56 | } |
---|
57 | $smarty->assign('INC_HEADER_inc_page_top', p_common_c_siteadmin4target_pagename('inc_page_top')); |
---|
58 | $smarty->assign('INC_HEADER_inc_page_top2', p_common_c_siteadmin4target_pagename('inc_page_top2')); |
---|
59 | |
---|
60 | // INC_FOOTER_* (inc_footer.tpl) |
---|
61 | |
---|
62 | if ($is_secure) { |
---|
63 | $name = 'inc_page_footer_after'; |
---|
64 | } else { |
---|
65 | $name = 'inc_page_footer_before'; |
---|
66 | } |
---|
67 | $smarty->assign('INC_FOOTER_inc_page_footer', p_common_c_siteadmin4target_pagename($name)); |
---|
68 | $smarty->assign('INC_FOOTER_inc_page_bottom', p_common_c_siteadmin4target_pagename('inc_page_bottom')); |
---|
69 | $smarty->assign('INC_FOOTER_inc_page_bottom2', p_common_c_siteadmin4target_pagename('inc_page_bottom2')); |
---|
70 | $smarty->assign('INC_FOOTER_inc_side_banner', db_banner_get_side_banner($is_secure)); |
---|
71 | $smarty->assign('INC_FOOTER_side_banner_html_before', p_common_c_siteadmin4target_pagename('side_banner_html_before')); |
---|
72 | $smarty->assign('INC_FOOTER_side_banner_html_after', p_common_c_siteadmin4target_pagename('side_banner_html_after')); |
---|
73 | } |
---|
74 | |
---|
75 | function init_pc_do() |
---|
76 | { |
---|
77 | $is_secure = $GLOBALS['__Framework']['is_secure']; |
---|
78 | |
---|
79 | if ($is_secure) { |
---|
80 | if ($_REQUEST['sessid'] !== md5(session_id())) { |
---|
81 | openpne_display_error('前の画面を再読み込みして、操作をやり直してください'); |
---|
82 | } |
---|
83 | } |
---|
84 | } |
---|
85 | |
---|
86 | ?> |
---|