Beispiel #1
0
<? require_once './view/html.php';

	$menu = new Menu();
	$submenu = new SubMenu();
	$permiso = new Permiso();

	$submenu->setOrder(" ORDER BY orden");

	if ($_GET['op']=='insert') {
		$submenu->setIdMenu($_POST['id_menu']);
		$submenu->setVer($_POST['ver']);
		$submenu->setLink($_POST['link']);
		$submenu->insert();
		$id_menu=$submenu->findLast();
		$permiso->setId($id_menu[0]['id']);
		$permiso->setIdMenu($id_menu[0]['id_menu']);
		$permiso->insertPermisoMenu();
	}

	if ($_GET['op']=='delete') {
		$submenu->delete($_GET['id']);
		$permiso->deletePermisoMenu($_GET['id']);
	}

	$m = $menu->find($_GET['id']);

?>
<!DOCTYPE html>
<html>
<head>
	<?php