Location: PHPKode > projects > Originator - RPG Rapid Prototyper > originator/includes/origin/todo.php
<?php

/*
	Self Documenting TODO
	Also used as the template for new pages
*/


class page extends pageParent {
	public $template = 'todo.html'; // default page
	
	public function execute(){
		if (isset($_REQUEST["op"])){
			$sql = "select * from `originator`.`todo` where `todo` = '". $_REQUEST["op"] ."'";

			$result = DB::query($sql);
			if ( 0 == $result->rowcount()) {
				$sql = "INSERT INTO  `originator`.`todo` (`uid` , `createdate` , `todo`) VALUES ( NULL ,  '". date("Y - m - d")."',  '". $_REQUEST["op"] ."')";
				DB::query($sql);
			}
			
			$sql = "select * from `originator`.`todo`";
			$fetch = DB::query($sql);
			foreach ($fetch as $todo){
				$this->data["todo"][] = $todo["todo"];
			}
		}


	}
	
}


?>
Return current item: Originator - RPG Rapid Prototyper