Location: PHPKode > projects > Monyet > controllers/managesms.php
<?php

//class sms controller
//sms are not editable. but admin can truncate the sms data only for send=false

Class ManageSMS extends Management {

	private $sms;

	public function __construct(){
		parent::__construct();
		$this->sms = new SMS();
	}

	public function show(){
		$this->xml->addText(SITENAME.' SMS Buffer','title',0);
		$this->xml->addLoop($this->getName().'/refreshshow',null,REFRESH);
		$this->xml->flush();
	}

	public function refreshshow(){
		parent::show();
	}

	public function removeItem(){
	}

	public function populateShowContent(){
		$arraytable = 	$this->sms->select($this->offset,$this->pglimit);
		$array_column = array('Posttime','Content','Destination','Send');	  
		$this->xml->addTable($arraytable,$array_column,'Table SMS Buffer','',$this->offset,'rightcontent',0);
	}

	public function populateAddForm(){
	}

	public function populateEditForm(){
	}

	public function getTitle(){
		return SITENAME.' -sms';
	}

	public function getTotal(){
		return $this->sms->getTotal();
	}

	public function getKeyVar(){
	}

	public function getFormPlace(){
	}

	public function editItem(){
	}
	public function addItem(){
	}
	public function checkAdd(){}
	public function checkEdit(){}

	//truncate table sms with condition send=true
	public function truncate(){
		$this->sms->truncate();
		$this->xml->addRedirPOST($this->getName().'/show','ofs=0');
		$this->xml->addText('Truncating SMS','note',0);
		$this->xml->flush();
	}
}
?>
Return current item: Monyet