| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 |
require_once("../class/config.php"); |
|---|
| 33 |
|
|---|
| 34 |
if (!$admin->enabled) { |
|---|
| 35 |
__("This page is restricted to authorized staff"); |
|---|
| 36 |
exit(); |
|---|
| 37 |
} |
|---|
| 38 |
if (!$admin->checkcreator($uid)) { |
|---|
| 39 |
__("This page is restricted to authorized staff"); |
|---|
| 40 |
exit(); |
|---|
| 41 |
} |
|---|
| 42 |
|
|---|
| 43 |
if (!$r=$admin->get($uid)) { |
|---|
| 44 |
$error=$err->errstr(); |
|---|
| 45 |
} |
|---|
| 46 |
|
|---|
| 47 |
include("head.php"); |
|---|
| 48 |
?> |
|---|
| 49 |
</head> |
|---|
| 50 |
<body> |
|---|
| 51 |
<h3><?php __("Member Edition"); ?></h3> |
|---|
| 52 |
<?php |
|---|
| 53 |
if ($error) { |
|---|
| 54 |
echo "<p class=\"error\">$error</p>"; |
|---|
| 55 |
} |
|---|
| 56 |
?> |
|---|
| 57 |
<form method="post" action="adm_doedit.php"> |
|---|
| 58 |
<table border="1" cellspacing="0" cellpadding="4"> |
|---|
| 59 |
<tr> |
|---|
| 60 |
<th><input type="hidden" name="uid" value="<?php echo $uid ?>" /> |
|---|
| 61 |
<?php __("Username"); ?></th> |
|---|
| 62 |
<td><?php echo $r["login"]; ?></td> |
|---|
| 63 |
</tr> |
|---|
| 64 |
<tr> |
|---|
| 65 |
<th><label for="enabled"><?php __("Account Enabled ?"); ?></label></th> |
|---|
| 66 |
<td><select class="inl" name="enabled" id="enabled"> |
|---|
| 67 |
<?php |
|---|
| 68 |
echo "<option"; |
|---|
| 69 |
if ($r["enabled"]=="0") echo " selected=\"selected\""; |
|---|
| 70 |
echo " value=\"0\">"._("No")."</option>"; |
|---|
| 71 |
echo "<option"; |
|---|
| 72 |
if ($r["enabled"]=="1") echo " selected=\"selected\""; |
|---|
| 73 |
echo " value=\"1\">"._("Yes")."</option>"; |
|---|
| 74 |
?></select></td> |
|---|
| 75 |
</tr> |
|---|
| 76 |
|
|---|
| 77 |
<tr> |
|---|
| 78 |
<th><label for="pass"><?php __("Password"); ?></label></th> |
|---|
| 79 |
<td><input type="password" class="int" id="pass" name="pass" value="" size="20" maxlength="64" /></td> |
|---|
| 80 |
</tr> |
|---|
| 81 |
<tr> |
|---|
| 82 |
<th><label for="passconf"><?php __("Confirm password"); ?></label></th> |
|---|
| 83 |
<td><input type="password" class="int" id="passconf" name="passconf" value="" size="20" maxlength="64" /></td> |
|---|
| 84 |
</tr> |
|---|
| 85 |
<tr> |
|---|
| 86 |
<th><label for="canpass"><?php __("Can he change its password"); ?></label></th> |
|---|
| 87 |
<td><select class="inl" name="canpass" id="canpass"> |
|---|
| 88 |
<?php |
|---|
| 89 |
for($i=0;$i<count($bro->l_icons);$i++) { |
|---|
| 90 |
echo "<option"; |
|---|
| 91 |
if ($r["canpass"]==$i) echo " selected=\"selected\""; |
|---|
| 92 |
echo " value=\"$i\">"._($bro->l_icons[$i])."</option>"; |
|---|
| 93 |
} |
|---|
| 94 |
?></select> |
|---|
| 95 |
</td> |
|---|
| 96 |
</tr> |
|---|
| 97 |
<tr> |
|---|
| 98 |
<th><label for="nom"><?php echo _("Surname")."</label> / <label for=\"prenom\">"._("First Name"); ?></label></th> |
|---|
| 99 |
<td><input type="text" class="int" name="nom" id="nom" value="<?php echo $r["nom"]; ?>" size="20" maxlength="128" /> / <input type="text" class="int" name="prenom" id="prenom" value="<?php echo $r["prenom"]; ?>" size="20" maxlength="128" /></td> |
|---|
| 100 |
</tr> |
|---|
| 101 |
<tr> |
|---|
| 102 |
<th><label for="nmail"><?php __("Email address"); ?></label></th> |
|---|
| 103 |
<td><input type="text" class="int" name="nmail" id="nmail" value="<?php echo $r["mail"]; ?>" size="30" maxlength="128" /></td> |
|---|
| 104 |
</tr> |
|---|
| 105 |
<tr> |
|---|
| 106 |
<th><label for="type"><?php __("Account type"); ?></label></th> |
|---|
| 107 |
<td><select name="type" id="type"> |
|---|
| 108 |
<?php |
|---|
| 109 |
$db->query("SELECT distinct(type) FROM defquotas ORDER by type"); |
|---|
| 110 |
while($db->next_record()) { |
|---|
| 111 |
$type = $db->f("type"); |
|---|
| 112 |
echo "<option value=\"$type\""; |
|---|
| 113 |
if($type == $r['type']) |
|---|
| 114 |
echo " selected"; |
|---|
| 115 |
echo ">$type</option>"; |
|---|
| 116 |
} |
|---|
| 117 |
?></select><label for="reset_quotas"><?php __("Reset quotas to default ?") ?></label><input type="checkbox" name="reset_quotas" id="reset_quotas"></td> |
|---|
| 118 |
</tr> |
|---|
| 119 |
<tr> |
|---|
| 120 |
<th><label for="duration"><?php __("Period"); ?></label></th> |
|---|
| 121 |
<td><?php echo duration_list('duration', $r['duration']) ?></td> |
|---|
| 122 |
</tr> |
|---|
| 123 |
<tr> |
|---|
| 124 |
<td colspan="2" align="center"><input type="submit" class="inb" name="submit" value="<?php __("Edit this account"); ?>" /> |
|---|
| 125 |
</td> |
|---|
| 126 |
</tr> |
|---|
| 127 |
</table> |
|---|
| 128 |
</form> |
|---|
| 129 |
|
|---|
| 130 |
<?php if($r['duration']) { ?> |
|---|
| 131 |
<p> |
|---|
| 132 |
<form method="post" action="adm_dorenew.php"> |
|---|
| 133 |
<input type="hidden" name="uid" value="<?php echo $uid ?>" /> |
|---|
| 134 |
<table border="1" cellspacing="0" cellpadding="4"> |
|---|
| 135 |
<tr> |
|---|
| 136 |
<th><label for="periods"><?php __("Renew for") ?></label></th> |
|---|
| 137 |
<td><input name="periods" id="periods" type="text" size="2" value="1"/><?php echo ' ' . _('period(s)') ?></td> |
|---|
| 138 |
</tr> |
|---|
| 139 |
<tr> |
|---|
| 140 |
<td colspan="2" align="center"><input type="submit" class="inb" name="submit" value="<?php __("Renew"); ?>" /> |
|---|
| 141 |
</td> |
|---|
| 142 |
</tr> |
|---|
| 143 |
</table> |
|---|
| 144 |
</form> |
|---|
| 145 |
</p> |
|---|
| 146 |
<?php } ?> |
|---|
| 147 |
|
|---|
| 148 |
<p> |
|---|
| 149 |
<?php |
|---|
| 150 |
if ($mem->user[uid]==2000) { |
|---|
| 151 |
if ($r["su"]) { |
|---|
| 152 |
?> |
|---|
| 153 |
<b><?php __("This account is a super-admin account"); ?></b><br /> |
|---|
| 154 |
<?php if ($admin->onesu()) { |
|---|
| 155 |
__("There is only one administrator account, you cannot turn this account back to normal"); |
|---|
| 156 |
} else { |
|---|
| 157 |
?> |
|---|
| 158 |
<a href="adm_donosu.php?uid=<?php echo $r["uid"]; ?>"><?php __("Turn this account back to normal"); ?></a> |
|---|
| 159 |
<?php } |
|---|
| 160 |
} else { ?> |
|---|
| 161 |
<a href="adm_dosu.php?uid=<?php echo $r["uid"]; ?>"><?php __("Make this account a super admin one"); ?></a> |
|---|
| 162 |
<?php } ?> |
|---|
| 163 |
</p> |
|---|
| 164 |
|
|---|
| 165 |
|
|---|
| 166 |
<p><?php |
|---|
| 167 |
} |
|---|
| 168 |
$c=$admin->get($r["creator"]); |
|---|
| 169 |
printf(_("Account created by %s"),$c["login"]); |
|---|
| 170 |
?> |
|---|
| 171 |
</p> |
|---|
| 172 |
<p><a href="adm_list.php"><?php __("Back to the account list"); ?></a></p> |
|---|
| 173 |
</body> |
|---|
| 174 |
</html> |
|---|
| 175 |
|
|---|