/
_overview.php
73 lines (70 loc) · 2.31 KB
/
_overview.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?php
/**
* This view generate the 'overview' tab inside global settings.
*
* @var int $usercount
* @var int $surveycount
* @var int $activesurveycount
* @var int $deactivatedsurveys
* @var int $activetokens
* @var int $deactivatedtokens
*
*/
?>
<?php if (YII_DEBUG) : ?>
<p class="alert alert-info "> this subview is rendered from global setting module. This message is shown only when debug mode is on</p>
<?php endif;?>
<br />
<div class="table-responsive">
<table class='table table-hover'>
<tr>
<th><?php eT("Users"); ?>:</th>
<td><?php echo $usercount; ?></td>
</tr>
<tr>
<th><?php eT("Surveys"); ?>:</th>
<td><?php echo $surveycount; ?></td>
</tr>
<tr>
<th><?php eT("Active surveys"); ?>:</th>
<td><?php echo $activesurveycount; ?></td>
</tr>
<tr>
<th><?php eT("Deactivated result tables"); ?>:</th>
<td><?php echo $deactivatedsurveys; ?></td>
</tr>
<tr>
<th><?php eT("Active survey participants tables"); ?>:</th>
<td><?php echo $activetokens; ?></td>
</tr>
<tr>
<th><?php eT("Deactivated survey participants tables"); ?>:</th>
<td><?php echo $deactivatedtokens; ?></td>
</tr>
<?php if (YII_DEBUG) : ?>
<!-- If debug mode is on, we show the new parameter -->
<tr>
<th>Value of myNewParam :</th>
<td><?php echo $myNewParam; ?></td>
</tr>
<?php endif; ?>
<?php
if (Yii::app()->getConfig('iFileUploadTotalSpaceMB') > 0) {
$fUsed = calculateTotalFileUploadUsage();
?>
<tr>
<th><?php eT("Used/free space for file uploads"); ?>:</th>
<td><?php echo sprintf('%01.2F', $fUsed); ?> MB / <?php echo sprintf('%01.2F', Yii::app()->getConfig('iFileUploadTotalSpaceMB') - $fUsed); ?> MB</td>
</tr>
<?php
}
?>
</table>
</div>
<?php
if (Permission::model()->hasGlobalPermission('superadmin', 'read')) {
?>
<p><a href="<?php echo $this->createUrl('admin/globalsettings', array('sa' => 'showphpinfo')) ?>" target="blank" class="button"><?php eT("Show PHPInfo"); ?></a></p>
<?php
}
?>