}
         $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();
     }
     /* ================================================== */
 } else {
     $tmp_html = '';
             $html['icons'] .= txt('group_no_users');
         }
         $html['icons'] .= $layout->area_end();
         // right items
         $html['right_items_title'] = txt('explorer_right_groups');
         $html['right_items_desc'] = txt('explorer_right_groups_desc');
         $html['right_items_img'] = 'workgroup.png';
         //$group->get_group();
         $users_in_group = $group->get_users_in_group();
         $groups = new phpos_groups();
         $groups_records = $groups->get_my_groups();
         $k = count($users_in_group);
         if ($k != 0) {
             foreach ($groups_records as $group_row) {
                 $right_item['name'] = $group_row['title'];
                 $right_item['onclick'] = link_action('workgroup', 'shared_id:0,workgroup_id:' . $group_row['id'] . ',fs:ftp');
                 $right_item['icon'] = 'workgroup.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('group_error')) . txt('group_not_exists') . $layout->area_end();
     }
     /* ================================================== */
 } else {
     $tmp_html = '';
	GitHUB: https://github.com/phpos/
	File version: 1.0.0, 2013.10.09
 
**********************************
*/
if (!defined('PHPOS')) {
    die;
}
if (!defined('PHPOS_EXPLORER_PLUGIN')) {
    die;
}
$items = null;
$shared = new phpos_shared();
$records = $shared->get_my_shared();
if (count($records) != 0) {
    foreach ($records as $row) {
        $items .= '<li data-options="iconCls:\'icon-sharedfolder\'"><span><a title="' . $row['title'] . ' ' . $row['desc'] . '"  href="javascript:void(0);" onclick="' . link_action('index', 'workgroup_id:0,reset_shared:0,in_shared:1,shared_id:' . $row['id'] . ',user_id:' . $root_id . ',fs:local_files') . '"><span style="color: black">' . $row['title'] . '</span></a></span>	</li>';
    }
} else {
    $items .= '<li data-options="iconCls:\'icon-blank\'"><span>' . txt('shared_no_folders') . '</span></li>';
}
$html['left_tree'] .= '<br/><br/>
<ul id="tt3" class="easyui-tree">
	<li data-options="iconCls:\'icon-sharedfolder\'">
        <span><a title="' . txt('shared_folders') . '" href="javascript:void(0);" onclick="' . link_action('shared', 'shared_id:0,tmp_shared_id:0,in_shared:1,reset_shared:0,workgroup_id:0,fs:local_files') . '"><span style="color: black;"><b>' . txt('shared_folders') . '</b></span></a></span>
				<ul>
				' . $items . '
				</ul>
	</li>
</ul>';
$items = null;
Exemple #4
0
    die;
}
if (!defined('PHPOS_EXPLORER_PLUGIN')) {
    die;
}
$items = null;
$ftp = new phpos_ftp();
$records = $ftp->get_my_ftp();
/*
**************************
*/
if (count($records) != 0) {
    foreach ($records as $row) {
        $items .= '<li data-options="iconCls:\'icon-ftpfolder\'"><span><a title="' . $row['title'] . ' ' . $row['host'] . '"href="javascript:void(0);" onclick="' . link_action('index', 'dir_id:.,ftp_id:' . $row['id'] . ',fs:ftp') . '"><span style="color: black">' . $row['title'] . '</span></a></span></li>';
    }
} else {
    $items .= '<li data-options="iconCls:\'icon-blank\'"><span>' . $txt['ftp_no_accounts'] . '</span></li>';
}
/*
**************************
*/
$html['left_tree'] .= '<br/><br/>
	<ul id="tt2" class="easyui-tree">
		<li data-options="iconCls:\'icon-network\'">
					 <span><a title="' . $txt['ftp_folders'] . '" href="javascript:void(0);" onclick="' . link_action('ftp', 'shared_id:0,workgroup_id:0,fs:ftp') . '"><span style="color: black;"><b>' . $txt['ftp_folders'] . '</b></span></a></span>
					<ul>
					' . $items . '
					</ul>
		</li>
	</ul>';
