ソースを参照

エロ

pull/16/head
コミット
57614eb8db
  1. 21
      .env.example
  2. 10
      app/Http/Controllers/BashController.php
  3. 2
      app/Http/Controllers/Home/Comment.php
  4. 8
      resources/views/pages/site/index.blade.php
  5. 6
      resources/views/pages/site/login.blade.php
  6. 2
      resources/views/theme/techsuwa/component/navbar.blade.php
  7. 37
      routes/view/site.php

21
.env.example

@ -2,6 +2,7 @@ APP_NAME=076Server
APP_ENV=local
APP_KEY=
APP_DEBUG=false
APP_LOG_LEVEL=debug
APP_URL=http://localhost
ONION_HOST=jkdasfhfdhndsfnklhjfdsknjfdgsjk.onion
SESSION_SECURE_COOKIE=false
@ -10,7 +11,15 @@ THEME="techsuwa"
CSSENGINE="lolita"
CSSMINIFY=true
ENABLE_REGISTER=false
HAS_ADMIN=false
OWNER_NAME=""
OWNER_PASS=""
ADMIN_NAME=""
ADMIN_PASS=""
LOG_CHANNEL=stack
LOG_LEVEL=debug
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
@ -25,6 +34,8 @@ QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
MEMCACHED_HOST=127.0.0.1
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
@ -35,6 +46,8 @@ MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_OWNER_ADDRESS=null
MAIL_OWNER_NAME="${APP_NAME}"
MAIL_FROM_ADDRESS=null
MAIL_FROM_NAME="${APP_NAME}"
@ -44,4 +57,10 @@ GMO_SECRET=""
CONOHA_DENANT_ID=""
CONOHA_DENANT_NAME=""
CONOHA_USER_NAME=""
CONOHA_USER_PASS=""
CONOHA_USER_PASS=""
YOUTUBE_API=""
LBRY_URI=""
PEER_URI=""
PEER_USER=""
PEER_PASS=""

10
app/Http/Controllers/BashController.php

