"Fossies" - the Fresh Open Source Software Archive 
Member "proma-0.8.3/pages/main.inc.php" (25 Oct 2007, 1989 Bytes) of package /linux/privat/old/proma-0.8.3.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PHP source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
1 <?php
2
3 /* ProMA (ProFTPd MySQL Admin), Copyright (C) 2002-2007 Stein Magnus Jodal
4 * ProMA comes with ABSOLUTELY NO WARRANTY.
5 * This is free software, and you are welcome to redistribute it
6 * under the terms of the GNU General Public License.
7 * Read 'COPYING' for further information.
8 */
9
10 /* ProMA Main Page
11 * $Id: main.inc.php,v 1.7 2007/10/25 19:13:35 jodal Exp $
12 */
13
14 ?>
15
16 <h2>Information</h2>
17
18 <?php
19
20 $query = "SELECT
21 COUNT($users_userid) AS users,
22 SUM($users_count) AS logins
23 FROM
24 $table_users
25 WHERE
26 $users_closed != 1";
27 $result = mysql_query($query) or die("Failed to query database.");
28
29 if ($result) {
30 $row = mysql_fetch_assoc($result);
31 $num_users = $row["users"];
32 $num_logins = $row["logins"];
33 }
34
35 if (!$num_users > 0) {
36 $num_users = 0;
37 }
38
39 if (!$num_logins > 0) {
40 $num_logins = 0;
41 }
42
43 ?>
44
45 <table>
46 <tr>
47 <th class="thv">Host</th>
48 <td class="tdb"><?php print $info_host; ?></td>
49 </tr>
50 <tr>
51 <th class="thv">Port</th>
52 <td class="tdb"><?php print $info_port; ?></td>
53 </tr>
54 <tr>
55 <th class="thv">Passive</th>
56 <td class="tdb"><?php print $info_passive; ?></td>
57 </tr>
58 <tr>
59 <th class="thv">Login</th>
60 <td class="tdb"><?php print $info_login; ?></td>
61 </tr>
62 <tr>
63 <th class="thv">Limits</th>
64 <td class="tdb"><?php print $info_limits; ?></td>
65 </tr>
66 </table>
67
68 <h2>Statistics</h2>
69
70 <table>
71 <tr>
72 <th class="thv">Size</th>
73 <td class="tdb"><?php print $info_size; ?></td>
74 </tr>
75 <tr>
76 <th class="thv">Speed</th>
77 <td class="tdb"><?php print $info_speed; ?></td>
78 </tr>
79 <tr>
80 <th class="thv">Users</th>
81 <td class="tdb"><?php print $num_users; ?></td>
82 </tr>
83 <tr>
84 <th class="thv">Logins</th>
85 <td class="tdb"><?php print $num_logins; ?></td>
86 </tr>
87 </table>
88
89 <?php
90
91 if ($mrtg_enable == true) {
92 print "<h2>Traffic</h2>\n\n";
93
94 print "<p>\n";
95
96 if (!empty($mrtg_link)) {
97 print "<a href=\"$mrtg_link\">\n";
98 }
99
100 print "<img src=\"$mrtg_image\" alt=\"Traffic\" />\n";
101
102 if (!empty($mrtg_link)) {
103 print "</a>\n";
104 }
105
106 print "</p>\n";
107 }
108
109 ?>