当前位置: 首页>>代码示例>>PHP>>正文


PHP IPSLib::loadInterface方法代码示例

本文整理汇总了PHP中IPSLib::loadInterface方法的典型用法代码示例。如果您正苦于以下问题:PHP IPSLib::loadInterface方法的具体用法?PHP IPSLib::loadInterface怎么用?PHP IPSLib::loadInterface使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IPSLib的用法示例。


在下文中一共展示了IPSLib::loadInterface方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _groupForm

 /**
  * Show the add/edit group form
  *
  * @param 	string		'add' or 'edit'
  * @return	@e void		[Outputs to screen]
  * @todo	_initTab doesn't seem to work anymore with the new tabs, need to update each app to have a unique name/id
  */
 protected function _groupForm($type = 'edit')
 {
     //-----------------------------------------
     // Grab group data and start us off
     //-----------------------------------------
     if ($type == 'edit') {
         if ($this->request['id'] == "") {
             $this->registry->output->showError($this->lang->words['g_whichgroup'], 11210);
         }
         $group = $this->DB->buildAndFetch(array('select' => '*', 'from' => 'groups', 'where' => "g_id=" . intval($this->request['id'])));
         $group = IPSMember::unpackGroup($group, FALSE, TRUE);
         //-----------------------------------------
         // Check restrictions.
         //-----------------------------------------
         if ($group['g_access_cp']) {
             $this->registry->getClass('class_permissions')->checkPermissionAutoMsg('groups_edit_admin');
         }
     } else {
         $group = array();
         if ($this->request['id']) {
             $group = $this->DB->buildAndFetch(array('select' => '*', 'from' => 'groups', 'where' => "g_id=" . intval($this->request['id'])));
             $group = IPSMember::unpackGroup($group, FALSE, TRUE);
         }
         $group['g_title'] = 'New Group';
     }
     //-----------------------------------------
     // Grab permission masks
     //-----------------------------------------
     $perm_masks = array();
     $this->DB->build(array('select' => '*', 'from' => 'forum_perms', 'order' => 'perm_name ASC'));
     $this->DB->execute();
     while ($r = $this->DB->fetch()) {
         $perm_masks[] = array($r['perm_id'], $r['perm_name']);
     }
     //-----------------------------------------
     // Ok? Load interface and child classes
     //-----------------------------------------
     $blocks = array('tabs' => array(), 'area' => array());
     IPSLib::loadInterface('admin/group_form.php');
     $tabsUsed = 5;
     $firstTab = empty($this->request['_initTab']) ? false : trim($this->request['_initTab']);
     foreach (IPSLib::getEnabledApplications() as $app_dir => $app_data) {
         if (is_file(IPSLib::getAppDir($app_dir) . '/extensions/admin/group_form.php')) {
             $_class = IPSLib::loadLibrary(IPSLib::getAppDir($app_dir) . '/extensions/admin/group_form.php', 'admin_group_form__' . $app_dir, $app_dir);
             if (class_exists($_class)) {
                 $_object = new $_class($this->registry);
                 $data = $_object->getDisplayContent($group, $tabsUsed);
                 $blocks['area'][$app_dir] = $data['content'];
                 $blocks['tabs'][$app_dir] = $data['tabs'];
                 $tabsUsed = $data['tabsUsed'] ? $tabsUsed + $data['tabsUsed'] : $tabsUsed + 1;
                 if (!empty($this->request['_initTab']) && $this->request['_initTab'] == $app_dir) {
                     $firstTab = $tabsUsed;
                 }
             }
         }
     }
     //-----------------------------------------
     // And output to form
     //-----------------------------------------
     $this->registry->output->extra_nav[] = array("{$this->settings['base_url']}&{$this->form_code}", $this->lang->words['menu__manage_groups']);
     $this->registry->output->html .= $this->html->groupsForm($type, $group, $perm_masks, $blocks, $firstTab);
 }
开发者ID:ConnorChristie,项目名称:GrabViews-Live,代码行数:69,代码来源:groups.php

