File: changefullname.php

package info (click to toggle)
resiprocate 1%3A1.9.7-5
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 36,456 kB
  • ctags: 27,123
  • sloc: cpp: 195,346; xml: 12,515; sh: 11,986; ansic: 6,807; makefile: 2,182; php: 1,150; python: 300; objc: 91; sql: 85; perl: 21; csh: 5
file content (71 lines) | stat: -rw-r--r-- 1,882 bytes parent folder | download | duplicates (5)
1
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
require('reprofunctions.php');
dbgSquirt("============= Change Fullname ===============");

$result = checkCookies($forceLogin,$error,FALSE);
if (!($result) || $forceLogin) {
  // we got an error back that occurred while checkCookies was being run, 
  // or authentication failed.  Either way, bounce them back to the login screen
  header("Location: http://" . $_SERVER['HTTP_HOST'] . 
	 dirname($_SERVER['PHP_SELF']) . 
	 "/index.php?error=$error");
  exit;
 }
$username = $_COOKIE['user'];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<!--
System:  Repro
File:    changefullname.php
Purpose: Allow an authenticated user to change the fullname stored for them
Author:  S. Chanin
-->
<html>
<head>
<link rel="stylesheet" type="text/css" href="repro_style.css" />
  <title>Change Fullname</title>
</head>

<body>
<h1 class="title">Repro</h1>
<h1>Change Fullname</h1>
<hr />
<?php
// if we've looped back due to an error, show the message
if (isset($_GET["error"])) {
    echo '<p class="error">' . $_GET["error"] . "</p>\n";
}
if (lookupUserInformation($username,$id,$fullname,$domain,$email)) {
  // lookup successful
  echo "<p>Current Fullname is: <em>$fullname</em></p>\n";
?>
<form method="POST" action="updatefullname.php">
<table>
<tr>
<td>New Fullname</td>
<td><input type="text" name="newfullname" id="newfullname" value=""/></td>
</tr>
<tr>
<td>&nbsp</td>
<td>
<input type="submit" name="submit" id="submit" value="Save" />
<input type="submit" name="submit" id="submit" value="Cancel" />
</td>
</tr>
</table>
</form>

<?php
   } else {
  echo "<p>Internal Error while accessing user information.</p>\n";
  echo "<p>Please contact an administrator.</p>\n";
 }
?>

<br /><hr />
<a href="userhome.php">Return to User Home</a><br />
<a href="logout.php">Logout</a><br />

</body>
</html>