Хранилища Subversion dreq

Редакция

Содержимое файла | Последнее изменение | Открыть журнал | RSS

Редакция Автор № строки Строка
3 sivan 1
<?php
2
require './lib/init.php';
3
function secure($str){
4
    $str=mysql_real_escape_string($str);
5
    return strip_tags($str);
6
}
7
$name=secure($_POST['name']);
8
$desk=secure($_POST['desk']);
9
$type=secure($_POST['type']);
10
$author=secure($_POST['author']);
11
$id=(int)$_POST['id'];
12
 
13
if($_POST['type']=='file'){
14
    $type='1';
15
}else{
16
    $type='0';
17
}
18
 
19
switch ($_POST['act']){
20
    case 'add':
21
        $id=$core->AddRequest($name, $desk, $author, $type);
22
        break;
23
    case 'make':
24
        $core->MakeRequest($id, $name, $desk);
25
        break;
26
    default:
27
        die();
28
}
29
header('Location: index.php?act=show&id='.$id);
30
?>