Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
91f7493f
Commit
91f7493f
authored
Oct 26, 2000
by
Leigh B. Stoller
Browse files
Changes for new title/affiliation fields.
parent
a4406706
Changes
4
Hide whitespace changes
Inline
Side-by-side
www/addgrp.php3
View file @
91f7493f
...
...
@@ -92,14 +92,15 @@ echo "<tr>
<td><input type=
\"
text
\"
name=
\"
grp_URL
\"
value=
\"
http://www.cs.berkeley.edu/netgrp/omcast/
\"
></td>
<td>*
Email<br>Address
:</td>
<td>*
Title/Position
:</td>
<td class=
\"
left
\"
>
<input name=
\"
email
\"
"
;
<input name=
\"
usr_title
\"
"
;
if
(
$row
)
{
echo
" type=
\"
readonly
\"
value=
\"
$row[usr_
email
]
\"
>"
;
echo
" type=
\"
readonly
\"
value=
\"
$row[usr_
title
]
\"
>"
;
}
else
{
echo
" type=
\"
text
\"
>"
;
echo
" type=
\"
text
\"
value=
\"
Professor
\"
>"
;
}
echo
" </td>
</tr>
\n
"
;
...
...
@@ -110,48 +111,74 @@ echo "<tr>
<td><input type=
\"
text
\"
name=
\"
grp_expires
\"
value=
\"
$expiretime
\"
></td>
<td>*
Postal<br>Address
:</td>
<td class=
\"
left
\"
>
<input name=
\"
usr_a
ddr
\"
"
;
<td>*
Institutional<br>Affiliation
:</td>
<td class=
\"
left
\"
>
<input name=
\"
usr_a
ffil
\"
"
;
if
(
$row
)
{
echo
"
type=
\"
readonly
\"
value=
\"
$row[usr_a
ddr
]
\"
>"
;
echo
" type=
\"
readonly
\"
value=
\"
$row[usr_a
ffil
]
\"
>"
;
}
else
{
echo
"
type=
\"
text
\"
>"
;
echo
" type=
\"
text
\"
value=
\"
UCB Networks Group
\"
>"
;
}
echo
" </td>
</tr>
\n
"
;
echo
"<tr>
<td>*Your institutional<br>affiliation:</td>
<td><input type=
\"
text
\"
name=
\"
grp_affil
\"
value=
\"
UCB Networks Group
\"
></td>
<td>*Phone #:</td>
<td></td>
<td></td>
<td>*Email<br>Address:</td>
<td class=
\"
left
\"
>
<input name=
\"
usr_phones
\"
"
;
<input name=
\"
email
\"
"
;
if
(
$row
)
{
echo
" type=
\"
readonly
\"
value=
\"
$row[usr_
phone
]
\"
>"
;
echo
" type=
\"
readonly
\"
value=
\"
$row[usr_
email
]
\"
>"
;
}
else
{
echo
" type=
\"
text
\"
>"
;
}
echo
" </td>
</tr>
\n
"
;
#
# If a new usr, then provide a second password confirmation field.
# Otherwise, a blank spot.
#
echo
"<tr>
<td>*Password:</td>
<td><input type=
\"
password
\"
name=
\"
password1
\"
></td>
</tr>
\n
"
;
#
# If a new usr, then provide a second password confirmation field.
#
<td>*Postal<br>Address:</td>
<td class=
\"
left
\"
>
<input name=
\"
usr_addr
\"
"
;
if
(
$row
)
{
echo
" type=
\"
readonly
\"
value=
\"
$row[usr_addr]
\"
>"
;
}
else
{
echo
" type=
\"
text
\"
>"
;
}
echo
" </td>
</tr>
\n
"
;
echo
"<tr>"
;
if
(
!
$row
)
{
echo
"<tr>
<td>Retype<br>New Password:</td>
<td class=
\"
left
\"
>
<input type=
\"
password
\"
name=
\"
password2
\"
></td>
</tr>
\n
"
;
echo
"<td>*Retype<br>New Password:</td>
<td class=
\"
left
\"
>
<input type=
\"
password
\"
name=
\"
password2
\"
></td>"
;
}
else
{
echo
"<td></td>
<td></td>"
;
}
echo
" <td>*Phone #:</td>
<td class=
\"
left
\"
>
<input name=
\"
usr_phones
\"
"
;
if
(
$row
)
{
echo
" type=
\"
readonly
\"
value=
\"
$row[usr_phone]
\"
>"
;
}
else
{
echo
" type=
\"
text
\"
>"
;
}
echo
" </td>
</tr>
\n
"
;
?>
<tr>
...
...
www/grpadded.php3
View file @
91f7493f
...
...
@@ -44,9 +44,13 @@ if (!isset($usr_addr) ||
strcmp
(
$usr_addr
,
""
)
==
0
)
{
$formerror
=
"Postal Address"
;
}
if
(
!
isset
(
$grp_affil
)
||
strcmp
(
$grp_affil
,
"UCB Networks Group"
)
==
0
)
{
$formerror
=
"Research Afilliation"
;
if
(
!
isset
(
$usr_affil
)
||
strcmp
(
$usr_affil
,
"UCB Networks Group"
)
==
0
)
{
$formerror
=
"Institutional Afilliation"
;
}
if
(
!
isset
(
$usr_title
)
||
strcmp
(
$usr_title
,
"Professor"
)
==
0
)
{
$formerror
=
"Title/Position"
;
}
if
(
!
isset
(
$usr_phones
)
||
strcmp
(
$usr_phones
,
""
)
==
0
)
{
...
...
@@ -140,9 +144,10 @@ if (! $returning) {
$encoding
=
crypt
(
"
$password1
"
);
$newuser_command
=
"INSERT INTO users "
.
"(uid,usr_created,usr_expires,usr_name,usr_email,usr_addr,"
.
"usr_phone,usr_pswd,unix_uid,status) "
.
"usr_
title,usr_affil,usr_
phone,usr_pswd,unix_uid,status) "
.
"VALUES ('
$grp_head_uid
', now(), '
$grp_expires
', '
$usr_name
', "
.
"'
$email
', '
$usr_addr
', '
$usr_phones
', '
$encoding
', "
.
"'
$email
', '
$usr_addr
', '
$usr_title
', '
$usr_affil
', "
.
"'
$usr_phones
', '
$encoding
', "
.
"'
$unix_uid
', 'newuser')"
;
$newuser_result
=
mysql_db_query
(
$TBDBNAME
,
$newuser_command
);
if
(
!
$newuser_result
)
{
...
...
www/modusr_form.php3
View file @
91f7493f
...
...
@@ -64,6 +64,8 @@ $usr_addr = $row[usr_addr];
$usr_name
=
$row
[
usr_name
];
$usr_phone
=
$row
[
usr_phone
];
$usr_passwd
=
$row
[
usr_pswd
];
$usr_title
=
$row
[
usr_title
];
$usr_affil
=
$row
[
usr_affil
];
#
# Generate the form.
...
...
@@ -109,6 +111,10 @@ echo "<tr>
<td class=
\"
left
\"
>
<input type=
\"
password
\"
name=
\"
old_password
\"
></td>
<td>*Title/Position:</td>
<td class=
\"
left
\"
>
<input type=
\"
text
\"
name=
\"
usr_title
\"
value=
\"
$usr_title
\"
></td>
</tr>
\n
"
;
echo
"<tr>
...
...
@@ -116,6 +122,10 @@ echo "<tr>
<td class=
\"
left
\"
>
<input type=
\"
password
\"
name=
\"
new_password1
\"
></td>
<td>*Institutional<br>Affiliation:</td>
<td class=
\"
left
\"
>
<input type=
\"
text
\"
name=
\"
usr_affil
\"
value=
\"
$usr_affil
\"
></td>
</tr>
\n
"
;
echo
"<tr>
...
...
www/modusr_process.php3
View file @
91f7493f
...
...
@@ -36,6 +36,14 @@ if (!isset($usr_phone) ||
strcmp
(
$usr_phone
,
""
)
==
0
)
{
$formerror
=
"Phone #"
;
}
if
(
!
isset
(
$usr_title
)
||
strcmp
(
$usr_title
,
""
)
==
0
)
{
$formerror
=
"Title/Position"
;
}
if
(
!
isset
(
$usr_affil
)
||
strcmp
(
$usr_affil
,
""
)
==
0
)
{
$formerror
=
"Institutional Affiliation"
;
}
if
(
!
isset
(
$old_password
)
||
strcmp
(
$old_password
,
""
)
==
0
)
{
$formerror
=
"Old Password"
;
}
...
...
@@ -115,7 +123,9 @@ $insert_result = mysql_db_query($TBDBNAME,
"usr_email=
\"
$usr_email
\"
, "
.
"usr_addr=
\"
$usr_addr
\"
, "
.
"usr_phone=
\"
$usr_phone
\"
, "
.
"usr_expires=
\"
$usr_expires
\"
"
.
"usr_expires=
\"
$usr_expires
\"
, "
.
"usr_title=
\"
$usr_title
\"
, "
.
"usr_affil=
\"
$usr_affil
\"
"
.
"WHERE uid=
\"
$uid
\"
"
);
if
(
!
$insert_result
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment