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


PHP IPSLib::unpackGroup方法代码示例

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


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

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