diff --git a/.gitignore b/.gitignore index db1f1cf..d6fdcbe 100644 --- a/.gitignore +++ b/.gitignore @@ -1,31 +1,9 @@ -/node_modules -/public/hot -/public/css.old -/public/js.old + /public/storage -/public/assets/avatars -/public/assets/board -/public/assets/images -/public/assets/objectdb -/public/assets/smileys -/public/assets/store -/public/blacklist.dat -/public/mix-manifest.json -/public/old -/public/img/old + /storage/*.key /vendor -/.idea -/.vagrant -Homestead.json -Homestead.yaml -npm-debug.log -yarn-error.log package-lock.json composer.lock -yarn.lock .env /storage/app/public/store -echoserv.js -laravel-echo-server.json -laravel-echo-server.json.bak diff --git a/app/Http/Controllers/Home/Comment.php b/app/Http/Controllers/Home/Comment.php index 4c1e451..bdd970b 100644 --- a/app/Http/Controllers/Home/Comment.php +++ b/app/Http/Controllers/Home/Comment.php @@ -10,21 +10,10 @@ class Comment { if (!isset($r->submit)) return ''; $isvideo = false; if (!$cont = DB::table('blg_content')->where('slug', $r->slug)->first()) { if ($cont = DB::table('vid_video')->where('vid', $r->slug)->first()) $isvideo = true; } - $banned = DB::table('blg_blacklist')->where('isShadow', 0)->get(); - foreach ($banned as $b) { - $ip = explode('.', getIp()); - $ban = explode('.', $b->ipaddress); - if ( - ($ban[0] == $ip[0] && $ban[1] == $ip[1] && $ban[2] == $ip[2] && $ban[3] == $ip[3]) || - ($ban[0] == $ip[0] && $ban[1] == $ip[1] && $ban[2] == $ip[2] && $ban[3] == '*') || - ($ban[0] == $ip[0] && $ban[1] == $ip[1] && $ban[2] == '*' && $ban[3] == '*') - ) return redirect('/'); - } $user = null; if (isset($_COOKIE['kero_token'])) $user = DB::table('users')->select('id')->where('kero_token', $_COOKIE['kero_token'])->first()->id; if ($user == 0 && (str_contains($r->newmessage, 'http://') || str_contains($r->newmessage, 'https://'))) return redirect('/'); - $shadow = DB::table('blg_blacklist')->where('isShadow', 1)->where('ipaddress', getIp())->first(); $add = DB::table('blg_comments')->insertGetId([ 'user_id' => $user, @@ -33,9 +22,7 @@ class Comment { 'name' => (isset($r->newname) ? $r->newname : null), 'email' => (isset($r->newmail) ? $r->newmail : null), 'message' => $r->newmessage, - 'created' => time(), - 'ipaddress' => getIp(), - 'isShadow' => ($shadow ? 0 : 1) + 'created' => time() ]); // 返事だったら、メールを送って diff --git a/app/Http/Controllers/Home/CommentList.php b/app/Http/Controllers/Home/CommentList.php index 2160dc3..0a357cc 100644 --- a/app/Http/Controllers/Home/CommentList.php +++ b/app/Http/Controllers/Home/CommentList.php @@ -38,14 +38,8 @@ class CommentList extends Engine { $g->avatar = $det['avatar']; } - if ($g->isShadow == 0) { - if (getIp() != $g->ipaddress) unset($get->comments[$k]); - } - else { - unset($g->email); - unset($g->ipaddress); - unset($g->isShadow); - } + + unset($g->email); if (!empty($g->display_name)) $g->showname = $g->display_name; else $g->showname = $g->username; diff --git a/app/Http/Controllers/Home/Index.php b/app/Http/Controllers/Home/Index.php index a653338..b912eb3 100644 --- a/app/Http/Controllers/Home/Index.php +++ b/app/Http/Controllers/Home/Index.php @@ -66,15 +66,9 @@ class Index { $c->avatar = $det['avatar']; } - if ($c->isShadow == 0) { - if (getIp() != $c->ipaddress) unset($get->comments['come'][$k]); - } - else { - unset($c->email); - unset($c->ipaddress); - unset($c->isShadow); - $c->created = date('Y年m月d日 H:i:s', $c->created); - } + + unset($c->email); + $c->created = date('Y年m月d日 H:i:s', $c->created); } if (!empty($get->display_name)) $get->showname = $get->display_name; diff --git a/app/Http/Controllers/User/Login.php b/app/Http/Controllers/User/Login.php index a5c49ce..b815da6 100644 --- a/app/Http/Controllers/User/Login.php +++ b/app/Http/Controllers/User/Login.php @@ -21,17 +21,6 @@ class Login { } public function login (Request $r) { - $banned = DB::table('blg_blacklist')->get(); - foreach ($banned as $b) { - $ip = explode('.', getIp()); - $ban = explode('.', $b->ipaddress); - if ( - ($ban[0] == $ip[0] && $ban[1] == $ip[1] && $ban[2] == $ip[2] && $ban[3] == $ip[3]) || - ($ban[0] == $ip[0] && $ban[1] == $ip[1] && $ban[2] == $ip[2] && $ban[3] == '*') || - ($ban[0] == $ip[0] && $ban[1] == $ip[1] && $ban[2] == '*' && $ban[3] == '*') - ) return redirect('/'); - } - if (!empty($r)) { $checkName = DB::table('users')->where('username', $r->username)->first(); diff --git a/app/Http/Controllers/User/Register.php b/app/Http/Controllers/User/Register.php index 178e97b..404926a 100644 --- a/app/Http/Controllers/User/Register.php +++ b/app/Http/Controllers/User/Register.php @@ -25,17 +25,6 @@ class Register { } public function register (Request $r) { - $banned = DB::table('blg_blacklist')->get(); - foreach ($banned as $b) { - $ip = explode('.', getIp()); - $ban = explode('.', $b->ipaddress); - if ( - ($ban[0] == $ip[0] && $ban[1] == $ip[1] && $ban[2] == $ip[2] && $ban[3] == $ip[3]) || - ($ban[0] == $ip[0] && $ban[1] == $ip[1] && $ban[2] == $ip[2] && $ban[3] == '*') || - ($ban[0] == $ip[0] && $ban[1] == $ip[1] && $ban[2] == '*' && $ban[3] == '*') - ) return redirect('/'); - } - if (!empty($r)) { $existUser = DB::table('users')->select('id')->where('username', $r->username)->count(); if ($existUser != 0) return array('err' => 'ユーザ名は既に登録しています。'); diff --git a/app/helpers.php b/app/helpers.php index c956c47..a54eb36 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -35,13 +35,6 @@ function getGroupColours () { return DB::table('usr_perm_module')->select('id', 'colour_m', 'colour_f', 'colour_u')->get()->toArray(); } -function getIp () { - if (!empty($_SERVER['HTTP_CLIENT_IP'])) $ip = $_SERVER['HTTP_CLIENT_IP']; - elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; - else $ip = $_SERVER['REMOTE_ADDR']; - return $ip; -} - function checkLegit ($t) { if (!isset($t) || empty($t) || is_null($t)) return 0; $check = DB::table('users')->select('id')->where('kero_token', $t)->first(); diff --git a/package.json b/package.json deleted file mode 100644 index 41cbd65..0000000 --- a/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "private": true, - "scripts": { - "dev": "npm run development", - "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", - "watch": "npm run development -- --watch", - "watch-poll": "npm run watch -- --watch-poll", - "w": "npm run watch -- --watch-poll", - "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --disable-host-check --config=node_modules/laravel-mix/setup/webpack.config.js", - "prod": "npm run production", - "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", - "clear": "php artisan cache:clear && php artisan view:clear && php artisan route:clear" - }, - "devDependencies": { - "axios": "^0.19.2", - "cross-env": "^7.0.3", - "laravel-mix": "^5.0.9", - "lodash": "^4.17.19", - "resolve-url-loader": "^3.1.0", - "sass": "^1.32.10", - "sass-loader": "^8.0.2", - "vue-template-compiler": "^2.6.12" - }, - "dependencies": { - "bootstrap": "^4.6.0", - "jquery": "^3.6.0", - "popper.js": "^1.16.1", - "vue": "^2.6.12", - "vue-bootstrap-datetimepicker": "^5.0.1", - "vue-draggable-resizable": "^2.3.0" - } -} diff --git a/resources/img/Eqjk_WgVQAE2psn.jpeg b/resources/img/Eqjk_WgVQAE2psn.jpeg deleted file mode 100644 index 86bd4c4..0000000 Binary files a/resources/img/Eqjk_WgVQAE2psn.jpeg and /dev/null differ diff --git a/resources/img/bitchute.png b/resources/img/bitchute.png deleted file mode 100644 index 7f88f0d..0000000 Binary files a/resources/img/bitchute.png and /dev/null differ diff --git a/resources/img/discord.png b/resources/img/discord.png deleted file mode 100644 index 972de89..0000000 Binary files a/resources/img/discord.png and /dev/null differ diff --git a/resources/img/header.jpg b/resources/img/header.jpg deleted file mode 100755 index 429516c..0000000 Binary files a/resources/img/header.jpg and /dev/null differ diff --git a/resources/img/header.png b/resources/img/header.png deleted file mode 100755 index 429516c..0000000 Binary files a/resources/img/header.png and /dev/null differ diff --git a/resources/img/mastodon.png b/resources/img/mastodon.png deleted file mode 100644 index c303ae3..0000000 Binary files a/resources/img/mastodon.png and /dev/null differ diff --git a/resources/img/matrix.png b/resources/img/matrix.png deleted file mode 100644 index a868f83..0000000 Binary files a/resources/img/matrix.png and /dev/null differ diff --git a/resources/img/niconico.png b/resources/img/niconico.png deleted file mode 100644 index 4b1f3c4..0000000 Binary files a/resources/img/niconico.png and /dev/null differ diff --git a/resources/img/odysee.png b/resources/img/odysee.png deleted file mode 100644 index 3b9ef3a..0000000 Binary files a/resources/img/odysee.png and /dev/null differ diff --git a/resources/img/tikyu.png b/resources/img/tikyu.png deleted file mode 100644 index 3bf6a6e..0000000 Binary files a/resources/img/tikyu.png and /dev/null differ diff --git a/resources/img/youtube.png b/resources/img/youtube.png deleted file mode 100644 index 9dc0a6b..0000000 Binary files a/resources/img/youtube.png and /dev/null differ diff --git a/webpack.mix.js b/webpack.mix.js deleted file mode 100644 index cd7b1f0..0000000 --- a/webpack.mix.js +++ /dev/null @@ -1,22 +0,0 @@ -const mix = require('laravel-mix'); - -/* - |-------------------------------------------------------------------------- - | Mix Asset Management - |-------------------------------------------------------------------------- - | - | Mix provides a clean, fluent API for defining some Webpack build steps - | for your Laravel application. By default, we are compiling the Sass - | file for the application as well as bundling up all the JS files. - | - */ - -mix.js('resources/js/app.js', 'public/js') - .sass('resources/sass/app.scss', 'public/css') - .sass('resources/sass/app_m.scss', 'public/css') - .sass('resources/sass/app_f.scss', 'public/css') - .copy('resources/fonts/*', 'public/fonts') - .copy('resources/img/*', 'public/img') - .copy('resources/img/bash/*', 'public/img/bash') - .copy('resources/img/flag/*', 'public/img/flag') - .copy('resources/img/flag/*', 'public/img/flag');