remove old readme
[atutor.git] / themes / default / admin / index.tmpl.php
1 <?php global $_config; $_config_defaults;?>
2 <div class="container" style="width: 40%; float: right; padding-top: 4px; padding-left: 10px;">
3         <div class="input-form" style="width: 98%;">
4                         <div class="row">
5                                 <h3><?php echo _AT('social_switch'); ?></h3>
6                                 <p><?php echo _AT('social_switch_text'); ?></p>
7                         </div>
8                         <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
9                         <fieldset>
10                         <legend id="social_networking"><?php echo _AT('social_switch'); ?></legend>(<?php echo _AT('default'); ?>: <?php echo ($_config_defaults['just_social'] ? _AT('just_social') : _AT('social_and_lms')); ?>)
11                         <div class="row">
12                         <input type="radio" name="just_social" value="1" id="social_y" <?php if($_config['just_social']) { echo 'checked="checked"'; }?>  /><label for="social_y"><?php echo _AT('just_social'); ?></label> <br /><input type="radio" name="just_social" value="0" id="social_n" <?php if(!$_config['just_social']) { echo 'checked="checked"'; }?>  /><label for="social_n"><?php echo _AT('social_and_lms'); ?></label>
13                         </div>
14
15                         <div class="row buttons">
16                                 <input type="submit" name="social_submit" value="<?php echo _AT('save'); ?>" />
17                         </div>
18                         </fieldset>
19                         </form>
20
21         </div>
22         <div class="input-form" style="width: 98%;">
23                         <div class="row">
24                                 <h3><?php echo _AT('donate'); ?></h3>
25                                 <p><?php echo _AT('donate_text'); ?></p>
26                         </div>
27
28                         <div style="text-align:center;">
29                                 <a href="http://www.atutor.ca/payment/index.php?project=ATutor-Donation"><img src="<?php echo $this->base_href; ?>/images/donate.gif" height="28" width="136" border="0" alt="<?php echo _AT('donate'); ?>" /></a><br /><br />
30                         </div>
31         </div>
32
33         <div class="input-form" style="width: 98%;">
34         
35                 <form method="get" action="mods/_core/users/instructor_requests.php">
36                         <div class="row">
37                                 <h3><?php echo _AT('instructor_requests'); ?></h3>
38                                 
39                                 <?php foreach($this->row_instructor as $key => $value): ?>
40                                 
41                                 <p><?php echo _AT('instructor_requests_text', $value['cnt']); ?></p>
42                                 <?php endforeach;?>
43                         </div>
44
45                         <div class="row buttons">
46                                 <input type="submit" name="submit" value="<?php echo _AT('view'); ?>" />
47                         </div>
48                         
49                 </form>
50                 
51         </div>
52
53         
54         <div class="input-form" style="width: 98%;">
55                 <form method="get" action="mods/_standard/patcher/index_admin.php">
56                         <div class="row">
57                                 <h3><?php echo _AT('available_patches'); ?></h3>
58                                 <p><?php echo _AT('available_patches_text', $this->cnt); ?></p>
59                         </div>
60
61                         <div class="row buttons">
62                                 <input type="submit" name="submit" value="<?php echo _AT('view'); ?>" />
63                         </div>
64                 </form>
65         </div>
66         <div class="input-form" style="width: 98%">
67                 <div class="row">
68                         <h3><?php echo _AT('statistics_information'); ?></h3>
69
70                         <dl class="col-list">
71                                 <?php if ($this->db_size): ?>
72                                         <dt><?php echo _AT('database'); ?>:</dt>
73                                         <dd><?php echo number_format($this->db_size/AT_KBYTE_SIZE/AT_KBYTE_SIZE,2); ?> <acronym title="<?php echo _AT('megabytes'); ?>"><?php echo _AT('mb'); ?></acronym></dd>
74                                 <?php endif; ?>
75
76                                 <?php if ($this->du_size): ?>
77                                         <dt><?php echo _AT('disk_usage'); ?>:</dt>
78                                         <dd><?php echo number_format($this->du_size/AT_KBYTE_SIZE,2); ?> <acronym title="<?php echo _AT('megabytes'); ?>"><?php echo _AT('mb'); ?></acronym></dd>
79                                 <?php endif; ?>
80
81                                 <dt><?php echo _AT('courses'); ?>:</dt>
82                                 <dd><?php echo $this->num_courses; ?></dd>
83
84                                 <dt><?php echo _AT('users'); ?>:</dt>
85                                 <dd><?php echo $this->num_users; ?></dd>
86
87                                 <dt><?php echo _AT('atutor_version'); ?>:</dt>
88                 <?php
89                     require('../svn.php');
90                     if (!empty($svn_data)) {
91                         $svn_data   = explode("\n", $svn_data);
92                         if (substr($svn_data[1], 0, 1) == 'r') {
93                             $svn_data = $svn_data[1];
94                         } else if (substr($svn_data[2], 0, 1) == 'r') {
95                             $svn_data = $svn_data[2];
96                         }
97
98                         if (count($svn_data) > 1) {
99                             $build = 'unknown';
100                             $build_date = date('Y-m-d H:i:s');
101                         } else {
102                             $svn_data   = explode(' ', $svn_data);
103
104                             $build      = $svn_data[0];
105                             $build_date = $svn_data[4] .' '. $svn_data[5];
106                         }
107                         $build_str = '(' . $build . ' - '.$build_date . ')';
108                     }
109                 ?>
110                                 <dd><?php echo _AT('atutor_version_text', VERSION . $build_str, urlencode(VERSION)); ?></dd>
111
112                                 <dt><?php echo _AT('php_version'); ?>:</dt>
113                                 <dd><?php echo PHP_VERSION; ?></dd>
114
115                                 <dt><?php echo _AT('mysql_version'); ?>:</dt>
116                                 <dd><?php echo $mysql_version; ?></dd>
117
118                                 <dt><?php echo _AT('os'); ?>:</dt>
119                                 <dd><?php echo @php_uname('s') . ' ' . @php_uname('r'); ?></dd>
120                         </dl>
121                 </div>
122         </div>
123
124 </div> 
125
126
127 <div class="admin_container" style="width: 55%;"> 
128         <?php 
129         $this->path_length = strlen($this->base_path);
130
131         echo '<ol id="tools" style="margin-right: 0px;">';
132         foreach ($this->top_level_pages as $page_info) {
133                 echo '<li class="top-tool"><a href="' . $page_info['url'] . '">' . $page_info['title'] . '</a>  ';
134
135                 $page_info['url'] = substr($page_info['url'], $this->path_length);
136
137                 if ($this->pages[$page_info['url']]['children']) {
138                         echo '<ul class="child-top-tool">';
139                         foreach ($this->pages[$page_info['url']]['children'] as $child) {
140                                 echo ' <li class="child-tool"><a href="'.$child.'">'._AT($this->pages[$child]['title_var']).'</a></li>';
141                         }
142                         echo '</ul>';
143                 }
144                 echo '</li>'; //end top-tool
145         }
146         echo '</ol>';
147         
148 ?>
149
150 </div>  <!-- end "container" -->
151