28 require_once(
"../class/config.php");
29 include_once(
"head.php");
31 if (!$admin->enabled) {
32 __(
"This page is restricted to authorized staff");
33 include_once(
'foot.php');
38 "show" => array (
"request",
"string",
""),
39 "creator" => array(
"request",
"integer", 0),
40 "short" => array(
"request",
"integer", -1),
41 "pattern" => array(
"post",
"string",
"*"),
42 "pattern_type" => array(
"post",
"string",
"login"),
46 if (empty($pattern)) $pattern=
"*";
49 $mem->adminpref($short);
50 $mem->user[
"admlist"]=$short;
58 __(
"This page is restricted to authorized staff");
63 if ($pattern && $pattern_type) {
64 $r=$admin->get_list($show ==
'all' ? 1 : 0,
$creator, $pattern, $pattern_type);
70 <h3><?php
__(
"AlternC account list"); ?></h3>
75 if (
$mem->user[
"admlist"]==0) {
77 <p><span
class=
"ina" style=
"float: right;"><a href=
"adm_list.php?short=1"><?php
__(
"Minimal view"); ?></a></span></p>
81 <p><span
class=
"ina" style=
"float:right;"><a href=
"adm_list.php?short=0"><?php
__(
"Complete view"); ?></a></span></p>
86 <fieldset
style=
"clear:both;">
87 <legend><?php
__(
"Filters"); ?></legend>
88 <form method=
"post" action=
"adm_list.php" >
90 <label
for=
"pattern_type_login"><?php
__(
"Search for a Login"); ?></label><input type=
"radio" name=
"pattern_type" value=
"login" id=
"pattern_type_login" <?php
if (!$pattern_type || $pattern_type ===
'login') echo
' checked="checked" '; ?>/>
91 <label
for=
"pattern_type_domain"><?php
__(
"Search for a Domain"); ?></label><input type=
"radio" name=
"pattern_type" value=
"domaine" id=
"pattern_type_domain" <?php
if ($pattern_type ===
'domaine') echo
' checked="checked" '; ?>/>
92 <input type=
"text" id=
"pattern" name=
"pattern" value=
"<?php echo $pattern ?>"/> <input type=
"submit" class=
"inb filter" value=
"<?php __("submit
"); ?>" />
96 $list_creators = $admin->get_creator_list();
100 echo
'<p><span class="inb filter"><a href="adm_list.php?show=all">' . _(
'List all AlternC accounts') .
'</a></span>';
103 $infos_creators = array();
105 foreach ($list_creators as
$key =>
$val) {
106 $infos_creators[] =
'<a href="adm_list.php?creator=' .
$val[
'uid'] .
'">' .
$val[
'login'] .
'</a>';
109 if (count($infos_creators)) {
110 echo
' ('._(
"Or only the accounts of:").
" ". implode(
', ', $infos_creators) .
')';
115 echo
'<p><span class="ina filter"><a href="adm_list.php">' . _(
'List only my accounts') .
'</a></span></p>';
123 echo
'<p class="alert alert-danger">' ,
$error,
'</p>';
129 <?php
__(
"Here is the list of hosted AlternC accounts"); ?> (<?php printf(_(
"%s accounts"),count(
$r)); ?>)
132 <p><span
class=
"ina add"><a href=
"adm_add.php"><?php
__(
"Create a new AlternC account"); ?></a></span></p>
135 if (!is_array(
$r) || empty(
$r) ) {
136 echo
'<p class="alert alert-danger">'._(
"No account defined for now").
'</p>';
141 <form method=
"post" action=
"adm_dodel.php">
145 if (
$mem->user[
"admlist"]==0) {
148 <?php
if (count(
$r)>5) { ?>
149 <input type=
"submit" class=
"inb delete" name=
"submit" value=
"<?php __("Delete checked accounts
"); ?>" />
152 <table
class=
"tlist" style=
"clear:both;">
155 <th><?php
__(
"Account"); ?></th>
156 <th><?php
__(
"Manager"); ?></th>
157 <th><?php
__(
"Created by") ?></th>
158 <th><?php
__(
"Created on") ?></th>
159 <th><?php
__(
"Quotas") ?></th>
160 <th><?php
__(
"Last login"); ?></th>
161 <th><?php
__(
"Last ip"); ?></th>
162 <th><?php
__(
"Fails"); ?></th>
163 <th><?php
__(
'Expiry') ?></th>
172 <tr
class=
"lst<?php echo $col; ?>">
176 <td
id=
"user_<?php echo $val["uid
"]; ?>"> </td>
178 <td><input type=
"checkbox" class=
"inc" name=
"d[]" id=
"user_<?php echo $val["uid
"]; ?>" value=
"<?php echo $val["uid
"]; ?>" /></td>
180 <td <?php
if (
$val[
"su"]) echo
'style="color: red"'; ?>><label
for=
"user_<?php echo $val["uid
"]; ?>"><b><?php echo
$val[
"login"] ?></b></label></td>
181 <td><a title=
"<?php __("Send an email
");?>" href=
"mailto:<?php echo $val["mail
"]; ?>"><?php echo
$val[
"nom"].
" ".
$val[
"prenom"] ?></a> </td>
182 <td><?php echo
$val[
"parentlogin"] ?></td>
183 <td><?php echo
format_date(_(
'%3$d-%2$d-%1$d'),
$val[
"created"]); ?></td>
184 <td><?php echo
$val[
"type"] ?></td>
185 <td><?php echo
$val[
"lastlogin"] ?></td>
186 <td><?php echo
$val[
"lastip"] ?></td>
187 <td><?php echo
$val[
"lastfail"] ?></td>
188 <td><div
class=
"<?php echo 'exp' . $admin->renew_get_status($val['uid']) ?>"><?php echo $admin->renew_get_expiry(
$val[
'uid']) ?></div></td>
191 <tr
class=
"lst<?php echo $col; ?>" >
192 <td/><td ><i><?php echo _(
"DB:").
' '.
$val[
'db_server_name']?></i></td>
194 <div
id=
"admlistbtn">
195 <span
class=
"ina<?php if ($col==2) echo "v
"; ?>">
196 <a href=
"adm_login.php?id=<?php echo $val["uid
"];?>"><?php
__(
"Connect as"); ?></a>
199 <span
class=
"ina<?php if ($col==2) echo "v
"; ?>" >
200 <a href=
"adm_edit.php?uid=<?php echo $val["uid
"] ?>"><?php
__(
"Edit"); ?></a>
202 <span
class=
"ina<?php if ($col==2) echo "v
"; ?>" >
203 <a href=
"adm_quotaedit.php?uid=<?php echo $val["uid
"] ?>"><?php
__(
"Quotas"); ?></a>
205 <?php
if (!
$val[
"su"]) { ?>
206 <span
class=
"ina<?php if ($col==2) echo "v
"; ?>" >
207 <a href=
"adm_deactivate.php?uid=<?php echo $val["uid
"] ?>"><?php
__(
"Disable"); ?></a>
215 echo
'</table></form><br/>';
218 if (
$mem->user[
"admlist"]==1) {
221 [ <?php
__(
"C"); ?> ] <?php
__(
"Connect as"); ?>
222 [ <?php
__(
"E"); ?> ] <?php
__(
"Edit"); ?>
223 [ <?php
__(
"Q"); ?> ] <?php
__(
"Quotas"); ?>
226 <?php
if (count(
$r)>50) { ?>
227 <input type=
"submit" class=
"inb" name=
"submit" value=
"<?php __("Delete checked accounts
"); ?>" />
231 <table
class=
"tlist" style=
"clear:both;">
233 <th colspan=
"2"> </th><th><?php
__(
"Account"); ?></th>
234 <th colspan=
"2"> </th><th><?php
__(
"Account"); ?></th>
235 <th colspan=
"2"> </th><th><?php
__(
"Account"); ?></th>
242 if ( ($count_r % 3) == 0 ) { echo
'<tr class="lst">'; }
245 echo
'<td> </td>';
247 echo
'<td align="center"><input type="checkbox" class="inc" name="d[]" value="'.$val[
"uid"].
'" id="id_c_'.$val[
"uid"].
'" /></td>';
250 <a href=
"adm_login.php?id=<?php echo $val["uid
"];?>" title=
"<?php __("Connect as
"); ?>">[ <?php
__(
"C"); ?> ]</a>
251 <a href=
"adm_edit.php?uid=<?php echo $val["uid
"] ?>" title=
"<?php __("Edit
"); ?>">[ <?php
__(
"E"); ?> ]</a>
252 <?php
if($admin->checkcreator($val[
'uid'])) { ?>
253 <a href=
"adm_quotaedit.php?uid=<?php echo $val["uid
"] ?>" title=
"<?php __("Quotas
"); ?>">[ <?php
__(
"Q"); ?> ]</a><?php
255 $creator_name = ( ($val[
'creator'] ==
'0')?_(
"himself"):$list_creators[$val[
'creator']][
'login']) ?>
257 <td style=
"padding-right: 2px; border-right: 1px solid black; <?php if ($val["su
"]) echo "color: red
"; ?>"><b><label title=
"<?php printf(_("Creator: %s
"), $creator_name);?>" for=
"id_c_<?php echo $val["uid
"]; ?>"><?php echo $val[
"login"] ?></label></b></td>
259 if ( ($count_r % 3) == 2 ) { echo
'</tr>'; }
264 <p><input type=
"submit" class=
"inb" name=
"submit" value=
"<?php __("Delete checked accounts
"); ?>" /></p>
268 include_once(
"foot.php");