Location: PHPKode > scripts > ScreamingToDos > std-0.9/edituser.php
<?PHP
require "login.php";

if (!($edituser)) { $edituser = $currentuser; }

if (($currentgroup != "admin") && ($currentuser != $edituser)) {
 Header ("Location:$HTTP_REFERER");
}

getvars($edituser);

if ($currentgroup == "admin") { $currentPage = "STD->admin->edit user"; }
else { $currentPage = "STD->edit user"; }
require "header.php";
?>
<form action="edituser.php" method="post" name="editUser">
<table border="0" cellpadding="5" width="50%">
 <tr><td align="left">
<font face="<?PHP echo $pageFont ?>" size="+<?PHP echo $pageFontsize+4 ?>">
<strong><?PHP echo $edituser ?><br></strong>
</font>
<hr align="left" size="1" noshade width="50%">
</td>
</tr>
</table>
<table border="0" cellpadding="5">
 <tr>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
 </tr>
 <tr>
  <td><font face="<?PHP echo $pageFont ?>" size="<?PHP echo $pageFontsize ?>"><strong>Creation date:</strong></td>
  <td><font face="<?PHP echo $pageFont ?>" size="<?PHP echo $pageFontsize ?>"><?PHP echo substr($user_creationdate,0,10) ?></td>
 </tr>
 <tr>
  <td><font face="<?PHP echo $pageFont ?>" size="<?PHP echo $pageFontsize ?>"><strong>Group:</strong></td>
  <td><font face="<?PHP echo $pageFont ?>" size="<?PHP echo $pageFontsize ?>">
<?PHP
  if (($currentgroup == "admin") && ($auth)) {
?>
   <select name="usergroup">
    <option value="user">user
    <option <?PHP if ($usergroup == "admin") { echo "SELECTED"; } ?> value="admin">admin
   </select>
<?PHP
 } else {
?>
  <input type="hidden" name="usergroup" value="<?PHP echo $usergroup ?>">&nbsp;<br><?PHP echo $usergroup ?>
<?PHP } ?>
  </td>
 </tr>
 <tr>
  <td><font face="<?PHP echo $pageFont ?>" size="<?PHP echo $pageFontsize ?>"><strong>Theme:</strong><?PHP if (($editthemes) || ($currentgroup == "admin")) { echo "&nbsp;&nbsp;(<a href=\"javascript:edittheme(document.editUser.themeid.value);\">Edit</a>)"; } ?></td>
  <td><font face="<?PHP echo $pageFont ?>" size="<?PHP echo $pageFontsize ?>">
   <select name="themeid">
<?PHP
 $r = qDB("SELECT id,theme FROM $themetable");
 for ($x = 1; $x <= mysql_num_rows($r); $x++) {
  $d = mysql_fetch_array($r);
  if ($themeid == $d[0]) { $SEL = "SELECTED"; } else { $SEL = ""; }
  echo "<option $SEL value=\"".$d[0]."\">".$d[1]."\n";
 }
?>
   </select>
  </td>
 </tr>
 <tr>
  <td><font face="<?PHP echo $pageFont ?>" size="<?PHP echo $pageFontsize ?>"><strong>Auto open category:</strong></td>
  <td><font face="<?PHP echo $pageFont ?>" size="<?PHP echo $pageFontsize ?>">
   <select name="auto_open_cat">
    <option value="1">Yes
    <option <?PHP if (!($auto_open_category)) { echo "SELECTED"; } ?> value="0">No
   </select>
  </td>
 </tr>
 <tr>
  <td><font face="<?PHP echo $pageFont ?>" size="<?PHP echo $pageFontsize ?>"><strong>Show empty categories:</strong></td>
  <td><font face="<?PHP echo $pageFont ?>" size="<?PHP echo $pageFontsize ?>">
   <select name="show_empty_categories">
    <option value="1">Yes
    <option <?PHP if (!($show_empty_categories)) { echo "SELECTED"; } ?> value="0">No
   </select>
  </td>
 </tr>
 <tr> 
  <td><font face="<?PHP echo $pageFont ?>" size="<?PHP echo $pageFontsize ?>"><strong>Start page:</strong></td>
  <td><font face="<?PHP echo $pageFont ?>" size="<?PHP echo $pageFontsize ?>">
   <select name="start_page">
    <option <?PHP if ($start_page == "tasks") { echo "SELECTED"; } ?> value="tasks">Task list
    <option <?PHP if ($start_page == "monthly") { echo "SELECTED"; } ?> value="monthly">Monthly
    <option <?PHP if ($start_page == "today") { echo "SELECTED"; } ?> value="today">Today
   </select>
  </td>
 </tr>
 <tr>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
 </tr>
 <tr>
  <td>&nbsp;</td>                                                                                         
  <td>
   <input type="hidden" name="updateprefs" value="<?PHP echo $edituser ?>">
   <input type="submit" value="Update">
  </td>
 </tr>
</table>
</form>
</center>
<?PHP
 $footerURL = $HTTP_REFERER;
 require 'footer.php';
?>
Return current item: ScreamingToDos