diff --git a/account.png b/account.png new file mode 100644 index 0000000..9defa95 Binary files /dev/null and b/account.png differ diff --git a/bell.png b/bell.png new file mode 100644 index 0000000..ceb45d7 Binary files /dev/null and b/bell.png differ diff --git a/defult.html b/defult.html new file mode 100644 index 0000000..72e8694 --- /dev/null +++ b/defult.html @@ -0,0 +1,22 @@ + + + + + タイトルタブ + + + +
+

タイトル

+
+
+

+ 概要 +

+
+ + +
+ + \ No newline at end of file diff --git a/home.php b/home.php new file mode 100644 index 0000000..705c6eb --- /dev/null +++ b/home.php @@ -0,0 +1,248 @@ +Welcome, " . $_SESSION['username'] . "!

"; + + // セッションが有効期限切れになったかどうかをチェック + if (time() > $_SESSION['expire_time']) { + // セッションを終了して、login.htmlにリダイレクト + session_unset(); + session_destroy(); + header('Location: defult.html'); + exit(); + } +} else { + // セッションが開始されていない場合、login.htmlにリダイレクト + header('Location: defult.html'); + exit(); +} + +//アップロードが成功したかのチェック +if (isset($_GET['s']) && $_GET['s'] == 1) { + echo ''; + // $url = strtok($_SERVER["REQUEST_URI"], '?'); + // header("Location: $url"); + // exit(); + +} +?> + + + + + + + ホーム画面 + + + + +
+
+ + タイトル + + + + + + +
+
+ +
+ +
+ + query($sql); + $n = 1; + ?> + + +
+
+
+

+ fetch_assoc(); + $name = $row['SongName']; + $count = $row['count']; + // 1位を表示 + echo "

第" . $n . "位" . "
" . "
" . $name . "
" . "
" . $count . "件

"; + $n += 1; + ?> +

+
+
+

+ fetch_assoc(); + $name = $row['SongName']; + $count = $row['count']; + echo "

第" . $n . "位" . "
" . "
" . $name . "
" . "
" . $count . "件

"; + $n += 1; + ?> +

+
+
+

+ fetch_assoc(); + $name = $row['SongName']; + $count = $row['count']; + echo "

第" . $n . "位" . "
" . "
" . $name . "
" . "
" . $count . "件

"; + $n += 1; + ?> +

+
+
+

+ fetch_assoc(); + $name = $row['SongName']; + $count = $row['count']; + echo "

第" . $n . "位" . "
" . "
" . $name . "
" . "
" . $count . "件

"; + $n += 1; + ?> +

+

+
+
+

+ fetch_assoc(); + $name = $row['SongName']; + $count = $row['count']; + echo "

第" . $n . "位" . "
" . "
" . $name . "
" . "
" . $count . "件

"; + $n += 1; + ?> +

+

+
+
+
+
+
+
+

+ fetch_assoc(); + $name = $row['SongName']; + $count = $row['count']; + echo "

第" . $n . "位" . "
" . "
" . $name . "
" . "
" . $count . "件

"; + $n += 1; + ?> +

+

+
+
+

+ fetch_assoc(); + $name = $row['SongName']; + $count = $row['count']; + echo "

第" . $n . "位" . "
" . "
" . $name . "
" . "
" . $count . "件

"; + $n += 1; + ?> +

+

+
+
+

+ fetch_assoc(); + $name = $row['SongName']; + $count = $row['count']; + echo "

第" . $n . "位" . "
" . "
" . $name . "
" . "
" . $count . "件

"; + $n += 1; + ?> +

+

+
+
+

+ fetch_assoc(); + $name = $row['SongName']; + $count = $row['count']; + echo "

第" . $n . "位" . "
" . "
" . $name . "
" . "
" . $count . "件

"; + $n += 1; + ?> +

+

+
+
+

+ fetch_assoc(); + $name = $row['SongName']; + $count = $row['count']; + echo "

第" . $n . "位" . "
" . "
" . $name . "
" . "
" . $count . "件

"; + $n += 1; + ?> +

+

+
+
+
+ + + + +close(); +?> \ No newline at end of file diff --git a/identify.php b/identify.php index a89f509..53e281f 100644 --- a/identify.php +++ b/identify.php @@ -1,4 +1,6 @@ query($sql); //echo $result -> num_rows; @@ -28,10 +30,29 @@ echo '認証に失敗しました。'.mysqli_error(); }else{ echo '認証に成功しました'; - header("location: index.html"); + + // パスワードが正しい場合、セッションを開始 + $_SESSION['authenticated'] = true; + $_SESSION['username'] = $username; + + // 10秒後にセッションを終了するためにタイマーを設定 + $_SESSION['expire_time'] = time() + 10; + + // index.htmlにリダイレクト + header('Location: index.php'); + exit(); +} + +if(isset($_POST['back'])) { + header("location: login.html"); } // 切断 $mysqli->close(); ?> + +
+ +
+ diff --git a/index.php b/index.php new file mode 100644 index 0000000..0264fb6 --- /dev/null +++ b/index.php @@ -0,0 +1,22 @@ +Welcome, " . $_SESSION['username'] . "!

