Beispiel #1
0
function actionGoInfo($menu_item)
{
    $j = winopen(txt('sys_info'), 'cp', 'app_id:system_info@index');
    return $j;
}
Beispiel #2
0
            $contextMenus['DIR'][] = '---';
            $contextMenus['DIR'][] = 'rename::' . txt('rename') . '::' . winmodal(txt('rename'), 'app', 'app_id:shortcuts@folder', 'location:' . $context_location . ',dir_id:' . $context_dir_id . ',edit_id:' . base64_encode($icons[$i]['id']) . ',old_name:' . base64_encode($icons[$i]['basename']) . ',after_reload:' . WIN_ID) . '::edit';
        }
        if (!$readonly || is_root()) {
            $contextMenus['WINDOW'][] = 'newfolder::' . txt('new_folder') . '::' . winmodal(txt('new_folder'), 'app', 'app_id:shortcuts@folder', 'location:' . $context_location . ',back:null, dir_id:' . $context_dir_id . ',after_reload:' . WIN_ID) . '::folder_files';
            if (globalconfig('disable_upload') != 1 || is_root()) {
                $contextMenus['WINDOW'][] = 'upload::' . txt('upload_here') . '::' . winmodal('Nowa ikona', 'app', 'app_id:shortcuts@upload,width:300,height:350', 'desktop:1,location:' . $context_location . ',back:null,dir_id:' . $context_dir_id . ',after_reload:' . WIN_ID) . '::disk';
            }
        } else {
            $contextMenus['WINDOW'] = array('read::This folder is readonly::;::login');
        }
        break;
    case 'ftp':
        $contextMenus['FILE'] = array('open::' . txt('open') . '::explorer_ftp_view("' . $icons[$i]['id'] . '", "' . $icons[$i]['basename'] . '", "' . $my_app->get_param('fs') . '");::folder_open', '---', 'download::' . txt('download') . '::explorer_ftp_download("' . $icons[$i]['id'] . '", "' . $icons[$i]['basename'] . '", "' . $my_app->get_param('fs') . '");::download', '---', 'rename::' . txt('rename') . '::' . winmodal(txt('rename'), 'app', 'app_id:shortcuts@folder', 'location:' . $context_location . ',dir_id:' . $context_dir_id . ',action_id:null,edit_id:' . base64_encode($icons[$i]['id']) . ',old_name:' . base64_encode($icons[$i]['basename']) . ',after_reload:' . WIN_ID) . '::edit');
        $contextMenus['DIR'] = array('open::' . txt('open') . '::alert("normalopen' . $item . '");::folder_open', '---', 'rename::' . txt('rename') . '::' . winmodal(txt('rename'), 'app', 'app_id:shortcuts@folder', 'location:' . $context_location . ',dir_id:' . $context_dir_id . ',action_id:null,edit_id:' . base64_encode($icons[$i]['id']) . ',old_name:' . base64_encode($icons[$i]['basename']) . ',after_reload:' . WIN_ID) . '::edit');
        $contextMenus['WINDOW'] = array('newfolder::' . txt('new_folder') . '::' . winmodal(txt('new_folder'), 'app', 'app_id:shortcuts@folder', 'location:' . $context_location . ',back:null, dir_id:' . $context_dir_id . ',after_reload:' . WIN_ID) . '::folder_files', 'upload::' . txt('upload_here') . '::' . winmodal('Nowa ikona', 'app', 'app_id:shortcuts@upload,width:300,height:350', 'desktop:1,location:' . $context_location . ',back:null,dir_id:' . $context_dir_id . ',after_reload:' . WIN_ID) . '::disk');
        break;
}
if (APP_ACTION == 'desktop') {
    //$contextMenus['WINDOW'][] = '---';
    $contextMenus['WINDOW'][] = 'wallpaper::' . txt('change_desktop_wallpaper') . '::' . winopen(txt('account_settings'), 'cp', 'app_id:users@index', 'section:wallpapers') . '::application';
    //$contextMenus['WINDOW'][] = '---';
    //$contextMenus['WINDOW'][] = '---';
    if ($context_fs == 'local_files') {
        $action = "phpos.desktopSwitch('database'); \$('#desktop_switch_left').click(); ";
        $contextMenus['WINDOW'][] = 'todb::' . txt('context_to_db') . '::' . $action . '::application';
    } else {
        $action = "phpos.desktopSwitch('local_files'); \$('#desktop_switch_right').click(); ";
        $contextMenus['WINDOW'][] = 'tolocal::' . txt('context_to_local') . '::' . $action . '::application';
    }
}
 public function get_action_dblclick($file)
 {
     if ($this->is_directory($file)) {
         if (!defined('DESKTOP')) {
             return helper_reload(array('shared_id' => 0, 'reset_shared' => 0, 'dir_id' => $file['id']));
         } else {
             return winopen($file['basename'], 'app', 'app_id:explorer@index', 'shared_id:0,reset_shared:0,fs:local_files,dir_id:' . $file['id']);
         }
     } else {
         return 'explorer_open_in_browser("' . $file['id'] . '");';
     }
 }
 public function get_action_dblclick($file)
 {
     if ($this->is_directory($file)) {
         if (!defined('DESKTOP')) {
             return helper_reload(array('reset_shared' => 0, 'dir_id' => $file['id']));
         } else {
             return winopen($file['basename'], 'app', 'app_id:explorer@index', 'fs:db_mysql,dir_id:' . $file['id']);
         }
     } else {
         $filedata = $this->get_file_info($file);
         $action = "phpos.windowCreate('" . $filedata['basename'] . "','" . $filedata['app_id'] . "', '" . $filedata['win_params'] . "', '" . $filedata['app_params'] . "');";
         $app_action = 'app_id:' . $filedata['app_id'] . '@' . $filedata['app_action'];
         $action = winopen(txt($filedata['basename']), $filedata['plugin_id'], $app_action, $filedata['app_params']);
         /*
         	{		
         		$str = "phpos.windowCreate('".$title."','".$app."', '".$params."', '".$app_params."')";	
         		//this.controllerWindows('action=create&title=' + title_encode + '&wintype=' + type_encode + '&params=' + json_params_encode + app_params_url);
         */
         return $action;
         //return "alert('plik');";
     }
 }