$items = null;
	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;
}
// if section access
$new_id = helper_result('new_ftp_id');
$cloud_type = $my_app->get_param('cloud_type');
if (empty($cloud_type)) {
    echo '<div class="layout_clouds_select">' . txt('cloud_select_new') . '<br /><br /><img src="' . ICONS . 'clouds/google_drive.png" onclick="' . link_action('index', 'cloud_type:google_drive') . '"/></div>';
    $js = "\n\t\$('.layout_clouds_select img').mouseenter(function()\n\t{\n\t\t\$(this).addClass('layout_clouds_select_over');\n\t});\n\t\n\t\$('.layout_clouds_select img').mouseleave(function()\n\t{\n\t\t\$(this).removeClass('layout_clouds_select_over');\n\t});\n\t\n\t";
    $my_app->jquery_onready($js);
} else {
    if (empty($new_id)) {
        $cloud = new phpos_clouds();
        $cloud->set_cloud($cloud_type);
        echo helper_result('new_cloud');
        echo $layout->title(txt('add_new_cloud'), null);
        echo $layout->txtdesc(txt('dsc_cloud_title'));
        $form = new phpos_forms();
        echo $form->form_start('new_cloud', helper_ajax('section.new_account.php'), array('app_params' => ''));
        $form->reload_after_submit(array('nowy'));
        $form->input('hidden', 'action', '', '', 'new_cloud');
        $form->input('hidden', 'cloud_new_type', '', '', $cloud_type);
        echo $layout->column('50%');
Exemple #6
0
 
**********************************
*/
if (!defined('PHPOS')) {
    die;
}
if (APP_ACTION == 'ftp') {
    $address_icon = ICONS . 'server/ftp.png';
    $ftp = new phpos_ftp();
    $records = $ftp->get_my_ftp();
    $html['right_items_title'] = txt('explorer_right_ftp');
    $html['right_items_desc'] = txt('explorer_right_ftp_desc');
    $html['right_items_img'] = 'ftp.png';
    if (count($records) != 0) {
        $html['icons'] .= $layout->area_start(txt('ftp_folders'));
        $html['icons'] .= $layout->txtdesc(txt('st_ftp'));
        foreach ($records as $row) {
            $action_open = link_action('index', 'ftp_id:' . $row['id'] . ',fs:ftp');
            $action_edit = winopen(txt('dsc_ftp_a_edit'), 'cp', 'app_id:ftp@index', 'section:edit_account,ftp_id:' . $row['id']);
            $action_delete = "\n\t\t\t\t\t\$.messager.confirm('" . txt('delete') . "', '" . txt('delete_confirm') . "?', function(r){\n\t\t\t\t\tif (r){\n\t\t\t\t\t\n\t\t\t\t\t\t" . winopen(txt('dsc_ftp_a_edit'), 'cp', 'app_id:ftp@index', 'section:list,after_refresh:' . WIN_ID . ',action:delete,ftp_id:' . $row['id'] . ',delete_id:' . $row['id']) . "\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t});";
            $contextMenu_ftp = array('open::' . txt('open') . '::' . $action_open . '::folder_open', 'edit::' . txt('dsc_ftp_a_edit') . '::' . $action_edit . '::edit', 'delete::' . txt('delete') . '::' . $action_delete . '::cancel');
            $apiWindow->setContextMenu($contextMenu_ftp);
            $js .= $apiWindow->contextMenuRender('ftp_list_' . $row['id'] . WIN_ID, 'img');
            $apiWindow->resetContextMenu();
            $html['icons'] .= '<div id="ftp_list_' . $row['id'] . WIN_ID . '" ondblclick="' . $action_open . '" class="phpos_server_icon" title="<b>' . $row['title'] . '</b> ' . $row['host'] . '"><img src="' . ICONS . 'server/ftp.png" /><p><b>' . string_cut($row['title'], 30) . '</b><br />' . string_cut($row['description'], 30) . '<br /><span class="desc">' . string_cut($row['host'], 30) . '</span></p></div>';
        }
        $html['icons'] .= $layout->area_end();
    } else {
        $html['icons'] .= $layout->area_start(txt('ftp_folders')) . txt('ftp_no_accounts') . $layout->txtdesc(txt('st_ftp')) . $layout->area_end();
    }
}
        break;
    case 'file_info':
        include MY_APP_DIR . 'controllers/shortcuts_file_info.php';
        break;
    case 'upload':
        include MY_APP_DIR . 'controllers/shortcuts_upload.php';
        break;
    case 'share':
        include MY_APP_DIR . 'controllers/shortcuts_shared.php';
        break;
}
/*
**************************
*/
if (!empty($wincfg['title'])) {
    winset('title', $wincfg['title']);
}
if (!empty($wincfg['width'])) {
    winset('width', $wincfg['width']);
}
if (!empty($wincfg['back']) == 1) {
    $back_button = $layout->back_button($wincfg['back'], link_action($wincfg['back_action']), $wincfg['back'], null);
    if (!empty($wincfg['height'])) {
        $wincfg['height'] = $wincfg['height'] + 100;
    }
}
if (!empty($wincfg['height'])) {
    winset('height', $wincfg['height']);
}
wincenter();
$my_app->jquery_onready(msg::showMessages());
Exemple #8
0
function actionBackToGroup($menu_item)
{
    global $my_app;
    $j = link_action('workgroup', 'workgroup_id:' . $my_app->get_param('workgroup_id'));
    return $j;
}
	(c) 2013 Marcin Szczyglinski
	szczyglis83@gmail.com
	GitHUB: https://github.com/phpos/
	File version: 1.0.0, 2013.10.08
 
**********************************
*/
if (!defined('PHPOS')) {
    die;
}
$server_item_title = txt('workgroups');
$groups = new phpos_groups();
$records = $groups->get_my_groups();
if (count($records) != 0) {
    foreach ($records as $row) {
        $action_open = link_action('workgroup', 'shared_id:0,workgroup_id:' . $row['id'] . ',fs:ftp');
        $action_edit = winopen(txt('group_section_edit_group'), 'cp', 'app_id:groups@groups_admin', 'section:edit_group,group_id:' . $row['id']);
        $action_users = winopen(txt('group_section_group_users'), 'cp', 'app_id:groups@groups_admin', 'section:group_users,group_id:' . $row['id']);
        $action_delete = "\n\t\t\t\$.messager.confirm('" . txt('delete') . "', '" . txt('delete_confirm') . "?', function(r){\n\t\t\tif (r){\n\t\t\t\n\t\t\t\t" . winopen(txt('dsc_ftp_a_edit'), 'cp', 'app_id:groups@groups_admin', 'section:list,after_refresh:' . WIN_ID . ',action:delete,group_id:' . $row['id'] . ',delete_id:' . $row['id']) . "\t\t\t\t\n\t\t\t}\n\t\t\t});";
        $contextMenu_ftp = array('open::' . txt('open') . '::' . $action_open . '::folder_open', 'edit::' . txt('group_section_edit_group') . '::' . $action_edit . '::edit', 'users::' . txt('group_section_group_users') . '::' . $action_users . '::user', 'delete::' . txt('delete') . '::' . $action_delete . '::cancel');
        $apiWindow->setContextMenu($contextMenu_ftp);
        $js .= $apiWindow->contextMenuRender('groups_list_' . $row['id'] . WIN_ID, 'img');
        $apiWindow->resetContextMenu();
        $groups->set_id($row['id']);
        $c = $groups->count_users();
        $tmp_html .= '<div id="groups_list_' . $row['id'] . WIN_ID . '" class="phpos_server_icon"  title="<b>' . $row['title'] . '</b> ' . $row['description'] . '" ondblclick="' . $action_open . '"><img src="' . ICONS . 'server/workgroup.png" /><p><b>' . $row['title'] . '</b><br />' . txt('workgroup_users') . ': ' . $c . '<br /><span class="desc">' . string_cut($row['description'], 20) . '</span></p></div>';
    }
} else {
    $tmp_html = txt('workgroups_empty');
}
?>
	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;
}
$server_item_title = txt('shared_folders');
$shared = new phpos_shared();
$records = $shared->get_my_shared();
if (count($records) != 0) {
    foreach ($records as $row) {
        $action_open = link_action('index', 'workgroup_id:0,reset_shared:0,shared_id:' . $row['id'] . ',in_shared:1,fs:local_files');
        $contextMenu_shared_folders = array('open::' . txt('open') . '::' . $action_open . '::folder_open');
        $apiWindow->setContextMenu($contextMenu_shared_folders);
        $js .= $apiWindow->contextMenuRender('groups_shared_folders_' . $row['id'] . WIN_ID, 'img');
        $apiWindow->resetContextMenu();
        $tmp_html .= '<div id="groups_shared_folders_' . $row['id'] . WIN_ID . '" ondblclick="' . $action_open . '" class="phpos_server_icon" title="<b>' . $row['title'] . '</b> ' . $row['description'] . '"><img src="' . ICONS . 'server/shared1.png" /><p><b>' . string_cut($row['title'], 30) . '</b><br />' . string_cut(basename(base64_decode($row['folder_id'])), 30) . '<br /><span class="desc">' . string_cut($row['description'], 30) . '</span></p></div>';
    }
} else {
    $tmp_html = txt('shared_no_folders');
}
?>
			
