<?php
	//Full trace file und Core dumps file löschen

switch ($_GET['option']) {
	case "debug":
		unlink("/tmp/DebugFiles.tar.gz");
		echo "<script>window.location='../index.php?m=ftrace';</script>";
		break;
	case "cdr":
		unlink("/tmp/isgw.cdr.gz");
		echo "<script>window.location='../index.php?m=cdr';</script>";
		break;
	case "certificate":
		unlink("/usr/conf/cafile.pem");
		echo "<script>window.location='../index.php?m=sipg';</script>";
		break;
	case "sms":
		unlink("/tmp/sms/in/".$_GET['filename']);
		echo "<script>window.location='../index.php?m=sms';</script>";
	case "smsFail":
		exec("/bin/rm -r /tmp/sms/failout/".$_GET['filename']);
		echo "<script>window.location='../index.php?m=sms';</script>";
	default:
		unlink("/tmp/debug-info.tar.gz");
		@unlink("/tmp/core");
		@unlink("/tmp/corelink");
		echo "<script>window.location='../index.php?m=ftrace';</script>";
		break;
}

?>

