[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: Session.php
<?php namespace App\Models\Api; use App\Models\Api\Traits\CheckWebinarItemAccessTrait; use App\Models\Session as WebSession; class Session extends WebSession { use CheckWebinarItemAccessTrait; public function getDetailsAttribute() { return [ 'id' => $this->id, 'title' => $this->title, 'auth_has_read' => $this->read, 'user_has_access' => $this->user_has_access, 'is_finished' => $this->isFinished(), 'is_started' => (time() > $this->date), 'status' => $this->status, 'order' => $this->order, 'moderator_secret' => $this->moderator_secret, 'date' => $this->date, 'duration' => $this->duration, 'link' => $this->link, 'join_link' => (apiAuth()) ? $this->getJoinLink() : null, 'can_join' => (apiAuth() and !$this->isFinished() and time() > $this->date), 'session_api' => $this->session_api, 'zoom_start_link' => $this->zoom_start_link, // 'session_api' => $this->session_api, 'api_secret' => $this->api_secret, 'description' => $this->description, 'created_at' => $this->created_at, 'updated_at' => $this->updated_at, 'agora_settings ' => $this->agora_settings ]; } public function getJoinLink($zoom_start_link = false) { $link = $this->link; if ($this->session_api == 'big_blue_button') { $link = route('big_blue_button', [ 'session_id' => $this->id, ]); // $link = url('panel/sessions/' . $this->id . '/joinToBigBlueButton'); } if ($zoom_start_link and auth('api')->check() and auth('api')->id() == $this->creator_id and $this->session_api == 'zoom') { $link = $this->zoom_start_link; } if ($this->session_api == 'agora') { // $link = url('panel/sessions/' . $this->id . '/joinToAgora'); /* $link = route('agora', [ 'user_id' => apiAuth()->id, 'session_id' => $this->id, ]);*/ $link = null; } return $link; } public function getUserHasAccessAttribute() { $user = apiAuth(); $hasBought = $this->webinar->checkUserHasBought($user); $access = false; if ($user and $hasBought and !$this->isFinished()) { $access = true; } return $access; } public function getReadAttribute() { $user = apiAuth(); if (!$user) { return null; } return ($this->learningStatus()->where('user_id', $user->id)->count()) ? true : false; } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium320.web-hosting.com
Server IP: 66.29.153.54
PHP Version: 8.2.29
Server Software: LiteSpeed
System: Linux premium320.web-hosting.com 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 76.85 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: aoneqssk
User ID (UID): 1285
Group ID (GID): 1290
Script Owner UID: 1285
Current Dir Owner: 1285