if ($group->group_exists() && $group->im_in_group()) {
     $group->get_group();
     $count_users = $group->count_users();
     $records = $group->get_users_in_group();
     $title = '<img src="' . ICONS . 'server/workgroup.png' . '" style="width:30px; display:inline-block; vertical-align:middle" /> <span style="color:black">' . txt('workgroup') . ':</span> ' . $group->get_title();
     $html['icons'] .= $layout->area_start($title);
     $html['icons'] .= $layout->txtdesc(txt('shared_folders_serv_desc'));
     if ($count_users != 0) {
         foreach ($records as $row) {
             $action_open = link_action('shared', 'workgroup_id:' . $group_id . ',workgroup_user_id:' . $row['id_user'] . ',fs:local_files');
             $contextMenu_shared = array('open::' . txt('open') . '::' . $action_open . '::folder_open');
             $apiWindow->setContextMenu($contextMenu_shared);
             $js .= $apiWindow->contextMenuRender('groups_shared_list_' . $row['id_user'] . WIN_ID, 'img');
             $apiWindow->resetContextMenu();
             $tmp_usr = new phpos_users();
             $tmp_usr->set_id_user($row['id_user']);
             if ($tmp_usr->user_id_exists()) {
                 $user_info = $tmp_usr->get_user_by_id($row['id_user']);
                 $owner = '';
                 if ($row['id_user'] == $group->get_id_owner()) {
                     $owner = txt('owner') . '';
                 }
                 $html['icons'] .= '<div id="groups_shared_list_' . $row['id_user'] . WIN_ID . '" class="phpos_server_icon" title="<b>' . $group->get_title() . '</b> / ' . $user_info['user_login'] . '"><a href="javascript:void(0);" ondblclick="' . $action_open . '"><img src="' . ICONS . 'accounts/user-icon.png" /></a><p><b>' . $user_info['user_login'] . '</b><br />' . $user_info['user_email'] . '<br /><span class="desc">' . $owner . '</span></p></div>';
             }
         }
     } else {
         $html['icons'] .= txt('group_no_users');
     }
     $html['icons'] .= $layout->area_end();
     // right items
     $html['right_items_title'] = txt('explorer_right_groups');
 $tmp_pass1 = strip_tags($_POST['user_new_pass']);
 $tmp_pass2 = strip_tags($_POST['user_new_pass2']);
 $tmp_email = strip_tags($_POST['user_new_email']);
 $tmp_lang = strip_tags($_POST['user_new_lang']);
 //$tmp_group = intval(strip_tags($_POST['user_new_group']));
 if ($tmp_pass1 != $tmp_pass2) {
     helper_result('my_update_user_result', 'result', 'error');
     helper_result('my_update_user', 'error', txt('pass_not_match'));
 } else {
     //pass
     if (!empty($tmp_pass1) && (strlen($tmp_pass1) < 6 || strlen($tmp_pass1) > 30)) {
         helper_result('my_update_user_result', 'result', 'error');
         helper_result('my_update_user', 'error', txt('pass_length'));
     } else {
         $new_usr = new phpos_users();
         $new_usr->set_id_user($user_id);
         $new_usr->get_user_by_id();
         $error = 0;
         if (!empty($tmp_pass1)) {
             // check old pass
             if (!empty($tmp_old_pass)) {
                 // check pass
                 $pass_now_hash = $new_usr->get_user_pass();
                 //check new
                 $new_usr->set_raw_pass($tmp_old_pass);
                 $old_pass_hash = $new_usr->generate_password();
                 if ($pass_now_hash == $old_pass_hash) {
                     $new_usr->set_raw_pass($tmp_pass1);
                     $new_pass = $new_usr->generate_password();
                     $new_usr->set_user_pass($new_pass);
                 } else {
Beispiel #3
0
} else {
    echo $layout->empty_list();
}
echo $layout->tbl_end();
echo $layout->end('column');
echo $layout->column('33%');
echo $layout->subtitle(txt('groups_owner'), ICONS . 'workgroups.png');
echo $layout->txtdesc(txt('groups_own_desc'));
$groups = new phpos_groups();
$group_ids = $groups->get_my_own_groups();
$c = count($group_ids);
echo $layout->tbl_start();
$layout->td_classes(array('', '', 'tbl_grey'));
if ($c != 0) {
    echo $layout->head(array('<img src="' . ICONS . 'workgroups.png" />' => '20%', txt('name') => '40%', txt('owner') => '40%'));
    for ($i = 0; $i < $c; $i++) {
        $g = new phpos_groups();
        $g->set_id($group_ids[$i]['id']);
        $g->get_group();
        $usr_count = $g->count_users();
        $u = new phpos_users();
        $u->set_id_user($group_ids[$i]['id_owner']);
        $u->get_user_by_id();
        echo $layout->row(array($usr_count, '<a href="javascript:void(0);" onclick="' . helper_reload(array('section' => 'group_users', 'group_id' => $g->get_id())) . '">' . $g->get_title() . '</a>', $u->get_user_login()), $g->get_desc());
    }
} else {
    echo $layout->empty_list();
}
echo $layout->tbl_end();
echo $layout->end('column');
echo $layout->clr();
        echo $layout->empty_list();
    }
    echo $layout->end('column');
    // ----------------
    echo $layout->column('50%');
    echo $layout->subtitle(txt('group_out_group'), ICONS . 'status/status_error.png');
    echo $layout->txtdesc(txt('dsc_cp_groups_users_out'));
    // usrs in group
    $users_ids = $group->get_users_out_group();
    $c = count($users_ids);
    if ($c != 0) {
        echo $layout->tbl_start();
        echo $layout->head(array('<img src="' . ICONS . 'accounts/ico_admin.png" />' => '10%', 'Login' => '40%', txt('last_activity') => '30%', txt('action') => '30%'));
        for ($i = 0; $i < $c; $i++) {
            $u = new phpos_users();
            $u->set_id_user($users_ids[$i]['id_user']);
            $u->get_user_by_id();
            if ($u->get_last_activity() != 0) {
                $d = date('d.m.Y H:i:s', $u->get_last_activity());
            } else {
                $d = txt('never');
            }
            $action = helper_reload(array('section' => 'group_users', 'add_user_id' => $u->get_id_user()));
            echo $layout->row(array('<img src="' . ICONS . 'accounts/ico_admin.png"  style="height:20px"/>', $u->get_user_login(), $d, $layout->button(txt('group_add_user'), $action, 'edit_add')));
        }
        echo $layout->tbl_end();
    } else {
        echo $layout->empty_list();
    }
    echo $layout->end('column');
} else {
Beispiel #5
0
	GitHUB: https://github.com/phpos/
	File version: 1.0.0, 2013.10.08
 
**********************************
*/
if (!defined('PHPOS')) {
    die;
}
global $footer;
echo $layout->back_button(null, helper_reload(array('msg_id' => null)), null, null);
$msg = new phpos_messages();
$msg_data = $msg->get_msg($my_app->get_param('msg_id'));
$form = new phpos_forms();
//$form->onsuccess(helper_reload(array('section' => 'sended')));
echo $form->form_start('', '', array('app_params' => ''));
$form->texteditor('msg_body', null, null, $msg_data['msg']);
if ($msg->is_to_me($my_app->get_param('msg_id'))) {
    $u = new phpos_users();
    $u->set_id_user($msg_data['id_user_from']);
    $u->get_user_by_id();
    $authors = '<span style="color:black; font-weight:bold;font-size:16px">' . txt('messager_tbl_from') . ': ' . $u->get_user_login() . ' </span>';
    $form->button(txt('messager_btn_reply'), helper_reload(array('section' => 'new', 'reply_id' => $my_app->get_param('msg_id'))), 'reply');
} else {
    $u = new phpos_users();
    $u->set_id_user($msg_data['id_user_to']);
    $u->get_user_by_id();
    $authors = '<span style="color:black; font-weight:bold;font-size:16px">' . txt('messager_tbl_to') . ': ' . $u->get_user_login() . ' </span>';
}
$footer = '<img src="' . MY_RESOURCES_URL . 'msg2.png" />' . $authors . ' <b style="padding-left:30px;color:black">' . txt('messager_sent') . ':</b> ' . date('Y.m.d. H:i', $msg_data['sended_at']);
echo $form->render();
echo $form->form_end();
            $u_info->set_id_user($session_info['id_user']);
            $u_info->get_user_by_id();
            $tip = '<b>UID:</b> ' . $session_info['id_user'] . '<br /><b>' . txt('logs_sessions_fulltime') . '</b> ' . date('d.m.Y H:i:s', intval($session_info['start_time'])) . ' - ' . date('d.m.Y H:i:s', intval($session_info['end_time']));
            $usr_link = '<b>' . $u_info->get_user_login() . '</b> (UID: ' . $session_info['id_user'] . ')';
            $action = helper_reload(array('section' => 'sessions', 'action' => 'delete_session', 'id_session' => $session_info['id_session']));
            echo $layout->row(array($session_info['id_session'], date('d.m.Y H:i:s', intval($session_info['start_time'])), date('d.m.Y H:i:s', intval($session_info['end_time'])), $usr_link, $session_info['user_ip'], $session_info['user_browser'], $session_info['php_sessid'], $layout->button(txt('btn_delete'), $action, 'cancel')), $tip);
        }
        echo $layout->tbl_end();
    }
} else {
    // log session
    $sessions = new phpos_users();
    if ($sessions->is_session_id($id_session)) {
        echo $layout->subtitle($txt['logs_section_sessions_view_title'], ICONS . 'logs/section_sessions.png');
        echo $layout->txtdesc($txt['logs_section_sessions_view_desc']);
        echo $layout->tbl_start();
        $layout->td_classes(array(''));
        echo $layout->head(array(txt('logs_section_sessions_tbl_id') => '5%', txt('logs_section_sessions_tbl_starttime') => '10%', txt('logs_section_sessions_tbl_endtime') => '10%', txt('logs_section_sessions_tbl_user') => '25%', txt('logs_section_sessions_tbl_ip') => '15%', txt('logs_section_sessions_tbl_browser') => '20%', txt('logs_section_sessions_tbl_sid') => '5%', txt('logs_section_sessions_tbl_action') => '10%'));
        $session_info = $sessions->get_session_id_data($id_session);
        $tip = '<b>UID:</b> ' . $session_info['id_user'] . '<br /><b>' . txt('logs_sessions_fulltime') . '</b> ' . date('d.m.Y H:i:s', intval($session_info['start_time'])) . ' - ' . date('d.m.Y H:i:s', intval($session_info['end_time']));
        $u_info = new phpos_users();
        $u_info->set_id_user($session_info['id_user']);
        $u_info->get_user_by_id();
        $usr_link = '<b>' . $u_info->get_user_login() . '</b> (UID: ' . $session_info['id_user'] . ')';
        $action = helper_reload(array('section' => 'sessions', 'action' => 'delete_session', 'id_session' => $session_info['id_session']));
        echo $layout->row(array($session_info['id_session'], date('d.m.Y H:i:s', intval($session_info['start_time'])), date('d.m.Y H:i:s', intval($session_info['end_time'])), $usr_link, $session_info['user_ip'], $session_info['user_browser'], $session_info['php_sessid'], $layout->button(txt('btn_delete'), $action, 'cancel')), $tip);
        echo $layout->tbl_end();
    } else {
        echo 'Session not exists in DB.';
    }
}
Beispiel #7
0
    public function render_address_links()
    {
        $links = $this->get_address_links();
        $c = count($links);
        $separator = '<img class="arrow" 
		src="' . THEME_URL . 'icons/arrow_small_right.png">';
        global $my_app;
        $tmp_shared_id = $my_app->get_param('tmp_shared_id');
        if (!empty($tmp_shared_id)) {
            $shared = new phpos_shared();
            $shared->set_id($tmp_shared_id);
            $shared->get_shared();
            $shared_dir = $shared->get_folder_id();
        }
        $in_shared = $my_app->get_param('in_shared');
        /*.............................................. */
        // If not in shared:
        if (!$in_shared) {
            if ($c != 0) {
                for ($i = 0; $i < $c; $i++) {
                    $item = $this->filesystem->get_file_info($links[$i]);
                    if ($item['id'] != $shared_dir) {
                        if (is_root()) {
                            $item = $this->root_homedir_address_parse($item);
                        }
                        $address .= '<a 
						onclick="' . helper_reload(array('dir_id' => $item['id'])) . '" 
						href="javascript:void(0);">' . $item['basename'] . '</a>' . $separator;
                    }
                }
            }
        }
        $address_start = '<a onclick="' . helper_reload(array('dir_id' => $this->filesystem->get_root_directory_id())) . '" 
		href="javascript:void(0);"><b>' . $this->filesystem->protocol_name . '</b></a>';
        /*.............................................. */
        if (APP_ACTION == 'my_server') {
            $address_start = '<a onclick="' . helper_reload(array('dir_id' => $this->filesystem->get_root_directory_id())) . '" 
			href="javascript:void(0);"><b>' . txt('my_server') . '</b></a>';
        }
        /*.............................................. */
        if (APP_ACTION == 'cp') {
            $address_start = '<a onclick="' . helper_reload(array('dir_id' => $this->filesystem->get_root_directory_id())) . '" 
			href="javascript:void(0);"><b>' . txt('control_panel') . '</b></a>';
        }
        /*.............................................. */
        if (APP_ACTION == 'shared') {
            $group = new phpos_groups();
            $group_id = $my_app->get_param('workgroup_id');
            if (!empty($group_id)) {
                $group->set_id($group_id);
                $group->get_group();
                $group_user = new phpos_users();
                $id_user = $my_app->get_param('workgroup_user_id');
                $group_user->set_id_user($id_user);
                $group_user->get_user_by_id();
                $address_start = '<a onclick="phpos.windowActionChange(\'' . WIN_ID . '\', \'workgroup\', \'workgroup_id:' . $group_id . ',fs:local_files\')" href="javascript:void(0);"><b>' . $group->get_title() . '</b></a>' . $separator . '<a onclick="phpos.windowActionChange(\'' . WIN_ID . '\', \'shared\', \'workgroup_id:' . $group_id . ',workgroup_user_id:' . $id_user . ',fs:local_files\')" href="javascript:void(0);"><b>' . $group_user->get_user_login() . '</b></a>';
            } else {
                $id_user = logged_id();
                $group_user = new phpos_users();
                $group_user->set_id_user($id_user);
                $group_user->get_user_by_id();
                $address_start = '<a onclick="phpos.windowActionChange(\'' . WIN_ID . '\', \'shared\', \'workgroup_id:0,fs:local_files\')" href="javascript:void(0);"><b>' . $group_user->get_user_login() . '</b></a>';
            }
        }
        /*.............................................. */
        if (APP_ACTION == 'workgroup') {
            $group = new phpos_groups();
            $group_id = $my_app->get_param('workgroup_id');
            if (!empty($group_id)) {
                $group->set_id($group_id);
                $group->get_group();
                $address_start = '<a onclick="phpos.windowActionChange(\'' . WIN_ID . '\', \'workgroup\', \'workgroup_id:' . $group_id . ',fs:local_files\')" href="javascript:void(0);"><b>' . $group->get_title() . '</b></a>';
            } else {
                $address_start = '<a onclick="phpos.windowActionChange(\'' . WIN_ID . '\', \'workgroup\', \'workgroup_id:0,fs:local_files\')" href="javascript:void(0);"><b>Workgroups</b></a>';
            }
        }
        $in_shared = $my_app->get_param('in_shared');
        $tmp_shared_id = $my_app->get_param('tmp_shared_id');
        /*.............................................. */
        if (APP_ACTION == 'index' && (defined('SHARED') || $in_shared)) {
            $group = new phpos_groups();
            $group_id = $my_app->get_param('workgroup_id');
            $group->set_id($group_id);
            $group->get_group();
            $shared_id = $my_app->get_param('tmp_shared_id');
            $shared = new phpos_shared();
            $shared->set_id($shared_id);
            $shared->get_shared();
            $group_user = new phpos_users();
            $id_user = $shared->get_id_user();
            $group_user->set_id_user($id_user);
            $group_user->get_user_by_id();
            $address_start = '<a 
			onclick="phpos.windowActionChange(\'' . WIN_ID . '\', \'shared\', \'workgroup_id:' . $group_id . ',workgroup_user_id:' . $id_user . ',fs:local_files\')" href="javascript:void(0);"><b>' . $group_user->get_user_login() . '</b></a>' . $separator . '<a onclick="phpos.windowActionChange(\'' . WIN_ID . '\', \'index\', \'shared_id:' . $shared_id . ',in_shared:1,fs:local_files\')" href="javascript:void(0);"><b>' . $shared->get_title() . '</b></a>';
        }
        /*.............................................. */
        //if(APP_ACTION != 'index') $address = '';
        $address_bar = $address_start . $separator . $address;
        $ftp_id = $my_app->get_param('ftp_id');
        if (!empty($ftp_id)) {
            $ftp = new phpos_ftp();
            $ftp->set_id($ftp_id);
            $ftp->get_ftp();
            $address_bar = '<a 
			onclick="phpos.windowActionChange(\'' . WIN_ID . '\', \'index\', \'dir_id:.,ftp_id:' . $ftp_id . ',in_shared:1,fs:ftp\')"  href="javascript:void(0);"><b>' . $ftp->get_login() . '@' . $ftp->get_host() . '</b></a>' . $separator;
        }
        return $address_bar;
    }
	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'), '');
Beispiel #9
0
    $c = $msg->count_sended();
    echo $layout->subtitle(txt('messager_sended_title'), MY_RESOURCES_URL . 'msg_sended.png');
    echo $layout->txtdesc(txt('messager_sended_desc'));
    echo $layout->tbl_start();
    echo $layout->head(array('' => '5%', txt('messager_tbl_message') => '40%', '<img style="display:inline-block; vertical-align:middle" src="' . MY_RESOURCES_URL . 'time_icon.png" /> ' . txt('messager_tbl_sended') => '15%', '<img style="display:inline-block; vertical-align:middle" src="' . MY_RESOURCES_URL . 'time_icon.png" /> ' . txt('messager_tbl_readed') => '15%', '<img style="display:inline-block; vertical-align:middle" src="' . MY_RESOURCES_URL . 'user_icon.png" />' . txt('messager_tbl_to') => '15%', txt('messager_tbl_actions') => '15%'));
    if ($c != 0) {
        $records = $msg->get_sended();
        foreach ($records as $row) {
            $icon = MY_RESOURCES_URL . 'readed_icon.png';
            $readed = date('Y.m.d H:i', $row['readed_at']);
            $title = $row['title'];
            if (!$msg->is_readed($row['id'])) {
                $icon = MY_RESOURCES_URL . 'unreaded_icon.png';
                $title = '<b>' . $row['title'] . '</b>';
                $readed = txt('messager_tbl_not_yet');
            }
            $delete_action = "\n\t\t\t\$.messager.confirm('" . txt('delete') . "', '" . txt('delete_confirm') . "?', function(r){\n\t\t\tif (r){\n\t\t\t\t" . helper_reload(array('delete_sended_id' => $row['id'])) . "\n\t\t\t}\n\t\t\t});\t";
            //helper_reload(array('delete_sended_id' => $row['id']));
            $u = new phpos_users();
            $u->set_id_user($row['id_user_to']);
            $u->get_user_by_id();
            $row_items = array('<img src="' . $icon . '" />', '<a href="javascript:void(0);" onclick="' . helper_reload(array('msg_id' => $row['id'])) . '">' . $title . '</a>', date('Y.m.d H:i', $row['sended_at']), $readed, $u->get_user_login(), $layout->button(txt('delete'), $delete_action, 'cancel'));
            echo $layout->row($row_items, string_cut(strip_tags($row['msg'], '<br>'), 100));
        }
    } else {
        echo $layout->empty_list();
    }
    echo $layout->tbl_end();
} else {
    include MY_APP_DIR . 'views/view_message.php';
}
        $lang_name = $lang_data['eng_name'] . ' (' . $lang_data['local_name'] . ')';
        $lang_items[$lang_id] = $lang_name;
    }
    $form->select('user_new_lang', txt('language'), txt('dsc_users_account_lang'), $lang_items, myconfig('lang'));
    $form->status();
    $form->submit('', txt('btn_create'), 'edit_add', 'right');
    //$form->button('', 'button', 'edit_add');
    echo $form->render();
    echo $layout->end('column');
    echo $layout->clr();
    echo $form->form_end();
} else {
    echo $layout->title(txt('usr_new'), 'icon.png');
    echo $layout->column('50%');
    echo helper_result('new_user');
    echo '<img src="' . MY_RESOURCES_URL . 'user_added_img.png" style="width:100px;padding-left:50px"/>';
    echo $layout->end('column');
    echo $layout->column('50%');
    $result = helper_result('new_user_result');
    $result_id = helper_result('new_user_id');
    if ($result == 'success' && !empty($result_id)) {
        $usr = new phpos_users();
        $usr->set_id_user($result_id);
        if ($usr->user_id_exists()) {
            $usr->get_user_by_id();
        }
        include MY_APP_DIR . 'views/inc.account_info.php';
    }
    echo $layout->end('column');
    echo $layout->clr();
}
Beispiel #11
0
echo $form->form_start('new_msg', '', array('app_params' => ''));
$form->input('hidden', 'action', '', '', 'new_msg');
echo $layout->column('50%');
$form->condition('not_null', true, txt('login_empty'));
$form->input('text', 'msg_title', txt('messager_form_title'), txt('messager_form_title_desc'), $start_title);
$form->status();
echo $form->render();
echo $layout->end('column');
echo $layout->column('50%');
$users = new phpos_users();
$users_ids = $users->get_users('ALL');
$i = 0;
$my_id = logged_id();
foreach ($users_ids as $id) {
    $usr_info = new phpos_users();
    $usr_info->set_id_user($id);
    $usr_info->get_user_by_id();
    $items[$id] = $usr_info->get_user_login();
    if ($my_id == $id) {
        $items[$id] = txt('messager_tbl_me');
    }
    $i++;
}
$reply_id = $my_app->get_param('reply_id');
$start_user_to = '';
$start_title = '';
$start_msg = '';
if ($reply_id !== null) {
    $msg = new phpos_messages();
    $reply = $msg->get_msg($reply_id);
    $start_user_to = $reply['id_user_from'];
 public function create_log($row)
 {
     if (!empty($row)) {
         $data = $this->get_log_file_data();
         $my_id = logged_id();
         $u = new phpos_users();
         $u->set_id_user($my_id);
         $u->get_user_by_id();
         $id_session = $u->get_my_session_id();
         $log = 'LOG| date: ' . date('Y.m.d H:i:s') . '; timestamp: ' . time() . '; UID: ' . $my_id . '; ULOGIN: '******'; IP: ' . getIP() . '; ACTION: {' . str_replace(';', ',', strip_tags($row)) . '}; IDSESSION: ' . $id_session;
         $new_data = $log . ';;' . PHP_EOL . $data;
         $this->log_file_data = $new_data;
         if ($this->save_log_file()) {
             return true;
         }
     }
 }
Beispiel #13
0
	(c) 2013 Marcin Szczyglinski
	szczyglis83@gmail.com
	GitHUB: https://github.com/phpos/
	File version: 1.0.0, 2013.10.08
 
**********************************
*/
if (!defined('PHPOS')) {
    die;
}
if (!defined('PHPOS_EXPLORER_PLUGIN')) {
    die;
}
$items = null;
$u = new phpos_users();
$u->set_id_user(logged_id());
$u->get_user_by_id();
$hash = $u->get_home_dir_hash();
$dir = PHPOS_HOME_DIR . $hash . '/';
$default_span = 'color:black';
$marked_span = 'color:black;font-weight:bold';
$span['desktop'] = $default_span;
$span['docs'] = $default_span;
$span['pics'] = $default_span;
$span['wallpapers'] = $default_span;
$span['icons'] = $default_span;
$span['video'] = $default_span;
$span['temp'] = $default_span;
$dir_id = $my_app->get_param('dir_id');
switch ($dir_id) {
    case $dir . '_Desktop':
Beispiel #14
0
         $js .= $apiWindow->contextMenuRender('groups_shared_folders_' . $row['id'] . WIN_ID, 'img');
         $apiWindow->resetContextMenu();
         $html['icons'] .= '<div id="groups_shared_folders_' . $row['id'] . WIN_ID . '" title="<b>' . $row['title'] . '</b> ' . $row['desc'] . '" class="phpos_server_icon"><a href="javascript:void(0);" ondblclick="' . $action_open . '"><img src="' . ICONS . 'server/shared1.png" /></a><p><b>' . $row['title'] . '</b><br />' . string_cut($row['description'], 20) . '<br /><span class="desc">' . $user_info['user_login'] . '</span></p></div>';
     }
     $html['icons'] .= $layout->area_end();
     // right items
     $html['right_items_title'] = txt('explorer_right_group_users');
     $html['right_items_desc'] = txt('explorer_right_group_users_desc');
     $html['right_items_img'] = 'shared1.png';
     //$group->get_group();
     $users_in_group = $group->get_users_in_group();
     $k = count($users_in_group);
     if ($k != 0) {
         foreach ($users_in_group as $grp_user) {
             $usr_data = new phpos_users();
             $usr_data->set_id_user($grp_user['id_user']);
             $usr_data->get_user_by_id();
             $right_item['name'] = $usr_data->get_user_login();
             $right_item['onclick'] = link_action('shared', 'workgroup_id:' . $workgroup_id . ',workgroup_user_id:' . $grp_user['id_user'] . ',fs:local_files');
             $right_item['icon'] = 'user.png';
             $right_item['marked'] = false;
             if ($shared_id_user == $grp_user['id_user']) {
                 $right_item['marked'] = true;
             }
             $explorer_right_items[] = $right_item;
         }
     }
     /* ================================================== */
 } else {
     $html['icons'] = $layout->area_start(txt('shared_error')) . $layout->txtdesc(txt('st_shared')) . txt('shared_not_exists') . $layout->area_end();
 }
