Changeset 1413 for trunk/bureau/admin/stats_show_per_month.php
- Timestamp:
- 08/02/05 16:56:51 (8 years ago)
- File:
-
- 1 edited
-
trunk/bureau/admin/stats_show_per_month.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bureau/admin/stats_show_per_month.php
r1412 r1413 91 91 } 92 92 93 if (! ($user_list = $admin->get_list())) {94 $error = $err->errstr();95 }96 $u = array();97 foreach ($user_list as $user) {98 $u[$user['uid']] = $user['login'];99 }100 $u[0] = 'inconnu';101 102 93 // the stats in the last $count months for all accounts 103 94 $db->query(" 104 SELECT SUM( s ize ) AS cnt,uid, date_format(105 DAY , '%Y-%m' ) AS `month` 106 FROM `stat_http` 95 SELECT SUM( s.size ) AS cnt, s.uid, date_format( 96 DAY , '%Y-%m' ) AS `month`, m.login 97 FROM `stat_http` s, membres m 107 98 WHERE `day` < CONCAT( date_format( DATE_ADD( NOW( ) , INTERVAL 1 108 99 MONTH ) , '%Y-%m' ) , '-01' ) 109 100 AND `day` >= CONCAT( date_format( DATE_SUB( NOW( ) , INTERVAL " . (int) ($count - 1) . 110 " MONTH ) , '%Y-%m' ) , '-01' ) 101 " MONTH ) , '%Y-%m' ) , '-01' ) 102 AND m.uid = s.uid 111 103 GROUP BY `uid` , `month` 112 ORDER BY ` uid`104 ORDER BY `login` 113 105 "); 114 106 … … 118 110 if (!is_null($current_user)) { // not the first time we enter this block 119 111 $class = ($class== 'lst1' ? 'lst2' : 'lst1'); 120 print "<tr class=\"$class\"><td><acronym title=\"$ u[$current_user]\">" . $current_user ."</acronym></td>\n";112 print "<tr class=\"$class\"><td><acronym title=\"$current_user\">".$db->f("login")."</acronym></td>\n"; 121 113 foreach ($months as $m) { 122 114 print "<td>" . m_quota::display_val('bw_web', $entries[$m]) . "</td>\n";
Note: See TracChangeset
for help on using the changeset viewer.
