Location: PHPKode > projects > Terra-Terra, A Virtual Operating System > terra-terra.0.0.5/workareas/User/TTmenu.php
<?php
/****m*
 * NAME
 *  TTmenu.php --- Workarea of the TT User application
 *
 * DESCRIPTION
 *  Define a workarea with a single form element that holds all
 *  workareas (opened and closed).
 *
 * USAGE
 *  This page contains no HTML Header and Body tags, since
 *  it *has* to be displayed as an embedded area.
 *
 * AUTHOR
 *  Oscar van Eijk, Oveas Functionality Provider
 *
 * COPYRIGHT
 *  (c) 2003-2005 by Oscar van Eijk/Oveas Functionality Provider 
 ***/
/*
 * This module is part of Terra-Terra, the Virtual Operating System
 * http://terra-terra.com
 * ------------------------------------------------------------------------
 * This library is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 2.1 of the License,
 * or any later version.
 * This library is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU Lesser General Public License for more details.
 * You should have received a copy of the GNU Lesser General Public License
 * along with this library; if not, write to the Free Software Foundation,
 * Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 * ------------------------------------------------------------------------
 * $Id: TTmenu.php,v 1.2 2005/07/19 18:17:40 tt_oscar Exp $ 
 */
 
if (!defined ('TT_MASTER_PROCESS')) {
	if (function_exists ('version_compare')) {
		$__TTroot = $_COOKIE['TTroot'];
	} else {
		$__TTroot = $HTTP_COOKIE_VARS['TTroot'];
	}
	require_once ($__TTroot . '/kernel/TTinit.pinc');
}

echo (TT_header());

// Application and Workarea selection
//
echo ('<table border="0" width="100%">');
echo ('<tr>');
echo ('<td valign="top"><form>');
echo ("<select onchange='ApplicAreaForeGround(this);'>\n");
echo ('<option value="-1">' . $TT_workspace->get_prompt('APPLICATIONS') . ":</option>\n");
echo ('<option value="-1">---------</option>' . "\n");
	foreach ($TT_session->aids as $__name => $__aid) {
		echo ('<option value="' . $__aid->id . '">'
		.	$__name . '</option>' . "\n");
		foreach ($TT_session->aids[$__name]->wids as $__waname => $__wid) {
			if ($__wid->areatype != 'V') {
				echo ('<option value="WA' . $__wid->id . '">'
				.	' - ' . $__waname . '</option>' . "\n");
			}
		}
	}

echo ('</select>');
echo ('</form></td>');


// Nested table to make sure all icons are displayed right of the area
//
echo ('<td valign="top" align="right">');
echo ('<table border="0" width="100%">');
echo ('<tr>');

// Reload icon
//
echo ('<td valign="top"><a href="javascript:ReloadArea(-1, ' . "'r'" . ');">');
	echo ('<img '
	.	'src="themes/' . $TT_workspace->theme . '/icons/reload.png" '
	.	'border="0" '
	.	'hspace="0" '
	.	'vspace="0" '
	.	'alt="' . $TT_workspace->get_prompt('RELOAD') . '" '
	.	'/>');
echo ("</a></td>\n");

// Logout icon
//
echo ('<td valign="top"><a href="' . $TT['env_server']['PHP_SELF'] . '?TT_logout=1&' . TT_setkey ('G') . '">');
	echo ('<img '
	.	'src="themes/' . $TT_workspace->theme . '/icons/logout.png" '
	.	'border="0" '
	.	'hspace="0" '
	.	'vspace="0" '
	.	'alt="' . $TT_workspace->get_prompt('LOGOUT') . '" '
	.	'/>');
echo ('</a></td>');

echo ('</tr>');
echo ('</table>');
echo ('</td>');


echo ('</tr>');
echo ('</table>');

echo (TT_footer());
?>
Return current item: Terra-Terra, A Virtual Operating System