"; + + // セッションが有効期限切れになったかどうかをチェック + if (time() > $_SESSION['expire_time']) { + // セッションを終了して、login.htmlにリダイレクト + session_unset(); + session_destroy(); + header('Location: login.html'); + exit(); + } + } else { + // セッションが開始されていない場合、login.htmlにリダイレクト + header('Location: login.html'); + exit(); + } + ?> + + \ No newline at end of file diff --git a/login®ister.css b/login®ister.css new file mode 100644 index 0000000..cad7a84 --- /dev/null +++ b/login®ister.css @@ -0,0 +1,93 @@ +* { + margin: 0; + padding: 0; + border: none; + list-style: none; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + body { + font: 15px/1.25 'Alef'; + color: #111; + } + form { + margin: 70px auto; + background: #2a3644; + width: 347px; + text-align: center; + padding: 40px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + -ms-border-radius: 6px; + -o-border-radius: 6px; + border-radius: 6px; + } + form > h1 { + color: #f4f4f4; + text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.7); + font-weight: 400; + margin-bottom: 20px; + } + input { + background: rgba(0, 0, 0, 0.2); + color: #fff; + text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.3); + display: block; + width: 269px; + padding: 15px; + margin-bottom: 10px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + -ms-border-radius: 6px; + -o-border-radius: 6px; + border-radius: 6px; + -webkit-transition: all 0.1s ease-in-out; + -moz-transition: all 0.1s ease-in-out; + transition: all 0.1s ease-in-out; + outline: none; + } + input:focus { + background: rgba(0, 0, 0, 0.1); + -webkit-transition: all 0.1s ease-in-out; + -moz-transition: all 0.1s ease-in-out; + transition: all 0.1s ease-in-out; + } + ::-webkit-input-placeholder { + color: rgba(225, 225, 225, 0.4); + } + :-moz-placeholder { + color: rgba(225, 225, 225, 0.4); + } + ::-moz-placeholder { + color: rgba(225, 225, 225, 0.4); + } + :-ms-input-placeholder { + color: rgba(225, 225, 225, 0.4); + } + button { + position: relative; + display: block; + margin-top: 15px; + margin-bottom: 15px; + padding: 17px; + width: 270px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + -ms-border-radius: 6px; + -o-border-radius: 6px; + border-radius: 6px; + -webkit-transition: all 0.1s ease-in-out; + -moz-transition: all 0.1s ease-in-out; + transition: all 0.1s ease-in-out; + font-size: 1.2em; + background: #f26964; + color: #f4f4f4; + box-shadow: 0px 3px 0px #ab4b47; + cursor: pointer; + } + button:active { + top: 3px; + box-shadow: none; + } + \ No newline at end of file diff --git a/login.html b/login.html index 92ecbea..2ea00bf 100644 --- a/login.html +++ b/login.html @@ -3,44 +3,65 @@ - + - -
-

新規登録

- - -
- - -
- -
- - -
-

ログイン

- - -
- - -
- + +

ログイン

+ + + + +
\ No newline at end of file diff --git a/login.php b/login.php index fd9b6ac..9fefab4 100644 --- a/login.php +++ b/login.php @@ -18,7 +18,7 @@ // データを挿入する -$sql = "INSERT INTO `User` (`username`, `passward`) VALUES ('" .$hashedUsername. "', '" .$hashedPassword. "');";//クエリ +$sql = "INSERT INTO `User` (`username`, `password`) VALUES ('" .$hashedUsername. "', '" .$hashedPassword. "');";//クエリ $result = $mysqli->query($sql); diff --git a/register.html b/register.html new file mode 100644 index 0000000..13b1063 --- /dev/null +++ b/register.html @@ -0,0 +1,66 @@ + + + + + + + + + +
+

登録

