Esempio n. 1
0
                        }
                    }
                    $new_usr->set_user_email($tmp_email);
                    //if($tmp_home != 1)	$new_usr->set_nohome();
                    if ($error != 1) {
                        if ($new_usr->update()) {
                            /*
                            $new_cfg = new phpos_config('no_get');
                            $new_cfg->set_id_user($user_id);
                            $new_cfg->update_user('lang', $tmp_lang);
                            //$new_cfg->update_user('wallpaper', globalconfig('wallpaper'));
                            */
                            helper_result('my_update_user', 'ok', txt('updated'));
                            helper_result('my_update_user_result', 'result', 'success');
                            helper_result('my_update_user_result', 'result', 'error');
                        } else {
                            helper_result('my_update_user_result', 'result', 'error');
                            helper_result('my_update_user', 'error', txt('error'));
                        }
                    }
                }
            }
            $_POST['action'] = null;
        }
    }
}
$my_app->set_param('selected_wallpaper_id', myconfig('wallpaper'));
cache_param('selected_wallpaper_id');
$my_app->set_param('selected_wallpaper_type', myconfig('wallpaper_type'));
cache_param('selected_wallpaper_type');
Esempio n. 2
0
$cloud_id = $my_app->get_param('cloud_id');
if (!empty($cloud_id)) {
    $cloud = new phpos_clouds();
}
$my_app->jquery_onready(msg::showMessages());
$action = $my_app->get_param('action');
if (globalconfig('demo_mode') != 1 || is_root()) {
    switch ($action) {
        case 'delete':
            $delete_id = $my_app->get_param('delete_id');
            if ($cloud->delete_cloud($delete_id)) {
                helper_result('delete_cloud', 'ok', txt('deleted'));
                $my_app->set_param('action', null);
                cache_param('action');
                $my_app->set_param('cloud_id', null);
                cache_param('cloud_id');
            }
            break;
    }
    if (form_submit('new_cloud')) {
        if ($_POST['action'] == 'new_cloud') {
            $tmp_title = strip_tags($_POST['cloud_new_title']);
            $tmp_desc = strip_tags($_POST['cloud_new_desc']);
            $tmp_login = strip_tags($_POST['cloud_new_login']);
            $tmp_pass = strip_tags($_POST['cloud_new_pass']);
            $tmp_url = strip_tags($_POST['cloud_new_url']);
            $tmp_cloud = strip_tags($_POST['cloud_new_type']);
            $tmp_public = strip_tags($_POST['cloud_new_public']);
            $tmp_param1 = strip_tags($_POST['cloud_new_param1']);
            $tmp_param2 = strip_tags($_POST['cloud_new_param2']);
            $tmp_param3 = strip_tags($_POST['cloud_new_param3']);
Esempio n. 3
0
    $readonly = 1;
    cache_param('readonly');
}
/*
**************************
*/
// Actions (new dir, upload, etc)
include MY_APP_DIR . 'controllers/explorerControllerActions.php';
/*
**************************
*/
// Reset params
$my_app->set_param('action_id', null);
$my_app->set_param('action_param', null);
cache_param('action_id');
cache_param('action_param');
/* 
****************************
====== GET ELEMENTS ====== 
***************************
*/
// Get left tree
include MY_APP_DIR . 'controllers/explorerControllerTree.php';
/*
**************************
*/
include MY_APP_DIR . 'controllers/explorer_my_server.php';
/*
**************************
*/
include MY_APP_DIR . 'controllers/explorer_workgroup.php';
/*
**************************
*/
cache_param('desktop');
cache_param('dir_id');
cache_param('back');
cache_param('edit');
cache_param('edit_id');
cache_param('shared_id');
cache_param('to_menustart');
cache_param('location');
cache_param('after_reload');
cache_param('stop_share');
cache_param('link_type');
cache_param('link_id');
cache_param('old_name');
//cache_param('link_param');
$back = $my_app->get_param('back');
/*
**************************
*/
$my_app->jquery_onready(msg::showMessages());
$stop_share = $my_app->get_param('stop_share');
$shared_id = $my_app->get_param('shared_id');
/*
**************************
*/
include MY_APP_DIR . 'controllers/action_app_link.php';
include MY_APP_DIR . 'controllers/action_webframe.php';
include MY_APP_DIR . 'controllers/action_mediaframe.php';
include MY_APP_DIR . 'controllers/action_url.php';
Esempio n. 5
0
function notify($result, $msg)
{
    global $my_app;
    $my_app->set_param('action_status', $result);
    $my_app->set_param('action_status_msg', $msg);
    cache_param('action_status');
    cache_param('action_status_msg');
    msg::error($msg);
}
    //$my_app->set_param('root_id', null);
    //$my_app->set_param('dir_id', null);
}
// If shared and readonly
$in_shared = $my_app->get_param('in_shared');
$readonly = $my_app->get_param('readonly');
/*.............................................. */
if ($in_shared == 1) {
    $shared = new phpos_shared();
    $share_dir_id = $my_app->get_param('dir_id');
    if (substr($share_dir_id, -1) == '/') {
        $share_dir_id = substr($share_dir_id, 0, -1);
    }
    //echo $share_dir_id;
    $shared_id = $shared->find_shared($share_dir_id);
    /*.............................................. */
    if (!empty($shared_id) && !$shared->is_my($shared_id)) {
        $shared->set_id($shared_id);
        $shared->get_shared();
        $readonly = $shared->get_readonly();
    }
    /*.............................................. */
    if ($readonly) {
        $my_app->set_param('readonly', 1);
    }
} else {
    $my_app->set_param('readonly', null);
}
/*.............................................. */
cache_param('readonly');
Esempio n. 7
0
    public function render_nav_bar()
    {
        global $my_app;
        $dir_id = $this->my_app->get_param('dir_id');
        $nav = new phpos_navigation();
        if (!$my_app->get_param('minus_index')) {
            $nav->next_index();
            $nav->add_item();
            $_SESSION['phpos_navigation_stopindex'][WIN_ID] = true;
        } else {
            $nav->set_index($my_app->get_param('set_index'));
            $nav->add_item();
            $my_app->set_param('minus_index', null);
            $my_app->set_param('set_index', null);
            cache_param('minus_index');
            cache_param('set_index');
        }
        //$nav->debug();
        //link_action($action, $params = null)
        //$navBar.='<img src="'.PHPOS_WEBROOT_URL.'_phpos/themes/default/windows/explorer_header_nav_back_transparent.png">';
        /*.............................................. */
        if ($nav->is_prev_index()) {
            global $my_app;
            $index = $nav->get_index();
            $link_index = $index - 1;
            $go_to_index = $nav->get_prev_index();
            $action = 'phpos.windowActionChange(\'' . WIN_ID . '\', \'' . $nav->get_action($go_to_index) . '\', \'' . $nav->parse_params($go_to_index) . ',minus_index:1,set_index:' . $link_index . '\');';
            $navBar .= '<a 
			class="easyui-tooltip" 
			title="' . txt('tip_nav_go_to') . ': ' . $link_index . '" 
			href="javascript:void(0);" 
			onclick="' . $action . '"><img 
			class="nav_back" 
			src="' . THEME_URL . 'windows/explorer_header_nav_back.png"></a>';
        } else {
            $navBar .= '<img 
			src="' . THEME_URL . 'windows/explorer_header_nav_back_transparent.png">';
        }
        /*.............................................. */
        if ($nav->is_next_index()) {
            global $my_app;
            $index = $nav->get_index();
            $link_index = $index + 1;
            $go_to_index = $nav->get_next_index();
            $action = 'phpos.windowActionChange(\'' . WIN_ID . '\', \'' . $nav->get_action($go_to_index) . '\', \'' . $nav->parse_params($go_to_index) . ',minus_index:0,set_index:' . $link_index . '\');';
            $navBar .= '<a 
			class="easyui-tooltip" 
			title="' . txt('tip_nav_go_to') . ': ' . $link_index . '" 
			href="javascript:void(0);" 
			onclick="' . $action . '"><img 
			class="nav_next" 
			src="' . THEME_URL . 'windows/explorer_header_nav_next.png"></a>';
        } else {
            $navBar .= '<img src="' . THEME_URL . 'windows/explorer_header_nav_next_transparent.png">';
        }
        /*.............................................. */
        if ($this->filesystem->have_parent($dir_id)) {
            $parent_dir = $this->filesystem->get_parent_dir($dir_id);
            $in_shared = $this->my_app->get_param('in_shared');
            if (!$in_shared) {
                // not shared
                $navBar .= '<a 
				class="easyui-tooltip" 
				title="' . txt('tip_nav_go_to') . ': ' . $parent_dir . '" 
				href="javascript:void(0);" 
				onclick="' . helper_reload(array('dir_id' => $parent_dir, 'dir_navigation_index' => $navigation['next']['index_id'])) . '"><img class="nav_top"  
				src="' . THEME_URL . 'windows/explorer_header_nav_top.png"></a>';
                /*.............................................. */
            } else {
                // shared, if(not) parent shared
                $shared = new phpos_shared();
                $check_dir_id = $dir_id;
                if (substr($check_dir_id, -1) == '/') {
                    $check_dir_id = substr($check_dir_id, 0, -1);
                }
                $check = $shared->find_shared($check_dir_id);
                /*.............................................. */
                if ($check == 0) {
                    // can up, parent is not outside shared
                    $navBar .= '<a 
					class="easyui-tooltip" 
					title="' . txt('tip_nav_go_to') . ': ' . $parent_dir . '" 
					href="javascript:void(0);" 
					onclick="' . helper_reload(array('dir_id' => $parent_dir, 'dir_navigation_index' => $navigation['next']['index_id'])) . '"><img 
					class="nav_top" 
					src="' . THEME_URL . 'windows/explorer_header_nav_top.png" /></a>';
                } else {
                    $navBar .= '<img 
					class="nav_top_inactive" 
					src="' . THEME_URL . 'windows/explorer_header_nav_top_transparent.png /">';
                }
            }
        } else {
            $navBar .= '<img class="nav_top_inactive" src="' . THEME_URL . 'windows/explorer_header_nav_top_transparent.png">';
        }
        return $navBar;
    }
<?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 (PHPOS_HAVE_ACCESS != $my_app->get_app_id() or !defined('PHPOS')) {
    die;
}
$my_app->set_param('url', null);
$my_app->set_param('first_time', 1);
$my_app->using('params');
cache_param('url');
$tmp_url = $my_app->get_param('url');
if (!empty($tmp_url)) {
    $url = base64_decode($tmp_url);
}
Esempio n. 9
0
echo $layout->main();
echo $layout->start();
echo $layout->set_style('padding:15px');
echo $layout->main();
?>

<?php 
echo $layout->title($url, 'icon.png');
?>

<?php 
if ($my_app->get_param('first_time') !== null) {
}
echo $layout->txtdesc(txt('iframe_warn_sandbox'));
$my_app->set_param('first_time', null);
cache_param('first_time');
if (!empty($url)) {
    echo '<iframe sandbox="allow-same-origin allow-scripts allow-popups allow-forms"
    src="' . $url . '"  seamless="seamless" style="border: 0; width: 100%; height:100%;"></iframe>';
}
?>

<?php 
echo $layout->end('main');
?>
	


<?php 
echo $layout->end('layout');
echo $layout->end('main');
Esempio n. 10
0
        $explorerAPI->cache_data_to_save($_POST['txt']);
        $_POST['action'] = null;
        //echo '<script>'.$explorerAPI->savefile_dialog().'</script>';
    }
} else {
    if ($explorerAPI->data_loaded() && $_POST['action'] === null) {
        if ($explorerAPI->get_file_data() !== null) {
            $my_app->set_param('notepad', $explorerAPI->get_file_data());
        }
        $my_app->set_param('file_info', $explorerAPI->get_file_info());
        cache_param('file_info');
        $explorerAPI->clear_data();
    } else {
        if ($my_app->get_param('id_file') != null) {
            if ($explorerAPI->have_db_content($my_app->get_param('id_file'))) {
                $content = $explorerAPI->get_db_content($my_app->get_param('id_file'));
                $info = $explorerAPI->get_db_info($my_app->get_param('id_file'));
                $info['fs'] = 'db_mysql';
                $my_app->set_param('file_info', $info);
                cache_param('file_info');
                $my_app->set_param('notepad', $content);
                cache_param('notepad');
            }
        }
    }
}
cache_param('notepad');
$js = " \$('textarea#editor').ckeditor();";
$my_app->jquery_onready($js);
$my_app->using('menu');
$html['menu'] = $my_app->window->get_layout_menu_html();
            }
        }
    }
}
/*.............................................. */
if ($my_app->get_param('api_action') == 'save_as') {
    if (globalconfig('demo_mode') != 1 || is_root()) {
        if ($my_app->get_param('api_dialog') !== null && $my_app->get_param('api_dialog_type') == 'save_as_file' && $my_app->get_param('explorer_save_as_filename') !== null) {
            $data = $explorerAPI->get_cached_data_to_save();
            $app_data = $explorerAPI->get_cached_app_data();
            $monit_success = "\n\t\t\t\t\tjSuccess(\n\t\t\t\t\t\t'" . txt('file_saved') . "',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tautoHide : true, \n\t\t\t\t\t\t\tclickOverlay : false,\n\t\t\t\t\t\t\tMinWidth : 200,\n\t\t\t\t\t\t\tTimeShown : 5000,\n\t\t\t\t\t\t\tShowTimeEffect : 1000,\n\t\t\t\t\t\t\tHideTimeEffect : 600,\n\t\t\t\t\t\t\tLongTrip :20,\n\t\t\t\t\t\t\tHorizontalPosition : 'right',\n\t\t\t\t\t\t\tVerticalPosition : 'bottom',\n\t\t\t\t\t\t\tShowOverlay : false\n\t\t\t\t\t\t}\n\t\t\t\t\t);";
            /*.............................................. */
            if (is_array($app_data)) {
                if ($data == null) {
                    $data = ' ';
                }
                $explorer_save_as_filename = $my_app->get_param('explorer_save_as_filename') . '.' . $my_app->get_param('api_file_ext');
                if (false !== ($saved_file_info = $phposFS->save_file_content($explorer_save_as_filename, $data))) {
                    $saved_file_info['fs'] = $my_app->get_param('fs');
                    $explorerAPI->clear_savedata();
                    $explorerAPI->set_saved_file_info($saved_file_info);
                    $my_app->set_param('api_action', null);
                    cache_param('api_action');
                    echo "<script>" . $monit_success . " phpos.windowRefresh('" . $my_app->get_param('win_id') . "',''); " . winclose(WIN_ID) . "</script>";
                }
            } else {
                echo "<script>" . $monit_success . " phpos.windowRefresh('" . $my_app->get_param('win_id') . "',''); " . winclose(WIN_ID) . "</script>";
            }
        }
    }
}
Esempio n. 12
0
if ($my_app->get_param('msg_id') !== null && $my_app->get_param('delete_received_id') === null) {
    if (globalconfig('demo_mode') != 1 || is_root()) {
        if (!$msg->is_readed($my_app->get_param('msg_id')) && $msg->is_to_me($my_app->get_param('msg_id'))) {
            $msg->set_as_readed($my_app->get_param('msg_id'));
        }
    }
}
if (globalconfig('demo_mode') != 1 || is_root()) {
    if ($my_app->get_param('delete_sended_id') !== null) {
        $msg->delete_sended($my_app->get_param('delete_sended_id'));
        $my_app->set_param('delete_sended_id', null);
        cache_param('delete_sended_id');
    }
    if ($my_app->get_param('delete_received_id') !== null) {
        $msg->delete_received($my_app->get_param('delete_received_id'));
        $my_app->set_param('delete_received_id', null);
        cache_param('delete_received_id');
    }
    if (form_submit('new_msg')) {
        if ($_POST['action'] == 'new_msg') {
            $msg->send(intval($_POST['msg_to']), strip_tags($_POST['msg_title']), $_POST['msg_body']);
            $_POST['action'] = null;
            $msg->delete_sended($my_app->get_param('reply_id'));
            $my_app->set_param('reply_id', null);
            cache_param('reply_id');
        }
    }
}
$js = " \$('textarea#editor').ckeditor();";
$my_app->jquery_onready($js);
$my_app->jquery_onready(msg::showMessages());
 public function openfile($noecho = null)
 {
     global $my_app;
     if ($my_app->get_param('loadFS') !== null && $my_app->get_param('loadID') !== null) {
         $this->fs = $my_app->get_param('loadFS');
         $str .= winmodal(txt('explorer_api_window_open_title'), 'app', 'app_id:explorer@index,width:700,height:450', 'api_dialog:1,api_dialog_type:open_file,api_open_id:' . $my_app->get_param('loadID') . ',fs:' . $this->fs . ',win_id:' . $this->window_id);
         $my_app->set_param('loadAPI', null);
         cache_param('loadAPI');
         if ($noecho === null) {
             echo '<script>' . $str . '</script>';
             return $str;
         } else {
             return $str;
         }
     }
 }
