Exemplo n.º 1
0
 function __construct()
 {
     $this->protocol_name = txt('home_local_folder');
     $this->errorHandler = array();
     $this->prefix = 'home';
     global $my_user;
     $dir_hash = $my_user->get_home_dir_hash();
     $home_dir = PHPOS_HOME_DIR . $dir_hash;
     if (is_dir($home_dir)) {
         $this->root_directory_id = $home_dir;
     }
     /*
     if($my_user->get_user_type() == 3)
     {
     	$this->root_directory_id = PHPOS_WEBROOT_DIR.'home';
     }		
     */
     if (empty($this->directory_id)) {
         if (is_dir($this->root_directory_id)) {
             $this->directory_id = $this->root_directory_id;
         }
     }
     if (empty($this->directory_id) || empty($this->root_directory_id)) {
         $this->errorHandler = 1;
     }
 }
Exemplo n.º 2
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'));
}
<?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;
}
echo $layout->title(txt('cp_system_info_php_title'), 'icon.png');
echo $layout->txtdesc(txt('cp_system_info_php_desc'));
ob_start();
phpinfo();
$phpinfo = ob_get_contents();
ob_end_clean();
echo $phpinfo;
Exemplo n.º 4
0
function plaintext()
{
    header('Content-Type: text/plain; charset=utf-8');
    return txt("Hello, World!");
}
Exemplo n.º 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;
}
$app_menu = array('title:' . txt('plugins') . ',action:actionNewFolder,icon:icon-application', array('title:Lightbox,action:actionNewFolder'), 'title:' . txt('new_folder') . ',action:actionNewFolder,icon:icon-folder_files');
function actionNewFolder($menu_item)
{
    $j = 'newfolder();';
    return $j;
}
	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 $layout->title(txt('cp_system_info_server_title'), 'icon.png');
echo $layout->txtdesc(txt('cp_system_info_server_desc'));
$form = new phpos_forms();
echo $form->form_start('sysinfo', helper_ajax(''), array('app_params' => ''));
echo $layout->column('50%');
$form->title(txt('cp_system_info_server_form_basic_title'), null, ICONS . 'system_info/server_icon.png');
$form->label(txt('cp_system_info_server_form_ip_title'), $_SERVER['SERVER_ADDR'], '');
$form->label(txt('cp_system_info_server_form_os_title'), PHP_OS, '');
$form->label(txt('cp_system_info_server_form_name_title'), $_SERVER['SERVER_NAME'], '');
$form->label(txt('cp_system_info_server_form_soft_title'), $_SERVER['SERVER_SOFTWARE'], '');
$form->label(txt('cp_system_info_server_form_protocol_title'), $_SERVER['SERVER_PROTOCOL'], '');
echo $form->render();
echo $layout->end('column');
echo $layout->column('50%');
echo $form->render();
echo $layout->end('column');
echo $layout->clr();
echo $form->form_end();
Exemplo n.º 7
0
                if ($month_number != $my_app->get_param('month_id')) {
                    $month_closed = ',state:\'closed\'';
                }
                $month_translated = txt('month_' . intval($month_number));
                echo '<li data-options="iconCls:\'icon-folder\'' . $month_closed . '">
				<span><a href="javascript:void(0);" onclick="' . helper_reload(array('year_id' => $year_number, 'month_id' => $month_number, 'day_id' => null, 'log_id' => null)) . '"><span style="color:black">' . $month_translated . '</span></a></span>';
                $dir_days = glob($logs_dir . $year_number . '/' . $month_number . '/*.*');
                echo '<ul>';
                foreach ($dir_days as $day) {
                    if (!is_dir($day) && basename($day) != 'index.php') {
                        $days[] = basename($day);
                        $log_ext = '.log';
                        $day_id = str_replace(array('-', $year_number, $month_number, $log_ext), '', basename($day));
                        $today = '';
                        if ($logs->is_today_date($year_number, $month_number, $day_id)) {
                            $today = ' <span style="font-weight:bold; color: #1d791e">(' . txt('today') . ')</span>';
                        }
                        if ($my_app->get_param('log_id') == $day) {
                            $day_id = '<b>' . $day_id . '</b>';
                        }
                        echo '<li data-options="iconCls:\'icon-file\'">
				<span><a href="javascript:void(0);" onclick="' . helper_reload(array('year_id' => $year_number, 'month_id' => $month_number, 'day_id' => $day_id, 'log_id' => $day)) . '"><span style="color:black">' . $day_id . $today . '</span></a></span></li>';
                    }
                }
                echo '</ul>';
                echo '</li>';
            }
            echo '</ul>';
        }
        echo '</li>';
    }
Exemplo n.º 8
0
            $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 = '';
        include PHPOS_DIR . 'plugins/server.explorer_shared.php';
        $html['icons'] .= $layout->area_start($server_item_title) . $layout->txtdesc(txt('st_shared')) . $tmp_html . $layout->area_end();
        $tmp_html = '';
    }
}
if (defined('SHARED') || $my_app->get_param('in_shared')) {
    $address_icon = ICONS . 'server/shared1.png';
}
Exemplo n.º 9
0
?>

