!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/ecom1.picotech.app/public_html_ecom1/Modules/CMS/Http/Models/   drwxr-xr-x
Free 26.48 GB of 117.98 GB (22.44%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     Slide.php (3.62 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
 * @package Slide Model
 * @author TechVillage <support@techvill.org>
 * @contributor Kabir Ahmed <[kabir.techvill@gmail.com]>
 * @created 26-12-2021
 */

namespace Modules\CMS\Http\Models;

use 
App\Models\Model;
use 
App\Traits\ModelTrait;
use 
Modules\MediaManager\Http\Models\ObjectFile;

use 
App\Traits\ModelTraits\{
    
CachablehasFiles
};

class 
Slide extends Model
{
    use 
ModelTraithasFilesCachable;

    
/**
     * Relation wirh File Model
     *
     * @var boolean
     */
    
public function image()
    {
        return 
$this->hasOne('App\Models\File''object_id')->where('object_type''pages');
    }

    
/**
     * Foreign key with ObjectFile model
     *
     * @return \Illuminate\Database\Eloquent\Relations\HasOne
     */
    
public function objectImage()
    {
        return 
$this->hasOne('Modules\MediaManager\Http\Models\ObjectFile''object_id')->where('object_type''slides');
    }

    
/**
     * Foreign key with Slider model
     *
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    
public function slider()
    {
        return 
$this->belongsTo(Slider::class);
    }

     
/**
     * Animation style value
     * @return array
     */
    
protected function animationStyle()
    {
        return array(
            
"fadeIn" => __('fadeIn'),
            
"fadeInDown" => __('fadeInDown'),
            
"fadeInLeft" => __('fadeInLeft'),
            
"fadeInRight" => __('fadeInRight'),
            
"fadeInUp" => __('fadeInUp'),
            
"flip" => __('flip'),
            
"flipInX" => __('flipInX'),
            
"flipInY" => __('flipInY'),
            
"slideInUp" => __('slideInUp'),
            
"slideInDown" => __('slideInDown'),
            
"slideInLeft" => __('slideInLeft'),
            
"slideInRight" => __('slideInRight'),
            
"rollIn" => __('rollIn'),
          );
    }

    
/**
     * Store Slide
     *
     * @param array $data
     * @return boolean
     */
    
public function store($data = [])
    {
        if (
parent::insertGetId($data)) {
            
$fileIds = [];
            if (
request()->has('file_id')) {
                foreach (
request()->file_id as $data) {
                    
$fileIds[] = $data;
                }
            }
            
ObjectFile::storeInObjectFiles($this->objectType(), $this->objectId(), $fileIds);
            
self::forgetCache();
            return 
true;
        }
        return 
false;
    }

    
/**
     * Update Slide
     * @param array $data
     * @param int $id
     * @return boolean
     */
    
public function updateData($data = [], $id null)
    {
        
$result parent::where('id'$id);
        if (
$result->exists()) {
            if (
$result->update($data)) {
                
$result->first()->updateFiles(['isUploaded' => false'isOriginalNameRequired' => true'thumbnail' => true]);
                
self::forgetCache();
                return 
true;
            }
        }

        return 
false;
    }

    
/**
     * Delete Slide
     *
     * @param int $id
     * @return array $data
     */
    
public function remove($id null)
    {
        
$data = ['status' => 'fail''message' => __('Slide does not found.')];
        
$slide $this->where('id'$id)->first();
        if (empty(
$slide)) {
            return 
$data;
        }

        if (
$slide->delete()) {
            
$slide->deleteFileObjects(['thumbnail' => true]);
            
$data = ['status' => 'success''message' => __('Slide has been successfully deleted.')];
            
self::forgetCache();
        }
        return 
$data;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0036 ]--