Skip to content
GitLab
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
39cfc5c9
Commit
39cfc5c9
authored
Nov 01, 2000
by
Leigh B. Stoller
Browse files
More little form changes for database field lengths.
parent
66a5d9c5
Changes
6
Hide whitespace changes
Inline
Side-by-side
www/addgrp.php3
View file @
39cfc5c9
...
...
@@ -69,7 +69,7 @@ if ($row) {
echo
"type=
\"
readonly
\"
value=
\"
$row[uid]
\"
>"
;
}
else
{
echo
"type=
\"
text
\"
>"
;
echo
"type=
\"
text
\"
size=
\"
8
\"
maxlength=
\"
8
\"
>"
;
}
echo
" </td>
</tr>
\n
"
;
...
...
@@ -204,7 +204,8 @@ echo "<tr>
#
echo
"<tr>
<td>*Name (no blanks):</td>
<td><input type=
\"
text
\"
name=
\"
gid
\"
value=
\"
ucb-omcast
\"
></td>
<td><input type=
\"
text
\"
name=
\"
gid
\"
value=
\"
ucb-omcast
\"
size=
\"
12
\"
MAXLENGTH=
\"
12
\"
></td>
</tr>
\n
"
;
#
...
...
www/addusr.php3
View file @
39cfc5c9
...
...
@@ -74,7 +74,8 @@ if (isset($uid)) {
echo
"</tr>"
;
}
else
{
echo
"<form action=
\"
usradded.php3
\"
method=
\"
post
\"
>
\n
"
;
echo
"<tr><td>*Username:</td><td><input type=
\"
text
\"
name=
\"
uid
\"
></td>"
;
echo
"<tr><td>*Username:</td><td><input type=
\"
text
\"
name=
\"
uid
\"
"
;
echo
"size=
\"
8
\"
maxlength=
\"
8
\"
></td>"
;
echo
"<td>Expiration date:</td>"
;
echo
"<td><input type=
\"
text
\"
name=
\"
usr_expires
\"
"
;
$time
=
date
(
"m/d/Y"
,
time
()
+
(
86400
*
90
));
#add 90 days
...
...
www/beginexp_form.php3
View file @
39cfc5c9
...
...
@@ -102,10 +102,12 @@ echo " </td>
#
# Experiment ID and Long Name:
#
# XXX Note CONSTANT in expression!
#
echo
"<tr>
<td>*Name<br>(will be prefixed by project name):</td>
<td><input type=
\"
text
\"
name=
\"
exp_id
\"
size=
\"
22
\"
MAXLENGTH
=
\"
22
\"
>
size=
\"
19
\"
maxlength
=
\"
19
\"
>
</td>
</tr>
\n
"
;
...
...
www/beginexp_process.php3
View file @
39cfc5c9
...
...
@@ -91,12 +91,13 @@ if ($row = mysql_fetch_row($pswd_result)) {
#
# Current policy is to prefix the EID with the PID. Make sure it is not
# too long for the database.
# too long for the database. PID is 12, and the max is 32, so the user
# cannot have provided one more than 19, since we add a hyphen in there.
#
# XXX Note CONSTANT in expression!
#
$exp_eid
=
$exp_pid
.
$exp_id
;
if
(
strlen
(
$exp_id
)
>
22
)
{
if
(
strlen
(
$exp_id
)
>
19
)
{
USERERROR
(
"The experiment name
\"
$exp_id
\"
is too long! "
.
"Please select another."
,
1
);
}
...
...
www/grpadded.php3
View file @
39cfc5c9
...
...
@@ -78,6 +78,21 @@ if ($formerror != "No Error") {
"Please go back and fill out the
\"
$formerror
\"
field!"
,
1
);
}
#
# Database limit; PID must be 12 chars or less.
# UID must be 8 chars or less.
#
# XXX Note CONSTANT in expression!
#
if
(
strlen
(
$gid
)
>
12
)
{
USERERROR
(
"The project name
\"
$gid
\"
is too long! "
.
"Please select another."
,
1
);
}
if
(
strlen
(
$grp_head_uid
)
>
8
)
{
USERERROR
(
"The name
\"
$grp_head_uid
\"
is too long! "
.
"Please select another."
,
1
);
}
#
# This is a new project request. Make sure it does not already exist.
#
...
...
@@ -183,7 +198,7 @@ if (! $returning) {
"Testbed Ops
\n
"
.
"Utah Network Testbed
\n
"
,
"From:
$TBMAIL_CONTROL
\n
"
.
"Cc:
$TBMAIL_
WWW
\n
"
.
"Cc:
$TBMAIL_
CONTROL
\n
"
.
"Errors-To:
$TBMAIL_WWW
"
);
}
...
...
@@ -246,7 +261,7 @@ mail($TBMAIL_APPROVAL,
"select the 'Group Approval' page.
\n\n
They are expecting a result "
.
"within 72 hours.
\n
"
,
"From:
$usr_name
<
$email
>
\n
"
.
"Cc:
$TBMAIL_
WWW
\n
"
.
"Cc:
$TBMAIL_
CONTROL
\n
"
.
"Errors-To:
$TBMAIL_WWW
"
);
#
...
...
www/usradded.php3
View file @
39cfc5c9
...
...
@@ -58,6 +58,16 @@ if ($formerror != "No Error") {
die
(
""
);
}
#
# Database limit; UID must be 8 chars or less.
#
# XXX Note CONSTANT in expression!
#
if
(
strlen
(
$uid
)
>
8
)
{
USERERROR
(
"The name
\"
$uid
\"
is too long! "
.
"Please select another."
,
1
);
}
#
# See if this is a new user or one returning. We have to query the database
# for the uid, and then do the password thing. For a user returning, the
...
...
@@ -170,7 +180,7 @@ if (! $returning) {
"Testbed Ops
\n
"
.
"Utah Network Testbed
\n
"
,
"From:
$TBMAIL_CONTROL
\n
"
.
"Cc:
$TBMAIL_
WWW
\n
"
.
"Cc:
$TBMAIL_
CONTROL
\n
"
.
"Errors-To:
$TBMAIL_WWW
"
);
#
...
...
@@ -246,7 +256,7 @@ mail("$group_leader_email",
"Testbed Ops
\n
"
.
"Utah Network Testbed
\n
"
,
"From:
$TBMAIL_CONTROL
\n
"
.
"Cc:
$TBMAIL_
WWW
\n
"
.
"Cc:
$TBMAIL_
CONTROL
\n
"
.
"Errors-To:
$TBMAIL_WWW
"
);
#
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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