<?php 
function txt($filename)
{
    $txt = file_get_contents("data/{$filename}.txt");
    echo $txt;
}
?>

<?php 
txt('textbeispiel');
?>

<?php 
txt('about');
?>


<?php 
echo $data['site_name'];
?>


<h3>Menu</h3>

<?php 
foreach ($data['mainmenu'] as $menu) {
    echo "<li>" . "<a href='" . $menu['url'] . "'>" . $menu['item'] . "</a></li>";
}
?>
Exemplo n.º 10
0
$link_id = $my_app->get_param('link_id');
if (!empty($link_id)) {
    $wincfg['back'] = null;
    $shortcut = new phpos_shortcuts();
    $db_shortcut = $shortcut->get_shortcut($link_id);
    $db_params = $shortcut->get_params_from_db($link_id);
    $url = base64_decode($db_params['url']);
    $start_link_title = $db_shortcut['file_title'];
    $button = txt('shortcuts_window_btn_update_url');
    $wincfg['title'] = txt('shortcuts_window_title_update_url');
}
$form->status();
$form->condition('not_null', true, txt('name_empty'));
$form->input('text', 'new_link_name', txt('shortcuts_form_icon_name'), txt('shortcuts_form_icon_name_desc'), $start_link_title);
$form->condition('not_null', true, txt('url_empty'));
$form->input('text', 'new_link_url', txt('shortcuts_url_form_url'), txt('shortcuts_url_form_url_desc'), $url);
$icons = new phpos_icons();
$c = $icons->count_icons();
$items = array('null' => '---');
if ($c != 0) {
    $icons_list = $icons->get_icon_list();
    foreach ($icons_list as $icon_name) {
        $items[$icon_name] = $icon_name;
    }
}
$form->title(txt('shortcuts_icon_for_title'), '', MY_RESOURCES . 'icon.png');
$form->select('new_link_icon', txt('shortcuts_icon_for_name'), txt('shortcuts_icon_for_desc'), $items, $db_shortcut['icon']);
$html .= $form->render();
$form->submit_btn($button);
$next_button = $form->render();
$html .= $form->form_end();
Exemplo n.º 11
0
function update_time_left()
{
    global $api;
    $item_id = params('item_id');
    $state = $_POST['state'];
    $data = array(array('value' => $state));
    $api->item->updateFieldValue($item_id, ITEM_STATE_ID, $data);
    // Set time_left to '0' when moving to one of the 'done' states
    if (in_array($state, array(STATE_DEV_DONE, STATE_QA_DONE, STATE_PO_DONE))) {
        $api->item->updateFieldValue($item_id, ITEM_TIMELEFT_ID, array(array('value' => 0)), 1);
    } elseif ($state == STATE_NOT_STARTED) {
        $item = $api->item->getBasic($item_id);
        $item = new ScrumioItem($item);
        $api->item->updateFieldValue($item_id, ITEM_TIMELEFT_ID, array(array('value' => $item->estimate * 60 * 60)), 1);
    }
    return txt('ok');
}
Exemplo n.º 12
0
function Evaluation($id, $value, $input, $exercise_id, $operatorData, $answer)
{
    $m = new EvalMath();
    $xml = simplexml_load_file($exercise_id) or die("Error: Cannot create object");
    // $ops = array("==", "!=", "GE", "LE", "GT", "LT");
    $count_options = $xml->input[$id]->count();
    for ($i = 0; $i < $count_options; $i++) {
        $operator = $xml->input[$id]->option[$i]->operator;
        $equation = trim($xml->input[$id]->option[$i]->equation);
        $data = explode(" ", $equation);
        $operatorDT = "";
        if ($operator == 'IF') {
            if (strstr($equation, "and")) {
                $content = explode("and", $equation);
                $data1 = explode(" ", $content[0]);
                $data2 = explode(" ", $content[1]);
                if (evalStatement($data1, $input, $answer) and evalStatement($data2, $input, $answer)) {
                    return $xml->input[$id]->option[$i]->result;
                }
            } elseif (strstr($equation, "or")) {
                $content = explode("or", $equation);
                $data1 = explode(" ", $content[0]);
                $data2 = explode(" ", $content[1]);
                if (evalStatement($data1, $input, $answer) or evalStatement($data2, $input, $answer)) {
                    return $xml->input[$id]->option[$i]->result;
                }
            } else {
                if (evalStatement($data, $input, $answer)) {
                    return $xml->input[$id]->option[$i]->result;
                }
            }
        } else {
            $equation = "";
            foreach ($data as $element) {
                if (is_numeric($element)) {
                    $equation .= $element;
                } else {
                    if ($element[0] == 'o') {
                        $operatorDT = ltrim($element, "o");
                    } elseif ($element[0] == 'v') {
                        $trimmed = intval(ltrim($element, "v"));
                        $equation .= $input[$trimmed];
                    } elseif ($element[0] == 'a') {
                        $trimmed = intval(ltrim($element, "a"));
                        $equation .= $answer[$trimmed - 1];
                    } else {
                        $equation .= $element;
                    }
                }
            }
            if (strstr($equation, "mcm")) {
                $valor = explode(",", substr($equation, 3));
                $equation_result = mcm(intval($valor[0]), intval($valor[1]));
            } elseif (strstr($equation, "smn")) {
                $valor = explode(",", substr($equation, 3));
                $equation_result = smn(intval($valor[0]), intval($valor[1]));
            } elseif (strstr($equation, "smd")) {
                $valor = explode(",", substr($equation, 3));
                $equation_result = smd(intval($valor[0]), intval($valor[1]));
            } elseif (strstr($equation, "cod")) {
                $valor = explode(",", substr($equation, 3));
                $equation_result = cod(intval($valor[0]), intval($valor[1]));
            } elseif (strstr($equation, "red")) {
                $valor = explode(",", substr($equation, 3));
                $equation_result = red(intval($valor[0]), intval($valor[1]));
            } elseif (strstr($equation, "txt")) {
                $valor = explode(",", substr($equation, 3));
                $equation_result = txt($valor[0], $valor[1]);
            } else {
                $equation_result = $m->evaluate($equation);
            }
            if ($operatorDT == "") {
                $operatorData = "";
            }
            // return strval($equation_result);
            switch ($operator) {
                case "==":
                    if ($equation_result == $value && $operatorDT == $operatorData) {
                        return $xml->input[$id]->option[$i]->result;
                        $i = $count_options;
                    }
                    break;
                case "!=":
                    if ($equation_result != $value && $operatorDT == $operatorData) {
                        return $xml->input[$id]->option[$i]->result;
                        $i = $count_options;
                    }
                    break;
                case "GT":
                    if ($equation_result > $value && $operatorDT == $operatorData) {
                        return $xml->input[$id]->option[$i]->result;
                        $i = $count_options;
                    }
                    break;
                case "GE":
                    if ($equation_result >= $value && $operatorDT == $operatorData) {
                        return $xml->input[$id]->option[$i]->result;
                        $i = $count_options;
                    }
                    break;
                case "LT":
                    if ($equation_result < $value && $operatorDT == $operatorData) {
                        return $xml->input[$id]->option[$i]->result;
                        $i = $count_options;
                    }
                    break;
                case "LE":
                    if ($equation_result <= $value && $operatorDT == $operatorData) {
                        return $xml->input[$id]->option[$i]->result;
                        $i = $count_options;
                    }
                    break;
            }
            // SWITCH
        }
        // else IF
    }
    // option's LOOP
}
Exemplo n.º 13
0
        $languages = new phpos_languages();
        $langs_array = $languages->get_lang_list();
        $lang_items = array();
        foreach ($langs_array as $lang_id) {
            $lang_data = $languages->get_lang_info($lang_id);
            $lang_name = $lang_data['eng_name'] . ' (' . $lang_data['local_name'] . ')';
            $lang_items[$lang_id] = $lang_name;
        }
        $new_cfg = new phpos_config('no_get');
        $new_cfg->set_id_user($user_id);
        $lang = $new_cfg->get_user('lang');
        $form->select('user_new_lang', txt('language'), txt('dsc_users_account_lang'), $lang_items, $lang);
        $form->status();
        $delete_action = "\n\t\t\t\$.messager.confirm('" . txt('delete') . "', '" . txt('delete_confirm') . "?', function(r){\n\t\t\tif (r){\n\t\t\t\tphpos.windowRefresh('" . WIN_ID . "', 'section:list,action:delete,delete_id:" . $user_id . "');\t\n\t\t\t}\n\t\t\t});\t";
        $form->button(txt('delete'), $delete_action, 'cancel');
        $form->submit('', txt('update'), 'edit_add');
        //$form->button('', 'button', 'edit_add');
        echo $form->render();
        echo $layout->end('column');
        echo $layout->clr();
        echo $form->form_end();
        // user info
        echo $layout->area_start();
        include MY_APP_DIR . 'views/inc.account_info.php';
        echo $layout->area_end();
    } else {
        echo txt('access_denied');
    }
} else {
    winreload(WIN_ID, array('section' => 'list'));
}
Exemplo n.º 14
0
            $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 = '';
        include PHPOS_DIR . 'plugins/server.explorer_workgroups.php';
        $html['icons'] .= $layout->area_start($server_item_title) . $layout->txtdesc(txt('groups_serv_desc')) . $tmp_html . $layout->area_end();
        $tmp_html = '';
        $html['right_items_title'] = txt('explorer_right_groups');
        $html['right_items_desc'] = txt('explorer_right_groups_desc');
        $html['right_items_img'] = 'workgroup.png';
    }
}
Exemplo n.º 15
0
function actionGoInfo($menu_item)
{
    $j = winopen(txt('sys_info'), 'cp', 'app_id:system_info@index');
    return $j;
}
Exemplo n.º 16
0
            break;
    }
    $upd_type = '<span style="' . $type_style . '">' . $type . '</span>';
    echo $layout->tbl_start();
    echo $layout->row(array('<b>' . txt('cp_updater_update_type') . '</b>', $upd_type));
    echo $layout->row(array('<b>' . txt('cp_updater_update_info') . '</b>', $updater->get_msg()));
    echo $layout->tbl_end();
}
echo $layout->subtitle(txt('cp_updater_download_last'), ICONS . 'download.png');
echo $layout->txtdesc(txt('cp_updater_desc_download'));
echo $layout->button(txt('cp_updater_download_btn_www'), 'window.open(\'' . PHPOS_ONLINE . '?v=download\', \'_blank\')', 'download1');
echo $layout->button(txt('cp_updater_download_btn_git'), 'window.open(\'' . PHPOS_GITHUB . '\', \'_blank\')', 'download1');
echo $layout->tbl_start();
echo $layout->head(array('' => '50%', 'Link' => '50%'));
echo $layout->row(array(txt('updater_tray_visit_www'), '<a href="' . PHPOS_ONLINE . '" target="_blank">' . PHPOS_ONLINE . '</a>'));
echo $layout->row(array(txt('cp_updater_download_zip'), '<a href="' . $download_url . '" target="_blank">http://' . $updater->get_zip() . '</a>'));
echo $layout->row(array('GitHUB:', '<a href="' . PHPOS_GITHUB . '" target="_blank">' . PHPOS_GITHUB . '</a>'));
echo $layout->tbl_end();
echo $layout->end('column');
echo $layout->clr();
?>

		 
<?php 
echo $layout->end('main');
?>
	
	
	
	<?php 
