for ($i = 0; $i < $c; $i++) { $u = new phpos_users(); $u->set_id_user($users_ids[$i]); $u->get_user_by_id(); $id = $u->get_id_user(); $class = 'phpos_table_row1'; if ($i % 2 == 0) { $class = 'phpos_table_row2'; } echo '<tr class="' . $class . '"> <td>' . $users_ids[$i] . '</td> <td>' . $u->get_id_user() . '</td> <td>' . $u->get_user_login() . '</td> <td>' . $u->get_user_pass() . '</td> <td>' . $u->get_user_email() . '</td> <td>' . $u->get_user_type() . '</td> <td>' . $u->get_id_group() . '</td> <td>' . $u->get_is_active() . '</td> <td>' . $u->get_created_at() . '</td> <td>' . $u->get_last_login() . '</td> <td>' . $u->get_last_activity() . '</td> <td>' . $u->get_note() . '</td> <td><a href="javascript:void(0);" onclick="' . helper_reload(array('delete_id' => $id)) . '"><span style="color:red">(x)</span></a></td> </tr>'; unset($u); } echo '</table>'; } ?>
//$form->condition('not_null', true , 'Password is empty'); //$form->condition('min', 6, 'Password must have min 6 chars'); //$form->condition('max', 30, 'Password can have max 30 chars'); $form->condition('match', 'user_new_pass2', txt('pass_not_match')); $form->input('password', 'user_new_pass', '<span style=color:#7e1414>' . txt('new_pass') . '</span>', txt('dsc_users_account_pass'), ''); //$form->condition('not_null', true , 'Password confirmation is empty'); $form->input('password', 'user_new_pass2', '<span style=color:#7e1414>' . txt('new_pass_c') . '</span>', txt('dsc_users_account_pass_c'), ''); $form->input('text', 'user_new_email', 'Email', txt('dsc_users_account_email'), $usr->get_user_email()); echo $form->render(); echo $layout->end('column'); echo $layout->column('50%'); $form->title(txt('usr_account_params'), '', ICONS . 'small_options.png'); $items = array('1' => txt('yes'), '0' => txt('no')); $form->radio('user_new_active', txt('active'), txt('dsc_users_account_active'), $items, $usr->get_is_active()); $items = array('1' => txt('user_user'), '2' => txt('user_admin')); $form->radio('user_new_type', 'Type', txt('dsc_users_account_type'), $items, $usr->get_user_type()); $languages = new phpos_languages(); $langs_array = $languages->get_lang_list(); $lang_items = array(); foreach ($langs_array as $lang_id) { $lang_data = $languages->get_lang_info($lang_id); $lang_name = $lang_data['eng_name'] . ' (' . $lang_data['local_name'] . ')'; $lang_items[$lang_id] = $lang_name; } $new_cfg = new phpos_config('no_get'); $new_cfg->set_id_user($user_id); $lang = $new_cfg->get_user('lang'); $form->select('user_new_lang', txt('language'), txt('dsc_users_account_lang'), $lang_items, $lang); $form->status(); $delete_action = "\n\t\t\t\$.messager.confirm('" . txt('delete') . "', '" . txt('delete_confirm') . "?', function(r){\n\t\t\tif (r){\n\t\t\t\tphpos.windowRefresh('" . WIN_ID . "', 'section:list,action:delete,delete_id:" . $user_id . "');\t\n\t\t\t}\n\t\t\t});\t"; $form->button(txt('delete'), $delete_action, 'cancel');
<div id="phpos_startmenu_layout_right" data-options="region:'center',title:''"> <div class="user_area"><img src="<?php echo PHPOS_WEBROOT_URL; ?> _phpos/themes/default/icons/user_medium.png"><br /><span class="user_name"><?php $user = new phpos_users(); $user->get_logged_user(); echo $user->get_user_login(); ?> </span><br /><span class="user_type"><?php $user_type = $user->get_user_type(); switch ($user_type) { case '1': $usr_str = txt('user_user'); break; case '2': $usr_str = txt('user_admin'); break; case '3': $usr_str = '<span style="color:#FFF;background-color:#c91b1f;font-weight:bold;padding:2px;margin:2px">' . txt('user_root') . '</span>'; break; } echo $usr_str; ?> </span><br /><span class="user_ip">IP <?php echo getIP();