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


PHP get_modules函数代码示例

本文整理汇总了PHP中get_modules函数的典型用法代码示例。如果您正苦于以下问题:PHP get_modules函数的具体用法?PHP get_modules怎么用?PHP get_modules使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: get_modules

function get_modules($path = null, $get_installed = INSTALLED)
{
    global $module_basepath;
    if ($path == null) {
        $path = $module_basepath;
    }
    $results = scandir($path);
    $modules = array();
    $installed_modules = get_installed_modules();
    foreach ($results as $result) {
        if ($result === '.' or $result === '..') {
            continue;
        }
        if (is_dir($path . '/' . $result)) {
            if ($get_installed == INSTALLED && !in_array($result, $installed_modules)) {
                continue;
            } else {
                if ($get_installed == UNINSTALLED && in_array($result, $installed_modules)) {
                    continue;
                }
            }
            $modules = array_merge($modules, get_modules($path . '/' . $result, $get_installed));
            if (file_exists($path . '/' . $result . '/settings/settings.json')) {
                array_push($modules, str_replace($module_basepath . '/', '', $path . '/' . $result));
            }
        }
    }
    return $modules;
}
开发者ID:ZerGabriel,项目名称:OpenFANTASY,代码行数:29,代码来源:admin_functions.php

示例2: module_rank_up

 function module_rank_up($id1)
 {
     $list = get_modules();
     foreach ($list as $key => $value) {
         //echo $value['id'].'<br>'.$id1;;
         if ($id1 == $value['id']) {
             $id1_key = $key;
             //echo $key;
         }
     }
     if ($id1_key !== 0) {
         $id2_key = $id1_key - 1;
     }
     $id2 = intval($list[$id2_key]['id']);
     $rank2 = intval($list[$id2_key]['rank']);
     $rank1 = intval($list[$id1_key]['rank']);
     if ($rank1 !== 0 && $rank2 !== 0) {
         $stor = new Storage();
         $stor = $stor->storType(TE_STORTYPE);
         $m = $stor->make('module');
         $m->setProperty('id', $id1);
         $m->upd(array('rank' => $rank2));
         $m->setProperty('id', $id2);
         $m->upd(array('rank' => $rank1));
     }
 }
开发者ID:noisywiz,项目名称:tractor,代码行数:26,代码来源:module_list.php

示例3: __construct

 function __construct()
 {
     parent::__construct();
     __extends($this);
     $this->module = get_modules('filter_namespace', 'pages_editor');
     $this->_before_boot();
 }
开发者ID:RodolfoSilva,项目名称:tendoo-cms,代码行数:7,代码来源:library.php

示例4: __construct

 public function __construct($data)
 {
     parent::__construct();
     __extends($this);
     $this->_config();
     $this->data = $data;
     $this->instance = get_instance();
     $this->opened_module = get_core_vars('opened_module');
     $this->data['module'] = get_core_vars('opened_module');
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     $fileManager = get_modules('filter_namespace', 'tendoo_contents');
     if ($fileManager) {
         include_once MODULES_DIR . $fileManager['encrypted_dir'] . '/utilities.php';
         set_core_vars('fmlib', new tendoo_contents_utility());
         // Loading library
     }
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     $this->data['inner_head'] = $this->load->view('admin/inner_head', $this->data, true);
     $this->data['lmenu'] = $this->load->view(VIEWS_DIR . '/admin/left_menu', $this->data, true, TRUE);
     $this->link = MODULES_DIR . $this->opened_module['encrypted_dir'] . '/';
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     // ???
     $this->module_metas =& $this->opened_module;
     // ???
     // $this->load->library( 'GUI' );
 }
开发者ID:RodolfoSilva,项目名称:tendoo-cms,代码行数:26,代码来源:backend.php

