本文整理汇总了PHP中load_module函数的典型用法代码示例。如果您正苦于以下问题:PHP load_module函数的具体用法?PHP load_module怎么用?PHP load_module使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了load_module函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: session_start
<?php
session_start();
require __DIR__ . '/config/init.php';
/** @var PDO $app_dbo */
$app_dbo = load_module('database', true);
load_module('auth');
try {
$auth_response = Auth_Base::attempt(array('username' => '[email protected]', 'password' => '123456'));
} catch (Exception $e) {
$auth_response = $e->getMessage();
}
var_dump($auth_response);
开发者ID:nscreed,项目名称:rp,代码行数:13,代码来源:index.php
示例17: run_module
function run_module($module = '', $options = '', $transaction = 1)
{
global $conf, $self, $onadb;
// Build the options array string from $options_string if we need to
// This is only used for logging! If $options_string is an array it
// is passed untouched to the module.
$options_string = $options;
if (is_array($options)) {
$options_string = '';
$and = '';
foreach (array_keys($options) as $key) {
// Quote any "special" characters in the value.
// Specifically the '=' and '&' characters need to be escaped.
$options[$key] = str_replace(array('=', '&'), array('\\=', '\\&'), $options[$key]);
// If the key has no value or it is the javascript key, dont print it.
if ($options[$key] != "" and $key != 'js') {
$options_string .= "{$and}{$key}={$options[$key]}";
$and = '&';
}
}
}
// get the options as an array so we can look for logging info
$local_options = parse_options($options);
// If the user passes in an option called 'module_loglevel' then use it as the run module output level
// otherwise default it to 1 so it will print out as normal.
$log_level = 1;
if ($local_options['module_loglevel']) {
$log_level = $local_options['module_loglevel'];
}
// Remove config info as it can be huge and could have sensitive info in it.
// This could cause issues since I"m doing & as an anchor at the end. see how it goes.
// The module that is called could also display this information depending on debug level
$options_string = preg_replace("/config=.*&/", '', $options_string);
printmsg("INFO => Running module: {$module} options: {$options_string}", $log_level);
// Load the module
if (load_module($module)) {
return array(1, $self['error'] . "\n");
}
// Start an DB transaction (If the database supports it)
if ($transaction) {
$has_trans = $onadb->BeginTrans();
}
if (!$has_trans) {
printmsg("WARNING => Transactions support not available on this database, this can cause problems!", 1);
}
// If begintrans worked and we support transactions, do the smarter "starttrans" function
if ($has_trans) {
printmsg("DEBUG => Commiting transaction", 2);
$onadb->StartTrans();
}
// Start a timer so we can display moudle run time if debugging is enabled
$start_time = microtime_float();
// Run the function
list($status, $output) = $module($options);
// Stop the timer, and display how long it took
$stop_time = microtime_float();
printmsg("DEBUG => [Module_runtime] " . round($stop_time - $start_time, 2) . " seconds -- [Total_SQL_Queries] " . $self['db_get_record_count'] . " -- [Module_exit_code] {$status}", 1);
// Either commit, or roll back the transaction
if ($transaction and $has_trans) {
if ($status != 0) {
printmsg("INFO => There was a module error, marking transaction for a Rollback!", 1);
//$onadb->RollbackTrans();
$onadb->FailTrans();
}
}
if ($has_trans) {
// If there was any sort of failure, make sure the status has incremented, this catches sub module output errors;
if ($onadb->HasFailedTrans()) {
$status = $status + 1;
}
// If the user passed the rollback flag then dont commit the transaction
// FIXME: not complete or tested.. it would be nice to have an ability for the user to pass
// a rollback flag to force the transaction to rollback.. good for testing adds/modify.
// The problem is sub modules will fire and then the whole thing stops so you wont see/test the full operation.
// if ($local_options['rollback']) {
// printmsg("INFO => The user requested to mark the transaction for a rollback, no changes made.", 0);
// $output .= "INFO => The user requested to mark the transaction for a rollback, no changes made.\n";
// $status = $status + 1;
// }
printmsg("DEBUG => Commiting transaction", 2);
$onadb->CompleteTrans();
}
// Return the module's output
return array($status, $output);
}
开发者ID:edt82,项目名称:ona,代码行数:85,代码来源:functions_general.inc.php
示例18: array
<?php
$module_info = array("name" => "plugwise", "description" => "Plugwise USB Driver", "version" => "0.1", "author" => "Cedric Marie-Marthe", "bootstrap" => "plugwise_usb", "driver" => "plugwise_usb_driver.php", "socket" => array());
load_module($module_info);
开发者ID:Robin-73,项目名称:phplug,代码行数:4,代码来源:plugwise_usb.php
示例19: _e
<span class="mw_editor_btn mw_editor_link" data-command="custom-link" title="<?php
_e("Add/Edit Link");
?>
"><span class="ed-ico"></span></span>
<span class="mw_editor_btn mw_editor_unlink" data-command="custom-unlink" title="<?php
_e("Remove Link");
?>
"><span class="ed-ico"></span></span>
<span class="mw_editor_btn mw_editor_remove_formatting" data-command="removeformat" title="<?php
_e("Remove Formatting");
?>
"><span class="ed-ico"></span></span>
<?php
if (is_admin() and isset($_REQUEST['modules'])) {
$mods = explode(',', $_REQUEST['modules']);
$mods = array_trim($mods);
if (is_array($mods)) {
foreach ($mods as $mod) {
print load_module($mod);
}
}
}
?>
</div>
</div>
开发者ID:hyrmedia,项目名称:microweber,代码行数:28,代码来源:wysiwyg_admin.php
示例20: array_unique
}
}
}
}
}
$modules = array_unique($modules);
}
?>
<?php
if (!empty($modules)) {
?>
<?php
foreach ($modules as $module) {
?>
<?php
print load_module($module, $data);
?>
<?php
}
?>
<?php
} else {
?>
<?php
include __DIR__ . DS . 'edit_default.php';
?>
<?php
}
?>
</div>
开发者ID:hyrmedia,项目名称:microweber,代码行数:30,代码来源:edit.php
注:本文中的load_module函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论