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
e5bf68ad
Commit
e5bf68ad
authored
Dec 16, 2003
by
Leigh B. Stoller
Browse files
Add some unrelated missing functions that are still pending in my
devel tree.
parent
5019322b
Changes
1
Show whitespace changes
Inline
Side-by-side
www/dbdefs.php3.in
View file @
e5bf68ad
...
@@ -160,6 +160,12 @@ function TBvalid_gid($gid) {
...
@@ -160,6 +160,12 @@ function TBvalid_gid($gid) {
return
(
strlen
(
$gid
)
<=
$TBDB_GIDLEN
)
&&
(
strlen
(
$gid
)
>=
$TBDB_MINLEN
)
&&
return
(
strlen
(
$gid
)
<=
$TBDB_GIDLEN
)
&&
(
strlen
(
$gid
)
>=
$TBDB_MINLEN
)
&&
preg_match
(
"/^[a-zA-Z][-\w]+$/"
,
$gid
);
preg_match
(
"/^[a-zA-Z][-\w]+$/"
,
$gid
);
}
}
function
TBvalid_eid
(
$eid
)
{
global
$TBDB_EIDLEN
,
$TBDB_MINLEN
;
return
(
strlen
(
$eid
)
<=
$TBDB_EIDLEN
)
&&
(
strlen
(
$eid
)
>=
$TBDB_MINLEN
)
&&
preg_match
(
"/^[a-zA-Z][-\w]+$/"
,
$eid
);
}
function
TBvalid_phone
(
$phone
)
{
function
TBvalid_phone
(
$phone
)
{
global
$TBDB_PHONELEN
;
global
$TBDB_PHONELEN
;
...
@@ -172,6 +178,10 @@ function TBvalid_usrname($name) {
...
@@ -172,6 +178,10 @@ function TBvalid_usrname($name) {
return
(
strlen
(
$name
)
<=
$TBDB_USRNAMELEN
)
&&
return
(
strlen
(
$name
)
<=
$TBDB_USRNAMELEN
)
&&
preg_match
(
"/^[-\w\. ]+$/"
,
$name
);
preg_match
(
"/^[-\w\. ]+$/"
,
$name
);
}
}
function
TBvalid_description
(
$token
)
{
return
(
strlen
(
$token
)
<=
256
)
&&
preg_match
(
"/^[
\\
040-
\\
176]*$/"
,
$token
);
}
function
TBvalid_email
(
$email
)
function
TBvalid_email
(
$email
)
{
{
global
$TBDB_EMAILLEN
,
$TBDB_MINLEN
;
global
$TBDB_EMAILLEN
,
$TBDB_MINLEN
;
...
...
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