echo $layout->end('layout');
Exemplo n.º 17
0
	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;
Exemplo n.º 18
0
	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;
}
$app_id = 'logs';
$plugin = 'app';
$access_level = 3;
//$cp_access_level = 1;
$hidden = 0;
$default_action = 'index';
$multilanguage = 1;
$multiple_windows = true;
$version = '1.0';
$build = '28.09.20';
$author = 'PHPOS / Marcin Szczyglinski';
$website = 'http://phpos.rox.pl';
$email = '*****@*****.**';
$title = txt('logs_app_title');
$desc = txt('logs_app_title_desc');
$icon = 'logs_icon.png';
$section['logs'] = array('access_level' => 3);
$section['sessions'] = array('access_level' => 3);
$actions['index'] = array('name' => txt('logs_app_title'), 'access_level' => 3);
Exemplo n.º 19
0
 public function jquery_next_button($step)
 {
     $this->jquery_next = array();
     $this->jquery_next[0] = null;
     $this->jquery_next[1] = null;
     // license
     $this->jquery_next[1] = "\t\n\t\t\t\n\t\t\tif(!\$('#license_checkbox').is(':checked'))\n\t\t\t{\n\t\t\t\t\$('#error_message').html('<img src=\"" . PHPOS_WEBROOT_URL . "_phpos/installer/status_error.png\" /><p>" . txt('installer_er1') . "</p>');\n\t\t\t\t\$('#error_message').css('display', 'block');\t\t\t\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t";
     $this->jquery_next[2] = null;
     // root pwd
     $this->jquery_next[3] = "\n\t\t\n\t\t\tvar pwd1=\$('input[name=\"root_password\"]').val();\n\t\t\tvar pwd2=\$('input[name=\"root_password_confirm\"]').val();\t\n\t\t\t\n\t\t\t\n\t\t\tif(pwd1=='' || pwd1==' ' || pwd2=='' || pwd2==' ')\n\t\t\t{\n\t\t\t\tif(pwd1=='' || pwd1==' ')\n\t\t\t\t{\n\t\t\t\t\t\$('input[name=\"root_password\"]').addClass('input_error');\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(pwd2=='' || pwd2==' ')\n\t\t\t\t{\n\t\t\t\t\t\$('input[name=\"root_password_confirm\"]').addClass('input_error');\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\$('#error_message').html('<img src=\"" . PHPOS_WEBROOT_URL . "_phpos/installer/status_error.png\" /><p>" . txt('installer_er2') . "</p>');\n\t\t\t\t\$('#error_message').css('display', 'block');\t\t\t\n\t\t\t\treturn false;\t\t\t\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t// not empty\n\t\t\t\tif(pwd1 != pwd2)\n\t\t\t\t{\n\t\t\t\t\t\$('#error_message').html('<img src=\"" . PHPOS_WEBROOT_URL . "_phpos/installer/status_error.png\" /><p>" . txt('installer_er3') . "</p>');\n\t\t\t\t\t\$('#error_message').css('display', 'block');\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\$('input[name=\"root_password\"]').addClass('input_error');\t\n\t\t\t\t\t\$('input[name=\"root_password_confirm\"]').addClass('input_error');\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\treturn false;\t\n\t\t\t\t} else {\n\t\t\t\t\n\t\t\t\t\tif(pwd1.length < 6 || pwd2.length < 6 || pwd2.length > 30 || pwd2.length > 30)\n\t\t\t\t\t{\t\t\t\n\t\t\t\t\t\t\$('input[name=\"root_password\"]').addClass('input_error');\t\n\t\t\t\t\t\t\$('input[name=\"root_password_confirm\"]').addClass('input_error');\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\$('#error_message').html('<img src=\"" . PHPOS_WEBROOT_URL . "_phpos/installer/status_error.png\" /><p>" . txt('installer_er4') . "</p>');\n\t\t\t\t\t\t\$('#error_message').css('display', 'block');\t\t\t\n\t\t\t\t\t\treturn false;\t\t\t\t\t\t\n\t\t\t\t\t}\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t}\t\n\t\t";
     // db config
     $this->jquery_next[4] = "\n\t\t\n\t\t\tvar db_host = \$('input[name=\"db_host\"]').val();\n\t\t\tvar db_name = \$('input[name=\"db_name\"]').val();\t\n\t\t\tvar db_user = \$('input[name=\"db_user\"]').val();\t\n\t\t\t\n\t\t\tif(db_host=='' || db_host==' ')\n\t\t\t{\n\t\t\t\t\$('input[name=\"db_host\"]').addClass('input_error');\n\t\t\t}\n\t\t\t\n\t\t\tif(db_name=='' || db_name==' ')\n\t\t\t{\n\t\t\t\t\$('input[name=\"db_name\"]').addClass('input_error');\n\t\t\t}\n\t\t\t\n\t\t\tif(db_user=='' || db_user==' ')\n\t\t\t{\n\t\t\t\t\$('input[name=\"db_user\"]').addClass('input_error');\n\t\t\t}\t\n\t\t\t\n\t\t\t\n\t\t\tif(db_host=='' || db_host==' ' || db_name=='' || db_name==' ' || db_user=='' || db_user==' ')\n\t\t\t{\t\t\n\t\t\t\t\$('#error_message').html('<img src=\"" . PHPOS_WEBROOT_URL . "_phpos/installer/status_error.png\" /><p>" . txt('installer_er5') . "</p>');\n\t\t\t\t\$('#error_message').css('display', 'block');\t\t\t\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\n\t\t";
     $this->jquery_next[5] = null;
     $this->jquery_next[6] = null;
     $this->jquery_next[7] = null;
     $this->jquery_next[8] = null;
     $this->jquery_next[9] = null;
     $this->jquery_next[10] = null;
     return $this->jquery_next[$step];
 }
