本文整理汇总了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;
}
示例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));
}
}
示例3: __construct
function __construct()
{
parent::__construct();
__extends($this);
$this->module = get_modules('filter_namespace', 'pages_editor');
$this->_before_boot();
}
示例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' );
}
示例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;
}
示例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;
}
示例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();
}
}
示例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'];
}
示例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;
}
}
示例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]);
示例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(){
示例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;
}
示例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);
示例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) {
示例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;
}
}