remove old readme
[atutor.git] / themes / mobile / instructor / statistics / course_stats.tmpl.php
1 <?php if ($this->mobile_device_type == IPAD_DEVICE): ?>
2 <table cellspacing="1" cellpadding="1" border="0" class="bodyline" summary="course statistics" align="center">
3         <tr>
4                 <th colspan="2" class="cyan"><small class="bigspacer"><?php
5                         echo '<a href="'.$_SERVER['PHP_SELF'].'?month='.($this->last_month).SEP.'year='.$this->last_year.'">';
6                         echo ' '.AT_date('%F', $this->last_month, AT_DATE_INDEX_VALUE ); ?></a> |</small>
7                         <?php echo AT_date('%F', $this->month, AT_DATE_INDEX_VALUE ); ?> <small class="bigspacer">| <?php
8                         echo '<a href="'.$_SERVER['PHP_SELF'].'?month='.$this->next_month.SEP.'year='.$this->next_year.'">';
9                         echo AT_date('%F', $this->next_month, AT_DATE_INDEX_VALUE); ?> </a></small></th>
10         </tr>
11 <?php
12                 if (($this->num_days == 0) || ($this->empty)) {
13                         echo '<tr>';
14                         echo '<td class="row1" colspan="2">'._AT('no_month_data').'</td>';
15                         echo '</tr>';
16                         echo '</table>';
17                         require(AT_INCLUDE_PATH.'footer.inc.php');
18                         exit;
19                 }
20 ?>
21         <tr>
22                 <td class="row1" valign="top" align="right"><strong><?php echo _AT('total'); ?>:</strong></td>
23                 <td class="row1"><?php echo $this->total_logins; ?></td>
24         </tr>
25         <tr><td height="1" class="row2" colspan="2"></td></tr>
26         <tr>
27                 <td class="row1" valign="top" align="right"><strong><?php echo _AT('maximum'); ?>:</strong></td>
28                 <td class="row1"><?php echo $this->max_total_logins; ?></td>
29         </tr>
30         <tr><td height="1" class="row2" colspan="2"></td></tr>
31
32         <tr>
33                 <td class="row1" valign="top" align="right"><strong><?php echo _AT('minimum'); ?>:</strong></td>
34                 <td class="row1"><?php
35                 if ($this->min_total_logins < 99999999) {
36                         echo $this->min_total_logins; 
37                 } else {
38                         echo '0';
39                 } ?></td>
40         </tr>
41         <tr><td height="1" class="row2" colspan="2"></td></tr>
42         <tr>
43                 <td class="row1" valign="top" align="right"><strong><?php   echo _AT('average'); ?>:</strong></td>
44                 <td class="row1"><?php echo number_format($this->avg_total_logins, 1); ?> <?php   echo _AT('per_day'); ?></td>
45         </tr>
46         <tr><td height="1" class="row2" colspan="2"></td></tr>
47
48         <tr>
49                 <td class="row1" valign="top" align="right" <strong><?php   echo _AT('graph'); ?>:</strong></td>
50                 <td class="row1">
51                         <table border="0" cellspacing="0" cellpadding="0">
52                         <tr>
53                                 <td valign="top" class="graph1"><small><?php echo $this->max_total_logins; ?></small></td>
54
55 <?php
56                         foreach ($this->days as $day => $logins) {
57                         $dd++;
58                                 echo '<td valign="bottom" class="graph"><img src="images/clr.gif" height="'.(($this->max_total_logins*$this->multiplyer_height) % $this->block_height + $this->block_height).'" width="10" alt="" /><br /><img src="images/blue.gif" height="'.($logins[0]*$this->multiplyer_height).'" width="9" alt="'.$logins[0].' '._AT('guests').' ('.($logins[0]+$logins[1]).' '._AT('total').')" /><br /><img src="images/red.gif" height="'.($logins[1]*$this->multiplyer_height).'" width="9" alt="'.$logins[1].' '._AT('members').' ('.($logins[1]+$logins[0]).' '._AT('total').')" /><br /><small>'.$dd.'&nbsp;</small></td>';
59
60                         } while ($row = mysql_fetch_array($this->result));
61 ?>
62
63                         </tr>
64                         <tr>
65                                 <td valign="top"><small>0</small></td>
66                         </tr>
67                         </table>
68
69                         <small><?php  echo _AT('legend'); ?>: <img src="images/red.gif" height="10" width="10" alt="<?php echo _AT('red_members'); ?>" /> <?php   echo _AT('members'); ?>,
70                                 <img src="images/blue.gif" height="10" width="10" alt="<?php echo _AT('blue_guests'); ?>" /> <?php echo _AT('guests'); ?>.</small>
71                 </td>
72         </tr>
73         <tr><td height="1" class="row2" colspan="2"></td></tr>
74         <tr>
75                 <td class="row1" valign="top" align="right"><strong><?php echo _AT('raw_data'); ?>:</strong></td>
76                 <td class="row1" align="center">
77         
78                 <table class="data static" summary="" rules="cols">
79                 <thead>
80                 <tr>
81                         <th scope="col"><?php echo _AT('date');    ?></th>
82                         <th scope="col"><?php echo _AT('guests');  ?></th>
83                         <th scope="col"><?php echo _AT('members'); ?></th>
84                 </tr>
85                 </thead>
86                 <tbody>
87                 <?php $short_name = $month_name_con['en'][$month-1]; ?>
88                 <?php foreach ($this->days as $day => $logins):?>
89                         <tr>
90                                 <td><?php echo $short_name.' '.$day; ?></td>
91                                 <td><?php echo $logins[0]; ?></td>
92                                 <td><?php echo $logins[1]; ?></td>
93                         </tr>
94                 <?php endforeach; ?>
95                 <tbody>
96                 </table>
97
98                 </td>
99         </tr>
100         </table>
101 <?php endif;?>
102 <?php if ($this->mobile_device_type != IPAD_DEVICE): ?>
103
104 <table style="width: 100%" cellspacing="1" cellpadding="1" border="0" class="bodyline" summary="course statistics" align="center" frame="box" >
105         <tr>
106                 <th colspan="2" class="cyan"><small class="bigspacer"><?php
107                         echo '<a href="'.$_SERVER['PHP_SELF'].'?month='.($this->last_month).SEP.'year='.$this->last_year.'">';
108                         echo ' '.AT_date('%F', $this->last_month, AT_DATE_INDEX_VALUE ); ?></a> |</small>
109                         <?php echo AT_date('%F', $this->month, AT_DATE_INDEX_VALUE ); ?> <small class="bigspacer">| <?php
110                         echo '<a href="'.$_SERVER['PHP_SELF'].'?month='.$this->next_month.SEP.'year='.$this->next_year.'">';
111                         echo AT_date('%F', $this->next_month, AT_DATE_INDEX_VALUE); ?> </a></small></th>
112         </tr>
113 <?php
114                 if (($this->num_days == 0) || ($this->empty)) {
115                         echo '<tr>';
116                         echo '<td class="row1" colspan="2">'._AT('no_month_data').'</td>';
117                         echo '</tr>';
118                         echo '</table>';
119                         require(AT_INCLUDE_PATH.'footer.inc.php');
120                         exit;
121                 }
122 ?>
123         <tr>
124                 <td class="row1" valign="top" align="right"><strong><?php echo _AT('total'); ?>:</strong></td>
125                 <td class="row1"><?php echo $this->total_logins; ?></td>
126         </tr>
127         <tr><td height="1" class="row2" colspan="2"></td></tr>
128         <tr>
129                 <td class="row1" valign="top" align="right"><strong><?php echo _AT('maximum'); ?>:</strong></td>
130                 <td class="row1"><?php echo $this->max_total_logins; ?></td>
131         </tr>
132         <tr><td height="1" class="row2" colspan="2"></td></tr>
133
134         <tr>
135                 <td class="row1" valign="top" align="right"><strong><?php echo _AT('minimum'); ?>:</strong></td>
136                 <td class="row1"><?php
137                 if ($this->min_total_logins < 99999999) {
138                         echo $this->min_total_logins; 
139                 } else {
140                         echo '0';
141                 } ?></td>
142         </tr>
143         <tr><td height="1" class="row2" colspan="2"></td></tr>
144         <tr>
145                 <td class="row1" valign="top" align="right"><strong><?php   echo _AT('average'); ?>:</strong></td>
146                 <td class="row1"><?php echo number_format($this->avg_total_logins, 1); ?> <?php   echo _AT('per_day'); ?></td>
147         </tr>
148         <tr><td height="1" class="row2" colspan="2"></td></tr>
149
150
151         <tr><td height="1" class="row2" colspan="2"></td></tr>
152         <tr>
153                 <td class="row1" valign="top" align="right"><strong><?php echo _AT('raw_data'); ?>:</strong></td>
154                 <td class="row1" align="center">
155         
156                 <table class="data static" summary="" rules="cols" frame="box">
157                 <thead>
158                 <tr>
159                         <th scope="col"><?php echo _AT('date');    ?></th>
160                         <th scope="col"><?php echo _AT('guests');  ?></th>
161                         <th scope="col"><?php echo _AT('members'); ?></th>
162                 </tr>
163                 </thead>
164                 <tbody>
165                 <?php $short_name = $month_name_con['en'][$month-1]; ?>
166                 <?php foreach ($this->days as $day => $logins):?>
167                         <tr>
168                                 <td><?php echo $short_name.' '.$day; ?></td>
169                                 <td><?php echo $logins[0]; ?></td>
170                                 <td><?php echo $logins[1]; ?></td>
171                         </tr>
172                 <?php endforeach; ?>
173                 <tbody>
174                 </table>
175
176                 </td>
177         </tr>
178         </table>
179 <?php endif;?>