1 | <?php |
---|
2 | /** |
---|
3 | * @copyright 2005-2006 OpenPNE Project |
---|
4 | * @license http://www.php.net/license/3_01.txt PHP License 3.01 |
---|
5 | */ |
---|
6 | |
---|
7 | //デフォルトページ |
---|
8 | $GLOBALS['__Framework']['default_page'] = 'fh_calendar_week'; |
---|
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 | _include_dir(OPENPNE_WEBAPP_BIZ_DIR . '/lib/db'); |
---|
23 | _include_dir(OPENPNE_WEBAPP_BIZ_DIR . '/lib/util'); |
---|
24 | // bizモジュールディレクトリの定義 |
---|
25 | $biz_dir = OPENPNE_MODULES_BIZ_DIR.'/biz/'; |
---|
26 | // bizモジュールライブラリ |
---|
27 | require_once $biz_dir . 'lib/smarty_functions.php'; |
---|
28 | require_once $biz_dir . 'lib/mysql_functions.php'; |
---|
29 | |
---|
30 | // 文字コード変換 |
---|
31 | function ktai_convert_encoding($arr) |
---|
32 | { |
---|
33 | return is_array($arr) ? |
---|
34 | array_map('ktai_convert_encoding', $arr) : |
---|
35 | mb_convert_encoding($arr, 'UTF-8', 'SJIS-win'); |
---|
36 | } |
---|
37 | |
---|
38 | // 絵文字変換 |
---|
39 | function ktai_convert_emoji($arr) |
---|
40 | { |
---|
41 | return is_array($arr) ? |
---|
42 | array_map('ktai_convert_emoji', $arr) : |
---|
43 | emoji_escape($arr); |
---|
44 | } |
---|
45 | |
---|
46 | function ktai_convert($arr) |
---|
47 | { |
---|
48 | $arr = ktai_convert_emoji($arr); |
---|
49 | $arr = ktai_convert_encoding($arr); |
---|
50 | return $arr; |
---|
51 | } |
---|
52 | |
---|
53 | $_GET = ktai_convert($_GET); |
---|
54 | $_POST = ktai_convert($_POST); |
---|
55 | $_REQUEST = ktai_convert($_REQUEST); |
---|
56 | |
---|
57 | ini_set('session.use_cookies', '0'); |
---|
58 | |
---|
59 | function init_ktai_biz_page(&$smarty) |
---|
60 | { |
---|
61 | //---- inc_ テンプレート用 変数 ----// |
---|
62 | $smarty->assign('inc_ktai_header', fetch_inc_ktai_header()); |
---|
63 | $smarty->assign('inc_ktai_footer', fetch_inc_ktai_footer()); |
---|
64 | |
---|
65 | //全ページ共通変数のアサイン |
---|
66 | $smarty->assign('msg', k_p_common_msg4msg_id($_REQUEST['msg'])); |
---|
67 | $smarty->assign('WORD_FRIEND', WORD_FRIEND); |
---|
68 | $smarty->assign('WORD_MY_FRIEND', WORD_MY_FRIEND); |
---|
69 | $smarty->assign('WORD_FRIEND_HALF', WORD_FRIEND_HALF); |
---|
70 | $smarty->assign('WORD_MY_FRIEND_HALF', WORD_MY_FRIEND_HALF); |
---|
71 | |
---|
72 | $is_secure = $GLOBALS['__Framework']['is_secure']; |
---|
73 | |
---|
74 | if ($is_secure) { |
---|
75 | $smarty->assign('u', $GLOBALS['KTAI_C_MEMBER_ID']); |
---|
76 | $smarty->assign('tail', $GLOBALS['KTAI_URL_TAIL']); |
---|
77 | @session_start(); |
---|
78 | $smarty->assign('PHPSESSID', session_id()); |
---|
79 | } |
---|
80 | |
---|
81 | // set SJIS |
---|
82 | $smarty->setOutputCharset('SJIS'); |
---|
83 | } |
---|
84 | |
---|
85 | ?> |
---|