OSDN Git Service

trpgchat ver2.6.1
[trpgtools-onweb/AjaxChat.git] / index_inc_userpanel.php
1 <!-- ここから:オンライン標準表示欄 -->
2 <table border="0" cellspacing="3" cellpadding="0" id="online1" class="online" style="display:none;">
3 <tr>
4 <td>
5 <form name="online1" onsubmit="return false;" action="">
6 <input type="hidden" name="name_on" value="" id="name_on">
7 <input type="hidden" name="pwd_on" id="pwd_on">
8 <input type="hidden" name="my_hash" value="" id="my_hash">
9 </td>
10
11 <?php
12
13 //=======ここから:オンラインTRPG欄
14 if (DICE_MAX && $GLOBALS['AJAX_CHAT_TRPG']['PRESET_DICE'][0]) {
15     print '<td title="右のダイスアイコンで入力するダイスを選んでください">';
16     print '<select name="dice" id="dice">'."\n";
17     foreach ($GLOBALS['AJAX_CHAT_TRPG']['PRESET_DICE'] as $v) {
18          print '<option value="'.$v.'">'.$v.'</option>'."\n";
19     }
20     print '</select></td>'."\n";
21     print '<td> + </td>'."\n";
22     print "<td>\n";
23     print '<span title="ダイスの修正値を入力してください"><option value="'.$v.'"><input type="text" size="6" value="" name="revision" id="revision"></span>';
24     print "</td>\n";
25     if (CF_INPUT) {
26         print "<td nowrap>\n";
27         if (!CF_FIXED) {
28             print '<span title="クリティカル値 11:「11で」クリティカル 11-:11「以上」でクリティカル">C:';
29         }
30         print '<input type="text" size="1" value="';
31         print C_DEFAULT;
32         print '" name="clit" id="clit"';
33         if (CF_FIXED) {
34             print ' style="display:none;"';
35         }
36         print '>';
37         if (!CF_FIXED) {
38             print '</span>';
39         }
40         print "</td>\n";
41         print '<td nowrap>';
42         if (!CF_FIXED) {
43             print '<span title="ファンブル 3:「3で」ファンブル 3-:3「以下」でファンブル"> F:';
44         }
45         print '<input type="text" size="1" value="';
46         print F_DEFAULT;
47         print '" name="famble" id="famble"';
48         if (CF_FIXED) {
49             print ' style="display:none;"';
50         }
51         print '>';
52         if (!CF_FIXED) {
53             print '</span>';
54         }
55         print "</td>\n";
56
57         print '<td nowrap>';
58         print '<span title="クリティカル・ファンブルで変化するダイスを発言欄に入力します">入力:<input id="cfinput" type="checkbox" onclick=\'toggleColumn("cfchange")\'></span></td>';
59
60         print '<td id="cfchange" style="display:none;" nowrap>';
61         print '<span title="クリティカルで自動的に振り足されるダイスを発言欄に入力します">回る:<input id="crolling" type="checkbox"></span>';
62         print '<span title="ファンブルで絶対失敗(0点扱い)になるダイスを発言欄に入力します。">絶対失敗:<input id="fzero" type="checkbox"></span>';
63         print "</td>\n";
64     }
65     print "<td nowrap>";
66     show_icon(DICE_ICON, "", "", "dice", "ダイス入力", "右で指定したダイスを入力します", "insertDice(this.form, columnId);");
67     print '<input type="submit" style="display:none;" onclick="insertDice(this.form, columnId);">';
68
69     if (SHORTCUT_DICE) {
70         show_icon(DICE_SHORTCUT_SHOW_ICON, DICE_SHORTCUT_HIDE_ICON, "", "dice_shortcut_icon", "↓", "ダイスショートカット欄をON/OFFします", "toggleColumn('dice_shortcut');");
71     }
72     // 市販ルール欄
73     if (USE_CONSUMER_RULES) {
74         show_icon(CONSUMER_RULES_OPEN_ICON, CONSUMER_RULES_CLOSE_ICON, "", "consumer_rule_icon", "†", "市販ルールの簡易使用欄をON/OFFします", 'toggleColumn(\'consumer_rule\');');
75     }
76     print "</td>\n";
77 }
78 print '<td class="nodisplay"></form></td>'."\n";
79 //=======ここまで:オンラインTRPG欄
80
81 // タグボタン
82 if (ALLOW_TAG) {
83     print '<td id="tags1" nowrap>';
84     $tag_num = count($GLOBALS['AJAX_CHAT_TRPG']['TAGS']);
85     for($i=0;$i<$tag_num;$i++) {
86         if ($GLOBALS['AJAX_CHAT_TRPG']['TAGS'][$i][1] && $GLOBALS['AJAX_CHAT_TRPG']['TAGS'][$i][3]) {
87             $tag = $GLOBALS['AJAX_CHAT_TRPG']['TAGS'][$i][0];
88             show_icon($GLOBALS['AJAX_CHAT_TRPG']['TAGS'][$i][2], "", "", "", $tag, $tag."タグ", "insertTag('$tag', columnId);");
89         }
90     }
91     print "</td>\n";
92     print '<td id="tags2">';
93     show_icon(INSERT_FONT_ICON, "", "", "", "F", "フォントタグ", "insertFontTag(columnId);");
94     print "</td>\n";
95 }
96 ?>
97 <td nowrap>
98 <?php
99 show_icon(RELOAD_ICON, "", "", "", "R", "チャット画面をリフレッシュ!", "window.mainframe.clearLog();");
100
101 $toggle_config = '';
102 if (FREEMAP_URL) {
103     $toggle_config .= 'toggleColumn(\'tools0\');';
104 }
105 if (!(DELETE_LAST_PASTLOG && !PUBLIC_PASTLOG)) {
106     $toggle_config .= 'toggleColumn(\'tools1\');toggleColumn(\'tools2\');';
107 }
108 if (COOKEI_EXPIRE && COOKIE) {
109     $toggle_config .= 'toggleColumn(\'tools3\');';
110 }
111 if (USE_MOBILE) {
112     $toggle_config .= 'toggleColumn(\'tools4\');';
113 }
114 if (CARD_ICON) {
115     $toggle_config .= 'toggleColumn(\'tools5\');';
116 }
117 show_icon(TOOLS_ICON, "", "", "", "TOOL", "過去ログ表示・クッキー保存アイコンなどの表示をON/OFFします", $toggle_config);
118
119 print "</td>";
120
121 // FreeMap連動
122 if (FREEMAP_URL) {
123     print '<td id="tools0" style="display:none;">';
124     print show_icon(FREEMAP_ICON, "", "", "freemap", "MAP", "マップとコマを使う", 'openUrl(\''.FREEMAP_URL.'\', \'map\'); return false;');
125     print '</td>';
126 }
127
128 // カード機能
129 if (USE_CARD) {
130     $onlick = "openNewWindow('card.php', 'card', true, 400, 500, true);";
131     print '<td id="tools5" style="display:none;">';
132     print show_icon(CARD_ICON, "", "", "card_icon", "card", "カード機能を使う", $onlick);
133     print '</td>';
134 }
135
136 // FreeMap連動
137 if (FREEMAP_URL) {
138     $onlick = "openNewWindow('".FREEMAP_URL."', 'map', false, '', '', true);";
139     print '<td id="tools0" style="display:none;">';
140     print show_icon(FREEMAP_ICON, "", "", "freemap", "MAP", "マップとコマを使う", $onlick);
141     print '</td>';
142 }
143
144 // 過去ログ表示
145 if (!DELETE_LAST_PASTLOG || PUBLIC_PASTLOG) {
146     print '<td id="tools1" style="display:none;">';
147     print show_icon(PASTLOG_SHOW_ICON, "", "", "pastlog_show", "ログ", "過去ログを見る", 'openUrl(\'pastlog_index.php\', \'pastlog\'); return false;');
148     print '</td>';
149 }
150 if (!DELETE_LAST_PASTLOG) {
151     print '<td id="tools2" style="display:none;">';
152     print show_icon(PASTLOG_DL_ICON, "", "", "pastlog_output", "DL", "過去ログをHTMLでダウンロード", "pastlogHtmlOutput();return false");
153     print "</td>\n";
154 }
155
156 if (COOKEI_EXPIRE && COOKIE) {
157     print '<td id="tools3" style="display:none;" nowrap>';
158     show_icon(COOKIE_WRITE_ICON, "", "", "", "CW", "チャットの設定をクッキーに保管します", "cookieWrite()")."\n";
159     show_icon(COOKIE_DELETE_ICON, "", "", "", "CD", "チャットのクッキーを削除します", "cookieDelete()")."\n";
160     show_icon(COOKIE_SAVE_ICON, "", "", "", "CD", "チャットの設定をファイルに保管します", "cookiesaveFile()")."\n";
161     print "</td>\n";
162 }
163 // 携帯使用
164 if (USE_MOBILE) {
165     print '<td id="tools4" style="display:none;">';
166     print show_icon(MOBILE_ICON, "", "", "mobile", "携帯", "携帯用URLを紹介", 'openUrl(\'info-mobile.php\', \'\'); return false;');
167     print '</td>'."\n";
168 }
169 print "<td>";
170 $onclick_help = 'toggleColumn(\'help_win\');';
171 show_icon(HELP_ICON, '', '', 'help_win_icon', '?', 'ヘルプをON/OFFします', $onclick_help);
172 ?>
173 </td>
174 <td align="right" id="logoutBt"><input type="button" value="退室" name="logout" class="logout" id="logout" /></td>
175 </table>
176
177 <?php
178 // ここから:TRPG市販ルール欄
179 if (DICE_MAX && USE_CONSUMER_RULES) {
180     print '<table border="0" cellspacing="3" cellpadding="0" id="consumer_rule" style="display:none;">'."\n";
181     print "<tr>";
182     // SW
183     if (SW) {
184         print '<td><td class="nodisplay"><form onsubmit="return false;"></td>';
185         print "<td>";
186         show_icon(SW_ICON, "", "", "", "SW", "SWレーティング振り欄をON/OFFします", "toggleColumn('cr_sw');");
187         print '</td><td id="cr_sw" ';
188         if (!SW_SHOW) {
189             print 'style="display:none;" ';
190         }
191         print 'nowrap>レーティング<input name="rating" id="rating" value="10" size="2">';
192         print ' + ';
193         print '<span title="修正値を入力してください"><input type="text" size="4" value="" name="sw_revision" id="sw_revision"></span>';
194         print '<span title="クリティカル値:「回らない」場合は空欄にして下さい"> C:';
195         print '<input type="text" size="1" value="10" name="sw_clit" id="sw_clit">';
196         print '</span>';
197         show_icon(DICE_ICON, "", "", "", "レーティング", "右で指定したレーティングを入力します。", "insertSWRating(this.form, columnId);");
198         print '<input type="submit" style="display:none;" onclick="insertSWRating(this.form, columnId);">';
199         print '<td class="nodisplay"></form></td>'."\n";
200     }
201
202     // 一定値以上の出目カウント
203     if (PICKUP) {
204         print '<td>';
205         show_icon(PICKUP_ICON, "", "", "", "↑↓", "指定値以上/以下の出目のみを数えます", "toggleColumn('cr_pickup');");
206         print '</td><td class="nodisplay"><form onsubmit="return false;"></td>'."\n";
207         print '<td id="cr_pickup" ';
208         if (!PICKUP_SHOW) {
209             print 'style="display:none;" ';
210         }
211         print 'nowrap>';
212         print '<input id="pickup_num" value="'.PICKUP_DEFAULT_DICE_NUM.'" size="2">d';
213         print '<input id="pickup_dice_number" value="'.PICKUP_DEFAULT_DICE_NUMBER.'" size="2"> ';
214         print '+';
215         print '<span title="修正値を入力してください"><input type="text" size="2" value="" id="pickup_revision"></span>';
216         print ' <input type="text" size="1" value="'.PICKUP_DEFAULT_NUMBER.'" id="pickup_number">';
217         print '<select id="u_l"><option value="u" selected>以上<option value="l">以下</select>';
218         print ' <span title="最大の出目のみを合計します 例:5d6=2,4,3,3,5 = 5">MAXのみ:<input id="pickup_count_max" type="checkbox"></span>';
219         print ' <span title="クリティカル値 8:「8で」クリティカル 8-:8「以上」でクリティカル">C:';
220         print '<input type="text" size="1" value="'.PICKUP_DEFAULT_CLIT.'" id="pickup_clit">';
221         print '</span>';
222         print ' <span title="クリティカルで振り足されるダイスを発言欄に入力します">振り足す:<input id="pickup_crolling" type="checkbox"></span>';
223
224         print ' <span title="クリティカルはダイス出目の最大値として扱います 例:d10 クリティカル値8以上で出目9 = 10扱い">C=MAX:<input id="pickup_c_max" type="checkbox"></span>';
225         show_icon(DICE_ICON, "", "", "dice", "ダイス入力", "右&上で指定したダイスを入力します。", "insertPickupDice(columnId);");
226     print '<input type="submit" style="display:none;" onclick="insertPickupDice(columnId);">';
227         print '<td class="nodisplay"></form></td>'."\n";
228     }
229
230     print '</td></tr></table>'."\n";
231 }
232 ?>
233 <!-- ここまで、市販ルールツール欄 -->
234
235 <!-- ここから、ダイスショートカット欄 -->
236 <?php
237 if (DICE_MAX && SHORTCUT_DICE) {
238     print '<table border="0" cellspacing="3" cellpadding="0" id="dice_shortcut" style="display:none;">'."\n";
239     print '<tr>'."\n";
240     for ($i=1;$i<=5;$i++) {
241         $dice_key = "dice_".$i;
242         print '<td class="nodisplay"><form onsubmit="return false;"></td>'."\n";
243         print '<td><input type="text" name="dice" class="diceShortCut" id="dice_'.$i.'" value="'.$cookies[$dice_key].'" onfocus="javascript:selectedColumnId(this, false);javascript:expandDiceShortcut(this);" onblur="javascript:selectedColumnId(this, false);shrinkDiceShortcut(this);"></td>'."\n";
244         print "<td>\n";
245         show_icon(DICE_ICON, "", "", "", "D", "右欄に設定のダイスを入力します", "insert(document.getElementById(columnId), 'dice_$i', $('#dice_$i').attr('value'), 0);");
246         print "</td>\n";
247         print '<input type="submit" style="display:none;" onclick="insert(document.getElementById(columnId), \'dice_'.$i.'\', $(\'#dice_'.$i.'\').attr(\'value\'), 0);">';
248         print '<td class="nodisplay"></form></td>'."\n";
249     }
250     print "<td>";
251     show_icon(DICE_SHORTCUT_SHOW_ICON, $img2, "", "dice_shortcut_icon", "↓", "ダイスショートカット欄2行目をON/OFFします", 'toggleColumn(\'dice_shortcut_2\')');
252     print "</td></tr>\n";
253     print '<tr id="dice_shortcut_2" style="display:none;">'."\n";
254     for ($i=6;$i<=10;$i++) {
255         $dice_key = "dice_".$i;
256         print '<td class="nodisplay"><form onsubmit="return false;"></td>'."\n";
257         print '<td><input type="text" name="dice" class="diceShortCut" id="dice_'.$i.'" value="'.$cookies[$dice_key].'" onfocus="javascript:selectedColumnId(this, false);javascript:expandDiceShortcut(this);" onblur="selectedColumnId(this, false);shrinkDiceShortcut(this);"></td>'."\n";
258         print '<td>';
259         show_icon(DICE_ICON, "", "", "dice", "D", "右欄に設定のダイスを入力します", "insert(document.getElementById(columnId), 'dice_$i', $('#dice_$i').attr('value'), 0);");
260         print "</td>\n";
261         print '<input type="submit" style="display:none;" onclick="insert(document.getElementById(columnId), \'dice_'.$i.'\', $(\'#dice_'.$i.'\').attr(\'value\'), 0);">';
262         print '<td class="nodisplay"></form></td>'."\n";
263     }
264     print '<td>&nbsp;</td>'."\n";
265     print '</tr></table>'."\n";
266 }
267 ?>
268
269 <!-- ここから、PC/NPC欄 -->
270 <?php
271 if (PC_NUM >= 1) {
272     for ($i=0; $i<=PC_NUM; $i++) {
273         $pc_name_key = "pc_name_".$i;
274         $pc_color_key = "pc_color_".$i;
275         $pc_color_select_key = "pc_color_select_".$i;
276         $pc_status_key = "pc_status_".$i;
277         print '<table border="0" cellspacing="3" cellpadding="0" id="pc_'.$i.'" class="add_pc"; style="display:none;">'."\n";
278         print '<tr>'."\n";
279         print '<td class="nodisplay"><form onsubmit="return false;" id="'.$i.'"></td>'."\n";
280         print '<td><input type="submit" value="発言" class="" id="submit" style="display:inline" name="submit" onclick="comment(this.form)"></td>'."\n";
281         print '<td align="left" nowrap><input type="text" name="pc_name" value="'.$cookies[$pc_name_key].'" size="6" class="pc_name inputmain" id="pc_name_'.$i.'" style="font-weight:bold; color:#'.$cookies[$pc_color_key].'" onblur="selectedColumnId(this, true)"></td>'."\n";
282
283 if (USER_WHISPER) {
284     print "<td>\n";
285     $onclick_whisper = "changeWhisperConfigClear(this);";
286     show_icon(WHISPER_ON_ICON, "", "", "whisper_mark_".$i, "∂","「ささやき」状態を表示", $onclick_whisper);
287     print "</td>\n";
288     print "<td>";
289     print '<input type="text" name="whisper_to" value="全員" size="6" class="whisper_to" id="whisper_to_'.$i.'" style="display:inline;">';
290     print '<input type="hidden" name="whisper_to_hash" class="whisper_to_hash" id="whisper_to_hash_'.$i.'" value="">';
291     print "</td>\n";
292 }
293
294         print '<td><input type="text" name="pc_input" class="input_comment inputmain" size="75%" id="pc_input_'.$i.'" onblur="selectedColumnId(this, true);">';
295         print "</td>\n";
296         print '<td>';
297         show_icon(PC_STATUS_ICON, "", "", "", "状態", "ステータス欄をON/OFFします", "toggleColumn('status_$i');");
298         if ($i != PC_NUM-1) {
299             $num = $i+1;
300             show_icon(PC_SHOW_ICON, PC_HIDE_ICON, "", "PC_btn_$i", "PC欄", "PC欄を追加/削除します", "toggleColumn('pc_$num');");
301         } else {
302             print " ";
303         }
304         print "</td>\n";
305         print '</tr>'."\n";
306         print '</table>'."\n";
307         print '<table border="0" cellspacing="3" cellpadding="0" class="status_column" id="status_'.$i.'" style="display:none;">'."\n";
308         print '<tr>'."\n";
309         print '<td nowrap>名前色</td>'."\n";
310         print '<td id="select_color_'.$i.'">';
311         print '<select onChange=\'changeColor(this)\' style="font-weight: bold; color:#'.$cookies[$pc_color_key].';" id="pc_color_select" name="pc_color_select_'.$i.'" class="inputmain">'."\n";
312         colorbox("pc_color", $cookies[$pc_color_select_key]);
313         print '</select></td>'."\n";
314         print '<td id="free_color_'.$i.'" style="display:none;"><input type="text" value="'.$cookies[$pc_color_key].'" size="10" name="pc_color" id="pc_color_'.$i.'" style="font-weight: bold; color:#'.$cookies[$pc_color_key].';" onkeyup="changeColor(this)" class="inputmain"></td>'."\n";
315         print '<td>';
316         show_icon(PC_FONT_ICON, "", "", "", "F", "クリックでPC名文字色入力方法を変更できます", "toggleColumn('free_color_$i');toggleColumn('select_color_$i');");
317         print "</td>\n";
318         print '<td nowrap>ステータス:<input type="text" name="status" class="status inputmain" value="';
319         if ($cookies[$pc_status_key]) { 
320             print $cookies[$pc_status_key];
321         } else {
322             print STATUS;
323         }
324         print '" id="pc_status_'.$i.'" onblur="selectedColumnId(this, true)"></td>'."\n";
325         print '<td><input name="show_status" type="checkbox" class="show_status"></td>'."\n";
326         print '<td nowrap> 表示</td>'."\n";
327         print '<td class="nodisplay"></form></td>'."\n";
328         print '</tr>'."\n";
329         print '</table>'."\n";
330     }
331 }
332  ?>
333
334 <!-- ここから:PLログイン画面欄  -->
335 <table border="0" cellspacing="3" cellpadding="0" id="offline" style="display:inline; height:30px;">
336 <tr>
337 <td class="nodisplay"><form id="chat_off" name="chat" onsubmit="return false;" action=""></td>
338 <td nowrap>お名前<input type="text" name="name_off" value="<?php if ($cookies[name_off]) { print $cookies[name_off]; } else { print NONAME; } ?>" size="8" class="inputname" id="name_off"></td>
339 <td nowrap>パスワード<input type="password" name="pwd_off" size="6" class="inputpwd" id="pwd_off"></td>
340 <td width="35"><input type="submit" value="入室" name="login" class="login_btn_area" id="login" /></td>
341 <td><?php show_icon(RELOAD_ICON, "", "", "reload", "R", "チャット画面をリフレッシュ!", "window.mainframe.location.reload()"); ?></td>
342 <td class="nodisplay"></form></td>
343 <td><?php show_icon(HELP_ICON, '', '', 'help_win_icon', '?', 'ヘルプをON/OFFします', $onclick_help); ?></td>
344 <td class="nodisplay"><form action="<?php print HOME; ?>" target="<?php print HOME_TARGET; ?>"></td>
345 <td><input type="image" class="btn" src="<?php print HOME_ICON; ?>" value="submit" alt="ホーム" title="ホーム"></td>
346
347 <?php 
348 // FreeMap連動
349 if (FREEMAP_URL) {
350     print '<td>';
351     print show_icon(FREEMAP_ICON, "", "", "freemap", "MAP", "マップとコマを使う", 'openUrl(\''.FREEMAP_URL.'\', \'map\'); return false;');
352     print '</td>';
353 }
354
355 // 過去ログ表示
356 if (!(DELETE_LAST_PASTLOG && !PUBLIC_PASTLOG)) { 
357     print '<td>';
358     print show_icon(PASTLOG_SHOW_ICON, "", "", "pastlog_show", "ログ", "過去ログを見る", 'openUrl(\'./pastlog_index.php\', \'pastlog\'); return false;');
359     print '</td>';
360
361     if (!DELETE_LAST_PASTLOG) {
362         print '<td>';
363         print show_icon(PASTLOG_DL_ICON, "", "", "pastlog_output", "DL", "過去ログをHTMLでダウンロード", "pastlogHtmlOutput(); return false;");
364         print "</td>";
365     }
366 }
367
368 if (COOKEI_EXPIRE && COOKIE) {
369     print "<td>";
370     show_icon(COOKIE_LOAD_ICON, "", "", "", "CD", "チャットの設定をファイルから読み込みます", "toggleColumn('load_cookie'); return false;")."\n";
371     print "</td>\n";
372 }
373
374 // 携帯使用
375 if (USE_MOBILE) {
376     print '<td>';
377     print show_icon(MOBILE_ICON, "", "", "mobile", "携帯", "携帯用URLを紹介", 'openUrl(\'./info-mobile.php\', \'\'); return false;');
378     print '</td>';
379 }
380
381 ?>
382 <td class="nodisplay"></form></td>
383
384 </tr>
385 </table>