Beispiel #15
0
		<td><b>id_user</b></td>
		<td><b>user_login</b></td>
		<td><b>user_pass</b></td>
		<td><b>user_email</b></td>
		<td><b>user_type</b></td>
		<td><b>id_group</b></td>
		<td><b>is_active</b></td>
		<td><b>created_at</b></td>
		<td><b>last_login</b></td>
		<td><b>last_activity</b></td>
		<td><b>note</b></td>
		<td><b>X</b></td>
		</tr>';
    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>
 public function installer_db_set_data()
 {
     $root_time = time();
     include PHPOS_DIR . 'config/security_key.php';
     if (empty($phpos_key) || empty($_SESSION['phpos_install_data']['root_password1'])) {
         return false;
     }
     if ($_SESSION['phpos_install_data']['root_password1'] != $_SESSION['phpos_install_data']['root_password2']) {
         // not match
     }
     global $sql;
     require PHPOS_DIR . 'install/db_schema.php';
     if (is_array($insert)) {
         foreach ($insert as $table => $record) {
             if (!$sql->insert_array($record, $table)) {
                 $_SESSION['mysql_error'] = $sql->get_error('parse');
                 $this->set_sql_error('db_update');
                 return false;
             }
         }
     }
     $usr = new phpos_users();
     $usr->set_id_user(1);
     $usr->get_user_by_id();
     $usr->set_created_at($root_time);
     $usr->set_user_email($_SESSION['phpos_install_data']['cfg_email']);
     $usr->set_raw_pass($_SESSION['phpos_install_data']['root_password1']);
     $root_pwd = $usr->generate_password();
     $usr->set_user_pass($root_pwd);
     if ($usr->update()) {
         //echo 'uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu'.$root_pwd;
         $this->set_ok('db_update');
         // home dir
         if ($usr->create_home_dir()) {
             $this->set_ok('home_dir_ok');
         } else {
             $this->set_warn('home_dir_warn');
         }
         $t = time();
         // Save config
         $cfg = new phpos_config('phpos_config');
         $cfg->update_global('lang', $_SESSION['phpos_install_data']['cfg_lang']);
         $cfg->update_global('wallpaper', $_SESSION['phpos_install_data']['cfg_wallpaper']);
         $cfg->update_global('site_title', $_SESSION['phpos_install_data']['cfg_title']);
         $cfg->update_global('root_email', $_SESSION['phpos_install_data']['cfg_email']);
         $cfg->update_global('version', PHPOS_VERSION);
         $cfg->update_global('versionnumber', PHPOS_VERSIONNUMBER);
         $cfg->update_global('build', PHPOS_BUILD);
         $cfg->update_global('install_time', $t);
         $cfg->update_global('update_time', $t);
         //$cfg->update_global('key_copy', $phpos_key);
         $cfg->set_id_user(1);
         $cfg->update_user('lang', $_SESSION['phpos_install_data']['cfg_lang']);
         $cfg->update_user('wallpaper', $_SESSION['phpos_install_data']['cfg_wallpaper']);
         $cfg->update_user('wallpaper_type', 'global');
         return true;
     } else {
         $_SESSION['mysql_error'] = $sql->get_error('parse');
         $this->set_sql_error('db_update');
     }
 }