示例2: forumSave

 /**
  * Save the forum
  *
  * @param	string		$type		[new|edit]
  * @return	@e void
  */
 public function forumSave($type = 'new')
 {
     /* If this is not a redirect forum anymore empty the redirect url - #35126 */
     if ($this->request['forum_type'] != 'redirect') {
         $this->request['redirect_url'] = '';
     }
     //-----------------------------------------
     // Converting the type?
     //-----------------------------------------
     if ($this->request['convert']) {
         $this->forumForm($type, 1);
         return;
     }
     //-----------------------------------------
     // INIT
     //-----------------------------------------
     $this->request['name'] = trim($this->request['name']);
     $this->request['f'] = intval($this->request['f']);
     $this->request['parent_id'] = !empty($this->request['parent_id']) ? intval($this->request['parent_id']) : -1;
     $forum_cat_lang = intval($this->request['parent_id']) == -1 ? $this->lang->words['for_iscat_y'] : $this->lang->words['for_iscat_n'];
     //-----------------------------------------
     // Auth check...
     //-----------------------------------------
     $this->registry->adminFunctions->checkSecurityKey();
     //-----------------------------------------
     // Check
     //-----------------------------------------
     if ($this->request['name'] == "") {
         $this->registry->output->global_message = sprintf($this->lang->words['for_entertitle'], mb_strtolower($forum_cat_lang));
         $this->forumForm($type);
         return;
     }
     //-----------------------------------------
     // Are we trying to do something stupid
     // like running with scissors or moving
     // the parent of a forum into itself
     // spot?
     //-----------------------------------------
     if ($this->request['parent_id'] != $this->registry->getClass('class_forums')->forum_by_id[$this->request['f']]['parent_id']) {
         $ids = $this->registry->getClass('class_forums')->forumsGetChildren($this->request['f']);
         $ids[] = $this->request['f'];
         if (in_array($this->request['parent_id'], $ids)) {
             $this->registry->output->global_error = $this->lang->words['for_whymovethere'];
             $this->forumForm($type);
             return;
         }
     }
     //if( $this->request['parent_id'] < 1 )
     //{
     //	$this->request['sub_can_post'] = 1;
     //}
     //-----------------------------------------
     // Save array
     //-----------------------------------------
     $save = array('name' => IPSText::getTextClass('bbcode')->xssHtmlClean(nl2br(IPSText::stripslashes($_POST['name']))), 'name_seo' => IPSText::makeSeoTitle(strip_tags(IPSText::UNhtmlspecialchars($this->request['name']))), 'description' => IPSText::getTextClass('bbcode')->xssHtmlClean(nl2br(IPSText::stripslashes($_POST['description']))), 'use_ibc' => isset($this->request['use_ibc']) ? intval($this->request['use_ibc']) : 1, 'use_html' => intval($this->request['use_html']), 'password' => $this->request['password'], 'password_override' => is_array($this->request['password_override']) ? implode(",", $this->request['password_override']) : '', 'sort_key' => $this->request['sort_key'], 'sort_order' => $this->request['sort_order'], 'prune' => intval($this->request['prune']), 'topicfilter' => $this->request['topicfilter'], 'preview_posts' => intval($this->request['preview_posts']), 'allow_poll' => intval($this->request['allow_poll']), 'allow_pollbump' => intval($this->request['allow_pollbump']), 'forum_allow_rating' => intval($this->request['forum_allow_rating']), 'inc_postcount' => intval($this->request['inc_postcount']), 'parent_id' => intval($this->request['parent_id']), 'sub_can_post' => intval($this->request['sub_can_post']), 'redirect_on' => intval($this->request['redirect_on']), 'redirect_hits' => intval($this->request['redirect_hits']), 'redirect_url' => $this->request['redirect_url'], 'notify_modq_emails' => $this->request['notify_modq_emails'], 'permission_showtopic' => $this->request['parent_id'] == -1 ? 1 : intval($this->request['permission_showtopic']), 'min_posts_post' => intval($this->request['min_posts_post']), 'min_posts_view' => intval($this->request['min_posts_view']), 'can_view_others' => intval($this->request['can_view_others']), 'hide_last_info' => intval($this->request['hide_last_info']), 'disable_sharelinks' => intval($this->request['disable_sharelinks']), 'tag_predefined' => $this->request['tag_predefined'], 'forums_bitoptions' => IPSBWOPtions::freeze($this->request, 'forums', 'forums'), 'permission_custom_error' => nl2br(IPSText::stripslashes($_POST['permission_custom_error'])), 'ipseo_priority' => $this->request['ipseo_priority'], 'viglink' => intval($this->request['viglink']));
     /* Save data from application tabs */
     IPSLib::loadInterface('admin/forum_form.php');
     $_forumPlugins = array();
     foreach (IPSLib::getEnabledApplications() as $app_dir => $app_data) {
         if (is_file(IPSLib::getAppDir($app_dir) . '/extensions/admin/forum_form.php')) {
             $_class = IPSLib::loadLibrary(IPSLib::getAppDir($app_dir) . '/extensions/admin/forum_form.php', 'admin_forum_form__' . $app_dir, $app_dir);
             $_forumPlugins[$_class] = new $_class($this->registry);
             $remote = $_forumPlugins[$_class]->getForSave();
             $save = array_merge($save, $remote);
         }
     }
     //-----------------------------------------
     // ADD
     //-----------------------------------------
     if ($type == 'new') {
         $this->DB->build(array('select' => 'MAX(id) as top_forum', 'from' => 'forums'));
         $this->DB->execute();
         $row = $this->DB->fetch();
         if ($row['top_forum'] < 1) {
             $row['top_forum'] = 0;
         }
         $row['top_forum']++;
         /* Forum Information */
         //$save['id']               = $row['top_forum'];
         $save['position'] = $row['top_forum'];
         $save['topics'] = 0;
         $save['posts'] = 0;
         $save['last_post'] = 0;
         $save['last_poster_id'] = 0;
         $save['last_poster_name'] = "";
         /* Insert the record */
         $this->DB->insert('forums', $save);
         $forum_id = $this->DB->getInsertId();
         /* Permissions */
         $classToLoad = IPSLib::loadLibrary(IPS_ROOT_PATH . 'sources/classes/class_public_permissions.php', 'classPublicPermissions');
         $permissions = new $classToLoad(ipsRegistry::instance());
         $permissions->savePermMatrix($this->request['perms'], $forum_id, 'forum');
         if (!$save['can_view_others']) {
             $this->DB->update('permission_index', array('owner_only' => 1), "app='forums' AND perm_type='forum' AND perm_type_id={$forum_id}");
//.........这里部分代码省略.........
开发者ID:Advanture,项目名称:Online-RolePlay,代码行数:101,代码来源:forums.php

示例3: _memberDoEdit

 /**
  * Edit a member [process]
  *
  * @access	private
  * @return	void		[Outputs to screen]
  */
 private function _memberDoEdit()
 {
     //-----------------------------------------
     // INIT
     //-----------------------------------------
     $this->request['member_id'] = intval($this->request['member_id']);
     //-----------------------------------------
     // Auth check...
     //-----------------------------------------
     ipsRegistry::getClass('adminFunctions')->checkSecurityKey($this->request['secure_key']);
     //-----------------------------------------
     // Load and config the std/rte editors
     //-----------------------------------------
     IPSText::getTextClass('editor')->from_acp = 1;
     //-----------------------------------------
     // Get member
     //-----------------------------------------
     $member = IPSMember::load($this->request['member_id'], 'all');
     //-----------------------------------------
     // Allowed to edit administrators?
     //-----------------------------------------
     if ($member['member_id'] != $this->memberData['member_id'] and $member['g_access_cp'] and !$this->registry->getClass('class_permissions')->checkPermission('member_edit_admin')) {
         $this->registry->output->global_message = $this->lang->words['m_editadmin'];
         $this->_memberView();
         return;
     }
     //-----------------------------------------
     // Allowed to change an admin's groups?
     //-----------------------------------------
     if ($member['g_access_cp'] and !$this->registry->getClass('class_permissions')->checkPermission('member_move_admin1')) {
         $same = false;
         if ($this->request['member_group_id'] == $member['member_group_id']) {
             $omgroups = explode(',', IPSText::cleanPermString($member['mgroup_others']));
             $groups = $_POST['mgroup_others'] ? $_POST['mgroup_others'] : array();
             if (!count(array_diff($omgroups, $groups))) {
                 $same = true;
             }
         }
         if (!$same) {
             $this->registry->output->global_message = $this->lang->words['m_admindemote'];
             $this->_memberView();
             return;
         }
     }
     //-----------------------------------------
     // What about promoting to admin?
     //-----------------------------------------
     if (!$member['g_access_cp'] and !$this->registry->getClass('class_permissions')->checkPermission('member_move_admin2')) {
         $groups = $_POST['mgroup_others'] ? $_POST['mgroup_others'] : array();
         $groups[] = intval($this->request['member_group_id']);
         foreach ($groups as $group_id) {
             if ($this->caches['group_cache'][$group_id]['g_access_cp']) {
                 $this->registry->output->global_message = $this->lang->words['m_adminpromote'];
                 $this->_memberView();
                 return;
             }
         }
     }
     if ($this->request['identity_url']) {
         $account = $this->DB->buildAndFetch(array('select' => 'member_id', 'from' => 'members', 'where' => "identity_url='" . trim($this->request['identity_url']) . "' AND member_id<>" . $member['member_id']));
         if ($account['member_id']) {
             $this->registry->output->global_message = $this->lang->words['identity_url_inuse'];
             $this->_memberView();
             return;
         }
     }
     //-----------------------------------------
     // Convert sig
     //-----------------------------------------
     $signature = IPSText::getTextClass('editor')->processRawPost('signature');
     IPSText::getTextClass('bbcode')->parse_smilies = 0;
     IPSText::getTextClass('bbcode')->parse_bbcode = $this->settings['sig_allow_ibc'];
     IPSText::getTextClass('bbcode')->parse_html = $this->settings['sig_allow_html'];
     IPSText::getTextClass('bbcode')->parse_nl2br = 1;
     IPSText::getTextClass('bbcode')->parsing_section = 'signatures';
     $signature = IPSText::getTextClass('bbcode')->preDbParse($signature);
     $cacheSignature = IPSText::getTextClass('bbcode')->preDisplayParse($signature);
     //-----------------------------------------
     // And 'About Me'
     //-----------------------------------------
     $aboutme = IPSText::getTextClass('editor')->processRawPost('aboutme');
     IPSText::getTextClass('bbcode')->parse_smilies = $this->settings['aboutme_emoticons'];
     IPSText::getTextClass('bbcode')->parse_bbcode = $this->settings['aboutme_bbcode'];
     IPSText::getTextClass('bbcode')->parse_html = $this->settings['aboutme_html'];
     IPSText::getTextClass('bbcode')->parse_nl2br = 1;
     IPSText::getTextClass('bbcode')->parsing_section = 'aboutme';
     $aboutme = IPSText::getTextClass('bbcode')->preDbParse($aboutme);
     //-----------------------------------------
     // Ok? Load interface and child classes
     //-----------------------------------------
     $additionalCore = array();
     $additionalExtended = array();
     IPSLib::loadInterface('admin/member_form.php');
     foreach (ipsRegistry::$applications as $app_dir => $app_data) {
//.........这里部分代码省略.........
开发者ID:dalandis,项目名称:Visualization-of-Cell-Phone-Locations,代码行数:101,代码来源:members.php

示例4: _memberDoEdit


//.........这里部分代码省略.........
         $this->_memberView();
         return;
     }
     //-----------------------------------------
     // Restricted?
     //-----------------------------------------
     $restricted = (is_array($this->registry->getClass('class_permissions')->restrictions_row) and count($this->registry->getClass('class_permissions')->restrictions_row)) ? true : false;
     /* Load editor stuff */
     $classToLoad = IPSLib::loadLibrary(IPS_ROOT_PATH . 'sources/classes/editor/composite.php', 'classes_editor_composite');
     $_editor = new $classToLoad();
     /* Load parser */
     $classToLoad = IPSLib::loadLibrary(IPS_ROOT_PATH . 'sources/classes/text/parser.php', 'classes_text_parser');
     $parser = new $classToLoad();
     /* Get signature */
     $_editor->setAllowBbcode(true);
     $_editor->setAllowSmilies(false);
     $_editor->setIsHtml($this->request['bw_html_sig'] && $member['g_dohtml']);
     $_editor->setAllowHtml($member['g_dohtml']);
     $_editor->setBbcodeSection('signatures');
     $signature = $_editor->process($_POST['signature']);
     $cacheSignature = $parser->display($signature);
     /* About me editor */
     $_editor->setAllowBbcode(true);
     $_editor->setAllowSmilies(true);
     $_editor->setAllowHtml($member['g_dohtml']);
     $_editor->setBbcodeSection('aboutme');
     $aboutme = $_editor->process($_POST['aboutme']);
     //-----------------------------------------
     // Ok? Load interface and child classes
     //-----------------------------------------
     $additionalCore = array();
     $additionalExtended = array();
     $additionalMCache = array();
     IPSLib::loadInterface('admin/member_form.php');
     foreach (IPSLib::getEnabledApplications() as $app_dir => $app_data) {
         if (is_file(IPSLib::getAppDir($app_dir) . '/extensions/admin/member_form.php')) {
             $_class = IPSLib::loadLibrary(IPSLib::getAppDir($app_dir) . '/extensions/admin/member_form.php', 'admin_member_form__' . $app_dir, $app_dir);
             $_object = new $_class($this->registry);
             $remote = $_object->getForSave();
             $additionalCore = is_array($remote['core']) ? array_merge($remote['core'], $additionalCore) : $additionalCore;
             $additionalExtended = is_array($remote['extendedProfile']) ? array_merge($remote['extendedProfile'], $additionalExtended) : $additionalExtended;
             $additionalMCache = is_array($remote['member_cache']) ? array_merge($remote['member_cache'], $additionalMCache) : $additionalMCache;
         }
     }
     //-----------------------------------------
     // Fix custom title
     // @see	http://forums.invisionpower.com/index.php?app=tracker&showissue=17383
     //-----------------------------------------
     $memberTitle = $this->request['title'];
     $rankCache = ipsRegistry::cache()->getCache('ranks');
     if (is_array($rankCache) && count($rankCache)) {
         foreach ($rankCache as $k => $v) {
             if ($member['posts'] >= $v['POSTS']) {
                 /* If this is the title passed to us from the form, we didn't have a custom title */
                 if ($v['TITLE'] == $memberTitle) {
                     $memberTitle = '';
                 }
                 break;
             }
         }
     }
     //-----------------------------------------
     // Start array
     //-----------------------------------------
     $newMember = array('member_group_id' => intval($this->request['member_group_id']), 'title' => $memberTitle, 'time_offset' => floatval($this->request['time_offset']), 'members_auto_dst' => intval($this->request['dstCheck']), 'dst_in_use' => intval($this->request['dstOption']), 'language' => $this->request['language'], 'skin' => intval($this->request['skin']), 'allow_admin_mails' => intval($this->request['allow_admin_mails']), 'view_sigs' => intval($this->request['view_sigs']), 'posts' => intval($this->request['posts']), 'bday_day' => intval($this->request['bday_day']), 'bday_month' => intval($this->request['bday_month']), 'bday_year' => intval($this->request['bday_year']), 'warn_level' => intval($this->request['warn_level']), 'members_disable_pm' => intval($this->request['members_disable_pm']), 'mgroup_others' => $this->request['mgroup_others'] ? ',' . implode(",", $this->request['mgroup_others']) . ',' : '', 'members_bitoptions' => IPSBWOPtions::freeze($this->request, 'members', 'global'), 'member_uploader' => $this->request['member_uploader']);
     //-----------------------------------------
开发者ID:ConnorChristie,项目名称:GrabViews,代码行数:67,代码来源:members.php

示例5: doExecute

 /**
  * Main class entry point
  *
  * @param	object		ipsRegistry reference
  * @return	@e void		[Outputs to screen]
  */
 public function doExecute(ipsRegistry $registry)
 {
     //-----------------------------------------
     // INIT
     //-----------------------------------------
     $_thisNav = array();
     //-----------------------------------------
     // Load language
     //-----------------------------------------
     $this->registry->getClass('class_localization')->loadLanguageFile(array('public_usercp'));
     //-----------------------------------------
     // Logged in?
     //-----------------------------------------
     if (!$this->memberData['member_id']) {
         $this->registry->getClass('output')->silentRedirect($this->settings['base_url'] . '&app=core&module=global&section=login&do=form');
         exit;
     }
     //-----------------------------------------
     // Make sure they're clean
     //-----------------------------------------
     $this->request['tab'] = IPSText::alphanumericalClean($this->request['tab']);
     $this->request['area'] = IPSText::alphanumericalClean($this->request['area']);
     //-----------------------------------------
     // Set up some basics...
     //-----------------------------------------
     $_TAB = $this->request['tab'] ? $this->request['tab'] : 'core';
     $_AREA = $this->request['area'] ? $this->request['area'] : 'settings';
     $_DO = $this->request['do'] ? $this->request['do'] : 'show';
     $_FUNC = $_DO == 'show' ? 'showForm' : ($_DO == 'save' ? 'saveForm' : $_DO);
     $tabs = array();
     $errors = array();
     //-----------------------------------------
     // Got a plug in?
     //-----------------------------------------
     IPSLib::loadInterface('interface_usercp.php');
     $EXT_DIR = IPSLib::getAppDir($_TAB) . '/extensions';
     if (!is_file($EXT_DIR . '/usercpForms.php')) {
         $this->registry->getClass('output')->showError('usercp_bad_tab', 10147);
         exit;
     }
     //-----------------------------------------
     // Cycle through applications and load
     // usercpForm extensions
     //-----------------------------------------
     foreach (IPSLib::getEnabledApplications() as $app_dir => $app_data) {
         $ext_dir = IPSLib::getAppDir($app_dir) . '/extensions';
         // Make sure the extension exists
         if (!is_file($ext_dir . '/usercpForms.php')) {
             continue;
         }
         $__class = IPSLib::loadLibrary($ext_dir . '/usercpForms.php', 'usercpForms_' . $app_dir, $app_dir);
         if (!class_exists($__class)) {
             continue;
         }
         $_usercp_module = new $__class();
         /* Block based on version to prevent old files showing up/causing an error */
         if (!$_usercp_module->version or $_usercp_module->version < 32) {
             continue;
         }
         $_usercp_module->makeRegistryShortcuts($this->registry);
         if (is_callable(array($_usercp_module, 'init'))) {
             $_usercp_module->init();
             /* Set default area? */
             if ($_TAB == $app_dir and !isset($_REQUEST['area'])) {
                 if (isset($_usercp_module->defaultAreaCode)) {
                     $this->request['area'] = $_AREA = $_usercp_module->defaultAreaCode;
                 }
             }
         }
         if (is_callable(array($_usercp_module, 'getLinks'))) {
             $tabs[$app_dir]['_menu'] = $_usercp_module->getLinks();
             /* Got any links? */
             if (!is_array($tabs[$app_dir]['_menu']) || !count($tabs[$app_dir]['_menu'])) {
                 unset($tabs[$app_dir]);
                 continue;
             }
             /* Get title */
             $tabs[$app_dir]['_name'] = $_usercp_module->tab_name ? $_usercp_module->tab_name : IPSLib::getAppTitle($app_dir);
             /* Add in 'last' element */
             $tabs[$app_dir]['_menu'][count($tabs[$app_dir]['_menu']) - 1]['last'] = 1;
             /* This nav? */
             if (!count($_thisNav) and $app_dir == $_TAB) {
                 foreach ($tabs[$app_dir]['_menu'] as $_navData) {
                     if ($_navData['url'] == 'area=' . $_AREA) {
                         $_thisNav = array('app=core&amp;module=usercp&amp;tab=' . $_TAB . '&amp;area=' . $_AREA, $_navData['title']);
                     }
                 }
             }
         }
     }
     //-----------------------------------------
     // Set up basic navigation
     //-----------------------------------------
     $this->_nav[] = array($this->lang->words['t_title'], '&amp;app=core&amp;module=usercp');
//.........这里部分代码省略.........
开发者ID:mover5,项目名称:imobackup,代码行数:101,代码来源:manualResolver.php

示例6: _groupForm

 /**
  * Show the add/edit group form
  *
  * @access	private
  * @param 	string		'add' or 'edit'
  * @return	void		[Outputs to screen]
  */
 private function _groupForm($type = 'edit')
 {
     //-----------------------------------------
     // Grab group data and start us off
     //-----------------------------------------
     if ($type == 'edit') {
         if ($this->request['id'] == "") {
             $this->registry->output->showError($this->lang->words['g_whichgroup'], 11210);
         }
         $group = $this->DB->buildAndFetch(array('select' => '*', 'from' => 'groups', 'where' => "g_id=" . intval($this->request['id'])));
         $group = IPSLib::unpackGroup($group);
         //-----------------------------------------
         // Check restrictions.
         //-----------------------------------------
         if ($group['g_access_cp']) {
             $this->registry->getClass('class_permissions')->checkPermissionAutoMsg('groups_edit_admin');
         }
     } else {
         $group = array();
         if ($this->request['id']) {
             $group = $this->DB->buildAndFetch(array('select' => '*', 'from' => 'groups', 'where' => "g_id=" . intval($this->request['id'])));
             $group = IPSLib::unpackGroup($group);
         }
         $group['g_title'] = 'New Group';
     }
     //-----------------------------------------
     // Grab permission masks
     //-----------------------------------------
     $perm_masks = array();
     $this->DB->build(array('select' => '*', 'from' => 'forum_perms'));
     $this->DB->execute();
     while ($r = $this->DB->fetch()) {
         $perm_masks[] = array($r['perm_id'], $r['perm_name']);
     }
     //-----------------------------------------
     // Ok? Load interface and child classes
     //-----------------------------------------
     $blocks = array('tabs' => array(), 'area' => array());
     IPSLib::loadInterface('admin/group_form.php');
     $tabsUsed = 2;
     foreach (ipsRegistry::$applications as $app_dir => $app_data) {
         if (!IPSLib::appIsInstalled($app_dir)) {
             continue;
         }
         if (file_exists(IPSLib::getAppDir($app_dir) . '/extensions/admin/group_form.php')) {
             require_once IPSLib::getAppDir($app_dir) . '/extensions/admin/group_form.php';
             $_class = 'admin_group_form__' . $app_dir;
             if (class_exists($_class)) {
                 $_object = new $_class($this->registry);
                 $data = $_object->getDisplayContent($group, $tabsUsed);
                 $blocks['area'][$app_dir] = $data['content'];
                 $blocks['tabs'][$app_dir] = $data['tabs'];
                 $tabsUsed = $data['tabsUsed'] ? $tabsUsed + $data['tabsUsed'] : $tabsUsed + 1;
             }
         }
     }
     //-----------------------------------------
     // And output to form
     //-----------------------------------------
     $this->registry->output->html .= $this->html->groupsForm($type, $group, $perm_masks, $blocks);
 }
开发者ID:dalandis,项目名称:Visualization-of-Cell-Phone-Locations,代码行数:68,代码来源:groups.php


注:本文中的IPSLib::loadInterface方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。