示例5: __construct

 public function __construct()
 {
     parent::__construct();
     __extends($this);
     $this->cur_module = get_modules('filter_active_namespace', 'blogster');
     $this->encrypted_dir =& $this->cur_module['encrypted_dir'];
     $this->cur_module_dir = $this->cur_module['uri_path'];
     $this->data = array();
     $this->data['cur_module'] =& $this->cur_module;
 }
开发者ID:RodolfoSilva,项目名称:tendoo-cms,代码行数:10,代码来源:widget_comments_config.php

示例6: __construct

 public function __construct()
 {
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     parent::__construct();
     __extends($this);
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     $this->cur_module = get_modules('filter_active_namespace', 'pages_editor');
     $this->encrypted_dir =& $this->cur_module['encrypted_dir'];
     $this->cur_module_dir = MODULES_DIR . $this->encrypted_dir;
     $this->data = array();
     $this->data['cur_module'] =& $this->cur_module;
 }
开发者ID:RodolfoSilva,项目名称:tendoo-cms,代码行数:12,代码来源:show_page_hierarchy_config.php

示例7: __construct

 public function __construct($data)
 {
     parent::__construct();
     __extends($this);
     $this->module = get_modules('filter_namespace', 'blogster');
     $this->load->library('tendoo_admin', null, 'admin');
     if (defined('SCRIPT_CONTEXT')) {
         if (SCRIPT_CONTEXT == 'ADMIN') {
             $this->admin_context();
             // get_instance()->tendoo_admin->system_not('2 Nouveaux commentaires disponibles', 'Deux nouveaux commentaires sont dans la liste d\'attentes des [Lire la suite] ', '#', '10 mai 2013', null);
         } else {
             $this->public_context();
         }
         $this->both_context();
     }
 }
开发者ID:RodolfoSilva,项目名称:tendoo-cms,代码行数:16,代码来源:init.php

示例8: index

 public function index($page = 1, $action = "", $element = '')
 {
     if (isset($_POST['tewi_wid'])) {
         $result = $this->lib->save_widgets($_POST['tewi_wid']);
         if (is_array($result)) {
             $this->instance->notice->push_notice(tendoo_info($result['success'] . ' widget(s) has been created. ' . $result['error'] . ' error(s)'));
         } else {
             $this->instance->notice->push_notice(fetch_notice_output($result));
         }
     }
     $this->instance->file->js_push('jquery-ui-1.10.4.custom.min');
     $this->instance->file->js_url = $this->instance->url->main_url() . $this->data['module_dir'] . '/js/';
     $this->instance->file->js_push('tewi_script');
     $this->instance->file->css_url = $this->instance->url->main_url() . $this->data['module_dir'] . '/css/';
     $this->instance->file->css_push('style');
     $this->data['modules'] = get_modules('filter_active');
     $this->data['finalMod'] = array();
     foreach ($this->data['modules'] as $module) {
         if ($module['has_widget'] == true) {
             $widget_config_file = MODULES_DIR . $module['encrypted_dir'] . '/config/widget_config.php';
             if (file_exists($widget_config_file)) {
                 include_once $widget_config_file;
                 if (isset($WIDGET_CONFIG)) {
                     foreach ($WIDGET_CONFIG as $wc) {
                         $this->data['finalMod'][] = $wc;
                     }
                 }
             }
         }
     }
     $this->data['widgets_left'] = $this->lib->tewi_getWidgets('left');
     $this->data['widgets_right'] = $this->lib->tewi_getWidgets('right');
     $this->data['widgets_bottom'] = $this->lib->tewi_getWidgets('bottom');
     // var_dump($this->data['widgets_right']);
     set_page('title', __('Tendoo - Manage Widgets'));
     $this->data['body'] = $this->load->view($this->data['module_dir'] . '/views/body', $this->data, true, TRUE);
     return $this->data['body'];
 }
开发者ID:RodolfoSilva,项目名称:tendoo-cms,代码行数:38,代码来源:backend.php

