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

source: OpenPNE/trunk/webapp/modules/pc/init.inc @ 7233

Last change on this file since 7233 was 7233, checked in by ebihara, 12 years ago

#2399:日記以外の場所でも自分のアルバム小窓・アルバム画像小窓であればURLを変換するようにした

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    if ($is_secure) {
46        $smarty->assign('INC_HEADER_top_banner_html_after', p_common_c_siteadmin4target_pagename('top_banner_html_after'));
47        $smarty->assign('INC_HEADER_global_navi', util_get_c_navi('global'));
48    } else {
49        $smarty->assign('INC_HEADER_top_banner_html_before', p_common_c_siteadmin4target_pagename('top_banner_html_before'));
50    }
51    $smarty->assign('INC_HEADER_inc_page_top', p_common_c_siteadmin4target_pagename('inc_page_top'));
52    $smarty->assign('INC_HEADER_inc_page_top2', p_common_c_siteadmin4target_pagename('inc_page_top2'));
53    $smarty->assign('INC_HEADER_decoration_config', db_decoration_enable_list());
54
55    // INC_FOOTER_* (inc_footer.tpl)
56
57    if ($is_secure) {
58        $name = 'inc_page_footer_after';
59    } else {
60        $name = 'inc_page_footer_before';
61    }
62    $smarty->assign('INC_FOOTER_inc_page_footer', p_common_c_siteadmin4target_pagename($name));
63    $smarty->assign('INC_FOOTER_inc_page_bottom', p_common_c_siteadmin4target_pagename('inc_page_bottom'));
64    $smarty->assign('INC_FOOTER_inc_page_bottom2', p_common_c_siteadmin4target_pagename('inc_page_bottom2'));
65    $smarty->assign('INC_FOOTER_inc_side_banner', db_banner_get_side_banner($is_secure));
66    $smarty->assign('INC_FOOTER_side_banner_html_before', p_common_c_siteadmin4target_pagename('side_banner_html_before'));
67    $smarty->assign('INC_FOOTER_side_banner_html_after', p_common_c_siteadmin4target_pagename('side_banner_html_after'));
68
69    if ($is_secure) {
70        $u = $GLOBALS['AUTH']->uid();
71        $smarty->assign('C_MEMBER_CONFIG', util_get_c_member_config($u));
72        $smarty->assign('u', $u);
73    }
74
75}
76
77function init_pc_do()
78{
79    $is_secure = $GLOBALS['__Framework']['is_secure'];
80
81    if ($is_secure) {
82        if ($_REQUEST['sessid'] !== md5(session_id())) {
83            openpne_display_error('前の画面を再読み込みして、操作をやり直してください');
84        }
85    }
86}
87
88?>
Note: See TracBrowser for help on using the repository browser.