public function set_id_user($id_user = null) { if ($id_user != null) { $this->id_user = $id_user; } else { $usr = new phpos_users(); $usr->get_logged_user(); $id_user = $usr->get_id_user(); $this->id_user = $id_user; } $this->get_all_user(); }
// user presses the "s" key case 27: phpos.windowClose(window.PHPOS_ACTIVE_WINDOW); } }); ' . $tips . ' //$(".bslink").bstip(); //tooltip(); '; $my_app->jquery_onready($keyboard); } } $my_user = new phpos_users(); $my_user->set_id_user($my_user->get_logged_user()); if ($my_user->user_id_exists()) { $my_user->get_user_by_id(); } $my_app->set_user($my_user); $my_user->assign_config($config); $my_user->get_logged_user(); define('MY_HOME_DIR', PHPOS_HOME_DIR . $my_user->get_home_dir_hash() . '/'); define('MY_HOME_URL', PHPOS_HOME_URL . $my_user->get_home_dir_hash() . '/'); define('PHPOS_ACCESS', true); include PHPOS_DIR . 'plugins/window.' . $apiWindow->getParam('wintype') . 'Plugin.php'; echo $my_app->render_javascript_jquery(); if (!$_POST['phpos_keep_result']) { $_SESSION['RESULT'] = NULL; $_SESSION['RESULT_STATUS'] = NULL; }
PHPOS Web Operating system MIT License (c) 2013 Marcin Szczyglinski szczyglis83@gmail.com GitHUB: https://github.com/phpos/ File version: 1.0.0, 2013.10.08 ********************************** */ if (!defined('PHPOS')) { die; } echo $layout->title(txt('your_account')); $usr = new phpos_users(); $usr->set_id_user($usr->get_logged_user()); if ($usr->user_id_exists()) { $usr->get_user_by_id(); } echo helper_result('my_update_user'); $form = new phpos_forms(); echo $form->form_start('my_update', helper_ajax('section.account.php'), array('app_params' => '')); echo $layout->txtdesc(txt('dsc_users_change_pass')); $form->reload_after_submit(array('nowy')); $form->input('hidden', 'action', '', '', 'my_update'); echo $layout->column('50%'); $form->title(txt('change_pass'), '', ICONS . 'auth_key.png'); $form->input('password', 'user_old_pass', txt('old_pass'), txt('dsc_users_account_old_pass_please'), ''); $form->condition('match', 'user_new_pass2', txt('pass_not_match')); $form->input('password', 'user_new_pass', txt('new_pass'), txt('dsc_users_account_pass'), ''); $form->input('password', 'user_new_pass2', txt('new_pass_c'), txt('dsc_users_account_pass_c'), '');
} elseif (!empty($_POST['lang'])) { $reqested_lang = filter::alfas($_POST['lang']); } $lang = new phpos_languages(); if (!empty($reqested_lang)) { if ($lang->lang_exists($reqested_lang)) { $login_language = $reqested_lang; $_SESSION['login_lang'] = $reqested_lang; } } $lang->lang_load($login_language); } else { $usr = new phpos_users(); $config = new phpos_config(); if ($usr->user_is_logged()) { $config->set_id_user($usr->get_logged_user()); } $usr->get_logged_user(); $access_level = $usr->get_access_level(); if (!empty($_GET['lang'])) { //$PHPOS_GLOBALCONFIG['lang'] = strtolower($_GET['lang']); //$PHPOS_USERCONFIG['lang'] = strtolower($_GET['lang']); $requested_lang = trim(filter::alfas(strtolower($_GET['lang']))); if ($langs->lang_exists($requested_lang)) { if ($config->get_global('demo_mode') != 1 || $access_level == 3) { $config->update_user('lang', $requested_lang); } else { $demo_lang = trim($requested_lang); $_SESSION['demo_lang'] = $demo_lang; } }
function myconfig($config_name, $config_value = null) { $usr = new phpos_users(); $config = new phpos_config(); if ($usr->user_is_logged()) { $config->set_id_user($usr->get_logged_user()); return $config->get_user($config_name); } }
public function user_have_access_section($section_id) { $access_section = $this->get_access_level_section($section_id); $user = new phpos_users(); $user->get_logged_user(); $access_user = $user->get_access_level(); if (empty($access_section)) { return false; } if ($access_user >= $access_section) { return true; } }
//$phpos_log->create_log('xxxx'); $_SESSION['DEBUG'] = false; /* if($_GET['root']) { $_SESSION['DEBUG'] = true; if($_SESSION['DEBUG']) define('DEBUG', true); } */ if ($_SESSION['logged_message'] == 1) { savelog('LOGIN#SUCCESS'); msg::ok(txt('msg_logged')); unset($_SESSION['logged_message']); } $user = new phpos_users(); $user->get_logged_user(); if (!empty($_GET['code'])) { $_SESSION['google_token'] = $_GET['code']; } //savelog('ACCESS#SUCCESS'); ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title><?php echo globalconfig('site_title'); ?> </title> <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"> <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">