41 lines
1.1 KiB
PHP
41 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace src;
|
|
|
|
use AdditionallyInfo;
|
|
use Contacts;
|
|
use FullName;
|
|
use Information;
|
|
|
|
require_once "src/Information.php";
|
|
require_once "src/FullName.php";
|
|
require_once "src/Contacts.php";
|
|
require_once "src/AdditionallyInfo.php";
|
|
|
|
$surname = $_REQUEST["surname"];
|
|
$name = $_REQUEST["name"];
|
|
$patronymic = $_REQUEST["patronymic"];
|
|
|
|
$fullName = new FullName($surname, $name, $patronymic);
|
|
$fullName = $fullName->getFoolName();
|
|
|
|
$gender = $_REQUEST["gender"];
|
|
$dateOfBirth = $_REQUEST["dateOfBirth"];
|
|
|
|
$additionallyInfo = new AdditionallyInfo($dateOfBirth, $gender);
|
|
$additionallyInfo = $additionallyInfo->getAdditionallyInfo();
|
|
|
|
$countryCode = $_REQUEST["countryCode"];
|
|
$phoneNumber = $_REQUEST["phoneNumber"];
|
|
$email = $_REQUEST["email"];
|
|
|
|
$contacts = new Contacts($countryCode, $phoneNumber, $email);
|
|
$contacts = $contacts->getContacts();
|
|
|
|
$fullInformation = new Information($fullName, $additionallyInfo, $contacts);
|
|
$fullInformation = $fullInformation->getFullInformation();
|
|
|
|
$file = fopen("Information.txt", "a");
|
|
fwrite($file, $fullInformation);
|
|
fclose($file);
|
|
require "table.php"; |