Added Shows, ActionFoto's and Attraction Status
This commit is contained in:
parent
b105bd7db7
commit
ad320963fc
30 changed files with 1190 additions and 503 deletions
6
.idea/vcs.xml
Normal file
6
.idea/vcs.xml
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
52
app/Color/MinecraftColor.php
Normal file
52
app/Color/MinecraftColor.php
Normal file
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
namespace App\Color;
|
||||
|
||||
class MinecraftColor {
|
||||
|
||||
private static $array = [
|
||||
"&0" => "#333",
|
||||
"&1" => "#2980b9",
|
||||
"&2" => "#27ae60",
|
||||
"&3" => "#01a3a4",
|
||||
"&4" => "#c0392b",
|
||||
"&5" => "#8e44ad",
|
||||
"&6" => "#f39c12",
|
||||
"&7" => "#95a5a6",
|
||||
"&8" => "#7f8c8d",
|
||||
"&9" => "#3498db",
|
||||
"&a" => "#2ecc71",
|
||||
"&b" => "#00d2d3",
|
||||
"&c" => "#e74c3c",
|
||||
"&d" => "#f368e0",
|
||||
"&e" => "#f1c40f",
|
||||
"&f" => "#bdc3c7"
|
||||
];
|
||||
|
||||
private static $none = [
|
||||
"&l", "&m", "&n", "&o", "&r",
|
||||
];
|
||||
|
||||
public static function color($text) {
|
||||
foreach(self::$array as $key => $value) {
|
||||
$str = str_replace($key, $value, $text);
|
||||
if($str !== $text) {
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
public static function stripColor($text) {
|
||||
foreach(self::$array as $key => $value) {
|
||||
$text = str_replace($key, "", $text);
|
||||
}
|
||||
|
||||
foreach(self::$none as $key) {
|
||||
$text = str_replace($key, "", $text);
|
||||
}
|
||||
|
||||
return $text;
|
||||
}
|
||||
|
||||
}
|
|
@ -2,12 +2,8 @@
|
|||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Order;
|
||||
use App\OrderedProject;
|
||||
use App\Project;
|
||||
use App\Status;
|
||||
use App\Utils\Numbers;
|
||||
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class HomeController extends Controller
|
||||
|
@ -34,6 +30,21 @@ class HomeController extends Controller
|
|||
]);
|
||||
}
|
||||
|
||||
public function status()
|
||||
{
|
||||
return view('status');
|
||||
}
|
||||
|
||||
public function photo() {
|
||||
$photos = DB::table('actionfotos')
|
||||
->join('attraction', 'attraction.id', '=', 'actionfotos.ride')
|
||||
->where('actionfotos.uuid', '=', Auth::user()->uuid)
|
||||
->select('actionfotos.base64')
|
||||
->get()->all();
|
||||
|
||||
return view('photo', [
|
||||
'photos' => $photos
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -3,12 +3,6 @@
|
|||
namespace App\Http\Controllers\Panel;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Order;
|
||||
use App\OrderedProject;
|
||||
use App\Project;
|
||||
use App\Status;
|
||||
use App\Utils\Numbers;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class HomeController extends Controller
|
||||
{
|
||||
|
@ -34,6 +28,4 @@ class HomeController extends Controller
|
|||
]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Panel;
|
||||
namespace App\Http\Controllers\Profile;
|
||||
|
||||
use App\ChangeEmail;
|
||||
use App\Http\Controllers\Controller;
|
||||
|
@ -32,7 +32,7 @@ class ChangeController extends Controller
|
|||
*/
|
||||
public function index()
|
||||
{
|
||||
return view('change');
|
||||
return view('profile.change');
|
||||
}
|
||||
|
||||
public function changePassword(Request $request) {
|
|
@ -1,11 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Panel;
|
||||
namespace App\Http\Controllers\Profile;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class AccountController extends Controller
|
||||
class HomeController extends Controller
|
||||
{
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
|
@ -20,11 +19,13 @@ class AccountController extends Controller
|
|||
/**
|
||||
* Show the application dashboard.
|
||||
*
|
||||
* @param Request $request
|
||||
* @return \Illuminate\Contracts\Support\Renderable
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
return view('account');
|
||||
return view('profile.home');
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Panel;
|
||||
namespace App\Http\Controllers\Profile;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Session;
|
||||
|
@ -25,7 +25,7 @@ class SecurityController extends Controller
|
|||
*
|
||||
* @param Request $request
|
||||
* @param int $page
|
||||
* @return \Illuminate\Contracts\Support\Renderable
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
* @throws \PragmaRX\Google2FA\Exceptions\IncompatibleWithGoogleAuthenticatorException
|
||||
* @throws \PragmaRX\Google2FA\Exceptions\InvalidCharactersException
|
||||
*/
|
||||
|
@ -36,7 +36,7 @@ class SecurityController extends Controller
|
|||
$pages = Session::where('user_id', Auth::id())->count();
|
||||
$pages = (int) ceil($pages/10);
|
||||
if($page > $pages)
|
||||
return redirect()->route('security', ['page' => $pages]);
|
||||
return redirect()->route('profile.security', ['page' => $pages]);
|
||||
|
||||
$sessions = Session::where('user_id', Auth::id())->where('id', '!=', session()->getId())->skip(($page - 1)*10)->take(($page != 1 ? 10 : 9))->orderBy('last_activity', 'desc')->get();
|
||||
$array = ['TFA' => $tfa, 'pages' => $pages, 'page' => $page, 'sessions' => $sessions, 'agent' => new Agent()];
|
||||
|
@ -58,19 +58,19 @@ class SecurityController extends Controller
|
|||
);
|
||||
|
||||
$array['QRCode'] = $QR;
|
||||
return view('security')->with($array);
|
||||
return view('profile.security')->with($array);
|
||||
}
|
||||
|
||||
return view('security')->with($array);
|
||||
return view('profile.security')->with($array);
|
||||
}
|
||||
|
||||
public function session($id)
|
||||
{
|
||||
if(session()->getId() === $id)
|
||||
return redirect()->route('security');
|
||||
return redirect()->route('profile.security');
|
||||
|
||||
Session::where(['id' => $id, 'user_id' => Auth::id()])->forceDelete();
|
||||
return redirect()->route('security');
|
||||
return redirect()->route('profile.security');
|
||||
}
|
||||
|
||||
}
|
54
app/Http/Controllers/RidecountController.php
Normal file
54
app/Http/Controllers/RidecountController.php
Normal file
|
@ -0,0 +1,54 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class RidecountController extends Controller
|
||||
{
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware(['auth', 'verified', '2fa']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the application dashboard.
|
||||
*
|
||||
* @param $attraction_id
|
||||
* @return \Illuminate\Contracts\Support\Renderable
|
||||
*/
|
||||
public function index($attraction_id)
|
||||
{
|
||||
$name = DB::table('attraction')->select('name')->where('id', '=', $attraction_id)->first()->name;
|
||||
$top10 = DB::table(DB::raw('ridecount, (SELECT @row_number:=0) AS t'))->select('uuid', DB::raw('SUM(`count`) AS `count`'), DB::raw('(@row_number:=@row_number + 1) AS `num`'))
|
||||
->where('attractionId', '=', $attraction_id)
|
||||
->whereRaw('YEARWEEK(date, 1) = YEARWEEK(CURDATE(), 1)')
|
||||
->groupBy('uuid')
|
||||
->orderByDesc('count')
|
||||
->take(10)->get()->all();
|
||||
|
||||
$personal = DB::table('ridecount')
|
||||
->where('attractionId', '=', $attraction_id)
|
||||
->where('uuid', '=', Auth::user()->uuid)
|
||||
->sum('count');
|
||||
|
||||
$total = DB::table('ridecount')
|
||||
->where('attractionId', '=', $attraction_id)
|
||||
->sum('count');
|
||||
|
||||
return view('ridecount')->with([
|
||||
'name' => $name,
|
||||
'top10' => $top10,
|
||||
'personal' => $personal,
|
||||
'total' => $total
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
125
app/Http/Controllers/ShowController.php
Normal file
125
app/Http/Controllers/ShowController.php
Normal file
|
@ -0,0 +1,125 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Show;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Redirect;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class ShowController extends Controller
|
||||
{
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware(['auth', 'verified', '2fa']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the application dashboard.
|
||||
*
|
||||
* @return \Illuminate\Contracts\Support\Renderable
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$shows = Show::join('show_dates', 'show_dates.show_id', '=', 'shows.id')
|
||||
->whereRaw('`show_dates`.`date` > CURDATE()')
|
||||
->select('shows.*')->get()->all();
|
||||
|
||||
$data = [];
|
||||
foreach($shows as $show)
|
||||
if(!empty($show->getShowDates(Auth::user()->uuid)))
|
||||
array_push($data, $show);
|
||||
|
||||
return view('show')->with([
|
||||
'shows' => $shows
|
||||
]);
|
||||
}
|
||||
|
||||
public function order($show_id) {
|
||||
$show = Show::join('show_dates', 'show_dates.show_id', '=', 'shows.id')->select('shows.*')->where('shows.id', '=', $show_id)->firstOrFail();
|
||||
$dates = $show->getShowDates(Auth::user()->uuid);
|
||||
|
||||
return view('order')->with([
|
||||
'show' => $show,
|
||||
'dates' => $dates
|
||||
]);
|
||||
}
|
||||
|
||||
public function makeOrder(Request $request) {
|
||||
if(!$request->has('id')) {
|
||||
session()->flash('error', 'Incorrect form data');
|
||||
return Redirect::back();
|
||||
}
|
||||
|
||||
$show = Show::find($request->get('id'));
|
||||
if(empty($show)) {
|
||||
session()->flash('error', 'Incorrect form data');
|
||||
return Redirect::back();
|
||||
}
|
||||
|
||||
$validator = Validator::make($request->all(), [
|
||||
'id' => ['required', 'numeric'],
|
||||
'date' => ['required', 'date']
|
||||
]);
|
||||
|
||||
if(!$validator->passes()) {
|
||||
session()->flash('error', 'Incorrect show date');
|
||||
return Redirect::back();
|
||||
}
|
||||
|
||||
$data = DB::table('show_dates')
|
||||
->leftJoin('seats', 'seats.date', '=','show_dates.date')
|
||||
->where('show_dates.date', '=', $request->get('date'))
|
||||
->where('show_dates.show_id', '=', $show->id)
|
||||
->select('show_dates.date', DB::raw('COUNT(`seats`.`id`) AS `filled_seats`'), DB::raw('GROUP_CONCAT(`seats`.`uuid`) AS `uuids`'), DB::raw('GROUP_CONCAT(`seats`.`seat`) AS `used_seats`'))
|
||||
->groupBy('show_dates.date')
|
||||
->first();
|
||||
|
||||
if(empty($data)) {
|
||||
session()->flash('error', 'Incorrect show date');
|
||||
return Redirect::back();
|
||||
}
|
||||
|
||||
$time = strtotime($request->get('date'));
|
||||
if(strpos($data->uuids, Auth::user()->uuid) !== false) {
|
||||
session()->flash('error', 'You already booked the show on '.date('d-m-Y', $time).' at '.date('H:m', $time));
|
||||
return Redirect::back();
|
||||
}
|
||||
|
||||
if($data->filled_seats >= $show->seats) {
|
||||
session()->flash('error', 'This show is already fully booked on '.date('d-m-Y', $time).' at '.date('H:m', $time));
|
||||
return Redirect::back();
|
||||
}
|
||||
|
||||
$array = [];
|
||||
$seats = explode(',', $data->used_seats);
|
||||
for($i = 1; $i <= $show->seats; $i++)
|
||||
if(!in_array($i, $seats))
|
||||
array_push($array, $i);
|
||||
|
||||
$result = DB::table('seats')->insert([
|
||||
'uuid' => Auth::user()->uuid,
|
||||
'show_id' => $show->id,
|
||||
'seat' => $array[array_rand($array)],
|
||||
'voucher' => Str::random(8),
|
||||
'date' => $request->date
|
||||
]);
|
||||
|
||||
if(empty($result)) {
|
||||
session()->flash('error', 'Unable to book show on '.date('d-m-Y', $time).' at '.date('H:m', $time));
|
||||
return Redirect::back();
|
||||
}
|
||||
|
||||
session()->flash('success', 'Successfully reserved seat for show on '.date('d-m-Y', $time).' at '.date('H:m', $time));
|
||||
return Redirect::back();
|
||||
}
|
||||
|
||||
}
|
55
app/Show.php
Normal file
55
app/Show.php
Normal file
|
@ -0,0 +1,55 @@
|
|||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class Show extends Model
|
||||
{
|
||||
|
||||
/**
|
||||
* The table associated with the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'shows';
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'title', 'description', 'price', 'vault_price', 'image', 'seats'
|
||||
];
|
||||
|
||||
private $data = null;
|
||||
public function getShowDates($uuid = null) {
|
||||
if($this->data !== null)
|
||||
return $this->data;
|
||||
|
||||
$data = DB::table('show_dates')
|
||||
->leftJoin('seats', 'seats.date', '=','show_dates.date')
|
||||
->havingRaw('COUNT(`seats`.`id`) < '.$this->seats)
|
||||
->whereRaw('`show_dates`.`date` > CURDATE()')
|
||||
->where('show_dates.show_id', '=', $this->id)
|
||||
->select('show_dates.date', DB::raw('COUNT(`seats`.`id`) AS `filled_seats`'))
|
||||
->groupBy('show_dates.date');
|
||||
|
||||
if($uuid !== null)
|
||||
$data = $data->where('seats.uuid', '!=', $uuid);
|
||||
|
||||
$data = $data->get()->all();
|
||||
$dates = [];
|
||||
foreach ($data as $row)
|
||||
array_push($dates, [
|
||||
'date' => $row->date,
|
||||
'free_seats' => $this->seats - $row->filled_seats
|
||||
]);
|
||||
|
||||
$this->data = $dates;
|
||||
return $dates;
|
||||
}
|
||||
|
||||
}
|
44
app/Status.php
Normal file
44
app/Status.php
Normal file
|
@ -0,0 +1,44 @@
|
|||
<?php
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class Status {
|
||||
|
||||
private static $data = null;
|
||||
public static function loadData() {
|
||||
if(self::$data !== null)
|
||||
return self::$data;
|
||||
|
||||
$regions = DB::table('region')->get()->all();
|
||||
$attractions = DB::table('attraction')->select(['id', 'name', 'status', 'region_id'])->where('status', '!=', 'GLOBAL')->get()->all();
|
||||
$statuses = DB::table('status')->get()->all(); //TODO
|
||||
|
||||
$data = [];
|
||||
foreach($regions as $region) {
|
||||
$region->attractions = [];
|
||||
$data[$region->id] = $region;
|
||||
}
|
||||
|
||||
$status = [];
|
||||
foreach ($statuses as $stat)
|
||||
$status[$stat->statusId] = $stat->statusName;
|
||||
|
||||
foreach ($attractions as $attraction) {
|
||||
$region_id = $attraction->region_id;
|
||||
$attraction->status = $status[$attraction->status];
|
||||
if(array_key_exists($region_id, $data))
|
||||
array_push($data[$region_id]->attractions, $attraction);
|
||||
}
|
||||
|
||||
$temp = $data;
|
||||
$data = [];
|
||||
foreach ($temp as $key => $value)
|
||||
if(!empty($value->attractions))
|
||||
array_push($data, $value);
|
||||
|
||||
self::$data = $data;
|
||||
return $data;
|
||||
}
|
||||
|
||||
}
|
31
app/User.php
31
app/User.php
|
@ -51,6 +51,37 @@ class User extends Authenticatable implements MustVerifyEmail
|
|||
return $username;
|
||||
}
|
||||
|
||||
private $shows = null;
|
||||
public function hasShows() {
|
||||
if($this->shows !== null)
|
||||
return true;
|
||||
|
||||
$shows = Show::join('seats', 'seats.show_id', '=', 'shows.id')
|
||||
->select([
|
||||
'shows.title', 'shows.description', 'shows.image', 'seats.*'
|
||||
])
|
||||
->where('seats.uuid', '=', $this->uuid)
|
||||
->where('seats.date', '>', 'CURRENT_TIMESTAMP()')
|
||||
->get()->all();
|
||||
$this->shows = $shows;
|
||||
return !empty($shows);
|
||||
}
|
||||
|
||||
public function getShows() {
|
||||
if($this->shows !== null)
|
||||
return $this->shows;
|
||||
|
||||
$shows = Show::join('seats', 'seats.show_id', '=', 'shows.id')
|
||||
->select([
|
||||
'shows.title', 'shows.description', 'shows.image', 'seats.*'
|
||||
])
|
||||
->where('seats.uuid', '=', $this->uuid)
|
||||
->where('seats.date', '>', 'CURRENT_TIMESTAMP()')
|
||||
->get()->all();
|
||||
$this->shows = $shows;
|
||||
return $shows;
|
||||
}
|
||||
|
||||
public function photo() {
|
||||
return 'https://crafatar.com/avatars/'.$this->uuid.'?overlay';
|
||||
}
|
||||
|
|
36
database/migrations/2019_09_20_141811_create_seats_table.php
Normal file
36
database/migrations/2019_09_20_141811_create_seats_table.php
Normal file
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateSeatsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('seats', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->bigInteger('show_id');
|
||||
$table->string('uuid');
|
||||
$table->integer('seat');
|
||||
$table->string('voucher');
|
||||
$table->timestamp('date');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('seats');
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateShowDatesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('show_dates', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->bigInteger('show_id');
|
||||
$table->timestamp('date');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('show_dates');
|
||||
}
|
||||
}
|
37
database/migrations/2019_09_20_141811_create_shows_table.php
Normal file
37
database/migrations/2019_09_20_141811_create_shows_table.php
Normal file
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateShowsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shows', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('title');
|
||||
$table->text('description');
|
||||
$table->string('price');
|
||||
$table->string('vault_price');
|
||||
$table->integer('seats');
|
||||
$table->string('image');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('shows');
|
||||
}
|
||||
}
|
19
public/assets/css/skin.css
vendored
19
public/assets/css/skin.css
vendored
|
@ -255,25 +255,6 @@ th.ip, td.ip {
|
|||
width: 335px;
|
||||
}
|
||||
|
||||
code {
|
||||
background-color: #eef1f6;
|
||||
color: #596981;
|
||||
border-radius: 3px;
|
||||
padding: 3px;
|
||||
line-height: 1.4;
|
||||
font-size: 85%;
|
||||
border: 1px solid rgba(0, 0, 0, .1);
|
||||
display: block;
|
||||
width: 335px;
|
||||
text-align: right;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
code i {
|
||||
float: left;
|
||||
margin: 3px;
|
||||
}
|
||||
|
||||
.role, .project-status {
|
||||
font-weight: 700;
|
||||
padding: 5px;
|
||||
|
|
42
public/assets/css/style.css
vendored
42
public/assets/css/style.css
vendored
|
@ -411,3 +411,45 @@ iframe {
|
|||
border: 2px solid #fff;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
code {
|
||||
background-color: #eef1f6;
|
||||
color: #596981;
|
||||
border-radius: 3px;
|
||||
padding: 3px;
|
||||
line-height: 1.4;
|
||||
font-size: 85%;
|
||||
border: 1px solid rgba(0, 0, 0, .1);
|
||||
display: block;
|
||||
width: 335px;
|
||||
text-align: right;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
code i {
|
||||
float: left;
|
||||
margin: 3px;
|
||||
}
|
||||
|
||||
.pagination li.active a {
|
||||
background-color: #2ecc71;
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
.status, .attraction {
|
||||
font-weight: 900;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.status {
|
||||
padding: 5px;
|
||||
border-radius: 3px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.actionfoto {
|
||||
width: calc(100% - 4px) !important;
|
||||
height: auto;
|
||||
border: 2px solid #fff;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
|
|
@ -3,14 +3,17 @@
|
|||
@section('navigation')
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="active"><a>Home</a></li>
|
||||
<!-- <li><a href="status.php">Attraction Status</a></li>
|
||||
<li><a href="photo.php">Photo's</a></li>
|
||||
<li><a href="show.php">Show</a></li>
|
||||
<li><a href="{{ route('status') }}">Attraction Status</a></li>
|
||||
@if(Route::has('photo'))
|
||||
<li><a href="{{ route('photo') }}">ActionFoto's</a></li>
|
||||
@endif
|
||||
<li><a href="{{ route('shows') }}">Show</a></li>
|
||||
<!-- <li><a href="show.php">Show</a></li>
|
||||
<li><a href="store.php">Store</a></li> -->
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{{ Auth::user()->username() }}<span class="caret"></span></a><ul class="dropdown-menu">
|
||||
<li><a href="profile/">Profile</a></li>
|
||||
<li><a href="{{ route('profile.home') }}">Profile</a></li>
|
||||
@if(Auth::user()->is_admin || Auth::user()->is_root)
|
||||
<li><a href="admin/">Admin</a></li>
|
||||
<li role="separator" class="divider"></li>
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
CSS Files
|
||||
=============================================== -->
|
||||
<link href="{{ asset('assets/css/bootstrap.min.css') }}" rel="stylesheet">
|
||||
@yield('css')
|
||||
<link href="{{ asset('assets/css/style.css') }}" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
|
@ -56,6 +57,7 @@
|
|||
<script src="{{ asset('assets/js/jquery.min.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/bootstrap.min.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/core.js') }}"></script>
|
||||
@yield('javascript')
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
93
resources/views/order.blade.php
Normal file
93
resources/views/order.blade.php
Normal file
|
@ -0,0 +1,93 @@
|
|||
@extends('layouts.panel')
|
||||
|
||||
@section('navigation')
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="{{ route('home') }}">Home</a></li>
|
||||
<li><a href="{{ route('status') }}">Attraction Status</a></li>
|
||||
@if(Route::has('photo'))
|
||||
<li><a href="{{ route('photo') }}">ActionFoto's</a></li>
|
||||
@endif
|
||||
<li class="active"><a href="{{ route('shows') }}">Show</a></li>
|
||||
<!-- <li><a href="store.php">Store</a></li> -->
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{{ Auth::user()->username() }}<span class="caret"></span></a><ul class="dropdown-menu">
|
||||
<li><a href="{{ route('profile.home') }}">Profile</a></li>
|
||||
@if(Auth::user()->is_admin || Auth::user()->is_root)
|
||||
<li><a href="admin/">Admin</a></li>
|
||||
<li role="separator" class="divider"></li>
|
||||
@endif
|
||||
<li><a href="{{ route('logout') }}">Logout</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="wrapper">
|
||||
<div class="col-lg-4 col-lg-offset-2 col-md-4 col-md-offset-2">
|
||||
<div class="panel panel-theme">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Book Show</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="container-fluid">
|
||||
@if(session('error'))
|
||||
<div class="alert alert-danger" role="alert">
|
||||
{{ session('error') }}
|
||||
<a class="close" data-dismiss="alert" aria-label="close">×</a>
|
||||
</div>
|
||||
|
||||
@elseif(session('success'))
|
||||
<div class="alert alert-success" role="alert">
|
||||
{{ session('success') }}
|
||||
<a class="close" data-dismiss="alert" aria-label="close">×</a>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
|
||||
<form action="{{ route('makeOrder') }}" method="post" class="col-xs-12">
|
||||
@csrf
|
||||
<input name="id" value="{{ $show->id }}" style="display: none">
|
||||
|
||||
<div class="custom-select" style="width: 100%">
|
||||
<select name="date">
|
||||
@if(!empty($dates))
|
||||
<option class="disabled" selected>Select Date:</option>
|
||||
@foreach($dates as $row)
|
||||
@php($time = strtotime($row['date']))
|
||||
<option value="{{ $row['date'] }}" free_seats="{{ $row['free_seats'] }}">{{ date('d-m-Y', $time) }} at {{ date('H:m', $time) }}</option>
|
||||
@endforeach
|
||||
@else
|
||||
<option class="disabled" selected>No dates to book</option>
|
||||
@endif
|
||||
</select>
|
||||
</div>
|
||||
<br>
|
||||
<button type="submit" name="submit" class="btn-custom" style="width: 100%">Book Show</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4 col-md-4">
|
||||
<div class="panel panel-theme">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Book Information</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="container-fluid">
|
||||
<h4>{{ $show->title }}</h4>
|
||||
<div class="col-xs-8 col-xs-offset-2 col-lg-8 col-lg-offset-2 col-md-8 col-md-offset-2 col-sm-8 col-sm-offset-2">
|
||||
<img src="{{ $show->image }}" style="height: auto; width: 100%" alt="Image">
|
||||
</div>
|
||||
<div class="col-xs-12 col-lg-12 col-md-12 col-sm-12">
|
||||
<p>{{ $show->description }}</p>
|
||||
<p><strong>Price: €</strong>{{ $show->price }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
39
resources/views/photo.blade.php
Normal file
39
resources/views/photo.blade.php
Normal file
|
@ -0,0 +1,39 @@
|
|||
@extends('layouts.panel')
|
||||
|
||||
@section('navigation')
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="{{ route('home') }}">Home</a></li>
|
||||
<li><a href="{{ route('status') }}">Attraction Status</a></li>
|
||||
<li class="active"><a>ActionFoto's</a></li>
|
||||
<li><a href="{{ route('shows') }}">Show</a></li>
|
||||
<!-- <li><a href="status.php">Attraction Status</a></li>
|
||||
<li><a href="photo.php">Photo's</a></li>
|
||||
<li><a href="show.php">Show</a></li>
|
||||
<li><a href="store.php">Store</a></li> -->
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{{ Auth::user()->username() }}<span class="caret"></span></a><ul class="dropdown-menu">
|
||||
<li><a href="{{ route('profile.home') }}">Profile</a></li>
|
||||
@if(Auth::user()->is_admin || Auth::user()->is_root)
|
||||
<li><a href="admin/">Admin</a></li>
|
||||
<li role="separator" class="divider"></li>
|
||||
@endif
|
||||
<li><a href="{{ route('logout') }}">Logout</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="wrapper">
|
||||
<div class="row x">
|
||||
@if(!empty($photos))
|
||||
@foreach($photos as $photo)
|
||||
<div class="col-lg-3 col-md-6 col-sm-6 col-xs-12 y">
|
||||
<img class="actionfoto" src="data:image/png;base64,{{ $photo->base64 }}">
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
|
@ -1,63 +0,0 @@
|
|||
@extends('layouts.panel')
|
||||
|
||||
@section('page', 'Profile')
|
||||
|
||||
@section('navigation')
|
||||
<li class="active treeview menu-open">
|
||||
<a>
|
||||
<i class="fas fa-user"></i> <span>Account</span>
|
||||
<span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li class="active"><a><i class="fas fa-id-badge"></i> Profile</a></li>
|
||||
<li><a href="{{ route('panel.change') }}"><i class="fas fa-clipboard"></i> Change</a></li>
|
||||
<li class="hidden-xs"><a href="{{ route('panel.security') }}"><i class="fas fa-lock"></i> Security</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="header">NAVIGATION</li>
|
||||
<li>
|
||||
<a href="{{ route('panel.home') }}"><i class="fas fa-tachometer-alt"></i> <span>Dashboard</span></a>
|
||||
</li>
|
||||
@canany(['project_see', 'status_see'])
|
||||
<li class="treeview">
|
||||
<a>
|
||||
<i class="fas fa-list"></i> <span>Projects</span>
|
||||
<span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
@can('project_see')<li><a href="{{ route('panel.project') }}"><i class="fas fa-clipboard"></i> Project</a></li>@endcan
|
||||
@can('order_see')<li><a href="{{ route('panel.order') }}"><i class="fas fa-file-invoice"></i> Order</a></li>@endcan
|
||||
@can('status_see')<li><a href="{{ route('panel.status') }}"><i class="fas fa-clipboard"></i> Status</a></li>@endcan
|
||||
</ul>
|
||||
</li>
|
||||
@endcanany
|
||||
@canany(['roles_see', 'user_see'])
|
||||
<li class="treeview">
|
||||
<a>
|
||||
<i class="fas fa-user"></i> <span>Management</span>
|
||||
<span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
@can('user_see')<li><a href="{{ route('panel.ums') }}"><i class="fas fa-id-badge"></i> Users</a></li>@endcan
|
||||
@can('roles_see')<li><a href="{{ route('panel.role') }}"><i class="fas fa-lock"></i> Roles</a></li>@endcan
|
||||
</ul>
|
||||
</li>
|
||||
@endcanany
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="col-xs-12 col-lg-6 col-lg-offset-3 col-md-8 col-md-offset-2">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ Auth::user()->fullname() }}</h3>
|
||||
<p style="float: right">{{ Auth::user()->created_at->format('d-m-Y') }}</p>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<p><strong>First Name:</strong> {{ Auth::user()->firstname }}
|
||||
<br><strong>Sur Name:</strong> {{ Auth::user()->surname }}</p>
|
||||
<p><strong>Email:</strong> {{ Auth::user()->email }}</p>
|
||||
<p><strong>2FA:</strong> <span class="role" style="background-color: {{ !is_null(Auth::user()->google2fa_secret) ? "#2ecc71" : "#e74c3c" }}">{{ !is_null(Auth::user()->google2fa_secret) ? "Enabled" : "Disabled" }}</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
|
@ -1,63 +1,36 @@
|
|||
@extends('layouts.panel')
|
||||
|
||||
@section('css')
|
||||
<link href="{{ asset('assets/css/checkbox.css') }}" rel="stylesheet">
|
||||
@endsection
|
||||
|
||||
@section('page', 'Security')
|
||||
|
||||
@section('navigation')
|
||||
<li class="active treeview menu-open">
|
||||
<a>
|
||||
<i class="fas fa-user"></i> <span>Account</span>
|
||||
<span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li><a href="{{ route('panel.profile') }}"><i class="fas fa-id-badge"></i> Profile</a></li>
|
||||
<li class="active"><a><i class="fas fa-clipboard"></i> Change</a></li>
|
||||
<li class="hidden-xs"><a href="{{ route('panel.security') }}"><i class="fas fa-lock"></i> Security</a></li>
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="{{ route('profile.home') }}">Home</a></li>
|
||||
<li><a href="{{ route('security') }}">Security</a></li>
|
||||
<li class="active"><a>Change</a></li>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{{ Auth::user()->username() }}<span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="{{ route('home') }}">Panel</a></li>
|
||||
@if(Auth::user()->is_admin || Auth::user()->is_root)
|
||||
<li><a href="admin/">Admin</a></li>
|
||||
<li role="separator" class="divider"></li>
|
||||
@endif
|
||||
<li><a href="{{ route('logout') }}">Logout</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="header">NAVIGATION</li>
|
||||
<li>
|
||||
<a href="{{ route('panel.home') }}"><i class="fas fa-tachometer-alt"></i> <span>Dashboard</span></a>
|
||||
</li>
|
||||
@canany(['project_see', 'status_see'])
|
||||
<li class="treeview">
|
||||
<a>
|
||||
<i class="fas fa-list"></i> <span>Projects</span>
|
||||
<span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
@can('project_see')<li><a href="{{ route('panel.project') }}"><i class="fas fa-clipboard"></i> Project</a></li>@endcan
|
||||
@can('order_see')<li><a href="{{ route('panel.order') }}"><i class="fas fa-file-invoice"></i> Order</a></li>@endcan
|
||||
@can('status_see')<li><a href="{{ route('panel.status') }}"><i class="fas fa-clipboard"></i> Status</a></li>@endcan
|
||||
</ul>
|
||||
</li>
|
||||
@endcanany
|
||||
@canany(['roles_see', 'user_see'])
|
||||
<li class="treeview">
|
||||
<a>
|
||||
<i class="fas fa-user"></i> <span>Management</span>
|
||||
<span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
@can('user_see')<li><a href="{{ route('panel.ums') }}"><i class="fas fa-id-badge"></i> Users</a></li>@endcan
|
||||
@can('roles_see')<li><a href="{{ route('panel.role') }}"><i class="fas fa-lock"></i> Roles</a></li>@endcan
|
||||
</ul>
|
||||
</li>
|
||||
@endcanany
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="container-fluid" style="margin-top: 75px">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-4">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Change Password</h3>
|
||||
<div class="col-xs-12 col-md-4 col-md-offset-2">
|
||||
<div class="panel panel-theme">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Change Password</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<form method="POST" action="{{ route('panel.change.password') }}" class="col-xs-10 col-xs-offset-1">
|
||||
<div class="panel-body">
|
||||
<form method="POST" action="{{ route('change.password') }}" class="col-xs-10 col-xs-offset-1">
|
||||
@csrf
|
||||
|
||||
@if(session('pass_success'))
|
||||
|
@ -101,63 +74,19 @@
|
|||
@enderror
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-block btn-primary">{{ __('Change Password') }}</button>
|
||||
<button type="submit" class="btn btn-custom" style="width: 100%">{{ __('Change Password') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12 col-md-4">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Change Profile</h3>
|
||||
<div class="panel panel-theme">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Change Email</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<form method="POST" action="{{ route('panel.change.profile') }}" enctype="multipart/form-data" class="col-xs-10 col-xs-offset-1">
|
||||
@csrf
|
||||
|
||||
@if(session('image_success'))
|
||||
<div class="alert alert-success" role="alert">
|
||||
{{ session('image_success') }}
|
||||
<a class="close" data-dismiss="alert" aria-label="close">×</a>
|
||||
</div>
|
||||
|
||||
@elseif(session('image_error'))
|
||||
<div class="alert alert-danger" role="alert">
|
||||
{{ session('image_error') }}
|
||||
<a class="close" data-dismiss="alert" aria-label="close">×</a>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
<div class="form-group @error('image') has-error @enderror">
|
||||
<label for="file">Choose Image:</label>
|
||||
<input type="file" id="file" name="image" accept="image/*">
|
||||
@error('image')
|
||||
<span class="help-block">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
@if(Auth::user()->image_changed)
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<strong>{{ __('Or Reset:') }}</strong>
|
||||
<input type="checkbox" name="reset-image">
|
||||
<span class="cr"><i class="cr-icon glyphicon glyphicon-ok"></i></span>
|
||||
</label>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<button type="submit" class="btn btn-block btn-primary">{{ __('Change Profile') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-4">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Change Email</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<form method="POST" action="{{ route('panel.change.email') }}" class="col-xs-10 col-xs-offset-1">
|
||||
<div class="panel-body">
|
||||
<form method="POST" action="{{ route('change.email') }}" class="col-xs-10 col-xs-offset-1">
|
||||
@csrf
|
||||
|
||||
@if(session('email_success'))
|
||||
|
@ -201,23 +130,16 @@
|
|||
@enderror
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-block btn-primary">{{ __('Change Email') }}</button>
|
||||
<button type="submit" class="btn btn-custom" style="width: 100%">{{ __('Change Email') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('javascript')
|
||||
<script src="{{ asset('assets/js/bootstrap-filestyle.min.js') }}"></script>
|
||||
<script>
|
||||
$('#file').filestyle({
|
||||
iconName : 'glyphicon glyphicon-picture',
|
||||
buttonText : 'Select File',
|
||||
buttonName : 'btn-primary'
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
window.onload = function() {
|
||||
const passInput = document.getElementById('new_confirm_password');
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
@section('navigation')
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="active"><a>Home</a></li>
|
||||
<!-- <li><a href="email.php">Email</a></li>
|
||||
<li><a href="password.php">Password</a></li> -->
|
||||
<li><a href="{{ route('security') }}">Security</a></li>
|
||||
<li><a href="{{ route('change') }}">Change</a></li>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{{ Auth::user()->username() }}<span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="../index.php">Panel</a></li>
|
||||
<li><a href="{{ route('home') }}">Panel</a></li>
|
||||
@if(Auth::user()->is_admin || Auth::user()->is_root)
|
||||
<li><a href="admin/">Admin</a></li>
|
||||
<li role="separator" class="divider"></li>
|
||||
|
@ -23,34 +23,33 @@
|
|||
|
||||
@section('content')
|
||||
<div class="container-fluid" style="margin-top: 75px">
|
||||
<?php if($shows != null && !empty($shows)) {
|
||||
foreach($shows as $row) {
|
||||
if(strtotime($row['showDate']) < strtotime(date("H:i j-n-Y", time())))
|
||||
continue; ?>
|
||||
@if(Auth::user()->hasShows())
|
||||
@foreach(Auth::user()->getShows() as $show)
|
||||
<div class="col-lg-6 col-lg-offset-3 col-md-8 col-md-offset-2">
|
||||
<div class="panel panel-theme">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><?php echo $row['showName']; ?></h3>
|
||||
<h3 class="panel-title">{{ $show->title }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-lg-9 col-md-9 col-sm-9">
|
||||
<p><?php echo $row['showDescription']; ?></p>
|
||||
<p class="bottom"><strong>Date: </strong><?php echo $row['showDate']; ?></p>
|
||||
<p><strong>Seat: </strong><?php echo $row['showSeat']; ?></p>
|
||||
<p><strong>Voucher: </strong><?php echo $row['voucher']; ?></p>
|
||||
<p>{!! $show->description !!}</p>
|
||||
@php($time = strtotime($show->date))
|
||||
<p class="bottom"><strong>Date: </strong>{{ date('d-m-Y', $time) }} at {{ date('H:m', $time) }}</p>
|
||||
<p><strong>Seat: </strong>{{ $show->seat }}</p>
|
||||
<p><strong>Voucher: </strong>{{ $show->voucher }}</p>
|
||||
</div>
|
||||
<div class="hidden-xs col-lg-3 col-md-3 col-sm-3">
|
||||
<img src="<?php echo $row['showImage']; ?>" style="float: right; height: auto; width: 100%; margin: auto" alt="Image">
|
||||
<img src="{{ $show->image }}" style="float: right; height: auto; width: 100%; margin: auto" alt="Image">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php }
|
||||
} else { ?>
|
||||
@endforeach
|
||||
@else
|
||||
<div class="col-lg-6 col-lg-offset-3 col-md-8 col-md-offset-2">
|
||||
<div class="panel panel-theme">
|
||||
<div class="panel-heading">
|
||||
|
@ -63,6 +62,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
@endif
|
||||
</div>
|
||||
@endsection
|
||||
|
|
|
@ -1,58 +1,39 @@
|
|||
@extends('layouts.panel')
|
||||
|
||||
@section('page', 'Security')
|
||||
@section('css')
|
||||
<link href="{{ asset('assets/css/font-awesome.min.css') }}" rel="stylesheet">
|
||||
@endsection
|
||||
|
||||
@section('navigation')
|
||||
<li class="active treeview menu-open">
|
||||
<a>
|
||||
<i class="fas fa-user"></i> <span>Account</span>
|
||||
<span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li><a href="{{ route('panel.profile') }}"><i class="fas fa-id-badge"></i> Profile</a></li>
|
||||
<li><a href="{{ route('panel.change') }}"><i class="fas fa-clipboard"></i> Change</a></li>
|
||||
<li class="active"><a><i class="fas fa-lock"></i> Security</a></li>
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="{{ route('profile.home') }}">Home</a></li>
|
||||
<li class="active"><a>Security</a></li>
|
||||
<li><a href="{{ route('change') }}">Change</a></li>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{{ Auth::user()->username() }}<span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="{{ route('home') }}">Panel</a></li>
|
||||
@if(Auth::user()->is_admin || Auth::user()->is_root)
|
||||
<li><a href="admin/">Admin</a></li>
|
||||
<li role="separator" class="divider"></li>
|
||||
@endif
|
||||
<li><a href="{{ route('logout') }}">Logout</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="header">NAVIGATION</li>
|
||||
<li>
|
||||
<a href="{{ route('panel.home') }}"><i class="fas fa-tachometer-alt"></i> <span>Dashboard</span></a>
|
||||
</li>
|
||||
@canany(['project_see', 'status_see'])
|
||||
<li class="treeview">
|
||||
<a>
|
||||
<i class="fas fa-list"></i> <span>Projects</span>
|
||||
<span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
@can('project_see')<li><a href="{{ route('panel.project') }}"><i class="fas fa-clipboard"></i> Project</a></li>@endcan
|
||||
@can('order_see')<li><a href="{{ route('panel.order') }}"><i class="fas fa-file-invoice"></i> Order</a></li>@endcan
|
||||
@can('status_see')<li><a href="{{ route('panel.status') }}"><i class="fas fa-clipboard"></i> Status</a></li>@endcan
|
||||
</ul>
|
||||
</li>
|
||||
@endcanany
|
||||
@canany(['roles_see', 'user_see'])
|
||||
<li class="treeview">
|
||||
<a>
|
||||
<i class="fas fa-user"></i> <span>Management</span>
|
||||
<span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
@can('user_see')<li><a href="{{ route('panel.ums') }}"><i class="fas fa-id-badge"></i> Users</a></li>@endcan
|
||||
@can('roles_see')<li><a href="{{ route('panel.role') }}"><i class="fas fa-lock"></i> Roles</a></li>@endcan
|
||||
</ul>
|
||||
</li>
|
||||
@endcanany
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="container-fluid" style="margin-top: 75px">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-4 hidden-xs">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Two-Factor Authentication</h3>
|
||||
<div class="panel panel-theme">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Two-Factor Authentication</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="panel-body">
|
||||
@if($TFA)
|
||||
<form method="POST" action="{{ route('2fa.toggle') }}" class="col-xs-10 col-xs-offset-1">
|
||||
@csrf
|
||||
|
@ -76,7 +57,7 @@
|
|||
@enderror
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-block btn-primary">{{ __('Disable 2FA') }}</button>
|
||||
<button type="submit" class="btn btn-custom" style="width: 100%">{{ __('Disable 2FA') }}</button>
|
||||
</form>
|
||||
@else
|
||||
<form method="POST" action="{{ route('2fa.toggle') }}" class="col-xs-10 col-xs-offset-1">
|
||||
|
@ -104,18 +85,18 @@
|
|||
@enderror
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-block btn-primary">{{ __('Enable 2FA') }}</button>
|
||||
<button type="submit" class="btn btn-custom" style="width: 100%">{{ __('Enable 2FA') }}</button>
|
||||
</form>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-8">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">Sessions</h3>
|
||||
<div class="panel panel-theme">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Sessions</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="panel-body">
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -129,7 +110,7 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td class="ip">
|
||||
<code><i class="fa fa-key"></i> @if(filter_var(Request::ip(), FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) ••••:••••:••••:••••:••••:••••:••••:••••@else •••.•••.•••.••• @endif</code>
|
||||
<code><i class="fa fa-key"></i> {{ preg_replace('/([0-9a-zA-Z])/', '•', Request::ip()) }}</code>
|
||||
<code class="hidden"><i class="fa fa-eye-slash"></i> {{ Request::ip() }}</code>
|
||||
</td>
|
||||
<td class="hidden-xs hidden-sm hidden-md">{{ geoip(Request::ip())['country'] }}</td>
|
||||
|
@ -141,13 +122,13 @@
|
|||
@php($agent->setUserAgent($session->user_agent))
|
||||
<tr>
|
||||
<td>
|
||||
<code><i class="fa fa-key"></i> @if(filter_var($session->ip_address, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) ••••:••••:••••:••••:••••:••••:••••:••••@else •••.•••.•••.••• @endif</code>
|
||||
<code><i class="fa fa-key"></i> {{ preg_replace('/([0-9a-zA-Z])/', '•', $session->ip_address) }}</code>
|
||||
<code class="hidden"><i class="fa fa-eye-slash"></i> {{ $session->ip_address }}</code>
|
||||
</td>
|
||||
<td class="hidden-xs hidden-sm hidden-md">{{ geoip($session->ip_address)['country'] }}</td>
|
||||
<td class="hidden-xs hidden-sm hidden-md">{{ $agent->browser() }}</td>
|
||||
<td class="hidden-xs">{{ date('H:i:s d-m-Y', $session->last_activity) }}</td>
|
||||
<td><a href="{{ route('panel.session.delete', ['id' => $session->id]) }}" class="btn btn-primary btn-block"><span class="glyphicon glyphicon-trash"></span></a></td>
|
||||
<td><a href="{{ route('panel.session.delete', ['id' => $session->id]) }}" class="btn btn-custom"><span class="glyphicon glyphicon-trash"></span></a></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
@ -171,4 +152,9 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('javascript')
|
||||
<script src="{{ asset('assets/js/credential.js') }}"></script>
|
||||
@endsection
|
||||
|
|
54
resources/views/ridecount.blade.php
Normal file
54
resources/views/ridecount.blade.php
Normal file
|
@ -0,0 +1,54 @@
|
|||
@extends('layouts.panel')
|
||||
|
||||
@section('navigation')
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="{{ route('home') }}">Home</a></li>
|
||||
<li class="active"><a href="{{ route('status') }}">Attraction Status</a></li>
|
||||
@if(Route::has('photo'))
|
||||
<li><a href="{{ route('photo') }}">ActionFoto's</a></li>
|
||||
@endif
|
||||
<li><a href="{{ route('shows') }}">Show</a></li>
|
||||
<!-- <li><a href="status.php">Attraction Status</a></li>
|
||||
<li><a href="photo.php">Photo's</a></li>
|
||||
<li><a href="show.php">Show</a></li>
|
||||
<li><a href="store.php">Store</a></li> -->
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{{ Auth::user()->username() }}<span class="caret"></span></a><ul class="dropdown-menu">
|
||||
<li><a href="{{ route('profile.home') }}">Profile</a></li>
|
||||
@if(Auth::user()->is_admin || Auth::user()->is_root)
|
||||
<li><a href="admin/">Admin</a></li>
|
||||
<li role="separator" class="divider"></li>
|
||||
@endif
|
||||
<li><a href="{{ route('logout') }}">Logout</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="wrapper">
|
||||
<div class="col-lg-6 col-lg-offset-3 col-md-8 col-md-offset-2">
|
||||
<div class="panel panel-theme news">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">{{ \App\Color\MinecraftColor::stripColor($name) }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="col-lg-6 col-xs-12 col-md-6 col-sm-12">
|
||||
<p>Personal: {{ $personal }}</p>
|
||||
<p>Total: {{ $total }}</p>
|
||||
</div>
|
||||
<div class="col-lg-6 col-xs-12 col-md-6 col-sm-12">
|
||||
@if(!empty($top10))
|
||||
@foreach($top10 as $row)
|
||||
<p><b>{{ $row->num }}#</b> {{ \App\Cache\Cache::getUsername($row->uuid) }}<b>:</b> {{ $row->count }}</p>
|
||||
@endforeach
|
||||
@else
|
||||
<p>Nobody has ridden this attraction this week</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
66
resources/views/show.blade.php
Normal file
66
resources/views/show.blade.php
Normal file
|
@ -0,0 +1,66 @@
|
|||
@extends('layouts.panel')
|
||||
|
||||
@section('navigation')
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="{{ route('home') }}">Home</a></li>
|
||||
<li><a href="{{ route('status') }}">Attraction Status</a></li>
|
||||
@if(Route::has('photo'))
|
||||
<li><a href="{{ route('photo') }}">ActionFoto's</a></li>
|
||||
@endif
|
||||
<li class="active"><a>Show</a></li>
|
||||
<!-- <li><a href="store.php">Store</a></li> -->
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{{ Auth::user()->username() }}<span class="caret"></span></a><ul class="dropdown-menu">
|
||||
<li><a href="{{ route('profile.home') }}">Profile</a></li>
|
||||
@if(Auth::user()->is_admin || Auth::user()->is_root)
|
||||
<li><a href="admin/">Admin</a></li>
|
||||
<li role="separator" class="divider"></li>
|
||||
@endif
|
||||
<li><a href="{{ route('logout') }}">Logout</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="wrapper">
|
||||
@if(!empty($shows))
|
||||
@foreach($shows as $show)
|
||||
<div class="col-lg-6 col-lg-offset-3 col-md-8 col-md-offset-2">
|
||||
<div class="panel panel-theme">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">{{ $show->title }} <span style="float: right"><a style="text-decoration: none; color: #fff" href="{{ route('order', ['show_id' => $show->id]) }}">Ticket <i class="glyphicon glyphicon-shopping-cart"></i></a></span></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-lg-9 col-md-9 col-sm-9">
|
||||
<p>{{ $show->description }}</p>
|
||||
</div>
|
||||
<div class="hidden-xs col-lg-3 col-md-3 col-sm-3">
|
||||
<img src="{{ $show->image }}" style="float: right; height: auto; width: 100%; margin: auto" alt="Image">
|
||||
</div>
|
||||
</div>
|
||||
<p><strong>Price: €</strong>{{ $show->price }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
@else
|
||||
<div class="col-lg-6 col-lg-offset-3 col-md-8 col-md-offset-2">
|
||||
<div class="panel panel-theme">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">No Shows</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="container-fluid">
|
||||
<p>There are no shows.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@endsection
|
68
resources/views/status.blade.php
Normal file
68
resources/views/status.blade.php
Normal file
|
@ -0,0 +1,68 @@
|
|||
@extends('layouts.panel')
|
||||
|
||||
@section('navigation')
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="{{ route('home') }}">Home</a></li>
|
||||
<li class="active"><a>Attraction Status</a></li>
|
||||
@if(Route::has('photo'))
|
||||
<li><a href="{{ route('photo') }}">ActionFoto's</a></li>
|
||||
@endif
|
||||
<li><a href="{{ route('shows') }}">Show</a></li>
|
||||
<!-- <li><a href="status.php">Attraction Status</a></li>
|
||||
<li><a href="photo.php">Photo's</a></li>
|
||||
<li><a href="show.php">Show</a></li>
|
||||
<li><a href="store.php">Store</a></li> -->
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{{ Auth::user()->username() }}<span class="caret"></span></a><ul class="dropdown-menu">
|
||||
<li><a href="{{ route('profile.home') }}">Profile</a></li>
|
||||
@if(Auth::user()->is_admin || Auth::user()->is_root)
|
||||
<li><a href="admin/">Admin</a></li>
|
||||
<li role="separator" class="divider"></li>
|
||||
@endif
|
||||
<li><a href="{{ route('logout') }}">Logout</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="wrapper">
|
||||
<div class="row x">
|
||||
@php($data = \App\Status::loadData())
|
||||
@if(!empty($data))
|
||||
@foreach($data as $region)
|
||||
<div class="col-lg-3 col-md-6 col-sm-6 col-xs-12 y">
|
||||
<div class="panel panel-theme">
|
||||
<div class="panel-heading">
|
||||
<h4 class='panel-title'>{{ \App\Color\MinecraftColor::stripColor($region->name) }}</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
@foreach($region->attractions as $attraction)
|
||||
<div class="col-xs-12 col-lg-6 col-md-6 col-sm-6">
|
||||
<p><span class='col-xs-12 col-sm-12 col-md-12 col-lg-12'><strong><a href="{{ route('ridecount', ['attraction_id' => $attraction->id]) }}" style='text-decoration: none; color: {{ \App\Color\MinecraftColor::color($attraction->name) }}'>{{ \App\Color\MinecraftColor::stripColor($attraction->name) }}</a>:</strong></span> <span class='status col-xs-12 col-sm-12 col-md-12 col-lg-12' style='background-color: {{ \App\Color\MinecraftColor::color($attraction->status) }};'>{{ \App\Color\MinecraftColor::stripColor($attraction->status) }}</span></p>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
@else
|
||||
<div class="col-lg-3 col-md-6 col-sm-6 col-xs-12 y">
|
||||
<div class="panel panel-theme">
|
||||
<div class="panel-heading">
|
||||
<h4 class='panel-title'>No Data</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<p>No Regions with attractions found</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
|
@ -12,6 +12,8 @@
|
|||
*/
|
||||
|
||||
//AUTH
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
Auth::routes([
|
||||
'verify' => true,
|
||||
'register' => true
|
||||
|
@ -35,6 +37,19 @@ Route::namespace('Panel')->prefix('panel')->group(function () {
|
|||
Route::get('/home', 'HomeController@index')->name('home');
|
||||
Route::get('/', 'HomeController@index');
|
||||
|
||||
//Status and Ridecount
|
||||
Route::get('/status', 'HomeController@status')->name('status');
|
||||
Route::get('/ridecount/{attraction_id}', 'RidecountController@index')->name('ridecount');
|
||||
|
||||
//Shows
|
||||
Route::get('/shows', 'ShowController@index')->name('shows');
|
||||
Route::get('/order/{show_id}', 'ShowController@order')->name('order');
|
||||
Route::post('/order/make', 'ShowController@makeOrder')->name('makeOrder');
|
||||
|
||||
|
||||
if(DB::getSchemaBuilder()->hasTable('actionphotos'))
|
||||
Route::get('/photo', 'HomeController@photo')->name('photo');
|
||||
|
||||
//Logout Route
|
||||
Route::get('/logout', '\App\Http\Controllers\Auth\LoginController@logout');
|
||||
|
||||
|
@ -45,15 +60,18 @@ Route::prefix('2fa')->group(function () {
|
|||
Route::post('/toggle', 'ToggleTwoFactorController@toggle')->name('2fa.toggle');
|
||||
});
|
||||
|
||||
//User Profile/Security
|
||||
Route::get('/security/{page?}', 'SecurityController@index')->where('page', '^[1-9]\d*$')->name('security');
|
||||
Route::get('/profile', 'AccountController@index')->name('profile');
|
||||
Route::get('/session/{id}', 'SecurityController@session')->name('session.delete');
|
||||
//Profile
|
||||
Route::namespace('Profile')->prefix('profile')->group(function() {
|
||||
//User Profile/Security
|
||||
Route::get('/home', 'HomeController@index')->name('profile.home');
|
||||
Route::get('/security/{page?}', 'SecurityController@index')->where('page', '^[1-9]\d*$')->name('security');
|
||||
Route::get('/session/{id}', 'SecurityController@session')->name('session.delete');
|
||||
|
||||
//Change
|
||||
Route::prefix('change')->group(function () {
|
||||
//Change
|
||||
Route::prefix('change')->group(function () {
|
||||
Route::get('/', 'ChangeController@index')->name('change');
|
||||
Route::post('/password', 'ChangeController@changePassword')->name('change.password');
|
||||
Route::post('/email', 'ChangeController@changeEmail')->name('change.email');
|
||||
Route::get('/email/{id}/{token}/{email}', 'ChangeController@verifyEmail');
|
||||
});
|
||||
});
|
||||
|
|
Reference in a new issue