<?php


/**
 * Klasse Dialplan Debug
 */

class Dialplandebug {
	
	/*
	 * Funktion display erzeugt den Inhalt von der HTML-Seite
	 */
	function display($args) {
		include('./includes/header.php');
	
	
	if ($_POST['start']=='start'){
		//Dialplan Debug Popup öffnen
		echo '<script>
		new_window("./misc/dialplan_debug.php");
		</script>';
	}
		
		$ret.="<br/><br/>
			<form name='dialplan_debug' method='POST' class='extensions_form'>
			<table class='contenttoc'>

			<tr><th colspan='2'>".DIALPLAN_DEBUG_TABLE_HEADER_DIS."</th></tr>";
			if (is_file("/tmp/dialplan.txt"))
				$ret.="<tr>
				<td>Status:</td><td><img src='./includes/images/punkt_gruen.gif'></td>
				</tr>";
			else
				$ret.="<tr>
				<td>Status:</td><td><img src='./includes/images/punkt_rot.gif'></td>
				</tr>";
			$ret.="<tr><td colspan='2'> 
			<input type='hidden' name='start' value='start'>
			<input type='submit' name='dialplan' onmouseover=\"Tip('".DEBUG_START_DIALPLAN_DEBUG."')\" onmouseout='UnTip()' value='".DIALPLAN_DEBUG_START_DIALPLAN_DEBUGGING_DIS."'>
			</td></tr>
			</table>
			</form>";
	
	
	
	//Rückgabe: Der Inhalt von der HTML-Seite  
	return $ret;
}

}
?>
