move code up one directory
[atutor.git] / themes / default / instructor / chat / index.tmpl.php
1 <?php if (count($this->tran_files) == 0) {
2         echo '<div style="width:90%;" class="input-form"><p>'._AT('chat_none_found').'</p></div>';
3 } else {?>
4         
5 <form name="form" method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">
6
7         <table class="data" rules="cols" summary="List of transcripts for chat">
8         <colgroup>
9                 <?php if ($this->col == 'name'): ?>
10                         <col />
11                         <col class="sort" />
12                         <col span="2" />
13                 <?php elseif($this->col == 'date'): ?>
14                         <col span="3" />
15                         <col class="sort" />
16                 <?php endif; ?>
17         </colgroup>
18         <thead>
19         <tr>
20                 <th scope="col">&nbsp;</th>
21                 <th scope="col"><a href="mods/_standard/chat/index.php?<?php echo $this->orders[$this->order]; ?>=name"><?php echo _AT('chat_transcript');?></a></th>
22                 <th scope="col"><?php echo _AT('status'); ?></th>
23                 <th scope="col"><a href="mods/_standard/chat/index.php?<?php echo $this->orders[$this->order]; ?>=date"><?php echo _AT('date'); ?></a></th> 
24                 </th> 
25         </tr>
26         </thead>
27         <?php
28
29         if (($this->col == 'date') && ($this->order == 'asc')) {
30                 asort($this->tran_files);
31         } else if (($this->col == 'date') && ($this->order == 'desc')) {
32                 arsort($this->tran_files);
33         } else if (($this->col == 'name') && ($this->order == 'asc')) {
34                 ksort($this->tran_files);
35         } else if (($this->col == 'name') && ($this->order == 'desc')) {
36                 krsort($this->tran_files);
37         }
38         reset ($this->tran_files);
39         ?>
40
41         <tbody>
42         <?php foreach ($this->tran_files as $file => $date) { ?>
43                 <tr onkeydown="document.form['<?php echo $file; ?>'].checked = true; rowselect(this);" onmousedown="document.form['<?php echo $file; ?>'].checked = true; rowselect(this);" id="r_<?php echo $file; ?>">
44                         <td><input type="radio" name="file" value="<?php echo $file; ?>" id="<?php echo $file; ?>" /></td>
45
46                         <td><label for="<?php echo $file; ?>"><?php echo $file; ?></label></td>
47                         <td>
48                                 <?php if (($file.'.html' == $this->admin['tranFile']) && ($this->admin['produceTran'])) { 
49                                         echo _AT('chat_currently_active');
50                                 } else {
51                                         echo _AT('chat_inactive');
52                                 }?>
53                         </td>
54         
55                         <td><?php echo AT_DATE(_AT('server_date_format'), $date); ?></td>
56                 </tr>
57         <?php } ?>
58         </tbody>
59
60         <tfoot>
61         <tr>
62                 <td colspan="4"><input type="submit" name="view" value="<?php echo _AT('view'); ?>" /> <input type="submit" name="delete" value="<?php echo _AT('delete'); ?>" /></td>
63         </tr>
64         </tfoot>
65
66         </table>
67 </form>
68 <?php
69 }?>