Beispiel #5
0
function actionEditFtp($menu_item)
{
    global $my_app;
    $j = winopen(txt('dsc_ftp_a_edit'), 'cp', 'app_id:ftp@index', 'section:edit_account,ftp_id:' . $my_app->get_param('ftp_id'));
    return $j;
}
Beispiel #6
0
function actionNewFTP($menu_item)
{
    $j = winopen(txt('ftp'), 'cp', 'app_id:ftp@index', 'section:new_account');
    return $j;
}
 public function link_action()
 {
     $link_params = $this->app_required_params();
     if (!is_array($link_params)) {
         $link_params = array();
     }
     $app_action = $this->default_app_action();
     $app_plugin = $this->app_used_plugin();
     if (!empty($this->default_section)) {
         $link_params[] = 'section:' . $this->default_section;
     }
     $parse_params = implode(',', $link_params);
     $link = winopen($this->get_title(), $app_plugin, 'app_id:' . $this->app_id . '@' . $app_action, $parse_params);
     //echo htmlspecialchars($link);
     return $link;
     //function winopen($title = 'New window', $app = 'explorer2', $win_params = 'app_id', $app_params = 'fs:')
 }
switch ($usr->get_is_active()) {
    case 1:
        $active_txt = txt('yes');
        break;
    case 0:
        $active_txt = txt('no');
        break;
}
$form->label(txt('active'), $active_txt, '');
$form->label(txt('created_at'), date('d.m.Y H:i:s', $usr->get_created_at()), '');
if ($usr->get_last_login() != 0) {
    $last_login_txt = date('d.m.Y H:i:s', $usr->get_last_login());
} else {
    $last_login_txt = txt('never');
}
if ($usr->get_last_activity() != 0) {
    $last_activity_txt = date('d.m.Y H:i:s', $usr->get_last_activity());
} else {
    $last_activity_txt = txt('never');
}
$form->label(txt('last_login'), $last_login_txt);
$form->label(txt('last_activity'), $last_activity_txt);
$form->label('Email', $usr->get_user_email(), '');
if (is_dir(PHPOS_HOME_DIR . $usr->get_home_dir_hash())) {
    $dir_link = winopen($usr->get_user_login(), 'app', 'app_id:explorer@index', 'fs:local_files,dir_id:' . PHPOS_HOME_DIR . $usr->get_home_dir_hash());
    $form->label(txt('home_dir'), '<a href="javascript:void(0);" onclick="' . $dir_link . '">' . $usr->get_home_dir_hash() . '</a>', '');
} else {
    $form->label(txt('home_dir'), txt('no_homedir'), '');
}
echo $form->render();
echo $form->form_end();
Beispiel #9
0
 