<?php

/*
**********************************

	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;
}
$server_item_title = txt('local_fsystems');
$tmp_html .= '<div ondblclick="' . link_action('index', 'fs:local_files') . '" class="phpos_server_icon" title="' . txt('st_localfiles') . '"><img src="' . ICONS . 'server/hdd.png" /><p><b>' . txt('home_local_folder') . '</b><br />' . txt('home_local_folder_desc') . '<br /><span class="desc">' . PHP_OS . '</span></p></div> 
<div ondblclick="' . link_action('index', 'fs:db_mysql') . '" class="phpos_server_icon" title="' . txt('st_db') . '"><img src="' . ICONS . 'server/db.png" /><p><b>' . txt('home_db_folder') . '</b><br />' . txt('home_db_folder_desc') . '<br /><span class="desc">' . $sql->get_adapter_full_name() . '</span></p></div>';
// start filesytem
$tree_explorer = new app_explorer();
$tree_explorer->set_fs($my_fs);
$tree_explorer->assign_filesystem($treeFS);
$tree_explorer->assign_window($apiWindow);
$tree_explorer->assign_my_app($my_app);
$root_id = $treeFS->get_root_directory_id();
if ($dir_id == $root_id || $global_fs != $my_fs) {
    $closed = ',state:\'closed\'';
}
/*
**************************
*/
$tree_db_mysql = '
	<li data-options="iconCls:\'icon-disk\'' . $closed . '">
	<span><a title="' . txt('home_db_folder') . '" href="javascript:void(0);" onclick="' . link_action('index', 'reset_shared:1,in_shared:0,shared_id:0,tmp_shared_id:0,root_id:' . $root_id . ',dir_id:' . $root_id . ',fs:' . $my_fs) . '"><span style="color: black;">' . txt('home_db_folder') . '</span></a></span>				
	<ul>' . $tree_explorer->get_tree($treeFS->get_root_directory_id()) . '</ul>
	</li>
	';
