| Server IP : 3.111.61.48 / Your IP : 216.73.216.67 Web Server : Apache System : Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64 User : ubuntu ( 1000) PHP Version : 8.2.31 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/vhost/gyaniguru.org/admin/models/ |
Upload File : |
<?php
$ds = DIRECTORY_SEPARATOR;
$base_dir = realpath(dirname(__FILE__) . $ds . '..' . $ds . '..') . $ds;
$DatabaseMysql = "{$base_dir}inc{$ds}DatabaseMysql.class.php";
require_once($DatabaseMysql);
/**
* DynamicContents Class
*/
class DynamicContents
{
// DB stuff
private $conn;
private $database;
private $table = 'dynamic_contents';
private $query_string;
private $query_parse;
private $ResultRecord;
private $row;
public function __construct()
{
// Instantiate DB & connect
$this->database = new DatabaseMysql();
$this->conn = $this->database->connect();
$this->ResultRecord = array();
}
public function getData()
{
// Query String
$this->query_string = "SELECT * FROM ".$this->table." ORDER BY flag_type";
// Query execution
$this->query_parse = mysqli_query($this->conn, $this->query_string) or die(mysqli_error($this->conn));
while ($this->row = mysqli_fetch_object($this->query_parse)){
$this->ResultRecord[$this->row->flag_type][$this->row->flag_name] = [
"id" => $this->row->id,
"value" => $this->row->flag_value,
"created_at" => $this->row->created_at,
"updated_at" => $this->row->updated_at
];
}
return $this->ResultRecord;
}
}