Alternc  3.2
Alternc logiel libre pour l'hébergement
 All Data Structures Namespaces Files Functions Variables Pages
logs_list.php
Go to the documentation of this file.
1 <?php
2 /*
3  $Id: log_list.php,v 1.8 2006/02/16 16:26:28 benjamin Exp $
4  ----------------------------------------------------------------------
5  AlternC - Web Hosting System
6  Copyright (C) 2002 by the AlternC Development Team.
7  http://alternc.org/
8  ----------------------------------------------------------------------
9  Based on:
10  Valentin Lacambre's web hosting softwares: http://altern.org/
11  ----------------------------------------------------------------------
12  LICENSE
13 
14  This program is free software; you can redistribute it and/or
15  modify it under the terms of the GNU General Public License (GPL)
16  as published by the Free Software Foundation; either version 2
17  of the License, or (at your option) any later version.
18 
19  This program is distributed in the hope that it will be useful,
20  but WITHOUT ANY WARRANTY; without even the implied warranty of
21  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  GNU General Public License for more details.
23 
24  To read the license please visit http://www.gnu.org/copyleft/gpl.html
25  ----------------------------------------------------------------------
26  Original Author of file: Lerider Steven
27  Purpose of file: Manage the log listing of a user
28  ----------------------------------------------------------------------
29 */
30 require_once("../class/config.php");
31 include_once("head.php");
32 
33 $list=$log->list_logs_directory_all($log->get_logs_directory());
34 ?>
35 <h3><?php __("Logs Listing"); ?></h3>
36 <hr id="topbar"/>
37 <br />
38 <?php
39 if (isset($error) && $error) {
40  echo "<p class=\"alert alert-danger\">$error</p>";
41 }
42 if(!$list || empty($list['dir'])){
43  echo "<p class=\"alert alert-danger\">"._("You have no web logs to list at the moment.")."</p>";
44  include_once('foot.php');
45  exit;
46 }
47 ?>
48 <p>
49 <?php __("Here are web logs of your account.<br/>You can download them to do specific extract and statistics.");?>
50 </p>
51 <table class="tlist">
52  <thead>
53  <tr><th><?php __("Name");?></th><th align=center><?php __("Creation Date"); ?></th><th><?php __("Size"); ?></th><th><?php __("Download link");?></th></tr>
54  </thead>
55  <tbody>
56 <?php
57 //listing of every logs of the current user.
58 while (list($key,$val)=each($list)){
59  foreach($val as $k => $v){
60  ?>
61  <tr class="lst">
62  <td><?php echo $v['name']; ?></td>
63  <td><?php echo $v['creation_date']; ?></td>
64  <td><?php echo format_size($v['filesize']); ?></td>
65  <td><?php echo "<a href=\"".$v['downlink']."\">"._("Download")."</a>";?></td>
66  </tr>
67 <?php
68  } //foreach
69 } // while
70 ?>
71  </tbody>
72 </table>