示例9: __construct

 function __construct()
 {
     $this->here = dirname(__FILE__) . DS . 'gateways' . DS;
     $here = $this->here;
     $shipping_gateways = get_modules('type=shipping_gateway');
     if ($shipping_gateways == false) {
         $shipping_gateways = scan_for_modules("cache_group=modules/global&dir_name={$here}");
     }
     if (!empty($shipping_gateways)) {
         $gw = array();
         foreach ($shipping_gateways as $item) {
             if (!isset($item['gw_file']) and isset($item['module'])) {
                 $item['gw_file'] = $item['module'];
             }
             if (!isset($item['module_base']) and isset($item['module'])) {
                 $item['module_base'] = $item['module'];
             }
             $gw[] = $item;
         }
         $this->modules_list = $gw;
     } else {
         $this->modules_list = $shipping_gateways;
     }
 }
开发者ID:hyrmedia,项目名称:microweber,代码行数:24,代码来源:shipping_api.php

示例10: get_user_modules

<?php

require_once 'check-cas-connection.php';
require_once "class/connection.php";
require_once "includes/functions.php";
//phpCAS::getUser();
//USER
$my_modules = get_user_modules(phpCAS::getUser());
$every_modules = get_modules();
$modules = mix_modules($my_modules, $every_modules);
display_modules($modules);
function display_modules($modules)
{
    ?>
<br>
<br>
<br>
<div class="container">
 <table class="table table-striped">
	 <thead>
		 <tr>
			 <th></th>
		 </tr>
	 </thead>
	 <tbody>
		 <tr>
<?php 
    $n = count($modules);
    $i = 0;
    while ($i < $n) {
        write_module($modules[$i]);
开发者ID:hackathonUTC,项目名称:myutc-app,代码行数:31,代码来源:my-menu-edit.php

示例11: show_school_name

		echo "<script>alert('請登入才能回覆!');history.back();</script>";
		exit();	
	}*/
	blog_news_add_update();	
}


$smarty = new Smarty;
$smarty->compile_dir ='../templates_c';
$smarty->assign('lang_arr',$_LANG);
#獲取網站基本信息
$get_web_basic_info=get_web_basic_info();
$smarty->assign('web_basic_info',get_web_basic_info());
#獲取佈局模組
//check_limit();#檢驗訪問權限
$Modules=get_modules("left_modules",$layout_id=0);
$smarty->assign('modules',$Modules);
if($_REQUEST['type']=='detail'){
	$smarty->assign('list_data',show_data_all());
}else{
	$smarty->assign('list_data',show_data());
}
$smarty->assign('list_data2',show_school_name());
$smarty->assign('top_menu',get_top_menu());#top單級選單
$smarty->assign('top_multiple_menu_module',get_multiple_menu());#top多級選單
$smarty->assign('marquee_js',get_marquee_modules());#獲取跑馬燈js



