$st->setTable($_GET['table']); $st->setField($_GET['field']); $st->setValue($_GET['value']); $st->setId($_GET['id']); $st->update(); if ($_GET['table'] == 'submenu' && $_GET['field'] == 'id_menu') { $st->setTable('permiso'); $st->updatePermiso(); } } if ($_GET['op'] == 'updChk') { $value = 0; $st->setTable($_GET['table']); $st->setField($_GET['field']); if ($_GET['value'] == 'true') { $value = 1; } $st->setValue($value); $st->setId($_GET['id']); $st->updateCheck(); } if ($_GET['op'] == 'asgChk') { $st->setTable($_GET['table']); $st->setField($_GET['field']); $st->setId($_GET['id']); if ($_GET['value'] == 'true') { $st->insert(); } else { $st->delete(); } }