Exemplo n.º 20
0
 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');";
     }
 }
                        }
                    }
                }
                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');
Exemplo n.º 22
0
                            helper_result('my_update_user', 'error', txt('pass_old_need'));
                        }
                    }
                    $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');
Exemplo n.º 23
0
	(c) 2013 Marcin Szczyglinski
	szczyglis83@gmail.com
	GitHUB: https://github.com/phpos/
	File version: 1.0.0, 2013.10.08
 
**********************************
*/
if (!defined('PHPOS')) {
    die;
}
$app_id = 'ftp';
$plugin = 'app';
$access_level = 1;
$cp_access_level = 1;
$hidden = 1;
$default_action = 'index';
$default_section = 'new_account';
$multiple_windows = true;
$version = '1.0';
$build = '13.09.20';
$author = 'PHPOS / Marcin Szczyglinski';
$website = 'http://phpos.rox.pl';
$email = '*****@*****.**';
$title = txt('ftp_folders');
$desc = txt('ftp_folders_desc');
$icon = 'ftp.png';
$control_panels = array(array('index', txt('ftp_folders'), 'icon.png', txt('ftp_folders_desc'), 1));
$section['new_account'] = array('access_level' => 1);
$section['edit_account'] = array('access_level' => 1);
$section['list'] = array('access_level' => 1);
$actions['index'] = array('access_level' => 3);
Exemplo n.º 24
0
$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();
$after_reload = $my_app->get_param('after_reload');
$form = new phpos_forms();
$form->onsuccess($success_code);
if (empty($old_name)) {
    $html .= $layout->subtitle(txt('shortcuts_newdir_title'), MY_RESOURCES_URL . 'folder.png');
    $html .= $layout->txtdesc(txt('shortcuts_newdir_desc'));
} else {
    $html .= $layout->subtitle(txt('shortcuts_rename_title'), MY_RESOURCES_URL . 'rename.png');
    $html .= $layout->txtdesc(txt('shortcuts_rename_desc'));
}
$html .= $form->form_start($form_id, helper_post_outside('null', '', $after_reload), array('app_params' => ''));
$form->reload_after_submit(array($after_reload));
if (!empty($edit_id)) {
    $form->input('hidden', 'edit_id', '', '', strip_tags(base64_decode($edit_id)));
}
$form->status();
$form->condition('not_null', true, txt('name_empty'));
$form->input('text', 'new_folder_name', $input_title, $input_tip, $default_value);
$html .= $form->render();
$form->submit_btn($button);
$next_button = $form->render();
//$html.= $form->render();
$html .= $form->form_end();
Exemplo n.º 25
0
            $items = array('0' => txt('no'), '1' => txt('yes'));
            $form->radio('ftp_new_public', txt('ftp_form_public'), txt('ftp_form_public_desc'), $items, $ftp->get_is_public());
        } else {
            $form->input('hidden', 'ftp_new_public', '', '', '0');
        }
        echo $form->render();
        echo $layout->end('column');
        echo $layout->column('50%');
        $form->title(txt('ftp_authentication'), '', ICONS . 'system_info/key_icon.png');
        $form->condition('not_null', true, txt('form_empty_field') . 'Host');
        $form->input('text', 'ftp_new_host', 'Host/IP', txt('dsc_ftp_host'), $ftp->get_host());
        $form->condition('not_null', true, txt('form_empty_field') . 'Login');
        $form->input('text', 'ftp_new_login', 'Login', txt('dsc_ftp_login'), $ftp->get_login());
        $form->condition('not_null', true, txt('form_empty_field') . txt('password'));
        $form->input('password', 'ftp_new_pass', txt('password'), txt('dsc_ftp_pass'), $ftp->get_password());
        $form->input('text', 'ftp_new_port', 'Port', txt('dsc_ftp_port'), $ftp->get_port());
        $form->status();
        $delete_action = "\n\t\t\t\$.messager.confirm('" . txt('delete') . "', '" . txt('delete_confirm') . "?', function(r){\n\t\t\tif (r){\n\t\t\t\tphpos.windowRefresh('" . WIN_ID . "', 'section:list,action:delete,delete_id:" . $ftp->get_id() . "');\t\n\t\t\t}\n\t\t\t});\t";
        $form->button(txt('delete'), $delete_action, 'cancel');
        $form->submit('', txt('btn_update'), 'edit_add');
        //$form->button('', 'button', 'edit_add');
        echo $form->render();
        echo $layout->end('column');
        echo $layout->clr();
        echo $form->form_end();
    } else {
        echo $layout->access_denied();
    }
} else {
    winreload(WIN_ID, array('section' => 'list'));
}
Exemplo n.º 26
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;
}
$schema = array('files' => array('id_key' => 'id_file', 'fields' => array(array('id_file', 'int'), array('file_title', 'text'), array('plugin_id', 'text'), array('location', 'text'), array('app_id', 'text'), array('app_action', 'text'), array('win_params', 'text'), array('app_params', 'text'), array('id_parent', 'int'), array('id_user', 'int'), array('created_at', 'int'), array('modified_at', 'int'), array('content', 'text'), array('chmod', 'int'), array('is_dir', 'bool'), array('no_delete', 'bool'), array('shared', 'int'), array('icon', 'text'), array('deleted', 'bool'), array('multilang', 'bool'))), 'ftp' => array('id_key' => 'id', 'fields' => array(array('id', 'int'), array('id_user', 'int'), array('title', 'text'), array('host', 'text'), array('port', 'int'), array('login', 'text'), array('password', 'text'), array('remote_dir', 'text'), array('description', 'text'), array('public', 'bool'))), 'messages' => array('id_key' => 'id', 'fields' => array(array('id', 'int'), array('id_user_from', 'int'), array('id_user_to', 'int'), array('sended_at', 'int'), array('readed_at', 'int'), array('is_readed', 'bool'), array('title', 'text'), array('msg', 'text'), array('receiver_deleted', 'bool'), array('sender_deleted', 'bool'))), 'clouds' => array('id_key' => 'id', 'fields' => array(array('id', 'int'), array('id_user', 'int'), array('title', 'text'), array('cloud', 'text'), array('login', 'text'), array('password', 'text'), array('url', 'text'), array('description', 'text'), array('public', 'bool'), array('param1', 'text'), array('param2', 'text'), array('param3', 'text'), array('param4', 'text'))), 'globalconfig' => array('id_key' => 'id_config', 'fields' => array(array('id_config', 'int'), array('config_name', 'text'), array('config_value', 'text'), array('config_param', 'text'))), 'groups' => array('id_key' => 'id', 'fields' => array(array('id', 'int'), array('id_owner', 'int'), array('title', 'text'), array('description', 'text'), array('msg', 'text'))), 'groups_records' => array('id_key' => 'id', 'fields' => array(array('id', 'int'), array('id_group', 'int'), array('id_user', 'int'))), 'startmenu' => array('id_key' => 'id', 'fields' => array(array('id', 'int'), array('id_user', 'int'), array('id_file', 'int'))), 'sessions' => array('id_key' => 'id_session', 'fields' => array(array('id_session', 'int'), array('id_user', 'int'), array('php_sessid', 'text'), array('start_time', 'int'), array('end_time', 'int'), array('user_ip', 'text'), array('user_browser', 'text'), array('user_param', 'text'))), 'shared' => array('id_key' => 'id', 'fields' => array(array('id', 'int'), array('id_user', 'int'), array('title', 'text'), array('description', 'text'), array('folder_type', 'text'), array('folder_id', 'text'), array('readonly', 'bool'))), 'userconfig' => array('id_key' => 'id_config', 'fields' => array(array('id_config', 'int'), array('id_user', 'int'), array('config_name', 'text'), array('config_value', 'text'), array('config_param', 'text'))), 'users' => array('id_key' => 'id_user', 'fields' => array(array('id_user', 'int'), array('user_login', 'text'), array('user_pass', 'text'), array('user_email', 'text'), array('user_type', 'int'), array('id_group', 'int'), array('is_active', 'bool'), array('created_at', 'int'), array('last_login', 'int'), array('last_activity', 'int'), array('note', 'text'))));
$insert['users'] = array(array('id_user' => '1', 'user_login' => 'root', 'user_pass' => '', 'user_email' => '', 'user_type' => '3', 'id_group' => '1', 'is_active' => '1', 'created_at' => '0', 'last_login' => '0', 'last_activity' => '0', 'note' => 'root'));
$insert['files'] = array(array('id_file' => '1', 'file_title' => 'my_server', 'plugin_id' => 'app', 'location' => 'desktop', 'id_parent' => '0', 'id_user' => '1', 'created_at' => time(), 'modified_at' => time(), 'content' => '', 'chmod' => '0', 'is_dir' => '0', 'no_delete' => '1', 'app_id' => 'explorer', 'app_action' => 'my_server', 'app_params' => 'fs:local_files', 'shared' => '0', 'icon' => 'mycomp.png', 'deleted' => '0', 'multilang' => '1'), array('id_file' => '2', 'file_title' => 'updater_app_title', 'plugin_id' => 'app', 'location' => 'desktop', 'id_parent' => '0', 'id_user' => '1', 'created_at' => time(), 'modified_at' => time(), 'content' => '', 'chmod' => '0', 'is_dir' => '0', 'no_delete' => '0', 'app_id' => 'updater', 'app_action' => 'index', 'shared' => '0', 'deleted' => '0', 'multilang' => '1'), array('id_file' => '3', 'file_title' => 'notepad_app_title', 'plugin_id' => 'app', 'location' => 'desktop', 'id_parent' => '0', 'id_user' => '1', 'created_at' => time(), 'modified_at' => time(), 'content' => '', 'chmod' => '0', 'is_dir' => '0', 'no_delete' => '0', 'app_id' => 'notepad', 'app_action' => 'index', 'shared' => '0', 'deleted' => '0', 'multilang' => '1'), array('id_file' => '4', 'file_title' => 'app_messager', 'plugin_id' => 'app', 'location' => 'desktop', 'id_parent' => '0', 'id_user' => '1', 'created_at' => time(), 'modified_at' => time(), 'content' => '', 'chmod' => '0', 'is_dir' => '0', 'no_delete' => '0', 'app_id' => 'messenger', 'app_action' => 'index', 'shared' => '0', 'deleted' => '0', 'multilang' => '1'), array('id_file' => '5', 'file_title' => 'logs_app_title', 'plugin_id' => 'app', 'location' => 'desktop', 'id_parent' => '0', 'id_user' => '1', 'created_at' => time(), 'modified_at' => time(), 'content' => '', 'chmod' => '0', 'is_dir' => '0', 'no_delete' => '0', 'app_id' => 'logs', 'app_action' => 'index', 'shared' => '0', 'deleted' => '0', 'multilang' => '1'), array('id_file' => '6', 'file_title' => txt('after_install_readme_title'), 'plugin_id' => 'app', 'location' => 'db', 'id_parent' => '0', 'id_user' => '1', 'created_at' => time(), 'modified_at' => time(), 'content' => txt('after_install_readme_file'), 'chmod' => '0', 'is_dir' => '0', 'no_delete' => '0', 'app_id' => 'notepad', 'app_action' => 'index', 'app_params' => 'content:1', 'shared' => '0', 'deleted' => '0', 'multilang' => '0'), array('id_file' => '7', 'file_title' => txt('after_install_folder_links'), 'plugin_id' => 'folder', 'location' => 'desktop', 'id_parent' => '0', 'id_user' => '1', 'created_at' => time(), 'modified_at' => time(), 'content' => '', 'chmod' => '0', 'is_dir' => '1', 'no_delete' => '0', 'app_id' => '', 'app_action' => 'index', 'app_params' => '', 'shared' => '0', 'deleted' => '0', 'multilang' => '0'), array('id_file' => '8', 'file_title' => txt('after_install_shortcut_yt_militia'), 'plugin_id' => 'app', 'location' => 'db', 'id_parent' => '7', 'id_user' => '1', 'created_at' => time(), 'modified_at' => time(), 'content' => '', 'chmod' => '0', 'is_dir' => '0', 'no_delete' => '0', 'app_id' => 'mediaframes', 'app_action' => 'youtube', 'app_params' => 'url:aHR0cDovL3d3dy55b3V0dWJlLmNvbS93YXRjaD92PVV4ZXg0Ry1Nd3hJ', 'shared' => '0', 'deleted' => '0', 'multilang' => '0'), array('id_file' => '9', 'file_title' => txt('after_install_shortcut_link_barok'), 'plugin_id' => 'link', 'location' => 'db', 'id_parent' => '7', 'id_user' => '1', 'created_at' => time(), 'modified_at' => time(), 'content' => '', 'chmod' => '0', 'is_dir' => '0', 'no_delete' => '0', 'app_id' => 'links', 'app_action' => 'index', 'app_params' => 'url:aHR0cDovL2Jhcm9rZW5naW5lLmNvbS8=', 'shared' => '0', 'deleted' => '0', 'multilang' => '0'), array('id_file' => '10', 'file_title' => txt('after_install_shortcut_phpos_www'), 'plugin_id' => 'link', 'location' => 'db', 'id_parent' => '7', 'id_user' => '1', 'created_at' => time(), 'modified_at' => time(), 'content' => '', 'chmod' => '0', 'is_dir' => '0', 'no_delete' => '0', 'app_id' => 'links', 'app_action' => 'index', 'app_params' => 'url:aHR0cDovL3d3dy5waHBvcy5yb3gucGw=', 'shared' => '0', 'deleted' => '0', 'multilang' => '0'), array('id_file' => '11', 'file_title' => txt('after_install_shortcut_frame_wiki'), 'plugin_id' => 'link', 'location' => 'db', 'id_parent' => '7', 'id_user' => '1', 'created_at' => time(), 'modified_at' => time(), 'content' => '', 'chmod' => '0', 'is_dir' => '0', 'no_delete' => '0', 'app_id' => 'webframes', 'app_action' => 'index', 'app_params' => 'url:aHR0cDovL3dpa2lwZWRpYS5vcmc=', 'shared' => '0', 'deleted' => '0', 'multilang' => '0'));
$insert['groups'] = array(array('id' => '1', 'id_owner' => '1', 'title' => txt('after_install_group_name'), 'description' => txt('after_install_group_desc'), 'msg' => ''));
$insert['groups_records'] = array(array('id' => '1', 'id_group' => '1', 'id_user' => '1'));
$insert['startmenu'] = array(array('id' => '1', 'id_user' => '1', 'id_file' => '10'));
$insert['startmenu'] = array(array('id' => '1', 'id_user' => '1', 'id_file' => '10'));
$insert['messages'] = array(array('id' => '1', 'id_user_from' => '1', 'id_user_to' => '1', 'sended_at' => time(), 'readed_at' => '0', 'is_readed' => '0', 'title' => txt('after_install_msg_title'), 'msg' => txt('after_install_msg_body'), 'sender_deleted' => '1', 'receiver_deleted' => '0'));
$insert['userconfig'] = array(array('id_config' => '1', 'id_user' => '1', 'config_name' => 'lang', 'config_value' => 'en', 'config_param' => ''));
$insert['globalconfig'] = array(array('config_name' => 'lang', 'config_value' => 'en'), array('config_name' => 'theme', 'config_value' => 'default'), array('config_name' => 'upload_blacklist', 'config_value' => 'php,php5,php4,php3,html,htm,js,cgi,exe,bin,bat,sh'));
Exemplo n.º 27
0
$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;
    }
}
if (form_submit('config_updater')) {
    if ($_POST['action'] == 'config_updater') {
        globalconfig('app_updater_autoupdate', strip_tags($_POST['app_updater_autoupdate']));
        helper_result('config_update', 'ok', txt('updated'));
        helper_result('config_update_result', 'result', 'success');
        $_POST['action'] = null;
    }
}
Exemplo n.º 28
0
		$(this).removeClass('phpos-menustart_TaskItem_mouseover').addClass('phpos-menustart_TaskItem_mouseout');		
	});	
	
	
	var restore = setTimeout(function()
	{
		
		<?php 
echo $js_code;
?>

	}	, 1000);
	
	
	//alert('<?php 
echo txt('copy');
?>
');
	
	
	// document click i czy nie hover !!!!!!!!!!!! na all!!!
	
	
});
$(function(){
		
		<?php 
echo $js_context_menu;
?>
		
});
Exemplo n.º 29
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';
    }
}
Exemplo n.º 30
0
		$(this).removeClass('btn_mouseenter_prev').addClass('btn_mouseleave_prev');	
	});
	
	$('.prev_step_btn').click(function() {
		window.location = '?step=<?php 
echo $prev_step;
?>
&lang=<?php 
echo $_SESSION['installer_lang'];
?>
';
	});	
	
	$('.reinstall_btn').click(function() {
		if(confirm('<?php 
echo txt('installer_reinstall_msg');
?>
')) {
			window.location = '?step=<?php 
echo $step;
?>
&lang=<?php 
echo $_SESSION['installer_lang'];
?>
&reinstall=1';
		}
	});	
	
	
	/* lang */
	$('.phpos_tray_item').mouseenter(function()