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

source: OpenPNE/branches/ebihara/prj_dev_2_8beta6/webapp/modules/pc/init.inc @ 2611

Last change on this file since 2611 was 2190, checked in by takanashi, 13 years ago

#462 共通コミュニティ /#463 GoogleMapsコマド

File size: 3.2 KB
Line 
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//デフォルトページ
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    //文言系
21    $smarty->assign('WORD_FRIEND', WORD_FRIEND);
22    $smarty->assign('WORD_MY_FRIEND', WORD_MY_FRIEND);
23    $smarty->assign('WORD_FRIEND_HALF', WORD_FRIEND_HALF);
24    $smarty->assign('WORD_MY_FRIEND_HALF', WORD_MY_FRIEND_HALF);
25
26    $is_secure = $GLOBALS['__Framework']['is_secure'];
27
28    if ($is_secure) {
29        @session_start();
30        $smarty->assign('PHPSESSID', md5(session_id()));
31        $smarty->assign('before_after', 'after');
32        if (OPENPNE_USE_API) {
33            $smarty->assign('api_params', api_get_params($GLOBALS['AUTH']->uid()));
34        }
35    } else {
36        $smarty->assign('before_after', 'before');
37    }
38
39    // INC_HEADER_* (inc_header.tpl)
40
41    if (SNS_TITLE) {
42        $title = SNS_TITLE;
43    } else {
44        $title = SNS_NAME;
45    }
46    $smarty->assign('INC_HEADER_title', $title);
47    $smarty->assign('INC_HEADER_inc_html_head', p_common_c_siteadmin4target_pagename('inc_html_head'));
48    $smarty->assign('INC_HEADER_inc_custom_css', p_common_c_siteadmin4target_pagename('inc_custom_css'));
49    $smarty->assign('INC_HEADER_color_config', db_select_c_sns_config());
50    $smarty->assign('INC_HEADER_top_banner', db_banner_get_top_banner($is_secure));
51    $smarty->assign('INC_HEADER_page_name', $GLOBALS['__Framework']['current_action']);
52    if ($is_secure) {
53            $smarty->assign('INC_HEADER_top_banner_html_after', p_common_c_siteadmin4target_pagename('top_banner_html_after'));
54            $smarty->assign('INC_HEADER_global_navi', util_get_c_navi('global'));
55    } else {
56            $smarty->assign('INC_HEADER_top_banner_html_before', p_common_c_siteadmin4target_pagename('top_banner_html_before'));
57    }
58    $smarty->assign('INC_HEADER_inc_page_top', p_common_c_siteadmin4target_pagename('inc_page_top'));
59    $smarty->assign('INC_HEADER_inc_page_top2', p_common_c_siteadmin4target_pagename('inc_page_top2'));
60
61    // INC_FOOTER_* (inc_footer.tpl)
62
63    if ($is_secure) {
64        $name = 'inc_page_footer_after';
65    } else {
66        $name = 'inc_page_footer_before';
67    }
68    $smarty->assign('INC_FOOTER_inc_page_footer', p_common_c_siteadmin4target_pagename($name));
69    $smarty->assign('INC_FOOTER_inc_page_bottom', p_common_c_siteadmin4target_pagename('inc_page_bottom'));
70    $smarty->assign('INC_FOOTER_inc_page_bottom2', p_common_c_siteadmin4target_pagename('inc_page_bottom2'));
71    $smarty->assign('INC_FOOTER_inc_side_banner', db_banner_get_side_banner($is_secure));
72    $smarty->assign('INC_FOOTER_side_banner_html_before', p_common_c_siteadmin4target_pagename('side_banner_html_before'));
73    $smarty->assign('INC_FOOTER_side_banner_html_after', p_common_c_siteadmin4target_pagename('side_banner_html_after'));
74}
75
76function init_pc_do()
77{
78    $is_secure = $GLOBALS['__Framework']['is_secure'];
79
80    if ($is_secure) {
81        if ($_REQUEST['sessid'] !== md5(session_id())) {
82            openpne_display_error('前の画面を再読み込みして、操作をやり直してください');
83        }
84    }
85}
86
87?>
Note: See TracBrowser for help on using the repository browser.