This is an error 404
There are `0` results
preferences:
145.99 ms | 1399 KiB | 7 Q<?php
class Model
{
protected $DB;
function __construct($rowFields)
{
global $DB;
$this->DB = $DB;
foreach ($rowFields as $field => $value)
{
$this->$field = $value;
}
}
}
class NewsModel extends Model
{
private $NewsID = 0;
private $NewsPostedBy = 0;
private $NewsCreateDate = 0;
private $NewsPublishDate = 0;
private $NewsEditDate = 0;
private $NewsStatus = 0;
private $NewsOrder = 0;
private $NewsDataLangID = array(0 => 0);
private $NewsDataTitle = array(0 => '');
private $NewsDataSubTitle = array(0 => '');
private $NewsDataSummary = array(0 => '');
private $NewsDataContent = array(0 => '');
private $NewsDataStatus = array(0 => 0);
private $NewsDataOrder = array(0 => 0);
function __construct($newsRowFields)
{
parent::__construct($newsRowFields);
// // Initialize the model
// $this->NewsID = $newsID;
// $this->NewsLangID = $newsLangID;
// $this->NewsTitle = $newsTitle;
// $this->NewsSubTitle = $newsSubTitle;
// $this->NewsSummary = $newsSummary;
// $this->NewsContent = $newsContent;
// $this->NewsPostedBy = $newsPostedBy;
// $this->NewsCreateDate = $newsCreateDate;
// $this->NewsPublishDate = $newsPublishDate;
// $this->NewsEditDate = $newsEditDate;
// $this->NewsStatus = $newsStatus;
// $this->NewsOrder = $newsOrder;
}
}
/**
* View class
*/
class View
{
function __construct()
{
# code...
}
public function Render(Model $viewName) {
$result = include(P_VIEW_DIR_SYS . $viewName . '.php');
}
}
class NewsListView extends View
{
function __construct()
{
$DB -> Select('*')
-> From('News JOIN NewsData ON newsID = newsDataRecID')
-> Where("newsStatus = 'a' AND newsStatus = 'a'")
-> OrderBy('a.newsOrder DESC')
-> BeginTransaction();
$errors = false;
if ($errors === false)
{
$DB->Commit();
}
else
{
$DB->RollBack();
}
}
public function Render(NewsModel $news) {
parent::Render($news);
}
}