diff --git a/Information.txt b/Information.txt index b70cc05..953de12 100644 --- a/Information.txt +++ b/Information.txt @@ -5,3 +5,6 @@ Зайцева Анжела Игоревна; 1998-12-12; Женжина; +74444444444; aksjfhfka@mail.ru; Петров Петр Петрович; 1987-03-02; Мужчина; +77777777777; jksghhsdkj@gmail.com; Зайцев Федор Александрович; 2014-12-22; Мужчина; +76667774441; asert@mail.ru; +Билай Станислав Романович;1111-11-11;Мужчина;+79493761924;stasbilay02@yandex.ru; +Плешкова Анастасия Денисовна;1111-11-11;Мужчина;+73333333333;ple.anastasiya@gmail.com; +Зайцев Федор Александрович;1234-12-12;Мужчина;+76667774441;asert@mail.ru; diff --git a/form.html b/form.html index bfb6ae1..c1f42d2 100644 --- a/form.html +++ b/form.html @@ -5,7 +5,7 @@ Form ФИО -
+ - \ No newline at end of file + diff --git a/form.php b/form.php new file mode 100644 index 0000000..bd4bd00 --- /dev/null +++ b/form.php @@ -0,0 +1,29 @@ + + Фамилия:
+

+ Имя:
+

+ Отчество (если есть):
+

+ + Дата Рождения:
+

+ + Ваш пол:
+ Мужчина + Женжина

+ + Номер телефона (Например 1234567890):
+ +

+ + Email адрес:
+

+ + + +
'; + echo $form; diff --git a/functions.php b/functions.php deleted file mode 100644 index 6f5591b..0000000 --- a/functions.php +++ /dev/null @@ -1,5 +0,0 @@ - 1 && strlen($additionallyInfo) > 1 && strlen($contacts) > 1 ? true : false; -} // isFullInfo diff --git a/index.php b/index.php index b16d405..f796f78 100644 --- a/index.php +++ b/index.php @@ -1,38 +1,37 @@ getFoolName(); $gender = $_REQUEST["gender"]; -$DateOfBirth = $_REQUEST["DateOfBirth"]; +$dateOfBirth = $_REQUEST["dateOfBirth"]; -$additionallyInfo = new additionallyInfo($DateOfBirth, $gender); +$additionallyInfo = new AdditionallyInfo($dateOfBirth, $gender); $additionallyInfo = $additionallyInfo->getAdditionallyInfo(); $countryCode = $_REQUEST["countryCode"]; $phoneNumber = $_REQUEST["phoneNumber"]; $email = $_REQUEST["email"]; -$contacts = new contacts($countryCode, $phoneNumber, $email); +$contacts = new Contacts($countryCode, $phoneNumber, $email); $contacts = $contacts->getContacts(); -$p1 = new Information($fullName, $additionallyInfo, $contacts); -$fullInformation = $p1->getFullInformation(); +$fullInformation = new Information($fullName, $additionallyInfo, $contacts); +$fullInformation = $fullInformation->getFullInformation(); $flag = isFullInfo($fullName, $additionallyInfo, $contacts); @@ -40,4 +39,4 @@ if($flag) { $file = fopen("Information.txt", "a"); fwrite($file, $fullInformation); fclose($file); -} // if +} // if*/ diff --git a/info.php b/info.php index a9e1e0e..797a0e9 100644 --- a/info.php +++ b/info.php @@ -1,34 +1,41 @@ getFoolName(); $gender = $_REQUEST["gender"]; -$DateOfBirth = $_REQUEST["DateOfBirth"]; +$dateOfBirth = $_REQUEST["dateOfBirth"]; -$additionallyInfo = new additionallyInfo($DateOfBirth, $gender); +$additionallyInfo = new AdditionallyInfo($dateOfBirth, $gender); $additionallyInfo = $additionallyInfo->getAdditionallyInfo(); $countryCode = $_REQUEST["countryCode"]; $phoneNumber = $_REQUEST["phoneNumber"]; $email = $_REQUEST["email"]; -$contacts = new contacts($countryCode, $phoneNumber, $email); +$contacts = new Contacts($countryCode, $phoneNumber, $email); $contacts = $contacts->getContacts(); -$p1 = new Information($fullName, $additionallyInfo, $contacts); -$fullInformation = $p1->getFullInformation(); +$fullInformation = new Information($fullName, $additionallyInfo, $contacts); +$fullInformation = $fullInformation->getFullInformation(); -$flag = isFullInfo($fullName, $additionallyInfo, $contacts); - -if($flag) { - $file = fopen("Information.txt", "a"); - fwrite($file, $fullInformation); - fclose($file); -} // if -*/ \ No newline at end of file +$file = fopen("Information.txt", "a"); +fwrite($file, $fullInformation); +fclose($file); +require "table.php"; \ No newline at end of file diff --git a/src/AdditionallyInfo.php b/src/AdditionallyInfo.php new file mode 100644 index 0000000..736d932 --- /dev/null +++ b/src/AdditionallyInfo.php @@ -0,0 +1,14 @@ +bDay = $bDay; + $this->gender = $gender; + } + public function getAdditionallyInfo() { + return $this->bDay . ";" . $this->gender; + } +} \ No newline at end of file diff --git a/src/Contacts.php b/src/Contacts.php new file mode 100644 index 0000000..a9058f4 --- /dev/null +++ b/src/Contacts.php @@ -0,0 +1,17 @@ +countryCode = $countryCode; + $this->phoneNumber = $phoneNumber; + $this->email = $email; + } + + public function getContacts(){ + return $this->countryCode . $this->phoneNumber . ";" . $this->email; + } +} \ No newline at end of file diff --git a/src/FullName.php b/src/FullName.php new file mode 100644 index 0000000..b21fcb5 --- /dev/null +++ b/src/FullName.php @@ -0,0 +1,19 @@ +surname = $surname; + $this->name = $name; + $this->patronymic = $patronymic; + } + public function getFoolName() + { + return $this->surname . ' ' . $this->name . ' ' . $this->patronymic; + } +} diff --git a/src/additionallyInfo.php b/src/additionallyInfo.php deleted file mode 100644 index 850a9f4..0000000 --- a/src/additionallyInfo.php +++ /dev/null @@ -1,12 +0,0 @@ -additionallyInfo = $b_day . ";" . $gender; - } - public function getAdditionallyInfo() { - return $this->additionallyInfo; - } -} \ No newline at end of file diff --git a/src/contacts.php b/src/contacts.php deleted file mode 100644 index a5254d2..0000000 --- a/src/contacts.php +++ /dev/null @@ -1,13 +0,0 @@ -contacts = $countryCode . $phoneNumber . ";" . $email; - } - - public function getContacts(){ - return $this->contacts; - } -} \ No newline at end of file diff --git a/src/fullName.php b/src/fullName.php deleted file mode 100644 index bc3517a..0000000 --- a/src/fullName.php +++ /dev/null @@ -1,15 +0,0 @@ -name = $surname . " " . $name . " " . $patronymic; - } - public function getFoolName() - { - return $this->name; - } -}