public function update($title, $plugin = 'app', $app_id = null, $app_action = 'index', $icon = null, $post_app_params = null, $location = null, $id) { if (is_array($post_app_params)) { $c = count($post_app_params); if ($c != 0) { $app_params = array(); foreach ($post_app_params as $key => $value) { $app_params[] = $key . ':' . $value; } $db_app_params = implode(',', $app_params); } } global $my_user; if ($icon == 'null') { $icon = ''; } $items = array('file_title' => filter::utf($title), 'id_user' => $my_user->get_id_user(), 'plugin_id' => filter::alfas($plugin), 'app_id' => filter::alfas($app_id), 'app_action' => filter::alfas($app_action), 'modified_at' => time(), 'app_params' => $db_app_params, 'icon' => filter::fname($icon)); global $sql; $sql->cond('id_file', $id); if ($sql->update($this->db_shortcuts, $items)) { return true; } }
msg::ok($txt('updated')); } } else { $my_app->set_param('action_status', 'error'); $my_app->set_param('action_status_msg', txt('access_denied')); cache_param('action_status'); cache_param('action_status_msg'); msg::error($txt('access_denied')); } } /* ************************** */ if (form_submit('new_folder')) { if ($readonly != 1) { if ($phposFS->new_dir(strip_tags(filter::fname($_POST['new_folder_name'])))) { $my_app->set_param('action_status', 'ok'); $my_app->set_param('action_status_msg', txt('folder_created')); cache_param('action_status'); cache_param('action_status_msg'); msg::ok($txt('created')); } else { $my_app->set_param('action_status', 'error'); $my_app->set_param('action_status_msg', txt('folder_create_error')); cache_param('action_status'); cache_param('action_status_msg'); msg::ok($txt('created')); } } else { $my_app->set_param('action_status', 'error'); $my_app->set_param('action_status_msg', txt('access_denied'));
define('PHPOS_IN_LOADER', true); require_once PHPOS_DIR . 'config/core.php'; require_once PHPOS_DIR . 'config/database.php'; // Load all classes and functions require_once PHPOS_DIR . 'controllers/databaseController.php'; require_once PHPOS_DIR . 'classes/class.users.php'; require_once PHPOS_DIR . 'classes/class.phpos_config.php'; $config = new phpos_config(); //$config->get_logged_user(); $config->set_id_user(); require_once PHPOS_DIR . 'classes/class.helpers.php'; define("PHPOS_SYSTEM_LANG", cfg::get('lang')); define("PHPOS_USER_LANG", cfg::uget('lang')); require_once PHPOS_DIR . 'classes/class.api_wintask.php'; require_once PHPOS_DIR . 'classes/class.api_processes.php'; require_once PHPOS_DIR . 'classes/class.languages.php'; require_once PHPOS_DIR . 'controllers/languageController.php'; require_once PHPOS_DIR . 'controllers/helpersController.php'; require_once PHPOS_DIR . 'classes/class.phpos_tasks.php'; if (!empty($_GET['action'])) { switch (filter::alfas($_GET['action'])) { case 'update': if (globalconfig('demo_mode') != 1 || is_root()) { $config->update_user('wallpaper', filter::fname($_GET['wallpaper'])); $config->update_user('wallpaper_type', filter::fname($_GET['wallpaper_type'])); } break; default: break; } }
********************************** */ if (!defined('PHPOS')) { die; } cache_param('navigation_index'); cache_param('action_status'); cache_param('readonly'); cache_param('win_id'); cache_param('api_dialog'); cache_param('api_dialog_type'); cache_param('api_file_ext'); cache_param('explorer_save_as_filename'); cache_param('api_action'); if (!empty($_POST['explorer_save_as_filename'])) { $my_app->set_param('explorer_save_as_filename', filter::fname($_POST['explorer_save_as_filename'])); } /*.............................................. */ $explorerAPI = new phpos_explorerAPI(); $explorerAPI->set_window_id($my_app->get_param('win_id')); $my_app->set_param('api_action', $explorerAPI->get_action()); cache_param('api_action'); /*.............................................. */ if ($my_app->get_param('api_open_id') != null) { $my_app->set_param('opened_file_id', base64_decode($my_app->get_param('api_open_id'))); cache_param('opened_file_id'); } // api load file if ($my_app->get_param('api_dialog') !== null && $my_app->get_param('opened_file_id') !== null) { $phposFS->set_api_file_id($my_app->get_param('opened_file_id')); $api_file_content = $phposFS->get_file_content();