22 lines
496 B
PHP
22 lines
496 B
PHP
<?php
|
|
|
|
require_once($_SERVER['DOCUMENT_ROOT'] . "/config.php");
|
|
|
|
if(!$_SESSION['id']) {
|
|
header("location:index.php");
|
|
die("Доступ запрещён!");
|
|
}
|
|
|
|
$user = new User($_SESSION["id"]);
|
|
|
|
require_once($_SERVER["DOCUMENT_ROOT"]."/engine/classes/WebAppRaiser/autoload.php");
|
|
|
|
$WebAppRaiserAPI = new WebAppRaiserAPI($user);
|
|
|
|
$post = clearInputData($_POST);
|
|
$post['estimateValue'] = $post['contractCost'];
|
|
|
|
$result = $WebAppRaiserAPI->getCalculate($post);
|
|
|
|
echo json_encode($result);
|