Пример #1
0
 
**********************************
*/
if (!defined('PHPOS')) {
    die;
}
if (APP_ACTION == 'shared') {
    $html['right_items_img'] = 'shared1.png';
    $shared_id = $my_app->get_param('shared_id');
    $workgroup_id = $my_app->get_param('workgroup_id');
    $address_icon = ICONS . 'server/shared1.png';
    if (!empty($workgroup_id)) {
        $group = new phpos_groups();
        $group->set_id($workgroup_id);
        $group->get_group();
        if ($group->im_in_group()) {
            $group_name = $group->get_title();
            $shared = new phpos_shared();
            $shared_id_user = $my_app->get_param('workgroup_user_id');
            $shared->set_id_user($shared_id_user);
            $records = $shared->get_user_shared();
            $group_user = new phpos_users();
            $group_user->set_id_user($shared_id_user);
            $group_user->get_user_by_id();
            $title = '<img src="' . ICONS . 'server/workgroup.png' . '" style="width:30px; display:inline-block; vertical-align:middle" /> <span style="color:black">' . txt('workgroup') . ':</span> ' . $group_name;
            $html['icons'] .= $layout->area_start($title);
            $html['icons'] .= $layout->txtdesc(txt('st_shared'));
            $html['icons'] .= $layout->subtitle($group_user->get_user_login(), ICONS . 'user.png');
            foreach ($records as $row) {
                $tmp_usr = new phpos_users();
                $user_info = $tmp_usr->get_user_by_id($row['id_user']);
Пример #2
0
	szczyglis83@gmail.com
	GitHUB: https://github.com/phpos/
	File version: 1.0.0, 2013.10.08
 
**********************************
*/
if (!defined('PHPOS')) {
    die;
}
if (APP_ACTION == 'workgroup') {
    $address_icon = ICONS . 'server/workgroup.png';
    if ($my_app->get_param('workgroup_id') != 0) {
        $group = new phpos_groups();
        $group_id = $my_app->get_param('workgroup_id');
        $group->set_id($group_id);
        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']);