<?php
Class ManageContent extends Management {
private $content;
public function __construct(){
parent::__construct();
$this->content = new Content();
}
public function show(){
parent::show();
}
public function remove(){
parent::remove();
}
public function removeItem(){
$this->content->remove($_POST['id']);
}
public function populateShowContent(){
$arraytable = $this->content->select($this->offset,$this->pglimit);
$array_column = array("Page","Content");
$this->xml->addTable($arraytable,$array_column,'Table Content',$this->navigator->getAccess($this),$this->offset,'rightcontent',0);
}
public function populateAddForm(){
$this->xml->addTextField('Page',null,'page','text');
$this->xml->addHTMLArea('Content','','content');
}
public function populateEditForm(){
$this->content->selectByID($_POST['id']);
$this->xml->addTextField('Page',$this->content->getPage(),'page','text');
$this->xml->addHTMLArea('Content',$this->content->getContent(),'content');
}
public function getTitle(){
return SITENAME.' -content';
}
public function getTotal(){
return $this->content->getTotal();
}
public function getKeyVar(){
return 'page';
}
public function getFormPlace(){
return 'rightcontent';
}
public function editItem(){
$array = array('page'=>$_POST['page'],'content'=>$_POST['content']);
return $this->content->update($array,$_POST['id']);
}
public function addItem(){
$array = array($_POST['page'],$_POST['content']);
$this->content->add($array);
}
public function checkAdd(){}
public function checkEdit(){}
}
?>