function recovery_fields() { ob_start(); ?> <?php echo tendoo_info(__('Please provide your user email in order to get recovery email')); ?> <div class="input-group"> <span class="input-group-addon" id="basic-addon1"><?php _e('User email or Pseudo'); ?> </span> <input type="text" class="form-control" placeholder="<?php _e('User email or Pseudo'); ?> " aria-describedby="basic-addon1" name="user_email"> <span class="input-group-btn"> <button class="btn btn-default" type="submit"><?php _e('Get recovery Email'); ?> </button> </span> </div> <?php return ob_get_clean(); }
public function index($page = 1) { notice('push', tendoo_info(__('Page childs wont be available on frontend it that page is set as draft'))); if (isset($_POST['page_id']) && return_if_array_key_exists('action', $_POST) == 'delete') { if (is_array($_POST['page_id'])) { foreach ($_POST['page_id'] as $_page_id) { $this->lib->delete_page($_page_id); } notice(fetch_notice_output('done')); } } $totalPerPages = isset($_GET['limit']) ? $_GET['limit'] : 10; set_core_vars('totalPages', $totalPages = count($this->lib->get_pages('all_available'))); $paginate = pagination_helper($totalPerPages, $totalPages, $page, module_url(array('index')), $RedirectUrl = array('error', 'code', 'page-404')); set_core_vars('paginate', $paginate); $get_pages = $this->lib->get_pages('all_limited', $paginate['start'], $paginate['end']); set_core_vars('get_pages', $get_pages); set_page('title', __('Page Creator')); $this->load->view($this->opened_module['uri_path'] . 'views/main', $this->data, false, TRUE); }
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']; }
</p> </div> </div> </header> <section class="vbox stretch"> <section class="wrapper"> <?php echo output('notice'); ?> <?php echo fetch_notice_from_url(); ?> <?php echo validation_errors(); ?> <?php echo tendoo_info(__('Add a widget a sidebar. Some theme won\'t support all sidebar. Check your theme details for more informations.')); ?> <div class="row"> <div class="col-lg-4"> <section class="panel pos-rlt clearfix"> <header class="panel-heading"> <ul class="nav nav-pills pull-right"> <li> <a class="panel-toggle text-muted active" href="javascript:void(0)"> <i class="fa fa-caret-down text-active"></i> <i class="fa fa-caret-up text"></i> </a> </li> </ul> <?php _e('Available Widgets');
?> <div class="row"> <div class="col-lg-6"> <section class="panel"> <div class="panel-heading"><?php _e('Install new app'); ?> </div> <form method="post" class="panel-body" enctype="multipart/form-data"> <div class="form-group"> <p><?php _e(sprintf('Install new app. The install file must necessary be a zip file, and should be compatible with your current Tendoo Version : <strong>%s</strong>. Be safe, and install app from secure provider.', get('core_id'))); ?> <br /> <?php echo tendoo_info(__('Themes and modules can be installed through this interface.')); ?> </p> <label class="control-label"><?php _e('Choose your file'); ?> </label> <input name="installer_file" type="file" class="form-control"> </div> <input type="submit" class="btn btn-info" value="<?php _e('Start installation'); ?> " /> </form> </section> </div>
?> "><h3><img style="max-height:80px;margin-top:-3px;" src="<?php echo $this->instance->url->img_url("logo_4.png"); ?> "> </h3></a> <section class="wrapper"> <div class="row m-n"> <div class="col-md-4 col-md-offset-4 m-t-lg"> <section class="panel"> <header class="panel-heading text-center"> Language selection / Selection de la langue </header> <form method="POST" class="panel-body"> <?php echo tendoo_info('Veuillez choissir la langue de votre installation.'); ?> <?php echo tendoo_info('Please choose your install language.'); ?> <div class="form-group"> <label class="control-label">Choose your language / Choissisez votre langue</label> <select name="lang" class="form-control"> <option value="">Choose / Choisir</option> <option value="fr_FR">French / Français</option> <!-- <option value="en_US">English / Anglais</option>--> </select> </div> <div class="line line-dashed"></div> <button type="submit" class="btn btn-info">Save Changes / Enregistrer les modficiations</button> <div class="line line-dashed"></div> </form> </section> </div>
$lang['email-used'] = tendoo_error(__('This email is already used.')); $lang['email-already-taken'] = tendoo_error(__('This email seems to be already taken.')); $lang['username-already-taken'] = tendoo_error(__('This username seems to be already taken.')); $lang['user-created'] = tendoo_success(__('The user has been successfully created.')); $lang['account-activated'] = tendoo_success(__('Your Account has been activated. Please Sign-up')); // Recovery $lang['unknow-email'] = tendoo_error(__('Unknow email address')); $lang['recovery-email-send'] = tendoo_success(__('The recovery email has been send. Please check your email, open the recovery email and follow the instructions.')); // Logout $lang['logout-required'] = tendoo_info(__('You must logout first to access that page.')); // General $lang['new-password-created'] = tendoo_success(__('A new password has been created for your account. Check your email to get it.')); $lang['module-enabled'] = tendoo_success(__('The module has been enabled.')); $lang['module-disabled'] = tendoo_success(__('The module has been disabled.')); $lang['module-removed'] = tendoo_success(__('The module has been removed.')); $lang['module-extracted'] = tendoo_success(__('The module has been extracted.')); $lang['module-updated'] = tendoo_success(__('The module has been updated.')); $lang['old-version-cannot-be-installed'] = tendoo_error(__('The version installed is already up to date.')); $lang['unable-to-update'] = tendoo_error(__('An error occured during update.')); $lang['config-file-not-found'] = tendoo_error(__('Config file hasn\'t been found. This file is not a valid module. Installation aborded !!!')); // Extension $lang['fetch-from-upload'] = function () { $error = array('error' => get_instance()->upload->display_errors()); foreach ($error as $type => $_error) { if ($type == 'error') { echo tendoo_error(strip_tags($_error)); } else { echo tendoo_info(strip_tags($_error)); } } };
public function ajax($option, $x = '', $y = '', $z = '') { if ($option == 'setViewed') { $page = isset($_GET['page']) ? $_GET['page'] : ''; $this->users_global->setViewed($page); } if ($option == 'get_app_tab') { set_core_vars('appIconApi', $this->tendoo_admin->getAppIcon()); $this->load->view('admin/ajax/get_app_tab', $this->data); } else { if ($option == 'upController') { if ($this->users_global->isSuperAdmin() == FALSE && $this->tendoo_admin->adminAccess('system', 'gestpa', $this->users_global->current('REF_ROLE_ID')) == FALSE) { set_core_vars('type', 'danger'); set_core_vars('notice', notice('accessDenied')); $this->load->view('admin/ajax/notice', $this->data); } else { $this->tendoo_admin->upController($x); set_core_vars('type', 'success'); set_core_vars('notice', notice('done')); $this->load->view('admin/ajax/notice', $this->data); } } else { if ($option == 'store_connect') { $site_options = $this->instance->meta_datas->get(); if ((int) $site_options[0]['CONNECT_TO_STORE'] == 1) { $this->tendoo_update->store_connect(); } else { set_core_vars('type', 'wraning'); set_core_vars('notice', tendoo_info(translate('Unabled to reach store'))); $this->load->view('admin/ajax/notice', $this->data); } } else { if ($option == 'check_updates') { $this->tendoo_update->check(); } else { if ($option == 'toggleFirstVisit') { if (!$this->users_global->toggleFirstVisit()) { set_core_vars('type', 'danger'); set_core_vars('notice', notice('accessDenied')); $this->load->view('admin/ajax/notice', $this->data); } else { $this->load->view('admin/ajax/done', $this->data); } } else { if ($option == 'toogleStoreAccess') { if (!$this->users_global->isSuperAdmin()) { set_core_vars('type', 'danger'); set_core_vars('notice', notice('accessDenied')); $this->load->view('admin/ajax/notice', $this->data); } else { $this->tendoo_admin->toogleStoreConnexion(); $this->load->view('admin/ajax/done', $this->data); } } else { if ($option == 'restorePagesVisits') { // Restaure le statut de visite des pages. if ($this->users_global->restorePagesVisit()) { echo json_encode(array('status' => 'success', 'message' => translate('Pages status has been restored. Introducing tour is now active'), 'alertType' => 'notice', 'response' => '')); } } else { if ($option == 'sm_manual') { if ($this->users_global->isSuperAdmin() == FALSE && $this->tendoo_admin->adminAccess('system', 'toolsAccess', $this->users_global->current('REF_ROLE_ID')) == FALSE) { set_core_vars('type', 'danger'); set_core_vars('notice', notice('accessDenied')); $this->load->view('admin/ajax/notice', $this->data); } else { $this->tendoo_sitemap->create_sitemap_manually($this->input->post('sitemap')); set_core_vars('type', 'success'); set_core_vars('notice', notice('done')); $this->load->view('admin/ajax/notice', $this->data); } } else { if ($option == 'sm_remove') { if ($this->users_global->isSuperAdmin() == FALSE && $this->tendoo_admin->adminAccess('system', 'toolsAccess', $this->users_global->current('REF_ROLE_ID')) == FALSE) { set_core_vars('type', 'danger'); set_core_vars('notice', notice('accessDenied')); $this->load->view('admin/ajax/notice', $this->data); } else { $this->tendoo_sitemap->remove_sitemap(); set_core_vars('type', 'success'); set_core_vars('notice', notice('done')); $this->load->view('admin/ajax/notice', $this->data); } } else { if ($option == 'create_controller') { if ($this->users_global->isSuperAdmin() === FALSE && !$this->tendoo_admin->adminAccess('system', 'gestpa', $this->users_global->current('REF_ROLE_ID'))) { set_core_vars('type', 'danger'); set_core_vars('notice', notice('accessDenied')); $this->load->view('admin/ajax/notice', $this->data); return; } $this->form_validation->set_rules('page_name', translate('Controller name'), 'trim|required|min_length[2]|max_length[200]'); $this->form_validation->set_rules('page_cname', translate('Controller code name'), 'alpha_dash|trim|required|min_length[2]|max_length[200]'); $this->form_validation->set_rules('page_title', translate('Controller Title'), 'trim|required|min_length[2]|max_length[200]'); $this->form_validation->set_rules('page_module', translate('Bind module'), 'trim|required|min_length[2]|max_length[30]'); $this->form_validation->set_rules('page_priority', translate('Set as main controller'), 'trim|required|min_length[4]|max_length[5]'); $this->form_validation->set_rules('page_description', translate(' Controller Description'), 'trim|required|min_length[2]|max_length[2000]'); $this->form_validation->set_rules('page_visible', translate('Controller visibility'), 'trim|required|min_length[4]|max_length[5]'); $this->form_validation->set_rules('page_parent', translate('Controller Parent'), 'trim|required|min_length[1]'); $this->form_validation->set_rules('page_keywords', translate('Controller tags'), 'trim|required|min_length[1]'); if ($this->form_validation->run()) { set_core_vars('result', $this->tendoo_admin->controller($this->input->post('page_name'), $this->input->post('page_cname'), $this->input->post('page_module'), $this->input->post('page_title'), $this->input->post('page_description'), $this->input->post('page_priority'), 'create', null, $this->input->post('page_visible'), $this->input->post('page_parent'), $this->input->post('page_link'), $this->input->post('page_keywords'))); if (get_core_vars('result') == 'controler_created') { set_core_vars('get_pages', $this->tendoo->get_pages()); $this->load->view('admin/ajax/controller_create_success', $this->data); // $this->url->redirect(array('admin/pages?notice=controler_created')); } else { $this->load->view('admin/ajax/controller_create_fail_2', $this->data); //notice('push',fetch_notice_output(set_core_vars( 'error'])); } } else { $this->load->view('admin/ajax/controller_create_fail'); } } else { if ($option == "edit_controller") { if (!$this->users_global->isSuperAdmin() && !$this->tendoo_admin->adminAccess('system', 'gestpa', $this->users_global->current('REF_ROLE_ID'))) { set_core_vars('type', 'danger'); set_core_vars('notice', notice('error-occured')); $this->load->view('admin/ajax/notice', $this->data); return; } $this->form_validation->set_rules('page_name', translate('Controller name'), 'trim|required|min_length[2]|max_length[200]'); $this->form_validation->set_rules('page_cname', translate('Controller code name'), 'alpha_dash|trim|required|min_length[2]|max_length[200]'); $this->form_validation->set_rules('page_title', translate('Controller Title'), 'trim|required|min_length[2]|max_length[200]'); $this->form_validation->set_rules('page_module', translate('Bind module'), 'trim|required|min_length[2]|max_length[30]'); $this->form_validation->set_rules('page_priority', translate('Set as main controller'), 'trim|required|min_length[4]|max_length[5]'); $this->form_validation->set_rules('page_description', translate(' Controller Description'), 'trim|required|min_length[2]|max_length[2000]'); $this->form_validation->set_rules('page_visible', translate('Controller visibility'), 'trim|required|min_length[4]|max_length[5]'); $this->form_validation->set_rules('page_parent', translate('Controller Parent'), 'trim|required|min_length[1]'); $this->form_validation->set_rules('page_keywords', translate('Controller tags'), 'trim|required|min_length[1]'); $this->form_validation->set_rules('page_id', translate('Controller id'), 'required'); if ($this->form_validation->run()) { set_core_vars('notice', $this->tendoo_admin->controller($this->input->post('page_name'), $this->input->post('page_cname'), $this->input->post('page_module'), $this->input->post('page_title'), $this->input->post('page_description'), $this->input->post('page_priority'), 'update', $this->input->post('page_id'), $this->input->post('page_visible'), $this->input->post('page_parent'), $this->input->post('page_link'), $this->input->post('page_keywords'))); notice('push', fetch_notice_output(get_core_vars('notice'))); if (get_core_vars('notice') == 'controler_edited') { $this->load->view('admin/ajax/controller_edit_success', $this->data); } else { $this->load->view('admin/ajax/controller_edit_fail_2', $this->data); } } else { $this->load->view('admin/ajax/controller_edit_fail', $this->data); } } else { if ($option == "load_controller") { if (!$this->users_global->isSuperAdmin() && !$this->tendoo_admin->adminAccess('system', 'gestpa', $this->users_global->current('REF_ROLE_ID'))) { set_core_vars('type', 'danger'); set_core_vars('notice', notice('error-occured')); $this->load->view('admin/ajax/notice', $this->data); return; } set_core_vars('getSpeController', $this->tendoo_admin->get_controller($y)); $this->load->view('admin/ajax/load_controller', $this->data); } elseif ($option == "set_meta") { if ($_POST['key'] && $_POST['value']) { return json_encode(set_meta($_POST['key'], $_POST['value'])); } return 'false'; } elseif ($option == "get_meta") { if ($this->input->post('key')) { return json_encode(get_meta($this->input->post('key'))); } return 'false'; } elseif ($option == "set_user_meta") { if ($_POST['key'] && $_POST['value']) { return json_encode(set_user_meta($_POST['key'], $_POST['value'])); } return 'false'; } elseif ($option == "get_user_meta") { if ($this->input->post('key')) { return json_encode(get_user_meta($this->input->post('key'))); } return 'false'; } else { if ($option == "resetUserWidgetInterface") { return $this->users_global->resetUserWidgetInterface(); } } } } } } } } } } } } } }
<?php if ($this->users_global->isSuperAdmin() || $this->tendoo_admin->adminAccess('system', 'toolsAccess', $this->users_global->current('REF_ROLE_ID')) != FALSE) { if ($this->users_global->current('SHOW_ADMIN_INDEX_STATS') == "1") { $currentTime = $this->instance->date->datetime(); $dateArray = $this->instance->date->time(strtotime($currentTime), TRUE); $stats = $this->instance->stats->tendoo_visit_stats(); $visitLine = ''; if (array_key_exists($dateArray['M'], $stats['statistics']['unique'][$dateArray['y']])) { $totalUnique = $stats['statistics']['unique'][$dateArray['y']][$dateArray['M']]['totalVisits']; $totalGlobal = $stats['statistics']['global'][$dateArray['y']][$dateArray['M']]['totalVisits']; } else { $totalUnique = 0; $totalGlobal = 0; notice('push', tendoo_info('Aucune visite n\'a été éffectuée ce mois')); } $overAllUnique = $stats['statistics']['overAll']['unique']['totalVisits']; $overAllGlobal = $stats['statistics']['overAll']['global']['totalVisits']; //echo '<pre>'; //print_r(); //echo '</pre>'; if (is_array($stats['ordered'])) { foreach ($stats['ordered'] as $year) { foreach ($year as $month) { $uniqVisit[] = count($month); } } for ($i = 0; $i < count($uniqVisit); $i++) { if (array_key_exists($i + 1, $uniqVisit)) { $visitLine .= $uniqVisit[$i] . ','; } else {
"><i style="font-size:25px;" class="fa fa-check" title="<?php _e('Click here to uninstall'); ?> "></i></a> <?php } ?> </td> </tr> <?php } } else { ?> <tr> <td colspan="6"><?php echo tendoo_info(translate('no_module-has-been-installed')); ?> </td> </tr> <?php } } else { ?> <tr> <td colspan="6"><?php _e('No module installed'); ?> </td> </tr> <?php }
public function setting() { if (current_user_can('blogster_setting@blogster')) { if (isset($_POST['update'])) { $this->load->library('form_validation'); $this->form_validation->set_error_delimiters('<div class="alert alert-danger"><button type="button" class="close" data-dismiss="alert"><i class="icon-remove"></i></button><i style="font-size:18px;margin-right:5px;" class="icon-warning-sign"></i>', '</div>'); $this->form_validation->set_rules('validateall', '', ''); $this->form_validation->set_rules('allowPublicComment', '', ''); $this->form_validation->set_rules('update', '', ''); if ($this->form_validation->run()) { if ($this->news->setBlogsterSetting($this->input->post('validateall'), $this->input->post('allowPublicComment'))) { notice('push', fetch_notice_output('done')); } else { notice('push', fetch_notice_output('error-occured')); } // modification des parametres } } if (isset($_FILES['import'])) { $config['file_name'] = 'backup'; $config['overwrite'] = TRUE; $config['upload_path'] = $this->link; $config['allowed_types'] = 'json'; $config['remove_spaces'] = TRUE; $this->load->library('upload', $config, null, $this); $this->upload->do_upload('import'); if (is_file($this->link . 'backup.json')) { $content = file_get_contents($this->link . 'backup.json'); $fullArray = json_decode($content, TRUE); $status = $this->news->doImport($fullArray); notice('push', tendoo_info($status['success'] . ' requête(s) a/ont correctement été exécutée(s), ' . $status['error'] . ' requête(s) n\'a/ont pas pu être exécutée(s)')); unlink($this->link . 'backup.json'); } } if ($this->input->post('export')) { // Prevent output ob_clean(); $options = get_core_vars('options'); // exportation des données header('Content-type: application/octect-stream'); header('Content-Disposition: attachment; filename="' . $options['site_name'] . '_blogster_backup.json"'); echo $this->news->export(); die; } $this->data['setting'] = $this->news->getBlogsterSetting(); set_page('title', __('Blogster - Settings')); $this->data['body'] = $this->load->view(MODULES_DIR . $this->opened_module['encrypted_dir'] . '/views/setting', $this->data, false, TRUE); } else { $this->url->redirect(array('admin', 'index?notice=accessDenied')); } }
?> </span> </div> <input class="btn btn-info" type="submit" value="<?php _e('Create User'); ?> " /> <input class="btn btn-darken" type="reset" value="<?php _e('Reset'); ?> " /> </div> <br /> <div class="footer"> <?php echo tendoo_info(__('If you see this page, it means that there is not any Super Administrator for your website. <br> The super adminstrator doesn\'t have any restrictions. He can create others users, creates roles, bind privileges to a specific roles, install apps, etc. <br>Its absolutely required to create a super adminstrator before you continue.')); ?> <!--<a type="button" onclick="window.location = '<?php echo $this->instance->url->site_url(array('login')); ?> '" class="btn btn-primary btn-lg btn-block" id="btn-1"> <i class="fa fa-signin text"></i> <span class="text"> <?php _e('I already have an account'); ?> </span> <i class="fa fa-ok text-active"></i></a>--> </div> </form> <!-- <div class="social-auth-links text-center"> <p>- OR -</p> <a href="#" class="btn btn-block btn-social btn-facebook btn-flat"><i class="fa fa-facebook"></i> Sign in using Facebook</a>
/** * default_notices * * Register default tendoo warning * * @access private * @return void **/ private function default_notices() { $__['config-file-founded'] = tendoo_info(__('A config file already exists. If you save new data the older will be overwritten')); $__['accessDenied'] = $__['access-denied'] = tendoo_warning(__('Access denied. Your access is not granted to this page')); $__['installation-failed'] = tendoo_warning(__('Error occured during installation. Please remove tendoo and install it again')); $__['no-theme-installed'] = tendoo_warning(__('Error occured. It seems that there isn\'t any theme installed')); $__['role-required'] = tendoo_warning(__('Role must be set first before creating user.')); $__['controler_created'] = tendoo_success(' Le contrôleur à été correctement crée.'); $__['c_name_already_found'] = tendoo_warning('Une autre page possède déjà ce nom comme contrôleur, veuillez choisir un autre nom.'); $__['name_already_found'] = tendoo_warning('Une autre page possède déjà ce nom, veuillez choisir un autre nom.'); $__['controler_deleted'] = tendoo_success(' Le contrôleur à été correctement supprimé.'); $__['controllers_updated'] = tendoo_success('Les contrôleurs ont été correctement mis à jour.'); $__['incorrectSuperAdminPassword'] = tendoo_warning('Le mot de passe administrateur est incorrect'); $__['cantHeritFromItSelf'] = tendoo_warning('Ce contrôleur ne peut pas être un sous menu de lui même. La modification de l\'emplacement à échoué.'); $__['cantSendMsgToYou'] = tendoo_warning('Une erreur s\'est produite, vous ne pouvez pas vous envoyer un message.'); $__['curl_is_not_set'] = tendoo_warning('CURL n\'est pas disponible sur ce site.'); $__['unkConSpeAsParent'] = tendoo_warning('Le contrôleur (Menu), définie comme parent est introuvable. La modification du contrôleur à échoué.'); $__['module_success_enabled'] = tendoo_success('Le module à correctement été activé.'); $__['module_success_disabled'] = tendoo_success('Le module à correctement été désactivé.'); $__['addingActionFailure'] = tendoo_warning('La création d\'action pour ce module à échoué.'); $__['subMenuLevelReach'] = tendoo_warning('Impossible de créer ou de modifier ce contrôleur, la limitation en terme de sous menu à été atteinte. Veuillez choisir un autre menu ou en créer un nouveau.'); $__['cantUserReservedCNames'] = tendoo_warning('Ce code du contrôleur est un code reservé, vous ne pouvez pas l\'utiliser.'); $__['unknowProfil'] = tendoo_warning('Le profil que vous souhaitez visiter est introuvable. Il est en outre probable que cet utilisateur n\'existe pas ou que son compte à été supprimé.'); $__['upload_invalid_filesize'] = tendoo_warning('La taille du fichier est supérieur à celle autorisée.'); $__['cant_delete_mainpage'] = tendoo_warning(' La page principale ne peut pas être supprimé.'); $__['controler_edited'] = tendoo_success(' Le contrôleur à été correctement modifié.'); $__['db_unable_to_connect'] = tendoo_warning('Il est impossible de se connecter à la base de données avec les informations fournies.'); $__['db_unable_to_select'] = tendoo_warning('La connexion à été établie, cependant il est impossible d\'accéder à la base de donnée.'); $__['error-occured'] = tendoo_warning(translate('A error occured during this operation.')); $__['adminDeleted'] = tendoo_success(' L\'utilisateur à été correctement supprimé.'); $__['controller_not_found'] = tendoo_warning(' Ce contrôleur est introuvable.'); $__['no_main_controller_created'] = tendoo_warning(' Aucun contrôleur définit comme principale n\'a été retrouvé, le nouveau contrôleur à été définit comme contrôleur par défaut.'); $__['no_main_page_set'] = tendoo_info(' Aucun contrôleur n\'est définie par défaut.'); $__['no_priv_created'] = tendoo_info(' Aucun privilège n\'a été crée, Pour administrer les actions, il est indispensable de créer un privilège au moins.'); $__['InvalidModule'] = tendoo_warning('Ce module est invalide ou incompatible.'); $__['CantDeleteDir'] = tendoo_warning('Une erreur s\'est produite durant la suppréssion d\'un dossier.'); $__['module_corrupted'] = tendoo_warning('Ce module ne peut pas être installé. Il est corrompu ou incompatible.'); $__['errorInstallModuleFirst'] = tendoo_warning('Vous devez installer les tables avant d\'installer le module'); $__['module-has-been-installed'] = tendoo_success(translate('The module has been sucessfully installed.')); $__['module-already-exists'] = tendoo_warning(translate('A module with the same namespace already exists.')); $__['unactive-or-unknow-module'] = tendoo_warning(__('This module is not found or has been disabled.')); // Translated $__['module-has-been-installed'] = tendoo_success('Le module à été désinstallé.'); $__['InvalidPage'] = tendoo_warning('Cette page n\'a pas pu être chargé car le contrôleur correspondant à cette adresse est introuvable ou indisponible.'); // Deprecated ? $__['noControllerDefined'] = tendoo_warning('Impossible d\'accéder à cet élement, Il ne dispose pas d\'interface embarqué.'); $__['cantSetChildAsMain'] = tendoo_warning('Un sous menu ne peut pas être définie comme page principale. La modification de la priorité à échouée.'); $__['noFileUpdated'] = tendoo_warning('Aucun fichier n\'a été reçu.'); $__['done'] = tendoo_success('L\'opération s\'est déroulée avec succès.'); $__['accessForbiden'] = tendoo_warning('Vous ne faites pas partie du privilès qui peut accéder à cette page.'); $__['userCreated'] = tendoo_success('L\'utilisateur a été crée.'); $__['userNotFoundOrWrongPass'] = tendoo_warning('Utilisateur introuvable ou mot de passe incorrect.'); $__['notForYourPriv'] = tendoo_warning('Accéder à cet élément ne fait pas partie de vos actions.'); $__['unknowAdmin'] = tendoo_warning('Administrateur introuvable.'); $__['moduleBug'] = tendoo_warning('Une erreur s\'est produite. Le module attaché à ce contrôleur est introuvable ou désactivé.'); $__['page-404-or-module-bug'] = tendoo_warning(__('Error occured. Page not found or bound module is not well defined.')); $__['notAllowed'] = tendoo_warning('Il ne vous est pas permis d\'effctuer cette opération. Soit compte tenu de votre privilège actuel, soit compte tenu de l\'indisponibilité du service.'); $__['theme_alreadyExist'] = tendoo_info('Ce thème avait déjà été installé.'); $__['NoCompatibleTheme'] = tendoo_warning('Ce thème n\'est pas compatible avec la version actuelle d\'tendoo.'); $__['NoCompatibleModule'] = tendoo_warning(translate('module_compatibility_issues')); $__['module_updated'] = tendoo_success(translate('module_updated')); $__['SystemDirNameUsed'] = tendoo_warning('Ce thème ne peut pas s\'installer car il à tenter d\'utiliser des ressources système.'); $__['theme_installed'] = tendoo_success('Le thème a été installé correctement.'); $__['no_theme_selected'] = tendoo_warning('Aucun thème n\'a été choisi comme thème par défaut.'); $__['defaultThemeSet'] = tendoo_success('Le thème à été correctement choisi come thème par défaut.'); $__['theme-not-found'] = tendoo_warning('Thème inconnu ou introuvable.'); $__['missingArg'] = tendoo_warning('Une erreur s\'est produite. Certains élément, qui permettent le traitement de votre demande, sont manquant ou incorrect.'); $__['page-404'] = tendoo_warning('Cette page est introuvable ou indisponible. Veuillez re-éssayer.'); // $__['restoringDone'] = tendoo_success('La restauration s\'est correctement déroulé.'); // $__['cmsRestored'] = tendoo_success('La restauration s\'est correctement déroulé.'); $__['creatingHiddenControllerFailure'] = tendoo_warning('La création du contrôleur invisible à échoué'); $__['installFailed'] = tendoo_warning('Une erreur s\'est produite durant l\'installtion certaines composantes n\'ont pas été correctement installées'); $__['db_connect_error'] = tendoo_warning('Connexion impossible,intérrompu ou le nombre limit de connexion accordé à l\'utilisateur de la base de donné est atteinte. Veuillez re-éssayer.'); $__['themeCrashed'] = tendoo_warning('Une erreur s\'est produite avec le thème. Ce thème ne fonctionne pas correctement.'); $__['noMainPage'] = tendoo_warning('Impossible d\'accéder à la page principale du site. Aucun contrôleur n\'a été définit comme principal'); $__['admin-auth-failed'] = tendoo_warning(__('Incorrect password or user not found')); $__['super-admin-creation-failed'] = tendoo_warning(__('Super administrator creation failed. Check if, for this website, there are not yet a super administrator.')); $__['user-has-been-created'] = tendoo_success(__('User has been successfully created.')); $__['no-controller-set'] = tendoo_warning(__('There is no controller available')); $__['role-not-found'] = tendoo_warning(__('Role not found')); $__['invalid-app'] = tendoo_warning(__('This app is not a valid Tendoo App. Installation has failed.')); $__['users-creation-failed'] = tendoo_warning(__('User creation failed, check if this pseudo is not already taken.')); $__['table-creation-failed'] = tendoo_warning(__('Error occured. Tables wasn\'t installed. Check your provided database login data')); $__['upload-invalid-file-type'] = tendoo_warning(__('This file type is not allowed')); $__['controller-not-properly'] = tendoo_warning(__('Controller interface is not well defined')); // $__['themeControlerNoFound'] = tendoo_warning('Ce thème ne dispose pas d\'interface embarqué..'); // Deprecated ? $__['pseudo-already-in-use'] = tendoo_warning(__('This pseudo is already used. Please choose another one')); $__['email-already-used'] = tendoo_warning(__('This email is already used, please choose another one or try to restore your account.')); $__['unallowed-role'] = tendoo_warning(__('This role is not allowed.')); $__['unactive-account'] = tendoo_warning(__('This account is not yet active. Please, check the inbox associated to this email address. If there is no activation mail, you can try to receive it again, with the activation wizard.')); $__['already-active'] = tendoo_warning(__('Activation mail could not been send. This account seems to be already active.')); $__['action-prohibited'] = tendoo_warning(__('You are not granted to do this.')); $__['unknow-email'] = tendoo_warning(__('There is no account associated to this email address')); $__['activation-mail-send'] = tendoo_success(__('An activation mail has been send.')); $__['registration-not-allowed'] = $__['registration-disabled'] = tendoo_warning(__('Registration and associated services are disabled in this website.')); $__['new-link-send'] = tendoo_success(__('A new link has been send to your email address.')); $__['expiration-time-reached'] = tendoo_warning(__('This link is no more valid.')); $__['activation-failed'] = tendoo_warning(__('This activation link is no more valid.')); $__['account-activation-done'] = tendoo_success(__('This account is now active')); $__['account-activation-failed'] = tendoo_warning(__('The account activation failed.')); $__['password-matches-error'] = tendoo_warning(__('The new password should not match the old one.')); $__['password-has-changed'] = tendoo_success(__('The password has been changed.')); $__['upload-file-no-available'] = tendoo_warning(__('Select a file first.')); $__['cannot-delete-active-role'] = tendoo_warning(__('A role in use can\'t be deleted.')); $__['profile-updated'] = tendoo_success(__('Profile has been updated.')); $__['role-permissions-saved'] = tendoo_success(__('Role permissions has been saved.')); $__['unsupported-by-current-theme'] = tendoo_warning(__('Active theme does\'nt support this module')); $__['user-meta-has-been-reset'] = tendoo_success(__('Your account settings has been reset')); // Tendoo 1.4 $__['web-app-mode-enabled'] = tendoo_warning(__('While "WebApp" Mode is enabled, frontend is disabled. Check your settings to define tendoo mode on Website setings tab.')); $__['form-expired'] = tendoo_warning(__('Current form data has expired. Please try to submit it again')); // CustomQuery Notices $__['incorrect-given-meta'] = tendoo_warning(__('Incorrect meta data. This meta doesn\'t seems to be approuved for the custom query.')); $__['incorrect-key-given'] = tendoo_warning(__('Incorrect key given.')); $__['unknow-taxonomy-given'] = tendoo_warning(__('Unknow taxonomy given.')); $__['error-occured-while-checking-query-title'] = tendoo_warning(__('Error occured while checking title.')); $__['custom-query-saved'] = tendoo_success(__('Custom Query has been saved.')); $__['unknow-key-for-custom-query'] = tendoo_warning(__('Unknow key for custom query.')); $__['unknow-custom-query'] = tendoo_warning(__('Unknow custom query.')); $__['unknow-taxonomy-to-set-as-parent'] = tendoo_warning(__('Unknow taxonomy to set as parent.')); $__['taxonomy-set'] = tendoo_success(__('Taxonomy has been set.')); $__['taxonomy-already-exists'] = tendoo_warning(__('Taxonomy already exists. Please choose another name.')); $__['unknow-taxonomy'] = tendoo_warning(__('Unknow taxonomy.')); $__['taxonomy-cant-be-his-own-parent'] = tendoo_warning(__('Taxonomy cant be his own parent.')); $__['taxonomy-deleted'] = tendoo_success(__('Taxonomy has been deleted.')); $__['cant-delete-the-latest-taxonomy'] = tendoo_warning(__('The latest taxonomy can\'t be deleted.')); $__['taxonomy-not-found-or-bound'] = tendoo_warning(__('The concerned taxonomy is not found or is already bound.')); $__['dooooooooo'] = tendoo_warning(__('dooooooooooo')); $__['incorrect-query-parent'] = tendoo_error(__('Incorrect parent has been given. Make sure that the parent id doesn\'t match the current query id.')); $__['unknow-post'] = tendoo_error(__('Unknow post. provided id may be incorrect, or post not found.')); $__['unknow-user'] = tendoo_error(__('Unknow user, or this user may no exists.')); $__['comment-submitted'] = tendoo_success(__('Your comment has been successfully posted.')); $__['comment-deleted'] = tendoo_error(__('The comment has been deleted.')); $__['unknow-status'] = tendoo_error(__('Unknow status.')); $__['comment-edited'] = tendoo_success(__('Comment edited')); set_core_vars('default_notices', $__); }
} } ?> </section> </div> </div> </div> </div> <div class="row"> <div class="col-lg-12"> <div class="panel"> <div class="panel-heading"> Contenu du contact : </div> <div class="panel-body"> <form method="post"> <?php echo tendoo_info('Remplissez les informations qui vous concerne, ou votre entreprise ou votre activé'); ?> <?php echo $this->instance->tendoo->getEditor(array('name' => 'contact_description', 'id' => 'contact_description_id', 'defaultValue' => array_key_exists(0, $gDescription) ? $gDescription[0]['FIELD_CONTENT'] : '')); ?> <hr class="line line-dashed" /> <input type="submit" name="contact_description_submit" value="Enregistrer les modifications" class="btn btn-info" /> </form> </div> </div> </div> </div> </section> </section> </section> </section>
" modal-title="<?php echo $a['ICON_MODULE']['name']; ?> " data-url="<?php echo $this->instance->url->site_url(array('admin', 'open', 'modules', $a['ICON_MODULE']['namespace'])); ?> "> <img class="G-icon" src="<?php echo $this->instance->tendoo_admin->getAppImgIco($a['ICON_MODULE']['namespace']); ?> "> <p><?php echo word_limiter($a['ICON_MODULE']['name'], 4); ?> </p> <!--<span class="badge up bg-info m-l-n-sm">300</span>--> </div> <?php } } } else { echo tendoo_info('No icon is availble. You can enable it throught <a href="' . $this->instance->url->site_url(array('admin', 'setting')) . '"><strong>settings</strong></a>.'); } } } else { echo tendoo_info('No icon is availble. You can enable it throught <a href="' . $this->instance->url->site_url(array('admin', 'setting')) . '"><strong>settings</strong></a>.'); } ?> </div> </div>
function fetch_notice_from_url() { $notice = ''; $info = ''; if (isset($_GET['notice'])) { $notice = fetch_notice_output($_GET['notice']); } if (isset($_GET['info'])) { $info = tendoo_info($_GET['info']); } return $notice . $info; }
function ouput_admin_widgets() { function __get_sections_widgets($admin_widgets, $section = 0) { $widget = array(); $widget[0] = get_meta('widget_0', 'from_user_meta'); $widget[1] = get_meta('widget_1', 'from_user_meta'); $widget[2] = get_meta('widget_2', 'from_user_meta'); // var_dump($widget); // Uniquement si le widget est disponible, on l'ajoute if (array_key_exists($section, $widget)) { if ($widget[$section] != null) { // Parcours de l'ordre des widgets for ($i = 0; $i < count($widget[$section]); $i++) { foreach ($admin_widgets as $value) { $widget_id = $value['widget_namespace'] . '/' . $value['module_namespace']; // Verifie si le widget existe ou s'il vient d'être ajouté if ($section == 1) { $new_widget_exists = FALSE; foreach ($widget as $_s) { if (in_array($widget_id, $_s)) { // Si le widget existe, déclare qu'il existe, donc il ne faut pas l'ajouter en plus $new_widget_exists = TRUE; } } // On ajoute le nouveau widget par défaut dans la colonne 1 if ($new_widget_exists == FALSE) { array_push($widget[$section], $widget_id); } } if ($widget_id == $widget[$section][$i]) { // Filtre, ne seront affiché que ceux qui sont activés. if (admin_widget_is_enabled($value['widget_namespace'] . '/' . $value['module_namespace'])) { ?> <div widget_id="<?php echo $value['widget_namespace']; ?> /<?php echo $value['module_namespace']; ?> " > <?php if ($value['widget_form'] == "normal_form") { echo $value['widget_content']; } ?> </div> <?php } } // For new Admin Widget } } } } } // 5 colonnes par défaut $admin_widgets = get_core_vars('admin_widgets'); if (is_array($admin_widgets)) { $disabled_widgets = current_user('ADMIN_WIDGETS_DISABLED'); if (!get_meta('widget_0', 'from_user_meta') && !get_meta('widget_1', 'from_user_meta') && !get_meta('widget_2', 'from_user_meta')) { ?> <div class="col-lg-12"> <?php echo tendoo_info('Aucun widget n\'a été activé depuis les <strong><a href="' . get_instance()->url->site_url(array('admin', 'setting')) . '">paramètres</a></strong>'); ?> </div> <?php } else { for ($i = 0; $i < 3; $i++) { if ($i == 0) { ?> <div class="col-lg-4 draggable_widgets"> <?php echo __get_sections_widgets($admin_widgets, 0); ?> </div> <?php } else { if ($i == 1) { ?> <div class="col-lg-4 draggable_widgets"> <?php echo __get_sections_widgets($admin_widgets, 1); ?> </div> <?php } else { ?> <div class="col-lg-4 draggable_widgets"> <?php echo __get_sections_widgets($admin_widgets, 2); ?> </div> <?php } } } ?> <script> $(document).ready(function(){ function __doSort(event,ui){ ui.item.closest(".draggable_widgets").parent().find('.draggable_widgets').each(function(){ $(this).children(function(){ alert($(this).attr('widget_id')); }) }); var tab = new Array; var section = 0; var newSet = {}; $('.draggable_widgets').each(function(){ if(typeof tab[section] == 'undefined') { tab[section] = new Array; } $(this).find('div[widget_id]').each(function(){ tab[section].push($(this).attr('widget_id')); }); // Saving Each Fields _.extend(newSet,_.object([ "widget_"+section ],[ tab [ section ] ])); section++; }); $.ajax(tendoo.url.site_url('admin/ajax/resetUserWidgetInterface'),{ dataType : 'json', type : 'POST', data : newSet }); } var actionAllower = {}; $('.draggable_widgets').sortable({ grid : [ 10 , 10 ], connectWith : ".draggable_widgets", items : "div[widget_id]", placeholder : "widget-placeholder", forceHelperSize : false, // zIndex : tendoo.zIndex.draggable, forcePlaceholderSize : true, stop : function(event, ui){ __doSort(event, ui); }, delay : 150 }); }); </script> <?php } } return false; }