/*
**************************
*/
$html['left_tree'] .= '<br/><br/>
	<ul id="tt" class="easyui-tree">	
	
		<li data-options="iconCls:\'icon-myserver\'" id="xx">
									
					<span><a href="javascript:void(0);" onclick="phpos.windowActionChange(\'' . $apiWindow->getID() . '\', \'my_server\')"><span style="color:black"><b>' . txt('my_server') . '</b></span></a></span>
					
					<ul>
					
// Set start DIR ID
if (!empty($dir_id)) {
    $phposFS->set_directory_id($dir_id);
} else {
    $my_app->set_param('dir_id', $root_id);
    $phposFS->set_directory_id($root_id);
}
/*
**************************
*/
// Chceck for DIR exists
$dir_id = $phposFS->get_directory_id();
if ($fs == 'local_files' && APP_ACTION == 'index') {
    if (!is_dir($dir_id)) {
        $my_app->set_param('error_no_dir', 1);
    }
}
/*
**************************
*/
// If DIR not found
if ($my_app->get_param('error_no_dir')) {
    jquery_onready(link_action('my_server', ''));
    msg::error('Folder not found');
    $my_app->set_param('error_no_dir', null);
    $my_app->set_param('dir_id', null);
    $my_app->set_param('root_dir', null);
    cache_param('error_no_dir');
    cache_param('dir_id');
    cache_param('root_id');
}
Exemple #14
0
 $wincfg['title'] = txt('shortcuts_window_title_app_step2');
 $wincfg['width'] = '600';
 $wincfg['height'] = '550';
 $button = txt('shortcuts_window_btn_app_new');
 if ($location_id != 'edit') {
     $succ_msg = txt('shortcuts_window_msg_app_created');
 } else {
     $succ_msg = txt('shortcuts_window_msg_app_updated');
 }
 $monit_success = "\n\t\tjSuccess(\n\t\t\t'" . $succ_msg . "',\n\t\t\t{\n\t\t\t\tautoHide : true, \n\t\t\t\tclickOverlay : false,\n\t\t\t\tMinWidth : 200,\n\t\t\t\tTimeShown : 5000,\n\t\t\t\tShowTimeEffect : 1000,\n\t\t\t\tHideTimeEffect : 600,\n\t\t\t\tLongTrip :20,\n\t\t\t\tHorizontalPosition : 'right',\n\t\t\t\tVerticalPosition : 'bottom',\n\t\t\t\tShowOverlay : false\n\t\t\t}\n\t\t);";
 $success_code = winclose(WIN_ID) . $monit_success;
 $app = new phpos_app();
 $app->set_app_id($link_param);
 $app->load_config();
 if ($back == 1) {
     $html .= $layout->back_button(txt('shortcuts_window_back_to_apps'), link_action('app', 'link_param:0'), txt('shortcuts_window_back_to_apps'), null);
 }
 $html .= $layout->subtitle($app->get_title(), $app->get_icon());
 $html .= $layout->subtitle(txt('shortcuts_app_form_choose_params'), MY_RESOURCES . 'upload.png');
 $html .= $layout->txtdesc(txt('shortcuts_app_form_choose_params_desc'));
 $form = new phpos_forms();
 $form->onsuccess($success_code);
 $html .= $form->form_start('new_link', helper_ajax('appAction.php'), array('app_params' => ''));
 $after_reload = $my_app->get_param('after_reload');
 $form->reload_after_submit(array($after_reload));
 $form->input('hidden', 'user_action_new', '', '', '1');
 $form->input('hidden', 'new_link_type', '', '', 'app');
 $start_link_title = $app->get_title();
 // if from DB
 $link_id = $my_app->get_param('link_id');
 if (!empty($link_id)) {