OSDN Git Service

add chat ver1.0
[trpgtools-onweb/AjaxChat.git] / pastlog_index.php
1 <?php
2 /*
3  * Ajax Chat for TRPG ver.1.0
4  * (c)2007 Cake All righ1ts reserved.
5  * Mail : cake_67@users.sourceforge.jp
6  * Home : http://trpgtools-onweb.sourceforge.jp/
7  *
8  * [注意事項他]
9  * 本チャットスクリプトの使用および配布は、BSDライセンスに基づきます。
10  * BSDライセンスの詳細につきましては、添付のライセンス.txtを参照してください。
11  *
12  * BSDライセンス概要&使用上の注意
13  * 1. このスクリプトはフリーソフトです。以下の条件を満たす限りにおいて、使用・改造・再配布(オリジナルおよび改造版の両方とも)は自由です。
14  * 再配布する場合、上記著作権表示、本条件書きおよび第2項・第3項の責任限定規定を必ず含めてください。
15  * 2. 同梱のアイコンはPetite Prier様(http://snow.if.tv/)の素材です。
16       本スクリプトの使用および再配布時にアイコンをそのまま用いる場合は、配布元の規定も遵守してください。
17  * 3. 本スクリプトは無保証です。自己責任で使用してください。このスクリプトを使用したいかなる損害に対しても、作者は一切の責任を負いません。
18  * 4. 設置および使用方法に関する質問は、配布サイトの掲示板にお願いします。ただし、必ず回答できるとは限りません。
19  * メールによる質問は、ご遠慮ください。
20  */
21
22 // 設定ファイルの読み込み
23 require_once './trpgchat-ini.php';
24
25 // HTML出力
26 print html_header('index', $title.' 過去ログ', true, true);
27
28 ?>
29 <script type="text/javascript">
30 <!--
31 function onLoadClick() {
32     if ($("#name").attr("value") && $("#pwd").attr("value")) {
33         $("#last").click();
34     }
35 }
36
37 function showLog(Obj) {
38     if(Obj.value != ""){\r
39         window.mainframe.location.href = Obj.value;\r
40     }
41 }
42 //-->
43 </script>
44 </head>
45 <body onload="onLoadClick()">
46 <table border="0" cellspacing="3" cellpadding="0" id="user" align="center">
47 <tr>
48 <td class="nodisplay">
49 <form action="./pastlog_main.php" target="mainframe" method="get" name="show" class="show" id="show">
50 </td>
51 <td>
52 <img name="whisper" title="最新ログでは、お名前とパスワードを入力すると、関連する「ささやき」も表示されます。" src="./<?php print $whisper; ?>" align="bottom" hspace="1" vspace="0" border="0"></td>
53 <td nowrap>
54 お名前:<input type="text" name="name" id="name" value="<?php print $_REQUEST['name'] ?>" size="8" class="inputname" id="name">
55 </td>
56 <td nowrap>
57 パスワード:<input type="password" name="pwd" size="4" class="inputpwd" id="pwd" value="<?php print $_REQUEST['pwd'] ?>">
58 </td>
59 <td nowrap>
60 <input type="submit" id="last" class="btn sub" value="最新のログ">
61 </td>
62 <td class="nodisplay">
63 </form></td>
64 </tr>
65 </table>
66 <table border="0" align="center">
67 <tr>
68 <td class="nodisplay">
69 <form action="<?php print $home; ?>" method="<?php print $method; ?>">
70 </td>
71 <td>
72 <input type="image" class="btn sub" src="<?php print $home_icon; ?>" alt="ホーム" title="ホーム">
73 </td>
74 <td class="nodisplay">
75 </form>
76 </td>
77 <td class="nodisplay">
78 <form name="past" id="past" onsubmit="return false;" action=""></td>
79 <td nowrap>
80 <select name="logfile">
81 <option value="">もっと前のログを見る</option>
82 <?php
83 if ($dir = opendir($past_dir)) {
84     while($logfiles = readdir($dir)) {
85         if (!ereg("^\.", $logfiles) && $logfiles != 'index.html') {
86             $array_logfiles[] =  "<option value=\"".$past_dir.$logfiles."\">".$logfiles."</option>\n";
87         }
88     }
89     closedir($dir);
90
91     if ($array_logfiles) {
92         rsort($array_logfiles);
93         foreach ($array_logfiles as $v) {
94             $list .= $v;
95         }
96     }
97      print $list;
98 }
99 ?>
100 </td>
101 <td align="left" nowrap>
102 <input type="button" class="btn sub" value="表示" onclick="showLog(this.form.logfile)">
103 </select>
104 </td>
105 <td class="nodisplay">
106 </form>
107 </td>
108 <td class="nodisplay">
109 <form action="<?php print $pastlog_maker; ?>" method="<?php print $method; ?>" target="admin">
110 </td>
111 <td nowrap>
112 管理画面:<input type="password" name="admin_pwd" size="4" class="inputpwd" value="">
113 </td>
114 <td>
115 <input type="image" class="btn sub" src="<?php print $admin_icon; ?>">
116 </td>
117 <td class="nodisplay">
118 </form>
119 </td>
120 </tr></table>
121
122 <iframe src="./pastlog_main.php" width="100%" frameborder="1" border="1" allowtransparency="true" scrolling="auto" name="mainframe" class="mainframe" style="height:445px;" id="mainframe"></iframe>
123
124 <noscript>
125 <p><img src="image/blog_jscript.gif" alt="Javascript" width="80" height="15">過去ログ表示機能は、JavaScript が不可の環境では、一部機能のみ使用可能です</p>
126 </noscript>
127
128 <?php
129 // フッター
130 print html_footer($copyright);
131  ?>