Location: PHPKode > projects > Admbook > admin/reply-del.php
<?php
	class Timer {
		var $startTime;
		var $endTime;
		function start() {
			$this->startTime = gettimeofday();
		}
		function stop() {
			$this->endTime = gettimeofday();
		}
		function elapsed() {
			return (($this->endTime["sec"] - $this->startTime["sec"]) * 1000000 + ($this->endTime["usec"] - $this->startTime["usec"])) / 1000000;
		}
	}
	$timer = new Timer();
	$timer->start();
	session_start();
	include("../settings-data.php");
	include("../lib.php");
	checkPermissions($login, $password);
	if (file_exists("../content-data.php"))
		include("../content-data.php");
	if (!isset($id))
		$id = "";
	if (!isset($content[$id-1]))
	{
		session_destroy();
		Header("Location: login.php");exit;
	}

	$content[$id-1]['admin-name'] = "";
	$content[$id-1]['admin-mail'] = "";
	$content[$id-1]['admin-message'] = "";
	$content[$id-1]['admin-time'] = "";

	$newContent = "<?php\n";
	for($i = 0; $i < sizeof($content); $i++)
	{
		while(list($key, $value) = each($content[$i]))
		{
			$newContent .= "\t\$content[".$i."]['".$key."'] = \"".$value."\";\n";
		}
		$newContent .= "\n";
	}
	$newContent .= "?>";

	reWriteDataInFile ($newContent,"../content-data.php");
	$timer->stop();
	Header("Location: index.php?".$timer->elapsed());exit;
?>
Return current item: Admbook