source: alternc/trunk/bureau/admin/main.php @ 2098

Revision 2098, 3.4 KB checked in by anarcat, 5 years ago (diff)

add date, remove cruft

Line 
1<?php
2/*
3 $Id: main.php,v 1.3 2004/05/19 14:23:06 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:
27 Purpose of file:
28 ----------------------------------------------------------------------
29*/
30require_once("../class/config.php");
31
32include("head.php");
33?>
34</head>
35<body>
36<?php
37// Show last login information :
38__("Last Login: ");
39
40echo format_date('the %3$d-%2$d-%1$d at %4$d:%5$d',$mem->user["lastlogin"]);
41printf("&nbsp;"._('from: <code> %1$s </code>')."<br />",$mem->user["lastip"]);
42
43if ($mem->user["lastfail"]) {
44        printf(_("%1\$d login failed since last login")."<br />",$mem->user["lastfail"]);
45}
46
47$mem->resetlast();
48
49# use MagpieRSS to syndicate content from another site if available
50
51# this should work, since the debian package installs it in
52# /usr/share/php, which is in the include path
53if (include_once('magpierss/rss_fetch.inc')) {
54  $rss = fetch_rss( variable_get('rss_feed') );
55
56  if ($rss) {
57    echo "<h2>" . _("Latest news") . "</h2>";
58    foreach ($rss->items as $item) {
59      $href = $item['link'];
60      $title = $item['title'];
61      echo "<h3><a href=$href>$title</a></h3>";
62      echo '<span class="date">'.$item['pubdate'] .'</span> - ';
63      echo '<span class="author">'.$item['dc']['creator'].'</span>';
64      echo $item['summary'];
65    }
66  }
67}
68
69if($admin->enabled) {
70  $expiring = $admin->renew_get_expiring_accounts();
71
72  if(is_array($expiring) && count($expiring) > 0) {
73    echo "<h2>" . _("Expired or about to expire accounts") . "</h2>\n";
74    echo "<table cellspacing=\"2\" cellpadding=\"4\">\n";
75    echo "<tr><th>"._("uid")."</th><th>"._("Last name, surname")."</th><th>"._("Expiry")."</th></tr>\n";
76    foreach($expiring as $account) {
77      echo "<tr class=\"exp{$account['status']}\"><td>{$account['uid']}</td>";
78      if($admin->checkcreator($account['uid']))
79        echo "<td><a href=\"adm_edit.php?uid={$account['uid']}\">{$account['nom']}, {$account['prenom']}</a></td>";
80      else
81        echo "<td>{$account['nom']}, {$account['prenom']}</td>";
82      echo "<td>{$account['expiry']}</td></tr>\n";
83    }
84    echo "</table>\n";
85  }
86}
87
88/*
89<h3>
90Le bureau AlternC de ce serveur est en travaux actuellement.<br />
91Il se peut que certaines parties du bureau soient inaccessibles ponctuellement.<br />
92Si une partie du bureau ne fonctionne pas pendant longtemps, n'hésitez pas, contactez le
93mainteneur par mail : <a href="mailto:root@heberge.info">root@heberge.info</a>
94</h3>
95*/
96?>
97</body>
98</html>
Note: See TracBrowser for help on using the repository browser.