function activity()
{
    $usr = new phpos_users();
    $usr->set_id_user(logged_id());
    $usr->activity();
}
						// 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;
    }
$msg_id = $my_app->get_param('msg_id');
if ($msg_id === null) {
    $msg = new phpos_messages();
    $c = $msg->count_received();
    echo $layout->subtitle(txt('messager_received_title'), MY_RESOURCES_URL . 'msg_received.png');
    echo $layout->txtdesc(txt('messager_received_desc'));
    echo $layout->tbl_start();
    echo $layout->head(array('' => '5%', txt('messager_tbl_message') => '40%', '<img style="display:inline-block; vertical-align:middle" src="' . MY_RESOURCES_URL . 'time_icon.png" /> ' . txt('messager_tbl_received') => '15%', '<img style="display:inline-block; vertical-align:middle" src="' . MY_RESOURCES_URL . 'user_icon.png" />' . txt('messager_tbl_from') => '15%', txt('messager_tbl_actions') => '30%'));
    if ($c != 0) {
        $records = $msg->get_received();
        foreach ($records as $row) {
            $icon = MY_RESOURCES_URL . 'readed_icon.png';
            $title = $row['title'];
            if (!$msg->is_readed($row['id'])) {
                $icon = MY_RESOURCES_URL . 'unreaded_icon.png';
                $title = '<b>' . $row['title'] . '</b>';
            }
            $delete_action = helper_reload(array('delete_received_id' => $row['id']));
            $u = new phpos_users();
            $u->set_id_user($row['id_user_from']);
            $u->get_user_by_id();
            $row_items = array('<img src="' . $icon . '" />', '<a href="javascript:void(0);" onclick="' . helper_reload(array('msg_id' => $row['id'])) . '">' . $title . '</a>', date('Y.m.d H:i', $row['sended_at']), $u->get_user_login(), $layout->button('Delete', $delete_action, 'cancel'));
            echo $layout->row($row_items, string_cut(strip_tags($row['msg'], '<br>'), 100));
        }
    } else {
        echo $layout->empty_list();
    }
    echo $layout->tbl_end();
} else {
    include MY_APP_DIR . 'views/view_message.php';
}