Compare commits
No commits in common. "main" and "0.9.1" have entirely different histories.
40 changed files with 384 additions and 526 deletions
|
@ -1,5 +1,5 @@
|
|||
### --- App Settings --- ###
|
||||
APP_NAME=Ctrlpanel.gg
|
||||
APP_NAME=Controlpanel.gg
|
||||
APP_ENV=production
|
||||
APP_KEY=
|
||||
APP_DEBUG=false
|
||||
|
|
4
.github/ISSUE_TEMPLATE/bug.yml
vendored
4
.github/ISSUE_TEMPLATE/bug.yml
vendored
|
@ -31,9 +31,9 @@ body:
|
|||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: ctrlpanel-logs
|
||||
id: controlpanel-logs
|
||||
attributes:
|
||||
label: Ctrlpanel Logs
|
||||
label: Controlpanel Logs
|
||||
description: Please copy and paste your laravel-log output. You may also provide a link to it using the following command `tail -n 100 /var/www/controlpanel/storage/logs/laravel.log | nc pteropaste.com 99`
|
||||
render: Shell
|
||||
- type: textarea
|
||||
|
|
2
LICENSE
2
LICENSE
|
@ -1,6 +1,6 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2021 CtrlPanel.gg
|
||||
Copyright (c) 2021 ControlPanel.gg
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
22
README.md
22
README.md
|
@ -17,29 +17,29 @@
|
|||
- Theme Support
|
||||
- and so much more!
|
||||
|
||||
# CtrlPanel-gg
|
||||
# ControlPanel-gg
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||

|
||||

