░▒▓████████████████████████████████▓▒░ ░▒▓█ ▓▒░ ░▒▓█ ~ S W A M P ~ ▓▒░ ░▒▓█ ▓▒░ ░▒▓████████████████████████████████▓▒░
lon105.truehost.cloud
LOCATION:
/home/ilrtztmy/woodcoffiefurnitureworks.com/api/models
☗ ROOT
↻ REFRESH
✎ CARVE FLESH
EDITING: Quote.php
<?php class Quote{ private $conn; private $table_name = "quotes"; public $id; public $name; public $email; public $phone; public $context; public $product_id; public $message; public $status; public $created_at; public function __construct($db){ $this->conn = $db; } function read(){ $query = "SELECT q.id, q.name, q.email, q.phone, q.context, q.product_id, q.message, q.status, q.created_at, p.name as product_name FROM " . $this->table_name . " q LEFT JOIN products p ON q.product_id = p.id ORDER BY q.created_at DESC"; $stmt = $this->conn->prepare($query); $stmt->execute(); return $stmt; } function readOne(){ $query = "SELECT q.id, q.name, q.email, q.phone, q.context, q.product_id, q.message, q.status, q.created_at, p.name as product_name FROM " . $this->table_name . " q LEFT JOIN products p ON q.product_id = p.id WHERE q.id = ? LIMIT 0,1"; $stmt = $this->conn->prepare( $query ); $stmt->bindParam(1, $this->id); $stmt->execute(); $row = $stmt->fetch(PDO::FETCH_ASSOC); $this->name = $row["name"]; $this->email = $row["email"]; $this->phone = $row["phone"]; $this->context = $row["context"]; $this->product_id = $row["product_id"]; $this->message = $row["message"]; $this->status = $row["status"]; $this->created_at = $row["created_at"]; $this->product_name = $row["product_name"]; } function updateStatus(){ $query = "UPDATE " . $this->table_name . " SET status = :status WHERE id = :id"; $stmt = $this->conn->prepare($query); $this->status=htmlspecialchars(strip_tags($this->status)); $this->id=htmlspecialchars(strip_tags($this->id)); $stmt->bindParam(":status", $this->status); $stmt->bindParam(":id", $this->id); if($stmt->execute()){ return true; } return false; } function delete(){ $query = "DELETE FROM " . $this->table_name . " WHERE id = ?"; $stmt = $this->conn->prepare($query); $this->id=htmlspecialchars(strip_tags($this->id)); $stmt->bindParam(1, $this->id); if($stmt->execute()){ return true; } return false; } }
CANCEL
Name
Type
Size
Modified
Actions
↩ ..
DIR
—
—
📄 Category.php
PHP
3.4 KB
2026-06-18 14:10
EDIT
📄 Product.php
PHP
5.8 KB
2026-06-18 14:10
EDIT
📄 Quote.php
PHP
2.8 KB
2026-06-18 14:10
EDIT