reSIProcate/repro  9694
changefullname.php
Go to the documentation of this file.
00001 <?php
00002 require('reprofunctions.php');
00003 dbgSquirt("============= Change Fullname ===============");
00004 
00005 $result = checkCookies($forceLogin,$error,FALSE);
00006 if (!($result) || $forceLogin) {
00007   // we got an error back that occurred while checkCookies was being run, 
00008   // or authentication failed.  Either way, bounce them back to the login screen
00009   header("Location: http://" . $_SERVER['HTTP_HOST'] . 
00010          dirname($_SERVER['PHP_SELF']) . 
00011          "/index.php?error=$error");
00012   exit;
00013  }
00014 $username = $_COOKIE['user'];
00015 ?>
00016 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
00017 
00018 <!--
00019 System:  Repro
00020 File:    changefullname.php
00021 Purpose: Allow an authenticated user to change the fullname stored for them
00022 Author:  S. Chanin
00023 -->
00024 <html>
00025 <head>
00026 <link rel="stylesheet" type="text/css" href="repro_style.css" />
00027   <title>Change Fullname</title>
00028 </head>
00029 
00030 <body>
00031 <h1 class="title">Repro</h1>
00032 <h1>Change Fullname</h1>
00033 <hr />
00034 <?php
00035 // if we've looped back due to an error, show the message
00036 if (isset($_GET["error"])) {
00037     echo '<p class="error">' . $_GET["error"] . "</p>\n";
00038 }
00039 if (lookupUserInformation($username,$id,$fullname,$domain,$email)) {
00040   // lookup successful
00041   echo "<p>Current Fullname is: <em>$fullname</em></p>\n";
00042 ?>
00043 <form method="POST" action="updatefullname.php">
00044 <table>
00045 <tr>
00046 <td>New Fullname</td>
00047 <td><input type="text" name="newfullname" id="newfullname" value=""/></td>
00048 </tr>
00049 <tr>
00050 <td>&nbsp</td>
00051 <td>
00052 <input type="submit" name="submit" id="submit" value="Save" />
00053 <input type="submit" name="submit" id="submit" value="Cancel" />
00054 </td>
00055 </tr>
00056 </table>
00057 </form>
00058 
00059 <?php
00060    } else {
00061   echo "<p>Internal Error while accessing user information.</p>\n";
00062   echo "<p>Please contact an administrator.</p>\n";
00063  }
00064 ?>
00065 
00066 <br /><hr />
00067 <a href="userhome.php">Return to User Home</a><br />
00068 <a href="logout.php">Logout</a><br />
00069 
00070 </body>
00071 </html>