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


PHP load_module函数代码示例

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


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

示例1: get_footer

function get_footer()
{
    load_module('footer');
    ?>
</body>
</html><?php 
}
开发者ID:valerio-bozzolan,项目名称:it-fuel-stations-comparator,代码行数:7,代码来源:footer.php

示例2: load_module

function load_module($module)
{
    global $all_packages;
    // Check if module exists in the list
    if (!isset($all_packages[$module])) {
        echo "Can't find module {$module}.";
        return;
    }
    // Check if module is already loaded
    if (file_exists("./installed_modules/{$module}")) {
        echo "{$module} is already installed.\n";
        return;
    }
    echo "Installing {$module}.\n";
    // Install dependencies
    if (count($all_packages[$module])) {
        echo "In order to install {$module}, we need";
        foreach ($all_packages[$module] as $dep) {
            echo " " . $dep;
        }
        echo ".\n";
        foreach ($all_packages[$module] as $dep) {
            load_module($dep);
        }
    }
    // Create directory when loaded
    mkdir("./installed_modules/{$module}");
    return;
}
开发者ID:jrarnaudov,项目名称:Application_HackBulgaria-Java101,代码行数:29,代码来源:load.php

示例3: index

 public function index()
 {
     if (is_logged(false)) {
         redirect(base_url());
     }
     set_theme('title', 'Login');
     set_theme('content', load_module('login', 'login'));
     set_theme('bodyClass', 'login bg-login printable');
     set_theme('pluginsJS', load_javascript(array('user-pages', 'initialize-login')), false);
     load_template();
 }
开发者ID:ricardoambdev,项目名称:vortex,代码行数:11,代码来源:login.php

示例4: mw_error

<?php

if (!is_admin()) {
    mw_error("must be admin");
}
?>

