Added initial collection of files for Version 2 of PhpLogCon.
This is a total rewrite, and still lots of code is missing.
226
classes/class_template.php
Normal file
@ -0,0 +1,226 @@
|
||||
<?php
|
||||
/*
|
||||
*********************************************************************
|
||||
* Copyright by Adiscon GmbH | 2008! *
|
||||
* -> www.phplogcon.org <- *
|
||||
* *
|
||||
* Use this script at your own risk! *
|
||||
* ----------------------------------------------------------------- *
|
||||
* *
|
||||
* Template Class 1.02 *
|
||||
* *
|
||||
* Release Date: 26.08.2001 *
|
||||
* Author: Philipp von Criegern (philipp@criegern.de) *
|
||||
* *
|
||||
* This is Open Source Software. Published 'as is' without *
|
||||
* any warranty. *
|
||||
* Feel free to use or edit it. Any comments are welcome! *
|
||||
* *
|
||||
* Modify Date: 2006-01-20 *
|
||||
* by Andre Lorbach *
|
||||
* *
|
||||
* All directives are explained within this file *
|
||||
*********************************************************************
|
||||
*/
|
||||
|
||||
// --- Avoid directly accessing this file!
|
||||
if ( !defined('IN_PHPLOGCON') )
|
||||
{
|
||||
die('Hacking attempt');
|
||||
exit;
|
||||
}
|
||||
// ---
|
||||
|
||||
class Template {
|
||||
|
||||
var $path = '';
|
||||
var $filename = '';
|
||||
var $extension = '';
|
||||
var $template, $vars, $page;
|
||||
|
||||
function Template ($fname = '') {
|
||||
if ($fname)
|
||||
$this->filename = $fname;
|
||||
}
|
||||
|
||||
function set_path ($path) {
|
||||
$this->path = $path;
|
||||
}
|
||||
|
||||
function set_extension ($ext) {
|
||||
$this->extension = $ext;
|
||||
}
|
||||
|
||||
function set_templatefile ($fname) {
|
||||
$this->filename = $fname;
|
||||
}
|
||||
|
||||
function set_template ($template) {
|
||||
$this->template = $template;
|
||||
}
|
||||
|
||||
function set_values ($vars) {
|
||||
$this->vars = $vars;
|
||||
}
|
||||
|
||||
function add_value ($name, $value) {
|
||||
$this->vars[$name] = $value;
|
||||
}
|
||||
|
||||
function add_array ($name, $values) {
|
||||
if (is_array($values))
|
||||
$this->vars[$name][] = $values;
|
||||
}
|
||||
|
||||
function add_list ($name, $values) {
|
||||
if (is_array($values))
|
||||
foreach ($values as $value)
|
||||
$this->vars[$name][] = array($name => $value);
|
||||
}
|
||||
|
||||
function parser ($vars = '', $filename = '')
|
||||
{
|
||||
// BEGIN DELTA MOD
|
||||
global $CFG;
|
||||
// For ShowPageRenderStats
|
||||
if ( $CFG['ShowPageRenderStats'] == 1 )
|
||||
FinishPageRenderStats( $vars );
|
||||
// END DELTA MOD
|
||||
|
||||
if ($filename)
|
||||
$this->filename = $filename;
|
||||
if ($vars)
|
||||
$this->vars = $vars;
|
||||
if (!isset($this->template)) {
|
||||
$fname = $this->path . $this->filename . $this->extension;
|
||||
$this->template = load_file($fname);
|
||||
}
|
||||
$this->page = template_parser( $this->template, $this->vars, $this->path, $this->extension );
|
||||
|
||||
}
|
||||
|
||||
function result () {
|
||||
return $this->page;
|
||||
}
|
||||
|
||||
function output () {
|
||||
echo $this->page;
|
||||
}
|
||||
|
||||
function create_file ($fname) {
|
||||
if ($datafile = @fopen($fname, 'w')) {
|
||||
fputs($datafile, $this->page);
|
||||
fclose($datafile);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function load_file($fname)
|
||||
{
|
||||
if (@is_file($fname))
|
||||
return join('', file($fname));
|
||||
else
|
||||
{
|
||||
// BEGIN DELTA MOD
|
||||
DieWithErrorMsg( "Could not find the template <B>".$fname."</B>");
|
||||
// END DELTA MOD
|
||||
}
|
||||
}
|
||||
|
||||
function template_parser($template, $values, $path = '', $ext = '')
|
||||
{
|
||||
while (preg_match("<!-- INCLUDE ([^\>]+) -->", $template, $matches))
|
||||
$template = str_replace( "<!-- INCLUDE ".$matches[1]." -->", load_file( $path . $matches[1] . $ext), $template );
|
||||
|
||||
$template = template_parser_sub($template, $values);
|
||||
$template = str_replace("\t", " ", $template);
|
||||
$template = preg_replace("/ +/", " ", $template);
|
||||
return $template;
|
||||
}
|
||||
|
||||
function template_parser_sub($template, $values)
|
||||
{
|
||||
if (is_array($values))
|
||||
{
|
||||
foreach ($values as $k => $v)
|
||||
{
|
||||
if (is_array($v))
|
||||
{
|
||||
$len = strlen($k);
|
||||
$lp = strpos($template, "<!-- BEGIN $k -->");
|
||||
if (is_int($lp))
|
||||
{
|
||||
if ($rp = strpos($template, "<!-- END $k -->"))
|
||||
{
|
||||
$page = substr($template, 0, $lp);
|
||||
$iter = substr($template, $lp + 15 + $len, $rp - $lp - $len - 15);
|
||||
$rowcnt = 0;
|
||||
$zaehler = 1;
|
||||
foreach ($v as $subval)
|
||||
{
|
||||
$subval['COUNTER'] = $rowcnt%2;
|
||||
$subval['ODDROW'] = $rowcnt%2;
|
||||
$subval['ROWCNT'] = $rowcnt++;
|
||||
$subval['ZAEHLER'] = $zaehler++;
|
||||
$page .= template_parser_sub($iter, $subval);
|
||||
}
|
||||
$template = $page . substr($template, $rp + 13 + $len);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$template = str_replace('{'.$k.'}', "$v", $template);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (preg_match_all("<!-- BEGIN ([a-zA-Z0-9_]+) -->", $template, $matches))
|
||||
{
|
||||
foreach ($matches[1] as $block)
|
||||
{
|
||||
if (isset($values[$block]))
|
||||
{
|
||||
$template = str_replace("<!-- BEGIN $block -->", "", $template);
|
||||
$template = str_replace("<!-- END $block -->", "", $template);
|
||||
}
|
||||
else if ($blockend = strpos($template, "<!-- END $block -->")) {
|
||||
$blockbeg = strpos($template, "<!-- BEGIN $block -->");
|
||||
$template = substr($template, 0, $blockbeg) . substr($template, $blockend + 13 + strlen($block));
|
||||
}
|
||||
}
|
||||
}
|
||||
// else
|
||||
|
||||
if (preg_match_all( '<!-- IF ([a-zA-Z0-9_]+)(!?)="([^"]*)" -->', $template, $matches, PREG_SET_ORDER) )
|
||||
{
|
||||
// echo $matches[0][0];
|
||||
// exit;
|
||||
|
||||
foreach ($matches as $block) {
|
||||
$blockname = $block[1];
|
||||
$not = $block[2];
|
||||
$blockvalue = $block[3];
|
||||
if ((@$values[$blockname] == $blockvalue && !$not) || (@$values[$blockname] != $blockvalue && $not))
|
||||
{
|
||||
$template = str_replace( "<!-- IF $blockname$not=\"$blockvalue\" -->", "", $template );
|
||||
$template = str_replace( "<!-- ENDIF $blockname$not=\"$blockvalue\" -->", "", $template );
|
||||
}
|
||||
else if ($blockend = strpos( $template, "<!-- ENDIF $blockname$not=\"$blockvalue\" -->"))
|
||||
{
|
||||
$blockbeg = strpos($template, "<!-- IF $blockname$not=\"$blockvalue\" -->");
|
||||
$template = substr($template, 0, $blockbeg) . substr($template, $blockend + 18 + strlen($blockname) + strlen($blockvalue) + strlen($not));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
return $template;
|
||||
}
|
||||
?>
|
8
css/defaults.css
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
/* Generic Style defintions */
|
||||
#FilterOptions
|
||||
{
|
||||
visibility: hidden;
|
||||
position: relative;
|
||||
display: none;
|
||||
}
|
BIN
images/bars/balken_25/balken.ufo
Normal file
BIN
images/bars/bar-middle/green_left_17.png
Normal file
After Width: | Height: | Size: 343 B |
BIN
images/bars/bar-middle/green_middle_17.png
Normal file
After Width: | Height: | Size: 150 B |
BIN
images/bars/bar-middle/green_right_17.png
Normal file
After Width: | Height: | Size: 353 B |
BIN
images/bars/bar-small/blue_left_9.png
Normal file
After Width: | Height: | Size: 184 B |
BIN
images/bars/bar-small/blue_middle_9.png
Normal file
After Width: | Height: | Size: 121 B |
BIN
images/bars/bar-small/blue_right_9.png
Normal file
After Width: | Height: | Size: 186 B |
BIN
images/bars/bar-small/green_left_9.png
Normal file
After Width: | Height: | Size: 183 B |
BIN
images/bars/bar-small/green_middle_9.png
Normal file
After Width: | Height: | Size: 121 B |
BIN
images/bars/bar-small/green_right_9.png
Normal file
After Width: | Height: | Size: 187 B |
BIN
images/bars/bar-small/red_left_17.png
Normal file
After Width: | Height: | Size: 251 B |
BIN
images/bars/bar-small/red_left_9.png
Normal file
After Width: | Height: | Size: 183 B |
BIN
images/bars/bar-small/red_middle_9.png
Normal file
After Width: | Height: | Size: 122 B |
BIN
images/bars/bar-small/red_right_9.png
Normal file
After Width: | Height: | Size: 189 B |
BIN
images/bars/bar-small/yellow_left_9.png
Normal file
After Width: | Height: | Size: 193 B |
BIN
images/bars/bar-small/yellow_middle_9.png
Normal file
After Width: | Height: | Size: 124 B |
BIN
images/bars/bar-small/yellow_right_9.png
Normal file
After Width: | Height: | Size: 203 B |
BIN
images/bg_bottom.gif
Normal file
After Width: | Height: | Size: 117 B |
BIN
images/icons/Thumbs.db
Normal file
BIN
images/icons/add.png
Normal file
After Width: | Height: | Size: 899 B |
BIN
images/icons/alarmclock.png
Normal file
After Width: | Height: | Size: 1009 B |
BIN
images/icons/arrow_right_blue.png
Normal file
After Width: | Height: | Size: 707 B |
BIN
images/icons/arrow_right_green.png
Normal file
After Width: | Height: | Size: 702 B |
BIN
images/icons/businessman_preferences.png
Normal file
After Width: | Height: | Size: 882 B |
BIN
images/icons/businessmen.png
Normal file
After Width: | Height: | Size: 875 B |
BIN
images/icons/check.png
Normal file
After Width: | Height: | Size: 922 B |
BIN
images/icons/date-time.png
Normal file
After Width: | Height: | Size: 915 B |
BIN
images/icons/delete.png
Normal file
After Width: | Height: | Size: 947 B |
BIN
images/icons/download.png
Normal file
After Width: | Height: | Size: 914 B |
BIN
images/icons/edit.png
Normal file
After Width: | Height: | Size: 928 B |
BIN
images/icons/exit.png
Normal file
After Width: | Height: | Size: 834 B |
BIN
images/icons/folder.png
Normal file
After Width: | Height: | Size: 795 B |
BIN
images/icons/folder_closed.png
Normal file
After Width: | Height: | Size: 763 B |
BIN
images/icons/garbage_empty.png
Normal file
After Width: | Height: | Size: 956 B |
BIN
images/icons/gears_run.png
Normal file
After Width: | Height: | Size: 1005 B |
BIN
images/icons/home.png
Normal file
After Width: | Height: | Size: 883 B |
BIN
images/icons/line-chart.png
Normal file
After Width: | Height: | Size: 934 B |
BIN
images/icons/link.png
Normal file
After Width: | Height: | Size: 847 B |
BIN
images/icons/preferences.png
Normal file
After Width: | Height: | Size: 840 B |
BIN
images/icons/recycle.png
Normal file
After Width: | Height: | Size: 955 B |
BIN
images/icons/redo.png
Normal file
After Width: | Height: | Size: 895 B |
BIN
images/icons/selection.png
Normal file
After Width: | Height: | Size: 376 B |
BIN
images/icons/selection_delete.png
Normal file
After Width: | Height: | Size: 807 B |
BIN
images/icons/server.png
Normal file
After Width: | Height: | Size: 891 B |
BIN
images/icons/star_blue.png
Normal file
After Width: | Height: | Size: 877 B |
BIN
images/icons/star_green.png
Normal file
After Width: | Height: | Size: 890 B |
BIN
images/icons/star_grey.png
Normal file
After Width: | Height: | Size: 877 B |
BIN
images/icons/star_red.png
Normal file
After Width: | Height: | Size: 877 B |
BIN
images/icons/star_yellow.png
Normal file
After Width: | Height: | Size: 877 B |
BIN
images/icons/view.png
Normal file
After Width: | Height: | Size: 844 B |
BIN
images/main/Header-Logo.png
Normal file
After Width: | Height: | Size: 63 KiB |
551
include/functions_common.php
Normal file
@ -0,0 +1,551 @@
|
||||
<?php
|
||||
/*
|
||||
*********************************************************************
|
||||
* Copyright by Adiscon GmbH | 2008! *
|
||||
* -> www.phplogcon.org <- *
|
||||
* *
|
||||
* Use this script at your own risk! *
|
||||
* ----------------------------------------------------------------- *
|
||||
* Common needed functions *
|
||||
* *
|
||||
* -> *
|
||||
* *
|
||||
* All directives are explained within this file *
|
||||
*********************************************************************
|
||||
*/
|
||||
|
||||
// --- Avoid directly accessing this file!
|
||||
if ( !defined('IN_PHPLOGCON') )
|
||||
{
|
||||
die('Hacking attempt');
|
||||
exit;
|
||||
}
|
||||
// ---
|
||||
|
||||
// --- Basic Includes
|
||||
include($gl_root_path . 'include/functions_constants.php');
|
||||
include($gl_root_path . 'include/functions_themes.php');
|
||||
include($gl_root_path . 'include/functions_db.php');
|
||||
include($gl_root_path . 'classes/class_template.php');
|
||||
// ---
|
||||
|
||||
// --- Define Basic vars
|
||||
$RUNMODE = RUNMODE_WEBSERVER;
|
||||
$DEBUGMODE = DEBUG_INFO;
|
||||
|
||||
// --- Disable ARGV setting @webserver!
|
||||
ini_set( "register_argc_argv", "Off" );
|
||||
// ---
|
||||
|
||||
// Default language
|
||||
$LANG_EN = "en"; // Used for fallback
|
||||
$LANG = "en"; // Default language
|
||||
|
||||
// Default Template vars
|
||||
$content['BUILDNUMBER'] = "0.1.101";
|
||||
$content['TITLE'] = "PhpLogCon - Release " . $content['BUILDNUMBER']; // Title of the Page
|
||||
$content['BASEPATH'] = $gl_root_path;
|
||||
$content['EXTRA_METATAGS'] = "";
|
||||
// ---
|
||||
|
||||
function InitBasicPhpLogCon()
|
||||
{
|
||||
// Needed to make global
|
||||
global $CFG, $gl_root_path, $content;
|
||||
|
||||
// Check RunMode first!
|
||||
CheckAndSetRunMode();
|
||||
|
||||
// Get and Set RunTime Informations
|
||||
InitRuntimeInformations();
|
||||
|
||||
// Set the default line sep
|
||||
SetLineBreakVar();
|
||||
|
||||
// Start the PHP Session
|
||||
StartPHPSession();
|
||||
}
|
||||
|
||||
function InitPhpLogConConfigFile()
|
||||
{
|
||||
// Needed to make global
|
||||
global $CFG, $gl_root_path, $content;
|
||||
|
||||
if ( file_exists($gl_root_path . 'config.php') && GetFileLength($gl_root_path . 'config.php') > 0 )
|
||||
{
|
||||
// Include the main config
|
||||
include_once($gl_root_path . 'config.php');
|
||||
|
||||
// Easier DB Access
|
||||
define('DB_CONFIG', $CFG['TBPref'] . "config");
|
||||
|
||||
// For ShowPageRenderStats
|
||||
if ( $CFG['ShowPageRenderStats'] == 1 )
|
||||
{
|
||||
$content['ShowPageRenderStats'] = "true";
|
||||
InitPageRenderStats();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Check for installscript!
|
||||
if ( file_exists($content['BASEPATH'] . "install.php") )
|
||||
$strinstallmsg = '<br><br>'
|
||||
. '<center><b>Click <a href="' . $content['BASEPATH'] . 'install.php">here</a> to Install PhpLogCon!</b><br><br>'
|
||||
. 'See the Installation Guides for more Details!<br>'
|
||||
. '<a href="docs/installation.htm" target="_blank">English Installation Guide</a> | '
|
||||
. '<a href="docs/installation_de.htm" target="_blank">German Installation Guide</a><br><br>'
|
||||
. 'Also take a look to the <a href="docs/readme.htm" target="_blank">Readme</a> for some basics around PhpLogCon!<br>'
|
||||
. '</center>';
|
||||
else
|
||||
$strinstallmsg = "";
|
||||
DieWithErrorMsg( 'Error, main configuration file is missing!' . $strinstallmsg );
|
||||
}
|
||||
}
|
||||
|
||||
function GetFileLength($szFileName)
|
||||
{
|
||||
if ( is_file($szFileName) )
|
||||
return filesize($szFileName);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
function InitPhpLogCon()
|
||||
{
|
||||
// Needed to make global
|
||||
global $CFG, $gl_root_path, $content;
|
||||
|
||||
// Init Basics which do not need a database
|
||||
InitBasicPhpLogCon();
|
||||
|
||||
// Will init the config file!
|
||||
InitPhpLogConConfigFile();
|
||||
|
||||
// Establish DB Connection
|
||||
if ( $CFG['UseDB'] )
|
||||
DB_Connect();
|
||||
|
||||
// Now load the Page configuration values
|
||||
InitConfigurationValues();
|
||||
|
||||
// Now Create Themes List because we haven't the config before!
|
||||
CreateThemesList();
|
||||
|
||||
// Create Language List
|
||||
CreateLanguageList();
|
||||
|
||||
// --- Enable PHP Debug Mode
|
||||
InitPhpDebugMode();
|
||||
// ---
|
||||
}
|
||||
|
||||
function InitPhpDebugMode()
|
||||
{
|
||||
global $content;
|
||||
|
||||
// --- Set Global DEBUG Level!
|
||||
if ( $content['gen_phpdebug'] == "yes" )
|
||||
ini_set( "error_reporting", E_ALL ); // ALL PHP MESSAGES!
|
||||
else
|
||||
ini_set( "error_reporting", E_ERROR ); // ONLY PHP ERROR'S!
|
||||
// ---
|
||||
}
|
||||
|
||||
function CheckAndSetRunMode()
|
||||
{
|
||||
global $RUNMODE;
|
||||
// Set to command line mode if argv is set!
|
||||
if ( !isset($_SERVER["GATEWAY_INTERFACE"]) )
|
||||
$RUNMODE = RUNMODE_COMMANDLINE;
|
||||
}
|
||||
|
||||
function InitRuntimeInformations()
|
||||
{
|
||||
global $content;
|
||||
|
||||
// TODO| maybe not needed!
|
||||
}
|
||||
|
||||
function CreateDebugModes()
|
||||
{
|
||||
global $content;
|
||||
|
||||
$content['DBGMODES'][0]['DisplayName'] = STR_DEBUG_ULTRADEBUG;
|
||||
if ( $content['parser_debugmode'] == $content['DBGMODES'][0]['DisplayName'] ) { $content['DBGMODES'][0]['selected'] = "selected"; } else { $content['DBGMODES'][0]['selected'] = ""; }
|
||||
$content['DBGMODES'][1]['DisplayName'] = STR_DEBUG_DEBUG;
|
||||
if ( $content['parser_debugmode'] == $content['DBGMODES'][1]['DisplayName'] ) { $content['DBGMODES'][1]['selected'] = "selected"; } else { $content['DBGMODES'][1]['selected'] = ""; }
|
||||
$content['DBGMODES'][2]['DisplayName'] = STR_DEBUG_INFO;
|
||||
if ( $content['parser_debugmode'] == $content['DBGMODES'][2]['DisplayName'] ) { $content['DBGMODES'][2]['selected'] = "selected"; } else { $content['DBGMODES'][2]['selected'] = ""; }
|
||||
$content['DBGMODES'][3]['DisplayName'] = STR_DEBUG_WARN;
|
||||
if ( $content['parser_debugmode'] == $content['DBGMODES'][3]['DisplayName'] ) { $content['DBGMODES'][3]['selected'] = "selected"; } else { $content['DBGMODES'][3]['selected'] = ""; }
|
||||
$content['DBGMODES'][4]['DisplayName'] = STR_DEBUG_ERROR;
|
||||
if ( $content['parser_debugmode'] == $content['DBGMODES'][4]['DisplayName'] ) { $content['DBGMODES'][4]['selected'] = "selected"; } else { $content['DBGMODES'][4]['selected'] = ""; }
|
||||
}
|
||||
|
||||
function InitFrontEndVariables()
|
||||
{
|
||||
global $content;
|
||||
|
||||
$content['MENU_FOLDER_OPEN'] = "image=" . $content['BASEPATH'] . "images/icons/folder_closed.png";
|
||||
$content['MENU_FOLDER_CLOSED'] = "overimage=" . $content['BASEPATH'] . "images/icons/folder.png";
|
||||
$content['MENU_HOMEPAGE'] = "image=" . $content['BASEPATH'] . "images/icons/home.png";
|
||||
$content['MENU_LINK'] = "image=" . $content['BASEPATH'] . "images/icons/link.png";
|
||||
$content['MENU_PREFERENCES'] = "image=" . $content['BASEPATH'] . "images/icons/preferences.png";
|
||||
$content['MENU_ADMINENTRY'] = "image=" . $content['BASEPATH'] . "images/icons/star_blue.png";
|
||||
$content['MENU_ADMINLOGOFF'] = "image=" . $content['BASEPATH'] . "images/icons/exit.png";
|
||||
$content['MENU_ADMINUSERS'] = "image=" . $content['BASEPATH'] . "images/icons/businessmen.png";
|
||||
$content['MENU_SEARCH'] = "image=" . $content['BASEPATH'] . "images/icons/view.png";
|
||||
$content['MENU_SELECTION_DISABLED'] = "image=" . $content['BASEPATH'] . "images/icons/selection.png";
|
||||
$content['MENU_SELECTION_ENABLED'] = "image=" . $content['BASEPATH'] . "images/icons/selection_delete.png";
|
||||
}
|
||||
|
||||
// Lang Helper for Strings with ONE variable
|
||||
function GetAndReplaceLangStr( $strlang, $param1 = "", $param2 = "", $param3 = "", $param4 = "", $param5 = "" )
|
||||
{
|
||||
$strfinal = str_replace ( "%1", $param1, $strlang );
|
||||
if ( strlen($param2) > 0 )
|
||||
$strfinal = str_replace ( "%1", $param2, $strfinal );
|
||||
if ( strlen($param3) > 0 )
|
||||
$strfinal = str_replace ( "%1", $param3, $strfinal );
|
||||
if ( strlen($param4) > 0 )
|
||||
$strfinal = str_replace ( "%1", $param4, $strfinal );
|
||||
if ( strlen($param5) > 0 )
|
||||
$strfinal = str_replace ( "%1", $param5, $strfinal );
|
||||
|
||||
// And return
|
||||
return $strfinal;
|
||||
}
|
||||
|
||||
function InitConfigurationValues()
|
||||
{
|
||||
global $content, $LANG;
|
||||
|
||||
$result = DB_Query("SELECT * FROM " . STATS_CONFIG);
|
||||
$rows = DB_GetAllRows($result, true, true);
|
||||
|
||||
// If Database is enabled, try to read from database!
|
||||
if ( $CFG['UseDB'] )
|
||||
{
|
||||
if ( isset($rows ) )
|
||||
{
|
||||
for($i = 0; $i < count($rows); $i++)
|
||||
$content[ $rows[$i]['name'] ] = $rows[$i]['value'];
|
||||
}
|
||||
// General defaults
|
||||
// --- Language Handling
|
||||
if ( !isset($content['gen_lang']) ) { $content['gen_lang'] = "en"; }
|
||||
if ( VerifyLanguage($content['gen_lang']) )
|
||||
$LANG = $content['gen_lang'];
|
||||
else
|
||||
{
|
||||
// Fallback!
|
||||
$LANG = "en";
|
||||
$content['gen_lang'] = "en";
|
||||
}
|
||||
|
||||
// --- PHP Debug Mode
|
||||
if ( !isset($content['gen_phpdebug']) ) { $content['gen_phpdebug'] = "no"; }
|
||||
// ---
|
||||
|
||||
// Database Version Checker!
|
||||
if ( $content['database_internalversion'] > $content['database_installedversion'] )
|
||||
{
|
||||
// Database is out of date, we need to upgrade
|
||||
$content['database_forcedatabaseupdate'] = "yes";
|
||||
}
|
||||
}
|
||||
|
||||
// --- Set Defaults...
|
||||
// Language Handling
|
||||
if ( isset($_SESSION['CUSTOM_LANG']) && VerifyLanguage($_SESSION['CUSTOM_LANG']) )
|
||||
{
|
||||
$content['user_lang'] = $_SESSION['CUSTOM_LANG'];
|
||||
$LANG = $content['user_lang'];
|
||||
}
|
||||
else if ( isset($content['gen_lang']) )
|
||||
$content['user_lang'] = $content['gen_lang'];
|
||||
else // Failsave!
|
||||
$content['user_lang'] = "en";
|
||||
|
||||
// Theme Handling
|
||||
if ( !isset($content['web_theme']) ) { $content['web_theme'] = "default"; }
|
||||
if ( isset($_SESSION['CUSTOM_THEME']) && VerifyTheme($_SESSION['CUSTOM_THEME']) )
|
||||
$content['user_theme'] = $_SESSION['CUSTOM_THEME'];
|
||||
else
|
||||
$content['user_theme'] = $content['web_theme'];
|
||||
// ---
|
||||
|
||||
// Init other things which are needed
|
||||
InitFrontEndVariables();
|
||||
}
|
||||
|
||||
function SetDebugModeFromString( $facility )
|
||||
{
|
||||
global $DEBUGMODE;
|
||||
|
||||
switch ( $facility )
|
||||
{
|
||||
case STR_DEBUG_ULTRADEBUG:
|
||||
$DEBUGMODE = DEBUG_ULTRADEBUG;
|
||||
break;
|
||||
case STR_DEBUG_DEBUG:
|
||||
$DEBUGMODE = DEBUG_DEBUG;
|
||||
break;
|
||||
case STR_DEBUG_INFO:
|
||||
$DEBUGMODE = DEBUG_INFO;
|
||||
break;
|
||||
case STR_DEBUG_WARN:
|
||||
$DEBUGMODE = DEBUG_WARN;
|
||||
break;
|
||||
case STR_DEBUG_ERROR:
|
||||
$DEBUGMODE = DEBUG_ERROR;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function InitPageRenderStats()
|
||||
{
|
||||
global $gl_starttime, $querycount;
|
||||
$gl_starttime = microtime_float();
|
||||
$querycount = 0;
|
||||
}
|
||||
|
||||
function FinishPageRenderStats( &$mycontent)
|
||||
{
|
||||
global $gl_starttime, $querycount;
|
||||
|
||||
$endtime = microtime_float();
|
||||
$mycontent['PAGERENDERTIME'] = number_format($endtime - $gl_starttime, 4, '.', '');
|
||||
$mycontent['TOTALQUERIES'] = $querycount;
|
||||
}
|
||||
|
||||
function microtime_float()
|
||||
{
|
||||
list($usec, $sec) = explode(" ", microtime());
|
||||
return ((float)$usec + (float)$sec);
|
||||
}
|
||||
|
||||
function SetLineBreakVar()
|
||||
{
|
||||
// Used for some functions
|
||||
global $RUNMODE, $linesep;
|
||||
|
||||
if ( $RUNMODE == RUNMODE_COMMANDLINE )
|
||||
$linesep = "\r\n";
|
||||
else if ( $RUNMODE == RUNMODE_WEBSERVER )
|
||||
$linesep = "<br>";
|
||||
}
|
||||
|
||||
function CheckUrlOrIP($ip)
|
||||
{
|
||||
$long = ip2long($ip);
|
||||
if ( $long == -1 )
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
function DieWithErrorMsg( $szerrmsg )
|
||||
{
|
||||
global $RUNMODE, $content;
|
||||
if ( $RUNMODE == RUNMODE_COMMANDLINE )
|
||||
{
|
||||
print("\n\n\t\tCritical Error occured\n");
|
||||
print("\t\tErrordetails:\t" . $szerrmsg . "\n");
|
||||
print("\t\tTerminating now!\n");
|
||||
}
|
||||
else if ( $RUNMODE == RUNMODE_WEBSERVER )
|
||||
{
|
||||
print("<html><head><link rel=\"stylesheet\" href=\"" . $content['BASEPATH'] . "admin/css/admin.css\" type=\"text/css\"></head><body>");
|
||||
print("<table width=\"600\" align=\"center\" class=\"with_border\"><tr><td><center><H3><font color='red'>Critical Error occured</font></H3><br></center>");
|
||||
print("<B>Errordetails:</B><BR>" . $szerrmsg);
|
||||
print("</td></tr></table>");
|
||||
}
|
||||
exit;
|
||||
}
|
||||
|
||||
function DieWithFriendlyErrorMsg( $szerrmsg )
|
||||
{
|
||||
//TODO: Make with template
|
||||
print("<html><body>");
|
||||
print("<center><H3><font color='red'>Error occured</font></H3><br></center>");
|
||||
print("<B>Errordetails:</B><BR>" . $szerrmsg);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
function InitTemplateParser()
|
||||
{
|
||||
global $page, $gl_root_path;
|
||||
// -----------------------------------------------
|
||||
// Create Template Object and set some variables for the templates
|
||||
// -----------------------------------------------
|
||||
$page = new Template();
|
||||
$page -> set_path ( $gl_root_path . "templates/" );
|
||||
}
|
||||
|
||||
function VerifyLanguage( $mylang )
|
||||
{
|
||||
global $gl_root_path;
|
||||
|
||||
if ( is_dir( $gl_root_path . 'lang/' . $mylang ) )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
function IncludeLanguageFile( $langfile )
|
||||
{
|
||||
global $LANG, $LANG_EN;
|
||||
|
||||
if ( file_exists( $langfile ) )
|
||||
include( $langfile );
|
||||
else
|
||||
{
|
||||
$langfile = str_replace( $LANG, $LANG_EN, $langfile );
|
||||
include( $langfile );
|
||||
}
|
||||
}
|
||||
|
||||
function RedirectPage( $newpage )
|
||||
{
|
||||
header("Location: $newpage");
|
||||
exit;
|
||||
}
|
||||
|
||||
function RedirectResult( $szMsg, $newpage )
|
||||
{
|
||||
header("Location: result.php?msg=" . urlencode($szMsg) . "&redir=" . urlencode($newpage));
|
||||
exit;
|
||||
}
|
||||
|
||||
// --- BEGIN Usermanagement Function ---
|
||||
function StartPHPSession()
|
||||
{
|
||||
global $RUNMODE;
|
||||
if ( $RUNMODE == RUNMODE_WEBSERVER )
|
||||
{
|
||||
// This will start the session
|
||||
if (session_id() == "")
|
||||
session_start();
|
||||
|
||||
if ( !isset($_SESSION['SESSION_STARTED']) )
|
||||
$_SESSION['SESSION_STARTED'] = "true";
|
||||
}
|
||||
}
|
||||
|
||||
function CheckForUserLogin( $isloginpage, $isUpgradePage = false )
|
||||
{
|
||||
global $content;
|
||||
|
||||
if ( isset($_SESSION['SESSION_LOGGEDIN']) )
|
||||
{
|
||||
if ( !$_SESSION['SESSION_LOGGEDIN'] )
|
||||
RedirectToUserLogin();
|
||||
else
|
||||
{
|
||||
$content['SESSION_LOGGEDIN'] = "true";
|
||||
$content['SESSION_USERNAME'] = $_SESSION['SESSION_USERNAME'];
|
||||
}
|
||||
|
||||
// New, Check for database Version and may redirect to updatepage!
|
||||
if ( isset($content['database_forcedatabaseupdate']) &&
|
||||
$content['database_forcedatabaseupdate'] == "yes" &&
|
||||
$isUpgradePage == false
|
||||
)
|
||||
RedirectToDatabaseUpgrade();
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( $isloginpage == false )
|
||||
RedirectToUserLogin();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function CreateUserName( $username, $password, $access_level )
|
||||
{
|
||||
$md5pass = md5($password);
|
||||
$result = DB_Query("SELECT username FROM " . STATS_USERS . " WHERE username = '" . $username . "'");
|
||||
$rows = DB_GetAllRows($result, true);
|
||||
if ( isset($rows) )
|
||||
{
|
||||
DieWithFriendlyErrorMsg( "User $username already exists!" );
|
||||
|
||||
// User not created!
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Create User
|
||||
$result = DB_Query("INSERT INTO " . STATS_USERS . " (username, password, access_level) VALUES ('$username', '$md5pass', $access_level)");
|
||||
DB_FreeQuery($result);
|
||||
|
||||
// Success
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function CheckUserLogin( $username, $password )
|
||||
{
|
||||
global $content, $CFG;
|
||||
|
||||
// TODO: SessionTime and AccessLevel check
|
||||
|
||||
$md5pass = md5($password);
|
||||
$sqlselect = "SELECT access_level FROM " . STATS_USERS . " WHERE username = '" . $username . "' and password = '" . $md5pass . "'";
|
||||
$result = DB_Query($sqlselect);
|
||||
$rows = DB_GetAllRows($result, true);
|
||||
if ( isset($rows) )
|
||||
{
|
||||
$_SESSION['SESSION_LOGGEDIN'] = true;
|
||||
$_SESSION['SESSION_USERNAME'] = $username;
|
||||
$_SESSION['SESSION_ACCESSLEVEL'] = $rows[0]['access_level'];
|
||||
|
||||
$content['SESSION_LOGGEDIN'] = "true";
|
||||
$content['SESSION_USERNAME'] = $username;
|
||||
|
||||
// Success !
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( $CFG['ShowDebugMsg'] == 1 )
|
||||
DieWithFriendlyErrorMsg( "Debug Error: Could not login user '" . $username . "' <br><br><B>Sessionarray</B> <pre>" . var_export($_SESSION, true) . "</pre><br><B>SQL Statement</B>: " . $sqlselect );
|
||||
|
||||
// Default return false
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function DoLogOff()
|
||||
{
|
||||
global $content;
|
||||
|
||||
unset( $_SESSION['SESSION_LOGGEDIN'] );
|
||||
unset( $_SESSION['SESSION_USERNAME'] );
|
||||
unset( $_SESSION['SESSION_ACCESSLEVEL'] );
|
||||
|
||||
// Redir to Index Page
|
||||
RedirectPage( "index.php");
|
||||
}
|
||||
|
||||
function RedirectToUserLogin()
|
||||
{
|
||||
// TODO Referer
|
||||
header("Location: login.php?referer=" . $_SERVER['PHP_SELF']);
|
||||
exit;
|
||||
}
|
||||
|
||||
function RedirectToDatabaseUpgrade()
|
||||
{
|
||||
// TODO Referer
|
||||
header("Location: upgrade.php"); // ?referer=" . $_SERVER['PHP_SELF']);
|
||||
exit;
|
||||
}
|
||||
// --- END Usermanagement Function ---
|
||||
|
||||
|
||||
?>
|
84
include/functions_constants.php
Normal file
@ -0,0 +1,84 @@
|
||||
<?php
|
||||
/*
|
||||
*********************************************************************
|
||||
* Copyright by Adiscon GmbH | 2008! *
|
||||
* -> www.phplogcon.org <- *
|
||||
* *
|
||||
* Use this script at your own risk! *
|
||||
* ----------------------------------------------------------------- *
|
||||
* Some constants *
|
||||
* *
|
||||
* -> Stuff which has to be static and predefined *
|
||||
* *
|
||||
* All directives are explained within this file *
|
||||
*********************************************************************
|
||||
*/
|
||||
|
||||
// --- Avoid directly accessing this file!
|
||||
if ( !defined('IN_PHPLOGCON') )
|
||||
{
|
||||
die('Hacking attempt');
|
||||
exit;
|
||||
}
|
||||
// ---
|
||||
|
||||
// --- Some custom defines
|
||||
define('RUNMODE_COMMANDLINE', 1);
|
||||
define('RUNMODE_WEBSERVER', 2);
|
||||
|
||||
define('DEBUG_ULTRADEBUG', 5);
|
||||
define('DEBUG_DEBUG', 4);
|
||||
define('DEBUG_INFO', 3);
|
||||
define('DEBUG_WARN', 2);
|
||||
define('DEBUG_ERROR', 1);
|
||||
define('DEBUG_ERROR_WTF', 0);
|
||||
|
||||
define('STR_DEBUG_ULTRADEBUG', "UltraDebug");
|
||||
define('STR_DEBUG_DEBUG', "Debug");
|
||||
define('STR_DEBUG_INFO', "Information");
|
||||
define('STR_DEBUG_WARN', "Warning");
|
||||
define('STR_DEBUG_ERROR', "Error");
|
||||
define('STR_DEBUG_ERROR_WTF', "WTF OMFG");
|
||||
|
||||
// Properties we need from the stream class
|
||||
define('SYSLOG_DATE', 'timereported');
|
||||
define('SYSLOG_FACILITY', 'syslogfacility');
|
||||
define('SYSLOG_FACILITY_TEXT', 'syslogfacility-text');
|
||||
define('SYSLOG_SEVERITY', 'syslogseverity');
|
||||
define('SYSLOG_SEVERITY_TEXT','syslogseverity-text');
|
||||
define('SYSLOG_HOST', 'FROMHOST');
|
||||
define('SYSLOG_SYSLOGTAG', 'syslogtag');
|
||||
define('SYSLOG_MESSAGE', 'msg');
|
||||
define('SYSLOG_MESSAGETYPE', 'IUT');
|
||||
|
||||
// MonitorWare InfoUnit Defines
|
||||
define('IUT_Unknown', '0');
|
||||
define('IUT_Syslog', '1');
|
||||
define('IUT_Heartbeat', '2');
|
||||
define('IUT_NT_EventReport', '3');
|
||||
define('IUT_SNMP_Trap', '4');
|
||||
define('IUT_File_Monitor', '5');
|
||||
define('IUT_PingProbe', '8');
|
||||
define('IUT_Port_Probe', '9');
|
||||
define('IUT_NTService_Monitor', '10');
|
||||
define('IUT_DiskSpace_Monitor', '11');
|
||||
define('IUT_DB_Monitor', '12');
|
||||
define('IUT_Serial_Monitor', '13');
|
||||
define('IUT_CPU_Monitor', '14');
|
||||
define('IUT_AliveMonRequest', '16');
|
||||
define('IUT_SMTPProbe', '17');
|
||||
define('IUT_FTPProbe', '18');
|
||||
define('IUT_HTTPProbe', '19');
|
||||
define('IUT_POP3Probe', '20');
|
||||
define('IUT_IMAPProbe', '21');
|
||||
define('IUT_NNTPProbe', '22');
|
||||
define('IUT_WEVTMONV2', '23');
|
||||
define('IUT_SMTPLISTENER', '24');
|
||||
define('IUT_AliveMonECHO', '1999998');
|
||||
define('IUT_MIAP_Receiver', '1999999');
|
||||
// ---
|
||||
|
||||
// ---
|
||||
|
||||
// ---
|
||||
?>
|
311
include/functions_db.php
Normal file
@ -0,0 +1,311 @@
|
||||
<?php
|
||||
/*
|
||||
*********************************************************************
|
||||
* Copyright by Adiscon GmbH | 2008! *
|
||||
* -> www.phplogcon.org <- *
|
||||
* *
|
||||
* Use this script at your own risk! *
|
||||
* ----------------------------------------------------------------- *
|
||||
* DB Function Helper File *
|
||||
* *
|
||||
* -> Needed to establish and maintain the DB connetion *
|
||||
* *
|
||||
* All directives are explained within this file *
|
||||
*********************************************************************
|
||||
*/
|
||||
|
||||
// --- Avoid directly accessing this file!
|
||||
if ( !defined('IN_PHPLOGCON') )
|
||||
{
|
||||
die('Hacking attempt');
|
||||
exit;
|
||||
}
|
||||
// ---
|
||||
|
||||
|
||||
$link_id = 0;
|
||||
$errdesc = "";
|
||||
$errno = 0;
|
||||
|
||||
// --- Current Database Version, this is important for automated database Updates!
|
||||
$content['database_internalversion'] = "1"; // Whenever incremented, a database upgrade is needed
|
||||
$content['database_installedversion'] = "0"; // 0 is default which means Prior Versioning Database
|
||||
// ---
|
||||
|
||||
function DB_Connect()
|
||||
{
|
||||
global $link_id, $CFG;
|
||||
|
||||
//TODO: Check variables first
|
||||
$link_id = mysql_connect($CFG['DBServer'],$CFG['User'],$CFG['Pass']);
|
||||
if (!$link_id)
|
||||
DB_PrintError("Link-ID == false, connect to ".$CFG['DBServer']." failed", true);
|
||||
|
||||
// --- Now, check Mysql DB Version!
|
||||
$strmysqlver = mysql_get_server_info();
|
||||
if ( strpos($strmysqlver, "-") !== false )
|
||||
{
|
||||
$sttmp = explode("-", $strmysqlver );
|
||||
$szVerInfo = $sttmp[0];
|
||||
}
|
||||
else
|
||||
$szVerInfo = $strmysqlver;
|
||||
|
||||
$szVerSplit = explode(".", $szVerInfo );
|
||||
|
||||
//Now check for Major Version
|
||||
if ( $szVerSplit[0] <= 3 )
|
||||
{
|
||||
//Unfortunatelly MYSQL 3.x is NOT Supported dude!
|
||||
DieWithFriendlyErrorMsg( "You are running an MySQL 3.x Database Server Version. Unfortunately MySQL 3.x is NOT supported by PhpLogCon due the limited SQL Statement support. If this is a commercial webspace, contact your webhoster in order to upgrade to a higher MySQL Database Version. If this is your own rootserver, consider updating your MySQL Server.");
|
||||
}
|
||||
// ---
|
||||
|
||||
$db_selected = mysql_select_db($CFG['DBName'], $link_id);
|
||||
if(!$db_selected)
|
||||
DB_PrintError("Cannot use database '" . $CFG['DBName'] . "'", true);
|
||||
// :D Success connecting to db
|
||||
}
|
||||
|
||||
function DB_Disconnect()
|
||||
{
|
||||
global $link_id;
|
||||
mysql_close($link_id);
|
||||
}
|
||||
|
||||
function DB_Query($query_string, $bProcessError = true, $bCritical = false)
|
||||
{
|
||||
// --- Abort in this case!
|
||||
if ( $CFG['UseDB'] == false )
|
||||
return;
|
||||
// ---
|
||||
|
||||
global $link_id, $querycount;
|
||||
$query_id = mysql_query($query_string,$link_id);
|
||||
if (!$query_id && $bProcessError)
|
||||
DB_PrintError("Invalid SQL: ".$query_string, $bCritical);
|
||||
|
||||
// For the Stats ;)
|
||||
$querycount++;
|
||||
|
||||
return $query_id;
|
||||
}
|
||||
|
||||
function DB_FreeQuery($query_id)
|
||||
{
|
||||
// --- Abort in this case!
|
||||
if ( $CFG['UseDB'] == false )
|
||||
return;
|
||||
// ---
|
||||
|
||||
if ($query_id != false && $query_id != 1 )
|
||||
mysql_free_result($query_id);
|
||||
}
|
||||
|
||||
function DB_GetRow($query_id)
|
||||
{
|
||||
// --- Abort in this case!
|
||||
if ( $CFG['UseDB'] == false )
|
||||
return;
|
||||
// ---
|
||||
|
||||
$tmp = mysql_fetch_row($query_id);
|
||||
$results[] = $tmp;
|
||||
return $results[0];
|
||||
}
|
||||
|
||||
function DB_GetSingleRow($query_id, $bClose)
|
||||
{
|
||||
// --- Abort in this case!
|
||||
if ( $CFG['UseDB'] == false )
|
||||
return;
|
||||
// ---
|
||||
|
||||
if ($query_id != false && $query_id != 1 )
|
||||
{
|
||||
$row = mysql_fetch_array($query_id, MYSQL_ASSOC);
|
||||
|
||||
if ( $bClose )
|
||||
DB_FreeQuery ($query_id);
|
||||
|
||||
if ( isset($row) )
|
||||
{
|
||||
// Return array
|
||||
return $row;
|
||||
}
|
||||
else
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
function DB_GetAllRows($query_id, $bClose)
|
||||
{
|
||||
// --- Abort in this case!
|
||||
if ( $CFG['UseDB'] == false )
|
||||
return;
|
||||
// ---
|
||||
|
||||
if ($query_id != false && $query_id != 1 )
|
||||
{
|
||||
while ($row = mysql_fetch_array($query_id, MYSQL_ASSOC))
|
||||
$var[] = $row;
|
||||
|
||||
if ( $bClose )
|
||||
DB_FreeQuery ($query_id);
|
||||
|
||||
if ( isset($var) )
|
||||
{
|
||||
// Return array
|
||||
return $var;
|
||||
}
|
||||
else
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
function DB_GetMysqlStats()
|
||||
{
|
||||
// --- Abort in this case!
|
||||
if ( $CFG['UseDB'] == false )
|
||||
return;
|
||||
// ---
|
||||
|
||||
global $link_id;
|
||||
$status = explode(' ', mysql_stat($link_id));
|
||||
return $status;
|
||||
}
|
||||
|
||||
function DB_ReturnSimpleErrorMsg()
|
||||
{
|
||||
// Return Mysql Error
|
||||
return "Mysql Error " . mysql_errno() . " - Description: " . mysql_error();
|
||||
}
|
||||
|
||||
function DB_PrintError($MyErrorMsg, $DieOrNot)
|
||||
{
|
||||
global $n,$HTTP_COOKIE_VARS, $errdesc, $errno, $linesep, $CFG;
|
||||
|
||||
$errdesc = mysql_error();
|
||||
$errno = mysql_errno();
|
||||
|
||||
$errormsg="Database error: $MyErrorMsg $linesep";
|
||||
$errormsg.="mysql error: $errdesc $linesep";
|
||||
$errormsg.="mysql error number: $errno $linesep";
|
||||
$errormsg.="Date: ".date("d.m.Y @ H:i").$linesep;
|
||||
$errormsg.="Script: ".getenv("REQUEST_URI").$linesep;
|
||||
$errormsg.="Referer: ".getenv("HTTP_REFERER").$linesep;
|
||||
|
||||
if ($DieOrNot == true)
|
||||
DieWithErrorMsg( "$linesep" . $errormsg );
|
||||
else
|
||||
echo $errormsg;
|
||||
}
|
||||
|
||||
function DB_RemoveParserSpecialBadChars($myString)
|
||||
{
|
||||
// DO NOT REPLACD! $returnstr = str_replace("\\","\\\\",$myString);
|
||||
$returnstr = str_replace("'","\\'",$myString);
|
||||
return $returnstr;
|
||||
}
|
||||
|
||||
function DB_RemoveBadChars($myString)
|
||||
{
|
||||
$returnstr = str_replace("\\","\\\\",$myString);
|
||||
$returnstr = str_replace("'","\\'",$returnstr);
|
||||
return $returnstr;
|
||||
}
|
||||
|
||||
function DB_GetRowCount($query)
|
||||
{
|
||||
// --- Abort in this case!
|
||||
if ( $CFG['UseDB'] == false )
|
||||
return;
|
||||
// ---
|
||||
|
||||
if ($result = mysql_query($query))
|
||||
{
|
||||
$num_rows = mysql_num_rows($result);
|
||||
mysql_free_result ($result);
|
||||
}
|
||||
return $num_rows;
|
||||
}
|
||||
|
||||
function DB_GetRowCountByResult($myresult)
|
||||
{
|
||||
// --- Abort in this case!
|
||||
if ( $CFG['UseDB'] == false )
|
||||
return;
|
||||
// ---
|
||||
|
||||
if ($myresult)
|
||||
return mysql_num_rows($myresult);
|
||||
}
|
||||
|
||||
function DB_Exec($query)
|
||||
{
|
||||
// --- Abort in this case!
|
||||
if ( $CFG['UseDB'] == false )
|
||||
return;
|
||||
// ---
|
||||
|
||||
if(mysql_query($query))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
function WriteConfigValue($szValue)
|
||||
{
|
||||
// --- Abort in this case!
|
||||
if ( $CFG['UseDB'] == false )
|
||||
return;
|
||||
// ---
|
||||
|
||||
global $content;
|
||||
|
||||
$result = DB_Query("SELECT name FROM " . STATS_CONFIG . " WHERE name = '" . $szValue . "'");
|
||||
$rows = DB_GetAllRows($result, true);
|
||||
if ( !isset($rows) )
|
||||
{
|
||||
// New Entry
|
||||
$result = DB_Query("INSERT INTO " . STATS_CONFIG . " (name, value) VALUES ( '" . $szValue . "', '" . $content[$szValue] . "')");
|
||||
DB_FreeQuery($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Update Entry
|
||||
$result = DB_Query("UPDATE " . STATS_CONFIG . " SET value = '" . $content[$szValue] . "' WHERE name = '" . $szValue . "'");
|
||||
DB_FreeQuery($result);
|
||||
}
|
||||
}
|
||||
|
||||
function GetSingleDBEntryOnly( $myqry )
|
||||
{
|
||||
// --- Abort in this case!
|
||||
if ( $CFG['UseDB'] == false )
|
||||
return;
|
||||
// ---
|
||||
|
||||
$result = DB_Query( $myqry );
|
||||
$row = DB_GetRow($result);
|
||||
DB_FreeQuery ($query_id);
|
||||
|
||||
if ( isset($row) )
|
||||
return $row[0];
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
|
||||
function GetRowsAffected()
|
||||
{
|
||||
// --- Abort in this case!
|
||||
if ( $CFG['UseDB'] == false )
|
||||
return;
|
||||
// ---
|
||||
|
||||
return mysql_affected_rows();
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
80
include/functions_frontendhelpers.php
Normal file
@ -0,0 +1,80 @@
|
||||
<?php
|
||||
/*
|
||||
*********************************************************************
|
||||
* Copyright by Adiscon GmbH | 2008! *
|
||||
* -> www.phplogcon.org <- *
|
||||
* *
|
||||
* Use this script at your own risk! *
|
||||
* ----------------------------------------------------------------- *
|
||||
* Helperfunctions for the web frontend *
|
||||
* *
|
||||
* -> *
|
||||
* *
|
||||
* All directives are explained within this file *
|
||||
*********************************************************************
|
||||
*/
|
||||
|
||||
// --- Avoid directly accessing this file!
|
||||
if ( !defined('IN_PHPLOGCON') )
|
||||
{
|
||||
die('Hacking attempt');
|
||||
exit;
|
||||
}
|
||||
// ---
|
||||
|
||||
function InitFrontEndDefaults()
|
||||
{
|
||||
// To create the current URL
|
||||
CreateCurrentUrl();
|
||||
|
||||
// --- BEGIN Main Info Area
|
||||
|
||||
|
||||
|
||||
// --- END Main Info Area
|
||||
|
||||
// Check if install file still exists
|
||||
InstallFileReminder();
|
||||
}
|
||||
|
||||
function InstallFileReminder()
|
||||
{
|
||||
global $content;
|
||||
|
||||
if ( is_file($content['BASEPATH'] . "install.php") )
|
||||
{
|
||||
// No Servers - display warning!
|
||||
$content['error_installfilereminder'] = "true";
|
||||
}
|
||||
}
|
||||
|
||||
function CreateCurrentUrl()
|
||||
{
|
||||
global $content;
|
||||
$content['CURRENTURL'] = $_SERVER['PHP_SELF']; // . "?" . $_SERVER['QUERY_STRING']
|
||||
|
||||
// Now the query string:
|
||||
if ( isset($_SERVER['QUERY_STRING']) && strlen($_SERVER['QUERY_STRING']) > 0 )
|
||||
{
|
||||
// Append ?
|
||||
$content['CURRENTURL'] .= "?";
|
||||
|
||||
$queries = explode ("&", $_SERVER['QUERY_STRING']);
|
||||
$counter = 0;
|
||||
for ( $i = 0; $i < count($queries); $i++ )
|
||||
{
|
||||
if ( strpos($queries[$i], "serverid") === false )
|
||||
{
|
||||
$tmpvars = explode ("=", $queries[$i]);
|
||||
// 4Server Selector
|
||||
$content['HIDDENVARS'][$counter]['varname'] = $tmpvars[0];
|
||||
$content['HIDDENVARS'][$counter]['varvalue'] = $tmpvars[1];
|
||||
|
||||
$counter++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
107
include/functions_themes.php
Normal file
@ -0,0 +1,107 @@
|
||||
<?php
|
||||
/*
|
||||
*********************************************************************
|
||||
* Copyright by Adiscon GmbH | 2008! *
|
||||
* -> www.phplogcon.org <- *
|
||||
* *
|
||||
* Use this script at your own risk! *
|
||||
* ----------------------------------------------------------------- *
|
||||
* Theme specific functions *
|
||||
* *
|
||||
* -> *
|
||||
* *
|
||||
* All directives are explained within this file *
|
||||
*********************************************************************
|
||||
*/
|
||||
|
||||
// --- Avoid directly accessing this file!
|
||||
if ( !defined('IN_PHPLOGCON') )
|
||||
{
|
||||
die('Hacking attempt');
|
||||
exit;
|
||||
}
|
||||
// ---
|
||||
|
||||
function CreateLanguageList()
|
||||
{
|
||||
global $gl_root_path, $content;
|
||||
|
||||
$alldirectories = list_directories( $gl_root_path . "lang/");
|
||||
for($i = 0; $i < count($alldirectories); $i++)
|
||||
{
|
||||
// --- gen_lang
|
||||
$content['LANGUAGES'][$i]['langcode'] = $alldirectories[$i];
|
||||
if ( $content['gen_lang'] == $alldirectories[$i] )
|
||||
$content['LANGUAGES'][$i]['selected'] = "selected";
|
||||
else
|
||||
$content['LANGUAGES'][$i]['selected'] = "";
|
||||
// ---
|
||||
|
||||
// --- user_lang
|
||||
$content['USERLANG'][$i]['langcode'] = $alldirectories[$i];
|
||||
if ( $content['user_lang'] == $alldirectories[$i] )
|
||||
$content['USERLANG'][$i]['is_selected'] = "selected";
|
||||
else
|
||||
$content['USERLANG'][$i]['is_selected'] = "";
|
||||
// ---
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function CreateThemesList()
|
||||
{
|
||||
global $gl_root_path, $content;
|
||||
|
||||
$alldirectories = list_directories( $gl_root_path . "themes/");
|
||||
for($i = 0; $i < count($alldirectories); $i++)
|
||||
{
|
||||
// --- web_theme
|
||||
$content['STYLES'][$i]['StyleName'] = $alldirectories[$i];
|
||||
if ( $content['web_theme'] == $alldirectories[$i] )
|
||||
$content['STYLES'][$i]['selected'] = "selected";
|
||||
else
|
||||
$content['STYLES'][$i]['selected'] = "";
|
||||
// ---
|
||||
|
||||
// --- user_theme
|
||||
$content['USERSTYLES'][$i]['StyleName'] = $alldirectories[$i];
|
||||
if ( $content['user_theme'] == $alldirectories[$i] )
|
||||
$content['USERSTYLES'][$i]['is_selected'] = "selected";
|
||||
else
|
||||
$content['USERSTYLES'][$i]['is_selected'] = "";
|
||||
// ---
|
||||
}
|
||||
}
|
||||
|
||||
function list_directories($directory)
|
||||
{
|
||||
$result = array();
|
||||
if (! $directoryHandler = @opendir ($directory))
|
||||
DieWithFriendlyErrorMsg( "list_directories: directory \"$directory\" doesn't exist!");
|
||||
|
||||
while (false !== ($fileName = @readdir ($directoryHandler)))
|
||||
{
|
||||
if ( is_dir( $directory . $fileName ) && ( $fileName != "." && $fileName != ".." ))
|
||||
@array_push ($result, $fileName);
|
||||
}
|
||||
|
||||
if ( @count ($result) === 0 )
|
||||
DieWithFriendlyErrorMsg( "list_directories: no directories in \"$directory\" found!");
|
||||
else
|
||||
{
|
||||
sort ($result);
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
function VerifyTheme( $newtheme )
|
||||
{
|
||||
global $gl_root_path;
|
||||
|
||||
if ( is_dir( $gl_root_path . "themes/" . $newtheme ) )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
?>
|
65
index.php
Normal file
@ -0,0 +1,65 @@
|
||||
<?php
|
||||
/*
|
||||
*********************************************************************
|
||||
* Copyright by Adiscon GmbH | 2008! *
|
||||
* -> www.phplogcon.org <- *
|
||||
* *
|
||||
* Use this script at your own risk! *
|
||||
* ----------------------------------------------------------------- *
|
||||
* Main Index File *
|
||||
* *
|
||||
* -> Loads the main PhpLogCon Site *
|
||||
* *
|
||||
* All directives are explained within this file *
|
||||
*********************************************************************
|
||||
*/
|
||||
|
||||
// *** Default includes and procedures *** //
|
||||
define('IN_PHPLOGCON', true);
|
||||
$gl_root_path = './';
|
||||
include($gl_root_path . 'include/functions_common.php');
|
||||
include($gl_root_path . 'include/functions_frontendhelpers.php');
|
||||
|
||||
InitPhpLogCon();
|
||||
InitFrontEndDefaults(); // Only in WebFrontEnd
|
||||
// *** *** //
|
||||
|
||||
// --- CONTENT Vars
|
||||
//if ( isset($content['myserver']) )
|
||||
// $content['TITLE'] = "PhpLogCon :: Home :: Server '" . $content['myserver']['Name'] . "'"; // Title of the Page
|
||||
//else
|
||||
$content['TITLE'] = "PhpLogCon :: Home";
|
||||
// ---
|
||||
|
||||
// --- BEGIN Custom Code
|
||||
|
||||
// DEBUG, create TESTING DATA!
|
||||
$content['syslogmessages'][0] = array ( SYSLOG_DATE => "Feb 7 17:56:24", SYSLOG_FACILITY => 0, SYSLOG_FACILITY_TEXT => "kernel", SYSLOG_SEVERITY => 5, SYSLOG_SEVERITY_TEXT => "notice", SYSLOG_HOST => "localhost", SYSLOG_SYSLOGTAG => "RSyslogTest", SYSLOG_MESSAGE => "Kernel log daemon terminating.", SYSLOG_MESSAGETYPE => IUT_Syslog, );
|
||||
$content['syslogmessages'][1] = array ( SYSLOG_DATE => "Feb 6 18:56:24", SYSLOG_FACILITY => 0, SYSLOG_FACILITY_TEXT => "kernel", SYSLOG_SEVERITY => 5, SYSLOG_SEVERITY_TEXT => "notice", SYSLOG_HOST => "localhost", SYSLOG_SYSLOGTAG => "RSyslogTest", SYSLOG_MESSAGE => "Kernel log daemon terminating.", SYSLOG_MESSAGETYPE => IUT_Syslog, );
|
||||
|
||||
if ( isset($content['syslogmessages']) && count($content['syslogmessages']) > 0 )
|
||||
{
|
||||
// This will enable to Main SyslogView
|
||||
$content['syslogmessagesenabled'] = "true";
|
||||
|
||||
for($i = 0; $i < count($content['syslogmessages']); $i++)
|
||||
{
|
||||
// --- Set CSS Class
|
||||
if ( $i % 2 == 0 )
|
||||
$content['syslogmessages'][$i]['cssclass'] = "line1";
|
||||
else
|
||||
$content['syslogmessages'][$i]['cssclass'] = "line2";
|
||||
// ---
|
||||
}
|
||||
}
|
||||
// ---
|
||||
|
||||
// --- Parsen and Output
|
||||
IncludeLanguageFile( $gl_root_path . '/lang/' . $LANG . '/main.php' );
|
||||
|
||||
InitTemplateParser();
|
||||
$page -> parser($content, "index.html");
|
||||
$page -> output();
|
||||
// ---
|
||||
|
||||
?>
|
31
js/admin-menuoptionen.js
Normal file
@ -0,0 +1,31 @@
|
||||
var navigationsname = 'awmenu10'; // nicht ändern !!!!
|
||||
var hintergrundfarbe = '#F5F5F5'; // Standardfarbwert = #FFFFFF
|
||||
var rahmenfarbe = '#999999'; //
|
||||
var onmouseoverhintergrund = '#E0E0E0'; // Standardfarbwert = #E0E0E0
|
||||
var onmouseoverschriftfarbe = '#000099'; // Standardfarbwert = #FF0000
|
||||
var menupunktschriftfarbe = '#000033'; // Standardfarbwert = #000000
|
||||
var rahmenbreite = 1; // Breite des Rahmens
|
||||
var schriftart = 'Verdana, Tahoma, Arial'; // Arial, Verdana, Times, Courier, Georgia, Geneva
|
||||
var bilderpfad = '../images/misc/'; // Bilderpfad
|
||||
var pfeilrunter = 'transparent.gif'; // Name des -nach-unten Pfeils-
|
||||
var pfeilrechts = 'transparent.gif'; // Name des -nach-rechts Pfeils-
|
||||
var verzoegerung = 500; // Untermenu verschwindet nach X Millisekunden
|
||||
var tabellenausrichtung_x = 1; // 0 = links ; 1 = mitte ; 2 = rechts
|
||||
var tabellenausrichtung_y = 0; // 0 = oben ; 1 = mitte ; 2 = unten
|
||||
var h_offset = 0; // Tabellenfeinjustierung (x-achse)
|
||||
var v_offset = 50; // Tabellenfeinjustierung (y-achse)
|
||||
var menuausrichtung = 1; // 0 = vertikal ; 1 = horizontal
|
||||
var schriftgroesse = 12; // Schriftgroesse -> Standard = 8
|
||||
var schriftausrichtung = 0; // 0 = links ; 1 = mitte -> HORIZONTAL
|
||||
var spaltenhoehe = 15; // Spaltenhoehe -> Standard = 15
|
||||
var spaltenbreite = 110; // Spaltenbreite -> Standard = 140
|
||||
var submenu_offset_x = 0; // Submenu Abstand - X vom Hauptmenu
|
||||
var submenu_offset_y = 17; // Submenu Abstand - Y vom Hauptmenu
|
||||
var item_offset_h = 3; // Schriftfeinjustierung (x-achse)
|
||||
var item_offset_v = 0; // Schriftfeinjustierung (y-achse)
|
||||
var itemtrenner = 1; // 0 = kein Trenner d ; 1 = Trenner
|
||||
var fontstyle = "normal"; // normal, bold
|
||||
var frameausrichtung = 0; // 0 = horizontal ; 1 = vertikal
|
||||
var mainmenuframename = ''; // Name des Hauptframes (keine Verwendung)
|
||||
var submenuframename = ''; // Name des Unterframes (keine Verwendung)
|
||||
var targetframename = ''; // Name des Zielframes (keine Verwendung)
|
45
js/common.js
Normal file
@ -0,0 +1,45 @@
|
||||
/*
|
||||
|
||||
Helper Javascript functions
|
||||
|
||||
*/
|
||||
|
||||
function CheckAlphaPNGImage(ImageName, ImageTrans)
|
||||
{
|
||||
var agt=navigator.userAgent.toLowerCase();
|
||||
var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
|
||||
|
||||
if (is_ie)
|
||||
document.images[ImageName].src = ImageTrans;
|
||||
}
|
||||
|
||||
function NewWindow(Location, WindowName,X_width,Y_height,Option) {
|
||||
var windowReference;
|
||||
var Addressbar = "location=NO"; //Default
|
||||
var OptAddressBar = "AddressBar"; //Default für Adressbar
|
||||
if (Option == OptAddressBar) { //Falls AdressBar gewünscht wird
|
||||
Addressbar = "location=YES";
|
||||
}
|
||||
windowReference = window.open(Location,WindowName,
|
||||
'toolbar=no,' + Addressbar + ',directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=' + X_width +
|
||||
',height=' + Y_height);
|
||||
if (!windowReference.opener)
|
||||
windowReference.opener = self;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function togglevisibility(ElementName)
|
||||
{
|
||||
var toggle = document. getElementById(ElementName);
|
||||
if (toggle.style.visibility == "visible")
|
||||
{
|
||||
toggle.style.visibility = "hidden";
|
||||
toggle.style.display = "none";
|
||||
}
|
||||
else
|
||||
{
|
||||
toggle.style.visibility = "visible";
|
||||
toggle.style.display = "inline";
|
||||
}
|
||||
}
|
984
js/menu_dom.js
Normal file
@ -0,0 +1,984 @@
|
||||
/*
|
||||
Javscript menu
|
||||
IE & Others Stuff
|
||||
*/
|
||||
|
||||
inDragMode=0;
|
||||
_d.onmousemove=getMouseXY;
|
||||
_flta="return false";
|
||||
if(ie55)_flta="try{if(ap.filters){return 1}}catch(e){}";
|
||||
_d.write("<"+"script>function getflta(ap){"+_flta+"}<"+"/script>");
|
||||
_mot=0;
|
||||
gevent=0;
|
||||
_ifc=0;
|
||||
|
||||
|
||||
function $CtI($ti)
|
||||
{
|
||||
clearTimeout($ti)
|
||||
}
|
||||
|
||||
function getMouseXY(e)
|
||||
{
|
||||
if(ns6)
|
||||
{
|
||||
MouseX=e.pageX;
|
||||
MouseY=e.pageY
|
||||
}
|
||||
else
|
||||
{
|
||||
MouseX=event.clientX;
|
||||
MouseY=event.clientY
|
||||
}
|
||||
if(!op&&_d.all&&_d.body)
|
||||
{
|
||||
MouseX=MouseX+_d.body.scrollLeft;
|
||||
MouseY=MouseY+_d.body.scrollTop;
|
||||
|
||||
if(IEDtD&&!mac)
|
||||
{
|
||||
MouseY=MouseY+_sT;
|
||||
MouseX=MouseX+_sL;
|
||||
}
|
||||
}
|
||||
if(inDragMode)
|
||||
{
|
||||
gm=gmobj(DragLayer);
|
||||
spos(gm,MouseY-DragY,MouseX-DragX);
|
||||
return false
|
||||
}
|
||||
return _t;
|
||||
}
|
||||
|
||||
function gmobj(_mtxt)
|
||||
{
|
||||
if(_d.getElementById){return _d.getElementById(_mtxt)}else if(_d.all){return _d.all[_mtxt]}
|
||||
}
|
||||
|
||||
function spos(_gm,_t,_l,_h,_w)
|
||||
{
|
||||
_px="px";
|
||||
if(op){_px="";
|
||||
_gs=_gm.style;
|
||||
if(_w!=_n)_gs.pixelWidth=_w;
|
||||
if(_h!=_n)_gs.pixelHeight=_h}else{_gs=_gm.style;
|
||||
if(_w!=_n)_gs.width=_w+_px;
|
||||
if(_h!=_n)_gs.height=_h+_px}if(_t!=_n)_gs.top=_t+_px;
|
||||
if(_l!=_n)_gs.left=_l+_px}function gpos(_gm){_h=_gm.offsetHeight;
|
||||
_w=_gm.offsetWidth;
|
||||
if(op5){_h=_gm.style.pixelHeight;
|
||||
_w=_gm.style.pixelWidth}_tgm=_gm;
|
||||
_t=0;
|
||||
while(_tgm!=_n){_t+=_tgm.offsetTop;
|
||||
_tgm=_tgm.offsetParent}_tgm=_gm;
|
||||
_l=0;
|
||||
while(_tgm!=_n){_l+=_tgm.offsetLeft;
|
||||
_tgm=_tgm.offsetParent}
|
||||
|
||||
if(sfri)
|
||||
{ _l-=_d.body.offsetLeft;
|
||||
_t-=_d.body.offsetTop
|
||||
}
|
||||
if(mac&&!mac45){if(_macffs=_d.body.currentStyle.marginTop){_t=_t+parseInt(_macffs)}if(_macffs=_d.body.currentStyle.marginLeft){_l=_l+parseInt(_macffs)}}_gpa=new Array(_t,_l,_h,_w);
|
||||
return(_gpa)
|
||||
}
|
||||
|
||||
function applyFilter(_gm,_mnu)
|
||||
{
|
||||
if(getflta(_gm)){if(_gm.style.visibility=="visible")flt=_m[_mnu][16];
|
||||
else flt=_m[_mnu][15];
|
||||
if(flt){if(_gm.filters[0])_gm.filters[0].stop();
|
||||
iedf="";
|
||||
iedf="FILTER:";
|
||||
flt=flt.split(";");
|
||||
for(fx=0;
|
||||
fx<flt.length;
|
||||
fx++){iedf+=" progid:DXImageTransform.Microsoft."+flt[fx];
|
||||
if(navigator.appVersion.indexOf("MSIE 5.5")>0)fx=999}_gm.style.filter=iedf;
|
||||
_gm.filters[0].apply()}}}function playFilter(_gm,_mnu){if(getflta(_gm)){if(_gm.style.visibility=="visible")flt=_m[_mnu][15];
|
||||
else flt=_m[_mnu][16];
|
||||
if(flt)_gm.filters[0].play()}
|
||||
}
|
||||
|
||||
function menuDisplay(_mnu,_show)
|
||||
{
|
||||
_gmD=gmobj("menu"+_mnu);
|
||||
if(!_gmD)return;
|
||||
_m[_mnu][22]=_gmD;
|
||||
M_hideLayer(_mnu,_show);
|
||||
if(_show){if(_m[_mnu][21]>-1&&_m[_mnu][21]!=_itemRef){itemOff(_m[_mnu][21]);
|
||||
_m[_mnu][21]=_itemRef}if(_m[_mnu][7]==0&&_ofMT==1)return;
|
||||
if(_gmD.style.visibility.toUpperCase()!="VISIBLE"){_SoT(_mnu,1);
|
||||
applyFilter(_gmD,_mnu);
|
||||
if(!_m[_mnu][7]&&!_m[_mnu][14]&&ns6)_gmD.style.position="fixed";
|
||||
_gmD.style.zIndex=_zi;
|
||||
_gmD.style.visibility="visible";
|
||||
playFilter(_gmD,_mnu);
|
||||
if(!_m[_mnu][7])_m[_mnu][21]=_itemRef;
|
||||
_mnuD++}}else{if(_m[_mnu][21]>-1&&_itemRef!=_m[_mnu][21])itemOff(_m[_mnu][21]);
|
||||
if(_gmD.style.visibility.toUpperCase()=="VISIBLE"){_SoT(_mnu,0);
|
||||
applyFilter(_gmD,_mnu);
|
||||
if(!_m[_mnu][14]&&ns6)_gmD.style.position="absolute";
|
||||
_gmD.style.visibility="hidden";
|
||||
if(mac||konq){_gmD.style.top="-999px";
|
||||
_gmD.style.left="-999px"}playFilter(_gmD,_mnu);
|
||||
_mnuD--}_m[_mnu][21]=-1}
|
||||
}
|
||||
|
||||
function closeAllMenus()
|
||||
{
|
||||
if(_oldel>-1)itemOff(_oldel);
|
||||
_oldel=-1;
|
||||
for(_a=0;
|
||||
_a<_m.length;
|
||||
_a++){if(!_m[_a][7]&&!_m[_a][10])menuDisplay(_a,0)}_mnuD=0;
|
||||
_zi=999;
|
||||
_itemRef=-1}_lcC=0;
|
||||
function _lc(_i){_I=_mi[_i];
|
||||
_lcC++;
|
||||
if(_I[62]&&_lcC==1)eval(_I[62]);
|
||||
if(_I[34]=="disabled")return;
|
||||
_feat="";
|
||||
if(_I[57])_feat=_I[57];
|
||||
if(op||_feat||(sfri||ns6||konq||mac45)){_trg="";
|
||||
if(_I[35])_trg=_I[35];
|
||||
if(_trg)window.open(_I[2],_trg,_feat);
|
||||
else(location.href=_I[2])}else{_gm=gmobj("lnk"+_i);
|
||||
_gm.href=_I[2];
|
||||
_gm.click()}closeAllMenus();
|
||||
if(_lcC==2)_lcC=0;
|
||||
}
|
||||
|
||||
function getMenuByItem(_gel)
|
||||
{
|
||||
_gel=_mi[_gel][0];
|
||||
if(_m[_gel][7])_gel=-1;
|
||||
return _gel;
|
||||
}
|
||||
|
||||
function getParentMenuByItem(_gel)
|
||||
{
|
||||
_tm=getMenuByItem(_gel);
|
||||
if(_tm==-1)return-1;
|
||||
for(_x=0;
|
||||
_x<_mi.length;
|
||||
_x++){if(_mi[_x][3]==_m[_tm][1]){return _mi[_x][0]}}
|
||||
}
|
||||
|
||||
function getParentItemByItem(_gel)
|
||||
{
|
||||
_tm=getMenuByItem(_gel);
|
||||
if(_tm==-1)return-1;
|
||||
for(_x=0;
|
||||
_x<_mi.length;
|
||||
_x++){if(_mi[_x][3]==_m[_tm][1]){return _x;}}
|
||||
}
|
||||
|
||||
function getMenuByName(_mn)
|
||||
{
|
||||
_mn=$tL(_mn);
|
||||
for(_xg=0;_xg<_m.length;_xg++)
|
||||
{
|
||||
if(_mn==_m[_xg][1])
|
||||
return _xg;
|
||||
}
|
||||
}
|
||||
|
||||
function itemOn(_i)
|
||||
{
|
||||
$CtI(_mot);
|
||||
_mot=null;
|
||||
_gmi=gmobj("el"+_i);
|
||||
if(_gmi.itemOn==1)return;
|
||||
_gmi.itemOn=1;
|
||||
_gmt=gmobj("tr"+_i);
|
||||
var _I=_mi[_i];
|
||||
if(_I[34]=="header")return;
|
||||
if(_gmt){_gmt=gmobj("tr"+_i);
|
||||
_gs=_gmt.style;
|
||||
if(_I[53])_gmt.className=_I[53]}else{_gs=_gmi.style}if(_I[2]||_I[3]){_mP=(ns6)?"pointer":"hand";
|
||||
if(_I[59])_mP=_I[59];
|
||||
_gs.cursor=_mP;
|
||||
if(_I[29])gmobj("img"+_i).style.cursor=_gs.cursor;
|
||||
if(_I[24]&&_I[3])gmobj("simg"+_i).style.cursor=_gs.cursor}if(_I[32]&&_I[29]){gmobj("img"+_i).src=_I[32]}if(_I[3]&&_I[24]&&_I[48]){gmobj("simg"+_i).src=_I[48]}if(_I[53])_gmi.className=_I[53];
|
||||
if(_I[6])_gs.color=_I[6];
|
||||
if(_I[5])_gmi.style.background=_I[5];
|
||||
if(_I[47]){_oi="url("+_I[47]+")";
|
||||
if(_gmi.style.backgroundImage!=_oi);
|
||||
_gmi.style.backgroundImage=_oi}if(_I[26])_gs.textDecoration=_I[26];
|
||||
if(!mac){if(_I[44])_gs.fontWeight="bold";
|
||||
if(_I[45])_gs.fontStyle="italic"}if(_I[42])eval(_I[42]);
|
||||
if(_I[25]){_gmi.style.border=_I[25];
|
||||
if(!_I[9])_gs.padding=_I[11]-parseInt(_gmi.style.borderWidth)+"px";}
|
||||
}
|
||||
|
||||
function itemOff(_i)
|
||||
{
|
||||
_gmi=gmobj("el"+_i);
|
||||
if(_gmi.itemOn==0)return;
|
||||
_gmi.itemOn=0;
|
||||
_gmt=gmobj("tr"+_i);
|
||||
var _I=_mi[_i];
|
||||
if(_I[32]&&_I[29]){gmobj("img"+_i).src=_I[29]}if(_I[3]&&_I[24]&&_I[48]){gmobj("simg"+_i).src=_I[24]}if(_I[4]&&_I[4]!="none")window.status="";
|
||||
if(_i==-1)return;
|
||||
if(_gmt){_gmt=gmobj("tr"+_i);
|
||||
_gs=_gmt.style;
|
||||
if(_I[54])_gmt.className=_I[54]}else{_gs=_gmi.style}if(_I[54])_gmi.className=_I[54];
|
||||
if(_I[46])_gmi.style.backgroundImage="url("+_I[46]+")";
|
||||
else if(_I[7])_gmi.style.background=_I[7];
|
||||
if(_I[8])_gs.color=_I[8];
|
||||
if(_I[26])_gs.textDecoration="none";
|
||||
if(_I[33])_gs.textDecoration=_I[33];
|
||||
if(!mac){if(_I[44]&&(_I[14]=="normal"||!_I[14]))_gs.fontWeight="normal";
|
||||
if(_I[45]&&(_I[13]=="normal"||!_I[13]))_gs.fontStyle="normal"}if(!_startM&&_I[43])eval(_I[43]);
|
||||
if(_I[25]){_gmi.style.border="0px";
|
||||
if(!_I[9])_gs.padding=_I[11]+"px"}if(_I[9]){_gmi.style.border=_I[9];}
|
||||
}
|
||||
|
||||
function closeMenusByArray(_cmnu)
|
||||
{
|
||||
for(_a=0;
|
||||
_a<_cmnu.length;
|
||||
_a++)if(_cmnu[_a]!=_mnu)if(!_m[_cmnu[_a]][7])menuDisplay(_cmnu[_a],0);
|
||||
}
|
||||
|
||||
function getMenusToClose()
|
||||
{
|
||||
_st=-1;
|
||||
_en=_sm.length;
|
||||
_mm=_iP;
|
||||
if(_iP==-1){if(_sm[0]!=_masterMenu)return _sm;
|
||||
_mm=_masterMenu}for(_b=0;
|
||||
_b<_sm.length;
|
||||
_b++){if(_sm[_b]==_mm)_st=_b+1;
|
||||
if(_sm[_b]==_mnu)_en=_b}if(_st>-1&&_en>-1){_tsm=_sm.slice(_st,_en)}return _tsm}function _cm(){_tar=getMenusToClose();
|
||||
closeMenusByArray(_tar);
|
||||
for(_b=0;
|
||||
_b<_tar.length;
|
||||
_b++){if(_tar[_b]!=_mnu)_sm=remove(_sm,_tar[_b]);}
|
||||
}
|
||||
|
||||
function _getDims()
|
||||
{
|
||||
if(!op&&_d.all){_mc=_d.body;
|
||||
if(IEDtD&&!mac&&!op7)_mc=_d.documentElement;
|
||||
if(!_mc)return;
|
||||
_bH=_mc.clientHeight;
|
||||
_bW=_mc.clientWidth;
|
||||
_sT=_mc.scrollTop;
|
||||
_sL=_mc.scrollLeft}else{_bH=window.innerHeight;
|
||||
_bW=window.innerWidth;
|
||||
if(ns6){if(_d.documentElement.offsetWidth!=_bW){_bW=_bW-15}}_sT=self.scrollY;
|
||||
_sL=self.scrollX;
|
||||
if(op){_sT=_d.body.scrollTop;
|
||||
_sL=_d.body.scrollleft}}}function c_openMenu(_i){var _I=_mi[_i];
|
||||
if(_I[3]){_oldMC=_I[39];
|
||||
_I[39]=0;
|
||||
_oldMD=_menuOpenDelay;
|
||||
_menuOpenDelay=0;
|
||||
_gm=gmobj("menu"+getMenuByName(_I[3]));
|
||||
if(_gm.style.visibility=="visible"&&_I[40]){menuDisplay(getMenuByName(_I[3]),0);
|
||||
itemOn(_i)}else{_popi(_i)}_menuOpenDelay=_oldMD;
|
||||
_I[39]=_oldMC}else{if(_I[2]&&_I[39])eval(_I[2]);}
|
||||
}
|
||||
|
||||
function getOffsetValue(_ofs)
|
||||
{
|
||||
_ofsv=null;
|
||||
if(_ofs)
|
||||
{_ofsv=_ofs;}
|
||||
if(isNaN(_ofs)&&_ofs.indexOf("offset=")==0)
|
||||
{_ofsv=parseInt(_ofs.substr(7,99));}
|
||||
return _ofsv;
|
||||
}
|
||||
|
||||
function popup()
|
||||
{
|
||||
_sm=new Array;
|
||||
_arg=arguments;
|
||||
$CtI(_MT);
|
||||
_MT=null;
|
||||
$CtI(_oMT);
|
||||
_oMT=null;
|
||||
closeAllMenus();
|
||||
if(_arg[0]){_ofMT=0;
|
||||
_mnu=getMenuByName(_arg[0]);
|
||||
if(ie4)_fixMenu(_mnu);
|
||||
_tos=0;
|
||||
if(_arg[2])_tos=_arg[2];
|
||||
_los=0;
|
||||
if(_arg[3])_los=_arg[3];
|
||||
_sm[_sm.length]=_mnu;
|
||||
if(ns6&&!ns60){_los-=_sL;
|
||||
_tos-=_sT;
|
||||
_gm=gmobj("menu"+_mnu);
|
||||
_gp=gpos(_gm);
|
||||
spos(_gm,_m[_mnu][2]+_tos,_m[_mnu][3]+_los)}if(mac)spos(gmobj("menu"+_mnu),_m[_mnu][2],_m[_mnu][3]);
|
||||
if(_arg[1]){_gm=gmobj("menu"+_mnu);
|
||||
if(!_gm)return;
|
||||
_gp=gpos(_gm);
|
||||
if(_arg[1]==1){if(MouseY+_gp[2]>(_bH+_sT))_tos=-(MouseY+_gp[2]-_bH)+_sT;
|
||||
if(MouseX+_gp[3]>(_bW+_sL))_los=-(MouseX+_gp[3]-_bW)+_sL;
|
||||
if(_m[_mnu][2]){if(isNaN(_m[_mnu][2]))_tos=getOffsetValue(_m[_mnu][2]);
|
||||
else{_tos=_m[_mnu][2];
|
||||
MouseY=0}}if(_m[_mnu][3]){if(isNaN(_m[_mnu][3]))_los=getOffsetValue(_m[_mnu][3]);
|
||||
else{_los=_m[_mnu][3];
|
||||
MouseX=0}}spos(_gm,(MouseY+_tos),(MouseX+_los))}else{_po=gmobj(_arg[1]);
|
||||
_pp=gpos(_po);
|
||||
spos(_gm,_pp[0]+_pp[2]+getOffsetValue(_m[_mnu][2])+_tos,_pp[1]+getOffsetValue(_m[_mnu][3])+_los)}}_zi=_zi+100;
|
||||
if(_m[_mnu][13]=="scroll")_check4Scroll(_mnu);
|
||||
menuDisplay(_mnu,1);
|
||||
_m[_mnu][21]=-1;}
|
||||
}
|
||||
|
||||
function popdown()
|
||||
{
|
||||
_MT=setTimeout("closeAllMenus()",_menuCloseDelay)
|
||||
}
|
||||
|
||||
function _popi(_i)
|
||||
{
|
||||
var _I=_mi[_i];
|
||||
if(!_I)return;
|
||||
_pMnu=_m[_I[0]];
|
||||
$CtI(_MT);
|
||||
_MT=null;
|
||||
if(_oldel>-1){gm=0;
|
||||
if(_I[3]){gm=gmobj("menu"+getMenuByName(_I[3]));
|
||||
if(gm&&gm.style.visibility.toUpperCase()=="VISIBLE"&&_i==_oldel){itemOn(_i);
|
||||
return}}if(_oldel!=_i)itemOff(_oldel);
|
||||
$CtI(_oMT);
|
||||
_oMT=null}$CtI(_cMT);
|
||||
_cMT=null;
|
||||
_mnu=-1;
|
||||
_itemRef=_i;
|
||||
if(_I[34]=="disabled")return;
|
||||
_mopen=_I[3];
|
||||
horiz=0;
|
||||
if(_pMnu[9])horiz=1;
|
||||
itemOn(_i);
|
||||
if(!_sm.length){_sm[_sm.length]=_I[0];
|
||||
_masterMenu=_I[0]}_iP=getMenuByItem(_i);
|
||||
if(_iP==-1)_masterMenu=_I[0];
|
||||
if(_I[4]!="none"){if(_I[4]!=null)window.status=_I[4];
|
||||
else if(_I[2])window.status=_I[2]}_cMT=setTimeout("_cm()",_menuOpenDelay);
|
||||
if(_I[39]){if(_mopen){_mnu=getMenuByName(_mopen);
|
||||
_gm=gmobj("menu"+_mnu);
|
||||
if(_gm.style.visibility.toUpperCase()=="VISIBLE"){$CtI(_cMT);
|
||||
_cMT=null;
|
||||
_tsm=_sm[_sm.length-1];
|
||||
if(_tsm!=_mnu)menuDisplay(_tsm,0)}}}if(!window.retainClickValue)inopenmode=0;
|
||||
if(_mopen&&(!_I[39]||inopenmode)&&_I[34]!="tree"){_getDims();
|
||||
_pm=gmobj("menu"+_I[0]);
|
||||
_pp=gpos(_pm);
|
||||
_mnu=getMenuByName(_mopen);
|
||||
if(_I[41])_m[_mnu][10]=1;
|
||||
if(ie4||op||konq)_fixMenu(_mnu);
|
||||
if(_mnu>-1){if(_oldel>-1&&(_mi[_oldel][0]+_I[0]))menuDisplay(_mnu,0);
|
||||
_oMT=setTimeout("menuDisplay("+_mnu+",1)",_menuOpenDelay);
|
||||
_mnO=gmobj("menu"+_mnu);
|
||||
_mp=gpos(_mnO);
|
||||
if(ie4){_mnT=gmobj("tbl"+_mnu);
|
||||
_tp=gpos(_mnT);
|
||||
_mp[3]=_tp[3]}_gmi=gmobj("el"+_i);
|
||||
if(!horiz&&mac)_gmi=gmobj("pTR"+_i);
|
||||
_gp=gpos(_gmi);
|
||||
if(horiz){_left=_gp[1];
|
||||
_top=_pp[0]+_pp[2]-_I[65]}else{_left=_pp[1]+_pp[3]-_I[65];
|
||||
_top=_gp[0]}if(sfri){if(_pMnu[14]=="relative"){_left=_left+_d.body.offsetLeft;
|
||||
_top=_top+_d.body.offsetTop}}if(_pMnu[13]=="scroll"&&!op&&!mac45&&!sfri&&!konq){if(ns6&&!ns7)_top=_top-gevent;
|
||||
else _top=_top-_pm.scrollTop}if(_m[_mnu][2]!=_n){if(isNaN(_m[_mnu][2])&&_m[_mnu][2].indexOf("offset=")==0){_top=_top+getOffsetValue(_m[_mnu][2])}else{_top=_m[_mnu][2]}}if(_m[_mnu][3]!=_n){if(isNaN(_m[_mnu][3])&&_m[_mnu][3].indexOf("offset=")==0){_left=_left+getOffsetValue(_m[_mnu][3])}else{_left=_m[_mnu][3]}}if(!horiz&&(_top+_mp[2]+20)>(_bH+_sT)){_top=(_bH-_mp[2])+_sT-16}if(_left+_mp[3]>_bW+_sL){if(!horiz&&(_pp[1]-_mp[3])>0){_left=_pp[1]-_mp[3]-_subOffsetLeft+_pMnu[6][65]}else{_left=(_bW-_mp[3])-8}}if(horiz){if(_m[_mnu][11]=="rtl")_left=_left-_mp[3]+_gp[3]+2;
|
||||
if(_pMnu[5]&&_pMnu[5].indexOf("bottom")!=-1){_top=_pp[0]-_mp[2]-1}}else{if(_m[_mnu][11]=="rtl")_left=_pp[1]-_mp[3]-(_subOffsetLeft*2);
|
||||
_top+=_subOffsetTop;
|
||||
_left+=_subOffsetLeft}if(_left<2)_left=2;
|
||||
if(_top<2)_top=2;
|
||||
if(ns60){_left-=+_pMnu[6][65];
|
||||
_top-=+_pMnu[6][65]}if(mac){_left-=_pMnu[12]+_pMnu[6][65];
|
||||
_top-=_pMnu[12]+_pMnu[6][65]}if(sfri||op){if(!horiz){_top-=_pMnu[6][65]}else{_left-=_pMnu[6][65]}}if(_m[_I[0]][7]&&(ns6||ns7))_top=_top-_sT;
|
||||
spos(_mnO,_top,_left);
|
||||
if(_m[_mnu][5])_setPosition(_mnu);
|
||||
if(_m[_mnu][13]=="scroll")_check4Scroll(_mnu);
|
||||
_zi++;
|
||||
_mnO.style.zIndex=_zi;
|
||||
if(_sm[_sm.length-1]!=_mnu)_sm[_sm.length]=_mnu}}_setPath(_iP);
|
||||
_oldel=_i;
|
||||
_ofMT=0}function _check4Scroll(_mnu){if(op)return;
|
||||
_M=_m[_mnu];
|
||||
gm=gmobj("menu"+_mnu);
|
||||
_gp=gpos(gm);
|
||||
gmt=gmobj("tbl"+_mnu);
|
||||
_gt=gpos(gmt);
|
||||
_MS=_mi[_M[0][0]];
|
||||
_cor=(_M[12]*2)+(_MS[65]*2);
|
||||
_sdim=_gt[2]+_sT;
|
||||
if(horiz)_sdim=_gt[2]+_gt[0]-_sT;
|
||||
if(_m[_mnu][2]&&!isNaN(_m[_mnu][2]))_sdim=_m[_mnu][2]+_gt[2];
|
||||
if(_sdim<(_bH+_sT)){gm.style.overflow="";
|
||||
_top=_n;
|
||||
if(!horiz&&(_gt[0]+_gt[2]+16)>(_bH+_sT)){_top=(_bH-_gt[2])+_sT-16}_ofx=0;
|
||||
if(op7)_ofx=_cor;
|
||||
_ofy=0;
|
||||
if(mac)_ofy=_cor;
|
||||
spos(gm,_top,_n,_gt[2]+_ofy,_gt[3]+_ofx);
|
||||
return}gm.style.overflow="auto";
|
||||
_sbw=_gt[3];
|
||||
if(mac){if(IEDtD)_sbw=_sbw+16;
|
||||
else _sbw=_sbw+16+_cor;
|
||||
_btm=gmobj("btm"+_mnu);
|
||||
_btm.style.height=_M[12]*2+"px"}else if(IEDtD){if(op7){_sbw=_sbw+16}else{_sbw+=_d.documentElement.offsetWidth-_d.documentElement.clientWidth-3}}else{if(op7){_sbw=_sbw+16+_cor}else{_sbw+=_d.body.offsetWidth-_d.body.clientWidth-4+_cor}if(ie4)_sbw=_gt[3]+16+_cor;
|
||||
if(ns6||sfri){_sbw=_gt[3]+15;
|
||||
if(!navigator.vendor)_sbw=_sbw+4}}_top=_n;
|
||||
if(horiz){_ht=_bH-_gt[0]-16+_sT}else{_ht=_bH-16;
|
||||
_top=6+_sT}_left=_n;
|
||||
if(_gp[1]+_sbw>(_bW+_sL)){_left=(_bW-_sbw)-2}if(_m[_mnu][2]&&!isNaN(_m[_mnu][2])){_top=_m[_mnu][2];
|
||||
_ht=_bH-_top-6}if(_ht>0)spos(gm,_top,_left,_ht+2,_sbw)}function _setPath(_mpi){if(_mpi>-1){_ci=_m[_mpi][21];
|
||||
while(_ci>-1){itemOn(_ci);
|
||||
_ci=_m[_mi[_ci][0]][21]}}}function _CAMs(){_MT=setTimeout("_AClose()",_menuCloseDelay);
|
||||
$CtI(_oMT);
|
||||
_oMT=null;
|
||||
_ofMT=1;
|
||||
}
|
||||
|
||||
function _AClose()
|
||||
{
|
||||
if(_ofMT==1)
|
||||
{
|
||||
closeAllMenus();
|
||||
inopenmode=0;
|
||||
}
|
||||
}
|
||||
|
||||
function _setCPage(_i)
|
||||
{
|
||||
if(_i[18])_i[8]=_i[18];
|
||||
if(_i[19])_i[7]=_i[19];
|
||||
if(_i[56]&&_i[29])_i[29]=_i[56];
|
||||
if(_i[69])_i[46]=_i[69];
|
||||
if(_i[48]&&_i[3])_i[24]=_i[48];
|
||||
if(_i[25])_i[9]=_i[25];
|
||||
if(_i[72])_i[54]=_i[72]
|
||||
}
|
||||
|
||||
function _getCurrentPage()
|
||||
{
|
||||
_I=_mi[_el];
|
||||
if(_I[2]){_url=_I[2];
|
||||
_hrf=location.href;
|
||||
fstr=_hrf.substr((_hrf.length-_url.length),_url.length);
|
||||
if(fstr==_url){_setCPage(_I);
|
||||
_cip[_cip.length]=_el;}}
|
||||
}
|
||||
|
||||
function _oifx(_i)
|
||||
{
|
||||
_G=gmobj("simg"+_i);
|
||||
spos(_G,_n,_n,_G.height,_G.width);
|
||||
spos(gmobj("el"+_i),_n,_n,_G.height,_G.width);
|
||||
}
|
||||
|
||||
function _getLink(_I,_gli)
|
||||
{
|
||||
_link="";
|
||||
actiontext+=" onMouseOver=\"_popi("+_gli+")\" onclick=\"opentree();";
|
||||
if(_I[2]){_targ="";
|
||||
if(_I[35])_targ="target="+_I[35];
|
||||
_link="<a id=lnk"+_gli+" href=\""+_I[2]+"\" "+_targ+"></a>";
|
||||
actiontext+="_lc("+_gli+");c_openMenu("+_gli+")"}actiontext+="\"";
|
||||
return _link;
|
||||
}
|
||||
|
||||
function drawItem(_i)
|
||||
{
|
||||
_I=_mi[_el];
|
||||
_mnu=_I[0];
|
||||
var _M=_m[_mnu];
|
||||
_getCurrentPage();
|
||||
if(_I[34]=="header")
|
||||
{
|
||||
if(_I[20])
|
||||
_I[8]=_I[20];
|
||||
if(_I[21])
|
||||
_I[7]=_I[21];
|
||||
}
|
||||
_ofb=(_I[46]?"background-image:url("+_I[46]+");":"");
|
||||
if(!_ofb)
|
||||
_ofb=(_I[7]?"background:"+_I[7]:"");
|
||||
|
||||
_ofc=(_I[8]?"color:"+_I[8]:"");
|
||||
_fsize=(_I[12]?";font-Size:"+_I[12]:"");
|
||||
_fstyle=(_I[13]?";font-Style:"+_I[13]:"");
|
||||
_fweight=(_I[14]?";font-Weight:"+_I[14]:"");
|
||||
_ffam=(_I[15]?";font-Family:"+_I[15]:"");
|
||||
_tdec="";
|
||||
|
||||
if(_I[33])
|
||||
_tdec=";text-Decoration:"+_I[33];
|
||||
actiontext=" onmouseout=_mot=setTimeout(\"itemOff("+_el+")\",100) ";
|
||||
_link="";
|
||||
if(_I[39])
|
||||
{
|
||||
actiontext+=" onclick=\"inopenmode=1;c_openMenu("+_el+");\" onMouseOver=\"_popi("+_el+");\"";
|
||||
}
|
||||
else
|
||||
{
|
||||
_link=_getLink(_I,_el);
|
||||
}
|
||||
if(_I[34]=="dragable")
|
||||
actiontext+=" onmousedown=\"drag_drop('menu"+_mnu+"')\"";
|
||||
|
||||
_clss="";
|
||||
if(_I[54])
|
||||
_clss="class="+_I[54];
|
||||
if(horiz)
|
||||
{
|
||||
if(_i==0)
|
||||
_mt+="<tr "+_clss+">";
|
||||
}
|
||||
else
|
||||
_mt+="<tr id=pTR"+_el+" "+_clss+">";
|
||||
|
||||
_subC=0;
|
||||
if(_I[3]&&_I[24])
|
||||
_subC=1;
|
||||
_timg="";
|
||||
_bimg="";
|
||||
if(_I[29])
|
||||
{
|
||||
_imalgn="";
|
||||
if(_I[31])
|
||||
_imalgn="align="+_I[31];
|
||||
_imcspan="";
|
||||
if(_subC&&_imalgn&&_I[31]!="left")
|
||||
_imcspan="colspan=2";
|
||||
_imgwd="width=1";
|
||||
if(_imalgn&&_I[31]!="left")
|
||||
_imgwd="";
|
||||
_Iwid="";
|
||||
if(_I[37])
|
||||
_Iwid=" width="+_I[37];
|
||||
_Ihgt="";
|
||||
if(_I[38])
|
||||
_Ihgt=" height="+_I[38];
|
||||
_imgalt="";
|
||||
if(_I[58])
|
||||
_imgalt="alt=\""+_I[58]+"\"";
|
||||
_timg="<td "+_imcspan+" "+_imalgn+" "+_imgwd+"><img "+_imgalt+" "+_Iwid+_Ihgt+" id=img"+_el+" src=\""+_I[29]+"\"></td>";
|
||||
if(_I[30]=="top")
|
||||
_timg+="</tr><tr>";
|
||||
if(_I[30]=="right")
|
||||
{
|
||||
_bimg=_timg;
|
||||
_timg="";
|
||||
}
|
||||
if(_I[30]=="bottom")
|
||||
{
|
||||
_bimg="<tr>"+_timg+"</tr>";
|
||||
_timg="";
|
||||
}
|
||||
}
|
||||
_algn="";
|
||||
if(_M[8])
|
||||
_algn="align="+_M[8];
|
||||
if(_I[36])
|
||||
_algn="align="+_I[36];
|
||||
if(_M[8])
|
||||
_algn=" valign="+_M[8];
|
||||
if(_I[61])
|
||||
_algn=" valign="+_I[61];
|
||||
_iw="";
|
||||
_iheight="";
|
||||
_padd="padding:"+_I[11]+"px";
|
||||
_offbrd="";
|
||||
if(_I[9])
|
||||
_offbrd="border:"+_I[9]+";";
|
||||
if(_subC||_I[29]||(_M[4]&&horiz))
|
||||
{
|
||||
_Limg="";
|
||||
_Rimg="";
|
||||
_itrs="";
|
||||
_itre="";
|
||||
if(_I[3]&&_I[24])
|
||||
{
|
||||
_subIR=0;
|
||||
if(_M[11]=="rtl")
|
||||
_subIR=1;
|
||||
_oif="";
|
||||
if(op7)
|
||||
_oif=" onload=_oifx("+_el+") ";
|
||||
_img="<img id=simg"+_el+" src="+_I[24]+_oif+">";
|
||||
_simgP="";
|
||||
if(_I[22])
|
||||
_simgP=";padding:"+_I[22]+"px";
|
||||
_imps="width=1";
|
||||
if(_I[23])
|
||||
{
|
||||
_iA="width=1";
|
||||
_ivA="";
|
||||
_imP=_I[23].split(" ");
|
||||
for(_ia=0;_ia<_imP.length;_ia++)
|
||||
{
|
||||
if(_imP[_ia]=="left")
|
||||
_subIR=1;
|
||||
if(_imP[_ia]=="right")
|
||||
_subIR=0;
|
||||
if(_imP[_ia]=="top"||_imP[_ia]=="bottom"||_imP[_ia]=="middle")
|
||||
{
|
||||
_ivA="valign="+_imP[_ia];
|
||||
if(_imP[_ia]=="bottom")
|
||||
_subIR=0;
|
||||
}
|
||||
if(_imP[_ia]=="center")
|
||||
{
|
||||
_itrs="<tr>";
|
||||
_itre="</tr>";
|
||||
_iA="align=center width=100%";
|
||||
}
|
||||
}
|
||||
_imps=_iA+" "+_ivA;
|
||||
}
|
||||
_its=_itrs+"<td "+_imps+" style=\"font-size:1px"+_simgP+"\">";
|
||||
_ite="</td>"+_itre;
|
||||
if(_subIR)
|
||||
{
|
||||
_Limg=_its+_img+_ite;
|
||||
}
|
||||
else
|
||||
{
|
||||
_Rimg=_its+_img+_ite;
|
||||
}
|
||||
}
|
||||
if(_M[4])
|
||||
_iw="width="+_M[4];
|
||||
if(_iw==""&&!_I[1])
|
||||
_iw="width=1";
|
||||
if(_I[55])
|
||||
_iw="width="+_I[55];
|
||||
if(!horiz)
|
||||
_iw="width=100%";
|
||||
if(_M[18])
|
||||
{
|
||||
_iheight="style=\"height:"+_M[18]+"px;\"";
|
||||
}
|
||||
if(_I[28])
|
||||
{
|
||||
_iheight="style=\"height:"+_I[28]+"px;\"";
|
||||
}
|
||||
_mt+="<td id=el"+_el+" "+actiontext+" style=\""+_offbrd+_ofb+";\">";
|
||||
_mt+="<table border=0 cellpadding=0 cellspacing=0 "+_iheight+" "+_iw+" id=MTbl"+_el+">";
|
||||
_mt+="<tr id=td"+_el+" style=\""+_ofc+";\">";
|
||||
_mt+=_Limg;
|
||||
_mt+=_timg;
|
||||
_iw="width=100%";
|
||||
if(ie4||ns6)
|
||||
_iw="";
|
||||
if(_I[1])
|
||||
{
|
||||
_mt+="<td "+_iw+" "+_clss+" "+_nw+" id=tr"+_el+" style=\""+_ofc+_fsize+_ffam+_fweight+_fstyle+_tdec+";"+_padd+"\" "+_algn+">"+_link+" "+_I[1]+"</td>";
|
||||
}
|
||||
else
|
||||
{
|
||||
_mt+=_link;
|
||||
}
|
||||
_mt+=_bimg;
|
||||
_mt+=_Rimg;
|
||||
_mt+="</tr>";
|
||||
_mt+="</table>";
|
||||
_mt+="</td>";
|
||||
}
|
||||
else
|
||||
{
|
||||
if(_M[18])
|
||||
_iheight="height:"+_M[18]+"px;";
|
||||
if(_I[28])
|
||||
_iheight="height:"+_I[28]+"px;";
|
||||
_iw="";
|
||||
if(_I[55])
|
||||
{
|
||||
_iw="width="+_I[55];
|
||||
if(ns6)
|
||||
_link="<div style=\"width:"+_I[55]+"px;\">"+_link;
|
||||
}
|
||||
_mt+="<td nowrap "+_clss+" "+_iw+" "+_nw+" id=el"+_el+" "+actiontext+" "+_algn+" style=\""+_offbrd+_iheight+_ofc+_fsize+_ffam+_fweight+_fstyle+_tdec+";"+_ofb+";"+_padd+"\">"+_link+" "+_I[1]+"</td>";
|
||||
}
|
||||
if((_M[0][_i]!=_M[0][_M[0].length-1])&&_I[27]>0)
|
||||
{
|
||||
_sepadd="";
|
||||
_brd="";
|
||||
_sbg=";background:"+_I[10];
|
||||
if(_I[71])
|
||||
_sbg=";background-image:url("+_I[71]+");";
|
||||
if(_I[27])
|
||||
{
|
||||
if(horiz)
|
||||
{
|
||||
if(_I[49])
|
||||
{
|
||||
_sepA="middle";
|
||||
if(_I[52])
|
||||
_sepA=_I[52];
|
||||
if(_I[51])
|
||||
_sepadd="style=\"padding:"+_I[51]+"px;\"";
|
||||
_mt+="<td nowrap "+_sepadd+" valign="+_sepA+" align=left width=1><div style=\"font-size:1px;width:"+_I[27]+";height:"+_I[49]+";"+_brd+_sbg+";\"></div></td>";
|
||||
}
|
||||
else
|
||||
{
|
||||
if(_I[16]&&_I[17])
|
||||
{
|
||||
_bwid=_I[27]/2;
|
||||
if(_bwid<1)
|
||||
_bwid=1;
|
||||
_brdP=_bwid+"px solid ";
|
||||
_brd+="border-right:"+_brdP+_I[16]+";";
|
||||
_brd+="border-left:"+_brdP+_I[17]+";";
|
||||
if(mac||sfri||(ns6&&!ns7))
|
||||
{
|
||||
_mt+="<td style=\"width:"+_I[27]+"px;empty-cells:show;"+_brd+"\"></td>";
|
||||
}
|
||||
else
|
||||
{
|
||||
_mt+="<td style=\"empty-cells:show;"+_brd+"\"><table border=0 cellpadding=0 cellspacing=0><td></td></table></td>";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(_I[51])
|
||||
_sepadd="<td nowrap width="+_I[51]+"></td>";
|
||||
_mt+=_sepadd+"<td style=\"width:"+_I[27]+"px;"+_brd+_sbg+"\"><table border=0 cellpadding=0 cellspacing=0 width="+_I[27]+"><td></td></table></td>"+_sepadd;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(_I[16]&&_I[17])
|
||||
{
|
||||
_bwid=_I[27]/2;
|
||||
if(_bwid<1)
|
||||
_bwid=1;
|
||||
_brdP=_bwid+"px solid ";
|
||||
_brd="border-bottom:"+_brdP+_I[16]+";";
|
||||
_brd+="border-top:"+_brdP+_I[17]+";";
|
||||
if(mac||ns6||sfri)
|
||||
_I[27]=0;
|
||||
}
|
||||
if(_I[51])
|
||||
_sepadd="<tr><td height="+_I[51]+"></td></tr>";
|
||||
_sepW="100%";
|
||||
if(_I[50])
|
||||
_sepW=_I[50];
|
||||
_sepA="center";
|
||||
if(_I[52])
|
||||
_sepA=_I[52];
|
||||
if(!mac)
|
||||
_sbg+=";overflow:hidden";
|
||||
_mt+="</tr>"+_sepadd+"<tr><td align="+_sepA+"><div style=\""+_sbg+";"+_brd+"width:"+_sepW+";height:"+_I[27]+"px;font-size:1px;\"></div></td></tr>"+_sepadd+"";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fixMenu(_mnu)
|
||||
{
|
||||
_gmt=gmobj("tbl"+_mnu);
|
||||
_gm=gmobj("menu"+_mnu);
|
||||
|
||||
if(op5)
|
||||
_gm.style.pixelWidth=_gmt.style.pixelWidth+(_m[_mnu][12]*2)+(_m[_mnu][6][65]*2);
|
||||
if((ie4)||_m[_mnu][14]=="relative")
|
||||
_gm.style.width=_gmt.offsetWidth+"px";
|
||||
if(konq)
|
||||
_gm.style.width=_gmt.offsetWidth;
|
||||
}
|
||||
|
||||
function getEVT(evt,_mnu)
|
||||
{
|
||||
if(evt.target.tagName=="TD"){_egm=gmobj("menu"+_mnu);
|
||||
gevent=evt.layerY-(evt.pageY-_d.body.offsetTop)+_egm.offsetTop;}
|
||||
}
|
||||
|
||||
function _drawMenu(_mnu,_begn)
|
||||
{
|
||||
_mcnt++;
|
||||
var _M=_m[_mnu];
|
||||
_top="";
|
||||
_left="";
|
||||
if(!_M[14]&&!_M[7]){_top="top:-999px";
|
||||
_left="left:-999px"}if(_M[2]!=_n){if(!isNaN(_M[2]))_top="top:"+_M[2]+"px"}if(_M[3]!=_n){if(!isNaN(_M[3]))_left="left:"+_M[3]+"px"}_mnuHeight="";
|
||||
if(_M[9]=="horizontal"||_M[9]==1){_M[9]=1;
|
||||
horiz=1;
|
||||
if(_M[18]){_mnuHeight="height="+_M[18]}}else{_M[9]=0;
|
||||
horiz=0}_visi="hidden";
|
||||
_mt="";
|
||||
_nw="";
|
||||
_MS=_mi[_M[0][0]];
|
||||
_tablewidth="";
|
||||
if(_M[4]){_tablewidth="width="+_M[4];
|
||||
if(op7&&!IEDtD)_tablewidth="width="+(_M[4]-(_M[12]*2)-(_MS[65]*2))}else{if(!_M[17])_nw="nowrap"}_ofb="";
|
||||
if(_MS[7])_ofb="background:"+_MS[7];
|
||||
_brd="";
|
||||
_brdP="";
|
||||
_brdwid="";
|
||||
if(_MS[65]){_brdsty="solid";
|
||||
if(_MS[64])_brdsty=_MS[64];
|
||||
_brdcol="none";
|
||||
if(_MS[63])_brdcol=_MS[63];
|
||||
if(_MS[65])_brdwid=_MS[65];
|
||||
_brdP=_brdwid+"px "+_brdsty+" ";
|
||||
_brd="border:"+_brdP+_brdcol+";"}
|
||||
if(_MS[16]&&_MS[17]){_h3d=_MS[16];_l3d=_MS[17];
|
||||
if(_MS[70]){_h3d=_MS[17];
|
||||
_l3d=_MS[16]}_brdP=_brdwid+"px solid ";
|
||||
_brd="border-bottom:"+_brdP+_h3d+";";
|
||||
_brd+="border-right:"+_brdP+_h3d+";";
|
||||
_brd+="border-top:"+_brdP+_l3d+";";
|
||||
_brd+="border-left:"+_brdP+_l3d+";"}_ns6ev="";
|
||||
if(_M[13]=="scroll"&&ns6&&!ns7)_ns6ev="onmousemove=\"getEVT(event,"+_mnu+")\"";
|
||||
_bgimg="";
|
||||
if(_MS[73])_bgimg=";background-image:url("+_MS[73]+");";
|
||||
_posi="absolute";
|
||||
if(_M[14]){_posi=_M[14];
|
||||
if(_M[14]=="relative"){_posi="";
|
||||
if(!_M[4])_wid="width:1px;";
|
||||
_top="";
|
||||
_left=""}}_padd="";
|
||||
if(_M[12])_padd="padding:"+_M[12]+"px;";
|
||||
_wid="";
|
||||
_cls="mmenu";
|
||||
if(_MS[54])_cls=_MS[54];
|
||||
if(_posi)_posi="position:"+_posi;
|
||||
_mnwid="";
|
||||
if(_M[17])_mnwid="width="+_M[17];
|
||||
if(_begn==1){if(!op6&&_mnwid&&!ns7)_wid=";width:"+_M[17]+";";
|
||||
_mt+="<div class="+_cls+" onselectstart=\"return _f\" "+_ns6ev+" onmouseout=\"_CAMs()\" onmouseover=\"$CtI(_MT);\" id=menu"+_mnu+" style=\""+_padd+_ofb+";"+_brd+_wid+"z-index:99;visibility:"+_visi+";"+_posi+";"+_top+";"+_left+_bgimg+"\">"}_mali="";
|
||||
if(_M[20])_mali="align="+_M[20];
|
||||
if(_mnwid)_mt+="<table border=0 cellpadding=0 cellspacing=0 "+_mnwid+" style=\""+_ofb+"\"><td "+_mnwid+" "+_mali+">";
|
||||
_mt+="<table border=0 cellpadding=0 cellspacing=0 "+_mnuHeight+" "+_tablewidth+" id=tbl"+_mnu+">";
|
||||
for(_b=0;
|
||||
_b<_M[0].length;
|
||||
_b++){drawItem(_b);
|
||||
_el++}if(mac)_mt+="<tr><td id=btm"+_mnu+"></td></tr>";
|
||||
_mt+="</tr></table>";
|
||||
if(_mnwid)_mt+="</td></tr></table>";
|
||||
if(_begn==1)_mt+="</div>";
|
||||
|
||||
// For debugging the menu script
|
||||
//document.all.debug.value += _mt;
|
||||
|
||||
if(_begn==1)
|
||||
_d.write(_mt);
|
||||
else
|
||||
return _mt;
|
||||
|
||||
_M[22]=gmobj("menu"+_mnu);
|
||||
if(_M[7]){if(ie55)drawiF(_mnu)}else{if(ie55&&_ifc<_mD)drawiF(_mnu);
|
||||
_ifc++}if(_M[19]){_M[19]=_M[19].toString();
|
||||
_fs=_M[19].split(",");
|
||||
if(!_fs[1])_fs[1]=50;
|
||||
if(!_fs[2])_fs[2]=2;
|
||||
_M[19]=_fs[0];
|
||||
followScroll(_mnu,_fs[1],_fs[2])}if(_mnu==_m.length-1){$CtI(_mst);
|
||||
_mst=null;
|
||||
_mst=setTimeout("_MScan()",150);
|
||||
_getCurPath();}
|
||||
}
|
||||
|
||||
function _getCurPath()
|
||||
{
|
||||
_cmp=new Array();
|
||||
if(_cip.length>0){for(_c=0;
|
||||
_c<_cip.length;
|
||||
_c++){_ci=_cip[_c];
|
||||
_mni=getParentItemByItem(_ci);
|
||||
if(_mni==-1)_mni=_ci;
|
||||
if(_mni+" "!="undefined "){while(_mni!=-1){_I=_mi[_mni];
|
||||
_setCPage(_I);
|
||||
itemOff(_mni);
|
||||
_cmp[_cmp.length]=_mni;
|
||||
_mni=getParentItemByItem(_mni);
|
||||
if(_mni+" "=="undefined ")_mni=-1;}}}}
|
||||
}
|
||||
|
||||
function _setPosition(_mnu)
|
||||
{
|
||||
if(_m[_mnu][5]){_gm=gmobj("menu"+_mnu);
|
||||
_gp=gpos(_gm);
|
||||
_osl=0;
|
||||
_omnu3=0;
|
||||
if(isNaN(_m[_mnu][3])&&_m[_mnu][3].indexOf("offset=")==0){_omnu3=_m[_mnu][3];
|
||||
_m[_mnu][3]=_n;
|
||||
_osl=_omnu3.substr(7,99);
|
||||
_gm.leftOffset=_osl}_lft=_n;
|
||||
if(!_m[_mnu][3]){if(_m[_mnu][5].indexOf("left")!=-1)_lft=0;
|
||||
if(_m[_mnu][5].indexOf("center")!=-1)_lft=(_bW/2)-(_gp[3]/2);
|
||||
if(_m[_mnu][5].indexOf("right")!=-1)_lft=_bW-_gp[3];
|
||||
if(_gm.leftOffset)_lft=_lft+parseInt(_gm.leftOffset)}_ost=0;
|
||||
_omnu2=0;
|
||||
if(isNaN(_m[_mnu][2])&&_m[_mnu][2].indexOf("offset=")==0){_omnu2=_m[_mnu][2];
|
||||
_m[_mnu][2]=_n;
|
||||
_ost=_omnu2.substr(7,99);
|
||||
_gm.topOffset=_ost}_tp=_n;
|
||||
if(!_m[_mnu][2]>=0){_tp=_n;
|
||||
if(_m[_mnu][5].indexOf("top")!=-1)_tp=0;
|
||||
if(_m[_mnu][5].indexOf("middle")!=-1)_tp=(_bH/2)-(_gp[2]/2);
|
||||
if(_m[_mnu][5].indexOf("bottom")!=-1)_tp=_bH-_gp[2];
|
||||
if(_gm.topOffset)_tp=_tp+parseInt(_gm.topOffset)}spos(_gm,_tp,_lft);
|
||||
if(_m[_mnu][19])_m[_mnu][19]=_tp;
|
||||
if(_m[_mnu][7])_SoT(_mnu,1);
|
||||
_gm._tp=_tp;}
|
||||
}
|
||||
|
||||
function followScroll(_mnu,_cycles,_rate)
|
||||
{
|
||||
if(!_startM){_M=_m[_mnu];
|
||||
_fogm=_M[22];
|
||||
_fgp=gpos(_fogm);
|
||||
if(_sT>_M[2]-_M[19])_tt=_sT-(_sT-_M[19]);
|
||||
else _tt=_M[2]-_sT;
|
||||
if((_fgp[0]-_sT)!=_tt){diff=_sT+_tt;
|
||||
if(diff-_fgp[0]<1)_rcor=_rate;
|
||||
else _rcor=-_rate;
|
||||
_nv=parseInt((diff-_rcor-_fgp[0])/_rate);
|
||||
if(_nv!=0)diff=_fgp[0]+_nv;
|
||||
spos(_fogm,diff);
|
||||
if(_fgp._tp)_M[19]=_fgp._tp;
|
||||
if(ie55){_fogm=gmobj("ifM"+_mnu);
|
||||
if(_fogm)spos(_fogm,diff)}}}_fS=setTimeout("followScroll(\""+_mnu+"\","+_cycles+","+_rate+")",_cycles);
|
||||
}
|
||||
|
||||
function _MScan()
|
||||
{
|
||||
_getDims();
|
||||
if(_bH!=_oldbH||_bW!=_oldbW){for(_a=0;
|
||||
_a<_m.length;
|
||||
_a++){if(_m[_a][7]){if(_startM&&(ie4||_m[_a][14]=="relative")){_fixMenu(_a)}menuDisplay(_a,1)}}for(_a=0;
|
||||
_a<_m.length;
|
||||
_a++){if(_m[_a][5]){_setPosition(_a)}}}if(_startM)_mnuD=0;
|
||||
_startM=0;
|
||||
_oldbH=_bH;
|
||||
_oldbW=_bW;
|
||||
if(!op&&_d.all&&_d.readyState!="complete"){_oldbH=0;
|
||||
_oldbW=0}if(op){}_mst=setTimeout("_MScan()",150);
|
||||
}
|
||||
|
||||
function drawiF(_mnu)
|
||||
{
|
||||
_gm=gmobj("menu"+_mnu);
|
||||
_gp=gpos(_gm);
|
||||
_ssrc="";
|
||||
if(location.protocol=="https:")_ssrc="src=/blank.html";
|
||||
if(_m[_mnu][7]){_mnuV="ifM"+_mnu}else{_mnuV="iF"+_mnuD;
|
||||
_mnuD++}if(!window._CFix)_d.write("<iframe class=mmenu FRAMEBORDER=0 id="+_mnuV+" "+_ssrc+" style=\"filter:Alpha(Opacity=0);visibility:hidden;position:absolute;top:"+_gp[0]+"px;left:"+_gp[1]+"px;height:"+_gp[2]+"px;width:"+_gp[3]+"px;\"></iframe>")}function _SoT(_mnu,_on){if(_m[_mnu][14]=="relative")return;
|
||||
if(ns6)return;
|
||||
if(ie55){if(_on){if(!_m[_mnu][7]){_iF=gmobj("iF"+_mnuD);
|
||||
if(!_iF){if(_d.readyState!="complete")return;
|
||||
_iF=_d.createElement("iframe");
|
||||
if(location.protocol=="https:")_iF.src="/blank.html";
|
||||
_iF.id="iF"+_mnuD;
|
||||
_iF.style.filter="Alpha(Opacity=0)";
|
||||
_iF.style.position="absolute";
|
||||
_iF.style.className="mmenu";
|
||||
_d.body.appendChild(_iF)}}else{_iF=gmobj("ifM"+_mnu)}_gp=gpos(_m[_mnu][22]);
|
||||
if(_iF){spos(_iF,_gp[0],_gp[1],_gp[2],_gp[3]);
|
||||
_iF.style.visibility="visible";
|
||||
_iF.style.zIndex=1}}else{_gm=gmobj("iF"+(_mnuD-1));
|
||||
if(_gm)_gm.style.visibility="hidden";}}
|
||||
}
|
285
js/menu_misc.js
Normal file
@ -0,0 +1,285 @@
|
||||
/*
|
||||
Javscript menu
|
||||
Misc stuff
|
||||
*/
|
||||
|
||||
_mD=2;
|
||||
_d=document;
|
||||
_n=navigator;
|
||||
_nv=$tL(_n.appVersion);
|
||||
_nu=$tL(_n.userAgent);
|
||||
_ps=parseInt(_n.productSub);
|
||||
_f=false;
|
||||
_t=true;
|
||||
_n=null;
|
||||
_wp=window.createPopup;
|
||||
ie=(_d.all)?_t:_f;
|
||||
ie4=(!_d.getElementById&&ie)?_t:_f;
|
||||
ie5=(!ie4&&ie&&!_wp)?_t:_f;
|
||||
ie55=(!ie4&&ie&&_wp)?_t:_f;
|
||||
ns6=(_nu.indexOf("gecko")!=-1)?_t:_f;
|
||||
konq=(_nu.indexOf("konqueror")!=-1)?_t:_f;
|
||||
sfri=(_nu.indexOf("safari")!=-1)?_t:_f;
|
||||
if(konq||sfri){_ps=0;
|
||||
ns6=0}ns4=(_d.layers)?_t:_f;
|
||||
ns61=(_ps>=20010726)?_t:_f;
|
||||
ns7=(_ps>=20020823)?_t:_f;
|
||||
op=(window.opera)?_t:_f;
|
||||
op5=(_nu.indexOf("opera 5")!=-1)?_t:_f;
|
||||
op6=(_nu.indexOf("opera 6")!=-1)?_t:_f;
|
||||
op7=(_nu.indexOf("opera 7")!=-1||_nu.indexOf("opera/7")!=-1)?_t:_f;
|
||||
mac=(_nv.indexOf("mac")!=-1)?_t:_f;
|
||||
mac45=(_nv.indexOf("msie 4.5")!=-1)?_t:_f;
|
||||
mac50=(mac&&_nv.indexOf("msie 5.0")!=-1)?_t:_f;
|
||||
if(ns6||ns4||op||sfri)mac=_f;
|
||||
ns60=_f;
|
||||
if(ns6&&!ns61)ns60=_t;
|
||||
IEDtD=0;
|
||||
if(!op&&(_d.all&&_d.compatMode=="CSS1Compat")||(mac&&_d.doctype&&_d.doctype.name.indexOf(".dtd")!=-1))IEDtD=1;
|
||||
if(op7)op=_f;
|
||||
if(op)ie55=_f;
|
||||
_st=0;
|
||||
_en=0;
|
||||
$=" ";
|
||||
_m=new Array();
|
||||
_mi=new Array();
|
||||
_sm=new Array();
|
||||
_tsm=new Array();
|
||||
_cip=new Array();
|
||||
_mn=-1;
|
||||
_el=0;
|
||||
_ael=0;
|
||||
_Bel=0;
|
||||
_bl=0;
|
||||
_Omenu=0;
|
||||
_MT=setTimeout("",0);
|
||||
_oMT=setTimeout("",0);
|
||||
_cMT=setTimeout("",0);
|
||||
_scrmt=setTimeout("",0);
|
||||
_mst=setTimeout("",0);
|
||||
_zi=999;
|
||||
_c=1;
|
||||
_mt="";
|
||||
_oldel=-1;
|
||||
_sH=0;
|
||||
_sW=0;
|
||||
_bH=500;
|
||||
_oldbH=0;
|
||||
_bW=0;
|
||||
_oldbW=0;
|
||||
_cD=0;
|
||||
_ofMT=0;
|
||||
_startM=1;
|
||||
_sT=0;
|
||||
_sL=0;
|
||||
_mcnt=0;
|
||||
_mnuD=0;
|
||||
_itemRef=-1;
|
||||
inopenmode=0;
|
||||
|
||||
_$S={menu:0,text:1,url:2,showmenu:3,status:4,onbgcolor:5,oncolor:6,offbgcolor:7,offcolor:8,offborder:9,separatorcolor:10,padding:11,fontsize:12,fontstyle:13,fontweight:14,fontfamily:15,high3dcolor:16,low3dcolor:17,pagecolor:18,pagebgcolor:19,headercolor:20,headerbgcolor:21,subimagepadding:22,subimageposition:23,subimage:24,onborder:25,ondecoration:26,separatorsize:27,itemheight:28,image:29,imageposition:30,imagealign:31,overimage:32,decoration:33,type:34,target:35,align:36,imageheight:37,imagewidth:38,openonclick:39,closeonclick:40,keepalive:41,onfunction:42,offfunction:43,onbold:44,onitalic:45,bgimage:46,overbgimage:47,onsubimage:48,separatorheight:49,separatorwidth:50,separatorpadding:51,separatoralign:52,onclass:53,offclass:54,itemwidth:55,pageimage:56,targetfeatures:57,imagealt:58,pointer:59,imagepadding:60,valign:61,clickfunction:62,bordercolor:63,borderstyle:64,borderwidth:65,overfilter:66,outfilter:67,margin:68,pagebgimage:69,swap3d:70,separatorimage:71,pageclass:72,menubgimage:73};
|
||||
$So="";
|
||||
_$M={items:0,name:1,top:2,left:3,itemwidth:4,screenposition:5,style:6,alwaysvisible:7,align:8,orientation:9,keepalive:10,openstyle:11,margin:12,overflow:13,position:14,overfilter:15,outfilter:16,menuwidth:17,itemheight:18,followscroll:19,menualign:20,mm_callItem:21,mm_obj_ref:22};
|
||||
_pru="";
|
||||
_c=0;
|
||||
menuname.prototype.SbMnu=ami;
|
||||
menuname.prototype.insertItem=_iI;
|
||||
|
||||
function M_hideLayer(){}
|
||||
function opentree(){}
|
||||
|
||||
function chop(_ar,_pos)
|
||||
{
|
||||
var _tar=new Array();
|
||||
for(_a=0;_a<_ar.length;_a++)
|
||||
{
|
||||
if(_a!=_pos)
|
||||
{
|
||||
_tar[_tar.length]=_ar[_a];
|
||||
}
|
||||
}
|
||||
return _tar;
|
||||
}
|
||||
|
||||
function remove(_ar,_dta)
|
||||
{
|
||||
var _tar=new Array();
|
||||
for(_a=0;_a<_ar.length;_a++)
|
||||
{
|
||||
if(_ar[_a]!=_dta)
|
||||
{_tar[_tar.length]=_ar[_a]}
|
||||
}
|
||||
|
||||
return _tar;
|
||||
}
|
||||
|
||||
function copyOf(_w){for(_cO in _w)
|
||||
{
|
||||
this[_cO]=_w[_cO]}
|
||||
}
|
||||
|
||||
function $tL($S)
|
||||
{
|
||||
return $S.toLowerCase();
|
||||
}
|
||||
|
||||
function MakeMenus()
|
||||
{
|
||||
for(_a=_mcnt;_a<_m.length;_a++)
|
||||
{_drawMenu(_a,1)}
|
||||
}
|
||||
|
||||
function MenuStyle()
|
||||
{
|
||||
for($i in _$S)
|
||||
this[$i]=_n;
|
||||
}
|
||||
|
||||
function menuname(name)
|
||||
{
|
||||
for($i in _$M)
|
||||
this[$i]=_n;
|
||||
|
||||
this.name=$tL(name);_c=1;
|
||||
_mn++;
|
||||
this.menunumber=_mn;
|
||||
}
|
||||
|
||||
function _incItem(_it)
|
||||
{
|
||||
_mi[_bl]=new Array();
|
||||
|
||||
for($i in _x[6])
|
||||
_mi[_bl][_$S[$i]]=_x[6][$i];
|
||||
|
||||
_mi[_bl][0]=_mn;
|
||||
_it=_it.split(";");
|
||||
|
||||
for(_a=0;_a<_it.length;_a++)
|
||||
{
|
||||
_sp=_it[_a].indexOf("`");
|
||||
if(_sp!=-1)
|
||||
{
|
||||
_tI=_it[_a];
|
||||
for(_b=_a;_b<_it.length;_b++)
|
||||
{
|
||||
_tI+=";"+_it[_b+1];
|
||||
_a++;
|
||||
if(_it[_b+1].indexOf("`")!=-1)
|
||||
_b=_it.length
|
||||
}
|
||||
_it[_a]=_tI.replace(/`/g,"")
|
||||
}
|
||||
_sp=_it[_a].indexOf("=");
|
||||
if(_sp==-1)
|
||||
{
|
||||
if(_it[_a])
|
||||
_si=_si+";"+_it[_a];
|
||||
}
|
||||
else
|
||||
{
|
||||
_si=_it[_a].slice(_sp+1);
|
||||
_w=_it[_a].slice(0,_sp);
|
||||
if(_w=="showmenu")
|
||||
_si=$tL(_si)
|
||||
}
|
||||
|
||||
if(_it[_a])
|
||||
{
|
||||
_mi[_bl][_$S[_w]]=_si;
|
||||
}
|
||||
}
|
||||
|
||||
_m[_mn][0][_c-2]=_bl;
|
||||
_c++;
|
||||
_bl++;
|
||||
_mil=1;
|
||||
|
||||
if(_m[_mn][7]&&_c==3)
|
||||
{
|
||||
$c=0;
|
||||
for($i in _$S)
|
||||
{
|
||||
if($c==2)
|
||||
$T2=";"+$i;
|
||||
if($c==1)
|
||||
$T1=$i+"=";
|
||||
$c++
|
||||
}
|
||||
$1=eval("$tL(String.fromCharCode(95,80,82,85))");
|
||||
$2=eval($1).split($);
|
||||
}
|
||||
_mil=2;
|
||||
}
|
||||
|
||||
function _iI(txt,_pos)
|
||||
{
|
||||
_oStyle=_m[_mn][6];
|
||||
_m[_mn][6]=this.style;
|
||||
this.SbMnu(txt);
|
||||
_mil=_mi.length;
|
||||
_M=_m[this.menunumber];
|
||||
_nmi=new Array();
|
||||
if(_pos>=_M[0].length)_pos=_M[0].length;
|
||||
if(!_M[0][_pos])_M[0][_pos]=_M[0][_M[0].length-1]+1;
|
||||
_inum=_M[0][_pos];
|
||||
_cnt=0;
|
||||
for(_a=0;_a<_mil;_a++)
|
||||
{
|
||||
if(_inum==_a)
|
||||
{
|
||||
_nmi[_cnt]=_mi[_mi.length-1];
|
||||
_nmi[_cnt][0]=this.menunumber;
|
||||
_M[0][_M[0].length]=_cnt;
|
||||
_cnt++
|
||||
}
|
||||
_nmi[_cnt]=_mi[_a];
|
||||
_cnt++
|
||||
}
|
||||
|
||||
_mi=_nmi;
|
||||
_tpos=0;
|
||||
_omnu=-1;
|
||||
|
||||
for(_a=0;_a<_mil;_a++)
|
||||
{
|
||||
_mnu=_mi[_a][0];
|
||||
if(_mnu!=_omnu)
|
||||
{
|
||||
_m[_mnu][0]=new Array();
|
||||
_tpos=0;
|
||||
}
|
||||
_m[_mnu][0][_tpos]=_a;
|
||||
_tpos++;
|
||||
_omnu=_mnu;
|
||||
}
|
||||
_m[_mn][6]=_oStyle;
|
||||
}
|
||||
|
||||
function ami(txt)
|
||||
{
|
||||
_t=this;
|
||||
if(_c==1)
|
||||
{
|
||||
_c++;
|
||||
_m[_mn]=new Array();
|
||||
_x=_m[_mn];
|
||||
for($i in _t)
|
||||
_x[_$M[$i]]=_t[$i];
|
||||
|
||||
_x[21]=-1;
|
||||
_x[0]=new Array();
|
||||
if(!_x[12])_x[12]=0;
|
||||
_MS=_m[_mn][6];
|
||||
_MN=_m[_mn];
|
||||
if(!_MN[15])
|
||||
_MN[15]=_MS.overfilter;
|
||||
if(!_MN[16])
|
||||
_MN[16]=_MS.outfilter;
|
||||
if(!_MN[12])
|
||||
_MN[12]=_MS.margin;
|
||||
if(!_MS[65])
|
||||
_MS[65]=0;
|
||||
}
|
||||
_incItem(txt);
|
||||
}
|
678
js/menu_ns4.js
Normal file
@ -0,0 +1,678 @@
|
||||
/*
|
||||
Javscript menu
|
||||
NS4 stuff
|
||||
*/
|
||||
|
||||
_amt="";
|
||||
_MTF=0;
|
||||
_onTS=0;
|
||||
var _cel=-1;
|
||||
|
||||
function gmobj(mtxt)
|
||||
{
|
||||
if(_d.layers[mtxt])
|
||||
return _d.layers[mtxt];
|
||||
re=/\d*\d/;
|
||||
fnd=re.exec(mtxt);
|
||||
if(_d.layers["menu"+_mi[fnd][0]])
|
||||
{
|
||||
return _d.layers["menu"+_mi[fnd][0]].document.layers["il"+fnd].document.layers[mtxt];
|
||||
}
|
||||
else
|
||||
{
|
||||
return document.layers["il"+fnd].document.layers[mtxt];
|
||||
}
|
||||
}
|
||||
|
||||
function spos(gm,t_,l_,h_,w_)
|
||||
{
|
||||
if(t_!=null)
|
||||
gm.top=t_;
|
||||
if(l_!=null)
|
||||
gm.left=l_;
|
||||
if(h_!=null)
|
||||
gm.height=h_;
|
||||
if(w_!=null)
|
||||
gm.width=w_;
|
||||
}
|
||||
|
||||
function gpos(gm)
|
||||
{
|
||||
var gpa=new Array();
|
||||
gpa[0]=gm.pageY;
|
||||
gpa[1]=gm.pageX;
|
||||
gpa[2]=gm.clip.height;
|
||||
gpa[3]=gm.clip.width;
|
||||
return(gpa)
|
||||
}
|
||||
|
||||
function _lc(_dummy)
|
||||
{
|
||||
if(window.retainClickValue)
|
||||
inopenmode=1;
|
||||
|
||||
_i=nshl;
|
||||
if(_mi[_i][62])
|
||||
eval(_mi[_i][62]);
|
||||
if(_i>-1)
|
||||
{
|
||||
if(_mi[_i][2])
|
||||
{
|
||||
location.href=_mi[_i][2];
|
||||
}
|
||||
else
|
||||
{
|
||||
if(_mi[_i][39]||_mi[_i][40])
|
||||
{
|
||||
_nullLink(_i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _nullLink(_i)
|
||||
{if(_mi[_i][3]){_oldMC=_mi[_i][39];
|
||||
_mi[_i][39]=0;
|
||||
_oldMD=_menuOpenDelay;
|
||||
_menuOpenDelay=0;
|
||||
_gm=gmobj("menu"+getMenuByName(_mi[_i][3]));
|
||||
if(_gm.visibility=="show"&&_mi[_i][40]){menuDisplay(getMenuByName(_mi[_i][3]),0);
|
||||
itemOn(_i)}else{_popi(_i)}_menuOpenDelay=_oldMD;
|
||||
_mi[_i][39]=_oldMC}
|
||||
}
|
||||
|
||||
function itemOn(_i)
|
||||
{clearTimeout(_scrmt);
|
||||
if(_mi[_i][34]=="header"||_mi[_i][34]=="form")return;
|
||||
_gm=gmobj("oel"+_i);
|
||||
_gm.visibility="show";
|
||||
if(_mi[_i][42])eval(_mi[_i][42])
|
||||
}
|
||||
|
||||
function itemOff(_i)
|
||||
{if(_i>-1){_gm=gmobj("oel"+_i);
|
||||
_gm.visibility="hide";
|
||||
if(_mi[_i][43])eval(_mi[_i][43])}}_NS4S=new Array();
|
||||
function drawItem(_i){_Tmt="";
|
||||
_Dmnu=_mi[_i][0];
|
||||
var _M=_m[_Dmnu];
|
||||
var _mE=_mi[_i];
|
||||
if(!_NS4S[_i]){if(!_mi[_i][33])_mi[_i][33]="none";
|
||||
if(!_mi[_i][26])_mi[_i][26]="none";
|
||||
if(!_mi[_i][14])_mi[_i][14]="normal";
|
||||
_st=".item"+_i+"{";
|
||||
if(_mi[_i][33])_st+="textDecoration:"+_mi[_i][33]+";";
|
||||
if(_mi[_i][15])_st+="fontFamily:"+_mi[_i][15]+";";
|
||||
if(_mi[_i][14])_st+="fontWeight:"+_mi[_i][14]+";";
|
||||
if(_mi[_i][12])_st+="fontSize:"+_mi[_i][12]+";";
|
||||
_st+="}";
|
||||
_st+=".oitem"+_i+"{";
|
||||
if(_mi[_i][15])_st+="fontFamily:"+_mi[_i][15]+";";
|
||||
if(_mi[_i][14])_st+="fontWeight:"+_mi[_i][14]+";";
|
||||
if(_mi[_i][33])_st+="textDecoration:"+_mi[_i][33]+";";
|
||||
if(_mi[_i][44])_st+="fontWeight:bold;";
|
||||
if(_mi[_i][45])_st+="fontStyle:italic;";
|
||||
if(_mi[_i][12])_st+="fontSize:"+_mi[_i][12]+";";
|
||||
if(_mi[_i][26])_st+="textDecoration:"+_mi[_i][26]+";";
|
||||
_st+="}";
|
||||
_d.write("<style>"+_st+"</style>");
|
||||
_NS4S[_i]=_i}_lnk="javascript:_nullLink("+_i+");";
|
||||
if(_mi[_i][2])_lnk="javascript:_lc("+_i+")";
|
||||
_wid="";
|
||||
if(_M[4])_wid="width="+_M[4];
|
||||
if(_mi[_i][55])_wid="width="+_mi[_i][55];
|
||||
_hgt="";
|
||||
if(_M[18]){_hgt="height="+_M[18]}if(_mi[_i][28]){_hgt="height="+_mi[_i][28]}_pad="0";
|
||||
if(_mE[11])_pad=_mE[11];
|
||||
if(_mi[_i][34]=="header"){if(_mi[_i][20])_mi[_i][8]=_mi[_i][20];
|
||||
if(_mi[_i][20])_mi[_i][7]=_mi[_i][21]}_bgc="";
|
||||
if(_mi[_i][7]=="transparent")_mi[_i][7]=_n;
|
||||
if(_mi[_i][7])_bgc="bgcolor="+_mi[_i][7];
|
||||
_fgc="";
|
||||
if(_mi[_i][8])_fgc="<font color="+_mi[_i][8]+">";
|
||||
_bgbc="";
|
||||
if(_mi[_i][5])_bgbc="bgcolor="+_mi[_i][5];
|
||||
_fgbc="";
|
||||
if(_mi[_i][6])_fgbc="<font color="+_mi[_i][6]+">";
|
||||
_algn="";
|
||||
if(_M[8])_algn=" align="+_M[8];
|
||||
if(_mi[_i][36])_algn=" align="+_mi[_i][36];
|
||||
if(_mi[_i][61])_algn=" valign="+_mi[_i][61];
|
||||
_nw="";
|
||||
if(!_M[4]&&!_mi[_i][55])_nw=" nowrap ";
|
||||
_iMS="";
|
||||
_iME="";
|
||||
if(_lnk){_iMS="<a href=\""+_lnk+"\" onMouseOver=\"set_status("+_i+");return true\">";
|
||||
_iME="</a>"}_Lsimg="";
|
||||
_Rsimg="";
|
||||
_LsimgO="";
|
||||
_RsimgO="";
|
||||
_itrs="";
|
||||
_itre="";
|
||||
if(_mi[_i][3]&&_mi[_i][24]){_subIR=0;
|
||||
if(_M[11]=="rtl")_subIR=1;
|
||||
_img=_iMS+"<img border=0 src="+_mi[_i][24]+">"+_iME;
|
||||
_oimg=_img;
|
||||
if(_mi[_i][48])_oimg=_iMS+"<img border=0 src="+_mi[_i][48]+">"+_iME;
|
||||
_simgP="";
|
||||
if(_mi[_i][22])_simgP=_mi[_i][22];
|
||||
_imps="";
|
||||
if(_mi[_i][23]){_iA="";
|
||||
_ivA="";
|
||||
_imP=_mi[_i][23].split(" ");
|
||||
for(_ia=0;
|
||||
_ia<_imP.length;
|
||||
_ia++){if(_imP[_ia]=="left")_subIR=1;
|
||||
if(_imP[_ia]=="right")_subIR=0;
|
||||
if(_imP[_ia]=="top"||_imP[_ia]=="bottom"||_imP[_ia]=="middle"){_ivA="valign="+_imP[_ia];
|
||||
if(_imP[_ia]=="top")_subIR=1;
|
||||
if(_imP[_ia]=="bottom")_subIR=0}if(_imP[_ia]=="center"){_itrs="<tr>";
|
||||
_itre="</tr>";
|
||||
_iA="align=center"}}_imps=_iA+" "+_ivA}_its=_itrs+"<td "+_imps+"><table border=0 cellspacing="+_simgP+" cellpadding=0><td>";
|
||||
_ite="</td></table></td>"+_itre;
|
||||
if(_subIR)_Lsimg=_its+_img+_ite;
|
||||
else _Rsimg=_its+_img+_ite;
|
||||
if(_subIR)_LsimgO=_its+_oimg+_ite;
|
||||
else _RsimgO=_its+_oimg+_ite}_Limg="";
|
||||
_Rimg="";
|
||||
_LimgO="";
|
||||
_RimgO="";
|
||||
if(_mi[_i][29]){_iA="";
|
||||
_ivA="";
|
||||
_imps="";
|
||||
_Iwid="";
|
||||
if(_mi[_i][37])_Iwid=" width="+_mi[_i][37];
|
||||
_Ihgt="";
|
||||
if(_mi[_i][38])_Ihgt=" height="+_mi[_i][38];
|
||||
_img=_iMS+"<img "+_Iwid+_Ihgt+" border=0 src="+_mi[_i][29]+">"+_iME;
|
||||
_oimg=_img;
|
||||
if(_mi[_i][32])_oimg=_iMS+"<img "+_Iwid+_Ihgt+" border=0 src="+_mi[_i][32]+">"+_iME;
|
||||
if(!_mi[_i][30])_mi[_i][30]="left";
|
||||
_imP=_mi[_i][30].split(" ");
|
||||
for(_ia=0;
|
||||
_ia<_imP.length;
|
||||
_ia++){if(_imP[_ia]=="left")_subIR=1;
|
||||
if(_imP[_ia]=="right")_subIR=0;
|
||||
if(_imP[_ia]=="top"||_imP[_ia]=="bottom"||_imP[_ia]=="middle"){_ivA="valign="+_imP[_ia];
|
||||
if(_mi[_i][3])_ivA+=" colspan=2";
|
||||
if(_imP[_ia]=="top")_subIR=1;
|
||||
if(_imP[_ia]=="bottom")_subIR=0}if(_imP[_ia]=="center"){_itrs="<tr>";
|
||||
_itre="</tr>";
|
||||
_iA="align=center"}}_imps=_iA+" "+_ivA;
|
||||
_its=_itrs+"<td "+_imps+"><table border=0 cellspacing=0 cellpadding=0><tr><td>";
|
||||
_ite="</td></tr></table></td>"+_itre;
|
||||
if(!_mi[_i][1]){_its="";
|
||||
_ite=""}if(_subIR)_Limg=_its+_img+_ite;
|
||||
else _Rimg=_its+_img+_ite;
|
||||
if(_subIR)_LimgO=_its+_oimg+_ite;
|
||||
else _RimgO=_its+_oimg+_ite}if(!_M[9]){_Tmt+="<tr>"}_Tmt+="<td class=item"+_i+">";
|
||||
_Tmt+="<ilayer id=il"+_i+">";
|
||||
_txt="";
|
||||
if(_mi[_i][1])_txt=_mi[_i][1];
|
||||
_acT="onmouseover=\"_popi("+_i+");clearTimeout(_MTF);_MTF=setTimeout('close_el("+_i+")',200);\";drag_drop('menu"+_Dmnu+"');";
|
||||
if(_mi[_i][34]=="dragable"){}if(_mi[_i][34]=="header")_acT="";
|
||||
_Tmt+="<layer id=el"+_i+" "+_acT+" width=100%>";
|
||||
_Tmt+="<div></div>";
|
||||
_Tmt+="<table "+_wid+" "+_bgc+" border=0 cellpadding=0 cellspacing=0 width=100%>";
|
||||
_Tmt+=_Limg;
|
||||
_Tmt+=_Lsimg;
|
||||
if(_txt){_Tmt+="<td width=100%><table border=0 cellpadding="+_pad+" cellspacing=0 width=100%><td "+_hgt+" "+_algn+_nw+" >";
|
||||
_Tmt+="<a href=\"\" class=item"+_i+" onMouseOver=\"set_status("+_i+");return true\">";
|
||||
_Tmt+=_fgc+_txt;
|
||||
_Tmt+="</a>";
|
||||
_Tmt+="</td></table></td>"}_Tmt+=_Rimg;
|
||||
_Tmt+=_Rsimg;
|
||||
_Tmt+="</table>";
|
||||
_Tmt+="</layer>";
|
||||
_Tmt+="<layer visibility=hide id=oel"+_i+" zindex=999 onMouseOver=\"clearTimeout(_MTF);_back2par("+_i+");nshl="+_i+";this.captureEvents(Event.MOUSEUP);this.onMouseUp=_lc;\" onMouseOut=\"close_el("+_i+")\"width=100%>";
|
||||
_Tmt+="<div></div>";
|
||||
_Tmt+="<table "+_wid+" "+_bgbc+" border=0 cellpadding=0 cellspacing=0 width=100%>";
|
||||
_Tmt+=_LimgO;
|
||||
_Tmt+=_LsimgO;
|
||||
if(_txt){_Tmt+="<td height=1 width=100%><table border=0 cellpadding="+_pad+" cellspacing=0 width=100%><td "+_hgt+" "+_algn+_nw+" >";
|
||||
_Tmt+="<a class=oitem"+_i+" href=\""+_lnk+"\" onMouseOver=\"set_status("+_i+");
|
||||
return true\">";
|
||||
_Tmt+=_fgbc+_txt;
|
||||
_Tmt+="</a>";
|
||||
_Tmt+="</td></table></td>"}_Tmt+=_RimgO;
|
||||
_Tmt+=_RsimgO;
|
||||
_Tmt+="</table>";
|
||||
_Tmt+="</layer>";
|
||||
_Tmt+="</ilayer>";
|
||||
_Tmt+="</td>";
|
||||
_hgt="";
|
||||
if(_M[18]){_hgt="height="+(_M[18]+6);
|
||||
_hgt="height=20"}_spd="";
|
||||
if(_mi[_i][51])_spd=_mi[_i][51];
|
||||
_sal="align=center";
|
||||
if(_mi[_i][52])_sal="align="+_mi[_i][52];
|
||||
_sbg="";
|
||||
if(_mi[_i][71])_sbg="background="+_mi[_i][71];
|
||||
if(!_M[9]){_Tmt+="</tr>";
|
||||
if((_i!=_M[0][_M[0].length-1])&&_mi[_i][27]>0){_swid="100%";
|
||||
if(_mi[_i][50])_swid=_mi[_i][50];
|
||||
if(_spd)_Tmt+="<tr><td height="+_spd+"></td></tr>";
|
||||
_Tmt+="<tr><td "+_sal+"><table cellpadding=0 cellspacing=0 border=0 width="+_swid+">";
|
||||
if(_mi[_i][16]&&_mi[_i][17]){_bwid=_mi[_i][27]/2;
|
||||
if(_bwid<1)_bwid=1;
|
||||
_Tmt+="<tr><td bgcolor="+_mi[_i][17]+">";
|
||||
_Tmt+="<spacer type=block height="+_bwid+"></td></tr>";
|
||||
_Tmt+="<tr><td bgcolor="+_mi[_i][16]+">";
|
||||
_Tmt+="<spacer type=block height="+_bwid+"></td></tr>"}else{_Tmt+="<td "+_sbg+" bgcolor="+_mi[_i][10]+">";
|
||||
_Tmt+="<spacer type=block height="+_mi[_i][27]+"></td>"}_Tmt+="</table></td></tr>";
|
||||
if(_spd)_Tmt+="<tr><td height="+_spd+"></td></tr>"}}else{if((_i!=_M[0][_M[0].length-1])&&_mi[_i][27]>0){_hgt="height=100%";
|
||||
if(_mi[_i][16]&&_mi[_i][17]){_bwid=_mi[_i][27]/2;
|
||||
if(_bwid<1)_bwid=1;
|
||||
_Tmt+="<td bgcolor="+_mi[_i][17]+"><spacer type=block "+_hgt+" width="+_bwid+"></td>";
|
||||
_Tmt+="<td bgcolor="+_mi[_i][16]+"><spacer type=block "+_hgt+" width="+_bwid+"></td>"}else{if(_spd)_Tmt+="<td><spacer type=block width="+_spd+"></td>";
|
||||
_Tmt+="<td "+_sbg+" bgcolor="+_mi[_i][10]+"><spacer type=block "+_hgt+" width="+_mi[_i][27]+"></td>";
|
||||
if(_spd)_Tmt+="<td><spacer type=block width="+_spd+"></td>"}}}return _Tmt
|
||||
}
|
||||
|
||||
function csto(_mnu)
|
||||
{_onTS=0;
|
||||
clearTimeout(_scrmt);
|
||||
clearTimeout(_oMT);
|
||||
_MT=setTimeout("closeAllMenus()",_menuCloseDelay)
|
||||
}
|
||||
|
||||
function followScroll(_mnu,_cycles,_rate)
|
||||
{if(!_startM){_M=_m[_mnu];
|
||||
_fogm=_M[22];
|
||||
_fgp=gpos(_fogm);
|
||||
if(_sT>_M[2]-_M[19])_tt=_sT-(_sT-_M[19]);
|
||||
else _tt=_M[2]-_sT;
|
||||
_tt+=_M[6][65];
|
||||
if((_fgp[0]-_sT)!=_tt){diff=_sT+_tt;
|
||||
if(diff-_fgp[0]<1)_rcor=_rate;
|
||||
else _rcor=-_rate;
|
||||
_nv=parseInt((diff-_rcor-_fgp[0])/_rate);
|
||||
if(_nv!=0)diff=_fgp[0]+_nv;
|
||||
spos(_fogm,diff);
|
||||
if(_fgp._tp)_M[19]=_fgp._tp;
|
||||
_fgp=gpos(_fogm);
|
||||
spos(gmobj("bord"+_mnu),_fgp[0]-_m[_mnu][6][65])}}_fS=setTimeout("followScroll(\""+_mnu+"\","+_cycles+","+_rate+")",_cycles)
|
||||
}
|
||||
|
||||
function _drawMenu(_mnu)
|
||||
{_mt="";
|
||||
_mcnt++;
|
||||
var _M=_m[_mnu];
|
||||
_ms=_m[_mnu][6];
|
||||
if(_M[9]=="horizontal")_M[9]=1;
|
||||
else _M[9]=0;
|
||||
_visi="";
|
||||
if(!_M[7])_visi="visibility=hide";
|
||||
_top="top=0";
|
||||
if(_M[2])_top="top="+_M[2];
|
||||
_left="left=0";
|
||||
if(_M[3])_left="left="+_M[3];
|
||||
if(_M[9]){_oldBel=_Bel;
|
||||
_d.write("<layer visibility=hide id=HT"+_mnu+"><table border=0 cellpadding=0 cellspacing=0>");
|
||||
for(_b=0;
|
||||
_b<_M[0].length;
|
||||
_b++){_d.write(drawItem(_Bel));
|
||||
_Bel++}_d.write("</table></layer>");
|
||||
_Bel=_oldBel;
|
||||
_gm=gmobj("HT"+_mnu);
|
||||
_M[18]=_gm.clip.height-6}_bImg="";
|
||||
if(_M[6][46])_bImg="background="+_M[6][46];
|
||||
if(_M[14]!="relative")_mt+="<layer zindex=999 "+_bImg+" onmouseout=\"close_menu()\" onmouseover=\"clearTimeout(_MT);\" id=menu"+_mnu+" "+_top+" "+_left+" "+_visi+">";_bgc="";if(_m[_mnu][6].offbgcolor=="transparent")_m[_mnu][6].offbgcolor=_n;if(_m[_mnu][6].offbgcolor)_bgc="bgcolor="+_m[_mnu][6].offbgcolor;_mrg=0;if(_M[12])_mrg=_M[12];_mt+="<table "+_bgc+" border=0 cellpadding="+_mrg+" cellspacing=0 >";_mt+="<td>";_mt+="<table width=1 border=0 cellpadding=0 cellspacing=0 "+_bgc+">";for(_b=0;_b<_M[0].length;_b++){_mt+=drawItem(_Bel);_Bel++}_mt+="</table>";_mt+="</td>";_mt+="</table>";if(_M[14]!="relative")_mt+="</layer>";_amt+=_mt;_d.write(_mt);_M[22]=gmobj("menu"+_mnu);if(_M[19]){_M[19]=_M[19].toString();_fs=_M[19].split(",");if(!_fs[1])_fs[1]=20;if(!_fs[2])_fs[2]=10;_M[19]=_fs[0];followScroll(_mnu,_fs[1],_fs[2])}if(_M[14]!="relative"){_st="";_brdsty="solid";if(_M[6].borderstyle)_brdsty=_M[6].borderstyle;if(_M[6][64])_brdsty=_M[6][64];_brdcol="#000000";if(_M[6].bordercolor)_brdcol=_M[6].bordercolor;if(_M[6][63])_brdcol=_M[6][63];_brdwid="";if(_M[6].borderwidth)_brdwid=_M[6].borderwidth;if(_M[6][65])_brdwid=_M[6][65];_M[6][65]=_brdwid;_st=".menu"+_mnu+"{";_st+="borderStyle:"+_brdsty+";";
|
||||
_st+="borderColor:"+_brdcol+";";
|
||||
_st+="borderWidth:"+_brdwid+";";
|
||||
if(_ms.fontsize)_st+="fontSize:"+2+";";
|
||||
_st+="}";
|
||||
_d.write("<style>"+_st+"</style>");
|
||||
_gm=gmobj("menu"+_mnu);
|
||||
_d.write("<layer visibility=hidden id=bord"+_mnu+" zindex=0 class=menu"+_mnu+"><table width="+(_gm.clip.width-6)+" height="+(_gm.clip.height-6)+"><td></td></table></layer>");
|
||||
if(_M[7]){_gm=gmobj("menu"+_mnu);
|
||||
_gm.zIndex=999;
|
||||
_gp=gpos(_gm);
|
||||
spos(_gm,_gp[0]+_M[6][65],_gp[1]+_M[6][65],_gp[2],_gp[3]);
|
||||
_gmb=gmobj("bord"+_mnu);
|
||||
_gmb.zIndex=0;
|
||||
spos(_gmb,_gp[0],_gp[1],_gp[2],_gp[3]);
|
||||
_gmb.visibility="show"}}else{}if(_m[_mnu][13]=="scroll"){_gm=gmobj("menu"+_mnu);
|
||||
_gm.fullHeight=_gm.clip.height;
|
||||
_scs=";
|
||||
this.bgColor='"+_m[_mnu][6].onbgcolor+"'\" onmouseout=\"csto("+_mnu+");
|
||||
this.bgColor='"+_m[_mnu][6].offbgcolor+"'\"";
|
||||
_scs+=" visibility=hide "+_bgc+" class=menu"+_mnu+"><table border=0 cellpadding=0 cellspacing=0 width="+(_gm.clip.width-6)+"><td align=center>";
|
||||
_sce="</td></table></layer>";
|
||||
_d.write("<layer id=tscroll"+_mnu+" onmouseover=\"_is("+_mnu+","+_scrollAmount+");"+_scs+"<img src=images/uparrow.gif>"+_sce);
|
||||
_d.write("<layer id=bscroll"+_mnu+" onmouseover=\"_is("+_mnu+",-"+_scrollAmount+");"+_scs+"<img src=images/uparrow.gif>"+_sce);
|
||||
_ts=gmobj("tscroll"+_mnu);
|
||||
_gm.tsHeight=_ts.clip.height;
|
||||
_ts=gmobj("bscroll"+_mnu);
|
||||
_gm.bsHeight=_ts.clip.height}
|
||||
}
|
||||
|
||||
function getMenuByItem(_gel)
|
||||
{_gel=_mi[_gel][0];
|
||||
if(_m[_gel][7])_gel=-1;
|
||||
return _gel
|
||||
}
|
||||
|
||||
function getParentMenuByItem(_gel)
|
||||
{_tm=getMenuByItem(_gel);
|
||||
if(_tm==-1)return-1;
|
||||
for(_x=0;
|
||||
_x<_mi.length;
|
||||
_x++){if(_mi[_x][3]==_m[_tm][1]){return _mi[_x][0]}}return-1
|
||||
}
|
||||
|
||||
function getParentItemByItem(_gel)
|
||||
{_tm=getMenuByItem(_gel);
|
||||
if(_tm==-1)return-1;
|
||||
for(_x=0;
|
||||
_x<_mi.length;
|
||||
_x++){if(_mi[_x][3]==_m[_tm][1]){return _x}}return-1
|
||||
}
|
||||
|
||||
function _setPath(_mpi)
|
||||
{if(_mpi>-1){_ci=_m[_mpi][21];
|
||||
while(_ci>-1){itemOn(_ci);
|
||||
_ci=_m[_mi[_ci][0]][21]}}
|
||||
}
|
||||
|
||||
function _back2par(_i)
|
||||
{if(_oldel>-1){if(_i==_m[_mi[_oldel][0]][21]){_popi(_i)}}
|
||||
}
|
||||
|
||||
function closeMenusByArray(_ar)
|
||||
{for(_a=0;
|
||||
_a<_ar.length;
|
||||
_a++){menuDisplay(_ar[_a],0)}
|
||||
}
|
||||
|
||||
function cm()
|
||||
{_tar=getMenusToClose();
|
||||
closeMenusByArray(_tar);
|
||||
for(_b=0;
|
||||
_b<_tar.length;
|
||||
_b++){if(_tar[_b]!=_mnu)_sm=remove(_sm,_tar[_b])}
|
||||
}
|
||||
|
||||
function getMenusToClose()
|
||||
{_st=-1;
|
||||
_en=_sm.length;
|
||||
_mm=_iP;
|
||||
if(_iP==-1){if(_sm[0]!=_masterMenu)return _sm;
|
||||
_mm=_masterMenu}for(_b=0;
|
||||
_b<_sm.length;
|
||||
_b++){if(_sm[_b]==_mm)_st=_b+1;
|
||||
if(_sm[_b]==_mnu)_en=_b}if(_st>-1&&_en>-1){_tsm=_sm.slice(_st,_en)}return _tsm
|
||||
}
|
||||
|
||||
function getMenuByName(_mname)
|
||||
{_mname=$tL(_mname);
|
||||
for(_gma=0;
|
||||
_gma<_m.length;
|
||||
_gma++){if(_mname==_m[_gma][1]){return _gma}}return-1
|
||||
}
|
||||
|
||||
function clearELs(_i)
|
||||
{_mnu=_mi[_i][0];
|
||||
for(_q=0;
|
||||
_q<_m[_mnu][0].length;
|
||||
_q++){gmobj("oel"+_m[_mnu][0][_q]).visibility="hide"}
|
||||
}
|
||||
|
||||
function menuDisplay(_mnu,_show)
|
||||
{_gm=gmobj("menu"+_mnu);
|
||||
_gmb=gmobj("bord"+_mnu);
|
||||
M_hideLayer(_mnu,_show);
|
||||
for(_q=0;
|
||||
_q<_m[_mnu][0].length;
|
||||
_q++){gmobj("oel"+_m[_mnu][0][_q]).visibility="hide"}if(_show){_gm.zIndex=_zi;
|
||||
_gm.visibility="show";
|
||||
_gmb.top=_gm.pageY-_m[_mnu][6][65];
|
||||
_gmb.left=_gm.pageX-_m[_mnu][6][65];
|
||||
_gmb.zIndex=_zi-1;
|
||||
_gmb.visibility="show";
|
||||
if(_el>-1)_m[_mnu][21]=_el;
|
||||
if(_m[_mnu][13]=="scroll"){if((_gm.clip.height>_bH)||_gm.nsDoScroll){_gi=gmobj("el"+_el);
|
||||
_tsm=gmobj("tscroll"+_mnu);
|
||||
_bsm=gmobj("bscroll"+_mnu);
|
||||
if(!_gm.scrollTop)_gm.top=_gm.top+_tsm.clip.height-1;
|
||||
else _gm.top=_gm.scrollTop;
|
||||
_gm.clip.height=_bH-(_gi.pageY+_gi.clip.height)-19;
|
||||
_gmb.clip.height=_gm.clip.height;
|
||||
_tsm.top=_gmb.top;
|
||||
_tsm.left=_gmb.left;
|
||||
_tsm.zIndex=_zi+1;
|
||||
_bsm.left=_gmb.left;
|
||||
_bsm.top=(_gmb.pageY+_gmb.clip.height)-_tsm.clip.height+_gm.tsHeight;
|
||||
_tsm.zIndex=_zi+1;
|
||||
_tsm.visibility="show";
|
||||
_bsm.zIndex=_zi+1;
|
||||
_bsm.visibility="show";
|
||||
_gm.nsDoScroll=1}}}else{if(!(_m[_mnu][7])){_gm.visibility="hide";
|
||||
_gmb.visibility="hide";
|
||||
if(_m[_mnu][13]=="scroll"){_tsm=gmobj("tscroll"+_mnu);
|
||||
_tsm.visibility="hide";
|
||||
_tsm=gmobj("bscroll"+_mnu);
|
||||
_tsm.visibility="hide"}}}
|
||||
}
|
||||
|
||||
function forceCloseAllMenus()
|
||||
{_cmo=gmobj("menu"+_mi[_cel][0]);
|
||||
if(!_cmo)_cmo=gmobj("oel"+_cel);
|
||||
for(_a=0;
|
||||
_a<_m.length;
|
||||
_a++){if(!_m[_a][7]&&!_m[_a][10])menuDisplay(_a,0)}_zi=999;
|
||||
_el=-1
|
||||
}
|
||||
|
||||
function closeAllMenus()
|
||||
{_cmo=gmobj("menu"+_mi[_cel][0]);
|
||||
if(!_cmo)_cmo=gmobj("oel"+_cel);
|
||||
if(!_onTS&&_cmo&&(MouseX>(_cmo.pageX+_cmo.clip.width)||MouseY>(_cmo.pageY+_cmo.clip.height)||MouseX<_cmo.pageX||MouseY<_cmo.pageY)){inopenmode=0;
|
||||
for(_ca=0;
|
||||
_ca<_m.length;
|
||||
_ca++){if(!_m[_ca][7]&&!_m[_ca][10])menuDisplay(_ca,0);
|
||||
if(_m[_ca][21]>-1){itemOff(_m[_ca][21]);
|
||||
_m[_ca][21]=-1}}_zi=999;
|
||||
_el=-1}
|
||||
}
|
||||
|
||||
function close_menu()
|
||||
{if(_el==-1)_MT=setTimeout("closeAllMenus()",_menuCloseDelay)
|
||||
}
|
||||
|
||||
function close_el(_i)
|
||||
{if(_mi[_i][43])eval(_mi[_i][43]);
|
||||
clearELs(_i);
|
||||
window.status="";
|
||||
clearTimeout(_oMT);
|
||||
_MT=setTimeout("closeAllMenus()",_menuCloseDelay);
|
||||
_el=-1;
|
||||
_oldel=_i
|
||||
}
|
||||
|
||||
function getParentMenuByItem(_gel)
|
||||
{_gel=_mi[_gel][0];
|
||||
if(_m[_gel][7])_gel=-1;
|
||||
return _gel
|
||||
}
|
||||
|
||||
function getParentItemByItem(_gel)
|
||||
{_par=getParentMenuByItem(_gel);
|
||||
for(_a=0;
|
||||
_a<_m[_par][0].length;
|
||||
_a++){if(_gel==_m[_par][0][_a]){return _m[_par][0]}}return false
|
||||
}
|
||||
|
||||
function getParentsByItem(_gmi)
|
||||
{
|
||||
}
|
||||
|
||||
function lc(_i)
|
||||
{if(_mi[_i]=="disabled")return;
|
||||
location.href=_mi[_i][2]
|
||||
}
|
||||
|
||||
function _is(_mnu,_SCRam)
|
||||
{_onTS=1;
|
||||
_cel=_m[_mnu][0][0];
|
||||
clearTimeout(_MT);
|
||||
clearTimeout(_scrmt);
|
||||
_doScroll(_mnu,_SCRam);
|
||||
_scrmt=setTimeout("_is("+_mnu+","+_SCRam+")",_scrollDelay)
|
||||
}
|
||||
|
||||
function _doScroll(_mnu,_SCRam){gm=gmobj("menu"+_mnu);
|
||||
if(_SCRam<0&&((gm.clip.top+gm.clip.height)>gm.fullHeight+gm.tsHeight+_SCRam))return;
|
||||
if(_SCRam>0&&gm.clip.top<_SCRam)return;
|
||||
gm.top=gm.top+_SCRam;
|
||||
gm.scrollTop=gm.top;
|
||||
gm.clip.top=gm.clip.top-_SCRam;
|
||||
gm.clip.height=gm.clip.height-_SCRam
|
||||
}
|
||||
|
||||
function set_status(_i)
|
||||
{if(_mi[_i][4]!=null){status=_mi[_i][4]}else{if(_mi[_i][2])status=_mi[_i][2];
|
||||
else status=""}
|
||||
}
|
||||
|
||||
function getOffsetValue(_ofs)
|
||||
{_ofsv=0;
|
||||
if(isNaN(_ofs)&&_ofs.indexOf("offset=")==0){_ofsv=parseInt(_ofs.substr(7,99))}return _ofsv
|
||||
}
|
||||
|
||||
function popup()
|
||||
{_sm=new Array;
|
||||
_arg=arguments;
|
||||
clearTimeout(_MT);
|
||||
clearTimeout(_oMT);
|
||||
if(_cel>-1)forceCloseAllMenus();
|
||||
if(_arg[0]){_ofMT=0;
|
||||
_mnu=getMenuByName(_arg[0]);
|
||||
_cel=_m[_mnu][0][0];
|
||||
_tos=0;
|
||||
if(_arg[2])_tos=_arg[2];
|
||||
_los=0;
|
||||
if(_arg[3])_los=_arg[3];
|
||||
_sm[_sm.length]=_mnu;
|
||||
if(_arg[1]){_gm=gmobj("menu"+_mnu);
|
||||
_gp=gpos(_gm);
|
||||
if(_arg[1]==1){if(MouseY+_gp[2]>(_bH)+_sT)_tos=-(MouseY+_gp[2]-_bH)+_sT;
|
||||
if(MouseX+_gp[3]>(_bW)+_sL)_los=-(MouseX+_gp[3]-_bW)+_sL;
|
||||
if(_m[_mnu][2]){if(isNaN(_m[_mnu][2]))_tos=getOffsetValue(_m[_mnu][2]);
|
||||
else{_tos=_m[_mnu][2];
|
||||
MouseY=0}}if(_m[_mnu][3]){if(isNaN(_m[_mnu][3]))_los=getOffsetValue(_m[_mnu][3]);
|
||||
else{_los=_m[_mnu][3];
|
||||
MouseX=0}}if(ns6&&!ns60){_los-=_sL;
|
||||
_tos-=_sT}spos(_gm,MouseY+_tos,MouseX+_los)}else{for(_a=0;
|
||||
_a<_d.images.length;
|
||||
_a++){if(_d.images[_a].name==_arg[1])_po=_d.images[_a]}spos(_gm,_po.y+_po.height+getOffsetValue(_m[_mnu][2]),_po.x+getOffsetValue(_m[_mnu][3]))}}menuDisplay(_mnu,1);
|
||||
_m[_mnu][21]=-1}
|
||||
}
|
||||
|
||||
function Opopup(_mn,_mp)
|
||||
{clearTimeout(_MT);
|
||||
closeAllMenus();
|
||||
if(_mn){_mnu=getMenuByName(_mn);
|
||||
_sm[_sm.length]=_mnu;
|
||||
menuDisplay(_mnu,1);
|
||||
_m[_mnu][21]=-1}
|
||||
}
|
||||
|
||||
function popdown()
|
||||
{_MT=setTimeout("closeAllMenus()",_menuCloseDelay)
|
||||
}
|
||||
|
||||
function _popi(_i)
|
||||
{_cel=_i;
|
||||
clearTimeout(_MT);
|
||||
clearTimeout(_cMT);
|
||||
clearTimeout(_oMT);
|
||||
if(_mi[_i][34]=="disabled")return;
|
||||
clearELs(_i);
|
||||
if(_oldel>-1)clearELs(_oldel);
|
||||
_mnu=-1;
|
||||
_el=_i;
|
||||
_itemRef=_i;
|
||||
_mopen=_mi[_i][3];
|
||||
horiz=0;
|
||||
if(_m[_mi[_i][0]][9])horiz=1;
|
||||
itemOn(_i);
|
||||
if(!_sm.length){_sm[_sm.length]=_mi[_i][0];
|
||||
_masterMenu=_mi[_i][0]}_iP=getParentMenuByItem(_el);
|
||||
if(_iP==-1)_masterMenu=_mi[_i][0];
|
||||
set_status(_el);
|
||||
_cMT=setTimeout("cm()",_menuOpenDelay);
|
||||
if(_mopen&&(!_mi[_el][39]||inopenmode)){_gel=gmobj("el"+_i);
|
||||
_gp=gpos(_gel);
|
||||
_mnu=getMenuByName(_mopen);
|
||||
if(_mi[_i][41])_m[_mnu][10]=1;
|
||||
if(_mnu>-1){_gp=gpos(_gel);
|
||||
_mnO=gmobj("menu"+_mnu);
|
||||
_mp=gpos(_mnO);
|
||||
if(horiz){_top=_gp[0]+_gp[2]+1;
|
||||
_left=_gp[1];
|
||||
if(_m[_mnu][11]=="rtl"){_left=_left-(_mp[3]-_gp[3])-_mi[_i][27]}if(_m[_mi[_i][0]][5]=="bottom"){_top=(_gp[0]-_mp[2])}}else{_top=_gp[0]+_subOffsetTop;
|
||||
_left=_gp[1]+_gp[3]+_subOffsetLeft;
|
||||
if(_m[_mnu][11]=="rtl"){_left=_gp[1]-_mp[3]-_subOffsetLeft}}if(_left<0)_left=0;
|
||||
if(_top<0)_top=0;
|
||||
if(_m[_mnu][2]){if(isNaN(_m[_mnu][2])&&_m[_mnu][2].indexOf("offset=")==0){_os=_m[_mnu][2].substr(7,99);
|
||||
_top=_top+parseInt(_os)}else{_top=_m[_mnu][2]}}if(_m[_mnu][3]){if(isNaN(_m[_mnu][3])&&_m[_mnu][3].indexOf("offset=")==0){_os=_m[_mnu][3].substr(7,99);
|
||||
_left=_left+parseInt(_os)}else{_left=_m[_mnu][3]}}if(_left+_mp[3]>_bW+_sL){if(!horiz&&(_gp[1]-_mp[3])>0){_left=_gp[1]-_mp[3]-_subOffsetLeft}else{_left=(_bW-_mp[3])-2}}if(!horiz&&_top+_mp[2]>_bH+_sT){_top=(_bH-_mp[2])-2}if(!horiz){_top=_top-_m[_mnu][6][65]}else{_top--;
|
||||
_left--}spos(_mnO,_top+_m[_mnu][6][65],_left+_m[_mnu][6][65]);
|
||||
if(_m[_mnu][5])_setPosition(_mnu);
|
||||
_zi++;
|
||||
_mnb=gmobj("bord"+_mnu);
|
||||
_oMT=setTimeout("menuDisplay("+_mnu+",1)",_menuOpenDelay);
|
||||
if(_sm[_sm.length-1]!=_mnu)_sm[_sm.length]=_mnu}}_setPath(_iP)
|
||||
}
|
||||
|
||||
function _setPosition(_mnu)
|
||||
{if(_m[_mnu][5]){_gm=gmobj("menu"+_mnu);
|
||||
_gp=gpos(_gm);
|
||||
_osl=0;
|
||||
_omnu3=0;
|
||||
if(isNaN(_m[_mnu][3])&&_m[_mnu][3].indexOf("offset=")==0){_omnu3=_m[_mnu][3];
|
||||
_m[_mnu][3]=_n;
|
||||
_osl=_omnu3.substr(7,99);
|
||||
_gm.leftOffset=_osl}_lft=_n;
|
||||
if(!_m[_mnu][3]){if(_m[_mnu][5].indexOf("left")!=-1)_lft=0;
|
||||
if(_m[_mnu][5].indexOf("center")!=-1)_lft=(_bW/2)-(_gp[3]/2);
|
||||
if(_m[_mnu][5].indexOf("right")!=-1)_lft=_bW-_gp[3];
|
||||
if(_gm.leftOffset)_lft=_lft+parseInt(_gm.leftOffset)}_ost=0;
|
||||
_omnu2=0;
|
||||
if(isNaN(_m[_mnu][2])&&_m[_mnu][2].indexOf("offset=")==0){_omnu2=_m[_mnu][2];
|
||||
_m[_mnu][2]=_n;
|
||||
_ost=_omnu2.substr(7,99);
|
||||
_gm.topOffset=_ost}_tp=_n;
|
||||
if(!_m[_mnu][2]>=0){_tp=_n;
|
||||
if(_m[_mnu][5].indexOf("top")!=-1)_tp=0;
|
||||
if(_m[_mnu][5].indexOf("middle")!=-1)_tp=(_bH/2)-(_gp[2]/2);
|
||||
if(_m[_mnu][5].indexOf("bottom")!=-1)_tp=_bH-_gp[2];
|
||||
if(_gm.topOffset)_tp=_tp+parseInt(_gm.topOffset)}if(_lft<0)_lft=0;
|
||||
spos(_gm,_tp,_lft);
|
||||
if(_m[_mnu][19])_m[_mnu][19]=_tp;
|
||||
if(_tp)_tp=_tp-_m[_mnu][6][65];
|
||||
if(_lft)_lft=_lft-_m[_mnu][6][65];
|
||||
_sb=gmobj("bord"+_mnu);
|
||||
spos(_sb,_tp,_lft);
|
||||
_gm._tp=_tp}
|
||||
}
|
||||
|
||||
function _MScan()
|
||||
{_bW=self.innerWidth-16;
|
||||
_bH=self.innerHeight-17;
|
||||
_sT=self.pageYOffset;
|
||||
if(_startM==1){for(_a=0;
|
||||
_a<_m.length;
|
||||
_a++){if(_m[_a][5]){_setPosition(_a)}}}else{if((_bH!=_oldbH)&&(_bW!=_oldbW)){location.reload()}}_startM=0;
|
||||
_oldbH=_bH;
|
||||
_oldbW=_bW}setInterval("_MScan()",200);
|
||||
|
||||
function getMouseXY(e)
|
||||
{
|
||||
MouseX=e.pageX;
|
||||
MouseY=e.pageY
|
||||
}
|
||||
|
||||
_d.captureEvents(Event.MOUSEMOVE);
|
||||
_d.onmousemove=getMouseXY;
|
12
lang/de/main.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
global $content;
|
||||
|
||||
// Global Stuff
|
||||
$content['LN_MAINTITLE'] = "Main PhpLogCon";
|
||||
$content['LN_MAIN_SELECTSTYLE'] = "Style auswählen";
|
||||
$content['LN_GEN_LANGUAGE'] = "Sprache auswählen";
|
||||
|
||||
// Index Site
|
||||
$content['LN_ERROR_INSTALLFILEREMINDER'] = "Warnung! Du hast das Installationsscript 'install.php' noch nicht aus dem UltraStats Hauptordner entfernt!";
|
||||
|
||||
?>
|
21
lang/en/main.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
global $content;
|
||||
|
||||
// Global Stuff
|
||||
$content['LN_MAINTITLE'] = "Main PhpLogCon";
|
||||
$content['LN_MAIN_SELECTSTYLE'] = "Select a Style";
|
||||
$content['LN_GEN_LANGUAGE'] = "Select language";
|
||||
|
||||
// Main Index Site
|
||||
$content['LN_ERROR_INSTALLFILEREMINDER'] = "Warning! You still have NOT removed the 'install.php' from your PhpLogCon main directory!";
|
||||
$content['LN_TOP_NUM'] = "No.";
|
||||
$content['LN_GRID_DATE'] = "Date";
|
||||
$content['LN_GRID_FACILITY'] = "Facility";
|
||||
$content['LN_GRID_SEVERITY'] = "Severity";
|
||||
$content['LN_GRID_SYSLOGTAG'] = "SyslogTag";
|
||||
$content['LN_GRID_INFOUNIT'] = "InfoUnit";
|
||||
$content['LN_GRID_HOST'] = "Source";
|
||||
$content['LN_GRID_MSG'] = "Message";
|
||||
|
||||
|
||||
?>
|
36
templates/include_footer.html
Normal file
@ -0,0 +1,36 @@
|
||||
<br><br>
|
||||
|
||||
<table width="100%" border="0" cellspacing="1" cellpadding="0" class="mainfooter">
|
||||
<tr>
|
||||
<td align="center" class="line0">Created 2008 - By <a href="http://www.adiscon.com" target="_blank">Adiscon GmbH</a></td>
|
||||
<td align="center" class="line1">
|
||||
<a href="http://www.phplogcon.org" target="_blank">PhpLogCon</A> Version {BUILDNUMBER}
|
||||
</td>
|
||||
<td align="center" class="line0">
|
||||
<B>Partners:</B>
|
||||
</td>
|
||||
<td align="center" class="line1">
|
||||
<a href="http://www.rsyslog.com" target="_blank">RSyslog</a> |
|
||||
<a href="http://www.winsyslog.com" target="_blank">WinSyslog</a>
|
||||
</td>
|
||||
<!-- IF ShowPageRenderStats="true" -->
|
||||
<td align="center" class="line2">
|
||||
Page rendered in <B>{PAGERENDERTIME}</B> seconds
|
||||
| Total DB Queries <B>{TOTALQUERIES}</B>
|
||||
</td>
|
||||
<!-- ENDIF ShowPageRenderStats="true" -->
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td colspan="2" background="themes/{user_theme}/images/bg_bottom.gif" height="16"><img src="themes/{user_theme}/images/bg_bottom.gif" height="16"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
83
templates/include_header.html
Normal file
@ -0,0 +1,83 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>{TITLE}</title>
|
||||
{EXTRA_METATAGS}
|
||||
|
||||
<link rel="stylesheet" href="css/defaults.css" type="text/css">
|
||||
<link rel="stylesheet" href="themes/{user_theme}/main.css" type="text/css">
|
||||
<script type='text/javascript' src='{BASEPATH}js/common.js'></script>
|
||||
</head>
|
||||
<body TOPMARGIN="0" LEFTMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">
|
||||
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="mainheader">
|
||||
<tr>
|
||||
<td rowspan="4" width="500" align="left" valign="top"><a href="index.php"><img src="{BASEPATH}images/main/Header-Logo.png" width="500" height="79" name="HeaderLogo"></a></td>
|
||||
<td width="100%" align="center" valign="top" height="20">
|
||||
|
||||
<form action="userchange.php" method="get" name="styleidform">
|
||||
<table width="250" border="0" cellspacing="0" cellpadding="0" class="with_border" align="right">
|
||||
<tr>
|
||||
<td class="cellmenu1" nowrap><B> {LN_MAIN_SELECTSTYLE} </B></td>
|
||||
<td align="right">
|
||||
<input type="hidden" name="op" value="changestyle">
|
||||
<select name="stylename" size="1" OnChange="document.styleidform.submit();">
|
||||
<!-- BEGIN USERSTYLES -->
|
||||
<option {is_selected} value="{StyleName}">{StyleName}</option>
|
||||
<!-- END USERSTYLES -->
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
</td>
|
||||
<td rowspan="4" width="10" align="center" nowrap> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="100%" align="center" valign="top" height="20">
|
||||
|
||||
<form action="userchange.php" method="get" name="langidform">
|
||||
<table width="250" border="0" cellspacing="0" cellpadding="0" class="with_border" align="right">
|
||||
<tr>
|
||||
<td class="cellmenu1" nowrap><B> {LN_GEN_LANGUAGE} </B></td>
|
||||
<td align="right">
|
||||
<input type="hidden" name="op" value="changelang">
|
||||
<select name="langcode" size="1" OnChange="document.langidform.submit();">
|
||||
<!-- BEGIN USERLANG -->
|
||||
<option {is_selected} value="{langcode}">{langcode}</option>
|
||||
<!-- END USERLANG -->
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="100%" align="center" valign="top" height="20">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="100%" align="center" valign="top" height="100%"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_with_border">
|
||||
<tr>
|
||||
<td><!-- INCLUDE include_menu.html --></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_with_border">
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
<!-- IF error_installfilereminder="true" -->
|
||||
<center>
|
||||
<h3><br><br><font color="red">{LN_ERROR_INSTALLFILEREMINDER}</font></h3>
|
||||
</center>
|
||||
<!-- ENDIF error_installfilereminder="true" -->
|
32
templates/include_index_globals.html
Normal file
@ -0,0 +1,32 @@
|
||||
<table width="100%" cellpadding="1" cellspacing="0" border="0" align="center">
|
||||
<tr>
|
||||
<td class="title" width="350" nowrap>{LN_GLOBAL_STATS}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="1" border="0" align="center" class="with_border_alternate">
|
||||
<tr>
|
||||
<td class="line1" valign="top"><img src="{BASEPATH}images/main/ultrastatslogo.png" width="300" height="200" align="center"></td>
|
||||
<td class="line1" valign="top">
|
||||
<br>
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" class="with_border">
|
||||
<tr>
|
||||
<td class="cellmenu1" width="135" align="center" nowrap><B>{LN_GLOBAL_LASTUPDATE}</B></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="line1" align="center"><B>{global_lastupdate_TimeFormat}</B></td>
|
||||
</tr>
|
||||
|
||||
<!-- BEGIN GLOBALTOTALS -->
|
||||
<tr>
|
||||
<td class="cellmenu1" width="135" align="center" nowrap><B>{DisplayName}</B></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="line1" align="center"><B>{VALUE_INT}</B></td>
|
||||
</tr>
|
||||
<!-- END GLOBALTOTALS -->
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
12
templates/include_menu.html
Normal file
@ -0,0 +1,12 @@
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td class="topmenu1" nowrap align="center" width="100"><a class="topmenu1_link" href="" target="_top">Home</a></td>
|
||||
<td class="topmenu1" nowrap align="center" width="100"><a class="topmenu1_link" href="" target="_top">Show Events</a></td>
|
||||
<td class="topmenu1" nowrap align="center" width="125"><a class="topmenu1_link" href="" target="_top">Show SysLogTags</a></td>
|
||||
<td class="topmenu1" nowrap align="center" width="100"><a class="topmenu1_link" href="" target="_top">User Options</a></td>
|
||||
<td class="topmenu1" nowrap align="center" width="125"><a class="topmenu1_link" href="" target="_top">Database Options</a></td>
|
||||
<td class="topmenu1" nowrap align="center" width="100"><a class="topmenu1_link" href="" target="_top">Refresh</a></td>
|
||||
<td class="topmenu1" nowrap align="center" width="100"><a class="topmenu1_link" href="" target="_top">Help</a></td>
|
||||
<td class="topmenuend" nowrap align="center" width="max"> </td>
|
||||
</tr>
|
||||
</table>
|
66
templates/index.html
Normal file
@ -0,0 +1,66 @@
|
||||
<!-- INCLUDE include_header.html -->
|
||||
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td class="topmenu2" nowrap align="center" width="100"><a class="topmenu1_link" href="#" OnClick="togglevisibility('FilterOptions');">Filter Options</a></td>
|
||||
<td class="topmenu2end" nowrap align="center" width="max"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<div id="FilterOptions">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0" align="center" class="with_border">
|
||||
<tr>
|
||||
<td colspan="3" class="cellmenu1" nowrap><B>Filter Options</B></td>
|
||||
<tr>
|
||||
<td width="10" valign="top" nowrap> </td>
|
||||
<td width="100%" valign="top">
|
||||
|
||||
</td>
|
||||
<td width="10" valign="top" nowrap> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0" align="center" class="with_border">
|
||||
<tr>
|
||||
<td colspan="3" class="title" nowrap><B>Recent syslog messages</B></td>
|
||||
<tr>
|
||||
<td width="100%" valign="top">
|
||||
|
||||
<!-- IF syslogmessagesenabled="true" -->
|
||||
<table width="100%" cellpadding="0" cellspacing="1" border="0" align="center" class="with_border_alternate">
|
||||
<tr>
|
||||
<td width="25" class="cellmenu1" align="center" nowrap><B>{LN_TOP_NUM}</B></td>
|
||||
<td width="100" class="cellmenu1" align="center" nowrap><A HREF="?sorting={additional_url}" class="cellmenu1_link" >{LN_GRID_DATE}</A></td>
|
||||
<td width="50" class="cellmenu1" align="center" nowrap><A HREF="?sorting={additional_url}" class="cellmenu1_link" >{LN_GRID_FACILITY}</A></td>
|
||||
<td width="50" class="cellmenu1" align="center" nowrap><A HREF="?sorting={additional_url}" class="cellmenu1_link" >{LN_GRID_SEVERITY}</A></td>
|
||||
<td width="50" class="cellmenu1" align="center" nowrap><A HREF="?sorting={additional_url}" class="cellmenu1_link" >{LN_GRID_SYSLOGTAG}</A></td>
|
||||
<td width="75" class="cellmenu1" align="center" nowrap><A HREF="?sorting={additional_url}" class="cellmenu1_link" >{LN_GRID_INFOUNIT}</A></td>
|
||||
<td width="50" class="cellmenu1" align="center" nowrap><A HREF="?sorting={additional_url}" class="cellmenu1_link" >{LN_GRID_HOST}</A></td>
|
||||
<td width="100%" class="cellmenu1" align="center" nowrap><B>{LN_GRID_MSG}</B></td>
|
||||
</tr>
|
||||
|
||||
<!-- BEGIN syslogmessages -->
|
||||
<tr>
|
||||
<td align="right" class="{cssclass}"><B>{ZAEHLER}</B></td>
|
||||
<td align="center" class="{cssclass}"><B>{timereported}</B></td>
|
||||
<td align="left" class="{cssclass}"><B>{syslogfacility-text}</B></td>
|
||||
<td align="left" class="{cssclass}"><B>{syslogseverity-text}</B></td>
|
||||
<td align="left" class="{cssclass}"><B>{FROMHOST}</B></td>
|
||||
<td align="left" class="{cssclass}"><B>{syslogtag}</B></td>
|
||||
<td align="center" class="{cssclass}"><B>{IUT}</B></td>
|
||||
<td align="left" class="{cssclass}"><B>{msg}</B></td>
|
||||
</tr>
|
||||
<!-- END syslogmessages -->
|
||||
|
||||
</table>
|
||||
<!-- ENDIF syslogmessagesenabled="true" -->
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<!-- INCLUDE include_footer.html -->
|
BIN
themes/dark/images/bg_bottom.gif
Normal file
After Width: | Height: | Size: 141 B |
BIN
themes/dark/images/dither.png
Normal file
After Width: | Height: | Size: 193 B |
351
themes/dark/main.css
Normal file
@ -0,0 +1,351 @@
|
||||
/* Generell Tag Classes */
|
||||
BODY
|
||||
{
|
||||
FONT-FAMILY: ARIAL;
|
||||
FONT-SIZE: 8pt;
|
||||
BACKGROUND: #000000;
|
||||
COLOR: #F3F3F1;
|
||||
|
||||
scrollbar-face-color: #475059;
|
||||
scrollbar-highlight-color: #b8c2cc;
|
||||
scrollbar-shadow-color: #b8c2cc;
|
||||
scrollbar-3dlight-color: #000000;
|
||||
scrollbar-arrow-color: #f2f5ff;
|
||||
scrollbar-track-color: #262d34;
|
||||
scrollbar-darkshadow-color: #000000;
|
||||
}
|
||||
|
||||
TD { font-family: Arial, Helvetica, sans-serif; font-size: 8pt; color: #F3F3F1 }
|
||||
|
||||
/* Link Classes */
|
||||
.playerlink { color:#006699; cursor:hand; }
|
||||
.playerlink:hover { color:#FF0A0C; text-decoration: none; cursor:hand; }
|
||||
|
||||
/* Default Link Classes */
|
||||
a:link,a:active,a:visited,a.postlink
|
||||
{
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-weight:bold;
|
||||
background-color: transparent;
|
||||
color:#FFD323;
|
||||
text-decoration:none;
|
||||
}
|
||||
a:hover
|
||||
{
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-weight:bold;
|
||||
color:#EF9A00;
|
||||
}
|
||||
|
||||
img
|
||||
{
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
/* Title Classes */
|
||||
.title
|
||||
{
|
||||
font: bold 11px Verdana, Arial, Helvetica, sans-serif;
|
||||
BACKGROUND-COLOR: #1C1014;
|
||||
COLOR: #E5F377;
|
||||
border: 1px solid;
|
||||
border-color: #58363E #2C1B1F #2C1B1F #58363E;
|
||||
height: 20px;
|
||||
text-align:center;
|
||||
vertical-align:middle;
|
||||
}
|
||||
A.title, A.title:active, A.title:visited
|
||||
{
|
||||
font: bold 11px Verdana, Arial, Helvetica, sans-serif;
|
||||
COLOR: #dd6900;
|
||||
TEXT-DECORATION: none;
|
||||
}
|
||||
A.title:hover
|
||||
{
|
||||
font: bold 11px Verdana, Arial, Helvetica, sans-serif;
|
||||
COLOR: #FF0A0C;
|
||||
TEXT-DECORATION: none;
|
||||
}
|
||||
|
||||
/* Default Font Classes */
|
||||
font
|
||||
{
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 8pt;
|
||||
}
|
||||
|
||||
/* Table / Border Classes */
|
||||
.table_with_border
|
||||
{
|
||||
background-color:#141618;
|
||||
border:1px solid;
|
||||
border-color: #290604 #0E0706 #000000 #290604;
|
||||
}
|
||||
|
||||
.table_with_border_second
|
||||
{
|
||||
background-color:#19232D;
|
||||
border:1px solid;
|
||||
border-color: #050A0F #050A0F #050A0F #050A0F;
|
||||
}
|
||||
|
||||
.with_border
|
||||
{
|
||||
text-indent:3px;
|
||||
background-color:#1C2021;
|
||||
border:1px #050A0F solid;
|
||||
}
|
||||
|
||||
.with_border_alternate
|
||||
{
|
||||
text-indent:3px;
|
||||
background-color:#1C2021;
|
||||
border:1px #07233F ridge;
|
||||
}
|
||||
|
||||
.mainheader
|
||||
{
|
||||
border:1px solid;
|
||||
background-color:#1C2021;
|
||||
border-color: #006699 #07233F #000000 #006699;
|
||||
}
|
||||
|
||||
.mainfooter
|
||||
{
|
||||
height: 20px;
|
||||
background-color:#1C2021;
|
||||
border-top: #050A0F 1px solid;
|
||||
border-bottom: #050A0F 1px solid;
|
||||
}
|
||||
|
||||
.imageborder
|
||||
{
|
||||
border:1px solid;
|
||||
border-color: #050A0F #353A3F #353A3F #050A0F;
|
||||
}
|
||||
|
||||
/* Cells for listening */
|
||||
.line0
|
||||
{
|
||||
font-size: 8pt;
|
||||
color: #B9B597;
|
||||
background-color: #0E161F;
|
||||
}
|
||||
.line0:hover
|
||||
{
|
||||
background-color:#3D4751;
|
||||
}
|
||||
|
||||
.line1
|
||||
{
|
||||
font-size: 8pt;
|
||||
color: #B9B597;
|
||||
background-color: #152331;
|
||||
}
|
||||
.line1:hover
|
||||
{
|
||||
background-color:#3D4751;
|
||||
}
|
||||
|
||||
.line2
|
||||
{
|
||||
font-size: 8pt;
|
||||
color: #B9B597;
|
||||
background-color: #1D3043;
|
||||
}
|
||||
.line2:hover
|
||||
{
|
||||
background-color:#3D4751;
|
||||
}
|
||||
|
||||
.line_alt0
|
||||
{
|
||||
font-size: 8pt;
|
||||
color: #000000;
|
||||
background-color: #AAAAAA;
|
||||
background-image: url("images/dither.png");
|
||||
}
|
||||
.line_alt0:hover
|
||||
{
|
||||
background-color:#F9F9F9;
|
||||
background-image: url("images/dither.png");
|
||||
}
|
||||
|
||||
.line_alt1
|
||||
{
|
||||
font-size: 8pt;
|
||||
color: #000000;
|
||||
background-color: #DDDDDD;
|
||||
background-image: url("images/dither.png");
|
||||
}
|
||||
.line_alt1:hover
|
||||
{
|
||||
background-color:#F9F9F9;
|
||||
background-image: url("images/dither.png");
|
||||
}
|
||||
|
||||
/* TOP Menu Classes */
|
||||
.topmenu1
|
||||
{
|
||||
height: 16px;
|
||||
border:1px ridge;
|
||||
border-color: #D79993 #290604 #290604 #D79993;
|
||||
|
||||
font: 10px Verdana, Arial, Helvetica, sans-serif;
|
||||
color: #FFFFFF;
|
||||
background-color: #38110E;
|
||||
}
|
||||
.topmenu1:hover
|
||||
{
|
||||
color: #FFFF99;
|
||||
background-color: #492D2B;
|
||||
text-decoration: none;
|
||||
}
|
||||
.topmenu1_link, A.topmenu1_link
|
||||
{
|
||||
color: #FFDD22;
|
||||
}
|
||||
.topmenu1_link:hover, A.topmenu1_link:hover
|
||||
{
|
||||
color: #FFFF99;
|
||||
text-decoration: none;
|
||||
}
|
||||
.topmenuend
|
||||
{
|
||||
height: 16px;
|
||||
font: 10px Verdana, Arial, Helvetica, sans-serif;
|
||||
color: #FFFFFF;
|
||||
background-color: #290604;
|
||||
}
|
||||
|
||||
/* Cell Columns */
|
||||
.cellmenu1
|
||||
{
|
||||
height: 15px;
|
||||
border:1px solid;
|
||||
border-color: #353A3F #050A0F #050A0F #353A3F;
|
||||
|
||||
text-indent:5px;
|
||||
font: 10px Verdana, Arial, Helvetica, sans-serif;
|
||||
color: #FFFCE5;
|
||||
background-color: #103B65;
|
||||
}
|
||||
.cellmenu1:hover
|
||||
{
|
||||
color: #FFFF33;
|
||||
text-decoration: none;
|
||||
}
|
||||
A.cellmenu1_link
|
||||
{
|
||||
color: #FFFF33;
|
||||
text-decoration: underline;
|
||||
}
|
||||
A.cellmenu1_link:hover
|
||||
{
|
||||
color: #FF5500;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.cellmenu2
|
||||
{
|
||||
height: 16px;
|
||||
border:1px ridge;
|
||||
border-color: #7777AA #12161A #12161A #7777AA;
|
||||
|
||||
text-indent:5px;
|
||||
font: 10px Verdana, Arial, Helvetica, sans-serif;
|
||||
color: #FFFCE5;
|
||||
background-color: #053841;
|
||||
}
|
||||
.cellmenu2:hover
|
||||
{
|
||||
color: #FFFF33;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* Usefull Text Classes */
|
||||
.ErrorMsg
|
||||
{
|
||||
font: bold 12px Verdana, Arial, Helvetica, sans-serif;
|
||||
COLOR: #FF2222;
|
||||
border-top: 1px solid;
|
||||
border-bottom: 1px solid;
|
||||
border-color: #58363E;
|
||||
}
|
||||
.PriorityEmergency
|
||||
{
|
||||
color: #FFFFFF;
|
||||
background-color: #ff4444;
|
||||
border-top: black 1px solid;
|
||||
border-bottom: black 1px solid;
|
||||
border-right: gray 1px solid;
|
||||
}
|
||||
.PriorityAlert
|
||||
{
|
||||
color: #FFFFFF;
|
||||
background-color: #dd00dd;
|
||||
border-top: black 1px solid;
|
||||
border-bottom: black 1px solid;
|
||||
border-right: gray 1px solid;
|
||||
}
|
||||
.PriorityCrit
|
||||
{
|
||||
color: #FFFFFF;
|
||||
background-color: #dd9900;
|
||||
border-top: black 1px solid;
|
||||
border-bottom: black 1px solid;
|
||||
border-right: gray 1px solid;
|
||||
}
|
||||
.PriorityError
|
||||
{
|
||||
color: #FFFFFF;
|
||||
background-color: #CC0000;
|
||||
border-top: black 1px solid;
|
||||
border-bottom: black 1px solid;
|
||||
border-right: gray 1px solid;
|
||||
}
|
||||
.PriorityWarning
|
||||
{
|
||||
color: #FFFFFF;
|
||||
background-color: #FFAA00;
|
||||
border-top: black 1px solid;
|
||||
border-bottom: black 1px solid;
|
||||
border-right: gray 1px solid;
|
||||
}
|
||||
.PriorityNotice
|
||||
{
|
||||
color: #FFFFFF;
|
||||
background-color: #66CC33;
|
||||
border-top: black 1px solid;
|
||||
border-bottom: black 1px solid;
|
||||
border-right: gray 1px solid;
|
||||
}
|
||||
.PriorityInfo
|
||||
{
|
||||
color: #000000;
|
||||
background-color: #ABF1FF;
|
||||
border-top: black 1px solid;
|
||||
border-bottom: black 1px solid;
|
||||
border-right: gray 1px solid;
|
||||
}
|
||||
.PriorityDebug
|
||||
{
|
||||
color: #FFFFFF;
|
||||
background-color: #3333ff;
|
||||
border-top: black 1px solid;
|
||||
border-bottom: black 1px solid;
|
||||
border-right: gray 1px solid;
|
||||
}
|
||||
|
||||
/* Form elements */
|
||||
select, input, textarea
|
||||
{
|
||||
background-color: #0B253C;
|
||||
color:#FFFFFF;
|
||||
font:bold 10px Verdana,Arial,Helvetica,sans-serif;
|
||||
border: 1px solid;
|
||||
border-color: #233B51 #124A7C #124A7C #233B51;
|
||||
}
|
||||
|
||||
|
||||
|
BIN
themes/default/images/bg_bottom.gif
Normal file
After Width: | Height: | Size: 117 B |
BIN
themes/default/images/dither.png
Normal file
After Width: | Height: | Size: 184 B |
383
themes/default/main.css
Normal file
@ -0,0 +1,383 @@
|
||||
/* Generell Tag Classes */
|
||||
BODY
|
||||
{
|
||||
BACKGROUND-COLOR: #f9f9f9;
|
||||
COLOR: #000000;
|
||||
FONT-FAMILY: ARIAL;
|
||||
FONT-SIZE: 8pt;
|
||||
|
||||
scrollbar-face-color: #DEE3E7;
|
||||
scrollbar-highlight-color: #FFFFFF;
|
||||
scrollbar-shadow-color: #DEE3E7;
|
||||
scrollbar-3dlight-color: #D1D7DC;
|
||||
scrollbar-arrow-color: #006699;
|
||||
scrollbar-track-color: #EFEFEF;
|
||||
scrollbar-darkshadow-color: #98AAB1
|
||||
}
|
||||
|
||||
TD { font-family: Arial, Helvetica, sans-serif; font-size: 8pt; color: #000000 }
|
||||
|
||||
/* Link Classes */
|
||||
.playerlink { color:#000000; cursor:hand; }
|
||||
.playerlink:hover { color:#000099; text-decoration: none; cursor:hand; }
|
||||
|
||||
/* Default Link Classes */
|
||||
a:link,a:active,a:visited,a.postlink
|
||||
{
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-weight:bold;
|
||||
background-color: transparent;
|
||||
color:#38140E;
|
||||
text-decoration:none;
|
||||
}
|
||||
a:hover
|
||||
{
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-weight:bold;
|
||||
color:#FF0000;
|
||||
}
|
||||
|
||||
img
|
||||
{
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
/* Title Classes */
|
||||
.title
|
||||
{
|
||||
FONT: bold 11px Verdana, Arial, Helvetica, sans-serif;
|
||||
BACKGROUND-COLOR: #D2C598;
|
||||
COLOR: #032D5D;
|
||||
border: 1px solid;
|
||||
border-color: #ACBED6 #3B679B #3B679B #ACBED6;
|
||||
height: 20px;
|
||||
text-align:center;
|
||||
vertical-align:middle;
|
||||
}
|
||||
A.title, A.title:active, A.title:visited
|
||||
{
|
||||
FONT: bold 11px Verdana, Arial, Helvetica, sans-serif;
|
||||
COLOR: #ED9D10;
|
||||
TEXT-DECORATION: none;
|
||||
}
|
||||
A.title:hover
|
||||
{
|
||||
FONT: bold 11px Verdana, Arial, Helvetica, sans-serif;
|
||||
COLOR: #982D00;
|
||||
TEXT-DECORATION: none;
|
||||
}
|
||||
|
||||
/* Default Font Classes */
|
||||
font
|
||||
{
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 8pt;
|
||||
}
|
||||
|
||||
/* Table / Border Classes */
|
||||
.table_with_border
|
||||
{
|
||||
background-color:#EEF2F6;
|
||||
border:1px solid;
|
||||
border-color: #CCCCCC #000000 #000000 #CCCCCC;
|
||||
}
|
||||
|
||||
.table_with_border_second
|
||||
{
|
||||
background-color:#D5E0E7;
|
||||
border:1px solid;
|
||||
border-color: #CCCCCC #000000 #000000 #CCCCCC;
|
||||
}
|
||||
|
||||
.with_border
|
||||
{
|
||||
text-indent:3px;
|
||||
background-color:#CCCCCC;
|
||||
border:1px #AAAAAA solid;
|
||||
}
|
||||
|
||||
.with_border_alternate
|
||||
{
|
||||
text-indent:3px;
|
||||
background-color:#CCCCCC;
|
||||
border:1px #AAAAAA ridge;
|
||||
}
|
||||
|
||||
.mainheader
|
||||
{
|
||||
border:1px solid;
|
||||
background-color:#C7CBD1;
|
||||
border-color: #44617D #203040 #203040 #44617D;
|
||||
}
|
||||
|
||||
.mainfooter
|
||||
{
|
||||
height: 20px;
|
||||
background-color:#DDDDDD;
|
||||
border-top: #97A8B9 1px solid;
|
||||
border-bottom: #6592BD 1px solid;
|
||||
}
|
||||
|
||||
.imageborder
|
||||
{
|
||||
border:1px solid;
|
||||
border-color: #44617D #203040 #203040 #44617D;
|
||||
}
|
||||
|
||||
/* Cells for listening */
|
||||
.line0
|
||||
{
|
||||
font-size: 8pt;
|
||||
color: #000000;
|
||||
background-color: #DDDDDD;
|
||||
}
|
||||
.line0:hover
|
||||
{
|
||||
background-color:#F9F9F9;
|
||||
}
|
||||
|
||||
.line1
|
||||
{
|
||||
font-size: 8pt;
|
||||
color: #000000;
|
||||
background-color: #EEEEEE;
|
||||
}
|
||||
.line1:hover
|
||||
{
|
||||
background-color:#F9F9F9;
|
||||
}
|
||||
|
||||
.line2
|
||||
{
|
||||
font-size: 8pt;
|
||||
color: #000000;
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
.line2:hover
|
||||
{
|
||||
background-color:#F9F9F9;
|
||||
}
|
||||
|
||||
.line_alt0
|
||||
{
|
||||
font-size: 8pt;
|
||||
color: #000000;
|
||||
background-color: #AAAAAA;
|
||||
background-image: url("images/dither.png");
|
||||
}
|
||||
.line_alt0:hover
|
||||
{
|
||||
background-color:#F9F9F9;
|
||||
background-image: url("images/dither.png");
|
||||
}
|
||||
|
||||
.line_alt1
|
||||
{
|
||||
font-size: 8pt;
|
||||
color: #000000;
|
||||
background-color: #DDDDDD;
|
||||
background-image: url("images/dither.png");
|
||||
}
|
||||
.line_alt1:hover
|
||||
{
|
||||
background-color:#F9F9F9;
|
||||
background-image: url("images/dither.png");
|
||||
}
|
||||
|
||||
/* TOP Menu Classes */
|
||||
.topmenu1
|
||||
{
|
||||
height: 16px;
|
||||
border:1px ridge;
|
||||
border-color: #79AABE #09506C #09506C #79AABE;
|
||||
|
||||
font: 10px Verdana, Arial, Helvetica, sans-serif;
|
||||
color: #FFFFFF;
|
||||
background-color: #597196;
|
||||
}
|
||||
.topmenu1:hover
|
||||
{
|
||||
color: #FFFF99;
|
||||
background-color: #6A88B8;
|
||||
text-decoration: none;
|
||||
}
|
||||
.topmenu1_link, A.topmenu1_link
|
||||
{
|
||||
color: #FFDD22;
|
||||
}
|
||||
.topmenu1_link:hover, A.topmenu1_link:hover
|
||||
{
|
||||
color: #FFFF99;
|
||||
text-decoration: none;
|
||||
}
|
||||
.topmenuend
|
||||
{
|
||||
height: 16px;
|
||||
font: 10px Verdana, Arial, Helvetica, sans-serif;
|
||||
color: #FFFFFF;
|
||||
background-color: #597196;
|
||||
}
|
||||
.topmenu2
|
||||
{
|
||||
height: 16px;
|
||||
border:1px ridge;
|
||||
border-color: #79AABE #09506C #09506C #79AABE;
|
||||
|
||||
font: 10px Verdana, Arial, Helvetica, sans-serif;
|
||||
color: #FFFFFF;
|
||||
background-color: #597196;
|
||||
}
|
||||
.topmenu2:hover
|
||||
{
|
||||
color: #FFFF99;
|
||||
background-color: #6A88B8;
|
||||
text-decoration: none;
|
||||
}
|
||||
.topmenu2_link, A.topmenu2_link
|
||||
{
|
||||
color: #FFDD22;
|
||||
}
|
||||
.topmenu2_link:hover, A.topmenu2_link:hover
|
||||
{
|
||||
color: #FFFF99;
|
||||
text-decoration: none;
|
||||
}
|
||||
.topmenu2end
|
||||
{
|
||||
height: 16px;
|
||||
font: 10px Verdana, Arial, Helvetica, sans-serif;
|
||||
color: #FFFFFF;
|
||||
background-color: #597196;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Cell Columns */
|
||||
.cellmenu1
|
||||
{
|
||||
height: 16px;
|
||||
border:1px ridge;
|
||||
border-color: #79AABE #09506C #09506C #79AABE;
|
||||
|
||||
text-indent:5px;
|
||||
font: 10px Verdana, Arial, Helvetica, sans-serif;
|
||||
color: #FFFFFF;
|
||||
background-color: #6C8E9C;
|
||||
}
|
||||
.cellmenu1:hover
|
||||
{
|
||||
color: #FFFF99;
|
||||
text-decoration: none;
|
||||
}
|
||||
A.cellmenu1_link
|
||||
{
|
||||
color: #FFFF55;
|
||||
text-decoration: underline;
|
||||
}
|
||||
A.cellmenu1_link:hover
|
||||
{
|
||||
color: #FFBB55;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.cellmenu2
|
||||
{
|
||||
height: 15px;
|
||||
border:1px inset;
|
||||
border-color: #79AABE #09506C #09506C #79AABE;
|
||||
|
||||
text-indent:5px;
|
||||
font: 10px Verdana, Arial, Helvetica, sans-serif;
|
||||
color: #393327;
|
||||
background-color: #B8D4E0;
|
||||
}
|
||||
.cellmenu2:hover
|
||||
{
|
||||
color: #A31D32;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* Usefull Text Classes */
|
||||
.ErrorMsg
|
||||
{
|
||||
font: bold 12px Verdana, Arial, Helvetica, sans-serif;
|
||||
COLOR: #FF0000;
|
||||
border-top: 1px solid;
|
||||
border-bottom: 1px solid;
|
||||
border-color: #58363E;
|
||||
}
|
||||
.PriorityEmergency
|
||||
{
|
||||
color: #FFFFFF;
|
||||
background-color: #ff4444;
|
||||
border-top: black 1px solid;
|
||||
border-bottom: black 1px solid;
|
||||
border-right: gray 1px solid;
|
||||
}
|
||||
.PriorityAlert
|
||||
{
|
||||
color: #FFFFFF;
|
||||
background-color: #dd00dd;
|
||||
border-top: black 1px solid;
|
||||
border-bottom: black 1px solid;
|
||||
border-right: gray 1px solid;
|
||||
}
|
||||
.PriorityCrit
|
||||
{
|
||||
color: #FFFFFF;
|
||||
background-color: #dd9900;
|
||||
border-top: black 1px solid;
|
||||
border-bottom: black 1px solid;
|
||||
border-right: gray 1px solid;
|
||||
}
|
||||
.PriorityError
|
||||
{
|
||||
color: #FFFFFF;
|
||||
background-color: #CC0000;
|
||||
border-top: black 1px solid;
|
||||
border-bottom: black 1px solid;
|
||||
border-right: gray 1px solid;
|
||||
}
|
||||
.PriorityWarning
|
||||
{
|
||||
color: #FFFFFF;
|
||||
background-color: #FFAA00;
|
||||
border-top: black 1px solid;
|
||||
border-bottom: black 1px solid;
|
||||
border-right: gray 1px solid;
|
||||
}
|
||||
.PriorityNotice
|
||||
{
|
||||
color: #FFFFFF;
|
||||
background-color: #66CC33;
|
||||
border-top: black 1px solid;
|
||||
border-bottom: black 1px solid;
|
||||
border-right: gray 1px solid;
|
||||
}
|
||||
.PriorityInfo
|
||||
{
|
||||
color: #000000;
|
||||
background-color: #ABF1FF;
|
||||
border-top: black 1px solid;
|
||||
border-bottom: black 1px solid;
|
||||
border-right: gray 1px solid;
|
||||
}
|
||||
.PriorityDebug
|
||||
{
|
||||
color: #FFFFFF;
|
||||
background-color: #3333ff;
|
||||
border-top: black 1px solid;
|
||||
border-bottom: black 1px solid;
|
||||
border-right: gray 1px solid;
|
||||
}
|
||||
|
||||
/* Form elements */
|
||||
select, input, textarea
|
||||
{
|
||||
background-color: #E8E7E2;
|
||||
color:#000000;
|
||||
font:bold 10px Verdana,Arial,Helvetica,sans-serif;
|
||||
border: 1px solid;
|
||||
border-color: #233B51 #124A7C #124A7C #233B51;
|
||||
}
|
||||
|
52
userchange.php
Normal file
@ -0,0 +1,52 @@
|
||||
<?php
|
||||
/*
|
||||
*********************************************************************
|
||||
* Copyright by Adiscon GmbH | 2008! *
|
||||
* -> www.phplogcon.org <- *
|
||||
* *
|
||||
* Use this script at your own risk! *
|
||||
* ----------------------------------------------------------------- *
|
||||
* Main Index File *
|
||||
* *
|
||||
* -> Loads the main PhpLogCon Site *
|
||||
* *
|
||||
* All directives are explained within this file *
|
||||
*********************************************************************
|
||||
*/
|
||||
|
||||
// *** Default includes and procedures *** //
|
||||
define('IN_PHPLOGCON', true);
|
||||
$gl_root_path = './';
|
||||
include($gl_root_path . 'include/functions_common.php');
|
||||
include($gl_root_path . 'include/functions_frontendhelpers.php');
|
||||
|
||||
InitPhpLogCon();
|
||||
InitFrontEndDefaults(); // Only in WebFrontEnd
|
||||
// *** *** //
|
||||
|
||||
// --- BEGIN Custom Code
|
||||
if ( isset($_SERVER['HTTP_REFERER']) )
|
||||
$szRedir = $_SERVER['HTTP_REFERER'];
|
||||
else
|
||||
$szRedir = "index.php"; // Default
|
||||
|
||||
|
||||
if ( isset($_GET['op']) )
|
||||
{
|
||||
if ( $_GET['op'] == "changestyle" )
|
||||
{
|
||||
if ( VerifyTheme($_GET['stylename']) )
|
||||
$_SESSION['CUSTOM_THEME'] = $_GET['stylename'];
|
||||
}
|
||||
|
||||
if ( $_GET['op'] == "changelang" )
|
||||
{
|
||||
if ( VerifyLanguage($_GET['langcode']) )
|
||||
$_SESSION['CUSTOM_LANG'] = $_GET['langcode'];
|
||||
}
|
||||
}
|
||||
|
||||
// Final redirect
|
||||
RedirectPage( $szRedir );
|
||||
// ---
|
||||
?>
|