<?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

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



		}

//	handlers

//	onscreen events
	function event_Pre_Ventas_snippet(&$params)
	{
	global $strTableName;
$srchObj = SearchClause::getSearchObject($strTableName);
$fields = $srchObj->getSearchFields();
if(count($fields))


foreach ($fields as $field=>$value ) {
   $field.": " .$srchObj->getSearchOption($field);
  if ($srchObj->getSearchOption($field)=="Between")

 {
    

echo "Fecha : ".$srchObj->getFieldValue($field);
  }
  echo "  -  ".$srchObj->getSecondFieldValue($field);



  echo "<br>";

}    
	;
}




}
?>
