Location: PHPKode > projects > Druid Defect Control > defectcontrol_0.9.4/tts/useroptions.php
<?php require_once 'usercheck.php' ?>
<?php require_once 'genform.php' ?>

<html>
<head>
<title>User options</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="style.css">
</head>

<body bgcolor="#FFFFFF">
<?php include 'header.php'; ?>
<?php ttdb_connect($db); ?>
<h1>Options for user <?php global $ddts_username; echo $ddts_username; ?></h1>
<p>Here you can modify your contact information, as well as password. </p>


<?php 

    require_once 'errors.php';
    
    $user = ttdb_execQuery($db, "select * from users where sname = '$ddts_username'");    
    
    $userInfo = ttdb_getArray($user);

    if (!is_array($userInfo)) {
        tter_errorWithBackButton("There was a problem accessing your user information.".
                " The query returned empty results.");
        exit();
    }

?>



<form method="post" action="useroptionspost.php" name="useroptions">
  <table width="100%" border="0" cellpadding="2" class="tableStyle">
    <tr> 
      <td class="tableFieldName" width="30%">Email address</td>
      <td class="tableFieldContent" width="70%"> 
        <input type="text" name="fEmail" size="50" maxlength="30" value="<?php echo $userInfo['semail'];?>">
      </td>
    </tr>
    <tr> 
      <td class="tableFieldName" width="30%">Contact phone</td>
      <td class="tableFieldContent" width="70%"> 
        <input type="text" name="fContactPhone" size="50" maxlength="30" value="<?php echo $userInfo['scontactphone'];?>">
      </td>
    </tr>
    <tr> 
      <td class="tableFieldName" width="30%">Contact address</td>
      <td class="tableFieldContent" width="70%"> 
        <input type="text" name="fContactAddress" size="50" maxlength="150" value="<?php echo $userInfo['scontactaddress'];?>">
      </td>
    </tr>
    <tr> 
      <td class="tableFieldName" width="30%">Password</td>
      <td class="tableFieldContent" width="70%"> 
        <input type="password" name="fPassword" size="50" maxlength="30">
      </td>
    </tr>
    <tr> 
      <td class="tableFieldName" width="30%">Retype password</td>
      <td class="tableFieldContent" width="70%"> 
        <input type="password" name="fRetypePassword" size="50" maxlength="30">
      </td>
    </tr>
    <tr> 
      <td class="tableFieldName" width="30%">Default project</td>
      <td class="tableFieldContent" width="70%"><?php 
        gf_generateLookupFieldSelected($db, 
                                     'fDefaultProject', 
                                     '',
                                     'select * from project',
                                     'iid',
                                     'sname',
                                     $userInfo['iiddefaultproject']);
      ?> </td>
    </tr>
    <tr> 
      <td class="tableFieldName" width="30%">Is administrator?</td>
      <td class="tableFieldContent" width="70%"><?php 
        if ($userInfo['bisadmin'] == "t") echo "Yes"; else echo "No";        
      ?> </td>
    </tr>
  </table>

  <div align="center">
    <p><input type="submit" name="Submit" value="Accept">
    <input type="button" name="cancel" value="Cancel">
  </p></div>
</form>
<?php ttdb_close($db); ?>
</body>
<?php include 'footer.php'; ?>
</html>
Return current item: Druid Defect Control