2006-04-26 12:28:53 +00:00
|
|
|
<?php
|
|
|
|
/*
|
|
|
|
$Id: main.php,v 1.3 2004/05/19 14:23:06 benjamin Exp $
|
|
|
|
----------------------------------------------------------------------
|
|
|
|
AlternC - Web Hosting System
|
|
|
|
Copyright (C) 2002 by the AlternC Development Team.
|
|
|
|
http://alternc.org/
|
|
|
|
----------------------------------------------------------------------
|
|
|
|
Based on:
|
|
|
|
Valentin Lacambre's web hosting softwares: http://altern.org/
|
|
|
|
----------------------------------------------------------------------
|
|
|
|
LICENSE
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License (GPL)
|
|
|
|
as published by the Free Software Foundation; either version 2
|
|
|
|
of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
To read the license please visit http://www.gnu.org/copyleft/gpl.html
|
|
|
|
----------------------------------------------------------------------
|
|
|
|
Original Author of file:
|
|
|
|
Purpose of file:
|
|
|
|
----------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
require_once("../class/config.php");
|
|
|
|
|
|
|
|
include("head.php");
|
|
|
|
?>
|
|
|
|
</head>
|
|
|
|
<body>
|
2008-04-10 18:05:51 +00:00
|
|
|
|
2008-04-14 18:58:53 +00:00
|
|
|
<h3>Bienvenue sur votre bureau AlternC.</h3>
|
2008-04-10 18:05:51 +00:00
|
|
|
|
|
|
|
<div id="info"><?php
|
2006-04-26 12:28:53 +00:00
|
|
|
// Show last login information :
|
|
|
|
__("Last Login: ");
|
|
|
|
|
|
|
|
echo format_date('the %3$d-%2$d-%1$d at %4$d:%5$d',$mem->user["lastlogin"]);
|
|
|
|
printf(" "._('from: <code> %1$s </code>')."<br />",$mem->user["lastip"]);
|
|
|
|
|
|
|
|
if ($mem->user["lastfail"]) {
|
|
|
|
printf(_("%1\$d login failed since last login")."<br />",$mem->user["lastfail"]);
|
|
|
|
}
|
|
|
|
|
|
|
|
$mem->resetlast();
|
|
|
|
|
2008-02-01 23:03:53 +00:00
|
|
|
# use MagpieRSS to syndicate content from another site if available
|
|
|
|
|
|
|
|
# this should work, since the debian package installs it in
|
|
|
|
# /usr/share/php, which is in the include path
|
2008-03-14 04:11:07 +00:00
|
|
|
$rss_url = variable_get('rss_feed');
|
|
|
|
$inc = @include_once('magpierss/rss_fetch.inc');
|
|
|
|
if ($inc && $rss_url) {
|
|
|
|
$rss = fetch_rss($rss_url);
|
2008-02-01 23:03:53 +00:00
|
|
|
|
|
|
|
if ($rss) {
|
2008-02-27 05:23:21 +00:00
|
|
|
echo "<h2>" . _("Latest news") . "</h2>";
|
2008-02-01 23:03:53 +00:00
|
|
|
foreach ($rss->items as $item) {
|
|
|
|
$href = $item['link'];
|
|
|
|
$title = $item['title'];
|
|
|
|
echo "<h3><a href=$href>$title</a></h3>";
|
2008-02-27 05:23:21 +00:00
|
|
|
echo '<span class="date">'.$item['pubdate'] .'</span> - ';
|
|
|
|
echo '<span class="author">'.$item['dc']['creator'].'</span>';
|
2008-02-01 23:03:53 +00:00
|
|
|
echo $item['summary'];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-04-26 12:28:53 +00:00
|
|
|
if($admin->enabled) {
|
|
|
|
$expiring = $admin->renew_get_expiring_accounts();
|
|
|
|
|
2007-10-02 16:30:42 +00:00
|
|
|
if(is_array($expiring) && count($expiring) > 0) {
|
2006-04-26 12:28:53 +00:00
|
|
|
echo "<h2>" . _("Expired or about to expire accounts") . "</h2>\n";
|
|
|
|
echo "<table cellspacing=\"2\" cellpadding=\"4\">\n";
|
|
|
|
echo "<tr><th>"._("uid")."</th><th>"._("Last name, surname")."</th><th>"._("Expiry")."</th></tr>\n";
|
|
|
|
foreach($expiring as $account) {
|
|
|
|
echo "<tr class=\"exp{$account['status']}\"><td>{$account['uid']}</td>";
|
|
|
|
if($admin->checkcreator($account['uid']))
|
|
|
|
echo "<td><a href=\"adm_edit.php?uid={$account['uid']}\">{$account['nom']}, {$account['prenom']}</a></td>";
|
|
|
|
else
|
|
|
|
echo "<td>{$account['nom']}, {$account['prenom']}</td>";
|
|
|
|
echo "<td>{$account['expiry']}</td></tr>\n";
|
|
|
|
}
|
|
|
|
echo "</table>\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-04-10 18:05:51 +00:00
|
|
|
?></div>
|
|
|
|
|
|
|
|
|
2006-04-26 12:28:53 +00:00
|
|
|
</body>
|
|
|
|
</html>
|