{"action":"created","comment":{"url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/pulls/comments/190264765","pull_request_review_id":122606881,"id":190264765,"diff_hunk":"@@ -0,0 +1,94 @@\n+  <nav class=\"nav\">\n+    <ul class=\"nav__list container\">\n+    <?php $index = 0;\n+$num = count($template_data['categories']);\n+while ($index < $num) {\n+    $cat = $template_data['categories'][$index];\n+    print('<li class=\"nav__item\"><a href=\"all-lots.html\">' . htmlspecialchars($cat['category']) . '</a></li>');\n+    $index = $index + 1;\n+}?>\n+    </ul>\n+  </nav>\n+  <?php\n+$lot_name = $_POST['lot-name'] ?? '';\n+$lot_message = $_POST['message'] ?? '';\n+$lot_rate = $_POST['lot-rate'] ?? '';\n+$lot_step = $_POST['lot-step'] ?? '';\n+$lot_date = $_POST['lot-date'] ?? '';\n+?>\n+  <form class=\"form form--add-lot container <?=$template_data['form-class'];?>\" action=\"/add.php\" method=\"post\" enctype = \"multipart/form-data\">\n+    <h2>Добавление лота</h2>\n+    <div class=\"form__container-two\">\n+      <div class=\"form__item <?php if (isset($template_data['errors']['lot-name'])): print('form__item--invalid');endif;?>\"> <!-- form__item--invalid -->\n+        <label for=\"lot-name\">Наименование</label>\n+        <input id=\"lot-name\" type=\"text\" name=\"lot-name\" placeholder=\"Введите наименование лота\" value=\"<?=htmlspecialchars($lot_name, ENT_QUOTES);?>\">\n+        <span class=\"form__error\">Введите наименование лота</span>\n+      </div>\n+      <div class=\"form__item\">\n+        <label for=\"category\">Категория</label>\n+        <select id=\"category\" name=\"category\">\n+        <?php $index = 0;\n+$num = count($template_data['categories']);\n+while ($index < $num) {\n+    $cat = $template_data['categories'][$index];\n+    print('<option value=\"' . $cat['id'] . '\">' . htmlspecialchars($cat['category']) . '</option>');\n+    $index = $index + 1;\n+}?>\n+          <option>Выберите категорию</option>","path":"templates/add-lot.php","position":37,"original_position":37,"commit_id":"da2301d118fb2f9263a834c3b59e459657ff1f07","original_commit_id":"da2301d118fb2f9263a834c3b59e459657ff1f07","user":{"login":"caseycs","id":76095,"avatar_url":"https://avatars0.githubusercontent.com/u/76095?v=4","gravatar_id":"","url":"https://api.github.com/users/caseycs","html_url":"https://github.com/caseycs","followers_url":"https://api.github.com/users/caseycs/followers","following_url":"https://api.github.com/users/caseycs/following{/other_user}","gists_url":"https://api.github.com/users/caseycs/gists{/gist_id}","starred_url":"https://api.github.com/users/caseycs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caseycs/subscriptions","organizations_url":"https://api.github.com/users/caseycs/orgs","repos_url":"https://api.github.com/users/caseycs/repos","events_url":"https://api.github.com/users/caseycs/events{/privacy}","received_events_url":"https://api.github.com/users/caseycs/received_events","type":"User","site_admin":false},"body":"Думаю вот эту строчку стоит оставить, а вот все остальные захардкоженные категории - можно удалять.","created_at":"2018-05-23T14:19:30Z","updated_at":"2018-05-23T14:19:31Z","html_url":"https://github.com/htmlacademy-php/106097-yeticave/pull/12#discussion_r190264765","pull_request_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/pulls/12","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/pulls/comments/190264765"},"html":{"href":"https://github.com/htmlacademy-php/106097-yeticave/pull/12#discussion_r190264765"},"pull_request":{"href":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/pulls/12","id":189977012,"html_url":"https://github.com/htmlacademy-php/106097-yeticave/pull/12","diff_url":"https://github.com/htmlacademy-php/106097-yeticave/pull/12.diff","patch_url":"https://github.com/htmlacademy-php/106097-yeticave/pull/12.patch","issue_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/issues/12","number":12,"state":"open","locked":false,"title":"Получение данных из форм","user":{"login":"stebunoff","id":33266476,"avatar_url":"https://avatars2.githubusercontent.com/u/33266476?v=4","gravatar_id":"","url":"https://api.github.com/users/stebunoff","html_url":"https://github.com/stebunoff","followers_url":"https://api.github.com/users/stebunoff/followers","following_url":"https://api.github.com/users/stebunoff/following{/other_user}","gists_url":"https://api.github.com/users/stebunoff/gists{/gist_id}","starred_url":"https://api.github.com/users/stebunoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stebunoff/subscriptions","organizations_url":"https://api.github.com/users/stebunoff/orgs","repos_url":"https://api.github.com/users/stebunoff/repos","events_url":"https://api.github.com/users/stebunoff/events{/privacy}","received_events_url":"https://api.github.com/users/stebunoff/received_events","type":"User","site_admin":false},"body":"Подскажи, как корректно прописать Location, чтобы после успешной отправки формы перенаправлять пользователя на страницу лота?\r\n\r\nВ текущей реализации получаю повторную отправку заголовков, что делать нельзя.\n\n---\n:mortar_board: [Получение данных из форм](https://up.htmlacademy.ru/php/5/user/106097/tasks/13)","created_at":"2018-05-23T13:33:56Z","updated_at":"2018-05-23T14:19:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ce563327b63fcc82e222864a842571732011e389","assignee":{"login":"caseycs","id":76095,"avatar_url":"https://avatars0.githubusercontent.com/u/76095?v=4","gravatar_id":"","url":"https://api.github.com/users/caseycs","html_url":"https://github.com/caseycs","followers_url":"https://api.github.com/users/caseycs/followers","following_url":"https://api.github.com/users/caseycs/following{/other_user}","gists_url":"https://api.github.com/users/caseycs/gists{/gist_id}","starred_url":"https://api.github.com/users/caseycs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caseycs/subscriptions","organizations_url":"https://api.github.com/users/caseycs/orgs","repos_url":"https://api.github.com/users/caseycs/repos","events_url":"https://api.github.com/users/caseycs/events{/privacy}","received_events_url":"https://api.github.com/users/caseycs/received_events","type":"User","site_admin":false},"assignees":[{"login":"caseycs","id":76095,"avatar_url":"https://avatars0.githubusercontent.com/u/76095?v=4","gravatar_id":"","url":"https://api.github.com/users/caseycs","html_url":"https://github.com/caseycs","followers_url":"https://api.github.com/users/caseycs/followers","following_url":"https://api.github.com/users/caseycs/following{/other_user}","gists_url":"https://api.github.com/users/caseycs/gists{/gist_id}","starred_url":"https://api.github.com/users/caseycs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caseycs/subscriptions","organizations_url":"https://api.github.com/users/caseycs/orgs","repos_url":"https://api.github.com/users/caseycs/repos","events_url":"https://api.github.com/users/caseycs/events{/privacy}","received_events_url":"https://api.github.com/users/caseycs/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/pulls/12/commits","review_comments_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/pulls/12/comments","review_comment_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/pulls/comments{/number}","comments_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/issues/12/comments","statuses_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/statuses/da2301d118fb2f9263a834c3b59e459657ff1f07","head":{"label":"stebunoff:module6-task2","ref":"module6-task2","sha":"da2301d118fb2f9263a834c3b59e459657ff1f07","user":{"login":"stebunoff","id":33266476,"avatar_url":"https://avatars2.githubusercontent.com/u/33266476?v=4","gravatar_id":"","url":"https://api.github.com/users/stebunoff","html_url":"https://github.com/stebunoff","followers_url":"https://api.github.com/users/stebunoff/followers","following_url":"https://api.github.com/users/stebunoff/following{/other_user}","gists_url":"https://api.github.com/users/stebunoff/gists{/gist_id}","starred_url":"https://api.github.com/users/stebunoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stebunoff/subscriptions","organizations_url":"https://api.github.com/users/stebunoff/orgs","repos_url":"https://api.github.com/users/stebunoff/repos","events_url":"https://api.github.com/users/stebunoff/events{/privacy}","received_events_url":"https://api.github.com/users/stebunoff/received_events","type":"User","site_admin":false},"repo":{"id":130953162,"name":"106097-yeticave","full_name":"stebunoff/106097-yeticave","owner":{"login":"stebunoff","id":33266476,"avatar_url":"https://avatars2.githubusercontent.com/u/33266476?v=4","gravatar_id":"","url":"https://api.github.com/users/stebunoff","html_url":"https://github.com/stebunoff","followers_url":"https://api.github.com/users/stebunoff/followers","following_url":"https://api.github.com/users/stebunoff/following{/other_user}","gists_url":"https://api.github.com/users/stebunoff/gists{/gist_id}","starred_url":"https://api.github.com/users/stebunoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stebunoff/subscriptions","organizations_url":"https://api.github.com/users/stebunoff/orgs","repos_url":"https://api.github.com/users/stebunoff/repos","events_url":"https://api.github.com/users/stebunoff/events{/privacy}","received_events_url":"https://api.github.com/users/stebunoff/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stebunoff/106097-yeticave","description":"Николай Стебунов","fork":true,"url":"https://api.github.com/repos/stebunoff/106097-yeticave","forks_url":"https://api.github.com/repos/stebunoff/106097-yeticave/forks","keys_url":"https://api.github.com/repos/stebunoff/106097-yeticave/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stebunoff/106097-yeticave/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stebunoff/106097-yeticave/teams","hooks_url":"https://api.github.com/repos/stebunoff/106097-yeticave/hooks","issue_events_url":"https://api.github.com/repos/stebunoff/106097-yeticave/issues/events{/number}","events_url":"https://api.github.com/repos/stebunoff/106097-yeticave/events","assignees_url":"https://api.github.com/repos/stebunoff/106097-yeticave/assignees{/user}","branches_url":"https://api.github.com/repos/stebunoff/106097-yeticave/branches{/branch}","tags_url":"https://api.github.com/repos/stebunoff/106097-yeticave/tags","blobs_url":"https://api.github.com/repos/stebunoff/106097-yeticave/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stebunoff/106097-yeticave/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stebunoff/106097-yeticave/git/refs{/sha}","trees_url":"https://api.github.com/repos/stebunoff/106097-yeticave/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stebunoff/106097-yeticave/statuses/{sha}","languages_url":"https://api.github.com/repos/stebunoff/106097-yeticave/languages","stargazers_url":"https://api.github.com/repos/stebunoff/106097-yeticave/stargazers","contributors_url":"https://api.github.com/repos/stebunoff/106097-yeticave/contributors","subscribers_url":"https://api.github.com/repos/stebunoff/106097-yeticave/subscribers","subscription_url":"https://api.github.com/repos/stebunoff/106097-yeticave/subscription","commits_url":"https://api.github.com/repos/stebunoff/106097-yeticave/commits{/sha}","git_commits_url":"https://api.github.com/repos/stebunoff/106097-yeticave/git/commits{/sha}","comments_url":"https://api.github.com/repos/stebunoff/106097-yeticave/comments{/number}","issue_comment_url":"https://api.github.com/repos/stebunoff/106097-yeticave/issues/comments{/number}","contents_url":"https://api.github.com/repos/stebunoff/106097-yeticave/contents/{+path}","compare_url":"https://api.github.com/repos/stebunoff/106097-yeticave/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stebunoff/106097-yeticave/merges","archive_url":"https://api.github.com/repos/stebunoff/106097-yeticave/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stebunoff/106097-yeticave/downloads","issues_url":"https://api.github.com/repos/stebunoff/106097-yeticave/issues{/number}","pulls_url":"https://api.github.com/repos/stebunoff/106097-yeticave/pulls{/number}","milestones_url":"https://api.github.com/repos/stebunoff/106097-yeticave/milestones{/number}","notifications_url":"https://api.github.com/repos/stebunoff/106097-yeticave/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stebunoff/106097-yeticave/labels{/name}","releases_url":"https://api.github.com/repos/stebunoff/106097-yeticave/releases{/id}","deployments_url":"https://api.github.com/repos/stebunoff/106097-yeticave/deployments","created_at":"2018-04-25T05:03:31Z","updated_at":"2018-05-23T08:25:10Z","pushed_at":"2018-05-23T14:16:25Z","git_url":"git://github.com/stebunoff/106097-yeticave.git","ssh_url":"git@github.com:stebunoff/106097-yeticave.git","clone_url":"https://github.com/stebunoff/106097-yeticave.git","svn_url":"https://github.com/stebunoff/106097-yeticave","homepage":null,"size":571,"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":"9b1841d3a37995d059ad9843ed44ffa74b2398e1","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":130953124,"name":"106097-yeticave","full_name":"htmlacademy-php/106097-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/106097-yeticave","description":"Николай Стебунов","fork":false,"url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave","forks_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/forks","keys_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/keys{/key_id}","collaborators_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/teams","hooks_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/hooks","issue_events_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/issues/events{/number}","events_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/events","assignees_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/assignees{/user}","branches_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/branches{/branch}","tags_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/tags","blobs_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/git/refs{/sha}","trees_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/git/trees{/sha}","statuses_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/statuses/{sha}","languages_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/languages","stargazers_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/stargazers","contributors_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/contributors","subscribers_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/subscribers","subscription_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/subscription","commits_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/commits{/sha}","git_commits_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/git/commits{/sha}","comments_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/comments{/number}","issue_comment_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/issues/comments{/number}","contents_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/contents/{+path}","compare_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/compare/{base}...{head}","merges_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/merges","archive_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/downloads","issues_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/issues{/number}","pulls_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/pulls{/number}","milestones_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/milestones{/number}","notifications_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/labels{/name}","releases_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/releases{/id}","deployments_url":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/deployments","created_at":"2018-04-25T05:02:52Z","updated_at":"2018-05-23T08:23:05Z","pushed_at":"2018-05-23T14:16:26Z","git_url":"git://github.com/htmlacademy-php/106097-yeticave.git","ssh_url":"git@github.com:htmlacademy-php/106097-yeticave.git","clone_url":"https://github.com/htmlacademy-php/106097-yeticave.git","svn_url":"https://github.com/htmlacademy-php/106097-yeticave","homepage":"https://github.com/stebunoff/106097-yeticave","size":571,"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/106097-yeticave/pulls/12"},"html":{"href":"https://github.com/htmlacademy-php/106097-yeticave/pull/12"},"issue":{"href":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/issues/12"},"comments":{"href":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/htmlacademy-php/106097-yeticave/statuses/da2301d118fb2f9263a834c3b59e459657ff1f07"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"caseycs"}}