uawdijnntqw1x1x1
IP : 3.149.253.80
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
/
revolution
/
..
/
system.2
/
library
/
db
/
pgsql.php
/
/
<?php namespace DB; final class PgSQL { private $link; public function __construct($hostname, $username, $password, $database, $port = '5432') { if (!$this->link = pg_connect('hostname=' . $hostname . ' port=' . $port . ' username=' . $username . ' password=' . $password . ' database=' . $database)) { throw new \Exception('Error: Could not make a database link using ' . $username . '@' . $hostname); } if (!mysql_select_db($database, $this->link)) { throw new \Exception('Error: Could not connect to database ' . $database); } pg_query($this->link, "SET CLIENT_ENCODING TO 'UTF8'"); } public function query($sql) { $resource = pg_query($this->link, $sql); if ($resource) { if (is_resource($resource)) { $i = 0; $data = array(); while ($result = pg_fetch_assoc($resource)) { $data[$i] = $result; $i++; } pg_free_result($resource); $query = new \stdClass(); $query->row = isset($data[0]) ? $data[0] : array(); $query->rows = $data; $query->num_rows = $i; unset($data); return $query; } else { return true; } } else { throw new \Exception('Error: ' . pg_result_error($this->link) . '<br />' . $sql); } } public function escape($value) { return pg_escape_string($this->link, $value); } public function countAffected() { return pg_affected_rows($this->link); } public function getLastId() { $query = $this->query("SELECT LASTVAL() AS `id`"); return $query->row['id']; } public function __destruct() { pg_close($this->link); } }
/home/sudancam/public_html/0d544/../../.trash/revolution/../system.2/library/db/pgsql.php