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;
}
Example #2
0
 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));
     }
 }
Example #3
0
 function __construct()
 {
     parent::__construct();
     __extends($this);
     $this->module = get_modules('filter_namespace', 'pages_editor');
     $this->_before_boot();
 }
Example #4
0
 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' );
 }
Example #5
0
 public function __construct($data)
 {
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     parent::__construct();
     __extends($this);
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     $this->load->library('gui');
     $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');
     $this->news = new blogster_library($this->data);
     set_core_vars('news', $this->news);
     $this->data['news'] =& $this->news;
     // Deprecated
     $this->read_slug = 'read';
     $this->options = get_meta('blogster_settings');
     set_core_vars('blogster_settings', $this->options);
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     $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'] . '/';
     /*
     	Intégration de la librarie FILE MANAGER : Gestionnaire des fichiers médias.
     */
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     $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
     }
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 }
 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;
 }
 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;
 }
Example #8
0
 public function __construct()
 {
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     parent::__construct();
     __extends($this);
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     $this->module = get_modules('filter_namespace', 'blogster');
     $this->data = array();
     $this->instance = get_instance();
     $this->user =& $this->users_global;
     $this->mod_repo = MODULES_DIR . $this->module['encrypted_dir'] . '/';
     // Post les articles programmés.
     $this->postScheduledArt();
 }
Example #9
0
 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();
     }
 }
Example #10
0
 function __construct()
 {
     // Saving Theme Settings
     $active_theme = get_core_vars('active_theme');
     if (riake('namespace', $active_theme)) {
         $settings = get_meta($active_theme['namespace'] . '_theme_settings');
         if ($settings) {
             push_core_vars('active_theme', 'theme_settings', $settings);
         }
     }
     $this->module = get_modules('filter_namespace', 'tim');
     if (is_admin()) {
         $this->menu = new Menu();
         $this->menu = new Menu();
         $this->menu->add_admin_menu_core('themes', array('title' => __('Theme Options'), 'icon' => 'fa fa-columns', 'href' => get_instance()->url->site_url(array('admin', 'open', 'modules', $this->module['namespace']))));
     }
 }
Example #11
0
 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'];
 }
Example #12
0
 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;
     }
 }
Example #13
0
<?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]);
		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(){
Example #15
0
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;
}
Example #16
0
<?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);
Example #17
0
   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) {
Example #18
0
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;
    }
}
Example #19
0
                                        widget-name="<?php 
        echo $f['WIDGET_NAME'];
        ?>
