public function index() { set_page('title', $this->data['page'][0]['PAGE_TITLE']); set_page('description', $this->data['page'][0]['PAGE_DESCRIPTION']); get_core_vars('active_theme_object')->definePageTitle($this->data['page'][0]['PAGE_TITLE']); get_core_vars('active_theme_object')->definePageDescription($this->data['page'][0]['PAGE_DESCRIPTION']); set_core_vars('module_content', $this->load->view($this->data['module']['uri_path'] . '/views/common_main', $this->data, true, TRUE)); get_core_vars('active_theme_object')->head($this->data); get_core_vars('active_theme_object')->body($this->data); }
public function about() { // DEFINE THEME TITLE // set_page('title', '2TB » A propos de Nevia'); // END THEME TITLE // // DEFINE THEME DESCRIPTION // set_page('description', 'Thème crée avec 2TB'); // END THEME DESCRIPTION // $this->data['body'] = $this->load->view($this->loadAccess . 'views/about', $this->data, true, true); return $this->data['body']; }
/** * 显示门店通讯录 **/ public function show_store($menu) { /* 分页 */ $total_rows = $this->Publics->get_store_num()[0]['COUNT(id)']; $url = site_url('publ/' . $menu . '_store'); $page_config = set_page($url, $total_rows); $data['page'] = $this->pagination->create_links(); $this->load->view('header', page_header('查看门店信息', '所有门店列表', $menu)); $data['table'] = $this->Publics->get_store($page_config['nowindex'], $page_config['per_page']); $this->load->view('publics/store', $data); $this->load->view('footer'); }
public function index($arg = '') { css_push_if_not_exists('font'); css_push_if_not_exists('../admin-lte/bootstrap/css/bootstrap.min'); css_push_if_not_exists('../admin-lte/font-awesome/font-awesome.4.3.0.min'); css_push_if_not_exists('../admin-lte/dist/css/AdminLTE.min'); css_push_if_not_exists('../admin-lte/plugins/iCheck/square/blue'); js_push_if_not_exists('../admin-lte/plugins/jQuery/jQuery-2.1.3.min'); js_push_if_not_exists('../admin-lte/bootstrap/js/bootstrap.min'); js_push_if_not_exists('../admin-lte/plugins/iCheck/icheck.min'); set_page('title', __('Welcome on') . ' ' . get('core_version')); set_core_vars('body', $this->load->the_view('tendoo_index_body', true)); $this->load->the_view('header'); $this->load->the_view('global_body'); }
public function index() { $active_theme = get_core_vars('active_theme'); $setting_key = $active_theme['namespace'] . '_theme_settings'; $this->load->library('form_validation'); $this->form_validation->set_rules('api_limit', 'API LIMIT', 'required'); $this->form_validation->set_rules('declared_apis', 'Declared API', 'required'); $this->form_validation->set_rules('declared_item', 'Declared Item', 'required'); // For Static using API if ($this->form_validation->run()) { if ($active_theme) { $datas_get = get_meta($setting_key); $saved_settings = $datas_get ? $datas_get : array(); // If there are same setting already saved, they'll be overwrited $saved_settings[$this->input->post('declared_item')] = array('api_limit' => $this->input->post('api_limit'), 'declared_apis' => $this->input->post('declared_apis'), 'declared_item' => $this->input->post('declared_item')); if (set_meta($active_theme['namespace'] . '_theme_settings', $saved_settings)) { notice('push', fetch_notice_output('done')); } } } // For Static not draggable if ($this->input->post('is_static_item')) { $this->load->library('form_validation'); if ($static = return_if_array_key_exists('static', $_POST)) { if (is_array($static)) { $active_theme = get_core_vars('active_theme'); $saved_settings = get_meta($active_theme['namespace'] . '_theme_settings'); foreach ($static as $namespace => $item) { if (is_array($item)) { foreach ($item as $name => $fields) { $saved_settings[$namespace][$name] = $fields; } } } if (set_meta($active_theme['namespace'] . '_theme_settings', $saved_settings)) { notice('push', fetch_notice_output('done')); } } } } // Add Settings to Core vars push_core_vars('active_theme', 'theme_settings', get_meta($setting_key)); set_page('title', 'TIM | ' . get('core_version')); return $this->load->view($this->module_metas['uri_path'] . 'views/body', $this->data, true, true); }
public function edit($page_id) { $this->load->library('form_validation'); $this->form_validation->set_rules('page_title', __('Page Title'), 'trim|required'); $this->form_validation->set_rules('page_id', __('Page Id'), 'trim|required'); $this->form_validation->set_rules('page_description', __('Page description'), 'trim|required'); $this->form_validation->set_rules('page_content', __('Content field'), 'trim|required'); if ($this->form_validation->run()) { $post_page = $this->lib->set_page($this->input->post('page_title'), $this->input->post('page_content'), $this->input->post('page_description'), $this->input->post('page_parent') ? $this->input->post('page_parent') : 0, $this->input->post('page_controller_id') ? $this->input->post('page_controller_id') : 0, $process_type = 'edit', $this->input->post('page_status') ? 1 : 0, $this->input->post('page_id')); notice('push', fetch_notice_output($post_page)); } set_page('title', __('Page creator > Create a page')); set_core_vars('available_controllers', $this->lib->get_available_controllers($page_id)); set_core_vars('available_pages', $this->lib->get_pages('all_but_not', $page_id)); set_core_vars('current_page', $this->lib->get_pages('filter_id', $page_id)); $this->visual_editor->loadEditor(1); return $this->load->view($this->opened_module['uri_path'] . 'views/edit', $this->data, true, TRUE); }
public function code($e) { // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= set_core_vars('code', notice('push', fetch_notice_output($e))); set_core_vars('body', $this->load->view('error/inner_body', $this->data, TRUE)); // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= set_page('title', translate('Error - Tendoo')); // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= css_push_if_not_exists('font'); css_push_if_not_exists('../admin-lte/bootstrap/css/bootstrap.min'); css_push_if_not_exists('../admin-lte/font-awesome/font-awesome.4.3.0.min'); css_push_if_not_exists('../admin-lte/dist/css/AdminLTE.min'); css_push_if_not_exists('../admin-lte/plugins/iCheck/square/blue'); js_push_if_not_exists('../admin-lte/plugins/jQuery/jQuery-2.1.3.min'); js_push_if_not_exists('../admin-lte/bootstrap/js/bootstrap.min'); js_push_if_not_exists('../admin-lte/plugins/iCheck/icheck.min'); // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= $this->load->view('header', $this->data); $this->load->view('error/global_body', $this->data); // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= }
public function superAdmin() { // Has Admin ? $this->users_global->hasAdmin() === TRUE ? $this->instance->url->redirect(array('login')) : false; $this->instance->form_validation->set_rules('super_admin_pseudo', __('Pseudo'), 'trim|required|min_length[5]|max_length[15]'); $this->instance->form_validation->set_rules('super_admin_password', __('Password'), 'trim|required|min_length[6]|max_length[15]'); $this->instance->form_validation->set_rules('super_admin_password_confirm', __('Confirm Password'), 'trim|required|min_length[6]|matches[super_admin_password]'); $this->instance->form_validation->set_rules('super_admin_mail', __('Email'), 'trim|valid_email|required'); $this->instance->form_validation->set_rules('super_admin_sex', __('Sex selection'), 'trim|required|min_length[3]|max_length[4]'); if ($this->instance->form_validation->run()) { if ($this->instance->users_global->createSuperAdmin($this->instance->input->post('super_admin_pseudo'), $this->instance->input->post('super_admin_password'), $this->instance->input->post('super_admin_sex'), $this->instance->input->post('super_admin_mail'))) { $this->instance->url->redirect(array('login?notice=user-has-been-created&ref=' . urlencode($this->instance->url->site_url(array('admin', 'index'))))); } notice('push', fetch_notice_output('super-admin-creation-failed')); } set_core_vars('pageTitle', __('Create Admin - Tendoo')); set_page('title', get_core_vars('pageTitle')); set_page('description', __('Create Super Admin - Tendoo')); set_core_vars('body', $this->load->view('registration/createSuperAdmin', true)); $this->load->view('header'); $this->load->view('global_body'); }
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']; }
/** * * 显示送修列表 * **/ public function all_table() { $this->load->helper(array('page', 'form', 'search')); $data = array(); $data = $this->get_user_info($data); $header = page_header('送修列表', '我的送修记录', $this->menu); $header['css'] = get_search_css(); $this->load->view('header', $header); /* 分页 */ $total_rows = $this->Stores->get_table_num()[0]['COUNT(id)']; $url = site_url('sware/all_table'); $page_config = set_page($url, $total_rows); $data['page'] = $this->pagination->create_links(); $data['table'] = $this->Stores->get_store_table($page_config['nowindex'], $page_config['per_page']); /* 视图 */ $search = get_search_data(); /* 加载js */ $load_js = get_search_js(); array_push($load_js['js_array'], 'jquery.print.js'); $search['action'] = 'sware/search'; $this->load->view('publics/search', $search); $this->load->view('sware/table.php', $data); $this->load->view('footer', $load_js); }
<?php require_once 'include/head.php'; set_page(); ?> <!-- jQuery part --> <script type="text/javascript"> $(document).ready(function(){ $("#loading").hide(); $("#check_command_select").change(function() { $("form").find('input[type=submit]').prepend('<input type="hidden" name="check_command_changed" value="true">'); $("form").find('input[type=submit]').click(); }); // mode for multimodify $("input[name='replace_mode']").change(function() { if ($("input[name='replace_mode']:checked").val() == 'replace'){ $("#info_box").hide("blind", "slow", function(){ $("#mode_add_title").hide(); $("#mode_add_title").prev().show(); $("#info_box").show("blind", "slow"); }); }else if ($("input[name='replace_mode']:checked").val() == 'add'){ $("#info_box").hide("blind", "slow", function(){ $("#mode_add_title").prev().hide(); $("#mode_add_title").show(); $("#info_box").show("blind", "slow"); }); } });
public function defineLang() { $this->load->library('form_validation'); $this->form_validation->set_rules('lang', 'Selection de la langue / Lang selection', 'trim|required|min_length[3]'); if ($this->form_validation->run()) { $this->instance->lang->defineLang('en_US'); // $this->input->post('lang') $this->url->redirect(array('install', 'step', '1')); } set_page('title', 'Tendoo » Choose installation language, Choissisez la langue d\'installation'); $this->load->view('header', $this->data); $this->load->view('install/lang/body', $this->data); }
/** * 查看所有厂家 **/ public function show_factory() { $this->load->helper('page'); $this->load->model('Publics'); /* 分页 */ $total_rows = $this->Publics->get_factory_num()[0]['COUNT(id)']; $url = site_url('ware/show_factory'); $page_config = set_page($url, $total_rows); $data['page'] = $this->pagination->create_links(); $this->load->view('header', page_header('查看厂家信息', '所有厂家列表', $this->menu)); $data['table'] = $this->Publics->get_factory($page_config['nowindex'], $page_config['per_page']); $this->load->view('publics/factory', $data); $this->load->view('footer'); }
public function passchange($email, $timestamp, $password) { if ($timestamp > $this->instance->date->timestamp()) { if ($this->users_global->emailExist($email)) { // Library $this->load->library('Tendoo_admin'); if (riake('allow_registration', $this->options) == "0") { $this->url->redirect(array('error', 'code', 'registration-disabled')); } $connect = $this->users_global->emailConnect($email, $password); if ($connect) { $this->load->library('form_validation'); $this->form_validation->set_rules('password_new', translate('New password'), 'trim|required|min_length[6]|max_length[30]'); $this->form_validation->set_rules('password_new_confirm', translate('Confirm password'), 'trim|required|matches[password_new]'); if ($this->form_validation->run()) { $query = $this->users_global->recoverPassword($connect['ID'], $password, $this->input->post('password_new')); if ($query == 'password-has-changed') { $this->url->redirect(array('login?notice=' . $query)); } else { notice(fetch_notice_output($query)); } } set_core_vars('pageTitle', translate('Changing Password - Tendoo')); set_page('title', get_core_vars('pageTitle')); set_core_vars('menu', $this->load->view('login/recovery_menu', true)); set_core_vars('body', $this->load->view('login/password_change', true)); $this->load->the_view('header'); $this->load->the_view('global_body'); } else { $this->url->redirect(array('error', 'code', 'activation-failed')); } } else { $this->url->redirect(array('error', 'code', 'unknow-email')); } } else { $this->url->redirect(array('error', 'code', 'expiration-time-reached')); } }
<? /* Initialization */ require_once('functions.php'); /* Start of Program */ $uid = $url = ""; if (isset($_POST['url']) && isset($_POST['uid'])) { global $uid, $url; $url = $_POST['url']; $uid = $_POST['uid']; prepare($uid); // Process each link stop_watch_start(); logger("Processing page: " . $url); $page = file_get_html($url); if (isset($page)) { set_page($page); get_info(); logger("Finish Processing page: " . $url); } zip_images(); stop_watch_stop(); logger("Done"); } ?>
<?php if ($pages_editor_loaded_page != 404) { set_page('title', $pages_editor_loaded_page[0]['TITLE']); set_page('description', $pages_editor_loaded_page[0]['DESCRIPTION']); $active_theme_object->page(return_if_array_key_exists('FILE_CONTENT', $pages_editor_loaded_page[0])); } else { $active_theme_object->page_404(); }
public function tags($action = 'index', $page = 1) { if (current_user_can('blogster_manage_tags@blogster')) { // Get All keyWords $this->data['totalKeyWords'] = count($this->news->getAllPopularKeyWords('all')); // Starting Pagination $_elPP = isset($_GET['limit']) ? $_GET['limit'] : 10; $this->data['paginate'] = pagination_helper($_elPP, $this->data['totalKeyWords'], $page, module_url(array('tags', 'index'))); // Get KeyWord Using Page Pagination $this->data['getKeywords'] = $this->news->getAllPopularKeyWords('limitedTo', $this->data['paginate']['start'], $this->data['paginate']['end']); // Set Page Title set_page('title', __('Blogster - Manage Tags')); $this->data['body'] = $this->load->view(MODULES_DIR . $this->opened_module['encrypted_dir'] . '/views/keywords_main', $this->data, true, TRUE, $this); return $this->data['body']; } else { module_location('?notice=accessDenied'); } }
public function media() { set_page('title', __('Media Library - Tendoo')); $this->load->the_view('admin/uploads/media', false); }
public function boot() { if ($this->db_connect()) { $this->date = new Tdate(); $this->meta_datas = new Meta_datas(); } /* =-=-=-=-=-=-=-=-= URI HANDLER -=-=-=-=-=-=-=-=-=-= */ set_core_vars('base_url', $baseUrl = $this->url->site_url(array('index'))); set_core_vars('controller', $Class = $this->url->controller()); set_core_vars('method', $Method = $this->url->method()); set_core_vars('parameters', $Parameters = $this->url->parameters()); /* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= */ /** * Check out if current server support tendoo **/ is_compatible(); /** * Load module and Themes if tendoo is installed **/ if ($this->is_installed === true) { // Load Themes Only if Website mode is enabled. if (get_core_vars('tendoo_mode') !== 'website') { load_themes(); } load_modules(); } /** * Load Core Vars **/ new Load_Core_Values($this->is_installed); /** * Checking Controller **/ if (in_array($Class, array('install', 'registration', 'logoff', 'admin', 'login', 'error'))) { $Class === 'admin' ? define('SCRIPT_CONTEXT', 'ADMIN') : define('SCRIPT_CONTEXT', 'PUBLIC'); if ($this->is_installed) { if ($this->db_connected()) { include_once CONTROLLERS_DIR . $Class . '.php'; include_once SYSTEM_DIR . 'Executer.php'; } else { $this->tendoo->error('db_connect_error'); die; } } else { if ($Class === 'install') { include_once CONTROLLERS_DIR . $Class . '.php'; include_once SYSTEM_DIR . 'Executer.php'; } else { $this->url->redirect(array('install')); } } } else { // Define Script context define('SCRIPT_CONTEXT', 'PUBLIC'); // Checks install status if (!$this->is_installed) { include_once CONTROLLERS_DIR . 'tendoo_index.php'; include_once SYSTEM_DIR . 'Executer.php'; } else { /** * Attemps connecting to database **/ !$this->db_connected() ? $this->tendoo->error('db_connect_error') : null; $options = get_core_vars('options'); /** * Loading Users Class **/ $this->load->library('users_global'); // Conditional if webmode is enabled get_core_vars('tendoo_mode') == 'webapp' ? $this->url->redirect(array('admin', 'index?notice=web-app-mode-enabled')) : null; /** * Setting Core vars **/ set_core_vars('controllers', $loaded_controllers = $this->controller->get('', FALSE), 'readonly'); // ?? set_core_vars('page', $unique_controller = $this->controller->_get($Class), 'readonly'); set_core_vars('active_theme', $active_theme = get_themes('filter_active')); set_core_vars('module_url', $module_url = $Class, 'readonly'); set_core_vars('module', $module = get_modules('filter_active_namespace', $unique_controller[0]['PAGE_MODULES']), 'readonly'); set_core_vars('opened_module', $module, 'readonly'); set_core_vars('app_module', $app_module = get_modules('filter_active_app'), 'readonly'); /** * Trigger each init.php file within module and theme folders * init.php is the main file for modules and themes. * @since 1.4 **/ $this->trigger_inits(); /** * Declare Notices : Notices are internal(system) or module/theme alert. **/ set_core_vars('tendoo_notices', trigger_filters('declare_notices', array(get_core_vars('default_notices')))); // @since 1.4 if (is_string($unique_controller)) { $this->url->redirect(array('error', 'code', $unique_controller)); } else { // If selected module is valid if (!$module) { $this->url->redirect(array('error', 'code', 'moduleBug')); } /** * Setting page meta datas **/ set_page('title', $unique_controller[0]['PAGE_TITLE']); set_page('description', $unique_controller[0]['PAGE_DESCRIPTION']); set_page('keywords', $unique_controller[0]['PAGE_KEYWORDS']); // Saved First BreadCrumbs $INDEX = $this->controller->_get('index'); set_bread(array('link' => $module_url, 'text' => $INDEX[0]['PAGE_NAMES'])); /** * Checks if current module is supported by active theme **/ if (TRUE !== does_active_theme_support($module['handle'])) { $this->url->redirect(array('error', 'code', 'unsupported-by-current-theme')); } if ($module_url == 'noMainPage') { $this->url->redirect(array('error', 'code', 'noMainPage')); } if ($active_theme == FALSE) { $this->url->redirect(array('error', 'code', 'no-theme-installed')); } else { // Load theme handler file include_if_file_exists($active_theme['uri_path'] . '/handler.php'); if (class_exists($active_theme['namespace'] . '_theme_handler')) { eval('set_core_vars("active_theme_object",new ' . $active_theme['namespace'] . '_theme_handler());'); // Initialize Theme handler; } else { $this->url->redirect(array('error', 'code', 'themeCrashed')); } $TENDOO_MODULE = $module; $Class = $module['namespace']; // REAFFECT CLASS VALUE DUE TO EXISTENT MODULE CLASS include_if_file_exists(MODULES_DIR . $module['encrypted_dir'] . '/library.php'); include_once MODULES_DIR . $module['encrypted_dir'] . '/frontend.php'; } include_once SYSTEM_DIR . 'Executer.php'; /// MODULE EXECUTER } } } }
/** * 所有产生的记录 **/ public function all_table() { $this->load->helper(array('form', 'search')); /* 分页 */ $total_rows = $this->Admins->get_table_num()[0]['COUNT(id)']; $url = site_url('admin/all_table'); $page_config = set_page($url, $total_rows); $data['page'] = $this->pagination->create_links(); $header = page_header('所有送修记录', '送修记录表', $this->menu); $header['css'] = get_search_css(); $this->load->view('header', $header); /* 搜索框start */ $search = get_search_data(); $search['action'] = 'admin/search'; $this->load->view('publics/search', $search); /* 搜索框end */ $data['table'] = $this->Admins->get_all_table($page_config['nowindex'], $page_config['per_page']); $load_js = get_search_js(); array_push($load_js['js_array'], 'jquery.print.js'); $this->load->view('store/table', $data); $this->load->view('footer', $load_js); }
<?php require_once 'include/head.php'; // Form action and url handling if (!isset($_GET["goto"])) { $request_url = set_page(); } else { $request_url = $_SESSION["go_back_page"]; } if (!empty($_GET["order"])) { $regex = '/&order=[^&]*/'; $request_url4ordering = preg_replace($regex, '', $request_url); } else { $request_url4ordering = $request_url; } if (!empty($_GET["start"])) { $regex = '/&start=[^&]*/'; $request_url4limit = preg_replace($regex, '', $request_url); $request_url4ordering = preg_replace($regex, '', $request_url4ordering); $request_url4form = $request_url4ordering; } else { $request_url4limit = $request_url; $request_url4form = $request_url4ordering; } # Quantity if (!empty($_GET["quantity"])) { $regex = '/&quantity=[^&]*/'; $request_url4quantity = preg_replace($regex, '', $request_url); } else { $request_url4quantity = $request_url; }
public function tags($tags_name = '', $page = 1) { $this->data['keyWords'] = $this->news->keyWordExists($tags_name, 'filter_url_title'); if (!$this->data['keyWords']) { module_location(array('index?notice=unknowKeyWord')); } $this->data['countArticles'] = count($this->news->getKeyWordsArticles($this->data['keyWords'][0]['ID'], null, null, 'filter_id')); $this->data['paginate'] = pagination_helper(10, $this->data['countArticles'], $page, module_url(array('tags')), $RedirectUrl = array('error', 'code', 'page-404')); $this->data['tagArticles'] = $this->data['news']->getKeyWordsArticles($this->data['keyWords'][0]['URL_TITLE'], $this->data['paginate']['start'], $this->data['paginate']['end'], 'filter_url_title'); // $title = $this->data['page'][0]['PAGE_TITLE'] . ' » ' . $this->data['keyWords'][0]['TITLE'] . ' (mot-clé)'; $description = strip_tags($this->data['keyWords'][0]['DESCRIPTION']); // Fetching KeyWords Description // set_page('title', $title); set_page('description', $description); // get_core_vars('active_theme_object')->definePageTitle($title); get_core_vars('active_theme_object')->definePageDescription($description); // if ($this->data['tagArticles'] == false) { $this->data['tagArticles'] = array(array('TITLE' => 'Aucune publication disponible', 'CONTENT' => 'Aucune publication n\'est disponible pour ce mot-clé', 'AUTEUR' => '1', 'DATE' => get_instance()->date->datetime(), 'THUMB' => $this->url->img_url('hub_back.png'), 'IMAGE' => $this->url->img_url('hub_back.png'), 'ID' => 0)); } $this->data['section'] = 'keywords'; set_core_vars('module_content', $this->load->view(MODULES_DIR . $this->data['module']['encrypted_dir'] . '/views/common_keywords', $this->data, true, TRUE)); // ----------------------------------------------------------------------------------------------------------------------------------// get_core_vars('active_theme_object')->head($this->data); get_core_vars('active_theme_object')->body($this->data); }
public function manage($id) { if (!current_user_can('tendoo_contents@upload_media')) { $this->url->redirect(array('admin', 'index?notice=accessDenied')); } $this->file->js_url = $this->url->main_url() . $this->data['module_dir'] . '/js/'; $this->file->css_url = $this->url->main_url() . $this->data['module_dir'] . '/css/'; $this->file->js_push('jquery.Jcrop.min'); $this->file->css_push('jquery.Jcrop.min'); $this->load->library('form_validation'); if ($this->input->post('delete_file')) { if (!current_user_can('tendoo_contents@delete_media')) { $this->url->redirect(array('admin', 'index?notice=accessDenied')); } $this->form_validation->set_rules('delete_file', '', 'trim|required'); $this->form_validation->set_rules('content_id', '', 'trim|required|is_numeric'); if ($this->form_validation->run()) { $query = $this->file_contentAdmin->fileDrop($this->input->post('content_id')); if ($query) { $this->url->redirect(array('admin', 'open', 'modules', $this->opened_module['namespace'] . '?notice=done')); } else { $this->notice->push_notice(fetch_notice_output('error-occured')); } } } if ($this->input->post('edit_file')) { $this->load->library('form_validation'); $this->form_validation->set_rules('file_name', 'Le nom du fichier', 'trim|required|min_length[5]|max_length[40]'); $this->form_validation->set_rules('file_description', 'La description du fichier', 'trim|required|min_length[5]|max_length[200]'); $this->form_validation->set_rules('content_id', '', 'trim|required|min_length[1]'); $this->form_validation->set_rules('edit_file', '', 'trim|required|min_length[1]'); if ($this->form_validation->run()) { $query = $this->file_contentAdmin->editFile($this->input->post('content_id'), $this->input->post('file_name'), $this->input->post('file_description')); if ($query) { module_location(array('manage', $this->input->post('content_id') . '?notice=done')); } else { $this->notice->push_notice(fetch_notice_output('error-occured')); } } } if ($this->input->post('overwrite_file')) { $this->load->library('form_validation'); $this->form_validation->set_rules('overwrite_file', 'Ecraser l\'image', 'trim|required|min_length[5]|max_length[40]'); $this->form_validation->set_rules('x1', 'cordonnée', 'trim|required|min_length[1]'); $this->form_validation->set_rules('y1', 'cordonnée', 'trim|required|min_length[1]'); $this->form_validation->set_rules('x2', 'cordonnée', 'trim|required|min_length[1]'); $this->form_validation->set_rules('y2', 'cordonnée', 'trim|required|min_length[1]'); $this->form_validation->set_rules('w', 'cordonnée', 'trim|required|min_length[1]'); $this->form_validation->set_rules('h', 'cordonnée', 'trim|required|min_length[1]'); $this->form_validation->set_rules('image_id', 'Index de l\'image', 'trim|required|min_length[1]'); if ($this->form_validation->run()) { $query = $this->lib->overwrite_image($this->input->post('image_id'), $this->input->post('x1'), $this->input->post('y1'), $this->input->post('x2'), $this->input->post('y2'), $this->input->post('w'), $this->input->post('h')); if ($query) { $this->notice->push_notice(fetch_notice_output('done')); } else { $this->notice->push_notice(fetch_notice_output('error-occured')); } } } if ($this->input->post('change_file')) { $this->load->library('form_validation'); $this->form_validation->set_rules('content_id', 'cordonnée', 'trim|required|min_length[1]'); if ($this->form_validation->run()) { $query = $this->lib->fileReplace($this->input->post('content_id'), 'new_file'); $this->notice->push_notice(fetch_notice_output($query)); } } if ($this->input->post('create_new_file')) { $this->load->library('form_validation'); $this->form_validation->set_rules('create_new_file', 'Ecraser l\'image', 'trim|required|min_length[5]|max_length[40]'); $this->form_validation->set_rules('x1', 'cordonnée', 'trim|required|min_length[1]'); $this->form_validation->set_rules('y1', 'cordonnée', 'trim|required|min_length[1]'); $this->form_validation->set_rules('x2', 'cordonnée', 'trim|required|min_length[1]'); $this->form_validation->set_rules('y2', 'cordonnée', 'trim|required|min_length[1]'); $this->form_validation->set_rules('w', 'cordonnée', 'trim|required|min_length[1]'); $this->form_validation->set_rules('h', 'cordonnée', 'trim|required|min_length[1]'); $this->form_validation->set_rules('image_id', 'Index de l\'image', 'trim|required|min_length[1]'); if ($this->form_validation->run()) { $query = $this->lib->create_new_image($this->input->post('image_id'), $this->session->userdata('fileNewName'), $this->input->post('x1'), $this->input->post('y1'), $this->input->post('x2'), $this->input->post('y2'), $this->input->post('w'), $this->input->post('h')); $this->notice->push_notice(fetch_notice_output($query)); } } set_page('title', __('Editing Media')); $this->data['fileNewName'] = $this->lib->getName(); $this->session->set_userdata('fileNewName', $this->data['fileNewName']); $this->data['getFile'] = $this->file_contentAdmin->getUploadedFiles($id); if (count($this->data['getFile']) == 0) { $this->url->redirect(array('error', 'code', 'page-404')); } $this->data['id'] = $id; $this->data['loadSection'] = 'manage'; $this->data['body'] = $this->load->view(MODULES_DIR . $this->opened_module['encrypted_dir'] . '/views/manage', $this->data, true, TRUE); return $this->data['body']; }
// generate the help buttons with help text $.nconf_help_admin("direct"); }); </script> <!-- END of jQuery part --> <?php $URL = set_page(); if (DB_NO_WRITES == 1) { message($info, TXT_DB_NO_WRITES); } // host id if (!empty($_GET["id"])) { $host_ID = $_GET["id"]; } // set host_ID for jQuery echo '<input id="host_ID" type="hidden" value="' . $host_ID . '">'; // Prevent re-adding the host preset services when browser refreshin if (!empty($_SESSION["created_id"]) and $_SESSION["created_id"] == $host_ID) { // If there are problems, comment out the line bevore and use instead the next one: (uncomment it) #if( !empty($_GET["step2"]) ){ $step2 = "step2"; // remove info, to do not a reading on refreshing