modifs liste des admins, debut d'ergo pour cette partie

This commit is contained in:
Chantal Bernard-Putz 2010-04-29 10:27:09 +00:00
parent b7ca3dc22e
commit 7643b87534
6 changed files with 36 additions and 33 deletions

View File

@ -61,7 +61,7 @@ if (!$r=$admin->get($uid)) {
} }
?> ?>
<form method="post" action="adm_doedit.php" name="main" id="main"> <form method="post" action="adm_doedit.php" name="main" id="main">
<table border="1" cellspacing="0" cellpadding="4"> <table class="tedit">
<tr> <tr>
<th><input type="hidden" name="uid" value="<?php echo $uid ?>" /> <th><input type="hidden" name="uid" value="<?php echo $uid ?>" />
<?php __("Username"); ?></th> <?php __("Username"); ?></th>
@ -69,15 +69,10 @@ if (!$r=$admin->get($uid)) {
</tr> </tr>
<tr> <tr>
<th><label for="enabled"><?php __("Account Enabled?"); ?></label></th> <th><label for="enabled"><?php __("Account Enabled?"); ?></label></th>
<td><select class="inl" name="enabled" id="enabled"> <td>
<?php <input type="radio" class="inc" id="enabled0" name="enabled" value="0"<?php cbox($r["enabled"]==0); ?>><label for="enabled0"><?php __("No"); ?></label><br />
echo "<option"; <input type="radio" class="inc" id="enabled1" name="enabled" value="1"<?php cbox($r["enabled"]==1); ?>><label for="enabled1"><?php __("Yes"); ?></label><br />
if ($r["enabled"]=="0") echo " selected=\"selected\""; </td>
echo " value=\"0\">"._("No")."</option>";
echo "<option";
if ($r["enabled"]=="1") echo " selected=\"selected\"";
echo " value=\"1\">"._("Yes")."</option>";
?></select></td>
</tr> </tr>
<tr> <tr>
@ -90,14 +85,9 @@ if (!$r=$admin->get($uid)) {
</tr> </tr>
<tr> <tr>
<th><label for="canpass"><?php __("Can he change its password"); ?></label></th> <th><label for="canpass"><?php __("Can he change its password"); ?></label></th>
<td><select class="inl" name="canpass" id="canpass"> <td>
<?php <input type="radio" class="inc" id="canpass0" name="canpass" value="0"<?php cbox($r["canpass"]==0); ?>><label for="canpass0"><?php __("No"); ?></label><br />
for($i=0;$i<count($bro->l_icons);$i++) { <input type="radio" class="inc" id="canpass1" name="canpass" value="1"<?php cbox($r["canpass"]==1); ?>><label for="canpass1"><?php __("Yes"); ?></label><br />
echo "<option";
if ($r["canpass"]==$i) echo " selected=\"selected\"";
echo " value=\"$i\">"._($bro->l_icons[$i])."</option>";
}
?></select>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -114,7 +104,7 @@ if (!$r=$admin->get($uid)) {
</tr> </tr>
<tr> <tr>
<th><label for="type"><?php __("Account type"); ?></label></th> <th><label for="type"><?php __("Account type"); ?></label></th>
<td><select name="type" id="type"> <td><select name="type" id="type" class="inl">
<?php <?php
$db->query("SELECT distinct(type) FROM defquotas ORDER by type"); $db->query("SELECT distinct(type) FROM defquotas ORDER by type");
while($db->next_record()) { while($db->next_record()) {
@ -124,14 +114,16 @@ if (!$r=$admin->get($uid)) {
echo " selected"; echo " selected";
echo ">$type</option>"; echo ">$type</option>";
} }
?></select><label for="reset_quotas"><?php __("Reset quotas to default ?") ?></label><input type="checkbox" name="reset_quotas" id="reset_quotas" /></td> ?></select>&nbsp; <input type="checkbox" name="reset_quotas" id="reset_quotas" class="inc" /><label for="reset_quotas"><?php __("Reset quotas to default?") ?></label></td>
</tr> </tr>
<tr> <tr>
<th><label for="duration"><?php __("Period"); ?></label></th> <th><label for="duration"><?php __("Period"); ?></label></th>
<td><?php echo duration_list('duration', $r['duration']) ?></td> <td><?php echo duration_list('duration', $r['duration']) ?></td>
</tr> </tr>
<tr> <tr class="trbtn"><td colspan="2">
<td colspan="2" align="center"><input type="submit" class="inb" name="submit" value="<?php __("Edit this account"); ?>" /> <input type="submit" class="inb" name="submit" value="<?php __("Edit this account"); ?>" />
<input type="button" class="inb" name="cancel" value="<?php __("Cancel"); ?>" onclick="document.location='adm_list.php'" />
</td> </td>
</tr> </tr>
</table> </table>
@ -157,18 +149,18 @@ if (!$r=$admin->get($uid)) {
<p> <p>
<?php <?php
if ($mem->user[uid]==2000) { // PATCHBEN only admin can change su/nosu :) if ($mem->user["uid"]==2000) { // Only ADMIN (2000) can change the admin status of accounts
if ($r["su"]) { if ($r["su"]) {
?> ?>
<b><?php __("This account is a super-admin account"); ?></b><br /> <p><b><?php __("This account is a super-admin account"); ?></b></p>
<?php if ($admin->onesu()) { <?php if ($admin->onesu()) {
__("There is only one administrator account, you cannot turn this account back to normal"); __("There is only one administrator account, you cannot turn this account back to normal");
} else { } else {
?> ?>
<a href="adm_donosu.php?uid=<?php echo $r["uid"]; ?>"><?php __("Turn this account back to normal"); ?></a> <p><span class="ina"><a href="adm_donosu.php?uid=<?php echo $r["uid"]; ?>"><?php __("Turn this account back to normal"); ?></a></span></p>
<?php } <?php }
} else { ?> } else { ?>
<a href="adm_dosu.php?uid=<?php echo $r["uid"]; ?>"><?php __("Make this account a super admin one"); ?></a> <p><span class="ina"><a href="adm_dosu.php?uid=<?php echo $r["uid"]; ?>"><?php __("Make this account a super admin one"); ?></a></span></p>
<?php } ?> <?php } ?>
</p> </p>
@ -179,8 +171,8 @@ $c=$admin->get($r["creator"]);
printf(_("Account created by %s"),$c["login"]); printf(_("Account created by %s"),$c["login"]);
?> ?>
</p> </p>
<p><a href="adm_list.php"><?php __("Back to the account list"); ?></a></p>
<script type="text/javascript"> <script type="text/javascript">
document.forms['main'].pass.focus(); document.forms['main'].pass.focus();
document.forms['main'].setAttribute('autocomplete', 'off');
</script> </script>
<?php include_once("foot.php"); ?> <?php include_once("foot.php"); ?>

View File

@ -104,6 +104,7 @@ if ($mem->user["admlist"]==0) { // Normal (large) mode
<th><?php __("Username"); ?></th> <th><?php __("Username"); ?></th>
<th><?php echo _("Surname")." "._("First Name")."<br />("._("Email address").")"; ?></th> <th><?php echo _("Surname")." "._("First Name")."<br />("._("Email address").")"; ?></th>
<th><?php __("Created by") ?></th> <th><?php __("Created by") ?></th>
<th><?php __("Created on") ?></th>
<th><?php __("Account type") ?></th> <th><?php __("Account type") ?></th>
<th><?php __("Last login"); ?></th> <th><?php __("Last login"); ?></th>
<th><?php __("Last fail"); ?></th> <th><?php __("Last fail"); ?></th>
@ -140,6 +141,7 @@ while (list($key,$val)=each($r))
<td <?php if ($val["su"]) echo "style=\"color: red\""; ?>><?php echo $val["login"] ?></td> <td <?php if ($val["su"]) echo "style=\"color: red\""; ?>><?php echo $val["login"] ?></td>
<td><a href="mailto:<?php echo $val["mail"]; ?>"><?php echo $val["nom"]." ".$val["prenom"] ?></a>&nbsp;</td> <td><a href="mailto:<?php echo $val["mail"]; ?>"><?php echo $val["nom"]." ".$val["prenom"] ?></a>&nbsp;</td>
<td><?php echo $val["parentlogin"] ?></td> <td><?php echo $val["parentlogin"] ?></td>
<td><?php echo format_date('%3$d-%2$d-%1$d',$val["created"]); ?></td>
<td><?php echo $val["type"] ?></td> <td><?php echo $val["type"] ?></td>
<td><?php echo $val["lastlogin"] ?></td> <td><?php echo $val["lastlogin"] ?></td>
<td><?php echo $val["lastfail"] ?></td> <td><?php echo $val["lastfail"] ?></td>

View File

@ -37,7 +37,7 @@ if ($q["t"]) {
<ul> <ul>
<li><a href="sql_list.php"><?php __("Databases"); ?></a></li> <li><a href="sql_list.php"><?php __("Databases"); ?></a></li>
<li><a href="sql_users_list.php"><?php __("MySQL Users") ?></a></li> <li><a href="sql_users_list.php"><?php __("MySQL Users") ?></a></li>
<li><a target="_blank" href="sql_admin.php"><?php __("SQL Admin"); ?></a></li> <li><a target="_blank" href="sql_admin.php"><?php __("PhpMyAdmin"); ?></a></li>
</ul> </ul>
</div> </div>
</div> </div>

View File

@ -389,7 +389,7 @@ function pretty_months($months) {
* @access private * @access private
*/ */
function duration_list($name, $selected=0) { function duration_list($name, $selected=0) {
$res = "<select name=\"$name\" id=\"$name\">"; $res = "<select name=\"$name\" id=\"$name\" class=\"inl\">";
foreach(array(0, 1, 2, 3, 4, 6, 12, 24) as $dur) { foreach(array(0, 1, 2, 3, 4, 6, 12, 24) as $dur) {
$res .= "<option value=\"$dur\""; $res .= "<option value=\"$dur\"";

View File

@ -765,6 +765,15 @@ msgstr ""
msgid "%3$d-%2$d-%1$d %4$d:%5$d" msgid "%3$d-%2$d-%1$d %4$d:%5$d"
msgstr "%1$d/%2$d/%3$d %4$d:%5$d" msgstr "%1$d/%2$d/%3$d %4$d:%5$d"
# $d,$m,$y
# 1 2 3
#. This is a date representation : parameters are the date as follow :
#. $d,$m,$y
#. 1 2 3
#. eg: english : %3$d/%1$d/%2$d
msgid "%3$d-%2$d-%1$d"
msgstr "%1$d/%2$d/%3$d"
msgid "AlternC's account password" msgid "AlternC's account password"
msgstr "Mots de passe des comptes AlternC" msgstr "Mots de passe des comptes AlternC"

View File

@ -317,7 +317,7 @@ msgid "Password"
msgstr "Mot de passe" msgstr "Mot de passe"
#: ../admin/adm_edit.php:117 ../admin/adm_edit.php:125 #: ../admin/adm_edit.php:117 ../admin/adm_edit.php:125
msgid "Reset quotas to default ?" msgid "Reset quotas to default?"
msgstr "Réinitialiser les quotas de ce compte&nbsp;?" msgstr "Réinitialiser les quotas de ce compte&nbsp;?"
#: ../admin/adm_edit.php:120 ../admin/adm_edit.php:128 #: ../admin/adm_edit.php:120 ../admin/adm_edit.php:128
@ -1742,8 +1742,8 @@ msgstr "Bases de donn
#: ../admin/menu_sql.php:37 ../admin/sql_admin.php:47 ../admin/menu_sql.php:36 #: ../admin/menu_sql.php:37 ../admin/sql_admin.php:47 ../admin/menu_sql.php:36
#: ../admin/menu_sql.php:40 #: ../admin/menu_sql.php:40
msgid "SQL Admin" msgid "PhpMyAdmin"
msgstr "Admin SQL" msgstr "PhpMyAdmin"
#: ../admin/menu_sta2.php:37 ../admin/menu_sta2.php:36 #: ../admin/menu_sta2.php:37 ../admin/menu_sta2.php:36
#: ../admin/menu_sta2.php:39 #: ../admin/menu_sta2.php:39