">
                                        <header class="panel-heading text-center">
                                            <ul class="nav nav-pills pull-right">
                                                <li><a class="panel-toggle text-muted" add_widget href="javascript:void(0)"><i class="fa fa-share"></i></a></li>
                                            </ul>
                                            <ul class="toggle-section nav nav-pills pull-left"></ul>
                                            <?php 
        echo $f['WIDGET_NAME'];
        ?>
                                        </header>
                                        <?php 
        if (array_key_exists('WIDGET_MORE', $f)) {
            $cur_module = get_modules('filter_active_namespace', $f['MODULE_NAMESPACE']);
            if ($cur_module) {
                $module_dir = MODULES_DIR . $cur_module['encrypted_dir'];
                if (is_file($module_dir . $f['WIDGET_MORE'])) {
                    include_once $module_dir . $f['WIDGET_MORE'];
                    if (class_exists($f['WIDGET_NAMESPACE'] . '_' . $f['MODULE_NAMESPACE'] . '_moreClass')) {
                        eval('$WMORE = new ' . $f['WIDGET_NAMESPACE'] . '_' . $f['MODULE_NAMESPACE'] . '_moreClass;');
                        $hidden_content = $WMORE->get();
                        ?>
                                                        <div widget-hidden_content style="display:none">
                                                            <?php 
                        echo $hidden_content;
                        ?>
                                                        </div>
                                                        <?php 
                    }
Example #20
0
function get_role_rights($role_id)
{
    $modules = get_modules();
    $module_rights = db::get_single_values_array("SELECT module_id FROM " . TABLE_ROLES_TO_MODULES . " WHERE role_id = " . $role_id);
    $submodule_rights = db::get_single_values_array("SELECT submodule_id FROM " . TABLE_ROLES_TO_SUBMODULES . " WHERE role_id = " . $role_id);
    $command_rights = db::get_single_values_array("SELECT command_id FROM " . TABLE_ROLES_TO_COMMANDS . " WHERE role_id = " . $role_id);
    $column_rights = db::get_single_values_array("SELECT column_id FROM " . TABLE_ROLES_TO_COLUMNS . " WHERE role_id = " . $role_id);
    $result = array();
    $result[] = '<table style="width: 100%;">';
    if (count($modules)) {
        foreach ($modules as $module_id => $module_name) {
            $result[] = '<tr style="background-color: #d3d3d3;">';
            $result[] = '<td style="width: 100px;">';
            $result[] = '<i>модуль</i>';
            $result[] = '</td>';
            $result[] = '<td colspan="100">';
            //      $result[] = '<div class="module">';
            $result[] = '<div class="module_name"><label for="module[' . $module_id . ']">' . $module_name . '</label></div>';
            $result[] = '<input type="checkbox" ' . (in_array($module_id, $module_rights) ? 'checked="checked"' : '') . ' name="module[' . $module_id . ']" class="module_checkbox" id="module[' . $module_id . ']">';
            $result[] = '</td>';
            //      $result[] = '<div class="clear"></div>';
            $result[] = '</tr>';
            $submodules = get_submodules($module_id);
            if (count($submodules)) {
                foreach ($submodules as $submodule_id => $submodule_name) {
                    $result[] = '<tr>';
                    $result[] = '<td>';
                    $result[] = '</td>';
                    $result[] = '<td style="width: 100px;">';
                    $result[] = '<i>подмодуль</i>';
                    $result[] = '</td>';
                    $result[] = '<td colspan="2">';
                    //          $result[] = '<div class="submodule">';
                    $result[] = '<div class="submodule_name"><label for="submodule[' . $submodule_id . ']">' . $submodule_name . '</label></div>';
                    $result[] = '<input type="checkbox" ' . (in_array($submodule_id, $submodule_rights) ? 'checked="checked"' : '') . ' name="submodule[' . $submodule_id . ']" class="submodule_checkbox" id="submodule[' . $submodule_id . ']">';
                    //          $result[] = '</div>';
                    $result[] = '</tr>';
                    $commands = get_commands($submodule_id);
                    if (count($commands)) {
                        $result[] = '<tr>';
                        $result[] = '<td>';
                        $result[] = '</td>';
                        $result[] = '<td>';
                        $result[] = '</td>';
                        $result[] = '<td style="width: 100px;">';
                        $result[] = '<i>команды</i>';
                        $result[] = '</td>';
                        $result[] = '<td>';
                        foreach ($commands as $command_id => $command_name) {
                            $result[] = '<div class="command_wrap">';
                            $result[] = '<div class="command_name"><label for="command[' . $command_id . ']">' . $command_name . '</label></div>';
                            $result[] = '<input type="checkbox" ' . (in_array($command_id, $command_rights) ? 'checked="checked"' : '') . ' name="command[' . $command_id . ']" class="command_checkbox" id="command[' . $command_id . ']">';
                            $result[] = '</div>';
                        }
                        $result[] = '</td>';
                        $result[] = '</tr>';
                    }
                    $columns = get_columns($submodule_id);
                    if (count($columns)) {
                        $result[] = '<tr style="background-color: lightCyan;">';
                        $result[] = '<td>';
                        $result[] = '</td>';
                        $result[] = '<td>';
                        $result[] = '</td>';
                        $result[] = '<td style="width: 100px;">';
                        $result[] = '<i>колонки</i>';
                        $result[] = '</td>';
                        $result[] = '<td>';
                        foreach ($columns as $column_id => $column_name) {
                            $result[] = '<div class="column_wrap">';
                            $result[] = '<div class="column_name"><label for="column[' . $column_id . ']">' . $column_name . '</label></div>';
                            $result[] = '<input type="checkbox" ' . (in_array($column_id, $column_rights) ? 'checked="checked"' : '') . ' name="column[' . $column_id . ']" class="column_checkbox" id="column[' . $column_id . ']">';
                            $result[] = '</div>';
                        }
                        $result[] = '</td>';
                        $result[] = '</tr>';
                    }
                    $result[] = '</td>';
                }
                //        $result[] = '</tr>';
            }
            //      $result[] = '</div>';
            //      $result[] = '</tr>';
            //      $result[] = '<div class="clear"></div>';
        }
    }
    $result[] = '</table>';
    return join($result, "\n");
}
Example #21
0
    @media (max-width: 767px) {
        .otab {
            padding-left: 10px;
        }
    }

    .payment-tab.active {
        background-color: #111;
        border-color: #111;
        color: white;
    }
</style>
<?php 
$here = dirname(__FILE__) . DS . 'gateways' . DS;
$payment_modules = get_modules('type=payment_gateway');
?>

<div class="mw-ui-row">
    <div class="mw-ui-col">
        <div class="mw-ui-col-container">
            <div class="mw-set-payment-options">
                <div
                    style="overflow: hidden;position: relative;padding: 30px 0 0;">
                    <div class="mw-ui-btn-nav"><a
                            class="mw-ui-btn payment-tab active"
                            href="javascript:;">
                            <?php 
_e("Payments");
?>
                        </a>  <a class="mw-ui-btn payment-tab"
 public function app_step($step)
 {
     $this->load->library('tendoo');
     // Refreshing Tendoo Clss
     $this->load->library('tendoo_admin');
     // loading Admin Class
     $this->load->library('roles');
     // loading Admin Class
     // Base config, creating tables and saving firt name
     if ($step == 1) {
         // Working 100%
         if ($this->createTables() && get_instance()->meta_datas->set('site_name', $this->input->post('site_name'), 'from_install_interface', 'system')) {
             // Get all module and exec sql queries
             load_modules();
             $modules = get_modules('all');
             if ($modules) {
                 foreach ($modules as $namespace => $app_datas) {
                     // Activate module
                     active_module($namespace);
                     // Executing Sql queries
                     if (is_array($queries = riake('sql_queries', $app_datas))) {
                         foreach ($queries as $sql_line) {
                             get_db('from_install_interface')->query($sql_line);
                         }
                     }
                     // Registering Actions : Deprecated
                     /**
                     						if( is_array( $actions	=	riake ( 'declared_actions' , $app_datas ) ) ){
                     							foreach( $actions  as $_action ){
                     								if( $this->tendoo_admin->_action_keys_is_allowed( array_keys( $_action ) ) ){
                     									foreach( $_action as $key => $value ){
                     										$$key	=	$value;
                     									}
                     									$this->tendoo_admin->createModuleAction($mod_namespace,$action,$action_name,$action_description);
                     								}
                     							}
                     						}
                     						**/
                 }
             }
             // Get unique available theme
             load_themes();
             $themes = get_themes('all');
             // Creating Config File
             $this->createConfigFile();
             // Setting Logo URL
             get_instance()->meta_datas->set('site_logo', img_url('start_logo.png'));
             // Creating Controllers
             // Home
             $this->tendoo_admin->controller("Accueil", "home", "tim", "Accueil - " . get_meta('site_name'), "Un site Web utilisant Tendoo.", "TRUE", $obj = 'create', $id = '', $visible = 'TRUE', $childOf = 'none', $page_link = '', $keywords = 'tendoo, cms');
             // Blog
             $this->tendoo_admin->controller("Blog", "blog", "blogster", "Blog - " . get_meta('site_name'), "Un site Web utilisant Tendoo.", "FALSE", $obj = 'create', $id = '', $visible = 'TRUE', $childOf = 'none', $page_link = '', $keywords = 'tendoo, cms, blog');
             // Static
             $this->tendoo_admin->controller("Nouvelle page", "nouvelle-page", "pages_editor", "Nouvelle page", "Un site Web utilisant Tendoo.", "FALSE", $obj = 'create', $id = '', $visible = 'TRUE', $childOf = 'none', $page_link = '', $keywords = 'tendoo, cms, new page');
             // Setting Theme Config
             get_instance()->meta_datas->set('flaty_theme_settings', '{"slider":{"api_limit":"10","declared_apis":"blogster_get_blog_post","declared_item":"slider"},"testimony":{"testimony_big_title":"Tendoo is also","testimony_big_description":"Many features, more themes and a growing community. Why should you use Tendoo ?","testimony_content":{"level":{"0":"I find this project more accomplished.","1":"i wasn\'t expecting such result with huge work done by contributors.","2":"I hope this project will keep going ahead. I\'m about to contribute as i can, with issues submission.","3":"We worked hard to reach this result, and we\'re proud. We intend to offer a real free web application for both web site and web applications."}},"testimony_authors":{"level":{"0":"B. Jersyer","1":"Afromaster","2":"Lucas Ferry","3":"Sergey Rakovsky"}}},"list_services":{"section_text":"","section_textarea":"","title":{"level":{"0":"Follow us on Facebook","1":"Follow us on Twitter","2":"Google+"}},"link":{"level":{"0":"http:\\/\\/facebook.com\\/tendoocms","1":"http:\\/\\/twitter.com\\/","2":"http:\\/\\/plus.google.com"}},"description":{"level":{"0":"All news and updates details are available on facebook, the official website and sourceforge.","1":"We are also on Twitter. Don\'t miss our tweets..","2":"Don\'t miss our Google+ updates. Add us to your circles."}},"icons":{"level":{"0":"facebook","1":"twitter","2":"google-plus"}}}}');
             // Eva theme settings
             get_instance()->meta_datas->set('eva_theme_settings', '{"contact_datas":{"contact_description_title":"A propos de nous","contact_description_content":"Tendoo est un logiciel Open-Source disponible sur <a href=\\"http:\\/\\/github.com\\/Blair2004\\/tendoo-cms\\">github<\\/a> et t\\u00e9l\\u00e9chargeable gratuitement. Nous esp\\u00e9rons qu\'il saura vous s\\u00e9duire, mais surtout nous sommes en attente de vos avis. N\'h\\u00e9sitez pas \\u00e0 \\"Fork\\" le repertoire.","contact_details_title":"Contactez-nous","contact_details_content":"Suivez nos actualit\\u00e9s sur les r\\u00e9seaux sociaux ou sur <a href=\\"http:\\/\\/tendoo.org\\">tendoo.org<\\/a>.","social_feeds_icon":{"level":{"0":"map-marker","1":"envelope"}},"social_feeds_title":{"level":{"0":"Adresse","1":"Mail"}},"social_feeds_value":{"level":{"0":"World, Earth","1":"*****@*****.**"}}},"theme_color_and_style":{"background":"red","box_style":"fullwidth","bg_image":"black_mamba"},"social_feeds":{"social_links":{"level":{"0":"https:\\/\\/www.facebook.com\\/tendoocms"}},"social_icons":{"level":{"0":"facebook"}}},"list_services":{"title":{"level":{"0":"Plusieurs fonctionnalit\\u00e9s","1":"Une performance am\\u00e9lior\\u00e9","2":"Devenir un contributeur","3":"Administration","4":"Statistiques & Utilisateurs","5":"Suivez-nous sur Facebook"}},"link":{"level":{"0":"#","1":"#","2":"http:\\/\\/github.com\\/Blair2004\\/tendoo-cms","3":"#","4":"#","5":"https:\\/\\/www.facebook.com\\/tendoocms"}},"description":{"level":{"0":"La version 1.3 de Tendoo propose plusieurs fonctionnalit\\u00e9s. C\'est assur\\u00e9ment la version la plus stable de Tendoo. Avec un code revisit\\u00e9 et corrig\\u00e9.","1":"Le syst\\u00e8me a \\u00e9t\\u00e9 modifi\\u00e9. La gestion des th\\u00e8mes et des modules \\u00e0 \\u00e9t\\u00e9 am\\u00e9lior\\u00e9, ainsi que leur gestion. D\\u00e9couvrez des th\\u00e8mes beaucoup plus beau mais surtout \\"Responsive\\".","2":"Tendoo est un logiciel gratuit disponible sur Github. Vous pouvez apporter votre contribution comme vous le souhaitez depuis le r\\u00e9pertoire officiel. \\"Forkez-nous\\" sur Gihub.","3":"D\\u00e9couvrez un panneau d\'administration pas comme les autres. Avec des zones de widgets personnalisables, qui peuvent \\u00eatre administr\\u00e9s depuis les param\\u00e8tres.","4":"Tendoo mets des outils d\'analyse et de statistiques \\u00e0 la disposition de ses utilisateurs. Am\\u00e9liorer votre strat\\u00e9gie en fonction de vos performances.","5":"Suivez nos actualit\\u00e9s directement sur Facebook et ne manquez pas \\u00e0 l\'occasion de donner votre avis. Vous resterez connect\\u00e9 aux nouveaut\\u00e9s sur Tendoo."}},"icons":{"level":{"0":"gift","1":"thumbs-o-up","2":"github-alt","3":"home","4":"group","5":"facebook"}}},"recents_works":{"title":{"level":{"0":"Ceci est un projet de feu","1":"Cold Bold","2":"","3":"","4":"","5":"Dark Cat","6":"Children"}},"category":{"level":{"0":"Fire Bold","1":"une cat\\u00e9gorie","2":"","3":"","4":"","5":"Dark Cat","6":"Les enfants"}},"full_image":{"level":{"0":"http:\\/\\/127.0.0.1\\/tendoo-cms\\/tendoo-modules\\/app_tendoo_contents_620140902154910PqALJ6NSaBKqWW53ryP1t\\/content_repository\\/tendoo_content_5201409062005303213383.jpg","1":"http:\\/\\/127.0.0.1\\/tendoo-cms\\/tendoo-modules\\/app_tendoo_contents_620140902154910PqALJ6NSaBKqWW53ryP1t\\/content_repository\\/tendoo_content_5201409062005303213383.jpg","2":"http:\\/\\/127.0.0.1\\/tendoo-cms\\/tendoo-modules\\/app_tendoo_contents_620140902154910PqALJ6NSaBKqWW53ryP1t\\/content_repository\\/tendoo_content_5201409062005303213383.jpg","3":"http:\\/\\/127.0.0.1\\/tendoo-cms\\/tendoo-modules\\/app_tendoo_contents_620140902154910PqALJ6NSaBKqWW53ryP1t\\/content_repository\\/tendoo_content_5201409062005303213383.jpg","4":"http:\\/\\/127.0.0.1\\/tendoo-cms\\/tendoo-modules\\/app_tendoo_contents_620140902154910PqALJ6NSaBKqWW53ryP1t\\/content_repository\\/tendoo_content_5201409062005303213383.jpg","5":"http:\\/\\/127.0.0.1\\/tendoo-cms\\/tendoo-modules\\/app_tendoo_contents_620140902154910PqALJ6NSaBKqWW53ryP1t\\/content_repository\\/tendoo_content_5201409062005303213383.jpg","6":"http:\\/\\/127.0.0.1\\/tendoo-cms\\/tendoo-modules\\/app_tendoo_contents_620140902154910PqALJ6NSaBKqWW53ryP1t\\/content_repository\\/tendoo_content_5201409062005303213383.jpg"}},"thumb_image":{"level":{"0":"http:\\/\\/127.0.0.1\\/tendoo-cms\\/tendoo-modules\\/app_tendoo_contents_620140902154910PqALJ6NSaBKqWW53ryP1t\\/content_repository\\/tendoo_content_5201409062005303213383.jpg","1":"http:\\/\\/127.0.0.1\\/tendoo-cms\\/tendoo-modules\\/app_tendoo_contents_620140902154910PqALJ6NSaBKqWW53ryP1t\\/content_repository\\/tendoo_content_5201409062005303213383.jpg","2":"http:\\/\\/127.0.0.1\\/tendoo-cms\\/tendoo-modules\\/app_tendoo_contents_620140902154910PqALJ6NSaBKqWW53ryP1t\\/content_repository\\/tendoo_content_5201409062005303213383.jpg","3":"http:\\/\\/127.0.0.1\\/tendoo-cms\\/tendoo-modules\\/app_tendoo_contents_620140902154910PqALJ6NSaBKqWW53ryP1t\\/content_repository\\/tendoo_content_5201409062005303213383.jpg","4":"http:\\/\\/127.0.0.1\\/tendoo-cms\\/tendoo-modules\\/app_tendoo_contents_620140902154910PqALJ6NSaBKqWW53ryP1t\\/content_repository\\/tendoo_content_5201409062005303213383.jpg","5":"http:\\/\\/127.0.0.1\\/tendoo-cms\\/tendoo-modules\\/app_tendoo_contents_620140902154910PqALJ6NSaBKqWW53ryP1t\\/content_repository\\/tendoo_content_5201409062005303213383.jpg","6":"http:\\/\\/127.0.0.1\\/tendoo-cms\\/tendoo-modules\\/app_tendoo_contents_620140902154910PqALJ6NSaBKqWW53ryP1t\\/content_repository\\/tendoo_content_5201409062005303213383.jpg"}},"link":{"level":{"0":"#","1":"#","2":"","3":"","4":"","5":"#","6":"#Les enfants"}},"global_title":"Nos projets"},"feature_list":{"feature_list_title":"Quoi de neuf avec Tendoo 1.3","feature_list_description":"D\\u00e9couvrez une version beaucoup plus stable que les pr\\u00e9c\\u00e9dentes. Nous avons longuement travailler pour proposer une application \\u00e9pur\\u00e9 et simple \\u00e0 prendre en main, avec 3 th\\u00e8mes disponibles par d\\u00e9faut. Tendoo c\'est \\u00e9galement.","feature_list_loop_title":{"level":{"0":"Une application web robuste","1":"Un CMS pas comme les autres","2":"Plein de fonctionnalit\\u00e9 et de services"}},"feature_list_loop_link":{"level":{"0":"#","1":"#","2":"#"}},"icons":{"level":{"0":"thumbs-o-up","1":"rocket","2":"gift"}}},"testimonials":{"feature_list_title":"Nos t\\u00e9moignages","testimonial_author":{"level":{"0":"John Doe","1":"Sacha"}},"testimonial_author_subinfo":{"level":{"0":"Proceder","1":"Reviewer"}},"testimonial_author_img":{"level":{"0":"http:\\/\\/127.0.0.1\\/tendoo-cms\\/tendoo-modules\\/app_tendoo_contents_620140902154910PqALJ6NSaBKqWW53ryP1t\\/content_repository\\/tendoo_content_5201409062004228196593.jpg","1":"http:\\/\\/127.0.0.1\\/tendoo-cms\\/tendoo-modules\\/app_tendoo_contents_620140902154910PqALJ6NSaBKqWW53ryP1t\\/content_repository\\/tendoo_content_5201409062005303213383.jpg"}},"testimonial_author_content":{"level":{"0":"Lorem ipsum dolor sit amet, cons adipiscing elit. Aenean commodo ligula eget dolor. Cum sociis natoque penatibus mag dis parturient. Lorem ipsum dolor sit amet, cons adipiscing elit. Aenean commodo ligula eget dolor. Cum sociis natoque penatibus mag dis parturient.","1":"Lorem ipsum dolor sit amet, cons adipiscing elit. Aenean commodo ligula eget dolor. Cum sociis natoque penatibus mag dis parturient. Lorem ipsum dolor sit amet, cons adipiscing elit. Aenean commodo ligula eget dolor. Cum sociis natoque penatibus mag dis parturient.Lorem ipsum dolor sit amet, cons adipiscing elit. Aenean commodo ligula eget dolor. Cum sociis natoque penatibus mag dis parturient."}},"testimonials_title":"Nos t\\u00e9moignages"},"promo_box":{"promo_title":"D\\u00e9couvrez Tendoo 1.3","promo_description":"D\\u00e9couvrez une version beaucoup plus stable de tendoo 1.3, avec de nouveaux outils et de nouvelles fonctionnalit\\u00e9s.","promo_icon":"archive","promo_button_text":"T\\u00e9l\\u00e9charger Tendoo","promo_button_link":"https:\\/\\/github.com\\/Blair2004\\/tendoo-cms\\/releases","promo_visibility":"1"},"fraction_slider":{"slider_namespaces":"item1, item2","slider_anims":"fade, fade","item_slide_id":{"level":{"0":"item1","1":"item1","2":"item2","3":"item2","4":"item2","5":"item2"}},"item_position":{"level":{"0":"180,800","1":"50,485","2":"0,0","3":"150,100","4":"50,750","5":"200,100"}},"item_anim_start":{"level":{"0":"fade"}},"item_anim_end":{"level":{"0":""}},"item_anim_ease":{"level":{"0":"linear","1":"linear"}},"item_anim_delay":{"level":{"0":"0","1":"","2":"","3":"2000","4":"0","5":"1000"}},"item_anim_speed":{"level":{"0":"","1":"","2":"","3":"","4":"","5":""}},"item_anim_dim":{"level":{"0":""}},"item_anim_type":{"level":{"0":"p"}},"item_anim_fixed":{"level":{"0":"fixed","1":"animated","2":"animated","3":"animated","4":"animated","5":"animated"}},"item_anim_start_type":{"level":{"0":"bottom","1":"top","2":"fade","3":"right","4":"top","5":"right"}},"item_anim_end_type":{"level":{"0":"bottom","1":"top","2":"fade","3":"left","4":"top","5":"left"}},"item_anim_ease_in":{"level":{"0":"easeInOutCubic","1":"easeInOutCubic","2":"linear","3":"","4":"","5":""}},"item_anim_ease_out":{"level":{"0":"","1":"","2":"linear","3":"","4":"","5":""}},"item_dim":{"level":{"0":"","1":"","2":"2000x750","3":"","4":"","5":""}},"item_type":{"level":{"0":"img","1":"p","2":"img","3":"p","4":"p","5":"p"}},"item_content":{"level":{"0":"http:\\/\\/127.0.0.1\\/tendoo-cms\\/tendoo-assets\\/img\\/tendoo_darken.png","1":"Bienvenue sur Tendoo CMS","2":"http:\\/\\/127.0.0.1\\/tendoo-cms\\/tendoo-assets\\/eve-theme-images\\/2.jpg","3":"Simple et facile \\u00e0 utiliser","4":"Ses atouts","5":"Rapide et Puissant"}},"item_class":{"level":{"0":"","1":"para-new","2":"","3":"teaser turky small","4":"claim light-pink","5":"teaser turky small"}},"item_css_style":{"level":{"0":"","1":"","2":"","3":"","4":"","5":""}},"display_slider":"0","item_step":{"level":{"0":"","1":"","2":"","3":"","4":"","5":""}},"item_anim_time":{"level":{"0":"","1":"","2":"","3":"","4":"","5":""}}},"header_datas":{"header_text":{"level":{"0":"*****@*****.**"}},"header_icon":{"level":{"0":"envelope"}}},"footer_social_feeds":{"social_links":{"level":{"0":"https:\\/\\/www.facebook.com\\/tendoocms"}},"social_icons":{"level":{"0":"facebook"}}},"contact_get_social":{"get_social_title":"Suivez-nous","social_links":{"level":{"0":"https:\\/\\/www.facebook.com\\/tendoocms"}},"social_icons":{"level":{"0":"facebook"}}},"contact_gmap_data":{"gmap_longitude":"2.3522219","gmap_latitude":"48.8566140"}}');
             // Creating Base Roles
             $this->roles->create(__('Administrator'), '', 0);
             $this->roles->create(__('User'), '', 0);
             if ($themes) {
                 foreach ($themes as $namespace => $app_datas) {
                     // Activate module
                     if ($namespace == 'eva') {
                         active_theme($namespace);
                     }
                     // Executing Sql queries
                     if (is_array($queries = riake('sql_queries', $app_datas))) {
                         foreach ($queries as $sql_line) {
                             get_db('from_install_interface')->query($sql_line);
                         }
                     }
                 }
             }
             return json_encode(array('response' => translate("Installation is now complete. We're taking you to your new website. <br>Thank you for using Tendoo CMS..."), 'type' => 'warning', 'step' => 2, 'progress' => 100));
         } else {
             return json_encode(array('response' => translate('Error occurred during tables creation. Please check out the server configuration, and try again.'), 'type' => 'warning', 'step' => 0, 'progress' => 0));
         }
     }
     return json_encode(array('response' => translate('Unknow install step, please try again.'), 'type' => 'warning'));
 }
function checkModuleActive($module)
{
    global $adb, $log;
    $isactive = false;
    $modules = get_modules(true);
    foreach ($modules as $key => $value) {
        if (strcmp($module, $value) == 0) {
            $isactive = true;
            break;
        }
    }
    return $isactive;
}
Example #24
0
<style type="text/css">
.anchor { 
  display: block; 
  content: " "; 
  margin-top: -80px;   
  position: absolute;
  visibility: hidden;

}
</style>

<div class='span9'>
	<h1>Uninstalled Modules</h1>
	<?php 
$modules = get_modules(null, UNINSTALLED);
$module_basepath = get_module_basepath();
echo '<ul class="nav nav-pills">';
foreach ($modules as $module) {
    if (stristr($module, '/')) {
        $module = explode('/', $module);
        $module = $module[1];
    }
    echo "<li ><a href='#{$module}'>{$module}</a></li>";
}
echo '</ul>';
foreach ($modules as $module) {
    //echo "$module";
    echo "<a class='anchor' id='{$module}'>{$module}</a><div class='well'>";
    include $module_basepath . '/' . $module . '/tabs/home.php';
    echo "</div>";
}
<?php

$MODULE = get_modules('filter_namespace', 'blogster');
if (is_file($file = $MODULE['uri_path'] . '/library.php')) {
    include_once $file;
}
if (class_exists('blogster_library')) {
    $BLIB = new blogster_library();
    $COMMENTS = $BLIB->getComments(0, 5);
    ?>
	<div class="panel">
		<div class="panel-heading <?php 
    echo theme_class();
    ?>
"><?php 
    _e('Recents Comments');
    ?>
</div>
		<?php 
    if ($COMMENTS) {
        foreach ($COMMENTS as $C) {
            $ARTICLE = $BLIB->getSpeNews($C['REF_ART']);
            $timespan = get_instance()->date->timespan($C['DATE']);
            if ($C['OFFLINE_AUTEUR'] != '') {
                ?>
		<div class="panel-body">
			<div class="clearfix m-b"> <small class="text-muted pull-right"><?php 
                echo $timespan;
                ?>
</small> <a href="#" class="thumb-sm pull-left m-r"> <img src="<?php 
                echo img_url('avatar_default.jpg');
Example #26
0
 public function before_frontend()
 {
     $this->instance = get_instance();
     $this->data = array();
     $this->tendoo =& $this->instance->tendoo;
     module_include('library.php', 'tendoo_widget_administrator');
     $this->lib = new widhandler_common($this->data);
     $this->data['widgetHandler'] =& $this->lib;
     $this->data['getRightWidget'] = $this->lib->getWidgets('RIGHT');
     // var_dump($this->data['getRightWidget']);
     foreach ($this->data['getRightWidget'] as $w) {
         // Get System Widget
         if (strtolower($w['WIDGET_MODNAMESPACE']) == 'system') {
             if ($w['WIDGET_NAMESPACE'] == 'texte') {
                 set_widget("right", $w['WIDGET_TITLE'], $w['WIDGET_PARAMETERS'], "text");
             }
         } else {
             $module = get_modules('filter_active_namespace', $w['WIDGET_MODNAMESPACE']);
             $configFile = MODULES_DIR . $module['encrypted_dir'] . '/config/widget_config.php';
             $path = MODULES_DIR . $module['encrypted_dir'] . '/';
             // Chemin d'accès
             if (is_file($configFile)) {
                 include_once $configFile;
                 // Intégration des fichiers testé
                 if (array_key_exists($w['WIDGET_NAMESPACE'], $WIDGET_CONFIG)) {
                     $WIDGET_CONFIG[$w['WIDGET_NAMESPACE']]['WIDGET_MODULE'] =& $module;
                     // AJoute le module concerné au widget
                     $WIDGET_CONFIG[$w['WIDGET_NAMESPACE']]['WIDGET_INFO'] =& $w;
                     // Ajoute les informations spécifies par l'utilisatuer
                     $this->data['currentWidget'] =& $WIDGET_CONFIG[$w['WIDGET_NAMESPACE']];
                     // Ajoute les informations sur widget au super tablea $this->data, qui sera utilisé plus tard.
                     $this->data['widgets']['requestedZone'] = 'RIGHT';
                     // Set Requested Zone
                     include_once $path . $WIDGET_CONFIG[$w['WIDGET_NAMESPACE']]['WIDGET_FILES'];
                     // Include widget controller;
                     $w_output = $this->instance->tendoo->interpreter($w['WIDGET_NAMESPACE'] . '_' . $w['WIDGET_MODNAMESPACE'] . '_common_widget', 'index', array(), $this->data);
                 }
             } else {
                 $this->instance->notice->push_notice('<strong>Une erreur s\'est produite durant le chargement des widgets');
             }
         }
     }
     // Bottom widgets
     $this->data['getBottomWidget'] = $this->lib->getWidgets('BOTTOM');
     // var_dump($this->data['getRightWidget']);
     foreach ($this->data['getBottomWidget'] as $w) {
         if (strtolower($w['WIDGET_MODNAMESPACE']) == 'system') {
             if ($w['WIDGET_NAMESPACE'] == 'texte') {
                 set_widget("bottom", $w['WIDGET_TITLE'], $w['WIDGET_PARAMETERS'], "text");
             }
         } else {
             $module = get_modules('filter_active_namespace', $w['WIDGET_MODNAMESPACE']);
             $configFile = MODULES_DIR . $module['encrypted_dir'] . '/config/widget_config.php';
             $path = MODULES_DIR . $module['encrypted_dir'] . '/';
             // Chemin d'accès
             if (is_file($configFile)) {
                 include_once $configFile;
                 // Intégration des fichiers testé
                 if (array_key_exists($w['WIDGET_NAMESPACE'], $WIDGET_CONFIG)) {
                     $WIDGET_CONFIG[$w['WIDGET_NAMESPACE']]['WIDGET_MODULE'] =& $module;
                     // AJoute le module concerné au widget
                     $WIDGET_CONFIG[$w['WIDGET_NAMESPACE']]['WIDGET_INFO'] =& $w;
                     // Ajoute les informations spécifies par l'utilisatuer
                     $this->data['currentWidget'] =& $WIDGET_CONFIG[$w['WIDGET_NAMESPACE']];
                     // Ajoute les informations sur widget au super tablea $this->data, qui sera utilisé plus tard.
                     $this->data['widgets']['requestedZone'] = 'BOTTOM';
                     // Set Requested Zone
                     include_once $path . $WIDGET_CONFIG[$w['WIDGET_NAMESPACE']]['WIDGET_FILES'];
                     // Include widget controller;
                     $w_output = $this->instance->tendoo->interpreter($w['WIDGET_NAMESPACE'] . '_' . $w['WIDGET_MODNAMESPACE'] . '_common_widget', 'index', array(), $this->data);
                 }
             } else {
                 $this->instance->notice->push_notice('<strong>Une erreur s\'est produite durant le chargement des widgets');
             }
         }
     }
     // End Bootom widgets
     $this->data['getLeftWidget'] = $this->lib->getWidgets('LEFT');
     foreach ($this->data['getLeftWidget'] as $w) {
         if (strtolower($w['WIDGET_MODNAMESPACE']) == 'system') {
             if ($w['WIDGET_NAMESPACE'] == 'texte') {
                 set_widget("left", $w['WIDGET_TITLE'], $w['WIDGET_PARAMETERS'], "text");
             }
         } else {
             $module = get_modules('filter_active_namespace', $w['WIDGET_MODNAMESPACE']);
             $configFile = MODULES_DIR . $module['encrypted_dir'] . '/config/widget_config.php';
             $path = MODULES_DIR . $module['encrypted_dir'] . '/';
             // Chemin d'accès
             if (is_file($configFile)) {
                 include_once $configFile;
                 // Intégration des fichiers testé
                 if (array_key_exists($w['WIDGET_NAMESPACE'], $WIDGET_CONFIG)) {
                     $WIDGET_CONFIG[$w['WIDGET_NAMESPACE']]['WIDGET_MODULE'] =& $module;
                     // AJoute le module concerné au widget
                     $WIDGET_CONFIG[$w['WIDGET_NAMESPACE']]['WIDGET_INFO'] =& $w;
                     // Ajoute les informations spécifies par l'utilisatuer
                     $this->data['currentWidget'] =& $WIDGET_CONFIG[$w['WIDGET_NAMESPACE']];
                     // Ajoute les informations sur widget au super tablea $this->data, qui sera utilisé plus tard.
                     $this->data['widgets']['requestedZone'] = 'LEFT';
                     // Set Requested Zone
                     include_once $path . $WIDGET_CONFIG[$w['WIDGET_NAMESPACE']]['WIDGET_FILES'];
                     // Include widget controller;
                     $w_output = $this->instance->tendoo->interpreter($w['WIDGET_NAMESPACE'] . '_' . $w['WIDGET_MODNAMESPACE'] . '_common_widget', 'index', array(), $this->data);
                 }
             } else {
                 $this->instance->notice->push_notice('<strong>Une erreur s\'est produite durant le chargement des widgets');
             }
         }
     }
 }
Example #27
0
 public function payment_options($option_key = false)
 {
     $option_key_q = '';
     if (is_string($option_key)) {
         $option_key_q = "&limit=1&option_key={$option_key}";
     }
     $providers = $this->app->option_manager->get_all('option_group=payments' . $option_key_q);
     $payment_modules = get_modules('type=payment_gateway');
     $str = 'payment_gw_';
     $l = strlen($str);
     $enabled_providers = array();
     if (!empty($payment_modules) and !empty($providers)) {
         foreach ($payment_modules as $payment_module) {
             foreach ($providers as $value) {
                 if ($value['option_value'] == 1) {
                     if (substr($value['option_key'], 0, $l) == $str) {
                         $title = substr($value['option_key'], $l);
                         $string = preg_replace('/(\\w+)([A-Z])/U', '\\1 \\2', $title);
                         $value['gw_file'] = $title;
                         if (isset($payment_module['module']) and $value['gw_file'] == $payment_module['module']) {
                             $payment_module['gw_file'] = $title;
                             $enabled_providers[] = $payment_module;
                         }
                     }
                 }
             }
         }
     }
     if (!empty($enabled_providers)) {
         return $enabled_providers;
     }
     // the rest is for comaptibily and will be removed in the near future
     $str = 'payment_gw_';
     $l = strlen($str);
     if (is_array($providers)) {
         $valid = array();
         foreach ($providers as $value) {
             if ($value['option_value'] == 1) {
                 if (substr($value['option_key'], 0, $l) == $str) {
                     $title = substr($value['option_key'], $l);
                     $string = preg_replace('/(\\w+)([A-Z])/U', '\\1 \\2', $title);
                     $value['gw_file'] = $title;
                     $mod_infp = $this->app->modules->get('ui=any&one=1&module=' . $title);
                     if (!empty($mod_infp)) {
                         $value = $mod_infp;
                         $title = str_replace('..', '', $title);
                         $value['gw_file'] = $title;
                         $valid[] = $value;
                     }
                 }
             }
         }
         return $valid;
     }
 }
Example #28
0
             break;
         }
     }
 }
 //Собственно, подключение выбранного Компонента
 if ($page) {
     if (isset($inc[$page])) {
         $path = 'inc/' . $inc[$page] . '/view.php';
         if (file_exists($path)) {
             require_once $path;
         }
     }
 }
 ## Подключаем Модули
 $mod_list = array();
 $mod_list = get_modules();
 // Ранжированный список активных модулей [lib.php]
 foreach ($mod_list as $module) {
     $path = 'mod/' . $module['name'] . '/view.php';
     if (file_exists($path)) {
         require_once $path;
     } else {
         $mod_shadow[] = $module['name'];
     }
 }
 ## Подключаем Шаблон
 $reg = Registry::instance();
 if ($reg->get('kill_theme') != true) {
     //если никто не убил Шаблон
     $theme = TE_DIR . '/themes/' . THEME . '/page.php';
     if (is_file($theme)) {
 public function get($page = NULL, $showHidden = TRUE, $getModuleData = TRUE, $getChild = TRUE)
 {
     if (in_array($page, array('', NULL))) {
         if ($showHidden == FALSE) {
             get_db()->where('PAGE_VISIBLE', 'TRUE');
         }
         get_db()->select('*')->where('PAGE_PARENT', 'none')->from('tendoo_controllers');
         $query = get_db()->get();
         $array = array();
         foreach ($query->result() as $obj) {
             if ($getModuleData == TRUE) {
                 $array[] = array('ID' => $obj->ID, 'PAGE_CNAME' => $obj->PAGE_CNAME, 'PAGE_PARENT' => $obj->PAGE_PARENT, 'PAGE_NAMES' => $obj->PAGE_NAMES, 'PAGE_MODULES' => $obj->PAGE_MODULES == '#LINK#' ? $obj->PAGE_MODULES : get_modules('filter_active_namespace', $obj->PAGE_MODULES), 'PAGE_TITLE' => $obj->PAGE_TITLE, 'PAGE_DESCRIPTION' => $obj->PAGE_DESCRIPTION, 'PAGE_MAIN' => $obj->PAGE_MAIN, 'PAGE_VISIBLE' => $obj->PAGE_VISIBLE, 'PAGE_CHILDS' => $this->get($obj->PAGE_CNAME, $showHidden, $getModuleData, $getChild), 'PAGE_LINK' => $obj->PAGE_LINK, 'PAGE_POSITION' => $obj->PAGE_POSITION, 'PAGE_KEYWORDS' => $obj->PAGE_KEYWORDS);
             } else {
                 $array[] = array('ID' => $obj->ID, 'PAGE_CNAME' => $obj->PAGE_CNAME, 'PAGE_PARENT' => $obj->PAGE_PARENT, 'PAGE_NAMES' => $obj->PAGE_NAMES, 'PAGE_MODULES' => $obj->PAGE_MODULES == '#LINK#' ? $obj->PAGE_MODULES : '#MODULE NOT LOADED', 'PAGE_TITLE' => $obj->PAGE_TITLE, 'PAGE_DESCRIPTION' => $obj->PAGE_DESCRIPTION, 'PAGE_MAIN' => $obj->PAGE_MAIN, 'PAGE_VISIBLE' => $obj->PAGE_VISIBLE, 'PAGE_CHILDS' => $this->get($obj->PAGE_CNAME, $showHidden, $getModuleData, $getChild), 'PAGE_LINK' => $obj->PAGE_LINK, 'PAGE_POSITION' => $obj->PAGE_POSITION, 'PAGE_KEYWORDS' => $obj->PAGE_KEYWORDS);
             }
         }
         $this->_gets = $array;
         return $array;
     } else {
         // If there is any content founded, $array will be overwrited.
         $array = FALSE;
         if ($showHidden == FALSE) {
             get_db()->where('PAGE_VISIBLE', 'TRUE');
         }
         if ($getChild == TRUE) {
             get_db()->where('PAGE_PARENT', $page)->from('tendoo_controllers');
             $query = get_db()->get();
             // var_dump($query);
         } else {
             get_db()->select('*')->from('tendoo_controllers')->where('PAGE_CNAME', $page);
             $query = get_db()->get();
         }
         if (count(get_object_vars($query)) > 0) {
             // var_dump($query->result());
             foreach ($query->result() as $obj) {
                 if ($getModuleData == TRUE) {
                     $array[] = array('ID' => $obj->ID, 'PAGE_CNAME' => $obj->PAGE_CNAME, 'PAGE_PARENT' => $obj->PAGE_PARENT, 'PAGE_NAMES' => $obj->PAGE_NAMES, 'PAGE_MODULES' => $obj->PAGE_MODULES == '#LINK#' ? $obj->PAGE_MODULES : get_modules('filter_active_namespace', $obj->PAGE_MODULES), 'PAGE_TITLE' => $obj->PAGE_TITLE, 'PAGE_DESCRIPTION' => $obj->PAGE_DESCRIPTION, 'PAGE_MAIN' => $obj->PAGE_MAIN, 'PAGE_VISIBLE' => $obj->PAGE_VISIBLE, 'PAGE_CHILDS' => $this->get($obj->PAGE_CNAME, $showHidden, $getModuleData, $getChild), 'PAGE_LINK' => $obj->PAGE_LINK, 'PAGE_POSITION' => $obj->PAGE_POSITION, 'PAGE_KEYWORDS' => $obj->PAGE_KEYWORDS);
                 } else {
                     $array[] = array('ID' => $obj->ID, 'PAGE_CNAME' => $obj->PAGE_CNAME, 'PAGE_PARENT' => $obj->PAGE_PARENT, 'PAGE_NAMES' => $obj->PAGE_NAMES, 'PAGE_MODULES' => $obj->PAGE_MODULES == '#LINK#' ? $obj->PAGE_MODULES : '#MODULE NOT LOADED', 'PAGE_TITLE' => $obj->PAGE_TITLE, 'PAGE_DESCRIPTION' => $obj->PAGE_DESCRIPTION, 'PAGE_MAIN' => $obj->PAGE_MAIN, 'PAGE_VISIBLE' => $obj->PAGE_VISIBLE, 'PAGE_CHILDS' => $this->get($obj->PAGE_CNAME, $showHidden, $getModuleData, $getChild), 'PAGE_LINK' => $obj->PAGE_LINK, 'PAGE_POSITION' => $obj->PAGE_POSITION, 'PAGE_KEYWORDS' => $obj->PAGE_KEYWORDS);
                 }
             }
             $this->_gets = $array;
         }
         return $array;
     }
 }
/**
 *	return a module view file
 * 	@access : public
 * 	@return : view or bool.
 **/
function module_view($path, $return = false, $module_namespace = null)
{
    // is a module is opened or a namespace is defined
    if ($module_namespace != null) {
        $module = get_modules('filter_namespace', $module_namespace);
    }
    if ($module = $module == FALSE ? get_core_vars('opened_module') : $module) {
        return get_instance()->load->the_view($module['uri_path'] . '/' . $path, $return, true);
    }
    return false;
}