Your IP : 172.70.80.238


Current Path : /var/www/element/data/www/proverki.net/articles_client/
Upload File :
Current File : /var/www/element/data/www/proverki.net/articles_client/submitter.php

<?
error_reporting(E_ALL);

require_once $_SERVER['DOCUMENT_ROOT']."/articles_client/articles.class.php";
$Articles = new Articles;
$Articles->GetConfig($_SERVER['DOCUMENT_ROOT']."/articles_client/config.php");
	
$data = array();
foreach($_POST as $k => $v) {
	$data[$k] = stripcslashes(urldecode($v));
}

if(md5($Articles->config['password']) == $_POST['password']) {
	
	if($data['action'] == 'add') {
		$error = $Articles->AddArticle($data['name'],$data['title'],$data['announce'],$data['text'],'','', $data['article_id']);
	}
	if($data['action'] == 'delete') {
		$error = $Articles->DeleteById($data['id']);
	}
	
	if($error) echo $error; else echo '100';

} else {
	echo '201';
}

?>