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
958ab56a
Commit
958ab56a
authored
Oct 31, 2000
by
Leigh B. Stoller
Browse files
Add to projects table until we sort out grp vs. project problem.
parent
028b0da8
Changes
1
Hide whitespace changes
Inline
Side-by-side
www/grpadded.php3
View file @
958ab56a
...
...
@@ -192,6 +192,10 @@ $row = mysql_fetch_row($unixgid_result);
$unix_gid
=
$row
[
0
];
$unix_gid
++
;
#
# The whole group vs. project issue needs to be fixed! For now insert into
# both.
#
$newgroup_command
=
"INSERT INTO groups "
.
"(gid,grp_created,grp_expires,grp_name,"
.
"grp_URL,grp_head_uid,cntrl_node,unix_gid)"
.
...
...
@@ -200,7 +204,16 @@ $newgroup_command = "INSERT INTO groups ".
$newgroup_result
=
mysql_db_query
(
$TBDBNAME
,
$newgroup_command
);
if
(
!
$newgroup_result
)
{
$err
=
mysql_error
();
TBERROR
(
"Database Error adding adding new group
$gid
:
$err
\n
"
,
1
);
TBERROR
(
"Database Error adding new group
$gid
:
$err
\n
"
,
1
);
}
$newproj_command
=
"INSERT INTO projects "
.
"(pid, proj_created, proj_expires, proj_name, proj_head_uid) "
.
"VALUES ('
$gid
', now(), '
$grp_expires
', '
$grp_name
', '
$grp_head_uid
')"
;
$newproj_result
=
mysql_db_query
(
$TBDBNAME
,
$newproj_command
);
if
(
!
$newproj_result
)
{
$err
=
mysql_error
();
TBERROR
(
"Database Error adding new project
$gid
:
$err
\n
"
,
1
);
}
$newmemb_result
=
mysql_db_query
(
$TBDBNAME
,
...
...
@@ -208,8 +221,7 @@ $newmemb_result = mysql_db_query($TBDBNAME,
"values ('
$grp_head_uid
','
$gid
','none');"
);
if
(
!
$newmemb_result
)
{
$err
=
mysql_error
();
TBERROR
(
"Database Error adding adding new group membership:
$gid
:
$err
\n
"
,
1
);
TBERROR
(
"Database Error adding new group membership:
$gid
:
$err
\n
"
,
1
);
}
mail
(
$TBMAIL_APPROVAL
,
...
...
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