ここの情報は古いです。ご理解頂いた上でお取り扱いください。

source: OpenPNE/branches/stable-2.12.x/webapp/modules/pc/init.inc @ 8852

Last change on this file since 8852 was 8852, checked in by mori, 12 years ago

#2868 任意HTML情報の init.inc での取得処理を修正

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