File: /home/pengthai/domains/pengthaicurry.com/public_html/admin/class/config.php
<?php
class config
{
public $CONFIX = array();
public $titleView="";
protected function getConnect()
{
if (!is_object($this->db)) {
$this->db = new connect;
}
return $this->db;
}
public function __construct()
{
$this->setDefault();
}
protected function setDefault(){
$db = $this-> getConnect();
$sql ="SELECT * FROM tb_config ";
$result = $db->execute($sql);
if ( $result )
{
while($r = $db->fecth($result))
{
$name = $r['conf_name'];
$value = $r['conf_value'] ;
if(!empty($value))
$this->CONFIX[$name] =$value ;
}
}
return true ;
}
}
?>