2024-05-17 16:07:25 +03:00
|
|
|
<?php
|
|
|
|
|
2024-05-21 11:53:40 +03:00
|
|
|
require_once "form.php";
|
|
|
|
//require_once "src/Information.php";
|
|
|
|
//require_once "src/FullName.php";
|
|
|
|
//require_once "src/Contacts.php";
|
|
|
|
//require_once "src/AdditionallyInfo.php";
|
2024-05-20 15:11:17 +03:00
|
|
|
//require_once "info.php";
|
2024-05-21 11:53:40 +03:00
|
|
|
//require_once "table.php";
|
2024-05-20 15:11:17 +03:00
|
|
|
|
2024-05-21 11:53:40 +03:00
|
|
|
/*$flag = false;
|
2024-05-20 15:11:17 +03:00
|
|
|
|
|
|
|
$surname = $_REQUEST["surname"];
|
|
|
|
$name = $_REQUEST["name"];
|
|
|
|
$patronymic = $_REQUEST["patronymic"];
|
|
|
|
|
2024-05-21 11:53:40 +03:00
|
|
|
$fullName = new FullName($surname, $name, $patronymic);
|
2024-05-20 15:11:17 +03:00
|
|
|
$fullName = $fullName->getFoolName();
|
|
|
|
|
|
|
|
$gender = $_REQUEST["gender"];
|
2024-05-21 11:53:40 +03:00
|
|
|
$dateOfBirth = $_REQUEST["dateOfBirth"];
|
2024-05-20 15:11:17 +03:00
|
|
|
|
2024-05-21 11:53:40 +03:00
|
|
|
$additionallyInfo = new AdditionallyInfo($dateOfBirth, $gender);
|
2024-05-20 15:11:17 +03:00
|
|
|
$additionallyInfo = $additionallyInfo->getAdditionallyInfo();
|
|
|
|
|
|
|
|
$countryCode = $_REQUEST["countryCode"];
|
|
|
|
$phoneNumber = $_REQUEST["phoneNumber"];
|
|
|
|
$email = $_REQUEST["email"];
|
|
|
|
|
2024-05-21 11:53:40 +03:00
|
|
|
$contacts = new Contacts($countryCode, $phoneNumber, $email);
|
2024-05-20 15:11:17 +03:00
|
|
|
$contacts = $contacts->getContacts();
|
|
|
|
|
2024-05-21 11:53:40 +03:00
|
|
|
$fullInformation = new Information($fullName, $additionallyInfo, $contacts);
|
|
|
|
$fullInformation = $fullInformation->getFullInformation();
|
2024-05-20 15:11:17 +03:00
|
|
|
|
|
|
|
$flag = isFullInfo($fullName, $additionallyInfo, $contacts);
|
2024-05-17 16:07:25 +03:00
|
|
|
|
2024-05-20 15:11:17 +03:00
|
|
|
if($flag) {
|
|
|
|
$file = fopen("Information.txt", "a");
|
|
|
|
fwrite($file, $fullInformation);
|
|
|
|
fclose($file);
|
2024-05-21 11:53:40 +03:00
|
|
|
} // if*/
|