@ -28,11 +28,11 @@ class BashController extends Controller {
if (mb_substr($args[$i], 0, 1, 'utf-8')) $opt = $args[$i];
}
if (strpos($opt, 'l') !== false) {
if (str_contains($opt, 'l')) {
$ps = null;
$pg = null;
if (strpos($opt, 't') !== false) {
if (str_contains($opt, 't')) {
$pg = DB::table('blg_content')->select('publish_date')->where('isPost', 0)->orderBy('title', 'asc')->first();
$ps = DB::table('blg_content')->select('publish_date')->where('isPost', 1)->orderBy('title', 'asc')->first();
}
@ -42,8 +42,8 @@ class BashController extends Controller {
}
return "合計 2<br />
drwxr-xr-x 2 suwako suwako ".(strpos($opt, 'h') !== false ? '4.0K' : '4096')." ".date('m', $ps->publish_date)."月 ".date('d', $ps->publish_date)." ".date('H:i', $ps->publish_date)." post<br />
drwxr-xr-x 2 suwako suwako ".(strpos($opt, 'h') !== false ? '4.0K' : '4096')." ".date('m', $pg->publish_date)."月 ".date('d', $pg->publish_date)." ".date('H:i', $pg->publish_date)." page";
drwxr-xr-x 2 suwako suwako ".(str_contains($opt, 'h') ? '4.0K' : '4096')." ".date('m', $ps->publish_date)."月 ".date('d', $ps->publish_date)." ".date('H:i', $ps->publish_date)." post<br />
drwxr-xr-x 2 suwako suwako ".(str_contains($opt, 'h') ? '4.0K' : '4096')." ".date('m', $pg->publish_date)."月 ".date('d', $pg->publish_date)." ".date('H:i', $pg->publish_date)." page";
}
return 'post page';
@ -57,7 +57,7 @@ drwxr-xr-x 2 suwako suwako ".(strpos($opt, 'h') !== false ? '4.0K' : '4096')."
$slug = '';
for ($i = 1; $i < count($cat); $i++) {
if (strpos($cat[$i], 'post') !== false) $mode = 1;
if (str_contains($cat[$i], 'post')) $mode = 1;
$slug = $cat[$i];
}

2
app/Http/Controllers/Home/Comment.php

@ -13,7 +13,7 @@ class Comment {
$user = null;
if (isset($_COOKIE['kero_token'])) $user = DB::table('users')->select('id')->where('kero_token', $_COOKIE['kero_token'])->first()->id;
if ($user == 0 && (strpos($r->newmessage, 'http://') !== false || strpos($r->newmessage, 'https://') !== false)) return redirect('/');
if ($user == 0 && (str_contains($r->newmessage, 'http://') || str_contains($r->newmessage, 'https://'))) return redirect('/');
$add = DB::table('blg_comments')->insertGetId([
'user_id' => $user,

8
resources/views/pages/site/index.blade.php

@ -4,11 +4,11 @@
<div class="indexborder">
@foreach ($res as $k => $r)
<div class="within {{ ($r->public_status !== 0 ? ' wny' : '') }}" style="margin: {{ ($k == 0 ? 0 : 16) }}px auto {{ ($k == count($res)-1 ? 0 : 16) }}px">
<div class="bar {{ ($r->public_status !== 0 ? ' bny' : '') }}">
<a href="/blog/{{ $r->slug }}">{{ $r->title }}</a>
<div class="within {{ ($r->public_status !== 0 ? ' wny' : '') }}" style="margin: {{ ($k == 0 ? 0 : 16) }}px auto {{ ($k == count($res)-1 ? 0 : 16) }}px">
<div class="bar {{ ($r->public_status !== 0 ? ' bny' : '') }}">
<a href="/blog/{{ $r->slug }}">{{ $r->title }}</a>
</div>
</div>
</div>
@endforeach
</div>

6
resources/views/pages/site/login.blade.php

@ -6,9 +6,9 @@
<div class="bar">{{ __('site.signin') }}</div>
<div class="back">
@if ($err)
<div class="alert alert-danger" role="alert">
{{ $err }}
</div>
<div class="alert alert-danger" role="alert">
{{ $err }}
</div>
@endif
<form method="POST" action="/login">
@csrf

2
resources/views/theme/techsuwa/component/navbar.blade.php

@ -2,7 +2,7 @@
<div class="collapse navbar-collapse">
<a href="#" class="navbar-brand"><img src="/img/favicon.jpeg" style="border-radius: 4px;" width="30" height="30" alt="favicon" /></a>
<ul class="navbar-nav mr-auto">
<li class="nav-item"><a class="nav-link{{ (strpos($_SERVER['REQUEST_URI'], '/blog') !== false || $_SERVER['REQUEST_URI'] == '/' ? ' active' : '') }}" href="/">{{ __('site.top') }}</a></li>
<li class="nav-item"><a class="nav-link{{ (str_contains($_SERVER['REQUEST_URI'], '/blog') || $_SERVER['REQUEST_URI'] == '/' ? ' active' : '') }}" href="/">{{ __('site.top') }}</a></li>
<li class="nav-item"><a class="nav-link" href="http://{{ env('ONION_HOST') }}">Tor</a></li>
</ul>
<ul class="navbar-nav ml-auto">

37
routes/view/site.php

@ -3,29 +3,32 @@
Route::get('/', 'Home\Index@index');
Route::get('/blog/{slug}', 'Home\Index@post');
Route::get('/changelang/{lang}', function ($lang) {
setcookie('language', $lang, time()+157788000, '/', $_SERVER['HTTP_HOST'], 0, 1);
return redirect('/');
Route::group(['prefix' => 'content'], function () {
Route::any('/add', 'Home\Content@add');
Route::any('/{slug}/edit', 'Home\Content@edit');
});
Route::any('/content/add', 'Home\Content@add');
Route::any('/content/{slug}/edit', 'Home\Content@edit');
Route::any('/login', 'User\Login@index');
Route::any('/register', 'User\Register@index');
Route::any('/profile/{id}/edit', 'User\Profile@edit');
Route::get('/profile/{id}', 'User\Profile@index');
Route::any('/video/game/add', 'Video\Game@add');
Route::any('/video/game/{slug}/edit', 'Video\Game@edit');
Route::any('/video/add', 'Video\VideoTable@add');
Route::any('/video/{vid}/edit', 'Video\VideoTable@edit');
Route::group(['prefix' => 'profile'], function () {
Route::any('/{id}/edit', 'User\Profile@edit');
Route::get('/{id}', 'User\Profile@index');
});
Route::get('/video', 'Video\Game@index');
Route::get('/video/{slug}', 'Video\VideoTable@index');
Route::get('/video/play/{vid}', 'Video\Prayer@index');
Route::group(['prefix' => 'video'], function () {
Route::group(['prefix' => 'game'], function () {
Route::any('/add', 'Video\Game@add');
Route::any('/{slug}/edit', 'Video\Game@edit');
});
Route::any('/add', 'Video\VideoTable@add');
Route::any('/{vid}/edit', 'Video\VideoTable@edit');
Route::get('/', 'Video\Game@index');
Route::get('/{slug}', 'Video\VideoTable@index');
Route::get('/play/{vid}', 'Video\Prayer@index');
});
Route::get('/memberlist', 'User\MemberList@index');
Route::get('/commentlist', 'Home\CommentList@index');

読み込み中…
キャンセル
保存