diff --git a/app/Http/Controllers/CategoryController.php b/app/Http/Controllers/CategoryController.php index 2d265d9..5968afd 100644 --- a/app/Http/Controllers/CategoryController.php +++ b/app/Http/Controllers/CategoryController.php @@ -74,9 +74,14 @@ class CategoryController extends Controller return redirect()->back()->with('error', 'Category is empty.'); } + $sfw = $video->tags->contains(function($key, $tag) { + return $tag->normalized === 'sfw'; + }); + return view('video', [ 'video' => $video, - 'related' => $category, + 'related' => $category, + 'sfw' => $sfw, 'banner' => Banner::getRandom($video->isSfw())]); } diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index cffd708..b188b5f 100644 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -9,6 +9,8 @@ use Illuminate\Http\Request; use Carbon\Carbon; use App\Models\ModeratorLog; use App\Models\Banner; +use Illuminate\Support\Facades\Input; +use Illuminate\Support\Facades\Validator; use Symfony\Component\HttpFoundation\Response; use Toddish\Verify\Helpers\Verify; @@ -131,8 +133,8 @@ class UserController extends Controller $validator = \Validator::make($request->all(), [ 'username' => 'required|unique:users|min:3|max:25|alpha_num', 'email' => 'required|email|unique:users|confirmed', - 'password' => 'required|min:6|confirmed', - 'g-recaptcha-response' => 'required|recaptcha' + 'password' => 'required|min:6|confirmed' + //'g-recaptcha-response' => 'required|recaptcha' ]); if($validator->fails()) { @@ -140,7 +142,7 @@ class UserController extends Controller ->withInput($request->except(['password', 'password_confirmation'])); } - //$activation_token = str_random(8) . md5($request->get('email')) . str_random(10); + $activation_token = str_random(8) . md5($request->get('email')) . str_random(10); $user = new User(); $user->username = $request->get('username'); @@ -148,7 +150,7 @@ class UserController extends Controller $user->password = $request->get('password'); $user->activation_token = $activation_token; $user->disabled = 0; - $user->verified = 1; + $user->verified = 0; $user->categories = []; if($user->save()) { $data = [ @@ -162,7 +164,7 @@ class UserController extends Controller $message->to($user->email, $user->username)->subject('Welcome to w0bm. Activate your account'); }); - return redirect('/')->with('info', 'Congratulations! You can now login!'); + return redirect('/login')->with('info', 'Congratulations! Your Account was successful created, please verify your email'); } else { return redirect()->back()->with('error', 'Account could not be created')->withInput($request->except(['password', 'password_confirmation'])); } @@ -413,5 +415,4 @@ class UserController extends Controller //return Response::create("success mothafukka, you can now go back and fap your dick", 200); return redirect()->back()->with('success', 'Jesus Scriptus is with you' ); } - } diff --git a/app/Http/Controllers/tmp/test.png b/app/Http/Controllers/tmp/test.png index 737f91b..8057fa2 100644 Binary files a/app/Http/Controllers/tmp/test.png and b/app/Http/Controllers/tmp/test.png differ diff --git a/app/Http/routes.php b/app/Http/routes.php index b504d09..e88ac61 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -58,6 +58,8 @@ Route::group(['prefix' => 'api'], function() { }); + + Route::get('latest', function(\Illuminate\Http\Request $req) { if ($req->has('filtered') && $req->get('filtered')) { return \App\Models\Video::filtered()->orderBy('id', 'DESC')->first(); @@ -81,9 +83,14 @@ Route::group(['prefix' => 'api'], function() { }); Route::post('upload', 'VideoController@store'); + }); + + Route::group(["middleware" => "theme"], function() { + Route::get('uim', 'uimgController@index'); + Route::post('uim/add', 'UserController@speichern'); Route::post('report/{id}', 'ReportController@report')->middleware('auth'); // added by klee Route::get('messages', 'MessageController@page')->middleware('auth'); Route::get('user/{username}', 'UserController@show')->middleware('auth'); @@ -96,7 +103,7 @@ Route::group(["middleware" => "theme"], function() { Route::get('logout', 'UserController@logout'); Route::post('login', 'UserController@login'); Route::get('register', 'UserController@create'); - Route::post('register', 'UserController@store'); + //Route::post('register', 'UserController@store'); Route::get('activate/{token}', 'UserController@activate'); Route::get('index', 'VideoController@index')->middleware('auth'); Route::get('main', 'VideoController@main')->middleware('auth'); @@ -107,6 +114,7 @@ Route::group(["middleware" => "theme"], function() { Route::get('about', function() { return view('about'); })->middleware('auth'); Route::get('irc', function() { return view('irc'); }); Route::get('rules', function() { return view('rules'); })->middleware('auth'); + Route::get('todo', function() { return view('todo'); })->middleware('auth'); Route::get('contact', function() { return view('contact'); }); Route::get('terms', function() { return view('tos'); })->middleware('auth'); Route::get('privacy', function() { return view('privacy'); })->middleware('auth'); @@ -119,8 +127,9 @@ Route::group(["middleware" => "theme"], function() { 'latest_video' => \App\Models\Video::getLastId(), 'newest_user' => \App\Models\User::orderBy('id', 'DESC')->first()->username, 'dirsize' => shell_exec("(du -sh " . public_path() . "/b | cut -f1)") - ]); + ]); })->middleware('auth'); + Route::get('/latest', function () { Session::reflash(); diff --git a/config/mail.php b/config/mail.php index 83dd186..6f04ed2 100644 --- a/config/mail.php +++ b/config/mail.php @@ -54,7 +54,7 @@ return [ | */ - 'from' => ['address' => 'info@w0bm.com', 'name' => 'w0bm.com Staff'], + 'from' => ['address' => 'otter@w0bm.com', 'name' => 'w0bm.com Staff'], /* |-------------------------------------------------------------------------- diff --git a/config/recaptcha.php b/config/recaptcha.php index 95f95bf..747151f 100644 --- a/config/recaptcha.php +++ b/config/recaptcha.php @@ -62,4 +62,4 @@ return array( */ 'version' => 2, -); \ No newline at end of file +); diff --git a/public/css/w0bmcustom.css b/public/css/w0bmcustom.css index f1c89ed..abcdf4e 100644 --- a/public/css/w0bmcustom.css +++ b/public/css/w0bmcustom.css @@ -3794,4 +3794,25 @@ button#layout4:before { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); grid-gap: 1em; -} \ No newline at end of file +} + +.commbordersoos { + border: 1px solid black; + background: #1313137a; + margin-left: 5px; + margin-right: 5px; + margin-bottom: 5px; +} + +#parent { + background: #1a1a1b; + border-radius: 0; + padding: 5px; + cursor: pointer; + margin-left: 5px; + margin-right: 5px; + padding-right: 50px; + border-left: 1px solid black; + border-bottom: 1px solid black; + border-right: 1px solid black; +} diff --git a/resources/views/layout1/apply.blade.php b/resources/views/layout1/apply.blade.php index 29f25f5..0314692 100644 --- a/resources/views/layout1/apply.blade.php +++ b/resources/views/layout1/apply.blade.php @@ -1,9 +1,61 @@ @extends('layout') @section('content') - -
-

999999 - closed l0l

- -
+@include('partials.flash') + +
+
+ {!! csrf_field() !!} +
+
+ {!! Form::text('username', null, ['class' => 'form-control', 'placeholder' => 'Username']) !!} +
+
+
+
+ {!! Form::email('email', null, ['class' => 'form-control', 'placeholder' => 'Email']) !!} +
+
+
+
+ {!! Form::email('email_confirmation', null, ['class' => 'form-control', 'placeholder' => 'Email Confirmation']) !!} +
+
+
+
+ {!! Form::password('password', ['class' => 'form-control', 'placeholder' => 'Password']) !!} +
+
+
+
+ {!! Form::password('password_confirmation', ['class' => 'form-control', 'placeholder' => 'Password Confirmation']) !!} +
+
+
+
+
+
+
+
+

I am at least 18 years or older and I have read and understand the Rules

+
+
+ +
+
+
+
+ @endsection diff --git a/resources/views/layout1/deleted.blade.php b/resources/views/layout1/deleted.blade.php index 22b4196..6b08e1d 100644 --- a/resources/views/layout1/deleted.blade.php +++ b/resources/views/layout1/deleted.blade.php @@ -4,4 +4,5 @@

Possible reasons: Your video was shit, broke a rule or the ID you tried to watch does not even exist (yet)

Go back to the normal rotation

+ @endsection diff --git a/resources/views/layout1/layout.blade.php b/resources/views/layout1/layout.blade.php index e31e798..94a6256 100644 --- a/resources/views/layout1/layout.blade.php +++ b/resources/views/layout1/layout.blade.php @@ -12,7 +12,7 @@ @if(auth()->check())@endif - file)}}.gif"@endif/> + file)}}.png"@endif/> @if(auth()->check())@endif @@ -82,11 +82,6 @@ clipboard.on('error', function(e) { console.error('Trigger:', e.trigger); }); -@if(env('SENTRY_PUBLIC')) - -@endif @if(isset($video)) @else diff --git a/resources/views/layout1/login.blade.php b/resources/views/layout1/login.blade.php index ca8da25..a0a6ed0 100644 --- a/resources/views/layout1/login.blade.php +++ b/resources/views/layout1/login.blade.php @@ -1,5 +1,6 @@ @extends('layout') @section('content') +@include('partials.flash')