Browse Source

要らないものを消した

dev-master
parent
commit
b4616a46c7
  1. 26
      .gitignore
  2. 15
      app/Http/Controllers/Home/Comment.php
  3. 10
      app/Http/Controllers/Home/CommentList.php
  4. 12
      app/Http/Controllers/Home/Index.php
  5. 11
      app/Http/Controllers/User/Login.php
  6. 11
      app/Http/Controllers/User/Register.php
  7. 7
      app/helpers.php
  8. 32
      package.json
  9. BIN
      resources/img/Eqjk_WgVQAE2psn.jpeg
  10. BIN
      resources/img/bitchute.png
  11. BIN
      resources/img/discord.png
  12. BIN
      resources/img/header.jpg
  13. BIN
      resources/img/header.png
  14. BIN
      resources/img/mastodon.png
  15. BIN
      resources/img/matrix.png
  16. BIN
      resources/img/niconico.png
  17. BIN
      resources/img/odysee.png
  18. BIN
      resources/img/tikyu.png
  19. BIN
      resources/img/youtube.png
  20. 22
      webpack.mix.js

26
.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

15
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()
]);
// 返事だったら、メールを送って

10
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;

12
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;

11
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();

11
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' => 'ユーザ名は既に登録しています。');

7
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();

32
package.json

@ -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"
}
}

BIN
resources/img/Eqjk_WgVQAE2psn.jpeg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

BIN
resources/img/bitchute.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

BIN
resources/img/discord.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

BIN
resources/img/header.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 KiB

BIN
resources/img/header.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 KiB

BIN
resources/img/mastodon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

BIN
resources/img/matrix.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

BIN
resources/img/niconico.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

BIN
resources/img/odysee.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

BIN
resources/img/tikyu.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 191 KiB

BIN
resources/img/youtube.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

22
webpack.mix.js

@ -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');
Loading…
Cancel
Save