source: bureau/admin/sta_list.php @ 104

Revision 104, 3.9 KB checked in by anarcat, 7 years ago (diff)

[project @ alternc: changeset 2003-06-10 07:20:29 by root]
suite de la mise en conformité xhtml 1.0

Original author: root
Date: 2003-06-10 07:20:31

Line 
1<?php
2/*
3 $Id: sta_list.php,v 1.3 2003/06/10 07:20:30 root 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:
27 Purpose of file:
28 ----------------------------------------------------------------------
29*/
30require_once("../class/config.php");
31
32$nosta=false;
33if (!$r=$stats->get_list()) {
34        $error=$err->errstr();
35        $nosta=true;
36}
37
38include("head.php");
39?>
40</head>
41<body>
42<h3><?php __("Statistics List"); ?></h3>
43<?php
44        if ($quota->cancreate("stats")) { ?>
45<p>
46                - <a href="sta_add.php"><?php __("Create new Statistics"); ?></a><br />
47                - <a href="sta_add_raw.php"><?php __("Create new Raw Statistics (apache)"); ?></a>
48</p>
49<?php   }
50
51        if ($error) {
52                echo "<p><font color=red>$error</font></p>";
53        }
54
55if (!$nosta) {
56?>
57
58<p>
59<?php __("help_sta_list"); ?>
60</p>
61<form method="post" action="sta_del.php">
62<table cellspacing="0" cellpadding="4">
63<tr><th colspan="2">&nbsp;</th><th><?php __("Domain name"); ?></th><th><?php __("Language"); ?></th><th><?php __("Folder"); ?></th><th><?php __("View"); ?></tr>
64<?php
65reset($r);
66$col=1;
67while (list($key,$val)=each($r))
68        {
69        $col=3-$col;
70?>
71        <tr class="lst<?php echo $col; ?>">
72                <td><input type="checkbox" class="inc" name="del_<?php echo $val["id"]; ?>" value="<?php echo $val["id"]; ?>" /></td>
73                <td><a href="sta_edit.php?id=<?php echo $val["id"] ?>"><?php __("Edit"); ?></a></td>
74                <td><?php echo $val["hostname"] ?></td>
75                <td><?php echo $stats->langname[$val["lang"]]; ?></td>
76                <td><code>/<?php echo $val["dir"] ?></code></td>
77                <td><?php
78        if ($uv=$bro->viewurl($val["dir"],"")) echo "<a href=\"$uv\">"._("View")."</a>";
79?>&nbsp;</td>
80        </tr>
81<?php
82        }
83
84?>
85
86<tr><td colspan="5"><input type="submit" class="inb" name="submit" value="<?php __("Delete the checked Statistics"); ?>" /></td></tr>
87</table>
88</form>
89
90<?php $mem->show_help("sta_list"); 
91
92}
93
94if (!$r=$stats->get_list_raw()) {
95        $error=$err->errstr();
96        echo "<p class=\"error\">$error</p>";
97} else {
98
99?>
100
101<form method="post" action="sta_del_raw.php">
102<table cellspacing="0" cellpadding="4">
103<tr><th colspan="2">&nbsp;</th><th><?php __("Domain name"); ?></th><th><?php __("Folder"); ?></th><th><?php __("View"); ?></tr>
104<?php
105reset($r);
106$col=1;
107while (list($key,$val)=each($r))
108        {
109        $col=3-$col;
110?>
111        <tr class="lst<?php echo $col; ?>">
112                <td><input type="checkbox" class="inc" name="del_<?php echo $val["id"]; ?>" value="<?php echo $val["id"]; ?>" /></td>
113                <td><a href="sta_edit_raw.php?id=<?php echo $val["id"] ?>"><?php __("Edit"); ?></a></td>
114                <td><?php echo $val["hostname"] ?></td>
115                <td><code>/<?php echo $val["folder"] ?></code></td>
116                <td><?php
117        if ($uv=$bro->viewurl($val["dir"]."/".$val["hostname"],"")) echo "<a href=\"$uv\">"._("View")."</a>";
118?>&nbsp;</td>
119        </tr>
120<?php
121        }
122
123?>
124
125<tr><td colspan="5"><input type="submit" class="inb" name="submit" value="<?php __("Delete the checked Raw Statistics (apache)"); ?>" /></td></tr>
126</table>
127</form>
128
129
130<?php
131}
132 ?>
133</body>
134</html>
Note: See TracBrowser for help on using the repository browser.