//$smarty->assign('nav',get_multiple_menu_nav($info_p_id));
function show_school_name(){
开发者ID:Encheng,项目名称:2015-8-20first,代码行数:31,代码来源:new_admin_zipingbiao.php

示例12: checkModuleActive

function checkModuleActive($module)
{
    $adb = PearDatabase::getInstance();
    $log = vglobal('log');
    $isactive = false;
    $modules = get_modules(true);
    foreach ($modules as $key => $value) {
        if (strcmp($module, $value['name']) == 0) {
            $isactive = true;
            break;
        }
    }
    return $isactive;
}
开发者ID:JeRRimix,项目名称:YetiForceCRM,代码行数:14,代码来源:yetiportal.php

示例13: dirname

<?php

die;
require_once dirname(dirname(__FILE__)) . '/config.php';
// gets the module list for this installation
$ret = new stdClass();
$ret->ProgVersion = ProgramVersion;
$ret->DbVersion = GetParameter('DBUpdate');
$ret->ProgRelease = ProgramRelease;
$ret->Action = 'list';
$ret->email = empty($_POST['email']) ? '' : $_POST['email'];
$ret->Modules = get_modules();
$ret->Sets = get_sets();
$postdata = http_build_query(array('Json' => gzcompress(serialize($Old))));
// get the online modules
$opts = array('http' => array('method' => 'POST', 'header' => 'Content-type: application/x-www-form-urlencoded', 'content' => $postdata));
$context = stream_context_create($opts);
$stream = fopen('http://ianseo.net/Ianseo/Modules.php', 'r', false, $context);
$tmp = stream_get_contents($stream);
if (!($NewIanseo = unserialize(gzuncompress($tmp)))) {
    if ($tmp == 'NothingToDo') {
        echo get_text('Done', 'Install');
    } else {
        echo get_text('Failed', 'Install');
    }
    echo '</div>';
    echo '<div><br/>' . get_text($tmp, 'Install') . '</div>';
    include 'Common/Templates/tail.php';
    die;
}
fclose($stream);
开发者ID:brian-nelson,项目名称:ianseo,代码行数:31,代码来源:index.php

示例14: CGUI_VALIDATOR_NOEMPTY

   case 'edit':
       $command_id = $_GET['command'];
       $GUI->cmdmenu->AddItem("Удалить", "?section=admin&subsection=3&action=del&command=" . $command_id);
       $ypos = 0;
       $frm = $GUI->Form("Редактировать команду №" . $command_id, 300, 0);
       $frm->OnExecute = "edit_command";
       $t = $frm->Hidden($command_id);
       $t->linkName = 'id';
       $command_info = Command::find($command_id);
       $frm->Label("Имя", 10, $ypos += 20);
       $t = $frm->Text(25, $ypos += 20, 250, $command_info['name']);
       $t->AddValidator(new CGUI_VALIDATOR_NOEMPTY());
       $t->linkName = "name";
       $ypos += 30;
       $frm->Label("Родительский модуль", 10, $ypos += 20);
       $ss = $frm->Select(25, $ypos += 20, 250, get_modules(true), '', $command_info['module_id']);
       $ss->AddValidator(new CGUI_VALIDATOR_NOZERO());
       $ss->linkName = "module_id";
       $ypos += 30;
       $jq = <<<jQ
 var module_id = jQuery(this).val();
 var field_number = parseInt(jQuery(this).attr('id').substr(18, 1));
 jQuery.ajax({
   type:"POST",
   url:'/modules/admin/ajax.php',
   cache:false,
   dataType:'json',
   data:{action:'get_submodules', module_id:module_id},
   success:function(result) {
     var options = '';
     jQuery.each(result, function(index, value) {
开发者ID:yonkon,项目名称:diplom,代码行数:31,代码来源:commands.php

示例15: extraire_module_sumary

function extraire_module_sumary($baliza)
{
    if (strpos($baliza, '</block>')) {
        $baliza = str_replace("<br class='autobr' />", "", $baliza);
        $block_list = explode('</block>', $baliza);
        $return = "";
        for ($i = 0; $i < count($block_list) - 1; $i++) {
            $block = get_block($block_list[$i]);
            // $return .= '('.$i.') '.$block['class'];
            $modules = get_modules($block['content']);
            // $return .= ' - num modules:'.count($modules).' ';
            $n_audio = 0;
            $n_image = 0;
            $n_text = 0;
            $n_link = 0;
            $t = "\t\t\t\t\t\t";
            for ($u = 0; $u < count($modules); $u++) {
                // $return .= $modules[$u]['class'].' ';
                switch ($modules[$u]['class']) {
                    case "text":
                        $return .= "<p>" . $modules[$u]['content'] . "</p>\n";
                        $n_text++;
                        break;
                }
            }
        }
        return $return;
    } else {
        return $baliza;
    }
}
开发者ID:horaciogd,项目名称:CGeomap,代码行数:31,代码来源:mes_fonctions.php


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