<?php
class eventsBase
{
	var $events = array();
	var $maps = array();
	function exists($event, $table = "")
	{
		if($table == "")
			return (array_key_exists($event,$this->events)!==FALSE);
		else
			return isset($this->events[$event]) && isset($this->events[$event][$table]);
	}

	function existsMap($page)
	{
		return (array_key_exists($page,$this->maps)!==FALSE);
	}
}

class class_GlobalEvents extends eventsBase
{
	function __construct()
	{
	// fill list of events
		$this->events["AfterSuccessfulLogin"]=true;


//	onscreen events
		$this->events["background_snippet"] = true;
		$this->events["_global__snippet"] = true;



		}

//	handlers

		
		
		
		
		
		
				// After successful login
function AfterSuccessfulLogin($username, $password, &$data, &$pageObject)
{

		

// Place event code here.
// Use "Add Action" button to add code snippets.


$_SESSION["MENU_BG"]="BG.jpg";

;		
} // function AfterSuccessfulLogin

		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		

//	onscreen events
	function event_background_snippet(&$params)
	{
	// Put your code here.

//echo '<img src="\files\Lake_Bled.jpg" style=" width: 1420px;  height:480px; " > ';
$pic= "\\files\\".$_SESSION["MENU_BG"];

echo '<img src='. $pic  .' style=" width: 1300px;  height:500px; " > ';
	;
}
	function event__global__snippet(&$params)
	{
	// Put your code here.

//echo '<img src="\files\Lake_Bled.jpg" style=" width: 1420px;  height:480px; " > ';
$pic= "\\files\\".$_SESSION["MENU_BG"];

echo '<img src='. $pic  .' style=" width: 300px;  height:200px; " > ';
	;
}




}
?>
