uawdijnntqw1x1x1
IP : 18.118.137.54
Hostname : ns1.eurodns.top
Kernel : Linux ns1.eurodns.top 4.18.0-553.5.1.lve.1.el7h.x86_64 #1 SMP Fri Jun 14 14:24:52 UTC 2024 x86_64
Disable Function : mail,sendmail,exec,passthru,shell_exec,system,popen,curl_multi_exec,show_source,eval,open_base
OS : Linux
PATH:
/
home
/
sudancam
/
public_html
/
0d544
/
..
/
..
/
.trash
/
images
/
..
/
system.1
/
library
/
db
/
pgsql.php
/
/
<?php namespace Opencart\System\Library\DB; final class PgSQL { private $connection; public function __construct(string $hostname, string $username, string $password, string $database, string $port = '') { if (!$port) { $port = '5432'; } try { $pg = @pg_connect('hostname=' . $hostname . ' port=' . $port . ' username=' . $username . ' password=' . $password . ' database=' . $database); } catch (\Exception $e) { throw new \Exception('Error: Could not make a database link using ' . $username . '@' . $hostname); } if ($pg) { $this->connection = $pg; pg_query($this->connection, "SET CLIENT_ENCODING TO 'UTF8'"); } } public function query(string $sql): bool|object { $resource = pg_query($this->connection, $sql); if ($resource) { if (is_resource($resource)) { $i = 0; $data = []; while ($result = pg_fetch_assoc($resource)) { $data[$i] = $result; $i++; } pg_free_result($resource); $query = new \stdClass(); $query->row = isset($data[0]) ? $data[0] : []; $query->rows = $data; $query->num_rows = $i; unset($data); return $query; } else { return true; } } else { throw new \Exception('Error: ' . pg_result_error($this->connection) . '<br />' . $sql); } } public function escape(string $value): string { return pg_escape_string($this->connection, $value); } public function countAffected(): int { return pg_affected_rows($this->connection); } public function isConnected(): bool { if (pg_connection_status($this->connection) == PGSQL_CONNECTION_OK) { return true; } else { return false; } } public function getLastId(): int { $query = $this->query("SELECT LASTVAL() AS `id`"); return $query->row['id']; } public function __destruct() { if ($this->connection) { pg_close($this->connection); $this->connection = ''; } } }
/home/sudancam/public_html/0d544/../../.trash/images/../system.1/library/db/pgsql.php