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


PHP ModuleManager::include_install方法代码示例

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


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

示例1: get_module_dirs

 public function get_module_dirs()
 {
     //show uninstalled & installed modules
     $ret = DB::Execute('SELECT * FROM available_modules');
     $module_dirs = array();
     while ($row = $ret->FetchRow()) {
         if (ModuleManager::exists($row['name'])) {
             $module_dirs[$row['name']][$row['vkey']] = $row['version'];
             ModuleManager::include_install($row['name']);
         } else {
             DB::Execute('DELETE FROM available_modules WHERE name=%s and vkey=%d', array($row['name'], $row['vkey']));
         }
     }
     if (empty($module_dirs)) {
         $module_dirs = Base_SetupCommon::refresh_available_modules();
     }
     return $module_dirs;
 }
开发者ID:62BRAINS,项目名称:EPESI,代码行数:18,代码来源:Setup_0.php

示例2: module_install

 private function module_install($class_name)
 {
     if (substr($class_name, -7) != 'Install') {
         return false;
     }
     $module_name = substr($class_name, 0, -7);
     return ModuleManager::include_install($module_name);
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:8,代码来源:autoloader.php

示例3: array

Utils_RecordBrowserCommon::add_access('premium_weblink_custom_addon', 'add', 'ADMIN', array('recordset' => ''));
Utils_RecordBrowserCommon::add_access('premium_weblink_custom_addon', 'edit', 'SUPERADMIN');
Utils_RecordBrowserCommon::add_access('premium_weblink_custom_addon', 'delete', 'SUPERADMIN');
Utils_RecordBrowserCommon::add_access('premium_weblink', 'view', 'ACCESS:employee', array());
Utils_RecordBrowserCommon::add_access('premium_weblink', 'add', 'ACCESS:employee', array('link' => ''));
Utils_RecordBrowserCommon::add_access('premium_weblink', 'edit', 'ACCESS:employee', array(), array('date'));
Utils_RecordBrowserCommon::add_access('premium_weblink', 'delete', 'ACCESS:employee');
if (ModuleManager::is_installed('Premium_Weblink') >= 0) {
    DB::Execute('UPDATE premium_weblink_field SET type=%s WHERE field=%s', array('hidden', 'Record Type'));
}
Utils_RecordBrowserCommon::add_access('bugtrack', 'view', 'ACCESS:employee');
Utils_RecordBrowserCommon::add_access('bugtrack', 'add', 'ACCESS:employee');
Utils_RecordBrowserCommon::add_access('bugtrack', 'edit', 'ACCESS:employee');
Utils_RecordBrowserCommon::add_access('bugtrack', 'delete', array('ACCESS:employee', 'ACCESS:manager'));
if (ModuleManager::is_installed('Custom_Prosperix_AccessRestrictions') >= 0) {
    ModuleManager::include_install('Custom_Prosperix_AccessRestrictions');
    $m = new Custom_Prosperix_AccessRestrictionsInstall();
    $m->install();
    $ret = DB::Execute('SELECT * FROM user_login');
    while ($row = $ret->FetchRow()) {
        $aid = get_acl_user_id($row['id']);
        $allow = is_user_in_group($aid, 'Employee Vendor Moderator');
        $allow |= is_user_in_group($aid, 'Administrator');
        $allow |= is_user_in_group($aid, 'Super administrator');
        if ($allow) {
            $r2 = DB::Execute('SELECT * FROM contact_data_1 WHERE f_login=%d', array($row['id']));
            while ($r = $r2->FetchRow()) {
                if (!$r['f_access']) {
                    $gr = '__vendor_manager__';
                } else {
                    $gr = $r['f_access'] . 'vendor_manager__';
开发者ID:cretzu89,项目名称:EPESI,代码行数:31,代码来源:RB_permissions2.php

示例4: body

 public function body()
 {
     // init lang from install process
     $install_lang_code =& $_GET['install_lang'];
     if (isset($install_lang_code)) {
         // set anonymous setup to true at very first run to allow use admin tools.
         Variable::set('anonymous_setup', true);
         //
         Variable::set('default_lang', $install_lang_code);
         Epesi::redirect('index.php');
         return;
     }
     Base_LangCommon::load();
     $th = $this->init_module('Base/Theme');
     ob_start();
     print '<center>';
     $post_install =& $_SESSION['first-run_post-install'];
     if (!empty($post_install)) {
         foreach ($post_install as $i => $v) {
             $i = str_replace('/', '_', $i);
             ModuleManager::include_install($i);
             $f = array($i . 'Install', 'post_install');
             $fs = array($i . 'Install', 'post_install_process');
             if (!is_callable($f) || !is_callable($fs)) {
                 unset($post_install[$i]);
                 continue;
             }
             $ret = call_user_func($f);
             $form = $this->init_module('Libs/QuickForm', null, $i);
             $form->addElement('header', null, __('Post installation of %s', array(str_replace('_', '/', $i))));
             $form->add_array($ret);
             $form->addElement('submit', null, 'OK');
             if ($form->validate()) {
                 $form->process($fs);
                 unset($post_install[$i]);
             } else {
                 $form->display();
                 break;
             }
         }
         if (ModuleManager::is_installed('Base') >= 0 && empty($post_install)) {
             Variable::set('default_module', 'Base_Box');
             Epesi::redirect();
         }
     }
     if (empty($post_install) && ModuleManager::is_installed('Base') < 0) {
         $wizard = $this->init_module('Utils/Wizard');
         /////////////////////////////////////////////////////////////
         $this->ini = parse_ini_file('modules/FirstRun/distros.ini', true);
         if (count($this->ini) > 1) {
             $f =& $wizard->begin_page();
             $f->addElement('header', null, __('Welcome to EPESI first run wizard'));
             $f->setDefaults(array('setup_type' => key($this->ini)));
             foreach ($this->ini as $name => $pkgs) {
                 switch ($name) {
                     case 'CRM installation':
                         $label = __('CRM installation');
                         break;
                     case 'CRM and Sales Opportunity':
                         $label = __('CRM and Sales Opportunity');
                         break;
                     case 'CRM and Bug Tracker installation':
                         $label = __('CRM and Bug Tracker installation');
                         break;
                     default:
                         $label = $name . ' (* missing translation)';
                         break;
                 }
                 $f->addElement('radio', 'setup_type', '', $label, $name);
             }
             $f->addElement('html', '<tr><td colspan=2><br /><strong>If you are not sure which package to choose select CRM Installation.<br>You can customize your installation later.</strong><br><br></td></tr>');
             $wizard->next_page();
         }
         /////////////////////////////////////////////////////////////////
         $f = $wizard->begin_page('simple_user');
         $f->addElement('header', null, __('Please enter administrator user login and password'));
         $f->addElement('text', 'login', __('Login'));
         $f->addRule('login', __('A username must be between 3 and 32 chars'), 'rangelength', array(3, 32));
         $f->addRule('login', __('Field required'), 'required');
         $f->addElement('text', 'mail', __('E-mail'));
         $f->addRule('mail', __('Field required'), 'required');
         $f->addRule('mail', __('Invalid e-mail address'), 'email');
         $f->addElement('password', 'pass', __('Password'));
         $f->addElement('password', 'pass_c', __('Confirm Password'));
         $f->addRule('pass', __('Field required'), 'required');
         $f->addRule('pass_c', __('Field required'), 'required');
         $f->addRule(array('pass', 'pass_c'), __('Passwords don\'t match'), 'compare');
         $f->addRule('pass', __('Your password must be longer then 5 chars'), 'minlength', 5);
         $wizard->next_page();
         /////////////////////////////////////////////////////
         $f = $wizard->begin_page('simple_mail');
         $f->addElement('header', null, __('Mail settings'));
         $f->addElement('html', '<tr><td colspan=2>' . __('If you are on a hosted server it probably should stay as it is now.') . '</td></tr>');
         $f->addElement('select', 'mail_method', __('Choose method'), array('smtp' => __('remote smtp server'), 'mail' => __('local php.ini settings')));
         $f->setDefaults(array('mail_method' => 'mail'));
         $wizard->next_page(array($this, 'choose_mail_method'));
         //////////////////////
         $f = $wizard->begin_page('simple_mail_smtp');
         $f->addElement('header', null, __('Mail settings'));
         $f->addElement('text', 'mail_host', __('SMTP host address'));
//.........这里部分代码省略.........
开发者ID:62BRAINS,项目名称:EPESI,代码行数:101,代码来源:FirstRun_0.php


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