view interface/save_regex.php @ 8:da10158c6d0a

add toc_correction status in books table. On TOC correction list page, providing the status checking box for users.
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Mon, 09 Feb 2015 12:28:09 +0100
parents b12c99b7c3f0
children
line wrap: on
line source

<?php

if ($_POST['text']){
	/*
	$date = date('Y_m_d_H_i_s', time());
	if ( file_exists("regex_files/".$_POST['filename'].".txt") ) {
		$oldFile = file_get_contents("regex_files/".$_POST['filename'].".txt");
		file_put_contents("regex_files/".$_POST['filename']."_".$date.".txt", $oldFile);
	}
	*/
	if (get_magic_quotes_gpc()) {
		$require = stripslashes($_POST['text']);
	} else {
		$require = $_POST['text'];
	}
	
	file_put_contents("regex_files/".$_POST['filename'].".txt", $require);
}


?>