<?
/*********************************************************/
class CContactUs{
var $contact_us_id;
var $active;
var $read_message;
var $published;
var $post_name;
var $post_email;
var $post_header;
var $post_content;
var $post_date;
var $read_date;
var $sent_reply;
var $reply_header;
var $reply_content;
var $reply_date;
var $order_by;
function CContactUs($row=""){
$this->contact_us_id = $row["contact_us_id"];
$this->active = $row["active"];
$this->read_message = $row["read_message"];
$this->published = $row["published"];
$this->post_name = $row["post_name"];
$this->post_email = $row["post_email"];
$this->post_header = $row["post_header"];
$this->post_content = $row["post_content"];
$this->post_date = $row["post_date"];
$this->read_date = $row["read_date"];
$this->sent_reply = $row["sent_reply"];
$this->reply_header = $row["reply_header"];
$this->reply_content = $row["reply_content"];
$this->reply_date = $row["reply_date"];
$this->order_by = "contact_us_id";
}
}
/*********************************************************/
class CContactUsArray{
var $contactus=array();
var $top=0;
var $count=0;
function get(){
if ($this->top <= $this->count){
$this->top++;
return $this->contactus[$this->top-1];
}
else
return false;
}
function add($CContactUs) {
$this->contactus[$this->count] = $CContactUs;
$this->count++;
return true;
}
function count() {
return ($this->count);
}
}
/*********************************************************/
class CContactUsEngine {
function GetContactUsMessage($contact_us_id){
$o_dataaccess = new CDataAccess();
return $o_dataaccess->GetContactUsMessage($contact_us_id);
}
function GetContactUsMessages(){
$o_dataaccess = new CDataAccess();
return $o_dataaccess->GetContactUsMessages();
}
function InsertContactUsMessage($CContactUs){
$o_dataaccess = new CDataAccess();
return $o_dataaccess->InsertContactUsMessage($CContactUs);
}
}
?>