要らないものを消した
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
]);
|
||||
|
||||
// 返事だったら、メールを送って
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
if (!empty($g->display_name)) $g->showname = $g->display_name;
|
||||
else $g->showname = $g->username;
|
||||
|
|
|
@ -66,16 +66,10 @@ 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);
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($get->display_name)) $get->showname = $get->display_name;
|
||||
else $get->showname = $get->username;
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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' => 'ユーザ名は既に登録しています。');
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
}
|
変更前 幅: | 高さ: | サイズ: 2.1 MiB |
変更前 幅: | 高さ: | サイズ: 4.3 KiB |
変更前 幅: | 高さ: | サイズ: 2.1 KiB |
変更前 幅: | 高さ: | サイズ: 162 KiB |
変更前 幅: | 高さ: | サイズ: 162 KiB |
変更前 幅: | 高さ: | サイズ: 11 KiB |
変更前 幅: | 高さ: | サイズ: 9.8 KiB |
変更前 幅: | 高さ: | サイズ: 7.2 KiB |
変更前 幅: | 高さ: | サイズ: 14 KiB |
変更前 幅: | 高さ: | サイズ: 191 KiB |
変更前 幅: | 高さ: | サイズ: 5.5 KiB |
|
@ -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');
|