<?php 
$load_module = url_param('load_module');
if ($load_module == true) {
    ?>
    <?php 
    $mod = str_replace('___', DS, $load_module);
    $mod = load_module($mod, $attrs = array('view' => 'admin', 'backend' => 'true'));
    print $mod;
} else {
    ?>
    <?php 
    $mod_params = array();
    $mod_params['ui'] = 'any';
    if (isset($params['reload_modules'])) {
        $s = 'skip_cache=1';
        if (isset($params['cleanup_db'])) {
            $s .= '&cleanup_db=1';
        }
        $mods = scan_for_modules($s);
    }
    if (isset($params['category'])) {
        $mod_params['category'] = $params['category'];
    }
    if (isset($params['keyword'])) {
开发者ID:hyrmedia,项目名称:microweber,代码行数:31,代码来源:manage.php

示例5: load_module

<?php

/*
 * Author: alphazo_id
 *
 * Date: Jan 21, 2010
 * Time: 12:25:47 PM
 */
print '<div id="main">';
if (isset($_REQUEST['section'])) {
    $section = $_REQUEST['section'];
    load_module($section);
} else {
    $section = "ftp";
}
print '</div>';
开发者ID:nigredo,项目名称:Office-Administrator-s-Page,代码行数:16,代码来源:main.php

示例6: scan_current_dir

     }
     /**
      *	Now check modules folder with entries in addons
      */
     $modules = scan_current_dir(LEPTON_PATH . '/modules');
     if (count($modules['path']) > 0) {
         foreach ($modules['path'] as &$value) {
             $code_version = get_modul_version($value);
             $db_version = get_modul_version($value, false);
             if ($db_version != null && $code_version != null) {
                 if (versioncompare($db_version, $code_version, '>')) {
                     $error_msg[] = '<span class="normal bold red">' . $value . ' ( ' . $db_version . ' > ' . $code_version . ' ) ' . $MESSAGE['GENERIC_MODULE_VERSION_ERROR'] . '</span>';
                     continue;
                 } else {
                     require LEPTON_PATH . '/modules/' . $value . "/info.php";
                     load_module(LEPTON_PATH . '/modules/' . $value);
                     $msg[] = '<span class="normal bold green">' . $value . ' :: ' . $MESSAGE['ADDON_MODULES_RELOADED'] . '</span>';
                 }
             }
         }
     } else {
         $error_msg[] = '<span class="normal bold red">' . $MESSAGE['ADDON_ERROR_RELOAD'] . '</span>';
     }
     break;
 case 'reload_templates':
     $templates = scan_current_dir(LEPTON_PATH . '/templates');
     if (count($templates['path']) > 0) {
         // Delete templates from database
         $sql = 'DELETE FROM  `' . TABLE_PREFIX . 'addons`  WHERE `type` = \'template\'';
         $database->query($sql);
         // Reload all templates
开发者ID:pixelhulk,项目名称:LEPTON,代码行数:31,代码来源:reload.php

示例7: rm_full_dir

require_once LEPTON_PATH . '/framework/summary.functions.php';
rm_full_dir(LEPTON_PATH . '/modules/output_interface');
echo "<h3>delete obsolete module output_interface: successfull</h3>";
/**
 *  install new modules
 *
 */
if (!function_exists('load_module')) {
    require_once LEPTON_PATH . "/framework/summary.functions.php";
}
$install = array("/modules/lib_semantic");
// install new modules
foreach ($install as $module) {
    $temp_path = LEPTON_PATH . $module;
    require $temp_path . '/info.php';
    load_module($temp_path, true);
    foreach (array('module_license', 'module_author', 'module_name', 'module_directory', 'module_version', 'module_function', 'module_description', 'module_platform', 'module_guid') as $varname) {
        if (isset(${$varname})) {
            unset(${$varname});
        }
    }
}
echo "<h3>install new modules: successfull</h3>";
/**
 *  run upgrade.php of all modified modules
 *
 */
$upgrade_modules = array("addon_file_editor", "captcha_control", "code2", "droplets", "initial_page", "jsadmin", "lib_jquery", "lib_lepton", "lib_semantic", "lib_search", "lib_twig", "news", "tiny_mce_4", "wrapper", "wysiwyg", "wysiwyg_admin");
foreach ($upgrade_modules as $module) {
    $temp_path = LEPTON_PATH . "/modules/" . $module . "/upgrade.php";
    if (file_exists($temp_path)) {
开发者ID:pixelhulk,项目名称:LEPTON,代码行数:31,代码来源:210_update.php

示例8: next_function

function next_function($from, $func = "dbchanges")
{
    global $oldvers, $system_upgrade_detail, $currentscript, $cache;
    load_module("upgrade" . $from . ".php");
    if (function_exists("upgrade" . $from . "_" . $func)) {
        $function = "upgrade" . $from . "_" . $func;
    } else {
        // We're done with our last upgrade script, so add it to the upgrade scripts we've already completed.
        $version_history = $cache->read("version_history");
        $version_history[$from] = $from;
        $cache->update("version_history", $version_history);
        $from = $from + 1;
        if (file_exists(INSTALL_ROOT . "resources/upgrade" . $from . ".php")) {
            $function = next_function($from);
        }
    }
    if (!$function) {
        $function = "whatsnext";
    }
    return $function;
}
开发者ID:Nidrax,项目名称:ppm-1.6,代码行数:21,代码来源:upgrade.php

示例9: load_module

<?php

require 'system/loader.inc.php';
$CMS = load_module('Cms');
开发者ID:viveleroi,项目名称:AspenMSM,代码行数:4,代码来源:index.php

示例10: array

        }
    }
}
/**
 * 
 * Reload all specified Addons
 */
$msg = array();
$table = TABLE_PREFIX . 'addons';
foreach ($post_check as $key) {
    switch ($key) {
        case 'reload_modules':
            $aAddonList = glob(WB_PATH . '/modules/*', GLOB_ONLYDIR);
            foreach ($aAddonList as $sAddonFile) {
                if (is_readable($sAddonFile)) {
                    load_module($sAddonFile);
                }
            }
            // add success message
            $msg[] = $MESSAGE['ADDON_MODULES_RELOADED'];
            unset($aAddonList);
            break;
        case 'reload_templates':
            $aAddonList = glob(WB_PATH . '/templates/*', GLOB_ONLYDIR);
            foreach ($aAddonList as $sAddonFile) {
                if (is_readable($sAddonFile)) {
                    load_template($sAddonFile);
                }
            }
            // add success message
            $msg[] = $MESSAGE['ADDON_TEMPLATES_RELOADED'];
开发者ID:WebsiteBaker-modules,项目名称:WB-Portable,代码行数:31,代码来源:reload.php

示例11: index

 function index($params)
 {
     if (isset($params['manage_categories'])) {
         print load_module('categories/manage', $params);
         return;
     }
     if (isset($params['is_shop']) and $params['is_shop'] == 'y') {
         $params['is_shop'] = 1;
     } else {
         if (isset($params['is_shop']) and $params['is_shop'] == 'n') {
             $params['is_shop'] = 0;
         }
     }
     $no_page_edit = false;
     $posts_mod = array();
     // $posts_mod['type'] = 'content/admin_posts_list';
     if (isset($params['data-page-id'])) {
         $posts_mod['page-id'] = $params['data-page-id'];
     }
     if (isset($params['no_page_edit'])) {
         $no_page_edit = $params['no_page_edit'];
     }
     if (isset($params['keyword'])) {
         $posts_mod['search_by_keyword'] = $params['keyword'];
     }
     if (isset($params['content_type']) and $params['content_type'] != false) {
         $posts_mod['content_type'] = $params['content_type'];
     }
     if (isset($params['subtype']) and $params['subtype'] != false) {
         $posts_mod['subtype'] = $params['subtype'];
     }
     if (isset($params['is_shop']) and $params['is_shop'] == 1) {
         $posts_mod['content_type'] = 'product';
     } else {
         if (isset($params['is_shop']) and $params['is_shop'] == 0) {
             $posts_mod['subtype'] = 'post';
         }
     }
     if (isset($params['content_type']) and $params['content_type'] == 'product') {
         $posts_mod['content_type'] = 'product';
         // $posts_mod['content_type'] = 'post';
     }
     if (isset($params['content_type']) and $params['content_type'] == 'post') {
         if (!isset($params['subtype']) or $params['subtype'] == false) {
             //	$posts_mod['subtype'] = 'post';
         }
     }
     if (isset($params['content_type_filter']) and $params['content_type_filter'] != '') {
         $posts_mod['content_type'] = $params['content_type_filter'];
     }
     if (isset($params['subtype_filter']) and $params['subtype_filter'] != '') {
         $posts_mod['subtype'] = $params['subtype_filter'];
     }
     if (!isset($params['category-id']) and isset($params['page-id']) and $params['page-id'] != 'global') {
         $check_if_exist = $this->provider->get_by_id($params['page-id']);
         if (is_array($check_if_exist)) {
             if (isset($check_if_exist['is_shop']) and trim($check_if_exist['is_shop']) == 1) {
                 //  $posts_mod['subtype'] = 'product';
             }
         }
     }
     $page_info = false;
     if (isset($params['page-id'])) {
         if ($params['page-id'] == 'global') {
             if (isset($params['is_shop']) and $params['is_shop'] == 1) {
                 $page_info = $this->provider->get('limit=1&one=1&content_type=page&is_shop=0');
             }
         } else {
             $page_info = $this->provider->get_by_id($params['page-id']);
             if (isset($page_info['is_shop']) and trim($page_info['is_shop']) == 1) {
                 //  $posts_mod['subtype'] = 'product';
             }
         }
     }
     if (isset($params['category-id']) and $params['category-id'] != 'global') {
         $check_if_exist = $this->category_provider->get_page($params['category-id']);
         if (is_array($check_if_exist)) {
             $page_info = $check_if_exist;
             if (isset($check_if_exist['is_shop']) and trim($check_if_exist['is_shop']) == 1) {
                 $posts_mod['content_type'] = 'product';
             } else {
                 // $posts_mod['subtype'] = $check_if_exist['subtype'];
             }
         }
     }
     $posts_mod['paging_param'] = 'pg';
     $posts_mod['orderby'] = 'position desc';
     if (isset($posts_mod['page-id'])) {
         $posts_mod['parent'] = $posts_mod['page-id'];
     }
     if (isset($params['pg'])) {
         $posts_mod['pg'] = $params['pg'];
     }
     if (isset($params['data-category-id'])) {
         $posts_mod['category'] = $params['data-category-id'];
     } else {
         if (isset($params['parent-category-id'])) {
             $posts_mod['category'] = $params['parent-category-id'];
         } elseif (isset($params['category-id'])) {
             $posts_mod['category'] = $params['category-id'];
//.........这里部分代码省略.........
开发者ID:microweber,项目名称:microweber,代码行数:101,代码来源:Manager.php

示例12: entry

            echo '<h2>Step ' . $stepID++ . ' : Upgrade module \'' . $sModul . '\' to version ' . $newModulVersion . '</h2>';
            require_once WB_PATH . '/modules/' . $sModul . '/upgrade.php';
        }
    }
}
/**********************************************************
 *  - Reload all addons
 */
echo '<h2>Step ' . $stepID++ . ' : Reload all addons database entry (no upgrade)</h2>';
////delete modules
//$database->query("DELETE FROM ".TABLE_PREFIX."addons WHERE type = 'module'");
// Load all modules
if ($handle = opendir(WB_PATH . '/modules/')) {
    while (false !== ($file = readdir($handle))) {
        if ($file != '' and substr($file, 0, 1) != '.' and $file != 'admin.php' and $file != 'index.php') {
            load_module(WB_PATH . '/modules/' . $file);
            //     upgrade_module($file, true);
        }
    }
    closedir($handle);
}
echo '<br />Modules reloaded<br />';
////delete templates
//$database->query("DELETE FROM ".TABLE_PREFIX."addons WHERE type = 'template'");
// Load all templates
if ($handle = opendir(WB_PATH . '/templates/')) {
    while (false !== ($file = readdir($handle))) {
        if ($file != '' and substr($file, 0, 1) != '.' and $file != 'index.php') {
            load_template(WB_PATH . '/templates/' . $file);
        }
    }
开发者ID:wyg3958,项目名称:WebsiteBaker_CommunityEdition,代码行数:31,代码来源:upgrade-script.php

示例13: while

include 'lang.functions.php';
// Work-out if we should check for existing page_code
$sql = 'DESCRIBE `' . TABLE_PREFIX . 'pages` `page_code`';
$field_sql = $database->query($sql);
$field_set = $field_sql->numRows();
// $field_set = $database->field_add('page_code', 'pages', 'INT(11) NOT NULL AFTER `modified_by`');
// extract page_id from old format
$pattern = '/(?<=_)([0-9]{1,11})/s';
$format = $field_sql->fetchRow(MYSQL_ASSOC);
// upgrade only if old format
if ($format['Type'] == 'varchar(255)') {
    $sql = 'SELECT `page_code`,`page_id` FROM `' . TABLE_PREFIX . 'pages` ORDER BY `page_id`';
    $query_code = $database->query($sql);
    while ($page = $query_code->fetchRow(MYSQL_ASSOC)) {
        preg_match($pattern, $page['page_code'], $array);
        $page_code = $array[0];
        $page_id = $page['page_id'];
        $sql = 'UPDATE `' . TABLE_PREFIX . 'pages` SET ';
        $sql .= empty($array[0]) ? '`page_code` = 0 ' : '`page_code` = ' . $page_code . ' ';
        $sql .= 'WHERE `page_id` = ' . $page_id;
        $database->query($sql);
    }
    $sql = 'ALTER TABLE `' . TABLE_PREFIX . 'pages` MODIFY COLUMN `page_code` INT(11) NOT NULL';
    $database->query($sql);
}
//
$directory = dirname(__FILE__) . '/' . 'info.php';
// update entry in table addons to new version
load_module($directory, $install = false);
// Print admin footer
// $admin->print_footer();
开发者ID:NorHei,项目名称:multilingual,代码行数:31,代码来源:upgrade.php

示例14: die

<?php

/*
*	@version	0.1
*	@author		Ruud Eisinga (Ruud)
*	@date		2009-04-10
*
*/
if (!defined('WB_PATH')) {
    die(header('Location: ../index.php'));
}
$table = TABLE_PREFIX . 'mod_capslider_slide';
$database->query("DROP TABLE IF EXISTS `{$table}`");
$database->query("CREATE TABLE `{$table}` (\n\t`id` INT NOT NULL auto_increment,\n\t`group_id` INT NOT NULL DEFAULT '0',\n\t`image` TEXT NOT NULL ,\n\t`alt` TEXT NOT NULL ,\n\t`height` INT NOT NULL DEFAULT '0',\n\t`width` INT NOT NULL DEFAULT '0',\n\t`modified_when` INT NOT NULL DEFAULT '0',\n\t`modified_by` INT NOT NULL DEFAULT '0',\n\t`active` INT NOT NULL DEFAULT '0',\n\t`comments` TEXT NOT NULL,\n\tPRIMARY KEY ( `id` )\n\t)");
$table = TABLE_PREFIX . 'mod_capslider_groups';
$database->query("DROP TABLE IF EXISTS `{$table}`");
$database->query("CREATE TABLE `{$table}` (\n\t`group_id` INT NOT NULL auto_increment,\n\t`group_name` VARCHAR(32) NOT NULL DEFAULT '',\n\t`height` INT NOT NULL DEFAULT '0',\n\t`width` INT NOT NULL DEFAULT '0',\n\t`delay` INT NOT NULL DEFAULT '0',\n\t`speed` INT NOT NULL DEFAULT '0',\n\t`panel` VARCHAR(6) NOT NULL DEFAULT '000000',\n\tPRIMARY KEY ( `group_id` )\n\t)");
$database->query("INSERT INTO " . $table . " (`group_name`,`height`,`width`,`delay`,`speed`) VALUES ('capslider','200','600','5000','800' )");
load_module(WB_PATH . '/modules/capslider/snippet');
开发者ID:WebsiteBaker-modules,项目名称:CaptionSlider,代码行数:19,代码来源:install.php

示例15: load_module

                            <div id="parent-category-selector-holder"></div>
                        </div>
                    <?php 
    }
    ?>
                </div>
            </div>
        </div>
    <?php 
}
?>
    <div class="mw-admin-edit-content-holder">
        <?php 
$data['recommended_parent'] = $recommended_parent;
$data['active_categories'] = $categories_active_ids;
print load_module('content/views/tabs', $data);
?>
    </div>
    <?php 
if (isset($data['subtype']) and isset($data['content_type']) and $data['content_type'] == 'page' and $data['subtype'] == 'dynamic') {
    ?>
        <module type="content/views/layout_selector" id="mw-quick-add-choose-layout-middle-pos" autoload="yes"
                template-selector-position="bottom" content-id="<?php 
    print $data['id'];
    ?>
"
                inherit_from="<?php 
    print $data['parent'];
    ?>
"/>
        <?php 
开发者ID:hyrmedia,项目名称:microweber,代码行数:31,代码来源:edit_default.php


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