**********************************
*/
if (!defined('PHPOS')) {
    die;
}
if (APP_ACTION == 'cp') {
    $cp = new phpos_app();
    $cp_array = $cp->cp_list();
    $title = '<img src="' . ICONS . 'server/cp.png' . '" style="width:30px; display:inline-block; vertical-align:middle" />  ' . txt('control_panel');
    $html['icons'] .= $layout->area_start($title);
    $html['icons'] .= $layout->txtdesc(txt('control_panel_desc'));
    $html['right_items_title'] = txt('control_panel');
    $html['right_items_desc'] = txt('control_panel_right_desc');
    $html['right_items_img'] = 'cp.png';
    foreach ($cp_array as $cp_app) {
        foreach ($cp_app as $item) {
            $cp->set_app_id($item['app_id']);
            $cp->load_config();
            $tmp_app_action = '';
            if (!empty($item['id'])) {
                $tmp_app_action = '@' . $item['id'];
            }
            $cp_access = $item['access_level'];
            if ($my_app->user_check_access($cp_access)) {
                $html['icons'] .= '<div title="' . $item['title'] . ' - ' . $item['desc'] . '" class="phpos_server_icon"><a href="javascript:void(0);" ondblclick="' . winopen($item['app_title'], 'cp', 'app_id:' . $item['app_id'] . $tmp_app_action . '') . '"><img src="' . $cp->get_icon('cp', $item['icon']) . '" /></a><p><b>' . $item['title'] . '</b><br />' . $item['desc'] . '<br /><span class="desc">' . $item['app_title'] . '</span></p></div>';
            }
        }
    }
    $html['icons'] .= $layout->area_end();
}
Beispiel #10
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();
    }
}
Beispiel #11
0
function actionNewGroup($menu_item)
{
    $j = winopen(txt('group_section_new_group'), 'cp', 'app_id:groups@groups_admin', 'section:new_group');
    return $j;
}
Beispiel #12
0
echo myconfig('lang');
?>
" target="_blank"><span><?php 
echo txt('start_phpos_online');
?>
</span></a> / 	<a href="<?php 
echo PHPOS_GITHUB;
?>
" target="_blank"><span>GitHUB</span></a></div>
				
				
				<?php 
if (is_root() || is_admin()) {
    ?>
				<div class="startmenu_right_item" onclick="<?php 
    echo winopen(txt('updates'), 'app', 'app_id:updater@index', '');
    ?>
"><span><?php 
    echo txt('updates');
    ?>
</span></div>				
				<?php 
}
?>
		
			
				
		</div>
		
		<div data-options="region:'south',title:'',split:true" id="phpos_startmenu_layout_footer">
		
require PHPOS_DIR . 'plugins/fs.db_mysqlPlugin.php';
//$filesystem_class = 'phpos_fs_plugin_'.$my_app->get_param('fs');
$phposFS = new phpos_fs_plugin_db_mysql();
// start filesytem
$config = new phpos_config();
$config->set_id_user();
$shortcut = new phpos_shortcuts();
$startmenu = new phpos_startmenu();
$records = $startmenu->get_all();
$i = 1;
foreach ($records as $item) {
    if ($shortcut->is_shortcut($item['id_file'])) {
        $row = $shortcut->get_shortcut($item['id_file']);
        $icon = $shortcut->link_icon($row['plugin_id'], $row['app_id'], $row['icon'], $row['app_action']);
        $app_action = 'app_id:' . $row['app_id'] . '@' . $row['app_action'];
        $action = winopen($row['file_title'], $row['plugin_id'], $app_action, $row['app_params']);
        $context_menu = array('delete::' . txt('del_from_start') . '::delete_menustart_item("' . $item['id'] . '");::delete');
        $apiWindow = new api_wintask();
        $apiWindow->setContextMenu($context_menu);
        $js .= $apiWindow->contextMenuRender('startmenu_left_item_' . $i, 'img');
        $apiWindow->resetContextMenu();
        $items .= '<div id="startmenu_left_item_' . $i . '" class="startmenu_left_item" onclick="' . $action . '"><img src="' . $icon . '"><span>' . $row['file_title'] . '</span></div>';
        $i++;
    }
}
$js .= "\n function delete_menustart_item(delete_id)\n {\n\t\tphpos.managerWindows('action=delete_start_item&item_id='+delete_id);\n\t\tphpos.menustartClose();\n  }\n\t";
$my_app = new phpos_app();
jquery_function($js);
jquery_onready($js_delete);
include PHPOS_DIR . 'views/startmenuView.php';
echo $my_app->render_javascript_jquery();