本文整理汇总了PHP中loadModule函数的典型用法代码示例。如果您正苦于以下问题:PHP loadModule函数的具体用法?PHP loadModule怎么用?PHP loadModule使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了loadModule函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: loadXMLModules
function loadXMLModules($xmlFile)
{
global $debug, $server;
$xml = simplexml_load_file($xmlFile) or die("Error: Cannot create object");
if ($xml === false) {
echo "Failed loading XML: ";
foreach (libxml_get_errors() as $error) {
if ($debug) {
echo "<br>", $error->message;
}
}
} else {
if ($debug) {
echo "XML File loaded<br /><br />";
}
foreach ($xml->module as $module) {
if ($debug) {
echo "Loading module " . $module[name] . "<br />";
}
foreach ($module->children() as $component) {
if ($debug) {
echo "Role: " . $component['role'] . ", File: " . $component[0];
}
if ($debug) {
echo "<br />";
}
loadModule($component);
}
if ($debug) {
echo "<br />";
}
}
}
$server->handle();
}
示例2: loadModule
function loadModule($module, $notMandatory = false)
{
if (is_array($module)) {
foreach ($module as $m) {
loadModule($m, $notMandatory);
}
} else {
if (strlen($module) <= 0) {
return false;
}
$fpath = checkModule($module);
if ($fpath && strlen($fpath) > 0) {
$x = dirname(str_replace(ROOT, "", $fpath)) . "/";
$p = func_get_args();
unset($p[0]);
$curModule = "";
if (isset($_ENV['CURRENT_MODULE'])) {
$curModule = $_ENV['CURRENT_MODULE'];
}
$_ENV['CURRENT_MODULE'] = $module;
$MODULE_PARAMS = $p;
runPluginHooks($module, "preload");
include $fpath;
runPluginHooks($module, "postload");
$_ENV['CURRENT_MODULE'] = $curModule;
return true;
} else {
if (MASTER_DEBUG_MODE && !$notMandatory) {
trigger_logikserror("Module Not Found :: " . $module, E_LOGIKS_ERROR, 404);
}
}
}
return false;
}
示例3: loadApps
function loadApps()
{
$db = new FQuery();
$db->connect();
$qr = null;
//set $qr to null value
$view = app_param('app');
if (isset($_GET['theme']) and $_GET['theme'] == 'module' and $_SESSION['USER_LEVEL'] > 3) {
$view = '';
}
$sql = $db->select(FDBPrefix . 'apps', '*', "folder='app_{$view}'");
mysql_fetch_array($sql);
if (mysql_affected_rows() != 0) {
$sql2 = $db->select(FDBPrefix . 'menu', '*', "id=" . Page_ID);
$qrs = @mysql_fetch_array($sql2);
$theme = siteConfig('site_theme');
$tfile = "themes/{$theme}/apps/app_{$view}/index.php";
$file = "apps/app_{$view}/index.php";
if (file_exists($file)) {
if (_FEED_ != 'rss') {
echo '<div class="apps' . $qrs["class"] . $qrs["class"] . '">';
}
if (!empty($qrs['title']) and $qrs['show_title']) {
define("Apps_Title", "{$qrs['title']}");
}
if ($qrs['show_title']) {
if (!defined('Apps_Title')) {
define("Apps_Title", "{$qrs['name']}");
}
}
if (_FEED_ != 'rss') {
echo '<div class="main_apps">';
}
if (file_exists($tfile)) {
include $tfile;
} else {
if (file_exists($file)) {
include $file;
}
}
if (_FEED_ != 'rss') {
echo ' </div></div>';
}
}
} else {
if (isset($_GET['theme']) and $_GET['theme'] == 'module' and $_SESSION['USER_LEVEL'] < 3) {
echo "<div style='border: 2px solid #e3e3e3; background: rgba(250,250,250,0.8);\tcolor :#aaa; \n\t\tpadding: 30px; text-align: center; margin: 5px 3px; font-weight: bold;'>Main Content</div>";
} else {
$lang = siteConfig('lang');
echo '<div class="apps' . $qr["class"] . '">' . _404_ . '</div><p>';
$file = "modules/mod_search/mod_search.php";
if (file_exists($file)) {
include $file;
}
echo '</p>';
loadModule('404');
}
}
}
示例4: PageController_index
function PageController_index()
{
loadModule('orders');
$offset = 0;
$limit = getConfig('orders')['order_list_limit'];
$orderList = Orders_getOrderList('created', $offset, $limit, $ordersCount);
showTemplate('index', ['orderList' => $orderList, 'ordersCount' => $ordersCount, 'offset' => $offset, 'limit' => $limit]);
}
示例5: load_module
public static function load_module($atts = null, $content = null)
{
$atts = su_shortcode_atts(array('id' => '', 'scroll_reveal' => '', 'class' => ''), $atts, 'load_module');
$module_class = 0;
$module_style = 'round';
$module_id = $atts['id'];
if (is_numeric($module_id)) {
return '<div' . su_scroll_reveal($atts) . ' class="su-load-module">' . loadModule($module_id, $module_class, $module_style) . '</div>';
} else {
return alert_box(JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_MODULE_ERROR'), 'warning');
}
}
示例6: smarty_function_module
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsFunction
* @author Bismay Kumar Mohaptra
*/
function smarty_function_module($params, Smarty_Internal_Template $template)
{
$src = explode(".", $params['src']);
if (count($src) <= 1) {
$GLOBALS['PAGETMPL'] = $template->smarty;
$_ENV['MODULECONFIG'][$params['src']] = $params;
return loadModule($params['src']);
} else {
$GLOBALS['PAGETMPL'] = $template->smarty;
$_ENV['MODULECONFIG'][$src[0]] = $params;
loadModuleLib($src[0], $src[1]);
}
}
示例7: loadVendor
function loadVendor($vendor, $notMandatory = false)
{
if (is_array($vendor)) {
foreach ($vendor as $m) {
loadModule($m, $notMandatory);
}
} else {
if (strlen($vendor) <= 0) {
return false;
}
$fpath = checkVendor($vendor);
if ($fpath && strlen($fpath) > 0) {
include $fpath;
return true;
} else {
if (MASTER_DEBUG_MODE && !$notMandatory) {
trigger_logikserror("Vendor Not Found :: " . $vendor, E_LOGIKS_ERROR, 404);
}
}
return false;
}
}
示例8: login
public function login()
{
$this->form_validation->set_rules('email', 'E-mail', 'required|valid_email');
$this->form_validation->set_rules('senha', 'Senha', 'required');
if ($this->form_validation->run()) {
$email = $this->input->post('email', true);
$senha = md5($this->input->post('senha', true));
if ($this->users_model->login($email, $senha)) {
$query = $this->users_model->getUser($email)->row();
$userData = array('id' => $query->id, 'nome' => $query->nome, 'email' => $email, 'admin' => $query->admin, 'logged' => true);
$this->session->set_userdata($userData);
redirect('painel');
} else {
echo '<span id="fail" data-fail="login"></span>';
}
}
setTheme('title', 'Login');
setTheme('content', loadModule('user', 'login'));
setTheme('initPlugins', loadJavascript(array('scripts/user-pages')), false);
setTheme('bodyClass', 'login bg-login printable');
loadTemplate();
}
示例9: loadModule
<?php
}
?>
<?php
loadModule('article-bottom');
?>
<?php
if ($comment and !checkModule('article-comment')) {
?>
<div id="comment">
<?php
loadComment();
?>
<?php
loadModule('article-comment');
?>
</div>
<?php
}
?>
</div>
<script>
$(function() {
var hash = $('.gravatar[data-gravatar-hash]').attr('data-gravatar-hash');
$.ajax({
url: 'http://gravatar.com/avatar/'+ hash +'?size=100' ,
示例10: loadModule
</section>
<div class="cl"></div>
</div>
<!-- end of main -->
<?php
if (checkModule('breadchumb')) {
?>
<div class="socials">
<div class="socials-inner">
<?php
loadModule('breadchumb');
?>
<div class="cl"></div>
</div>
</div>
<?php
}
?>
<div id="footer">
<div class="footer-bottom">
<p class="copy">© Copyright <?php
echo siteConfig('site_name') . " " . date("Y");
?>
示例11: loadLogiksBootEngines
function loadLogiksBootEngines()
{
if (function_exists("runHooks")) {
runHooks("enginesStart");
}
//Optional Data Components
include_once ROOT . "api/libs/logiksDB/boot.php";
include_once ROOT . "api/libs/logiksUser/boot.php";
$status = getConfig("APPS_STATUS");
switch ($status) {
case 'development':
ini_set('display_errors', 'On');
error_reporting(1);
if (!defined("MASTER_DEBUG_MODE")) {
define("MASTER_DEBUG_MODE", true);
}
break;
case 'staging':
if (isset($_GET['debug']) && $_GET['debug'] == "true") {
ini_set('display_errors', 'On');
error_reporting(1);
if (!defined("MASTER_DEBUG_MODE")) {
define("MASTER_DEBUG_MODE", true);
}
}
break;
case 'production':
break;
}
if (getConfig("LOGIKS_OPTIONAL")) {
loadLogiksOptional();
}
loadModule("core", true);
loadModule(SITENAME, true);
if (function_exists("runHooks")) {
runHooks("enginesRunning");
}
}
示例12: loadModule
<div class="col-sm-12 col-md-9"><!-- Start Left content -->
<!-- start: patient_name -->
<?php
loadModule('patient_name');
?>
<!-- /patient_name-->
<div class="row">
<div class="list-group">
<a href="#" class="list-group-item active">Select Category</a>
<?php
foreach ($categories as $category) {
?>
<a class="list-group-item" href="index.php?com=letter&view=edit_letter&task=create_new_letter&category_id=<?php
echo $category->category_id;
?>
&patient_id=<?php
echo $patient->patient_id;
?>
&user_id=<?php
echo $user->ID;
?>
"><?php
echo $category->name;
?>
</a>
<?php
示例13: loadModule
echo $appointment->scheduled_practitioner_name;
?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div><!--/box-content -->
</div><!--/box --->
</div><!--/col -->
</div><!--/row -->
</div><!--/col /left content -->
<div class="col-md-3 visible-md visible-lg" id="feed"><!-- Start Right content -->
<?php
loadModule('patient_menu');
?>
</div><!--/col /Right Content-->
</div><!--/row-->
示例14: exit
<?php
if (!defined('ROOT')) {
exit('No direct script access allowed');
}
loadModule("markitup");
loadMarkitupEditor("guides");
?>
<style>
textarea.markItUpEditor {
width: 100%;min-height: 300px;
}
.markItUpHeader ul li {
width: 20px;
height: 20px;
margin-top: -1px;
}
</style>
<script>
function initBaseEditor() {
$('#guide_txt').markItUp(mySettings);
}
</script>
示例15: _loadPackage
/**
* ローカル関数:指定されたパッケージのロード処理
* ※ただ手続きだと見難いので関数化しただけ
*/
function _loadPackage($pkgConfXMLPath, &$pkgConfXML)
{
if (is_array($pkgConfXMLPath)) {
if (count($pkgConfXMLPath) > 0) {
// 再帰処理
foreach ($pkgConfXMLPath as $key => $path) {
_loadPackage($path, $pkgConfXML);
}
}
} else {
if (file_exists($pkgConfXMLPath)) {
if (NULL === $pkgConfXML) {
// 配列に初期化
$pkgConfXML = array();
}
// XXX 新しいパッケージは常に配列の先頭に!
array_unshift($pkgConfXML, array('time' => filemtime($pkgConfXMLPath), 'dom' => simplexml_load_file($pkgConfXMLPath, NULL, LIBXML_NOCDATA)));
// defaulのauto節を処理する
if (count($pkgConfXML[0]['dom']->default->auto) > 0) {
foreach ($pkgConfXML[0]['dom']->default->auto->children() as $autoLoadModule) {
loadModule($autoLoadModule);
}
}
}
}
}