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_KTAI) { |
---|
12 | // disable ktai module |
---|
13 | exit; |
---|
14 | } |
---|
15 | //> |
---|
16 | |
---|
17 | // User-Agent判別 |
---|
18 | if (CHECK_KTAI_UA && !isKtaiUserAgent()) { |
---|
19 | openpne_redirect('pc'); |
---|
20 | } |
---|
21 | |
---|
22 | // 文字コード変換 |
---|
23 | function ktai_convert_encoding($arr) |
---|
24 | { |
---|
25 | return is_array($arr) ? |
---|
26 | array_map('ktai_convert_encoding', $arr) : |
---|
27 | mb_convert_encoding($arr, 'UTF-8', 'SJIS-win'); |
---|
28 | } |
---|
29 | |
---|
30 | // 絵文字変換 |
---|
31 | function ktai_convert_emoji($arr) |
---|
32 | { |
---|
33 | return is_array($arr) ? |
---|
34 | array_map('ktai_convert_emoji', $arr) : |
---|
35 | emoji_escape($arr); |
---|
36 | } |
---|
37 | |
---|
38 | function ktai_convert($arr) |
---|
39 | { |
---|
40 | $arr = ktai_convert_emoji($arr); |
---|
41 | $arr = ktai_convert_encoding($arr); |
---|
42 | return $arr; |
---|
43 | } |
---|
44 | |
---|
45 | $_GET = ktai_convert($_GET); |
---|
46 | $_POST = ktai_convert($_POST); |
---|
47 | $_REQUEST = ktai_convert($_REQUEST); |
---|
48 | |
---|
49 | ini_set('session.use_cookies', '0'); |
---|
50 | |
---|
51 | function init_ktai_page(&$smarty) |
---|
52 | { |
---|
53 | //---- inc_ テンプレート用 変数 ----// |
---|
54 | $smarty->assign('inc_ktai_header', fetch_inc_ktai_header()); |
---|
55 | $smarty->assign('inc_ktai_footer', fetch_inc_ktai_footer()); |
---|
56 | |
---|
57 | //全ページ共通変数のアサイン |
---|
58 | $smarty->assign('msg', k_p_common_msg4msg_id($_REQUEST['msg'])); |
---|
59 | $smarty->assign('WORD_FRIEND', WORD_FRIEND); |
---|
60 | $smarty->assign('WORD_MY_FRIEND', WORD_MY_FRIEND); |
---|
61 | $smarty->assign('WORD_FRIEND_HALF', WORD_FRIEND_HALF); |
---|
62 | $smarty->assign('WORD_MY_FRIEND_HALF', WORD_MY_FRIEND_HALF); |
---|
63 | |
---|
64 | $is_secure = $GLOBALS['__Framework']['is_secure']; |
---|
65 | |
---|
66 | if ($is_secure) { |
---|
67 | $smarty->assign('u', $GLOBALS['KTAI_C_MEMBER_ID']); |
---|
68 | $smarty->assign('tail', $GLOBALS['KTAI_URL_TAIL']); |
---|
69 | @session_start(); |
---|
70 | $smarty->assign('PHPSESSID', session_id()); |
---|
71 | } |
---|
72 | |
---|
73 | // set SJIS |
---|
74 | $smarty->setOutputCharset('SJIS'); |
---|
75 | } |
---|
76 | |
---|
77 | ?> |
---|