}
                    }
                }
                if (!$stop_upload) {
                    $phposFS->ftp_view($my_app->get_param('action_param'));
                    $my_app->set_param('action_param', null);
                    cache_param('action_param');
                }
                break;
            case 'paste':
                $clipboard = new phpos_clipboard();
                $mode = $clipboard->get_mode();
                if ($mode == 'copy') {
                    if ($phposFS->copy($my_app->get_param('action_param'))) {
                        msg::ok(txt('file_pasted'));
                    }
                } elseif ($mode == 'cut') {
                    $source_win = $clipboard->get_source_win();
                    if ($phposFS->cut($my_app->get_param('action_param'))) {
                        echo '<script>phpos.windowRefresh("' . $source_win . '", "");</script>';
                        msg::ok(txt('file_pasted'));
                    }
                }
                break;
        }
        $my_app->set_param('action_id', null);
        cache_param('action_id');
    }
}
$my_app->set_param('action_id', null);
cache_param('action_id');
// Clipboard
$clipboard = new phpos_clipboard();
$clipboard->debug_clipboard();
//echo 'action_id:'.$action_id.', action_param:'.$my_app->get_param('action_param').' action_param2:'.$my_app->get_param('action_param2').'<br>';
/*
**************************
*/
// Actions results
$action_id = $my_app->get_param('action_id');
$action_status = $my_app->get_param('action_status');
$action_status_msg = $my_app->get_param('action_status_msg');
if (!empty($action_status)) {
    if ($action_status == 'error') {
        msg::error($action_status_msg);
    } else {
        msg::ok($action_status_msg);
    }
    $my_app->set_param('action_status', null);
    $my_app->set_param('action_status_msg', null);
    cache_param('action_status');
    cache_param('action_status_msg');
}
/*
**************************
*/
// FTP
if ($my_app->get_param('fs') != 'ftp') {
    $my_app->set_param('ftp_id', null);
    cache_param('ftp_id');
} else {
    cache_param('ftp_id');
示例#3
0
<?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;
}
if (form_submit('share_folder')) {
    $shared = new phpos_shared();
    if (globalconfig('demo_mode') != 1 || is_root()) {
        $shared->share_folder($_POST['new_folder_name'], $_POST['new_folder_desc'], 'local_files', $shared_id, $_POST['new_folder_readonly']);
    }
    msg::ok(txt('shared'));
}
示例#4
0
    $location_id = $my_app->get_param('location');
    $id_parent = 0;
    switch ($location_id) {
        case 'desktop':
            $location = 'desktop';
            break;
        case 'menustart':
            $location = 'menustart';
            break;
        case 'db':
            $location = 'db';
            break;
        case 'edit':
            $location = 'edit';
            break;
    }
    $db_parent = $my_app->get_param('dir_id');
    if (!empty($db_parent)) {
        $id_parent = $db_parent;
    }
    $post_app_params['url'] = base64_encode($_POST['new_link_url']);
    if (globalconfig('demo_mode') != 1 || is_root()) {
        if ($location != 'edit') {
            $shortcut->add($_POST['new_link_name'], $_POST['new_link_type'], 'mediaframes', $_POST['new_link_action'], $_POST['new_link_icon'], $post_app_params, $location, $id_parent);
            msg::ok(txt('created'));
        } else {
            $shortcut->update($_POST['new_link_name'], $_POST['new_link_type'], 'mediaframes', $_POST['new_link_action'], $_POST['new_link_icon'], $post_app_params, $location, $my_app->get_param('link_id'));
            msg::ok(txt('updated'));
        }
    }
}
示例#5
0
<?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;
}
if ($my_app->get_param('to_menustart') == 1) {
    $shortcut = new phpos_shortcuts();
    $link_id = $my_app->get_param('link_id');
    if (globalconfig('demo_mode') != 1 || is_root()) {
        if ($shortcut->new_menustart($link_id)) {
            msg::ok(txt('msg_added_to_menustart'));
        }
    }
    $my_app->jquery_onready(winclose(WIN_ID));
}
示例#6
0
function helper_result($id = null, $type = null, $result = null)
{
    //msg::ok('yyyyyy');
    if (!empty($type) && !empty($result)) {
        switch ($type) {
            case 'ok':
                $_SESSION['RESULT_STATUS'][$id] = 'ok';
                $_SESSION['RESULT'][$id] = $result;
                break;
            case 'error':
                $_SESSION['RESULT_STATUS'][$id] = 'error';
                $_SESSION['RESULT'][$id] = $result;
                break;
            case 'var':
                $_SESSION['RESULT_STATUS'][$id] = 'var';
                $_SESSION['RESULT'][$id] = $result;
                break;
            case 'result':
                $_SESSION['RESULT_STATUS'][$id] = 'result';
                $_SESSION['RESULT'][$id] = $result;
                break;
            case 'info':
                $_SESSION['RESULT_STATUS'][$id] = 'info';
                $_SESSION['RESULT'][$id] = $result;
                break;
        }
    } else {
        if (!empty($_SESSION['RESULT'][$id]) && !empty($_SESSION['RESULT_STATUS'][$id])) {
            switch ($_SESSION['RESULT_STATUS'][$id]) {
                case 'ok':
                    msg::ok($_SESSION['RESULT'][$id]);
                    return '<div class="phpos_result phpos_result_ok"><img src="' . PHPOS_WEBROOT_URL . '_phpos/icons/status_ok.png" /><p>' . $_SESSION['RESULT'][$id] . '</p></div>';
                    break;
                case 'error':
                    msg::error($_SESSION['RESULT'][$id]);
                    return '<div class="phpos_result phpos_result_error"><img src="' . PHPOS_WEBROOT_URL . '_phpos/icons/status_error.png" /><p>' . $_SESSION['RESULT'][$id] . '</p></div>';
                    break;
                case 'var':
                    $res = $_SESSION['RESULT'][$id];
                    return $res;
                    break;
                case 'result':
                    $res = $_SESSION['RESULT'][$id];
                    return $res;
                    break;
                case 'info':
                    msg::info($_SESSION['RESULT'][$id]);
                    return '<div class="phpos_result phpos_result_info"><img src="' . PHPOS_WEBROOT_URL . '_phpos/icons/status_info.png" /><p>' . $_SESSION['RESULT'][$id] . '</p></div>';
                    break;
            }
            unset($_SESSION['RESULT_STATUS'][$id]);
            unset($_SESSION['RESULT'][$id]);
        }
    }
}
示例#7
0
require_once PHPOS_DIR . 'classes/class.phpos_wallpapers.php';
require_once PHPOS_DIR . 'classes/class.phpos_messages.php';
require_once PHPOS_DIR . 'classes/class.phpos_logs.php';
$phpos_log = new phpos_logs();
//$phpos_log->create_log('xxxx');
$_SESSION['DEBUG'] = false;
/*
if($_GET['root']) 
{
	$_SESSION['DEBUG'] = true;
	if($_SESSION['DEBUG']) define('DEBUG', true);	
}	
*/
if ($_SESSION['logged_message'] == 1) {
    savelog('LOGIN#SUCCESS');
    msg::ok(txt('msg_logged'));
    unset($_SESSION['logged_message']);
}
$user = new phpos_users();
$user->get_logged_user();
if (!empty($_GET['code'])) {
    $_SESSION['google_token'] = $_GET['code'];
}
//savelog('ACCESS#SUCCESS');
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title><?php 
echo globalconfig('site_title');
示例#8
0
<?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;
}
$shared_id = $my_app->get_param('shared_id');
if ($stop_share == 1) {
    $shared = new phpos_shared();
    if (globalconfig('demo_mode') != 1 || is_root()) {
        $shared->unshare_folder($shared_id);
    }
    msg::ok(txt('msg_stop_shared'));
    $my_app->jquery_onready(winclose(WIN_ID) . "  \$('#" . $my_app->get_param('after_reload') . "').panel('refresh'); ");
}