Example #1
0
 function delete_by_parent($catalogue_id, $id)
 {
     $id = $this->uri->segment(5);
     $catalogue_id = $this->uri->segment(4);
     $lands = new Land($id);
     if (!$lands->exists()) {
         show_404();
     }
     $lands->delete();
     flash_message('success', 'Xóa thành công.');
     redirect($this->admin . 'lands/list_by_parent/' . $catalogue_id);
 }
Example #2
0
function delete() {	
	if (!isset($_SESSION['admin'])) {
		echo "Not admin";		
		//header("Location: /index.html");		
		exit();
	}
	$id = intval($_REQUEST['id']);
	Land::delete($id);
	header("Location: ".$_SERVER['HTTP_REFERER']);		
}