function Marcas($act) { switch ($act) { case 2: Crear(); break; case 1: Eliminar(); break; default: break; } }
function Categorias($act) { switch ($act) { case 3: Crear(); break; case 2: Editar(); break; case 1: Eliminar(); break; case 4: FormEditar(); break; default: break; } }
function Productos($act) { switch ($act) { case 3: Crear(); break; case 2: Editar(); break; case 1: Eliminar(); break; case 4: FormEditar(); default: break; break; } }
<?php /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /** * Description of ClsPdf * * @author TOSHIBA */ $accion = filter_input(INPUT_POST, 'accion'); switch ($accion) { case 'crear': Crear(); break; default: echo "<h1>Default de sw</h1>"; } function Crear() { //require('/ModPdfAuditivo.php'); $tipoExamen = filter_input(INPUT_POST, 'tipoExamen'); if ($tipoExamen === "audiometria") { include_once '/ModPdfAuditivo.php'; $objMod = new ModPdfAuditivo(); $response = $objMod->Crear($tipoExamen); echo $response; } if ($tipoExamen === "oftalmologico") {