Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ■board-input.php
- <?php require 'header.php'; ?>
- <style type="text/css">
- <!--
- html,body {
- background-color: transparent;
- scrollbar-arrow-color: #ffccff;
- scrollbar-face-color: #ffcccc;
- scrollbar-3dlight-color: #ffffff;
- scrollbar-darkshadow-color: #ffcccc;
- scrollbar-highlight-color: #ff9999;
- scrollbar-shadow-color: #ff9999;
- scrollbar-track-color: #ffffff;
- }
- -->
- p#submit_btn {
- text-align: center;
- font-family: "あずきフォント";
- }
- .content {
- /* margin-left: 137px; */
- margin-top: 0px;
- font-size: 95%;
- font-weight: bold;
- font-family: "あずきフォント";
- /* color: #6c2735; */
- color: #f3b3e6;
- }
- .form {
- color: white;
- background-color: #9FD6D2;
- text-align: center;
- /* padding-left: 370px; */
- padding-top: 5px;
- padding-bottom: 5px;
- font-weight: bold;
- font-size: 95%;
- width: 825px;
- font-family: "あずきフォント";
- }
- .textform {
- margin-left: 68px;
- }
- .textform_postalCode {
- margin-left: 30px;
- }
- .textstyle {
- font-size: 95%;
- /* color: #6c2735; */
- color: #f7c2c2;
- font-weight: bold;
- font-family: "あずきフォント";
- }
- .required {
- font-size: 87%;
- font-weight: normal;
- color: red;
- font-family: "あずきフォント";
- }
- .title_a{
- color: #f7c2c2;
- font-weight: bold;
- font-family: "あずきフォント";
- }
- #heading {
- /* border-left: 10px solid #6c2735; */
- /* border-bottom: medium solid #6c2735; */
- border-left: 10px solid #6c2735;
- border-bottom: medium solid #f7c2c2;
- color: #f7c2c2;
- /* color: #cc528b; */
- font-family: "あずきフォント";
- -ms-font-feature-settings: "normal";
- }
- /* 送信ボタン */
- input[type="submit"] {
- padding: 10px 20px;
- border: none;
- /* background: #9FD6D2; */
- background: #f7c2c2;
- color: #fff;
- font-family: "あずきフォント";
- }
- /* 送信ボタン - マウスオーバー時 */
- input[type="submit"]:hover {
- /* background: #54A9BD; */
- background: #ff9b9f;
- font-family: "あずきフォント";
- }
- /* 送信ボタン - 押せないとき */
- input[type="submit"][disabled] {
- background-color: #ccc;
- cursor: default;
- font-family: "あずきフォント";
- }
- input.example,select {
- width: 250px;
- font-family: "あずきフォント";
- }
- textarea {
- width: 480px;
- font-family: "あずきフォント";
- }
- .styled-select select {
- background: transparent;
- width: 268px;
- padding: 5px;
- font-size: 16px;
- line-height: 1;
- border: 0;
- border-radius: 0;
- height: 34px;
- -webkit-appearance: none;
- }
- /* select{ */
- /* color: white; */
- /* background-color: #f3b3e6; */
- /* } */
- /* カーソルをあてた時に変わる色 */
- input:focus,select:focus,textarea:focus {
- background-color: #f7c2c2;
- /* background-color: #f2dae8; */
- font-family: "あずきフォント";
- border:solid 1px #cc528b;
- }
- /*検索ボタン*/
- input[type="button"] {
- background: #f7c2c2;
- color: white;
- /* width: 55px; */
- height: 30px;
- border: 0;
- line-height: 30px;
- font-family: "あずきフォント";
- }
- input[type="button"]:hover {
- background: #ff9b9f;
- height: 30px;
- color: #fff;
- border: 0;
- cursor: pointer;
- font-family: "あずきフォント";
- }
- input[type="button"].disabled {
- background: #f7c2c2;
- cursor: default;
- }
- input[type="button"].disabled:hover {
- background: #f7c2c2;
- font-family: "あずきフォント";
- }
- /* @font-face { */
- /* font-family: あずきフォント; */
- /* src: url(azuki.ttf) format("truetype"); */
- /* url(azuki.woff) format("woff"); /* Modern Browsers */ */
- /* } */
- @font-face{
- font-family: 'あずきフォント'; /* お好きな名前に */
- src: url('azuki.eot'); /* IE9以上用 */
- src: url('azuki.eot?#iefix') format('embedded-opentype'), /* IE8以前用 */
- url('azuki.woff') format('woff'), /* モダンブラウザ用 */
- url('azuki.ttf') format('truetype'); /* iOS, Android用 */
- }
- .stepBar {
- position: relative;
- list-style: none;
- margin: 0 0 1em;
- padding: 0;
- text-align: center;
- width: 100%;
- overflow: hidden;
- *zoom: 1;
- font-family: "あずきフォント";
- }
- .stepBar .step {
- position: relative;
- float: left;
- display: inline-block;
- line-height: 40px;
- padding: 0 40px 0 20px;
- background-color: #eee;
- -moz-box-sizing: border-box;
- -webkit-box-sizing: border-box;
- box-sizing: border-box;
- }
- .stepBar .step:before, .stepBar .step:after {
- position: absolute;
- left: -15px;
- display: block;
- content: '';
- background-color: #eee;
- border-left: 4px solid #FFF;
- width: 20px;
- height: 20px;
- }
- .stepBar .step:after {
- top: 0;
- -moz-transform: skew(30deg);
- -ms-transform: skew(30deg);
- -webkit-transform: skew(30deg);
- transform: skew(30deg);
- }
- .stepBar .step:before {
- bottom: 0;
- -moz-transform: skew(-30deg);
- -ms-transform: skew(-30deg);
- -webkit-transform: skew(-30deg);
- transform: skew(-30deg);
- }
- .stepBar .step:first-child {
- -moz-border-radius-topleft: 4px;
- -webkit-border-top-left-radius: 4px;
- border-top-left-radius: 4px;
- -moz-border-radius-bottomleft: 4px;
- -webkit-border-bottom-left-radius: 4px;
- border-bottom-left-radius: 4px;
- }
- .stepBar .step:first-child:before, .stepBar .step:first-child:after {
- content: none;
- }
- .stepBar .step:last-child {
- -moz-border-radius-topright: 4px;
- -webkit-border-top-right-radius: 4px;
- border-top-right-radius: 4px;
- -moz-border-radius-bottomright: 4px;
- -webkit-border-bottom-right-radius: 4px;
- border-bottom-right-radius: 4px;
- }
- .stepBar .step.current {
- color: #FFF;
- background-color: #6c2735;
- font-family: "あずきフォント";
- }
- .stepBar:hover{
- background-color:#DEC8B1';
- }
- .stepBar .step.current:before, .stepBar .step.current:after {
- background-color: #6c2735;
- onmouseover="style.background='#DEC8B1'";
- onmouseout="style.background='#6c2735'";
- font-family: "あずきフォント";
- }
- .stepBar.step2 .step {
- width: 50%;
- }
- .stepBar.step3 .step {
- width: 33.333%;
- }
- .stepBar.step4 .step {
- width: 25%;
- }
- .stepBar.step5 .step {
- width: 20%;
- }
- div.img-move a:hover {
- position: relative;
- top: -1px;
- left: -1px;
- }
- div.img-move a:active {
- position: relative;
- top: 5px;
- left: 5px;
- }
- .button,
- .button span {
- position: relative;
- display: inline-block;
- }
- .button span {
- padding: .65em 4em;
- background: -webkit-linear-gradient(#fe5f95 , #ff3f7f);
- background: linear-gradient(#fe5f95 , #ff3f7f);
- border: 1px solid #fe3276;
- border-radius: 4px;
- color: #fff;
- text-decoration: none;
- text-align: center;
- -webkit-animation: 3s float ease-in-out infinite;
- animation: 3s float ease-in-out infinite;
- }
- .button::after {
- position: absolute;
- bottom: -15px;
- left: 50%;
- z-index: -1;
- content: '';
- width: 100%;
- height: 24px;
- background-color: rgba(0,0,0,.1);
- border-radius: 50%;
- -webkit-transform: translateX(-50%);
- transform: translateX(-50%);
- -webkit-animation: 3s shadow ease-in-out infinite;
- animation: 3s shadow ease-in-out infinite;
- }
- @-webkit-keyframes float {
- 50% {
- -webkit-transform: translateY(-10px);
- }
- }
- @keyframes float {
- 50% {
- transform: translateY(-10px);
- }
- }
- @-webkit-keyframes shadow {
- 50% {
- width: 70%;
- height: 18px;
- }
- }
- @keyframes shadow {
- 50% {
- width: 70%;
- height: 18px;
- }
- }
- </style>
- <h1 class="title_a">ひとこと掲示板</h1>
- <p class="textstyle">投稿するメッセージを入力してください。</p>
- <form action="board-output.php" method="post">
- <input type="text" name="message">
- <input type="submit" value="投稿">
- </form>
- <button onclick="history.back()">戻る</button>
- <p class="textstyle">
- <a href="board-output.php">ひとこと掲示板へ</a>
- </p>
- <?php require 'footer.php'; ?>
- ■board-output.php
- <?php
- ?>
- <?php require 'header.php'; ?>
- <style type="text/css">
- <!--
- html,body {
- background-color: transparent;
- scrollbar-arrow-color: #ffccff;
- scrollbar-face-color: #ffcccc;
- scrollbar-3dlight-color: #ffffff;
- scrollbar-darkshadow-color: #ffcccc;
- scrollbar-highlight-color: #ff9999;
- scrollbar-shadow-color: #ff9999;
- scrollbar-track-color: #ffffff;
- }
- -->
- p#submit_btn {
- text-align: center;
- font-family: "あずきフォント";
- }
- .content {
- /* margin-left: 137px; */
- margin-top: 0px;
- font-size: 95%;
- font-weight: bold;
- font-family: "あずきフォント";
- /* color: #6c2735; */
- color: #f3b3e6;
- }
- .form {
- color: white;
- background-color: #9FD6D2;
- text-align: center;
- /* padding-left: 370px; */
- padding-top: 5px;
- padding-bottom: 5px;
- font-weight: bold;
- font-size: 95%;
- width: 825px;
- font-family: "あずきフォント";
- }
- .textform {
- margin-left: 68px;
- }
- .textform_postalCode {
- margin-left: 30px;
- }
- .textstyle {
- font-size: 95%;
- /* color: #6c2735; */
- color: #f7c2c2;
- font-weight: bold;
- font-family: "あずきフォント";
- }
- .required {
- font-size: 87%;
- font-weight: normal;
- color: red;
- font-family: "あずきフォント";
- }
- .title_a{
- color: #f7c2c2;
- font-weight: bold;
- font-family: "あずきフォント";
- }
- #heading {
- /* border-left: 10px solid #6c2735; */
- /* border-bottom: medium solid #6c2735; */
- border-left: 10px solid #6c2735;
- border-bottom: medium solid #f7c2c2;
- color: #f7c2c2;
- /* color: #cc528b; */
- font-family: "あずきフォント";
- -ms-font-feature-settings: "normal";
- }
- /* 送信ボタン */
- input[type="submit"] {
- padding: 10px 20px;
- border: none;
- /* background: #9FD6D2; */
- background: #f7c2c2;
- color: #fff;
- font-family: "あずきフォント";
- }
- /* 送信ボタン - マウスオーバー時 */
- input[type="submit"]:hover {
- /* background: #54A9BD; */
- background: #ff9b9f;
- font-family: "あずきフォント";
- }
- /* 送信ボタン - 押せないとき */
- input[type="submit"][disabled] {
- background-color: #ccc;
- cursor: default;
- font-family: "あずきフォント";
- }
- input.example,select {
- width: 250px;
- font-family: "あずきフォント";
- }
- textarea {
- width: 480px;
- font-family: "あずきフォント";
- }
- .styled-select select {
- background: transparent;
- width: 268px;
- padding: 5px;
- font-size: 16px;
- line-height: 1;
- border: 0;
- border-radius: 0;
- height: 34px;
- -webkit-appearance: none;
- }
- /* select{ */
- /* color: white; */
- /* background-color: #f3b3e6; */
- /* } */
- /* カーソルをあてた時に変わる色 */
- input:focus,select:focus,textarea:focus {
- background-color: #f7c2c2;
- /* background-color: #f2dae8; */
- font-family: "あずきフォント";
- border:solid 1px #cc528b;
- }
- /*検索ボタン*/
- input[type="button"] {
- background: #f7c2c2;
- color: white;
- /* width: 55px; */
- height: 30px;
- border: 0;
- line-height: 30px;
- font-family: "あずきフォント";
- }
- input[type="button"]:hover {
- background: #ff9b9f;
- height: 30px;
- color: #fff;
- border: 0;
- cursor: pointer;
- font-family: "あずきフォント";
- }
- input[type="button"].disabled {
- background: #f7c2c2;
- cursor: default;
- }
- input[type="button"].disabled:hover {
- background: #f7c2c2;
- font-family: "あずきフォント";
- }
- /* @font-face { */
- /* font-family: あずきフォント; */
- /* src: url(azuki.ttf) format("truetype"); */
- /* url(azuki.woff) format("woff"); /* Modern Browsers */ */
- /* } */
- @font-face{
- font-family: 'あずきフォント'; /* お好きな名前に */
- src: url('azuki.eot'); /* IE9以上用 */
- src: url('azuki.eot?#iefix') format('embedded-opentype'), /* IE8以前用 */
- url('azuki.woff') format('woff'), /* モダンブラウザ用 */
- url('azuki.ttf') format('truetype'); /* iOS, Android用 */
- }
- .stepBar {
- position: relative;
- list-style: none;
- margin: 0 0 1em;
- padding: 0;
- text-align: center;
- width: 100%;
- overflow: hidden;
- *zoom: 1;
- font-family: "あずきフォント";
- }
- .stepBar .step {
- position: relative;
- float: left;
- display: inline-block;
- line-height: 40px;
- padding: 0 40px 0 20px;
- background-color: #eee;
- -moz-box-sizing: border-box;
- -webkit-box-sizing: border-box;
- box-sizing: border-box;
- }
- .stepBar .step:before, .stepBar .step:after {
- position: absolute;
- left: -15px;
- display: block;
- content: '';
- background-color: #eee;
- border-left: 4px solid #FFF;
- width: 20px;
- height: 20px;
- }
- .stepBar .step:after {
- top: 0;
- -moz-transform: skew(30deg);
- -ms-transform: skew(30deg);
- -webkit-transform: skew(30deg);
- transform: skew(30deg);
- }
- .stepBar .step:before {
- bottom: 0;
- -moz-transform: skew(-30deg);
- -ms-transform: skew(-30deg);
- -webkit-transform: skew(-30deg);
- transform: skew(-30deg);
- }
- .stepBar .step:first-child {
- -moz-border-radius-topleft: 4px;
- -webkit-border-top-left-radius: 4px;
- border-top-left-radius: 4px;
- -moz-border-radius-bottomleft: 4px;
- -webkit-border-bottom-left-radius: 4px;
- border-bottom-left-radius: 4px;
- }
- .stepBar .step:first-child:before, .stepBar .step:first-child:after {
- content: none;
- }
- .stepBar .step:last-child {
- -moz-border-radius-topright: 4px;
- -webkit-border-top-right-radius: 4px;
- border-top-right-radius: 4px;
- -moz-border-radius-bottomright: 4px;
- -webkit-border-bottom-right-radius: 4px;
- border-bottom-right-radius: 4px;
- }
- .stepBar .step.current {
- color: #FFF;
- background-color: #6c2735;
- font-family: "あずきフォント";
- }
- .stepBar:hover{
- background-color:#DEC8B1';
- }
- .stepBar .step.current:before, .stepBar .step.current:after {
- background-color: #6c2735;
- onmouseover="style.background='#DEC8B1'";
- onmouseout="style.background='#6c2735'";
- font-family: "あずきフォント";
- }
- .stepBar.step2 .step {
- width: 50%;
- }
- .stepBar.step3 .step {
- width: 33.333%;
- }
- .stepBar.step4 .step {
- width: 25%;
- }
- .stepBar.step5 .step {
- width: 20%;
- }
- div.img-move a:hover {
- position: relative;
- top: -1px;
- left: -1px;
- }
- div.img-move a:active {
- position: relative;
- top: 5px;
- left: 5px;
- }
- </style>
- <h1 class="title_a">ひとこと掲示板</h1>
- <?php
- // if (isset($_POST['message']) && $_SERVER['REQUEST_METHOD'] === 'POST'){
- $file = 'memo53.txt';
- // ファイルが存在する時だけファイルを読み込む
- if (file_exists($file)) {
- // file_get_contents(ファイル名)→ファイルの全体を読み込み、内容を文字列として返す
- $board = json_decode(file_get_contents($file));
- }
- // $vMessage = array();
- // if(isset($_POST['message'])){
- // if(!($_POST['message']== null) && $_SERVER['REQUEST_METHOD'] === 'POST'){
- // $board[] = $_POST['message'];
- // }
- // }
- var_dump($board);
- // if(isset($_POST['command']) && $_POST['command']=='delete'){
- // if (($key = array_search($_POST['id'], $board)) !== false) {
- // unset($board[$key]);
- // }
- // var_dump($_POST['id']);
- // var_dump($board);
- // }
- file_put_contents($file, json_encode($board));
- if(!$board == null){
- foreach ($board as $message){
- echo '<form action="" method="post">';
- echo '<p class="textstyle">',$message,'</p><input type="hidden" name="command" value="delete"><input type="hidden" name="id" value="',$message,'"><button type="submit" style="border: 1px solid #902342; color: #902342; background-color: #f2dae8;">
- 削除</button><hr>';
- echo '</form>';
- }
- }
- // }
- ?>
- <p class="textstyle">
- <a href="board-input.php">投稿画面へ</a>
- </p>
- <?php require 'footer.php';?>
- <?php
- // var_dump($board);
- // var_dump($_POST['message']);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement