Tokiwa Battle Royale  GE777
A PHP Battle Royale inspired game
 All Data Structures Namespaces Files Functions Variables Pages
1_chat.tpl.php
Go to the documentation of this file.
1 <?php if(!defined('IN_GAME')) exit('Access Denied'); ?>
2 <table id="chat" border="0" width="720" cellspacing="0" cellpadding="0" style="valign:top">
3 <tr>
4 <td height="20px" width="100%" class="b1"><span>消息</span></td>
5 </tr>
6 <tr>
7 <td valign="top" class="b3" style="text-align: left" height="1px">
8 <div id="chatlist" class="chatlist">
9 <?php if(is_array($chatdata['msg'])) { foreach($chatdata['msg'] as $msg) { ?>
10 <?php echo $msg?>
11 <?php } } ?>
12 </div>
13 </td>
14 </tr>
15 <tr>
16 <td class="b3" height="5"></td>
17 </tr>
18 <tr>
19 <td class="b3" height="35">
20 <div>
21 <form type="post" id="sendchat" name="sendchat" action="chat.php" onsubmit="return false;" >
22 <input type="hidden" id="lastcid" name="lastcid" value="<?php echo $chatdata['lastcid']?>">
23 <input type="hidden" id="teamID" name="teamID" value="<?php echo $teamID?>">
24 <input type="hidden" id="sendmode" name="sendmode" value="ref">
25 <span id="chattype">
26 <select name="chattype" value="2">
27 <option value="0" selected><?php echo $chatinfo['0']?>
28 <?php if($teamID) { ?>
29 <option value="1" ><?php echo $chatinfo['1']?>
30 <?php } ?>
31 </select>
32 </span>
33 <input type="text" id="chatmsg" name="chatmsg" maxlength="60" >
34 <input type="button" id="send" onClick="document['sendchat']['sendmode'].value='send';chat('send',<?php echo $chatrefresh?>);return false;" value="发送">
35 <input type="button" id="ref" onClick="document['sendchat']['sendmode'].value='ref';chat('ref',<?php echo $chatrefresh?>);return false;" value="刷新">
36 </form>
37 <script type="text/javascript">chat('ref',<?php echo $chatrefresh?>);</script>
38 </div>
39 </td>
40 </tr>
41 </table>
$chatinfo
$chatdata
Definition: game.php:43
$chatrefresh
Definition: system.php:45
function chat(mode, reftime)
Definition: game.js:282
value
Definition: 1_chat.tpl.php:34