(root)/trunk/process.php - Редакция 3
Авторство |
Последнее изменение |
Открыть журнал
| RSS
<?php
require './lib/init.php';
function secure
($str){
$str=mysql_real_escape_string($str);
return strip_tags($str);
}
$name=secure
($_POST['name']);
$desk=secure
($_POST['desk']);
$type=secure
($_POST['type']);
$author=secure
($_POST['author']);
$id=(int
)$_POST['id'];
if($_POST['type']=='file'){
$type='1';
}else{
$type='0';
}
switch ($_POST['act']){
case 'add':
$id=$core->AddRequest($name, $desk, $author, $type);
break;
case 'make':
$core->MakeRequest($id, $name, $desk);
break;
default:
die();
}
header('Location: index.php?act=show&id='.$id);
?>