function publicAdminManager_list() { checkPerm('view'); require_once _base_ . '/lib/lib.table.php'; $lang =& DoceboLanguage::createInstance('adminrules', 'framework'); $lang =& DoceboLanguage::createInstance('public_admin_manager', 'framework'); $aclManager = new DoceboACLManager(); // get users to show -------------------------------------------------- $admin_group_idst = $aclManager->getGroupST(ADMIN_GROUP_PUBLICADMIN); $arr_admin_idst = $aclManager->getGroupUMembers($admin_group_idst); $arr_admin_id = array_flip($aclManager->getArrUserST($arr_admin_idst)); $pm =& PlatformManager::createInstance(); $lms_is_active = $pm->isLoaded("lms"); /*$cms_is_active = $pm->isLoaded("cms");*/ // print table -------------------------------------------------------- $table = new Table(Get::sett('visuItem'), $lang->def('_PUBLIC_ADMIN_USER'), $lang->def('_PUBLIC_ADMIN_USER')); $table->initNavBar('ini', 'link'); $table->setLink('index.php?modname=public_admin_manager&op=view&ini='); $ini = $table->getSelectedElement(); $GLOBALS['page']->add(getTitleArea($lang->def('_ADMIN_MANAGMENT'), 'admin_managmer', $lang->def('_ADMIN_MANAGMENT')) . '<div class="std_block">', 'content'); $contentH = array($lang->def('_USERNAME'), '<img src="' . getPathImage() . 'admin_manager/man_pref.gif" alt="' . $lang->def('_ADMIN_PREFERENCES_TITLE', 'adminrules') . '" ' . 'title="' . $lang->def('_ADMIN_PREFERENCES_TITLE', 'adminrules') . '" />', '<img src="' . getPathImage() . 'admin_manager/man_menu.gif" alt="' . $lang->def('_ASSIGN_USERS', 'adminrules') . '" ' . 'title="' . $lang->def('_ASSIGN_USERS', 'adminrules') . '" />', '<img src="' . getPathImage() . 'directory/tree.gif" alt="' . $lang->def('_ASSIGN_USERS', 'adminrules') . '" ' . 'title="' . $lang->def('_ASSIGN_USERS', 'adminrules') . '" />'); $typeH = array('', 'image', 'image', 'image'); if ($lms_is_active) { $contentH[] = '<img src="' . getPathImage() . 'admin_manager/man_course.gif" alt="' . $lang->def('_ASSIGN_USERS', 'adminrules') . '" ' . 'title="' . $lang->def('_ASSIGN_USERS', 'adminrules') . '" />'; $typeH[] = 'image'; } $table->setColsStyle($typeH); $table->addHead($contentH); $maxItem = count($arr_admin_id) < $ini + Get::sett('visuItem') ? count($arr_admin_id) : $ini + Get::sett('visuItem'); for ($index = $ini; $index < $maxItem; $index++) { $admin_userid = substr($arr_admin_id[$arr_admin_idst[$index]], 1); $rowContent = array($admin_userid); // Edit preferences $rowContent[] = '<a href="index.php?modname=public_admin_manager&op=edit_preferences&adminidst=' . $arr_admin_idst[$index] . '" title="' . $lang->def('_ADMIN_PREFERENCES_TITLE', 'adminrules') . ' : ' . $admin_userid . '">' . '<img src="' . getPathImage() . 'admin_manager/man_pref.gif"' . ' alt="' . $lang->def('_ADMIN_PREFERENCES_TITLE', 'adminrules') . ' : ' . $admin_userid . '" /></a>'; // Edit menu $rowContent[] = '<a href="index.php?modname=public_admin_manager&op=edit_menu&adminidst=' . $arr_admin_idst[$index] . '" title="' . $lang->def('_ASSIGN_USERS', 'adminrules') . ' : ' . $admin_userid . '">' . '<img src="' . getPathImage() . 'admin_manager/man_menu.gif"' . ' alt="' . $lang->def('_ASSIGN_USERS', 'adminrules') . ' : ' . $admin_userid . '" /></a>'; // Edit user $rowContent[] = '<a href="index.php?modname=public_admin_manager&op=assign_tree&adminidst=' . $arr_admin_idst[$index] . '" title="' . $lang->def('_ASSIGN_USERS', 'adminrules') . ' : ' . $admin_userid . '">' . '<img src="' . getPathImage() . 'directory/tree.gif" ' . 'alt="' . $lang->def('_ASSIGN_USERS', 'adminrules') . ' : ' . $admin_userid . '" /></a>'; // Edit course if ($lms_is_active) { $rowContent[] = '<a href="index.php?modname=public_admin_manager&op=edit_course&adminidst=' . $arr_admin_idst[$index] . '&load=1" title="' . $lang->def('_ASSIGN_USERS', 'adminrules') . ' : ' . $admin_userid . '">' . '<img src="' . getPathImage() . 'admin_manager/man_course.gif"' . ' alt="' . $lang->def('_ASSIGN_USERS', 'adminrules') . ' : ' . $admin_userid . '" /></a>'; } $table->addBody($rowContent); } $GLOBALS['page']->add($table->getTable() . $table->getNavBar($ini, count($arr_admin_id)), 'content'); $GLOBALS['page']->add('</div>', 'content'); }
function adminManager_list() { checkPerm('view'); require_once _base_ . '/lib/lib.table.php'; $lang =& DoceboLanguage::createInstance('adminrules', 'framework'); $aclManager = new DoceboACLManager(); // get users to show -------------------------------------------------- $admin_group_idst = $aclManager->getGroupST(ADMIN_GROUP_ADMIN); $arr_admin_idst = $aclManager->getGroupUMembers($admin_group_idst); $arr_admin_id = array_flip($aclManager->getArrUserST($arr_admin_idst)); $usres_info =& $aclManager->getUsers($arr_admin_idst); $pm =& PlatformManager::createInstance(); $lms_is_active = $pm->isLoaded("lms"); $cms_is_active = $pm->isLoaded("cms"); // print table -------------------------------------------------------- $table = new Table(Get::sett('visuItem'), $lang->def('_ADMIN_USER'), $lang->def('_ADMIN_USER')); $table->initNavBar('ini', 'link'); $table->setLink('index.php?modname=admin_manager&op=view&ini='); $ini = $table->getSelectedElement(); $GLOBALS['page']->add(getTitleArea($lang->def('_ADMIN_MANAGMENT'), 'admin_managmer', $lang->def('_ADMIN_MANAGMENT')) . '<div class="std_block">', 'content'); $contentH = array($lang->def('_USERNAME'), $lang->def('_EMAIL'), '<img src="' . getPathImage() . 'admin_manager/man_pref.gif" alt="' . $lang->def('_ADMIN_PREFERENCES_TITLE') . '" ' . 'title="' . $lang->def('_ADMIN_PREFERENCES_TITLE') . '" />', '<img src="' . getPathImage() . 'admin_manager/man_menu.gif" alt="' . $lang->def('_ASSIGN_USERS') . '" ' . 'title="' . $lang->def('_ADMIN_MENU_TITLE') . '" />', '<img src="' . getPathImage() . 'directory/tree.gif" alt="' . $lang->def('_ASSIGN_USERS') . '" ' . 'title="' . $lang->def('_ASSIGN_USERS') . '" />', '<img src="' . getPathImage() . 'admin_manager/lang_lang.gif" alt="' . $lang->def('_ASSIGN_USERS') . '" ' . 'title="' . $lang->def('_ASSIGN_USERS') . '" />'); $typeH = array('', '', 'image', 'image', 'image', 'image'); if ($lms_is_active) { $contentH[] = '<img src="' . getPathImage() . 'admin_manager/man_course.gif" alt="' . $lang->def('_ASSIGN_USERS') . '" ' . 'title="' . $lang->def('_ASSIGN_USERS') . '" />'; $typeH[] = 'image'; } if ($cms_is_active) { // Cms Pages $contentH[] = '<img src="' . getPathImage() . 'admin_manager/pagetree.png" alt="' . $lang->def('_ASSIGN_CMS_PAGES') . '" ' . 'title="' . $lang->def('_ASSIGN_CMS_PAGES') . '" />'; $typeH[] = 'image'; // Cms News $contentH[] = '<img src="' . getPathImage() . 'admin_manager/newstree.png" alt="' . $lang->def('_NEWS') . '" ' . 'title="' . $lang->def('_NEWS') . '" />'; $typeH[] = 'image'; // Cms Documents $contentH[] = '<img src="' . getPathImage() . 'admin_manager/docstree.png" alt="' . $lang->def('_ASSIGN_CMS_DOCS') . '" ' . 'title="' . $lang->def('_ASSIGN_CMS_DOCS') . '" />'; $typeH[] = 'image'; // Cms Media $contentH[] = '<img src="' . getPathImage() . 'admin_manager/mediatree.png" alt="' . $lang->def('_ASSIGN_CMS_MEDIA') . '" ' . 'title="' . $lang->def('_ASSIGN_CMS_MEDIA') . '" />'; $typeH[] = 'image'; // Cms Contents $contentH[] = '<img src="' . getPathImage() . 'admin_manager/contenttree.png" alt="' . $lang->def('_ASSIGN_CMS_CONTENT') . '" ' . 'title="' . $lang->def('_ASSIGN_CMS_CONTENT') . '" />'; $typeH[] = 'image'; } $table->setColsStyle($typeH); $table->addHead($contentH); $maxItem = count($arr_admin_id) < $ini + Get::sett('visuItem') ? count($arr_admin_id) : $ini + Get::sett('visuItem'); for ($index = $ini; $index < $maxItem; $index++) { $admin_userid = substr($arr_admin_id[$arr_admin_idst[$index]], 1); $rowContent = array($admin_userid, $usres_info[$arr_admin_idst[$index]][ACL_INFO_EMAIL]); // Edit preferences $rowContent[] = '<a href="index.php?modname=admin_manager&op=edit_preferences&adminidst=' . $arr_admin_idst[$index] . '" title="' . $lang->def('_ADMIN_PREFERENCES_TITLE') . ' : ' . $admin_userid . '">' . '<img src="' . getPathImage() . 'admin_manager/man_pref.gif"' . ' alt="' . $lang->def('_ADMIN_PREFERENCES_TITLE') . ' : ' . $admin_userid . '" /></a>'; // Edit menu $rowContent[] = '<a href="index.php?modname=admin_manager&op=edit_menu&adminidst=' . $arr_admin_idst[$index] . '" title="' . $lang->def('_ADMIN_MENU_TITLE') . ' : ' . $admin_userid . '">' . '<img src="' . getPathImage() . 'admin_manager/man_menu.gif"' . ' alt="' . $lang->def('_ADMIN_MENU_TITLE') . ' : ' . $admin_userid . '" /></a>'; // Edit user $rowContent[] = '<a href="index.php?modname=admin_manager&op=assign_tree&adminidst=' . $arr_admin_idst[$index] . '" title="' . $lang->def('_ASSIGN_USERS') . ' : ' . $admin_userid . '">' . '<img src="' . getPathImage() . 'directory/tree.gif" ' . 'alt="' . $lang->def('_ASSIGN_USERS') . ' : ' . $admin_userid . '" /></a>'; // Edit lang $rowContent[] = '<a href="index.php?modname=admin_manager&op=edit_lang&adminidst=' . $arr_admin_idst[$index] . '" title="' . $lang->def('_ASSIGN_USERS') . ' : ' . $admin_userid . '">' . '<img src="' . getPathImage() . 'admin_manager/lang_lang.gif"' . ' alt="' . $lang->def('_ASSIGN_USERS') . ' : ' . $admin_userid . '" /></a>'; // Edit course if ($lms_is_active) { $rowContent[] = '<a href="index.php?modname=admin_manager&op=edit_course&adminidst=' . $arr_admin_idst[$index] . '&load=1" title="' . $lang->def('_ASSIGN_USERS') . ' : ' . $admin_userid . '">' . '<img src="' . getPathImage() . 'admin_manager/man_course.gif"' . ' alt="' . $lang->def('_ASSIGN_USERS') . ' : ' . $admin_userid . '" /></a>'; } // Assign cms trees permissions if ($cms_is_active) { // Cms Pages $img = "<img src=\"" . getPathImage() . "admin_manager/pagetree.png\" alt=\"" . $lang->def("_ASSIGN_CMS_PAGES") . "\" "; $img .= "title=\"" . $lang->def("_ASSIGN_CMS_PAGES") . "\" />"; $url = "index.php?modname=admin_manager&op=assign_cmspag&adminidst=" . $arr_admin_idst[$index]; $rowContent[] = "<a href=\"" . $url . "\">" . $img . "</a>\n"; // Cms News $img = "<img src=\"" . getPathImage() . "admin_manager/newstree.png\" alt=\"" . $lang->def("_NEWS") . "\" "; $img .= "title=\"" . $lang->def("_NEWS") . "\" />"; $url = "index.php?modname=admin_manager&op=assign_cmsnews&adminidst=" . $arr_admin_idst[$index]; $rowContent[] = "<a href=\"" . $url . "\">" . $img . "</a>\n"; // Cms Documents $img = "<img src=\"" . getPathImage() . "admin_manager/docstree.png\" alt=\"" . $lang->def("_ASSIGN_CMS_DOCS") . "\" "; $img .= "title=\"" . $lang->def("_ASSIGN_CMS_DOCS") . "\" />"; $url = "index.php?modname=admin_manager&op=assign_cmsdocs&adminidst=" . $arr_admin_idst[$index]; $rowContent[] = "<a href=\"" . $url . "\">" . $img . "</a>\n"; // Cms Media $img = "<img src=\"" . getPathImage() . "admin_manager/mediatree.png\" alt=\"" . $lang->def("_ASSIGN_CMS_MEDIA") . "\" "; $img .= "title=\"" . $lang->def("_ASSIGN_CMS_MEDIA") . "\" />"; $url = "index.php?modname=admin_manager&op=assign_cmsmedia&adminidst=" . $arr_admin_idst[$index]; $rowContent[] = "<a href=\"" . $url . "\">" . $img . "</a>\n"; // Cms Contents $img = "<img src=\"" . getPathImage() . "admin_manager/contenttree.png\" alt=\"" . $lang->def("_ASSIGN_CMS_CONTENT") . "\" "; $img .= "title=\"" . $lang->def("_ASSIGN_CMS_CONTENT") . "\" />"; $url = "index.php?modname=admin_manager&op=assign_cmscontent&adminidst=" . $arr_admin_idst[$index]; $rowContent[] = "<a href=\"" . $url . "\">" . $img . "</a>\n"; } $table->addBody($rowContent); } $GLOBALS['page']->add($table->getTable() . $table->getNavBar($ini, count($arr_admin_id)), 'content'); $GLOBALS['page']->add('</div>', 'content'); }