Commit 1bef3cc5 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Add Home Page URL for user.

parent b36c3e18
......@@ -35,6 +35,7 @@ if (isset($uid)) {
}
$usr_expires = $row[usr_expires];
$usr_email = $row[usr_email];
$usr_URL = $row[usr_URL];
$usr_addr = $row[usr_addr];
$usr_name = $row[usr_name];
$usr_phone = $row[usr_phone];
......@@ -97,6 +98,13 @@ if ($returning) {
value=\"$usr_email\"></td>
</tr>\n";
echo "<tr>
<td>Home Page URL:</td>
<td class=\"left\">
<input type=\"readonly\" name=\"usr_url\"
value=\"$usr_URL\"></td>
</tr>\n";
echo "<tr>
<td>Mailing Address:</td>
<td class=\"left\">
......@@ -149,6 +157,12 @@ else {
<input type=\"text\" name=\"usr_email\" size=30></td>
</tr>\n";
echo "<tr>
<td>Home Page URL:</td>
<td class=\"left\">
<input type=\"text\" name=\"usr_url\" size=45></td>
</tr>\n";
echo "<tr>
<td>Mailing Address:</td>
<td class=\"left\">
......
......@@ -148,6 +148,7 @@ $userinfo_result = mysql_db_query($TBDBNAME,
$row = mysql_fetch_array($userinfo_result);
$usr_expires = $row[usr_expires];
$usr_email = $row[usr_email];
$usr_URL = $row[usr_URL];
$usr_addr = $row[usr_addr];
$usr_name = $row[usr_name];
$usr_phone = $row[usr_phone];
......@@ -175,6 +176,11 @@ echo "<tr>
<td>$usr_email</td>
</tr>\n";
echo "<tr>
<td>Home Page URL:</td>
<td><A href='$usr_URL'>$usr_URL</A></td>
</tr>\n";
echo "<tr>
<td>Expiration date:</td>
<td>$usr_expires</td>
......
......@@ -45,6 +45,7 @@ if (! $info_result) {
$row = mysql_fetch_array($info_result);
$usr_expires = $row[usr_expires];
$usr_email = $row[usr_email];
$usr_URL = $row[usr_URL];
$usr_addr = $row[usr_addr];
$usr_name = $row[usr_name];
$usr_phone = $row[usr_phone];
......@@ -76,6 +77,13 @@ echo "<tr>
value=\"$usr_email\"></td>
</tr>\n";
echo "<tr>
<td>Home Page URL:</td>
<td class=\"left\">
<input type=\"text\" name=\"usr_url\" size=\"45\"
value=\"$usr_URL\"></td>
</tr>\n";
echo "<tr>
<td>Expiration date:</td>
<td class=\"left\">
......
......@@ -104,6 +104,7 @@ $insert_result = mysql_db_query($TBDBNAME,
"UPDATE users SET ".
"usr_name=\"$usr_name\", ".
"usr_email=\"$usr_email\", ".
"usr_URL=\"$usr_url\", ".
"usr_addr=\"$usr_addr\", ".
"usr_phone=\"$usr_phone\", ".
"usr_expires=\"$usr_expires\", ".
......
......@@ -50,7 +50,7 @@ if (!isset($usr_name) ||
}
if (!isset($proj_URL) ||
strcmp($proj_URL, "http://www.cs.berkeley.edu/netgrp/omcast/") == 0) {
$proj_URL = "";
$formerror = Project URL";
}
if (!isset($usr_email) ||
strcmp($usr_email, "") == 0) {
......@@ -169,9 +169,9 @@ if (! $returning) {
$encoding = crypt("$password1");
$newuser_command = "INSERT INTO users ".
"(uid,usr_created,usr_expires,usr_name,usr_email,usr_addr,".
"usr_title,usr_affil,usr_phone,usr_pswd,unix_uid,status) ".
"usr_URL,usr_title,usr_affil,usr_phone,usr_pswd,unix_uid,status) ".
"VALUES ('$proj_head_uid', now(), '$proj_expires', '$usr_name', ".
"'$usr_email', '$usr_addr', '$usr_title', '$usr_affil', ".
"'$usr_email', '$usr_addr', '$usr_url', '$usr_title', '$usr_affil', ".
"'$usr_phones', '$encoding', ".
"'$unix_uid', 'newuser')";
$newuser_result = mysql_db_query($TBDBNAME, $newuser_command);
......@@ -242,9 +242,10 @@ mail($TBMAIL_APPROVAL,
"Contact Info:\n".
"Name: $usr_name ($proj_head_uid)\n".
"Email: $usr_email\n".
"User URL: $usr_url\n".
"Project: $proj_name\n".
"Expires: $proj_expires\n".
"URL: $proj_URL\n".
"Project URL: $proj_URL\n".
"Title: $usr_title\n".
"Affiliation: $usr_affil\n".
"Address: $usr_addr\n".
......
......@@ -133,6 +133,23 @@ if ($row) {
echo " </td>
</tr>\n";
#
# User URL
#
echo "<tr>
<td>Home Page URL:</td>
<td class=\"left\">
<input name=\"usr_url\"";
if ($row) {
echo " type=\"readonly\" value=\"$row[usr_URL]\">";
} else {
echo " type=\"text\"
value=\"http://www.cs.berkeley.edu/~jml/\"
size=\"45\">";
}
echo " </td>
</tr>\n";
#
# Email:
......
......@@ -125,9 +125,9 @@ if (! $returning) {
$newuser_command = "INSERT INTO users ".
"(uid,usr_created,usr_expires,usr_name,usr_email,usr_addr,".
"usr_phone,usr_title,usr_affil,usr_pswd,unix_uid,status) ".
"usr_URL,usr_phone,usr_title,usr_affil,usr_pswd,unix_uid,status) ".
"VALUES ('$uid',now(),'$usr_expires','$usr_name','$usr_email',".
"'$usr_addr','$usr_phone','$usr_title','$usr_affil',".
"'$usr_addr', '$usr_url', '$usr_phone','$usr_title','$usr_affil',".
"'$encoding','$unix_uid','newuser')";
$newuser_result = mysql_db_query($TBDBNAME, $newuser_command);
if (! $newuser_result) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment