diff --git a/src/_config.php b/src/_config.php new file mode 100644 index 0000000..17e77d9 --- /dev/null +++ b/src/_config.php @@ -0,0 +1,25 @@ +connect_error) { + die('Could not connect: ' . $link->connect_error); +} + +// 设置字符集 +$link->set_charset('utf8'); + +foreach ($_POST as $key => $value) { + if (stripos($value, 'sleep') !== false || stripos($value, 'benchmark') !== false) { + die('BAN sleep,benchmark'); + } +} +?> diff --git a/src/db.sql b/src/db.sql new file mode 100644 index 0000000..9e7544d --- /dev/null +++ b/src/db.sql @@ -0,0 +1,13 @@ +DROP DATABASE IF EXISTS `students`; +CREATE DATABASE students; +GRANT SELECT,INSERT,UPDATE,DELETE on students.* to haxo@'127.0.0.1' identified by 'haxo'; +GRANT SELECT,INSERT,UPDATE,DELETE on students.* to haxo@localhost identified by 'haxo'; +use students; + +/**/ CREATE TABLE `information` ( + `username` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL + ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +INSERT INTO `information` VALUES ('ikun', 'FLAGFLAGFLAG'); + diff --git a/src/image.png b/src/image.png new file mode 100644 index 0000000..59608bd Binary files /dev/null and b/src/image.png differ diff --git a/src/index.php b/src/index.php new file mode 100644 index 0000000..c9ee71b --- /dev/null +++ b/src/index.php @@ -0,0 +1,83 @@ + + + +
+ + + +query($query); + + if (!$result) { + die("۷αӵƻ֤ϵͽ!!"); + } + + $row = $result->fetch_assoc(); + + if ($row == false) { + error_die("Ǹû벻"); + } else { + $name = $row['username']; + $pass = $row['password']; + error_die("ԭ㰡~" . $name . "ף". $pass .""); + } +} +?> +
+ + + \ No newline at end of file diff --git a/src/shark.css b/src/shark.css new file mode 100644 index 0000000..d01f5d6 --- /dev/null +++ b/src/shark.css @@ -0,0 +1,133 @@ +* { + /* 去除浏览器默认内外边距 */ + margin: 0; + padding: 0; + box-sizing: border-box; +} + +body { + height: 100vh; + /* 溢出隐藏 */ + overflow: hidden; + /* 设置弹性布局 */ + display: flex; + justify-content: center; + align-items: center; + background-image: url(./images/image.png); + background-size: 100% 100%; +} + + + +/* 表单盒子 */ +.form-box { + position: absolute; + width: 400px; + height: 500px; + border-radius: 5px; + right: 40%; + /* 模糊,磨砂质感 */ + backdrop-filter: blur(10px); + box-shadow: 2px 1px 19px rgba(0, 0, 0, .1); + z-index: 99; +} + +.login-box, +.register-box { + /* 过渡动画 */ + transition: 2s ease-in-out; +} + +/* 一开始隐藏注册盒子 */ +.register-box { + display: none; +} + +/* 标题 */ +.title { + margin-top: 50px; + text-align: center; + /* 设置用户禁止选中 */ + user-select: none; + color: #fff; + /* 文字阴影 */ + text-shadow: 4px 4px 3px rgba(0, 0, 0, .1); +} + +/* 图片盒子 */ +.img-box { + width: 100px; + height: 100px; + margin: 10px auto; + user-select: none; + border-radius: 50%; + /* 溢出隐藏 */ + overflow: hidden; + box-shadow: 4px 4px 3px rgba(0, 0, 0, .1); +} + +/* 图片 */ +.img-box img { + width: 100%; +} + +/* 输入框盒子 */ +.input-box { + display: flex; + flex-direction: column; + align-items: center; +} + +/* 输入框 */ +input { + outline: none; + width: 60%; + height: 40px; + margin-bottom: 20px; + text-indent: 10px; + font-size: 16px; + font-weight: 500; + background-color: rgba(104, 76, 76, 0); + border-radius: 20px; + border: 1px solid #fff; + margin-left: 20%; +} + +input::placeholder { + font-size: 14px; + font-weight: 400; +} + +input:focus::placeholder { + opacity: 0; +} + +/* 按钮盒子 */ +.btn-box { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; +} + +/* 按钮 */ +button { + width: 100px; + height: 30px; + margin-bottom: 10px; + border: none; + color: #fff; + font-size: 16px; + border-radius: 4px; + background-color: #c08f8a; + /* border: 1px solid #e6a49d; */ +} + +button:hover { + cursor: pointer; +} + +.return { + position: absolute; + bottom: 10px; +} \ No newline at end of file