3 * Ajax Chat for TRPG ver.2.3
4 * (c)2007-2008 Cake All rights reserved.
5 * Mail : cake_67@users.sourceforge.jp
6 * Home : http://trpgtools-onweb.sourceforge.jp/
10 require_once './trpgchat-ini.php';
11 require_once './lib/trpgchat.php';
14 if (!$request = request()) {
15 error('リクエストを受信できません', true);
19 if (MASTERPASS && $request['admin_pwd'] != MASTERPASS) {
20 error('パスワードが違います。', false, true);
27 if (!in_array($request['action'], $whitelist)) {
32 set_config(read_config());
37 // マスターパスを暗号化してセッションに入れる
38 @session_name('AjaxChatForTRPG');
40 @session_regenerate_id();
42 $_SESSION['admin_pwd'] = crypt($request['admin_pwd'], ADMIN_HASH_KEY);
45 $url = str_replace('auth.php', '', 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME']).$request['action'];
47 header('Location: '. $url);