}
$app_action = $apiWindow->get_app_action();
define("APP_ID", $app_name);
define("APP_ACTION", $app_action);
define("WIN_TYPE", $apiWindow->getParam('wintype'));
/*
**************************
*/
if (file_exists(PHPOS_DIR . 'plugins/window.' . $apiWindow->getParam('wintype') . 'Plugin.php')) {
    define('PHPOS_PLUGIN', true);
    if (!empty($app_name)) {
        $my_app = new phpos_app();
        $my_app->set_app_id($app_name);
        $my_app->set_app_action($app_action);
        $my_app->set_window($apiWindow);
        $my_app->load_config();
        // esc - close
        if (WIN_ID != 1) {
            $tips = "\n\t\t\t\t//Select all anchor tag with rel set to tooltip\n\t\t\t\t\$('a[rel=tooltip]').mouseover(function(e) {\n\t\t\t\t\n\t\t\t\t//Grab the title attribute's value and assign it to a variable\n\t\t\t\tvar tip = \$(this).attr('title');\t\n\t\t\t\t\n\t\t\t\t//Remove the title attribute's to avoid the native tooltip from the browser\n\t\t\t\t\$(this).attr('title','');\n\t\t\t\t\n\t\t\t\t//Append the tooltip template and its value\n\t\t\t\t\$(this).append('<div id=\"tooltip\"><div class=\"tipHeader\"></div><div class=\"tipBody\">' + tip + '</div><div class=\"tipFooter\"></div></div>');\t\t\n\t\t\t\t\t\t\n\t\t\t\t//Show the tooltip with faceIn effect\n\t\t\t\t\$('#tooltip').fadeIn('500');\n\t\t\t\t\$('#tooltip').fadeTo('10',0.9);\n\t\t\t\t\n\t\t\t}).mousemove(function(e) {\n\t\t\t\n\t\t\t\t//Keep changing the X and Y axis for the tooltip, thus, the tooltip move along with the mouse\n\t\t\t\t\$('#tooltip').css('top', e.pageY - 100 );\n\t\t\t\t\$('#tooltip').css('left', e.pageX - 80 );\n\t\t\t\t\n\t\t\t}).mouseout(function() {\n\t\t\t\n\t\t\t\t//Put back the title attribute's value\n\t\t\t\t\$(this).attr('title',\$('.tipBody').html());\n\t\t\t\n\t\t\t\t//Remove the appended tooltip template\n\t\t\t\t\$(this).children('div#tooltip').remove();\n\t\t\t\t\n\t\t\t});\n\t\t\t";
            $keyboard = '	
				$(document).keyup(function(e)
				{
					switch(e.which)
					{
						// user presses the "a"
						case 97:	alert("a");
									break;	
									
						// user presses the "s" key
						case 27:	phpos.windowClose(window.PHPOS_ACTIVE_WINDOW);
						
    $wincfg['title'] = txt('shortcuts_window_title_rename');
    $input_title = txt('shortcuts_rename_title');
    $input_tip = txt('shortcuts_rename_tip');
    $button = txt('shortcuts_window_btn_rename');
    $form_id = 'new_rename';
    $default_value = strip_tags(base64_decode($old_name));
    $succ_msg = txt('shortcuts_window_msg_rename');
}
$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)));
}
 public function link_icon($plugin = 'app', $app_id = null, $icon = null, $app_action = null)
 {
     $app = new phpos_app();
     $app->set_app_id($app_id);
     $app->load_config();
     if (!empty($icon)) {
         $user_icons = new phpos_icons();
         $user_icons_dir = $user_icons->get_icons_dir();
         $user_icons_url = $user_icons->get_icons_url();
         if (file_exists($user_icons_dir . $icon)) {
             return $user_icons_url . $icon;
         }
     } else {
         if ($app_id == 'mediaframes') {
             return ICONS . 'mediaframes/' . $app_action . '.png';
         }
         return $app->get_icon();
     }
 }
 public function cp_list()
 {
     $all_apps = $this->apps_list();
     foreach ($all_apps as $app_name) {
         $app = new phpos_app();
         $app->set_app_id($app_name);
         $app->load_config();
         if ($app->have_cp()) {
             $cp_array[] = $app->get_cp_list();
         }
     }
     return $cp_array;
 }
Beispiel #5
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();
}
 
**********************************
*/
if (!defined('PHPOS')) {
    die;
}
?>
<div id="phpos_startmenu_layout_apps">
<?php 
$apps = new phpos_app();
$app_list = $apps->my_apps_list();
$c = count($app_list);
if ($c != 0) {
    foreach ($app_list as $item) {
        $apps->set_app_id($item);
        $apps->load_config();
        $is_hide = $apps->get_hidden();
        if (!$is_hide) {
            echo '<div class="startmenu_app_item" title="' . $apps->get_desc() . '" onclick="' . $apps->link_action() . '"><img src="' . $apps->get_icon() . '"><span>' . $apps->get_title() . '</span></div>';
            /*
            echo '<div class="startmenu_app_item" title="'.$apps->get_desc().'" onclick="'.$apps->link_action().'"><img src="'.$apps->get_icon().'"><span>'.txt($item).'</span></div>';
            */
        }
    }
}
?>
</div>
<script>
$(document).ready(function() { 

	$('.startmenu_app_item').mouseenter(function()