-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathresponse.php
More file actions
33 lines (30 loc) · 901 Bytes
/
Copy pathresponse.php
File metadata and controls
33 lines (30 loc) · 901 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
session_start();
require('checker.php');
/**
* Запись страницы в сессию
*/
if ($_POST["step"] == "save_page") {
$checker = new Checker();
echo $checker->savePage($_POST["id"], $_POST["src"], $_POST["taskсode"]);
}
/**
* Создание архива
*/
if ($_POST["step"] == "create_package") {
$checker = new Checker();
$objDateTime = new DateTime('NOW');
$temp_name = $_POST["regnumber"] . "-" .
$_POST["taskсode"] . "-" .
$objDateTime->format('Ymd-His') . "-" .
ceil(microtime(true));
$params = array(
"name" => $temp_name,
"taskсode" => $_POST["taskсode"],
"comment" => $_POST["comment"],
"tutor" => "12345",//берем Id проверяющего из сессии
"datetime" => $objDateTime->format('Y-m-d H:i:s')
);
echo $checker->createPackage($params);
}
?>