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

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/gamesdaddy/cloudarcade/classes/   drwxr-xr-x
Free 13.34 GB of 57.97 GB (23.01%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     Page.php (3.97 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

class Page
{
    public 
$id null;
    public 
$createdDate null;
    public 
$slug null;
    public 
$title null;
    public 
$content null;
    public function 
__construct$data=array() ) {
        if ( isset( 
$data['id'] ) ) $this->id = (int) $data['id'];
        if ( isset( 
$data['createdDate'] ) ) $this->createdDate = (int) $data['createdDate'];
        if ( isset( 
$data['title'] ) ) $this->title htmlspecialchars($data['title']);
        if ( isset( 
$data['content'] ) ) $this->content $data['content'];
        if ( isset( 
$data['slug'] ) ) $this->slug htmlspecialchars(strtolower(str_replace(' ''-'basename($data["slug"]))));
    }

    public function 
storeFormValues $params ) {

        
// Store all the parameters
        
$this->__construct$params );

        
// Parse and store the publication date
        
if ( isset($params['createdDate']) ) {
            
$createdDate explode '-'$params['createdDate'] );

            if ( 
count($createdDate) == ) {
                list ( 
$y$m$d ) = $createdDate;
                
$this->createdDate mktime 000$m$d$y );
            }
        }
    }

    public static function 
getById$id ) {
        
$conn open_connection();
        
$sql "SELECT *, UNIX_TIMESTAMP(createdDate) AS createdDate FROM pages WHERE id = :id";
        
$st $conn->prepare$sql );
        
$st->bindValue":id"$idPDO::PARAM_INT );
        
$st->execute();
        
$row $st->fetch();
        if ( 
$row ) return new Page$row );
    }

    public static function 
getBySlug$slug ) {
        
$conn open_connection();
        
$sql "SELECT *, UNIX_TIMESTAMP(createdDate) AS createdDate FROM pages WHERE slug = :slug";
        
$st $conn->prepare$sql );
        
$st->bindValue":slug"$slugPDO::PARAM_STR );
        
$st->execute();
        
$row $st->fetch();
        if ( 
$row ) return new Page$row );
    }

    public static function 
getList$numRows=1000000 ) {
        
$conn open_connection();
        
$sql "SELECT SQL_CALC_FOUND_ROWS *, UNIX_TIMESTAMP(createdDate) AS createdDate
                        FROM pages
                        ORDER BY createdDate DESC LIMIT :numRows"
;

        
$st $conn->prepare$sql );
        
$st->bindValue":numRows"$numRowsPDO::PARAM_INT );
        
$st->execute();
        
$list = array();

        while ( 
$row $st->fetch() ) {
            
$page = new Page$row );
            
$list[] = $page;
        }

        
$sql "SELECT FOUND_ROWS() AS totalRows";
        
$totalRows $conn->query$sql )->fetch();
        return ( array ( 
"results" => $list"totalRows" => $totalRows[0] ) );
    }

    public function 
insert() {
        if ( !
is_null$this->id ) ) trigger_error "Page::insert(): Attempt to insert an Page object that already has its ID property set (to $this->id)."E_USER_ERROR );

        
$conn open_connection();
        
$sql "INSERT INTO pages ( createdDate, title, content, slug ) VALUES ( FROM_UNIXTIME(:createdDate), :title, :content, :slug )";
        
$st $conn->prepare $sql );
        
$st->bindValue":createdDate"$this->createdDatePDO::PARAM_INT );
        
$st->bindValue":title"$this->titlePDO::PARAM_STR );
        
$st->bindValue":content"$this->contentPDO::PARAM_STR );
        
$st->bindValue":slug"$this->slugPDO::PARAM_STR );
        
$st->execute();
        
$this->id $conn->lastInsertId();
    }

    public function 
update() {
        if ( 
is_null$this->id ) ) trigger_error "Page::update(): Attempt to update an Page object that does not have its ID property set."E_USER_ERROR );
     
        
$conn open_connection();
        
$sql "UPDATE pages SET title=:title, content=:content, slug=:slug WHERE id = :id";
        
$st $conn->prepare $sql );
        
$st->bindValue":title"$this->titlePDO::PARAM_STR );
        
$st->bindValue":content"$this->contentPDO::PARAM_STR );
        
$st->bindValue":slug"$this->slugPDO::PARAM_STR );
        
$st->bindValue":id"$this->idPDO::PARAM_INT );
        
$st->execute();
    }

    public function 
delete() {
        if ( 
is_null$this->id ) ) trigger_error "Page::delete(): Attempt to delete an Page object that does not have its ID property set."E_USER_ERROR );

        
$conn open_connection();
        
$st $conn->prepare "DELETE FROM pages WHERE id = :id LIMIT 1" );
        
$st->bindValue":id"$this->idPDO::PARAM_INT );
        
$st->execute();
    }

}

?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

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

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