|
||||
   [](https://crowdin.com/project/controlpanelgg)   
|
||||

|
||||

|
||||
   [](https://crowdin.com/project/controlpanelgg)   
|
||||
## About
|
||||
|
||||
CtrlPanel's Dashboard is a dashboard application designed to offer clients a management tool to manage their pterodactyl servers. This dashboard comes with a credit-based billing solution that credits users hourly for each server they have and suspends them if they run out of credits.
|
||||
ControlPanel's Dashboard is a dashboard application designed to offer clients a management tool to manage their pterodactyl servers. This dashboard comes with a credit-based billing solution that credits users hourly for each server they have and suspends them if they run out of credits.
|
||||
|
||||
This dashboard offers an easy to use and free billing solution for all starting and experienced hosting providers. This dashboard has many customisation options and added discord Oauth verification to offer a solid link between your discord server and your dashboard. You can check our [Demo here](https://demo.ctrlpanel.gg "Demo").
|
||||
This dashboard offers an easy to use and free billing solution for all starting and experienced hosting providers. This dashboard has many customisation options and added discord Oauth verification to offer a solid link between your discord server and your dashboard. You can check our [Demo here](https://demo.controlpanel.gg "Demo").
|
||||
|
||||
### [Installation](https://ctrlpanel.gg/docs/intro "Installation")
|
||||
### [Installation](https://controlpanel.gg/docs/intro "Installation")
|
||||
|
||||
### [Updating](https://ctrlpanel.gg/docs/Installation/updating "Updating")
|
||||
### [Updating](https://controlpanel.gg/docs/Installation/updating "Updating")
|
||||
|
||||
### [Discord](https://discord.gg/4Y6HjD2uyU "Discord")
|
||||
|
||||
### [Contributing](https://ctrlpanel.gg/docs/Contributing/contributing "Contributing")
|
||||
### [Contributing](https://controlpanel.gg/docs/Contributing/contributing "Contributing")
|
||||
|
||||
### [Donating](https://ctrlpanel.gg/docs/Contributing/donating "Donating")
|
||||
### [Donating](https://controlpanel.gg/docs/Contributing/donating "Donating")
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ namespace App\Console\Commands;
|
|||
use App\Models\Payment;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class CleanupOpenPayments extends Command
|
||||
class CleanupPayments extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
|
|
|
@ -32,7 +32,7 @@ class GetGithubVersion extends Command
|
|||
public function handle()
|
||||
{
|
||||
try{
|
||||
$latestVersion = Http::get('https://api.github.com/repos/ctrlpanel-gg/panel/tags')->json()[0]['name'];
|
||||
$latestVersion = Http::get('https://api.github.com/repos/controlpanel-gg/dashboard/tags')->json()[0]['name'];
|
||||
Storage::disk('local')->put('latestVersion', $latestVersion);
|
||||
} catch (Exception $e) {
|
||||
Storage::disk('local')->put('latestVersion', "unknown");
|
||||
|
|
|
@ -9,7 +9,6 @@ use App\Models\User;
|
|||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Redirect;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use PayPalCheckoutSdk\Core\PayPalHttpClient;
|
||||
use PayPalCheckoutSdk\Core\ProductionEnvironment;
|
||||
use PayPalCheckoutSdk\Core\SandboxEnvironment;
|
||||
|
@ -75,7 +74,7 @@ function PaypalPay(Request $request)
|
|||
"application_context" => [
|
||||
"cancel_url" => route('payment.Cancel'),
|
||||
"return_url" => route('payment.PayPalSuccess', ['payment' => $payment->id]),
|
||||
'brand_name' => config('app.name', 'CtrlPanel.gg'),
|
||||
'brand_name' => config('app.name', 'Laravel'),
|
||||
'shipping_preference' => 'NO_SHIPPING'
|
||||
]
|
||||
|
||||
|
@ -86,23 +85,14 @@ function PaypalPay(Request $request)
|
|||
// Call API with your client and get a response for your call
|
||||
$response = getPayPalClient()->execute($request);
|
||||
|
||||
// check for any errors in the response
|
||||
if ($response->statusCode != 201) {
|
||||
throw new \Exception($response->statusCode);
|
||||
}
|
||||
|
||||
// make sure the link is not empty
|
||||
if (empty($response->result->links[1]->href)) {
|
||||
throw new \Exception('No redirect link found');
|
||||
}
|
||||
|
||||
Redirect::away($response->result->links[1]->href)->send();
|
||||
return;
|
||||
} catch (HttpException $ex) {
|
||||
Log::error('PayPal Payment: ' . $ex->getMessage());
|
||||
$payment->delete();
|
||||
error_log($ex->statusCode);
|
||||
error_log($ex->getMessage());
|
||||
|
||||
Redirect::route('store.index')->with('error', __('Payment failed'))->send();
|
||||
$payment->delete();
|
||||
Redirect::route('payment.Cancel');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,6 +10,6 @@ function getConfig()
|
|||
"RoutesIgnoreCsrf" => [
|
||||
"payment/StripeWebhooks",
|
||||
],
|
||||
"enabled" => config('SETTINGS::PAYMENTS:STRIPE:SECRET') && config('SETTINGS::PAYMENTS:STRIPE:ENDPOINT_SECRET') || config('SETTINGS::PAYMENTS:STRIPE:ENDPOINT_TEST_SECRET') && config('SETTINGS::PAYMENTS:STRIPE:TEST_SECRET') && env("APP_ENV") === "local",
|
||||
"enabled" => config('SETTINGS::PAYMENTS:STRIPE:SECRET') && config('SETTINGS::PAYMENTS:STRIPE:CLIENT_ID'),
|
||||
];
|
||||
}
|
||||
|
|
|
@ -51,11 +51,13 @@ class ExtensionHelper
|
|||
$routes = array_merge($routes, $config['RoutesIgnoreCsrf']);
|
||||
}
|
||||
|
||||
// map over the routes and add the extension name as prefix
|
||||
$result = array_map(fn ($item) => "extensions/{$item}", $routes);
|
||||
// add extension/ infront of every route
|
||||
foreach ($routes as $key => $route) {
|
||||
$routes[$key] = 'extensions/' . $route;
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
return $routes;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -14,7 +14,6 @@ use Illuminate\Http\JsonResponse;
|
|||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class ServerController extends Controller
|
||||
{
|
||||
|
@ -28,6 +27,38 @@ class ServerController extends Controller
|
|||
return view('admin.servers.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param Request $request
|
||||
* @return Response
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param Server $server
|
||||
* @return Response
|
||||
*/
|
||||
public function show(Server $server)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*
|
||||
|
@ -165,8 +196,6 @@ class ServerController extends Controller
|
|||
public function dataTable(Request $request)
|
||||
{
|
||||
$query = Server::with(['user', 'product']);
|
||||
|
||||
|
||||
if ($request->has('product')) {
|
||||
$query->where('product_id', '=', $request->input('product'));
|
||||
}
|
||||
|
@ -175,9 +204,6 @@ class ServerController extends Controller
|
|||
}
|
||||
$query->select('servers.*');
|
||||
|
||||
Log::info($request->input('order'));
|
||||
|
||||
|
||||
return datatables($query)
|
||||
->addColumn('user', function (Server $server) {
|
||||
return '<a href="' . route('admin.users.show', $server->user->id) . '">' . $server->user->name . '</a>';
|
||||
|
@ -206,7 +232,7 @@ class ServerController extends Controller
|
|||
';
|
||||
})
|
||||
->addColumn('status', function (Server $server) {
|
||||
$labelColor = $server->suspended ? 'text-danger' : 'text-success';
|
||||
$labelColor = $server->isSuspended() ? 'text-danger' : 'text-success';
|
||||
|
||||
return '<i class="fas ' . $labelColor . ' fa-circle mr-2"></i>';
|
||||
})
|
||||
|
|
|
@ -14,7 +14,6 @@ use Illuminate\Validation\Rule;
|
|||
|
||||
class ShopProductController extends Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
|
@ -67,12 +66,23 @@ class ShopProductController extends Controller
|
|||
'display' => 'required|string|max:60',
|
||||
]);
|
||||
|
||||
$disabled = !is_null($request->input('disabled'));
|
||||
$disabled = ! is_null($request->input('disabled'));
|
||||
ShopProduct::create(array_merge($request->all(), ['disabled' => $disabled]));
|
||||
|
||||
return redirect()->route('admin.store.index')->with('success', __('Store item has been created!'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param ShopProduct $shopProduct
|
||||
* @return Response
|
||||
*/
|
||||
public function show(ShopProduct $shopProduct)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*
|
||||
|
@ -106,7 +116,7 @@ class ShopProductController extends Controller
|
|||
'display' => 'required|string|max:60',
|
||||
]);
|
||||
|
||||
$disabled = !is_null($request->input('disabled'));
|
||||
$disabled = ! is_null($request->input('disabled'));
|
||||
$shopProduct->update(array_merge($request->all(), ['disabled' => $disabled]));
|
||||
|
||||
return redirect()->route('admin.store.index')->with('success', __('Store item has been updated!'));
|
||||
|
@ -119,7 +129,7 @@ class ShopProductController extends Controller
|
|||
*/
|
||||
public function disable(Request $request, ShopProduct $shopProduct)
|
||||
{
|
||||
$shopProduct->update(['disabled' => !$shopProduct->disabled]);
|
||||
$shopProduct->update(['disabled' => ! $shopProduct->disabled]);
|
||||
|
||||
return redirect()->route('admin.store.index')->with('success', __('Product has been updated!'));
|
||||
}
|
||||
|
@ -137,20 +147,19 @@ class ShopProductController extends Controller
|
|||
return redirect()->back()->with('success', __('Store item has been removed!'));
|
||||
}
|
||||
|
||||
public function dataTable(Request $request)
|
||||
public function dataTable()
|
||||
{
|
||||
$query = ShopProduct::query();
|
||||
|
||||
|
||||
return datatables($query)
|
||||
->addColumn('actions', function (ShopProduct $shopProduct) {
|
||||
return '
|
||||
<a data-content="' . __('Edit') . '" data-toggle="popover" data-trigger="hover" data-placement="top" href="' . route('admin.store.edit', $shopProduct->id) . '" class="btn btn-sm btn-info mr-1"><i class="fas fa-pen"></i></a>
|
||||
<a data-content="'.__('Edit').'" data-toggle="popover" data-trigger="hover" data-placement="top" href="'.route('admin.store.edit', $shopProduct->id).'" class="btn btn-sm btn-info mr-1"><i class="fas fa-pen"></i></a>
|
||||
|
||||
<form class="d-inline" onsubmit="return submitResult();" method="post" action="' . route('admin.store.destroy', $shopProduct->id) . '">
|
||||
' . csrf_field() . '
|
||||
' . method_field('DELETE') . '
|
||||
<button data-content="' . __('Delete') . '" data-toggle="popover" data-trigger="hover" data-placement="top" class="btn btn-sm btn-danger mr-1"><i class="fas fa-trash"></i></button>
|
||||
<form class="d-inline" onsubmit="return submitResult();" method="post" action="'.route('admin.store.destroy', $shopProduct->id).'">
|
||||
'.csrf_field().'
|
||||
'.method_field('DELETE').'
|
||||
<button data-content="'.__('Delete').'" data-toggle="popover" data-trigger="hover" data-placement="top" class="btn btn-sm btn-danger mr-1"><i class="fas fa-trash"></i></button>
|
||||
</form>
|
||||
';
|
||||
})
|
||||
|
@ -158,12 +167,12 @@ class ShopProductController extends Controller
|
|||
$checked = $shopProduct->disabled == false ? 'checked' : '';
|
||||
|
||||
return '
|
||||
<form class="d-inline" onsubmit="return submitResult();" method="post" action="' . route('admin.store.disable', $shopProduct->id) . '">
|
||||
' . csrf_field() . '
|
||||
' . method_field('PATCH') . '
|
||||
<form class="d-inline" onsubmit="return submitResult();" method="post" action="'.route('admin.store.disable', $shopProduct->id).'">
|
||||
'.csrf_field().'
|
||||
'.method_field('PATCH').'
|
||||
<div class="custom-control custom-switch">
|
||||
<input ' . $checked . ' name="disabled" onchange="this.form.submit()" type="checkbox" class="custom-control-input" id="switch' . $shopProduct->id . '">
|
||||
<label class="custom-control-label" for="switch' . $shopProduct->id . '"></label>
|
||||
<input '.$checked.' name="disabled" onchange="this.form.submit()" type="checkbox" class="custom-control-input" id="switch'.$shopProduct->id.'">
|
||||
<label class="custom-control-label" for="switch'.$shopProduct->id.'"></label>
|
||||
</div>
|
||||
</form>
|
||||
';
|
||||
|
|
|
@ -26,7 +26,6 @@ use Spatie\QueryBuilder\QueryBuilder;
|
|||
|
||||
class UserController extends Controller
|
||||
{
|
||||
|
||||
private Pterodactyl $pterodactyl;
|
||||
|
||||
public function __construct(Pterodactyl $pterodactyl)
|
||||
|
@ -133,7 +132,7 @@ class UserController extends Controller
|
|||
]);
|
||||
}
|
||||
|
||||
if (!is_null($request->input('new_password'))) {
|
||||
if (! is_null($request->input('new_password'))) {
|
||||
$request->validate([
|
||||
'new_password' => 'required|string|min:8',
|
||||
'new_password_confirmation' => 'required|same:new_password',
|
||||
|
@ -260,7 +259,7 @@ class UserController extends Controller
|
|||
public function toggleSuspended(User $user)
|
||||
{
|
||||
try {
|
||||
!$user->isSuspended() ? $user->suspend() : $user->unSuspend();
|
||||
! $user->isSuspended() ? $user->suspend() : $user->unSuspend();
|
||||
} catch (Exception $exception) {
|
||||
return redirect()->back()->with('error', $exception->getMessage());
|
||||
}
|
||||
|
@ -271,45 +270,52 @@ class UserController extends Controller
|
|||
/**
|
||||
* @throws Exception
|
||||
*/
|
||||
public function dataTable(Request $request)
|
||||
public function dataTable()
|
||||
{
|
||||
$query = User::with('discordUser')->withCount('servers');
|
||||
// manually count referrals in user_referrals table
|
||||
$query->selectRaw('users.*, (SELECT COUNT(*) FROM user_referrals WHERE user_referrals.referral_id = users.id) as referrals_count');
|
||||
|
||||
$query = User::with(['discordUser', 'servers'])->select('users.*');
|
||||
|
||||
return datatables($query)
|
||||
->addColumn('avatar', function (User $user) {
|
||||
return '<img width="28px" height="28px" class="rounded-circle ml-1" src="' . $user->getAvatar() . '">';
|
||||
return '<img width="28px" height="28px" class="rounded-circle ml-1" src="'.$user->getAvatar().'">';
|
||||
})
|
||||
->addColumn('credits', function (User $user) {
|
||||
return '<i class="fas fa-coins mr-2"></i> ' . $user->credits();
|
||||
return '<i class="fas fa-coins mr-2"></i> '.$user->credits();
|
||||
})
|
||||
->addColumn('verified', function (User $user) {
|
||||
return $user->getVerifiedStatus();
|
||||
})
|
||||
->addColumn('servers', function (User $user) {
|
||||
return $user->servers->count();
|
||||
})
|
||||
->addColumn('referrals', function (User $user) {
|
||||
return DB::table('user_referrals')->where('referral_id', '=', $user->id)->count();
|
||||
})
|
||||
->addColumn('discordId', function (User $user) {
|
||||
return $user->discordUser ? $user->discordUser->id : '';
|
||||
})
|
||||
->addColumn('last_seen', function (User $user) {
|
||||
return ['display' => $user->last_seen ? $user->last_seen->diffForHumans() : '',
|
||||
'raw' => $user->last_seen ? strtotime($user->last_seen) : '', ];
|
||||
})
|
||||
->addColumn('actions', function (User $user) {
|
||||
$suspendColor = $user->isSuspended() ? 'btn-success' : 'btn-warning';
|
||||
$suspendIcon = $user->isSuspended() ? 'fa-play-circle' : 'fa-pause-circle';
|
||||
$suspendText = $user->isSuspended() ? __('Unsuspend') : __('Suspend');
|
||||
|
||||
return '
|
||||
<a data-content="' . __('Login as User') . '" data-toggle="popover" data-trigger="hover" data-placement="top" href="' . route('admin.users.loginas', $user->id) . '" class="btn btn-sm btn-primary mr-1"><i class="fas fa-sign-in-alt"></i></a>
|
||||
<a data-content="' . __('Verify') . '" data-toggle="popover" data-trigger="hover" data-placement="top" href="' . route('admin.users.verifyEmail', $user->id) . '" class="btn btn-sm btn-secondary mr-1"><i class="fas fa-envelope"></i></a>
|
||||
<a data-content="' . __('Show') . '" data-toggle="popover" data-trigger="hover" data-placement="top" href="' . route('admin.users.show', $user->id) . '" class="btn btn-sm text-white btn-warning mr-1"><i class="fas fa-eye"></i></a>
|
||||
<a data-content="' . __('Edit') . '" data-toggle="popover" data-trigger="hover" data-placement="top" href="' . route('admin.users.edit', $user->id) . '" class="btn btn-sm btn-info mr-1"><i class="fas fa-pen"></i></a>
|
||||
<form class="d-inline" method="post" action="' . route('admin.users.togglesuspend', $user->id) . '">
|
||||
' . csrf_field() . '
|
||||
<button data-content="' . $suspendText . '" data-toggle="popover" data-trigger="hover" data-placement="top" class="btn btn-sm ' . $suspendColor . ' text-white mr-1"><i class="far ' . $suspendIcon . '"></i></button>
|
||||
</form>
|
||||
<form class="d-inline" onsubmit="return submitResult();" method="post" action="' . route('admin.users.destroy', $user->id) . '">
|
||||
' . csrf_field() . '
|
||||
' . method_field('DELETE') . '
|
||||
<button data-content="' . __('Delete') . '" data-toggle="popover" data-trigger="hover" data-placement="top" class="btn btn-sm btn-danger mr-1"><i class="fas fa-trash"></i></button>
|
||||
</form>
|
||||
<a data-content="'.__('Login as User').'" data-toggle="popover" data-trigger="hover" data-placement="top" href="'.route('admin.users.loginas', $user->id).'" class="btn btn-sm btn-primary mr-1"><i class="fas fa-sign-in-alt"></i></a>
|
||||
<a data-content="'.__('Verify').'" data-toggle="popover" data-trigger="hover" data-placement="top" href="'.route('admin.users.verifyEmail', $user->id).'" class="btn btn-sm btn-secondary mr-1"><i class="fas fa-envelope"></i></a>
|
||||
<a data-content="'.__('Show').'" data-toggle="popover" data-trigger="hover" data-placement="top" href="'.route('admin.users.show', $user->id).'" class="btn btn-sm text-white btn-warning mr-1"><i class="fas fa-eye"></i></a>
|
||||
<a data-content="'.__('Edit').'" data-toggle="popover" data-trigger="hover" data-placement="top" href="'.route('admin.users.edit', $user->id).'" class="btn btn-sm btn-info mr-1"><i class="fas fa-pen"></i></a>
|
||||
<form class="d-inline" method="post" action="'.route('admin.users.togglesuspend', $user->id).'">
|
||||
'.csrf_field().'
|
||||
<button data-content="'.$suspendText.'" data-toggle="popover" data-trigger="hover" data-placement="top" class="btn btn-sm '.$suspendColor.' text-white mr-1"><i class="far '.$suspendIcon.'"></i></button>
|
||||
</form>
|
||||
<form class="d-inline" onsubmit="return submitResult();" method="post" action="'.route('admin.users.destroy', $user->id).'">
|
||||
'.csrf_field().'
|
||||
'.method_field('DELETE').'
|
||||
<button data-content="'.__('Delete').'" data-toggle="popover" data-trigger="hover" data-placement="top" class="btn btn-sm btn-danger mr-1"><i class="fas fa-trash"></i></button>
|
||||
</form>
|
||||
';
|
||||
})
|
||||
->editColumn('role', function (User $user) {
|
||||
|
@ -328,15 +334,15 @@ class UserController extends Controller
|
|||
break;
|
||||
}
|
||||
|
||||
return '<span class="badge ' . $badgeColor . '">' . $user->role . '</span>';
|
||||
})
|
||||
->editColumn('last_seen', function (User $user) {
|
||||
return $user->last_seen ? $user->last_seen->diffForHumans() : __('Never');
|
||||
return '<span class="badge '.$badgeColor.'">'.$user->role.'</span>';
|
||||
})
|
||||
->editColumn('name', function (User $user) {
|
||||
return '<a class="text-info" target="_blank" href="' . config('SETTINGS::SYSTEM:PTERODACTYL:URL') . '/admin/users/view/' . $user->pterodactyl_id . '">' . strip_tags($user->name) . '</a>';
|
||||
return '<a class="text-info" target="_blank" href="'.config('SETTINGS::SYSTEM:PTERODACTYL:URL').'/admin/users/view/'.$user->pterodactyl_id.'">'.strip_tags($user->name).'</a>';
|
||||
})
|
||||
->rawColumns(['avatar', 'name', 'credits', 'role', 'usage', 'actions'])
|
||||
->make();
|
||||
/*->orderColumn('last_seen', function ($query) {
|
||||
$query->orderBy('last_seen', "desc");
|
||||
})*/
|
||||
->rawColumns(['avatar', 'name', 'credits', 'role', 'usage', 'referrals', 'actions', 'last_seen'])
|
||||
->make(true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,18 +25,16 @@ class HomeController extends Controller
|
|||
$this->middleware('auth');
|
||||
}
|
||||
|
||||
/*
|
||||
* TODO: This is commented due to the fact the market is a bad dependency, will be changed later.
|
||||
public function callHome()
|
||||
{
|
||||
if (Storage::exists('callHome')) {
|
||||
return;
|
||||
}
|
||||
Http::asForm()->post('https://market.ctrlpanel.gg/callhome.php', [
|
||||
Http::asForm()->post('https://market.controlpanel.gg/callhome.php', [
|
||||
'id' => Hash::make(URL::current()),
|
||||
]);
|
||||
Storage::put('callHome', 'This is only used to count the installations of cpgg.');
|
||||
}*/
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Get the Background Color for the Days-Left-Box in HomeView
|
||||
|
@ -107,7 +105,7 @@ class HomeController extends Controller
|
|||
$unit = $daysLeft < 1 ? ($hoursLeft < 1 ? null : __('hours')) : __('days');
|
||||
}
|
||||
|
||||
//$this->callhome(); TODO: Same as the function
|
||||
$this->callhome();
|
||||
|
||||
// RETURN ALL VALUES
|
||||
return view('home')->with([
|
||||
|
|
|
@ -25,12 +25,7 @@ class TicketsController extends Controller
|
|||
|
||||
public function show($ticket_id)
|
||||
{
|
||||
try {
|
||||
$ticket = Ticket::where('ticket_id', $ticket_id)->firstOrFail();
|
||||
} catch (Exception $e)
|
||||
{
|
||||
return redirect()->back()->with('warning', __('Ticket not found on the server. It potentially got deleted earlier'));
|
||||
}
|
||||
$ticketcomments = $ticket->ticketcomments;
|
||||
$ticketcategory = $ticket->ticketcategory;
|
||||
$server = Server::where('id', $ticket->server)->first();
|
||||
|
@ -38,20 +33,9 @@ class TicketsController extends Controller
|
|||
return view('moderator.ticket.show', compact('ticket', 'ticketcategory', 'ticketcomments', 'server'));
|
||||
}
|
||||
|
||||
public function changeStatus($ticket_id)
|
||||
public function close($ticket_id)
|
||||
{
|
||||
try {
|
||||
$ticket = Ticket::where('ticket_id', $ticket_id)->firstOrFail();
|
||||
} catch(Exception $e)
|
||||
{
|
||||
return redirect()->back()->with('warning', __('Ticket not found on the server. It potentially got deleted earlier'));
|
||||
}
|
||||
|
||||
if($ticket->status == "Closed"){
|
||||
$ticket->status = "Reopened";
|
||||
$ticket->save();
|
||||
return redirect()->back()->with('success', __('A ticket has been reopened, ID: #') . $ticket->ticket_id);
|
||||
}
|
||||
$ticket->status = 'Closed';
|
||||
$ticket->save();
|
||||
$ticketOwner = $ticket->user;
|
||||
|
@ -61,13 +45,7 @@ class TicketsController extends Controller
|
|||
|
||||
public function delete($ticket_id)
|
||||
{
|
||||
try {
|
||||
$ticket = Ticket::where('ticket_id', $ticket_id)->firstOrFail();
|
||||
} catch (Exception $e)
|
||||
{
|
||||
return redirect()->back()->with('warning', __('Ticket not found on the server. It potentially got deleted earlier'));
|
||||
}
|
||||
|
||||
TicketComment::where('ticket_id', $ticket->id)->delete();
|
||||
$ticket->delete();
|
||||
|
||||
|
@ -77,11 +55,7 @@ class TicketsController extends Controller
|
|||
public function reply(Request $request)
|
||||
{
|
||||
$this->validate($request, ['ticketcomment' => 'required']);
|
||||
try {
|
||||
$ticket = Ticket::where('id', $request->input('ticket_id'))->firstOrFail();
|
||||
} catch (Exception $e){
|
||||
return redirect()->back()->with('warning', __('Ticket not found on the server. It potentially got deleted earlier'));
|
||||
}
|
||||
$ticket = Ticket::where('id', $request->input('ticket_id'))->firstOrFail();
|
||||
$ticket->status = 'Answered';
|
||||
$ticket->update();
|
||||
TicketComment::create([
|
||||
|
@ -89,12 +63,7 @@ class TicketsController extends Controller
|
|||
'user_id' => Auth::user()->id,
|
||||
'ticketcomment' => $request->input('ticketcomment'),
|
||||
]);
|
||||
try {
|
||||
$user = User::where('id', $ticket->user_id)->firstOrFail();
|
||||
} catch(Exception $e)
|
||||
{
|
||||
return redirect()->back()->with('warning', __('User not found on the server. Check on the admin database or try again later.'));
|
||||
}
|
||||
$newmessage = $request->input('ticketcomment');
|
||||
$user->notify(new ReplyNotification($ticket, $user, $newmessage));
|
||||
|
||||
|
@ -116,16 +85,12 @@ class TicketsController extends Controller
|
|||
return '<a href="'.route('admin.users.show', $tickets->user->id).'">'.$tickets->user->name.'</a>';
|
||||
})
|
||||
->addColumn('actions', function (Ticket $tickets) {
|
||||
$statusButtonColor = ($tickets->status == "Closed") ? 'btn-success' : 'btn-warning';
|
||||
$statusButtonIcon = ($tickets->status == "Closed") ? 'fa-redo' : 'fa-times';
|
||||
$statusButtonText = ($tickets->status == "Closed") ? __('Reopen') : __('Close');
|
||||
|
||||
return '
|
||||
<a data-content="'.__('View').'" data-toggle="popover" data-trigger="hover" data-placement="top" href="'.route('moderator.ticket.show', ['ticket_id' => $tickets->ticket_id]).'" class="btn btn-sm text-white btn-info mr-1"><i class="fas fa-eye"></i></a>
|
||||
<form class="d-inline" method="post" action="'.route('moderator.ticket.changeStatus', ['ticket_id' => $tickets->ticket_id]).'">
|
||||
<form class="d-inline" method="post" action="'.route('moderator.ticket.close', ['ticket_id' => $tickets->ticket_id]).'">
|
||||
'.csrf_field().'
|
||||
'.method_field('POST').'
|
||||
<button data-content="'.__($statusButtonText).'" data-toggle="popover" data-trigger="hover" data-placement="top" class="btn btn-sm text-white '.$statusButtonColor.' mr-1"><i class="fas '.$statusButtonIcon.'"></i></button>
|
||||
<button data-content="'.__('Close').'" data-toggle="popover" data-trigger="hover" data-placement="top" class="btn btn-sm text-white btn-warning mr-1"><i class="fas fa-times"></i></button>
|
||||
</form>
|
||||
<form class="d-inline" method="post" action="'.route('moderator.ticket.delete', ['ticket_id' => $tickets->ticket_id]).'">
|
||||
'.csrf_field().'
|
||||
|
@ -136,7 +101,6 @@ class TicketsController extends Controller
|
|||
})
|
||||
->editColumn('status', function (Ticket $tickets) {
|
||||
switch ($tickets->status) {
|
||||
case 'Reopened':
|
||||
case 'Open':
|
||||
$badgeColor = 'badge-success';
|
||||
break;
|
||||
|
@ -171,13 +135,8 @@ class TicketsController extends Controller
|
|||
|
||||
public function blacklistAdd(Request $request)
|
||||
{
|
||||
try {
|
||||
$user = User::where('id', $request->user_id)->firstOrFail();
|
||||
$user = User::where('id', $request->user_id)->first();
|
||||
$check = TicketBlacklist::where('user_id', $user->id)->first();
|
||||
}
|
||||
catch (Exception $e){
|
||||
return redirect()->back()->with('warning', __('User not found on the server. Check the admin database or try again later.'));
|
||||
}
|
||||
if ($check) {
|
||||
$check->reason = $request->reason;
|
||||
$check->status = 'True';
|
||||
|
@ -204,12 +163,7 @@ class TicketsController extends Controller
|
|||
|
||||
public function blacklistChange($id)
|
||||
{
|
||||
try {
|
||||
$blacklist = TicketBlacklist::where('id', $id)->first();
|
||||
}
|
||||
catch (Exception $e){
|
||||
return redirect()->back()->with('warning', __('User not found on the server. Check the admin database or try again later.'));
|
||||
}
|
||||
$blacklist = TicketBlacklist::where('id', $id)->first();
|
||||
if ($blacklist->status == 'True') {
|
||||
$blacklist->status = 'False';
|
||||
} else {
|
||||
|
|
|
@ -26,50 +26,53 @@ class TicketsController extends Controller
|
|||
return view('ticket.index', compact('tickets', 'ticketcategories'));
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
//check in blacklist
|
||||
$check = TicketBlacklist::where('user_id', Auth::user()->id)->first();
|
||||
if ($check && $check->status == 'True') {
|
||||
return redirect()->route('ticket.index')->with('error', __("You can't make a ticket because you're on the blacklist for a reason: '".$check->reason."', please contact the administrator"));
|
||||
}
|
||||
$ticketcategories = TicketCategory::all();
|
||||
$servers = Auth::user()->servers;
|
||||
|
||||
return view('ticket.create', compact('ticketcategories', 'servers'));
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
{
|
||||
$this->validate($request, [
|
||||
'title' => 'required',
|
||||
'ticketcategory' => 'required',
|
||||
'priority' => 'required',
|
||||
'message' => 'required',]
|
||||
'title' => 'required',
|
||||
'ticketcategory' => 'required',
|
||||
'priority' => 'required',
|
||||
'message' => 'required', ]
|
||||
);
|
||||
$ticket = new Ticket([
|
||||
'title' => $request->input('title'),
|
||||
'user_id' => Auth::user()->id,
|
||||
'ticket_id' => strtoupper(Str::random(8)),
|
||||
'ticketcategory_id' => $request->input('ticketcategory'),
|
||||
'priority' => $request->input('priority'),
|
||||
'message' => $request->input('message'),
|
||||
'status' => 'Open',
|
||||
'server' => $request->input('server'),]
|
||||
'title' => $request->input('title'),
|
||||
'user_id' => Auth::user()->id,
|
||||
'ticket_id' => strtoupper(Str::random(8)),
|
||||
'ticketcategory_id' => $request->input('ticketcategory'),
|
||||
'priority' => $request->input('priority'),
|
||||
'message' => $request->input('message'),
|
||||
'status' => 'Open',
|
||||
'server' => $request->input('server'), ]
|
||||
);
|
||||
$ticket->save();
|
||||
$user = Auth::user();
|
||||
if (config('SETTINGS::TICKET:NOTIFY') == "all") {
|
||||
$admin = User::where('role', 'admin')->orWhere('role', 'mod')->get();
|
||||
}
|
||||
if (config('SETTINGS::TICKET:NOTIFY') == "admin") {
|
||||
$admin = User::where('role', 'admin')->get();
|
||||
}
|
||||
if (config('SETTINGS::TICKET:NOTIFY') == "moderator") {
|
||||
$admin = User::where('role', 'mod')->get();
|
||||
}
|
||||
if(config('SETTINGS::TICKET:NOTIFY') == "all"){ $admin = User::where('role', 'admin')->orWhere('role', 'mod')->get();}
|
||||
if(config('SETTINGS::TICKET:NOTIFY') == "admin"){ $admin = User::where('role', 'admin')->get();}
|
||||
if(config('SETTINGS::TICKET:NOTIFY') == "moderator"){ $admin = User::where('role', 'mod')->get();}
|
||||
$user->notify(new CreateNotification($ticket));
|
||||
if (config('SETTINGS::TICKET:NOTIFY') != "none") {
|
||||
if(config('SETTINGS::TICKET:NOTIFY') != "none"){
|
||||
Notification::send($admin, new AdminCreateNotification($ticket, $user));
|
||||
}
|
||||
|
||||
return redirect()->route('ticket.index')->with('success', __('A ticket has been opened, ID: #') . $ticket->ticket_id);
|
||||
return redirect()->route('ticket.index')->with('success', __('A ticket has been opened, ID: #').$ticket->ticket_id);
|
||||
}
|
||||
|
||||
public function show($ticket_id)
|
||||
{
|
||||
try {
|
||||
$ticket = Ticket::where('ticket_id', $ticket_id)->firstOrFail();
|
||||
} catch (Exception $e) {
|
||||
return redirect()->back()->with('warning', __('Ticket not found on the server. It potentially got deleted earlier'));
|
||||
}
|
||||
$ticket = Ticket::where('ticket_id', $ticket_id)->firstOrFail();
|
||||
$ticketcomments = $ticket->ticketcomments;
|
||||
$ticketcategory = $ticket->ticketcategory;
|
||||
$server = Server::where('id', $ticket->server)->first();
|
||||
|
@ -82,14 +85,10 @@ class TicketsController extends Controller
|
|||
//check in blacklist
|
||||
$check = TicketBlacklist::where('user_id', Auth::user()->id)->first();
|
||||
if ($check && $check->status == 'True') {
|
||||
return redirect()->route('ticket.index')->with('error', __("You can't reply a ticket because you're on the blacklist for a reason: '" . $check->reason . "', please contact the administrator"));
|
||||
return redirect()->route('ticket.index')->with('error', __("You can't reply a ticket because you're on the blacklist for a reason: '".$check->reason."', please contact the administrator"));
|
||||
}
|
||||
$this->validate($request, ['ticketcomment' => 'required']);
|
||||
try {
|
||||
$ticket = Ticket::where('id', $request->input('ticket_id'))->firstOrFail();
|
||||
} catch (Exception $e) {
|
||||
return redirect()->back()->with('warning', __('Ticket not found on the server. It potentially got deleted earlier'));
|
||||
}
|
||||
$ticket = Ticket::where('id', $request->input('ticket_id'))->firstOrFail();
|
||||
$ticket->status = 'Client Reply';
|
||||
$ticket->update();
|
||||
$ticketcomment = TicketComment::create([
|
||||
|
@ -105,32 +104,9 @@ class TicketsController extends Controller
|
|||
|
||||
return redirect()->back()->with('success', __('Your comment has been submitted'));
|
||||
}
|
||||
|
||||
public function create()
|
||||
public function close($ticket_id)
|
||||
{
|
||||
//check in blacklist
|
||||
$check = TicketBlacklist::where('user_id', Auth::user()->id)->first();
|
||||
if ($check && $check->status == 'True') {
|
||||
return redirect()->route('ticket.index')->with('error', __("You can't make a ticket because you're on the blacklist for a reason: '" . $check->reason . "', please contact the administrator"));
|
||||
}
|
||||
$ticketcategories = TicketCategory::all();
|
||||
$servers = Auth::user()->servers;
|
||||
|
||||
return view('ticket.create', compact('ticketcategories', 'servers'));
|
||||
}
|
||||
|
||||
public function changeStatus($ticket_id)
|
||||
{
|
||||
try {
|
||||
$ticket = Ticket::where('user_id', Auth::user()->id)->where("ticket_id", $ticket_id)->firstOrFail();
|
||||
} catch (Exception $e) {
|
||||
return redirect()->back()->with('warning', __('Ticket not found on the server. It potentially got deleted earlier'));
|
||||
}
|
||||
if ($ticket->status == "Closed") {
|
||||
$ticket->status = "Reopened";
|
||||
$ticket->save();
|
||||
return redirect()->back()->with('success', __('A ticket has been reopened, ID: #') . $ticket->ticket_id);
|
||||
}
|
||||
$ticket = Ticket::where('user_id', Auth::user()->id)->where("ticket_id", $ticket_id)->firstOrFail();
|
||||
$ticket->status = "Closed";
|
||||
$ticket->save();
|
||||
return redirect()->back()->with('success', __('A ticket has been closed, ID: #') . $ticket->ticket_id);
|
||||
|
@ -145,11 +121,10 @@ class TicketsController extends Controller
|
|||
return $tickets->ticketcategory->name;
|
||||
})
|
||||
->editColumn('title', function (Ticket $tickets) {
|
||||
return '<a class="text-info" href="' . route('ticket.show', ['ticket_id' => $tickets->ticket_id]) . '">' . '#' . $tickets->ticket_id . ' - ' . htmlspecialchars($tickets->title) . '</a>';
|
||||
return '<a class="text-info" href="'.route('ticket.show', ['ticket_id' => $tickets->ticket_id]).'">'.'#'.$tickets->ticket_id.' - '.htmlspecialchars($tickets->title).'</a>';
|
||||
})
|
||||
->editColumn('status', function (Ticket $tickets) {
|
||||
switch ($tickets->status) {
|
||||
case 'Reopened':
|
||||
case 'Open':
|
||||
$badgeColor = 'badge-success';
|
||||
break;
|
||||
|
@ -164,7 +139,7 @@ class TicketsController extends Controller
|
|||
break;
|
||||
}
|
||||
|
||||
return '<span class="badge ' . $badgeColor . '">' . $tickets->status . '</span>';
|
||||
return '<span class="badge '.$badgeColor.'">'.$tickets->status.'</span>';
|
||||
})
|
||||
->editColumn('priority', function (Ticket $tickets) {
|
||||
return __($tickets->priority);
|
||||
|
@ -174,16 +149,12 @@ class TicketsController extends Controller
|
|||
'raw' => $tickets->updated_at ? strtotime($tickets->updated_at) : ''];
|
||||
})
|
||||
->addColumn('actions', function (Ticket $tickets) {
|
||||
$statusButtonColor = ($tickets->status == "Closed") ? 'btn-success' : 'btn-warning';
|
||||
$statusButtonIcon = ($tickets->status == "Closed") ? 'fa-redo' : 'fa-times';
|
||||
$statusButtonText = ($tickets->status == "Closed") ? __('Reopen') : __('Close');
|
||||
|
||||
return '
|
||||
<a data-content="' . __('View') . '" data-toggle="popover" data-trigger="hover" data-placement="top" href="' . route('ticket.show', ['ticket_id' => $tickets->ticket_id]) . '" class="btn btn-sm text-white btn-info mr-1"><i class="fas fa-eye"></i></a>
|
||||
<form class="d-inline" method="post" action="' . route('ticket.changeStatus', ['ticket_id' => $tickets->ticket_id]) . '">
|
||||
' . csrf_field() . '
|
||||
' . method_field('POST') . '
|
||||
<button data-content="' . __($statusButtonText) . '" data-toggle="popover" data-trigger="hover" data-placement="top" class="btn btn-sm text-white ' . $statusButtonColor . ' mr-1"><i class="fas ' . $statusButtonIcon . '"></i></button>
|
||||
<a data-content="'.__('View').'" data-toggle="popover" data-trigger="hover" data-placement="top" href="'.route('ticket.show', ['ticket_id' => $tickets->ticket_id]).'" class="btn btn-sm text-white btn-info mr-1"><i class="fas fa-eye"></i></a>
|
||||
<form class="d-inline" method="post" action="'.route('ticket.close', ['ticket_id' => $tickets->ticket_id]).'">
|
||||
'.csrf_field().'
|
||||
'.method_field('POST').'
|
||||
<button data-content="'.__('Close').'" data-toggle="popover" data-trigger="hover" data-placement="top" class="btn btn-sm text-white btn-warning mr-1"><i class="fas fa-times"></i></button>
|
||||
</form>
|
||||
|
||||
</form>
|
||||
|
|
|
@ -22,10 +22,9 @@ class Verified
|
|||
*/
|
||||
public function handle($event)
|
||||
{
|
||||
if (!$event->user->email_verified_reward) {
|
||||
if (! $event->user->email_verified_reward) {
|
||||
$event->user->increment('server_limit', config('SETTINGS::USER:SERVER_LIMIT_REWARD_AFTER_VERIFY_EMAIL'));
|
||||
$event->user->increment('credits', config('SETTINGS::USER:CREDITS_REWARD_AFTER_VERIFY_EMAIL'));
|
||||
$event->user->update(['email_verified_reward' => true]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,7 +61,6 @@ class User extends Authenticatable implements MustVerifyEmail
|
|||
'avatar',
|
||||
'suspended',
|
||||
'referral_code',
|
||||
'email_verified_reward'
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -84,7 +83,6 @@ class User extends Authenticatable implements MustVerifyEmail
|
|||
'last_seen' => 'datetime',
|
||||
'credits' => 'float',
|
||||
'server_limit' => 'float',
|
||||
'email_verified_reward' => 'boolean'
|
||||
];
|
||||
|
||||
public static function boot()
|
||||
|
@ -286,7 +284,7 @@ class User extends Authenticatable implements MustVerifyEmail
|
|||
public function reVerifyEmail()
|
||||
{
|
||||
$this->forceFill([
|
||||
'email_verified_at' => null
|
||||
'email_verified_at' => null,
|
||||
])->save();
|
||||
}
|
||||
|
||||
|
|
|
@ -46,9 +46,9 @@ class AppServiceProvider extends ServiceProvider
|
|||
}
|
||||
|
||||
//if none of result array is true. it sets ok to false
|
||||
if (!in_array(true, $result)) {
|
||||
if (! in_array(true, $result)) {
|
||||
$ok = false;
|
||||
$validator->setCustomMessages(['multiple_date_format' => 'The format must be one of ' . implode(',', $parameters)]);
|
||||
$validator->setCustomMessages(['multiple_date_format' => 'The format must be one of '.implode(',', $parameters)]);
|
||||
}
|
||||
|
||||
return $ok;
|
||||
|
@ -60,7 +60,7 @@ class AppServiceProvider extends ServiceProvider
|
|||
view()->share('useful_links', $useful_links);
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
Log::error("Couldnt find useful_links. Probably the installation is not completet. " . $e);
|
||||
Log::error("Couldnt find useful_links. Probably the installation is not completet. ".$e);
|
||||
}
|
||||
|
||||
//only run if the installer has been executed
|
||||
|
@ -71,14 +71,12 @@ class AppServiceProvider extends ServiceProvider
|
|||
config([$setting->key => $setting->value]);
|
||||
}
|
||||
|
||||
if (!file_exists(base_path('themes') . "/" . config("SETTINGS::SYSTEM:THEME"))) {
|
||||
if(!file_exists(base_path('themes') . "/" . config("SETTINGS::SYSTEM:THEME"))){
|
||||
config(['SETTINGS::SYSTEM:THEME' => "default"]);
|
||||
}
|
||||
|
||||
if (config('SETTINGS::SYSTEM:THEME') && config('SETTINGS::SYSTEM:THEME') !== config('theme.active')) {
|
||||
Theme::set(config("SETTINGS::SYSTEM:THEME", "default"), "default");
|
||||
} else {
|
||||
Theme::set("default", "default");
|
||||
if(config('SETTINGS::SYSTEM:THEME') !== config('theme.active')){
|
||||
Theme::set(config("SETTINGS::SYSTEM:THEME"), "default");
|
||||
}
|
||||
|
||||
// Set Mail Config
|
||||
|
@ -128,7 +126,7 @@ class AppServiceProvider extends ServiceProvider
|
|||
}
|
||||
|
||||
try {
|
||||
$stringfromfile = file(base_path() . '/.git/HEAD');
|
||||
$stringfromfile = file(base_path().'/.git/HEAD');
|
||||
|
||||
$firstLine = $stringfromfile[0]; //get the string from the array
|
||||
|
||||
|
|
|
@ -7,12 +7,11 @@ use App\Events\UserUpdateCreditsEvent;
|
|||
use App\Listeners\CreateInvoice;
|
||||
use App\Listeners\UnsuspendServers;
|
||||
use App\Listeners\UserPayment;
|
||||
use App\Listeners\Verified as VerifiedListener;
|
||||
use App\Listeners\Verified;
|
||||
use Illuminate\Auth\Events\Registered;
|
||||
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
|
||||
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
||||
use SocialiteProviders\Manager\SocialiteWasCalled;
|
||||
use Illuminate\Auth\Events\Verified;
|
||||
|
||||
class EventServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
@ -36,8 +35,8 @@ class EventServiceProvider extends ServiceProvider
|
|||
// ... other providers
|
||||
'SocialiteProviders\\Discord\\DiscordExtendSocialite@handle',
|
||||
],
|
||||
Verified::class => [
|
||||
VerifiedListener::class,
|
||||
'Illuminate\Auth\Events\Verified' => [
|
||||
Verified::class,
|
||||
],
|
||||
];
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ use Illuminate\Support\Facades\Facade;
|
|||
|
||||
return [
|
||||
|
||||
'version' => '0.9.8',
|
||||
'version' => '0.9.1',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -17,7 +17,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'name' => env('APP_NAME', 'Ctrlpanel.gg'),
|
||||
'name' => env('APP_NAME', 'Controlpanel.gg'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
@ -14,7 +14,7 @@ return [
|
|||
*/
|
||||
|
||||
'paths' => [
|
||||
base_path('themes'),
|
||||
resource_path('views'),
|
||||
],
|
||||
|
||||
/*
|
||||
|
|
|
@ -474,7 +474,7 @@ class SettingsSeeder extends Seeder
|
|||
Settings::firstOrCreate([
|
||||
'key' => 'SETTINGS::MAIL:FROM_NAME',
|
||||
], [
|
||||
'value' => env('APP_NAME', 'Ctrlpanel'),
|
||||
'value' => env('APP_NAME', 'Controlpanel'),
|
||||
'type' => 'string',
|
||||
'description' => 'Mailer From Name.',
|
||||
]);
|
||||
|
@ -623,7 +623,7 @@ class SettingsSeeder extends Seeder
|
|||
Settings::firstOrCreate([
|
||||
'key' => 'SETTINGS::SYSTEM:MOTD_MESSAGE',
|
||||
], [
|
||||
'value' => '<h1 style="text-align: center;"><img style="display: block; margin-left: auto; margin-right: auto;" src="https://ctrlpanel.gg/img/controlpanel.png" alt="" width="200" height="200"><span style="font-size: 36pt;">Ctrlpanel.gg</span></h1>
|
||||
'value' => '<h1 style="text-align: center;"><img style="display: block; margin-left: auto; margin-right: auto;" src="https://controlpanel.gg/img/controlpanel.png" alt="" width="200" height="200"><span style="font-size: 36pt;">Controlpanel.gg</span></h1>
|
||||
<p><span style="font-size: 18pt;">Thank you for using our Software</span></p>
|
||||
<p><span style="font-size: 18pt;">If you have any questions, make sure to join our <a href="https://discord.com/invite/4Y6HjD2uyU" target="_blank" rel="noopener">Discord</a></span></p>
|
||||
<p><span style="font-size: 10pt;">(you can change this message in the <a href="admin/settings#system">Settings</a> )</span></p>',
|
||||
|
@ -633,7 +633,7 @@ class SettingsSeeder extends Seeder
|
|||
Settings::firstOrCreate([
|
||||
'key' => 'SETTINGS::SYSTEM:SEO_TITLE',
|
||||
], [
|
||||
'value' => 'Ctrlpanel.gg',
|
||||
'value' => 'Controlpanel.gg',
|
||||
'type' => 'text',
|
||||
'description' => 'The SEO Title.',
|
||||
]);
|
||||
|
|
|
@ -12,7 +12,7 @@ services:
|
|||
ports:
|
||||
- 80:80
|
||||
volumes:
|
||||
- "../:/var/www/html"
|
||||
- "../:/var/www/html:delegated"
|
||||
depends_on:
|
||||
- php
|
||||
- mysql
|
||||
|
@ -42,7 +42,7 @@ services:
|
|||
dockerfile: docker/php/Dockerfile
|
||||
container_name: controlpanel_php
|
||||
volumes:
|
||||
- "../:/var/www/html"
|
||||
- "../:/var/www/html:delegated"
|
||||
networks:
|
||||
- laravel
|
||||
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
FROM php:8.1-fpm-buster
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y build-essential zlib1g-dev default-mysql-client curl gnupg procps vim git unzip libzip-dev libpq-dev libicu-dev libonig-dev libpng-dev libjpeg-dev libfreetype6-dev
|
||||
FROM php:8.0-fpm-alpine3.13
|
||||
|
||||
RUN docker-php-ext-install mysqli pdo pdo_mysql intl zip gd bcmath
|
||||
RUN apk update && apk upgrade
|
||||
RUN apk add --no-cache --repository https://alpine.global.ssl.fastly.net/alpine/edge/community/
|
||||
|
||||
RUN apk add --no-cache curl-dev icu-dev libzip-dev
|
||||
RUN docker-php-ext-install mysqli pdo pdo_mysql intl zip
|
||||
|
||||
ADD ./docker/php/www.conf /usr/local/etc/php-fpm.d/
|
||||
|
||||
RUN mkdir -p /var/www/html
|
||||
|
||||
RUN addgroup --gid 1000 laravel && adduser --ingroup laravel --uid 1000 --shell /bin/sh --disabled-password --gecos "" laravel
|
||||
RUN addgroup -g 1000 laravel && adduser -G laravel -g laravel -s /bin/sh -D laravel
|
||||
RUN chown laravel:laravel /var/www/html
|
||||
|
||||
WORKDIR /var/www/html
|
||||
|
|
10
lang/en.json
10
lang/en.json
|
@ -160,7 +160,7 @@
|
|||
"Support server": "Support server",
|
||||
"Documentation": "Documentation",
|
||||
"Github": "Github",
|
||||
"Support CtrlPanel": "Support CtrlPanel",
|
||||
"Support ControlPanel": "Support ControlPanel",
|
||||
"Servers": "Servers",
|
||||
"Total": "Total",
|
||||
"Payments": "Payments",
|
||||
|
@ -177,13 +177,13 @@
|
|||
"Title": "Title",
|
||||
"User": "User",
|
||||
"Last updated": "Last updated",
|
||||
"Ctrlpanel.gg": "Ctrlpanel.gg",
|
||||
"Controlpanel.gg": "Controlpanel.gg",
|
||||
"Version": "Version",
|
||||
"Individual nodes": "Individual nodes",
|
||||
"You reached the Pterodactyl perPage limit. Please make sure to set it higher than your server count.": "You reached the Pterodactyl perPage limit. Please make sure to set it higher than your server count.",
|
||||
"You can do that in settings.": "You can do that in settings.",
|
||||
"Note": "Note",
|
||||
"If this error persists even after changing the limit, it might mean a server was deleted on Pterodactyl, but not on CtrlPanel. Try clicking the button below.": "If this error persists even after changing the limit, it might mean a server was deleted on Pterodactyl, but not on CtrlPanel. Try clicking the button below.",
|
||||
"If this error persists even after changing the limit, it might mean a server was deleted on Pterodactyl, but not on ControlPanel. Try clicking the button below.": "If this error persists even after changing the limit, it might mean a server was deleted on Pterodactyl, but not on ControlPanel. Try clicking the button below.",
|
||||
"Sync servers": "Sync servers",
|
||||
"Node": "Node",
|
||||
"Server count": "Server count",
|
||||
|
@ -256,9 +256,9 @@
|
|||
"You usually do not need to change anything here": "You usually do not need to change anything here",
|
||||
"Edit Server": "Edit Server",
|
||||
"Server identifier": "Server identifier",
|
||||
"Change the server identifier on ctrlpanel to match a pterodactyl server.": "Change the server identifier on ctrlpanel to match a pterodactyl server.",
|
||||
"Change the server identifier on controlpanel to match a pterodactyl server.": "Change the server identifier on controlpanel to match a pterodactyl server.",
|
||||
"Server owner": "Server owner",
|
||||
"Change the current server owner on ctrlpanel and pterodactyl.": "Change the current server owner on ctrlpanel and pterodactyl.",
|
||||
"Change the current server owner on controlpanel and pterodactyl.": "Change the current server owner on controlpanel and pterodactyl.",
|
||||
"Server id": "Server id",
|
||||
"Config": "Config",
|
||||
"Suspended at": "Suspended at",
|
||||
|
|
|
@ -8,7 +8,7 @@ if (file_exists('../../install.lock')) {
|
|||
|
||||
<html>
|
||||
<head>
|
||||
<title>Ctrlpanel.gg installer Script</title>
|
||||
<title>Controlpanel.gg installer Script</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"
|
||||
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
|
||||
<style>
|
||||
|
@ -48,7 +48,7 @@ if (file_exists('../../install.lock')) {
|
|||
$cardheader = '
|
||||
<div class="card card-outline-success bg-dark">
|
||||
<div class="card-header text-center">
|
||||
<b class="mr-1 text-light">Ctrlpanel.GG</b>
|
||||
<b class="mr-1 text-light">Controlpanel.GG</b>
|
||||
</div>
|
||||
<div class="card-body bg-light">';
|
||||
|
||||
|
@ -57,7 +57,7 @@ if (! isset($_GET['step'])) {
|
|||
echo run_console('cp .env.example .env');
|
||||
}
|
||||
echo $cardheader; ?>
|
||||
<p class="login-box-msg">This installer will lead you through the most crucial Steps of Ctrlpanel.gg`s
|
||||
<p class="login-box-msg">This installer will lead you through the most crucial Steps of Controlpanel.gg`s
|
||||
setup</p>
|
||||
<p class="<?php echo checkHTTPS() == true ? 'ok' : 'notok'; ?>">HTTPS is required</p>
|
||||
|
||||
|
@ -218,7 +218,7 @@ if (isset($_GET['step']) && $_GET['step'] == 2) {
|
|||
<label for="name">Your Host-Name</label>
|
||||
<input id="name" name="name" type="text"
|
||||
required
|
||||
value="Ctrlpanel.gg" class="form-control">
|
||||
value="Controlpanel.gg" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
2
public/themes/BlueInfinity/app.css
vendored
2
public/themes/BlueInfinity/app.css
vendored
|
@ -1 +1 @@
|
|||
@import "default.css";.layout-fixed .wrapper .sidebar{ height:calc(100vh - 3.5rem - 1px);background:radial-gradient(#061b29,black);}body:not(.sidebar-mini-md) .content-wrapper,body:not(.sidebar-mini-md) .main-footer,body:not(.sidebar-mini-md) .main-header{ transition:margin-left .3s ease-in-out;background:radial-gradient(#061b29,black);}[class*=sidebar-dark] .brand-link,[class*=sidebar-dark] .brand-link .pushmenu{ color:hsla(0,0%,100%,.8);background:radial-gradient(#061b29,black);}.main-sidebar .brand-text,.main-sidebar .logo-xl,.main-sidebar .logo-xs,.sidebar .nav-link p,.sidebar .user-panel .info{ transition:margin-left .3s linear,opacity .3s ease,visibility .3s ease;color:#d3d3d3;}.sidebar-dark-primary .nav-sidebar>.nav-item>.nav-link.active,.sidebar-light-primary .nav-sidebar>.nav-item>.nav-link.active{ color:#fff;background:radial-gradient(#1b4b61,#fd030300);border-radius:50px;}.dark-mode .card{ background-color:#00000000;color:#ffffff99;border-width:3px;border-color:#f7f7f7;border-style:double;border-radius:15px;}.btn-info{ color:#ffffff;background-color:#b8171700;border-color:#ffffff;box-shadow:none;}.btn-warning{ color:#ffffff;background-color:#ffc10700;border-color:#ffffff;box-shadow:none;}.card-title{ float:left;font-size:1.1rem;font-weight:400;margin:0;color:white;}.dark-mode .text-muted{ color:#ffffff99!important;}.dark-mode .list-group-item{ background-color:#343a4000;border-color:#ffffff99;}.dark-mode .info-box{ background-color:#343a4000;color:#fff;border:3px;border-style:double;border-radius:15px;border-color:white;}label:not(.form-check-label):not(.custom-file-label){ font-weight:700;color:#ffffffc2;}.dark-mode .custom-control-label:before,.dark-mode .custom-file-label,.dark-mode .custom-file-label:after,.dark-mode .custom-select,.dark-mode .form-control,.dark-mode .input-group-text{ background-color:#007af400;color:#828282;}.alert-success{ color:#fff;background-color:#28a745;border-color:#ffffff;border-radius:15px;border-style:double;}.dark-mode{ color:#fff;background:radial-gradient(#061b29,black);}.dark-mode .invoice{ background-color:#343a4000;border:3px;border-radius:15px;border-color:white;border:double;}.dark-mode .nav-tabs .nav-item.show .nav-link,.dark-mode .nav-tabs .nav-link.active{ background-color:#ffffff1c;color:#fff;}.slim-crop-area img,.slim-image-editor img,.slim-popover img,.slim img{ background:black;}.dark-mode .callout{ background-color:#00ff0333;}.callout.callout-info{ border-left-color:#00e11d;}.p-3{ padding:1rem!important;background:#061b29;}.small-box>.small-box-footer{ color:hsla(0,0%,100%,.8);display:block;padding:3px 0;position:relative;text-align:center;text-decoration:none;z-index:10;background:#061b29;}.dark-mode .dropdown-menu{ background-color:#061b29;border-color:white;}.card-header:first-child{ border-radius:14px 14px 0px 0px;background:#061b29;}.card-body{ flex:1 1 auto;min-height:1px;padding:1.25rem;background:#061b29;}.justify-content-between{ justify-content:space-between!important;background:#061b29;}.dark-mode .card .card-footer{ background-color:#061b29;border-radius:0px 0px 14px 14px;}.dark-mode .select2-selection--single{ background-color:#061b29;border-color:#6c757d;}.select2-search--dropdown{ display:block;padding:4px;background:#061b29;}.select2-container--default .select2-results__option{ padding:6px 12px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background:blue;background:#061b29;}.dark-mode .select2-dropdown,.dark-mode .select2-dropdown .select2-search__field,.dark-mode .select2-search--inline .select2-search__field{ background-color:#061b29;border-color:#ffffff;color:#fff;}.modal-header{ background:#061b29;}.modal-body{ position:relative;flex:1 1 auto;padding:1rem;background:#061b29;}.dark-mode .modal-footer,.dark-mode .modal-header{ border-color:#ffffff;background:#061b29;}
|
||||
@import "default.css";.layout-fixed .wrapper .sidebar{ height:calc(100vh - 3.5rem - 1px);background:radial-gradient(#061b29,black);}body:not(.sidebar-mini-md) .content-wrapper,body:not(.sidebar-mini-md) .main-footer,body:not(.sidebar-mini-md) .main-header{ transition:margin-left .3s ease-in-out;margin-left:250px;background:radial-gradient(#061b29,black);}[class*=sidebar-dark] .brand-link,[class*=sidebar-dark] .brand-link .pushmenu{ color:hsla(0,0%,100%,.8);background:radial-gradient(#061b29,black);}.main-sidebar .brand-text,.main-sidebar .logo-xl,.main-sidebar .logo-xs,.sidebar .nav-link p,.sidebar .user-panel .info{ transition:margin-left .3s linear,opacity .3s ease,visibility .3s ease;color:#d3d3d3;}.sidebar-dark-primary .nav-sidebar>.nav-item>.nav-link.active,.sidebar-light-primary .nav-sidebar>.nav-item>.nav-link.active{ color:#fff;background:radial-gradient(#1b4b61,#fd030300);border-radius:50px;}.dark-mode .card{ background-color:#00000000;color:#ffffff99;border-width:3px;border-color:#f7f7f7;border-style:double;border-radius:15px;}.btn-info{ color:#ffffff;background-color:#b8171700;border-color:#ffffff;box-shadow:none;}.btn-warning{ color:#ffffff;background-color:#ffc10700;border-color:#ffffff;box-shadow:none;}.card-title{ float:left;font-size:1.1rem;font-weight:400;margin:0;color:white;}.dark-mode .text-muted{ color:#ffffff99!important;}.dark-mode .list-group-item{ background-color:#343a4000;border-color:#ffffff99;}.dark-mode .info-box{ background-color:#343a4000;color:#fff;border:3px;border-style:double;border-radius:15px;border-color:white;}label:not(.form-check-label):not(.custom-file-label){ font-weight:700;color:#ffffffc2;}.dark-mode .custom-control-label:before,.dark-mode .custom-file-label,.dark-mode .custom-file-label:after,.dark-mode .custom-select,.dark-mode .form-control,.dark-mode .input-group-text{ background-color:#007af400;color:#828282;}.alert-success{ color:#fff;background-color:#28a745;border-color:#ffffff;border-radius:15px;border-style:double;}.dark-mode{ color:#fff;background:radial-gradient(#061b29,black);}.dark-mode .invoice{ background-color:#343a4000;border:3px;border-radius:15px;border-color:white;border:double;}.dark-mode .nav-tabs .nav-item.show .nav-link,.dark-mode .nav-tabs .nav-link.active{ background-color:#ffffff1c;color:#fff;}.slim-crop-area img,.slim-image-editor img,.slim-popover img,.slim img{ background:black;}.dark-mode .callout{ background-color:#00ff0333;}.callout.callout-info{ border-left-color:#00e11d;}.p-3{ padding:1rem!important;background:#061b29;}.small-box>.small-box-footer{ color:hsla(0,0%,100%,.8);display:block;padding:3px 0;position:relative;text-align:center;text-decoration:none;z-index:10;background:#061b29;}.dark-mode .dropdown-menu{ background-color:#061b29;border-color:white;}.card-header:first-child{ border-radius:14px 14px 0px 0px;background:#061b29;}.card-body{ flex:1 1 auto;min-height:1px;padding:1.25rem;background:#061b29;}.justify-content-between{ justify-content:space-between!important;background:#061b29;}.dark-mode .card .card-footer{ background-color:#061b29;border-radius:0px 0px 14px 14px;}.dark-mode .select2-selection--single{ background-color:#061b29;border-color:#6c757d;}.select2-search--dropdown{ display:block;padding:4px;background:#061b29;}.select2-container--default .select2-results__option{ padding:6px 12px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background:blue;background:#061b29;}.dark-mode .select2-dropdown,.dark-mode .select2-dropdown .select2-search__field,.dark-mode .select2-search--inline .select2-search__field{ background-color:#061b29;border-color:#ffffff;color:#fff;}.modal-header{ background:#061b29;}.modal-body{ position:relative;flex:1 1 auto;padding:1rem;background:#061b29;}.dark-mode .modal-footer,.dark-mode .modal-header{ border-color:#ffffff;background:#061b29;}
|
||||
|
|
|
@ -113,7 +113,7 @@ Route::middleware(['auth', 'checkSuspended'])->group(function () {
|
|||
Route::post('ticket/new', [TicketsController::class, 'store'])->middleware(['throttle:ticket-new'])->name('ticket.new.store');
|
||||
Route::get('ticket/show/{ticket_id}', [TicketsController::class, 'show'])->name('ticket.show');
|
||||
Route::post('ticket/reply', [TicketsController::class, 'reply'])->middleware(['throttle:ticket-reply'])->name('ticket.reply');
|
||||
Route::post('ticket/status/{ticket_id}', [TicketsController::class, 'changeStatus'])->name('ticket.changeStatus');
|
||||
Route::post('ticket/close/{ticket_id}', [TicketsController::class, 'close'])->name('ticket.close');
|
||||
}
|
||||
|
||||
//admin
|
||||
|
@ -211,7 +211,7 @@ Route::middleware(['auth', 'checkSuspended'])->group(function () {
|
|||
Route::get('ticket/datatable', [ModTicketsController::class, 'datatable'])->name('ticket.datatable');
|
||||
Route::get('ticket/show/{ticket_id}', [ModTicketsController::class, 'show'])->name('ticket.show');
|
||||
Route::post('ticket/reply', [ModTicketsController::class, 'reply'])->name('ticket.reply');
|
||||
Route::post('ticket/status/{ticket_id}', [ModTicketsController::class, 'changeStatus'])->name('ticket.changeStatus');
|
||||
Route::post('ticket/close/{ticket_id}', [ModTicketsController::class, 'close'])->name('ticket.close');
|
||||
Route::post('ticket/delete/{ticket_id}', [ModTicketsController::class, 'delete'])->name('ticket.delete');
|
||||
//ticket moderation blacklist
|
||||
Route::get('ticket/blacklist', [ModTicketsController::class, 'blacklist'])->name('ticket.blacklist');
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
href="{{ \Illuminate\Support\Facades\Storage::disk('public')->exists('favicon.ico') ? asset('storage/favicon.ico') : asset('favicon.ico') }}"
|
||||
type="image/x-icon">
|
||||
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>
|
||||
<script defer src="https://unpkg.com/alpinejs@3.x.x/dist/cdn.min.js"></script>
|
||||
|
||||
{{-- <link rel="stylesheet" href="{{asset('css/adminlte.min.css')}}"> --}}
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs4/dt-1.10.24/datatables.min.css" />
|
||||
|
@ -199,7 +199,7 @@
|
|||
src="{{ \Illuminate\Support\Facades\Storage::disk('public')->exists('icon.png') ? asset('storage/icon.png') : asset('images/controlpanel_logo.png') }}"
|
||||
alt="{{ config('app.name', 'Laravel') }} Logo" class="brand-image img-circle"
|
||||
style="opacity: .8">
|
||||
<span class="brand-text font-weight-light">{{ config('app.name', 'Ctrlpanel.gg') }}</span>
|
||||
<span class="brand-text font-weight-light">{{ config('app.name', 'Controlpanel.gg') }}</span>
|
||||
</a>
|
||||
|
||||
<!-- Sidebar -->
|
||||
|
@ -441,7 +441,7 @@
|
|||
<strong>Copyright © 2021-{{ date('Y') }} <a
|
||||
href="{{ url('/') }}">{{ env('APP_NAME', 'Laravel') }}</a>.</strong>
|
||||
All rights
|
||||
reserved. Powered by <a href="https://ctrlpanel.gg">CtrlPanel</a>. | Theme by <a href="https://2icecube.de/cpgg">2IceCube</a>
|
||||
reserved. Powered by <a href="https://controlpanel.gg">ControlPanel</a>.
|
||||
@if (!str_contains(config('BRANCHNAME'), 'main') && !str_contains(config('BRANCHNAME'), 'unknown'))
|
||||
Version <b>{{ config('app')['version'] }} - {{ config('BRANCHNAME') }}</b>
|
||||
@endif
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
@else
|
||||
<div class="callout callout-danger">
|
||||
<h4>{{ __('No recent activity from cronjobs')}}</h4>
|
||||
<p>{{ __('Are cronjobs running?')}} <a class="text-primary" target="_blank" href="https://ctrlpanel.gg/docs/Installation/getting-started#crontab-configuration">{{ __('Check the docs for it here')}}</a></p>
|
||||
<p>{{ __('Are cronjobs running?')}} <a class="text-primary" target="_blank" href="https://controlpanel.gg/docs/Installation/getting-started#crontab-configuration">{{ __('Check the docs for it here')}}</a></p>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<b><i class="fas fa-shield-alt"></i> {{__("Version Outdated:")}}</b></br>
|
||||
{{__("You are running on")}} v{{config("app.version")}}-{{config("BRANCHNAME")}}.
|
||||
{{__("The latest Version is")}} v{{Storage::get('latestVersion')}}</br>
|
||||
<a href="https://ctrlpanel.gg/docs/Installation/updating">{{__("Consider updating now")}}</a>
|
||||
<a href="https://controlpanel.gg/docs/Installation/updating">{{__("Consider updating now")}}</a>
|
||||
</div>
|
||||
@endif
|
||||
</section>
|
||||
|
@ -39,16 +39,16 @@
|
|||
class="fab fa-discord mr-2"></i> {{__('Support server')}}</a>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<a href="https://ctrlpanel.gg/docs/intro" class="btn btn-dark btn-block px-3"><i
|
||||
<a href="https://controlpanel.gg/docs/intro" class="btn btn-dark btn-block px-3"><i
|
||||
class="fas fa-link mr-2"></i> {{__('Documentation')}}</a>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<a href="https://github.com/CtrlPanel-gg/panel" class="btn btn-dark btn-block px-3"><i
|
||||
<a href="https://github.com/ControlPanel-gg/dashboard" class="btn btn-dark btn-block px-3"><i
|
||||
class="fab fa-github mr-2"></i> {{__('Github')}}</a>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<a href="https://ctrlpanel.gg/docs/Contributing/donating" class="btn btn-dark btn-block px-3"><i
|
||||
class="fas fa-money-bill mr-2"></i> {{__('Support CtrlPanel')}}</a>
|
||||
<a href="https://controlpanel.gg/docs/Contributing/donating" class="btn btn-dark btn-block px-3"><i
|
||||
class="fas fa-money-bill mr-2"></i> {{__('Support ControlPanel')}}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -199,7 +199,7 @@
|
|||
<div class="card-header">
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="card-title ">
|
||||
<span><i class="fas fa-server mr-2"></i>{{__('Ctrlpanel.gg')}}</span>
|
||||
<span><i class="fas fa-server mr-2"></i>{{__('Controlpanel.gg')}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body py-1">
|
||||
|
@ -227,7 +227,7 @@
|
|||
<p class="mb-2">
|
||||
{{ __('You reached the Pterodactyl perPage limit. Please make sure to set it higher than your server count.') }}<br>
|
||||
{{ __('You can do that in settings.') }}<br><br>
|
||||
{{ __('Note') }}: {{ __('If this error persists even after changing the limit, it might mean a server was deleted on Pterodactyl, but not on CtrlPanel. Try clicking the button below.') }}
|
||||
{{ __('Note') }}: {{ __('If this error persists even after changing the limit, it might mean a server was deleted on Pterodactyl, but not on ControlPanel. Try clicking the button below.') }}
|
||||
</p>
|
||||
<a href="{{route('admin.servers.sync')}}" class="btn btn-primary btn-md"><i
|
||||
class="fas fa-sync mr-2"></i>{{__('Sync servers')}}</a>
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
<div class="form-group">
|
||||
<label for="identifier">{{ __('Server identifier') }}
|
||||
<i data-toggle="popover" data-trigger="hover"
|
||||
data-content="{{ __('Change the server identifier on ctrlpanel to match a pterodactyl server.') }}"
|
||||
data-content="{{ __('Change the server identifier on controlpanel to match a pterodactyl server.') }}"
|
||||
class="fas fa-info-circle"></i>
|
||||
</label>
|
||||
<input value="{{ $server->identifier }}" id="identifier" name="identifier"
|
||||
|
@ -59,7 +59,7 @@
|
|||
<div class="form-group">
|
||||
<label for="user_id">{{ __('Server owner') }}
|
||||
<i data-toggle="popover" data-trigger="hover"
|
||||
data-content="{{ __('Change the current server owner on ctrlpanel and pterodactyl.') }}"
|
||||
data-content="{{ __('Change the current server owner on controlpanel and pterodactyl.') }}"
|
||||
class="fas fa-info-circle"></i>
|
||||
</label>
|
||||
<select name="user_id" id="user_id" class="form-control">
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
<table id="datatable" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="20"></th>
|
||||
<th>{{ __('Name') }}</th>
|
||||
<th>{{ __('User') }}</th>
|
||||
<th>{{ __('Server id') }}</th>
|
||||
<th>{{ __('Config') }}</th>
|
||||
<th>{{ __('Suspended at') }}</th>
|
||||
<th>{{ __('Created at') }}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width="20"></th>
|
||||
<th>{{__('Name')}}</th>
|
||||
<th>{{__('User')}}</th>
|
||||
<th>{{__('Server id')}}</th>
|
||||
<th>{{__('Config')}}</th>
|
||||
<th>{{__('Suspended at')}}</th>
|
||||
<th>{{__('Created at')}}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
|
@ -17,53 +17,30 @@
|
|||
|
||||
<script>
|
||||
function submitResult() {
|
||||
return confirm("{{ __('Are you sure you wish to delete?') }}") !== false;
|
||||
return confirm("{{__('Are you sure you wish to delete?')}}") !== false;
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
$('#datatable').DataTable({
|
||||
language: {
|
||||
url: '//cdn.datatables.net/plug-ins/1.11.3/i18n/{{ config('SETTINGS::LOCALE:DATATABLES') }}.json'
|
||||
url: '//cdn.datatables.net/plug-ins/1.11.3/i18n/{{config("SETTINGS::LOCALE:DATATABLES")}}.json'
|
||||
},
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
stateSave: true,
|
||||
ajax: "{{ route('admin.servers.datatable') }}{{ $filter ?? '' }}",
|
||||
order: [
|
||||
[6, "desc"]
|
||||
ajax: "{{route('admin.servers.datatable')}}{{$filter ?? ''}}",
|
||||
order: [[ 5, "desc" ]],
|
||||
columns: [
|
||||
{data: 'status' , name : 'servers.suspended'},
|
||||
{data: 'name'},
|
||||
{data: 'user' , name : 'user.name'},
|
||||
{data: 'identifier'},
|
||||
{data: 'resources' , name : 'product.name'},
|
||||
{data: 'suspended'},
|
||||
{data: 'created_at'},
|
||||
{data: 'actions' , sortable : false},
|
||||
],
|
||||
columns: [{
|
||||
data: 'status',
|
||||
name: 'servers.suspended',
|
||||
sortable: false
|
||||
},
|
||||
{
|
||||
data: 'name'
|
||||
},
|
||||
{
|
||||
data: 'user',
|
||||
name: 'user.name',
|
||||
},
|
||||
{
|
||||
data: 'identifier'
|
||||
},
|
||||
{
|
||||
data: 'resources',
|
||||
name: 'product.name',
|
||||
sortable: false
|
||||
},
|
||||
{
|
||||
data: 'suspended'
|
||||
},
|
||||
{
|
||||
data: 'created_at'
|
||||
},
|
||||
{
|
||||
data: 'actions',
|
||||
sortable: false
|
||||
},
|
||||
],
|
||||
fnDrawCallback: function(oSettings) {
|
||||
fnDrawCallback: function( oSettings ) {
|
||||
$('[data-toggle="popover"]').popover();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -102,12 +102,10 @@
|
|||
data: 'price'
|
||||
},
|
||||
{
|
||||
data: 'display',
|
||||
sortable: false
|
||||
data: 'display'
|
||||
},
|
||||
{
|
||||
data: 'description',
|
||||
sortable: false
|
||||
data: 'description'
|
||||
},
|
||||
{
|
||||
data: 'created_at'
|
||||
|
@ -123,4 +121,7 @@
|
|||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@endsection
|
||||
|
|
|
@ -6,13 +6,12 @@
|
|||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-6">
|
||||
<h1>{{ __('Users') }}</h1>
|
||||
<h1>{{__('Users')}}</h1>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item"><a href="{{ route('home') }}">{{ __('Dashboard') }}</a></li>
|
||||
<li class="breadcrumb-item"><a class="text-muted"
|
||||
href="{{ route('admin.users.index') }}">{{ __('Users') }}</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{route('home')}}">{{__('Dashboard')}}</a></li>
|
||||
<li class="breadcrumb-item"><a class="text-muted" href="{{route('admin.users.index')}}">{{__('Users')}}</a></li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -28,9 +27,9 @@
|
|||
|
||||
<div class="card-header">
|
||||
<div class="d-flex justify-content-between">
|
||||
<h5 class="card-title"><i class="fas fa-users mr-2"></i>{{ __('Users') }}</h5>
|
||||
<a href="{{ route('admin.users.notifications') }}" class="btn btn-sm btn-primary"><i
|
||||
class="fas fa-paper-plane mr-1"></i>{{ __('Notify') }}</a>
|
||||
<h5 class="card-title"><i class="fas fa-users mr-2"></i>{{__('Users')}}</h5>
|
||||
<a href="{{route('admin.users.notifications')}}" class="btn btn-sm btn-primary"><i
|
||||
class="fas fa-paper-plane mr-1"></i>{{__('Notify')}}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -38,21 +37,21 @@
|
|||
|
||||
<table id="datatable" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>discordId</th>
|
||||
<th>ip</th>
|
||||
<th>pterodactyl_id</th>
|
||||
<th>{{ __('Avatar') }}</th>
|
||||
<th>{{ __('Name') }}</th>
|
||||
<th>{{ __('Role') }}</th>
|
||||
<th>{{ __('Email') }}</th>
|
||||
<th>{{ CREDITS_DISPLAY_NAME }}</th>
|
||||
<th>{{ __('Servers') }}</th>
|
||||
<th>{{ __('Referrals') }}</th>
|
||||
<th>{{ __('Verified') }}</th>
|
||||
<th>{{ __('Last seen') }}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>discordId</th>
|
||||
<th>ip</th>
|
||||
<th>pterodactyl_id</th>
|
||||
<th>{{__('Avatar')}}</th>
|
||||
<th>{{__('Name')}}</th>
|
||||
<th>{{__('Role')}}</th>
|
||||
<th>{{__('Email')}}</th>
|
||||
<th>{{CREDITS_DISPLAY_NAME}}</th>
|
||||
<th>{{__('Servers')}}</th>
|
||||
<th>{{__("Referrals")}}</th>
|
||||
<th>{{__('Verified')}}</th>
|
||||
<th>{{__('Last seen')}}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
|
@ -69,76 +68,41 @@
|
|||
|
||||
<script>
|
||||
function submitResult() {
|
||||
return confirm("{{ __('Are you sure you wish to delete?') }}") !== false;
|
||||
return confirm("{{__('Are you sure you wish to delete?')}}") !== false;
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
$('#datatable').DataTable({
|
||||
language: {
|
||||
url: '//cdn.datatables.net/plug-ins/1.11.3/i18n/{{ config('SETTINGS::LOCALE:DATATABLES') }}.json'
|
||||
url: '//cdn.datatables.net/plug-ins/1.11.3/i18n/{{config("SETTINGS::LOCALE:DATATABLES")}}.json'
|
||||
},
|
||||
processing: true,
|
||||
serverSide: true, //why was this set to false before? increased loadingtimes by 10 seconds
|
||||
stateSave: true,
|
||||
ajax: "{{ route('admin.users.datatable') }}{{ $filter ?? '' }}",
|
||||
order: [
|
||||
[11, "desc"]
|
||||
ajax: "{{route('admin.users.datatable')}}",
|
||||
order: [[ 11, "asc" ]],
|
||||
columns: [
|
||||
{data: 'discordId', visible: false, name: 'discordUser.id'},
|
||||
{data: 'pterodactyl_id', visible: false},
|
||||
{data: 'ip', visible: false},
|
||||
{data: 'avatar' , sortable : false},
|
||||
{data: 'name'},
|
||||
{data: 'role'},
|
||||
{data: 'email', name: 'users.email'},
|
||||
{data: 'credits' , name : 'users.credits'},
|
||||
{data: 'servers'},
|
||||
{data: 'referrals'},
|
||||
{data: 'verified' , sortable : false},
|
||||
{data: 'last_seen', type: 'num', render: {_: 'display', sort: 'raw'}},
|
||||
{data: 'actions' , sortable : false},
|
||||
],
|
||||
columns: [{
|
||||
data: 'discordId',
|
||||
visible: false,
|
||||
name: 'discordUser.id'
|
||||
},
|
||||
{
|
||||
data: 'pterodactyl_id',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
data: 'ip',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
data: 'avatar',
|
||||
sortable: false
|
||||
},
|
||||
{
|
||||
data: 'name'
|
||||
},
|
||||
{
|
||||
data: 'role'
|
||||
},
|
||||
{
|
||||
data: 'email',
|
||||
name: 'users.email'
|
||||
},
|
||||
{
|
||||
data: 'credits',
|
||||
name: 'users.credits'
|
||||
},
|
||||
{
|
||||
data: 'servers_count',
|
||||
searchable: false
|
||||
},
|
||||
{
|
||||
data: 'referrals_count',
|
||||
searchable: false
|
||||
},
|
||||
{
|
||||
data: 'verified',
|
||||
sortable: false
|
||||
},
|
||||
{
|
||||
data: 'last_seen',
|
||||
},
|
||||
{
|
||||
data: 'actions',
|
||||
sortable: false
|
||||
},
|
||||
],
|
||||
fnDrawCallback: function(oSettings) {
|
||||
fnDrawCallback: function( oSettings ) {
|
||||
$('[data-toggle="popover"]').popover();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@endsection
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
class="mr-1">{{ config('app.name', 'Laravel') }}</b></a>
|
||||
@if (config('SETTINGS::SYSTEM:ENABLE_LOGIN_LOGO'))
|
||||
<img src="{{ \Illuminate\Support\Facades\Storage::disk('public')->exists('logo.png') ? asset('storage/logo.png') : asset('images/controlpanel_logo.png') }}"
|
||||
alt="{{ config('app.name', 'Ctrlpanel.gg') }} Logo" style="opacity: .8;max-width:100%">
|
||||
alt="{{ config('app.name', 'Controlpanel.gg') }} Logo" style="opacity: .8;max-width:100%">
|
||||
@endif
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
</li>
|
||||
<li>
|
||||
<p><strong>Company</strong> (referred to as either "the Company", "We", "Us" or
|
||||
"Our" in this Agreement) refers to ctrlpanel.</p>
|
||||
"Our" in this Agreement) refers to controlpanel.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Cookies</strong> are small files that are placed on Your computer, mobile device or any other device
|
||||
|
@ -49,8 +49,8 @@
|
|||
Service or from the Service infrastructure itself (for example, the duration of a page visit).</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Website</strong> refers to ctrlpanel, accessible from <a href="ctrlpanel"
|
||||
rel="external nofollow noopener" target="_blank">ctrlpanel</a></p>
|
||||
<p><strong>Website</strong> refers to controlpanel, accessible from <a href="controlpanel"
|
||||
rel="external nofollow noopener" target="_blank">controlpanel</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>You</strong> means the individual accessing or using the Service, or the company, or other legal
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
href="{{ \Illuminate\Support\Facades\Storage::disk('public')->exists('favicon.ico') ? asset('storage/favicon.ico') : asset('favicon.ico') }}"
|
||||
type="image/x-icon">
|
||||
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>
|
||||
<script defer src="https://unpkg.com/alpinejs@3.x.x/dist/cdn.min.js"></script>
|
||||
|
||||
{{-- <link rel="stylesheet" href="{{asset('css/adminlte.min.css')}}"> --}}
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs4/dt-1.10.24/datatables.min.css" />
|
||||
|
@ -199,7 +199,7 @@
|
|||
src="{{ \Illuminate\Support\Facades\Storage::disk('public')->exists('icon.png') ? asset('storage/icon.png') : asset('images/controlpanel_logo.png') }}"
|
||||
alt="{{ config('app.name', 'Laravel') }} Logo" class="brand-image img-circle"
|
||||
style="opacity: .8">
|
||||
<span class="brand-text font-weight-light">{{ config('app.name', 'Ctrlpanel.gg') }}</span>
|
||||
<span class="brand-text font-weight-light">{{ config('app.name', 'Controlpanel.gg') }}</span>
|
||||
</a>
|
||||
|
||||
<!-- Sidebar -->
|
||||
|
@ -441,7 +441,7 @@
|
|||
<strong>Copyright © 2021-{{ date('Y') }} <a
|
||||
href="{{ url('/') }}">{{ env('APP_NAME', 'Laravel') }}</a>.</strong>
|
||||
All rights
|
||||
reserved. Powered by <a href="https://ctrlpanel.gg">CtrlPanel</a>.
|
||||
reserved. Powered by <a href="https://controlpanel.gg">ControlPanel</a>.
|
||||
@if (!str_contains(config('BRANCHNAME'), 'main') && !str_contains(config('BRANCHNAME'), 'unknown'))
|
||||
Version <b>{{ config('app')['version'] }} - {{ config('BRANCHNAME') }}</b>
|
||||
@endif
|
||||
|
|
|
@ -44,9 +44,6 @@
|
|||
@case("Open")
|
||||
<span class="badge badge-success">{{__("Open")}}</span>
|
||||
@break
|
||||
@case("Reopened")
|
||||
<span class="badge badge-success">{{__("Reopened")}}</span>
|
||||
@break
|
||||
@case("Closed")
|
||||
<span class="badge badge-danger">{{__("Closed")}}</span>
|
||||
@break
|
||||
|
@ -64,35 +61,21 @@
|
|||
<span class="badge badge-success">{{__("Low")}}</span>
|
||||
@break
|
||||
@case("Medium")
|
||||
<span class="badge badge-warning">{{__("Medium")}}</span>
|
||||
<span class="badge badge-warning">{{__("Closed")}}</span>
|
||||
@break
|
||||
@case("High")
|
||||
<span class="badge badge-danger">{{__("High")}}</span>
|
||||
<span class="badge badge-danger">{{__("Answered")}}</span>
|
||||
@break
|
||||
@endswitch
|
||||
</p>
|
||||
<p><b>{{__("Created on")}}:</b> {{ $ticket->created_at->diffForHumans() }}</p>
|
||||
@if($ticket->status=='Closed')
|
||||
<form class="d-inline" method="post"
|
||||
action="{{route('moderator.ticket.changeStatus', ['ticket_id' => $ticket->ticket_id ])}}">
|
||||
{{csrf_field()}}
|
||||
{{method_field("POST") }}
|
||||
<button data-content="{{__("Reopen")}}" data-toggle="popover"
|
||||
data-trigger="hover" data-placement="top"
|
||||
class="btn btn-sm text-white btn-success mr-1"><i
|
||||
class="fas fa-redo"></i>{{__("Reopen")}}</button>
|
||||
</form>
|
||||
@else
|
||||
<form class="d-inline" method="post"
|
||||
action="{{route('moderator.ticket.changeStatus', ['ticket_id' => $ticket->ticket_id ])}}">
|
||||
{{csrf_field()}}
|
||||
{{method_field("POST") }}
|
||||
<button data-content="{{__("Close")}}" data-toggle="popover"
|
||||
data-trigger="hover" data-placement="top"
|
||||
class="btn btn-sm text-white btn-warning mr-1"><i
|
||||
class="fas fa-times"></i>{{__("Close")}}</button>
|
||||
</form>
|
||||
@endif
|
||||
@if($ticket->status!='Closed')
|
||||
<form class="d-inline" method="post" action="{{route('moderator.ticket.close', ['ticket_id' => $ticket->ticket_id ])}}">
|
||||
{{csrf_field()}}
|
||||
{{method_field("POST") }}
|
||||
<button data-content="{{__("Close")}}" data-toggle="popover" data-trigger="hover" data-placement="top" class="btn btn-sm text-white btn-warning mr-1"><i class="fas fa-times"></i>{{__("Close")}}</button>
|
||||
</form>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -35,58 +35,43 @@
|
|||
<div class="card-body">
|
||||
<div class="ticket-info">
|
||||
@if(!empty($server))
|
||||
<p><b>{{__("Server")}}:</b> <a
|
||||
href="{{ config('SETTINGS::SYSTEM:PTERODACTYL:URL') }}/server/{{ $server->identifier }}"
|
||||
target="__blank">{{ $server->name }} </a></p>
|
||||
<p><b>{{__("Server")}}:</b> <a href="{{ config('SETTINGS::SYSTEM:PTERODACTYL:URL') }}/server/{{ $server->identifier }}" target="__blank">{{ $server->name }} </a></p>
|
||||
@endif
|
||||
<p><b>{{__("Title")}}:</b> {{ $ticket->title }}</p>
|
||||
<p><b>{{__("Category")}}:</b> {{ $ticketcategory->name }}</p>
|
||||
<p><b>{{__("Status")}}:</b>
|
||||
@switch($ticket->status)
|
||||
@case("Open")
|
||||
<span class="badge badge-success">{{__("Open")}}</span>
|
||||
@break
|
||||
@case("Reopened")
|
||||
<span class="badge badge-success">{{__("Reopened")}}</span>
|
||||
@break
|
||||
@case("Closed")
|
||||
<span class="badge badge-danger">{{__("Closed")}}</span>
|
||||
@break
|
||||
@case("Answered")
|
||||
<span class="badge badge-info">{{__("Answered")}}</span>
|
||||
@break
|
||||
@case("Client Reply")
|
||||
<span class="badge badge-warning">{{__("Client Reply")}}</span>
|
||||
@break
|
||||
@endswitch
|
||||
</p>
|
||||
<p><b>Priority:</b>
|
||||
@switch($ticket->priority)
|
||||
@case("Low")
|
||||
<span class="badge badge-success">{{__("Low")}}</span>
|
||||
@break
|
||||
@case("Medium")
|
||||
<span class="badge badge-warning">{{__("Medium")}}</span>
|
||||
@break
|
||||
@case("High")
|
||||
<span class="badge badge-danger">{{__("High")}}</span>
|
||||
@break
|
||||
@endswitch
|
||||
</p>
|
||||
<p><b>{{__("Title")}}:</b> {{ $ticket->title }}</p>
|
||||
<p><b>{{__("Category")}}:</b> {{ $ticketcategory->name }}</p>
|
||||
<p><b>{{__("Status")}}:</b>
|
||||
@switch($ticket->status)
|
||||
@case("Open")
|
||||
<span class="badge badge-success">{{__("Open")}}</span>
|
||||
@break
|
||||
@case("Closed")
|
||||
<span class="badge badge-danger">{{__("Closed")}}</span>
|
||||
@break
|
||||
@case("Answered")
|
||||
<span class="badge badge-info">{{__("Answered")}}</span>
|
||||
@break
|
||||
@case("Client Reply")
|
||||
<span class="badge badge-warning">{{__("Client Reply")}}</span>
|
||||
@break
|
||||
@endswitch
|
||||
</p>
|
||||
<p><b>Priority:</b>
|
||||
@switch($ticket->priority)
|
||||
@case("Low")
|
||||
<span class="badge badge-success">{{__("Low")}}</span>
|
||||
@break
|
||||
@case("Medium")
|
||||
<span class="badge badge-warning">{{__("Closed")}}</span>
|
||||
@break
|
||||
@case("High")
|
||||
<span class="badge badge-danger">{{__("Answered")}}</span>
|
||||
@break
|
||||
@endswitch
|
||||
</p>
|
||||
<p><b>{{__("Created on")}}:</b> {{ $ticket->created_at->diffForHumans() }}</p>
|
||||
@if($ticket->status=='Closed')
|
||||
@if($ticket->status!='Closed')
|
||||
<form class="d-inline" method="post"
|
||||
action="{{route('ticket.changeStatus', ['ticket_id' => $ticket->ticket_id ])}}">
|
||||
{{csrf_field()}}
|
||||
{{method_field("POST") }}
|
||||
<button data-content="{{__("Reopen")}}" data-toggle="popover"
|
||||
data-trigger="hover" data-placement="top"
|
||||
class="btn btn-sm text-white btn-success mr-1"><i
|
||||
class="fas fa-redo"></i>{{__("Reopen")}}</button>
|
||||
</form>
|
||||
@else
|
||||
<form class="d-inline" method="post"
|
||||
action="{{route('ticket.changeStatus', ['ticket_id' => $ticket->ticket_id ])}}">
|
||||
action="{{route('ticket.close', ['ticket_id' => $ticket->ticket_id ])}}">
|
||||
{{csrf_field()}}
|
||||
{{method_field("POST") }}
|
||||
<button data-content="{{__("Close")}}" data-toggle="popover"
|
||||
|
@ -111,60 +96,56 @@
|
|||
<div class="card-header">
|
||||
<div class="d-flex justify-content-between">
|
||||
<h5 class="card-title"><img
|
||||
src="https://www.gravatar.com/avatar/{{ md5(strtolower($ticket->user->email)) }}?s=25"
|
||||
class="user-image" alt="User Image">
|
||||
<a href="/admin/users/{{$ticket->user->id}}">{{ $ticket->user->name }} </a>
|
||||
@if($ticket->user->role === "member")
|
||||
<span class="badge badge-secondary"> Member </span>
|
||||
@elseif ($ticket->user->role === "client")
|
||||
<span class="badge badge-success"> Client </span>
|
||||
@elseif ($ticket->user->role === "moderator")
|
||||
<span class="badge badge-info"> Moderator </span>
|
||||
@elseif ($ticket->user->role === "admin")
|
||||
<span class="badge badge-danger"> Admin </span>
|
||||
@endif
|
||||
src="https://www.gravatar.com/avatar/{{ md5(strtolower($ticket->user->email)) }}?s=25"
|
||||
class="user-image" alt="User Image">
|
||||
<a href="/admin/users/{{$ticket->user->id}}">{{ $ticket->user->name }} </a>
|
||||
@if($ticket->user->role === "member")
|
||||
<span class="badge badge-secondary"> Member </span>
|
||||
@elseif ($ticket->user->role === "client")
|
||||
<span class="badge badge-success"> Client </span>
|
||||
@elseif ($ticket->user->role === "moderator")
|
||||
<span class="badge badge-info"> Moderator </span>
|
||||
@elseif ($ticket->user->role === "admin")
|
||||
<span class="badge badge-danger"> Admin </span>
|
||||
@endif
|
||||
</h5>
|
||||
<span
|
||||
class="badge badge-primary">{{ $ticket->created_at->diffForHumans() }}</span>
|
||||
<span class="badge badge-primary">{{ $ticket->created_at->diffForHumans() }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body" style="white-space:pre-wrap">{{ $ticket->message }}</div>
|
||||
</div>
|
||||
@foreach ($ticketcomments as $ticketcomment)
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div class="d-flex justify-content-between">
|
||||
<h5 class="card-title"><img
|
||||
src="https://www.gravatar.com/avatar/{{ md5(strtolower($ticketcomment->user->email)) }}?s=25"
|
||||
class="user-image" alt="User Image">
|
||||
<a href="/admin/users/{{$ticketcomment->user->id}}">{{ $ticketcomment->user->name }}</a>
|
||||
@if($ticketcomment->user->role === "member")
|
||||
<span class="badge badge-secondary"> Member </span>
|
||||
@elseif ($ticketcomment->user->role === "client")
|
||||
<span class="badge badge-success"> Client </span>
|
||||
@elseif ($ticketcomment->user->role === "moderator")
|
||||
<span class="badge badge-info"> Moderator </span>
|
||||
@elseif ($ticketcomment->user->role === "admin")
|
||||
<span class="badge badge-danger"> Admin </span>
|
||||
@endif
|
||||
</h5>
|
||||
<span
|
||||
class="badge badge-primary">{{ $ticketcomment->created_at->diffForHumans() }}</span>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div class="d-flex justify-content-between">
|
||||
<h5 class="card-title"><img
|
||||
src="https://www.gravatar.com/avatar/{{ md5(strtolower($ticketcomment->user->email)) }}?s=25"
|
||||
class="user-image" alt="User Image">
|
||||
<a href="/admin/users/{{$ticketcomment->user->id}}">{{ $ticketcomment->user->name }}</a>
|
||||
@if($ticketcomment->user->role === "member")
|
||||
<span class="badge badge-secondary"> Member </span>
|
||||
@elseif ($ticketcomment->user->role === "client")
|
||||
<span class="badge badge-success"> Client </span>
|
||||
@elseif ($ticketcomment->user->role === "moderator")
|
||||
<span class="badge badge-info"> Moderator </span>
|
||||
@elseif ($ticketcomment->user->role === "admin")
|
||||
<span class="badge badge-danger"> Admin </span>
|
||||
@endif
|
||||
</h5>
|
||||
<span class="badge badge-primary">{{ $ticketcomment->created_at->diffForHumans() }}</span>
|
||||
</div>
|
||||
<div class="card-body"
|
||||
style="white-space:pre-wrap">{{ $ticketcomment->ticketcomment }}</div>
|
||||
</div>
|
||||
<div class="card-body" style="white-space:pre-wrap">{{ $ticketcomment->ticketcomment }}</div>
|
||||
</div>
|
||||
@endforeach
|
||||
<div class="comment-form">
|
||||
<form action="{{ route('ticket.reply')}}" method="POST" class="form reply-form">
|
||||
{!! csrf_field() !!}
|
||||
<input type="hidden" name="ticket_id" value="{{ $ticket->id }}">
|
||||
<div class="form-group{{ $errors->has('ticketcomment') ? ' has-error' : '' }}">
|
||||
<textarea rows="10" id="ticketcomment" class="form-control"
|
||||
name="ticketcomment"></textarea>
|
||||
<textarea rows="10" id="ticketcomment" class="form-control" name="ticketcomment"></textarea>
|
||||
@if ($errors->has('ticketcomment'))
|
||||
<span class="help-block">
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('ticketcomment') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
|
|
Loading…
Add table
Reference in a new issue