Esempio n. 14
0
// 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');
}
                    }
                }
                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');
Esempio n. 16
0
	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 '<a href="#" title="ssss" rel="tooltip">aaaaaaaaaaaaaaaaaaaaaaaa</a>';
echo $layout->title(txt('messager_section_new_desc'));
$my_app->set_param('msg_id', null);
cache_param('msg_id');
$form = new phpos_forms();
$form->onsuccess(helper_reload(array('section' => 'sended')));
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();
$theme_id = $my_app->get_param('theme_id');
if (empty($theme_id)) {
    $my_app->set_param('theme_id', globalconfig('theme'));
}
cache_param('theme_id');
$my_app->set_param('selected_theme_id', globalconfig('theme'));
cache_param('selected_theme_id');
$my_app->jquery_onready(msg::showMessages());
$action = $my_app->get_param('action');
switch ($action) {
    case 'delete':
        $delete_id = $my_app->get_param('delete_id');
        if ($ftp->delete_ftp($delete_id)) {
            helper_result('delete_ftp', 'ok', txt('deleted'));
            $my_app->set_param('action', null);
            cache_param('action');
        }
        break;
}
if (form_submit('config_site')) {
    if ($_POST['action'] == 'config_site') {
        globalconfig('site_title', strip_tags($_POST['site_title']));
        globalconfig('site_desc', strip_tags($_POST['site_desc']));
        globalconfig('lang', strip_tags($_POST['site_lang']));
        globalconfig('root_email', strip_tags($_POST['root_email']));
        savelog('CP#CFG_SITE: UPDATED');
        helper_result('config_update', 'ok', txt('updated'));
        helper_result('config_update_result', 'result', 'success');
        $_POST['action'] = null;
    }
}
Esempio n. 18
0
$my_app->set_param('section', 'logs');
$my_app->using('params');
$my_app->using('sections');
$my_app->using('toolbar');
$year_id = $my_app->get_param('year_id');
$month_id = $my_app->get_param('month_id');
$day_id = $my_app->get_param('day_id');
$log_id = $my_app->get_param('log_id');
if (empty($log_id)) {
    $my_app->set_param('year_id', date('Y'));
    $my_app->set_param('month_id', date('m'));
    $my_app->set_param('day_id', date('d'));
    $logs = new phpos_logs();
    $today_log_id = $logs->get_today_log_file();
    $my_app->set_param('log_id', $today_log_id);
}
$my_app->jquery_onready(msg::showMessages());
$action = $my_app->get_param('action');
switch ($action) {
    case 'delete_session':
        $delete_id = $my_app->get_param('id_session');
        $u_d = new phpos_users();
        if ($u_d->delete_session($delete_id)) {
            helper_result('delete_session', 'ok', txt('deleted'));
            $my_app->set_param('action', null);
            cache_param('action');
            $my_app->set_param('id_session', null);
            cache_param('id_session');
        }
        break;
}