25 require_once(
"../class/config.php");
27 include_once(
"head.php");
33 if (
$mem->user[
"lastlogin"]==
"0000-00-00 00:00:00") {
36 echo
format_date(_(
'the %3$d-%2$d-%1$d at %4$d:%5$02d'),
$mem->user[
"lastlogin"]);
37 printf(
" "._(
'from: <code> %1$s </code>').
"<br />",
$mem->user[
"lastip"]);
41 if (
$mem->user[
"lastfail"]) {
42 printf(_(
"%1\$d login failed since last login").
"<br />",
$mem->user[
"lastfail"]);
45 if (!empty(
$error) ) { echo
"<p class='alert alert-danger'>$error</p>";
$error=
''; }
47 $feed_url =
variable_get(
'rss_feed',
'',
'This is an RSS feed that will be displayed on the users homepages when they log in.', array(array(
'desc'=>
'URL',
'type'=>
'string')));
50 $cache_file =
"/tmp/alterncpanel_cache_main.rss";
51 $timedif = @(time() - filemtime($cache_file));
53 if (file_exists($cache_file) && $timedif < $cache_time) {
54 $string = file_get_contents($cache_file);
56 $string = file_get_contents(
"$feed_url");
57 file_put_contents($cache_file,$string);
59 $xml = @simplexml_load_string($string);
61 if ( ! $xml === FALSE ) {
62 echo
'<div align="center"><table class="tedit" cellspacing="0" cellpadding="6">';
63 echo
"<tr><th colspan='2'><a target='_blank' style='font-size: 18px;font-weight: bold;color: #10507C;' href='".$xml->channel->link.
"'>".$xml->channel->title.
"</a><br/><i>".$xml->channel->description.
"</i></th></tr>";
67 foreach ($xml->channel->item as
$val) {
69 echo
"<tr>\n<td ".(empty($val->pubDate)?
'colpan=2':
'').
'><a target="_blank" href="'.$val->link.
'">'.$val->title.
'</a></td>';
70 if (!empty($val->pubDate)) {
71 echo
'<td>'.strftime(
"%d/%m/%Y" , strtotime($val->pubDate)).
'</td>';
77 echo
"</table></div>\n";
83 $expiring = $admin->renew_get_expiring_accounts();
85 if(!empty($expiring) ) {
86 echo
"<h2>" . _(
"Expired or about to expire accounts") .
"</h2>\n";
87 echo
"<table cellspacing=\"2\" cellpadding=\"4\">\n";
88 echo
"<tr><th>"._(
"uid").
"</th><th>"._(
"Last name, surname").
"</th><th>"._(
"Expiry").
"</th></tr>\n";
89 if (is_array($expiring)) {
90 foreach($expiring as $account) {
91 echo
"<tr class=\"exp{$account['status']}\"><td>{$account['uid']}</td>";
92 if($admin->checkcreator($account[
'uid'])) {
93 echo
"<td><a href=\"adm_edit.php?uid={$account['uid']}\">{$account['nom']}, {$account['prenom']}</a></td>";
95 echo
"<td>{$account['nom']}, {$account['prenom']}</td>";
97 echo
"<td>{$account['expiry']}</td></tr>\n";
104 __(
"You are using the AlternC Panel. You can contact the AlternC community for information or feedback by joining the mailing-list");
105 echo
" <a target='_blank' href='http://lists.alternc.org/listinfo/users'>users@alternc.org</a>";
111 define(
"QUOTASONE",
"1");
113 require_once(
"quotas_oneuser.php");
117 <?php include_once(
"foot.php"); ?>