{"action":"created","comment":{"url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/pulls/comments/170305016","pull_request_review_id":98977342,"id":170305016,"diff_hunk":"@@ -0,0 +1,56 @@\n+<?php\r\n+\r\n+$is_auth = (bool)rand(0, 1);\r\n+\r\n+require_once 'functions.php';\r\n+\r\n+if ($_SERVER['REQUEST_METHOD'] == 'POST') {\r\n+\t$add_lots = $_POST;\r\n+\r\n+    $required = ['name', 'category', 'message', 'img_url', 'lot_rate', 'lot_step', 'lot_date'];\r\n+    $dict = ['name' => 'Название', 'message' => 'Описание', 'img_url' => 'Изображение', 'lot_rate' => 'Начальнаная цена', 'lot_step' => 'Шаг ставки', 'lot_date' => 'Дата окончания торгов',];\r\n+    $errors = [];\r\n+    foreach ($required as $field) {\r\n+        if (empty($_POST[$field])) {\r\n+            $errors[$field] = 'Это поле надо заполнить';\r\n+      \t}\r\n+\t\t}\r\n+\r\n+\t\tif ($required ==\"$lot_rate\") {\r\n+        if (!filter_var($lot_rate, FILTER_VALIDATE_INT)) {\r\n+            $errors[$field] = 'Введите число';\r\n+        }\r\n+\t\t}\r\n+    if ($required ==\"$lot_step\") {\r","path":"add.php","position":24,"original_position":24,"commit_id":"895445b4aae7f60f76b8086fd2de24ee29da897b","original_commit_id":"895445b4aae7f60f76b8086fd2de24ee29da897b","user":{"login":"denlapaev","id":3096564,"avatar_url":"https://avatars0.githubusercontent.com/u/3096564?v=4","gravatar_id":"","url":"https://api.github.com/users/denlapaev","html_url":"https://github.com/denlapaev","followers_url":"https://api.github.com/users/denlapaev/followers","following_url":"https://api.github.com/users/denlapaev/following{/other_user}","gists_url":"https://api.github.com/users/denlapaev/gists{/gist_id}","starred_url":"https://api.github.com/users/denlapaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denlapaev/subscriptions","organizations_url":"https://api.github.com/users/denlapaev/orgs","repos_url":"https://api.github.com/users/denlapaev/repos","events_url":"https://api.github.com/users/denlapaev/events{/privacy}","received_events_url":"https://api.github.com/users/denlapaev/received_events","type":"User","site_admin":false},"body":"и это тоже","created_at":"2018-02-23T16:51:00Z","updated_at":"2018-02-23T16:58:14Z","html_url":"https://github.com/htmlacademy-php/595817-yeticave/pull/14#discussion_r170305016","pull_request_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/pulls/14","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/pulls/comments/170305016"},"html":{"href":"https://github.com/htmlacademy-php/595817-yeticave/pull/14#discussion_r170305016"},"pull_request":{"href":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/pulls/14","id":170550620,"html_url":"https://github.com/htmlacademy-php/595817-yeticave/pull/14","diff_url":"https://github.com/htmlacademy-php/595817-yeticave/pull/14.diff","patch_url":"https://github.com/htmlacademy-php/595817-yeticave/pull/14.patch","issue_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/issues/14","number":14,"state":"open","locked":false,"title":"Получение данных из форм","user":{"login":"Irinochka-ua","id":36026557,"avatar_url":"https://avatars2.githubusercontent.com/u/36026557?v=4","gravatar_id":"","url":"https://api.github.com/users/Irinochka-ua","html_url":"https://github.com/Irinochka-ua","followers_url":"https://api.github.com/users/Irinochka-ua/followers","following_url":"https://api.github.com/users/Irinochka-ua/following{/other_user}","gists_url":"https://api.github.com/users/Irinochka-ua/gists{/gist_id}","starred_url":"https://api.github.com/users/Irinochka-ua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Irinochka-ua/subscriptions","organizations_url":"https://api.github.com/users/Irinochka-ua/orgs","repos_url":"https://api.github.com/users/Irinochka-ua/repos","events_url":"https://api.github.com/users/Irinochka-ua/events{/privacy}","received_events_url":"https://api.github.com/users/Irinochka-ua/received_events","type":"User","site_admin":false},"body":" #10 Получение данных из форм\n\n---\n:mortar_board: [Получение данных из форм](https://up.htmlacademy.ru/php/4/user/595817/tasks/10)","created_at":"2018-02-21T18:24:35Z","updated_at":"2018-02-23T16:58:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e8a249dd88e04cacf91611cacb9278d319235a73","assignee":{"login":"denlapaev","id":3096564,"avatar_url":"https://avatars0.githubusercontent.com/u/3096564?v=4","gravatar_id":"","url":"https://api.github.com/users/denlapaev","html_url":"https://github.com/denlapaev","followers_url":"https://api.github.com/users/denlapaev/followers","following_url":"https://api.github.com/users/denlapaev/following{/other_user}","gists_url":"https://api.github.com/users/denlapaev/gists{/gist_id}","starred_url":"https://api.github.com/users/denlapaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denlapaev/subscriptions","organizations_url":"https://api.github.com/users/denlapaev/orgs","repos_url":"https://api.github.com/users/denlapaev/repos","events_url":"https://api.github.com/users/denlapaev/events{/privacy}","received_events_url":"https://api.github.com/users/denlapaev/received_events","type":"User","site_admin":false},"assignees":[{"login":"denlapaev","id":3096564,"avatar_url":"https://avatars0.githubusercontent.com/u/3096564?v=4","gravatar_id":"","url":"https://api.github.com/users/denlapaev","html_url":"https://github.com/denlapaev","followers_url":"https://api.github.com/users/denlapaev/followers","following_url":"https://api.github.com/users/denlapaev/following{/other_user}","gists_url":"https://api.github.com/users/denlapaev/gists{/gist_id}","starred_url":"https://api.github.com/users/denlapaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denlapaev/subscriptions","organizations_url":"https://api.github.com/users/denlapaev/orgs","repos_url":"https://api.github.com/users/denlapaev/repos","events_url":"https://api.github.com/users/denlapaev/events{/privacy}","received_events_url":"https://api.github.com/users/denlapaev/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/pulls/14/commits","review_comments_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/pulls/14/comments","review_comment_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/pulls/comments{/number}","comments_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/issues/14/comments","statuses_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/statuses/895445b4aae7f60f76b8086fd2de24ee29da897b","head":{"label":"Irinochka-ua:module4-task2","ref":"module4-task2","sha":"895445b4aae7f60f76b8086fd2de24ee29da897b","user":{"login":"Irinochka-ua","id":36026557,"avatar_url":"https://avatars2.githubusercontent.com/u/36026557?v=4","gravatar_id":"","url":"https://api.github.com/users/Irinochka-ua","html_url":"https://github.com/Irinochka-ua","followers_url":"https://api.github.com/users/Irinochka-ua/followers","following_url":"https://api.github.com/users/Irinochka-ua/following{/other_user}","gists_url":"https://api.github.com/users/Irinochka-ua/gists{/gist_id}","starred_url":"https://api.github.com/users/Irinochka-ua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Irinochka-ua/subscriptions","organizations_url":"https://api.github.com/users/Irinochka-ua/orgs","repos_url":"https://api.github.com/users/Irinochka-ua/repos","events_url":"https://api.github.com/users/Irinochka-ua/events{/privacy}","received_events_url":"https://api.github.com/users/Irinochka-ua/received_events","type":"User","site_admin":false},"repo":{"id":119799892,"name":"595817-yeticave","full_name":"Irinochka-ua/595817-yeticave","owner":{"login":"Irinochka-ua","id":36026557,"avatar_url":"https://avatars2.githubusercontent.com/u/36026557?v=4","gravatar_id":"","url":"https://api.github.com/users/Irinochka-ua","html_url":"https://github.com/Irinochka-ua","followers_url":"https://api.github.com/users/Irinochka-ua/followers","following_url":"https://api.github.com/users/Irinochka-ua/following{/other_user}","gists_url":"https://api.github.com/users/Irinochka-ua/gists{/gist_id}","starred_url":"https://api.github.com/users/Irinochka-ua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Irinochka-ua/subscriptions","organizations_url":"https://api.github.com/users/Irinochka-ua/orgs","repos_url":"https://api.github.com/users/Irinochka-ua/repos","events_url":"https://api.github.com/users/Irinochka-ua/events{/privacy}","received_events_url":"https://api.github.com/users/Irinochka-ua/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Irinochka-ua/595817-yeticave","description":"Ирина Булич","fork":true,"url":"https://api.github.com/repos/Irinochka-ua/595817-yeticave","forks_url":"https://api.github.com/repos/Irinochka-ua/595817-yeticave/forks","keys_url":"https://api.github.com/repos/Irinochka-ua/595817-yeticave/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Irinochka-ua/595817-yeticave/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Irinochka-ua/595817-yeticave/teams","hooks_url":"https://api.github.com/repos/Irinochka-ua/595817-yeticave/hooks","issue_events_url":"https://api.github.com/repos/Irinochka-ua/595817-yeticave/issues/events{/number}","events_url":"https://api.github.com/repos/Irinochka-ua/595817-yeticave/events","assignees_url":"https://api.github.com/repos/Irinochka-ua/595817-yeticave/assignees{/user}","branches_url":"https://api.github.com/repos/Irinochka-ua/595817-yeticave/branches{/branch}","tags_url":"https://api.github.com/repos/Irinochka-ua/595817-yeticave/tags","blobs_url":"https://api.github.com/repos/Irinochka-ua/595817-yeticave/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Irinochka-ua/595817-yeticave/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Irinochka-ua/595817-yeticave/git/refs{/sha}","trees_url":"https://api.github.com/repos/Irinochka-ua/595817-yeticave/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Irinochka-ua/595817-yeticave/statuses/{sha}","languages_url":"https://api.github.com/repos/Irinochka-ua/595817-yeticave/languages","stargazers_url":"https://api.github.com/repos/Irinochka-ua/595817-yeticave/stargazers","contributors_url":"https://api.github.com/repos/Irinochka-ua/595817-yeticave/contributors","subscribers_url":"https://api.github.com/repos/Irinochka-ua/595817-yeticave/subscribers","subscription_url":"https://api.github.com/repos/Irinochka-ua/595817-yeticave/subscription","commits_url":"https://api.github.com/repos/Irinochka-ua/595817-yeticave/commits{/sha}","git_commits_url":"https://api.github.com/repos/Irinochka-ua/595817-yeticave/git/commits{/sha}","comments_url":"https://api.github.com/repos/Irinochka-ua/595817-yeticave/comments{/number}","issue_comment_url":"https://api.github.com/repos/Irinochka-ua/595817-yeticave/issues/comments{/number}","contents_url":"https://api.github.com/repos/Irinochka-ua/595817-yeticave/contents/{+path}","compare_url":"https://api.github.com/repos/Irinochka-ua/595817-yeticave/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Irinochka-ua/595817-yeticave/merges","archive_url":"https://api.github.com/repos/Irinochka-ua/595817-yeticave/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Irinochka-ua/595817-yeticave/downloads","issues_url":"https://api.github.com/repos/Irinochka-ua/595817-yeticave/issues{/number}","pulls_url":"https://api.github.com/repos/Irinochka-ua/595817-yeticave/pulls{/number}","milestones_url":"https://api.github.com/repos/Irinochka-ua/595817-yeticave/milestones{/number}","notifications_url":"https://api.github.com/repos/Irinochka-ua/595817-yeticave/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Irinochka-ua/595817-yeticave/labels{/name}","releases_url":"https://api.github.com/repos/Irinochka-ua/595817-yeticave/releases{/id}","deployments_url":"https://api.github.com/repos/Irinochka-ua/595817-yeticave/deployments","created_at":"2018-02-01T07:29:58Z","updated_at":"2018-02-01T07:30:00Z","pushed_at":"2018-02-22T18:42:14Z","git_url":"git://github.com/Irinochka-ua/595817-yeticave.git","ssh_url":"git@github.com:Irinochka-ua/595817-yeticave.git","clone_url":"https://github.com/Irinochka-ua/595817-yeticave.git","svn_url":"https://github.com/Irinochka-ua/595817-yeticave","homepage":null,"size":601,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"htmlacademy-php:master","ref":"master","sha":"f3b27f12f13eb3cb2cd3119e68bf1c5d7ee7b9a8","user":{"login":"htmlacademy-php","id":27206120,"avatar_url":"https://avatars1.githubusercontent.com/u/27206120?v=4","gravatar_id":"","url":"https://api.github.com/users/htmlacademy-php","html_url":"https://github.com/htmlacademy-php","followers_url":"https://api.github.com/users/htmlacademy-php/followers","following_url":"https://api.github.com/users/htmlacademy-php/following{/other_user}","gists_url":"https://api.github.com/users/htmlacademy-php/gists{/gist_id}","starred_url":"https://api.github.com/users/htmlacademy-php/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htmlacademy-php/subscriptions","organizations_url":"https://api.github.com/users/htmlacademy-php/orgs","repos_url":"https://api.github.com/users/htmlacademy-php/repos","events_url":"https://api.github.com/users/htmlacademy-php/events{/privacy}","received_events_url":"https://api.github.com/users/htmlacademy-php/received_events","type":"Organization","site_admin":false},"repo":{"id":119790998,"name":"595817-yeticave","full_name":"htmlacademy-php/595817-yeticave","owner":{"login":"htmlacademy-php","id":27206120,"avatar_url":"https://avatars1.githubusercontent.com/u/27206120?v=4","gravatar_id":"","url":"https://api.github.com/users/htmlacademy-php","html_url":"https://github.com/htmlacademy-php","followers_url":"https://api.github.com/users/htmlacademy-php/followers","following_url":"https://api.github.com/users/htmlacademy-php/following{/other_user}","gists_url":"https://api.github.com/users/htmlacademy-php/gists{/gist_id}","starred_url":"https://api.github.com/users/htmlacademy-php/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htmlacademy-php/subscriptions","organizations_url":"https://api.github.com/users/htmlacademy-php/orgs","repos_url":"https://api.github.com/users/htmlacademy-php/repos","events_url":"https://api.github.com/users/htmlacademy-php/events{/privacy}","received_events_url":"https://api.github.com/users/htmlacademy-php/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/htmlacademy-php/595817-yeticave","description":"Ирина Булич","fork":false,"url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave","forks_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/forks","keys_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/keys{/key_id}","collaborators_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/teams","hooks_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/hooks","issue_events_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/issues/events{/number}","events_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/events","assignees_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/assignees{/user}","branches_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/branches{/branch}","tags_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/tags","blobs_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/git/refs{/sha}","trees_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/git/trees{/sha}","statuses_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/statuses/{sha}","languages_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/languages","stargazers_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/stargazers","contributors_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/contributors","subscribers_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/subscribers","subscription_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/subscription","commits_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/commits{/sha}","git_commits_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/git/commits{/sha}","comments_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/comments{/number}","issue_comment_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/issues/comments{/number}","contents_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/contents/{+path}","compare_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/compare/{base}...{head}","merges_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/merges","archive_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/downloads","issues_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/issues{/number}","pulls_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/pulls{/number}","milestones_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/milestones{/number}","notifications_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/labels{/name}","releases_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/releases{/id}","deployments_url":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/deployments","created_at":"2018-02-01T06:07:27Z","updated_at":"2018-02-01T21:22:42Z","pushed_at":"2018-02-22T18:42:16Z","git_url":"git://github.com/htmlacademy-php/595817-yeticave.git","ssh_url":"git@github.com:htmlacademy-php/595817-yeticave.git","clone_url":"https://github.com/htmlacademy-php/595817-yeticave.git","svn_url":"https://github.com/htmlacademy-php/595817-yeticave","homepage":"https://github.com/Irinochka-ua/595817-yeticave","size":610,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/pulls/14"},"html":{"href":"https://github.com/htmlacademy-php/595817-yeticave/pull/14"},"issue":{"href":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/issues/14"},"comments":{"href":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/htmlacademy-php/595817-yeticave/statuses/895445b4aae7f60f76b8086fd2de24ee29da897b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"denlapaev"}}