PATH:
var
/
www
/
vhosts
/
sandbox.dos-group.com
/
httpdocs
/
admiral
<?php class DbConn { protected $host; protected $db; protected $usr; protected $pass; protected $connection; public function __construct( $host, $db, $usr, $pass) { $this->host = $host; $this->db = $db; $this->usr = $usr; $this->pass = $pass; } private function connect() { $this->connection = new mysqli( $this->host, $this->usr, $this->pass, $this->db ); if ($this->connection->connect_error) die("Connection failed: " . $this->connection->connect_error); } private function performQry( $qry ) { $this->connect(); return $this->connection->query($qry); } private function transactionQuery( $qry ) { $this->connect(); $this->connection->begin_transaction(MYSQLI_TRANS_START_READ_ONLY); $this->connection->query( $qry ); $this->connection->commit(); $this->connection->close(); } public function getNewsList( $lang, $from, $limit ) { $qry = "SELECT a.title, b.description FROM titles a, descriptions b, news_translations c, news d, languages e WHERE c.fk_news = d.id AND a.fk_title = id.titles AND b.fk_descriptions = id.descriptions AND e.iso_code = '$lang' ORDER BY d.published_date LIMIT $from, $limit "; $res = $this->performQry( $qry ); // title, description mysqli_close($this->connection); } public function setNews( $title, $public, $description, $lang, $image ) { /* $title varchar(255) $public boolean $description text $lang int $image varchar(255) */ $this->transactionQuery("CALL setNews('$title', '$description', $lang, '$image');"); } public function updateNews( $id, $title, $public, $description, $lang, $image ) { /* $title varchar(255) $public boolean $description text $lang int $image varchar(255) */ $this->transactionQuery("CALL updateNews($id, '$title', $public, '$description', $lang, '$image');"); } public function setClub( $title, $description, $open_time, $link, $form_mailto, $lang, $image ) { $this->transactionQuery("CALL setClub('$title', '$description', '$open_time', '$link', '$form_mailto', $lang, '$image');"); } public function updateClub( $id, $title, $description, $open_time, $link, $form_mailto, $published, $lang, $image ) { $this->transactionQuery("CALL updateClub( $id, '$title', '$description', '$open_time', '$link', '$form_mailto', $published, $lang, '$image');"); } }
[-] DbConn.php
[open]
[+]
..
[-] jsonCasinoDemo.php
[open]
[-] jsonUser.json
[open]
[-] admiral_dev_0.zip
[open]