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
2ea7a758
Commit
2ea7a758
authored
Dec 17, 2001
by
Leigh B. Stoller
Browse files
Minor cleanup; get rid of unused DB field accesses.
parent
d8b38f19
Changes
7
Hide whitespace changes
Inline
Side-by-side
www/addusr.php3
View file @
2ea7a758
...
...
@@ -31,7 +31,6 @@ if ($uid) {
$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
];
...
...
www/dbdefs.php3.in
View file @
2ea7a758
...
...
@@ -594,6 +594,21 @@ function TBUserInfo($uid, &$user_name, &$user_email)
$user_email
=
$row
[
usr_email
];
}
#
# Confirm a current user or not.
#
# usage TBCurrentUser($uid)
# returns 1 if a valid user.
# returns 0 if not a valid user.
#
function
TBCurrentUser
(
$uid
)
{
$query_result
=
DBQueryFatal
(
"SELECT usr_pswd FROM users WHERE uid='
$uid
'"
);
return
mysql_num_rows
(
$query_result
);
}
#
# Confirm a valid pid/gid
#
...
...
@@ -886,7 +901,7 @@ function TBExpUidLastLogins($pid, $eid)
}
#
#
#
Number of globally free PCs.
#
function
TBFreePCs
()
{
...
...
@@ -900,6 +915,20 @@ function TBFreePCs()
return
mysql_num_rows
(
$query_result
);
}
function
TBUserPCs
(
$uid
)
{
$query_result
=
DBQueryFatal
(
"select a.node_id from nodes as a "
.
"left join reserved as b on a.node_id=b.node_id "
.
"left join node_types as nt on a.type=nt.type "
.
"left join experiments as e on b.pid=e.pid and "
.
" b.eid=e.eid "
.
"where e.expt_head_uid='
$uid
' and e.pid!='emulab-ops' "
.
" and a.role='testnode' and a.type like 'pc%'"
);
return
mysql_num_rows
(
$query_result
);
}
#
# DB Interface.
#
...
...
www/modusr_form.php3
View file @
2ea7a758
...
...
@@ -68,7 +68,6 @@ $usr_URL = $row[usr_URL];
$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
];
...
...
@@ -170,7 +169,7 @@ echo "<h4><blockquote><blockquote>
<dl COMPACT>
<dt>[1]
<dd>Please consult our
<a href
=
'docwrapper.php3?docname=security.html'>
<a href
=
'docwrapper.php3?docname=security.html'>
security policies</a> for information
regarding passwords and email addresses.
</dl>
...
...
www/newproject.php3
View file @
2ea7a758
...
...
@@ -178,15 +178,7 @@ if (mysql_num_rows($query_result)) {
#
# See if this is a new user or one returning.
#
$pswd_result
=
DBQueryFatal
(
"SELECT usr_pswd FROM users WHERE uid='
$proj_head_uid
'"
);
if
(
$row
=
mysql_fetch_row
(
$pswd_result
))
{
$returning
=
1
;
}
else
{
$returning
=
0
;
}
$returning
=
TBCurrentUser
(
$proj_head_uid
);
#
# If a user returning, then the login must be valid to continue any further.
...
...
www/showproject_dump.php3
View file @
2ea7a758
...
...
@@ -101,7 +101,6 @@ $usr_URL = $row[usr_URL];
$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
];
...
...
www/showstuff.php3
View file @
2ea7a758
...
...
@@ -282,7 +282,6 @@ function SHOWUSER($uid) {
$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
];
$status
=
$row
[
status
];
...
...
www/usradded.php3
View file @
2ea7a758
...
...
@@ -101,18 +101,7 @@ $usr_phone = addslashes($usr_phone);
#
# See if this is a new user or one returning.
#
$query_result
=
mysql_db_query
(
$TBDBNAME
,
"SELECT usr_pswd FROM users WHERE uid=
\"
$joining_uid
\"
"
);
if
(
!
$query_result
)
{
$err
=
mysql_error
();
TBERROR
(
"Database Error retrieving info for
$joining_uid
:
$err
\n
"
,
1
);
}
if
(
mysql_num_rows
(
$query_result
)
>
0
)
{
$returning
=
1
;
}
else
{
$returning
=
0
;
}
$returning
=
TBCurrentUser
(
$joining_uid
);
#
# If a user returning, then the login must be valid to continue any further.
...
...
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