+ + + + + +
+ + + + + + \ No newline at end of file diff --git a/upload.css b/upload.css new file mode 100644 index 0000000..dca48e1 --- /dev/null +++ b/upload.css @@ -0,0 +1,236 @@ +* { box-sizing:border-box; } + +body { + font-family: Helvetica; + background: #eee; + -webkit-font-smoothing: antialiased; +} + +hgroup { + text-align:center; + margin-top: 4em; +} + +h1, h3 { font-weight: 300; } + +h1 { color: #636363; } + +h3 { color: #4a89dc; } + +form { + width: 380px; + margin: 4em auto; + padding: 3em 2em 2em 2em; + background: #fafafa; + border: 1px solid #ebebeb; + box-shadow: rgba(0,0,0,0.14902) 0px 1px 1px 0px,rgba(0,0,0,0.09804) 0px 1px 2px 0px; +} + +.group { + position: relative; + margin-bottom: 45px; +} + +input { + font-size: 18px; + padding: 10px 10px 10px 5px; + -webkit-appearance: none; + display: block; + background: #fafafa; + color: #636363; + width: 100%; + border: none; + border-radius: 0; + border-bottom: 1px solid #757575; +} + +input:focus { outline: none; } + + +/* Label */ + +label { + color: #999; + font-size: 18px; + font-weight: normal; + position: absolute; + pointer-events: none; + left: 5px; + top: 10px; + transition: all 0.2s ease; +} + + +/* active */ + +input:focus ~ label, input.used ~ label { + top: -20px; + transform: scale(.75); left: -2px; + /* font-size: 14px; */ + color: #4a89dc; +} + + +/* Underline */ + +.bar { + position: relative; + display: block; + width: 100%; +} + +.bar:before, .bar:after { + content: ''; + height: 2px; + width: 0; + bottom: 1px; + position: absolute; + background: #4a89dc; + transition: all 0.2s ease; +} + +.bar:before { left: 50%; } + +.bar:after { right: 50%; } + + +/* active */ + +input:focus ~ .bar:before, input:focus ~ .bar:after { width: 50%; } + + +/* Highlight */ + +.highlight { + position: absolute; + height: 60%; + width: 100px; + top: 25%; + left: 0; + pointer-events: none; + opacity: 0.5; +} + + +/* active */ + +input:focus ~ .highlight { + animation: inputHighlighter 0.3s ease; +} + + +/* Animations */ + +@keyframes inputHighlighter { + from { background: #4a89dc; } + to { width: 0; background: transparent; } +} + + +/* Button */ + +.button { + position: relative; + display: inline-block; + padding: 12px 24px; + margin: .3em 0 1em 0; + width: 100%; + vertical-align: middle; + color: #fff; + font-size: 16px; + line-height: 20px; + -webkit-font-smoothing: antialiased; + text-align: center; + letter-spacing: 1px; + background: transparent; + border: 0; + border-bottom: 2px solid #3160B6; + cursor: pointer; + transition: all 0.15s ease; +} +.button:focus { outline: 0; } + + +/* Button modifiers */ + +.buttonBlue { + background: #4a89dc; + text-shadow: 1px 1px 0 rgba(39, 110, 204, .5); +} + +.buttonBlue:hover { background: #357bd8; } + + +/* Ripples container */ + +.ripples { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + overflow: hidden; + background: transparent; +} + + +/* Ripples circle */ + +.ripplesCircle { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + opacity: 0; + width: 0; + height: 0; + border-radius: 50%; + background: rgba(255, 255, 255, 0.25); +} + +.ripples.is-active .ripplesCircle { + animation: ripples .4s ease-in; +} + + +/* Ripples animation */ + +@keyframes ripples { + 0% { opacity: 0; } + + 25% { opacity: 1; } + + 100% { + width: 200%; + padding-bottom: 200%; + opacity: 0; + } +} + +footer { text-align: center; } + +footer p { + color: #888; + font-size: 13px; + letter-spacing: .4px; +} + +footer a { + color: #4a89dc; + text-decoration: none; + transition: all .2s ease; +} + +footer a:hover { + color: #666; + text-decoration: underline; +} + +footer img { + width: 80px; + transition: all .2s ease; +} + +footer img:hover { opacity: .83; } + +footer img:focus , footer a:focus { outline: none; } \ No newline at end of file diff --git a/upload.php b/upload.php new file mode 100644 index 0000000..c5114b8 --- /dev/null +++ b/upload.php @@ -0,0 +1,144 @@ +Welcome, " . $_SESSION['username'] . "!

"; + + // セッションが有効期限切れになったかどうかをチェック + if (time() > $_SESSION['expire_time']) { + // セッションを終了して、login.htmlにリダイレクト + session_unset(); + session_destroy(); + header('Location: defult.html'); + exit(); + } +} else { + // セッションが開始されていない場合、login.htmlにリダイレクト + header('Location: defult.html'); + exit(); +} +?> + + + + + + + + + + + + + +
+

楽曲アップロードページ

+ +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+ + + + + + + + + +query($sql); + +if (!$result) { + //echo 'INSERTが失敗しました。' . mysqli_error(); +} else { + //echo 'INSERTが成功しました。'; + header("Location: home.php?s=1"); +} + +// 切断 +$mysqli->close(); + +?> \ No newline at end of file