From: <jhe...@us...> - 2002-11-28 14:37:35
|
Update of /cvsroot/upcase-project/UpCase/admin In directory sc8-pr-cvs1:/tmp/cvs-serv14212 Modified Files: newgroup.php Log Message: removed all sql. Now use the account manager Index: newgroup.php =================================================================== RCS file: /cvsroot/upcase-project/UpCase/admin/newgroup.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** newgroup.php 12 Nov 2002 17:48:50 -0000 1.1 --- newgroup.php 28 Nov 2002 14:37:32 -0000 1.2 *************** *** 2,26 **** include_once("../config/uc_config.inc"); ! include_once("lib/uc_page.php"); ! include_once("lib/uc_sql.php"); $page = new UcPage("groupCreation"); $page->open(); ! ! include("config/uc_templates.inc"); ! $tmpl = new ModeliXe($uc_tmpl["NEW_GROUP"]); ! $tmpl->SetModeliXe(); ! ! if (!empty($newgroup)) ! { ! $query = sprintf($ucsql_groupadd, $newgroup); ! print($query); ! $db = new UcSql(); ! $db->Execute($query) or die("Unable to create group: " . ! $db->ErrorMsg()); ! } ! ! $tmpl->MxText("groupname", $newgroup); ! $tmpl->MxWrite(); ?> --- 2,17 ---- include_once("../config/uc_config.inc"); ! include_once("uc_page.php"); ! include_once("uc_accounts.php"); ! include_once("uc_utils.php"); $page = new UcPage("groupCreation"); $page->open(); ! $groupName = checkVar("newgroup", false) ! or die("No group name given"); ! $accountMgr = new UcAccountManager($page->session->db); ! $group = $accountMgr->createGroup($groupName); ! $accountMgr->addGroup($group); ! header("Location: " . $ucConfig->upcaseUrl . "/admin/userslist.php"); ?> |