//echo $_POST['cboModulo']."<br>"; if ($_POST['cboModulo'] == $m->name()) { $modSelect = $m->name(); } } } } $ari->t->assign("arrModulo", $arrModulo); $ari->t->assign("arrIdModulo", $arrIdModulo); $ari->t->assign("modSelect", $modSelect); if (!isset($_POST['guardar'])) { $ari->t->assign("newName", ""); $ari->t->assign("newNiceName", ""); } else { //verificar datos enviados duplicados if (!$sp->Validar()) { $ari->error->addError('seguridad_permission', 'SENT_DUPLICATE_DATA'); } $permiso = new seguridad_permission(); $permiso->set('modulename', $_POST['cboModulo']); $permiso->set('name', $_POST['txtName']); $permiso->set('nicename', $_POST['txtNiceName']); //stores? if ($permiso->store()) { header("Location: " . $ari->get("adminaddress") . '/seguridad/permission/new'); exit; } else { $ari->t->assign("form", true); $ari->t->assign("error", true); $errores = $ari->error->getErrorsfor("seguridad_permission"); foreach ($errores as $error) {
<?php /* * Created on 03/02/2005 * * To change the template for this generated file go to * Window - Preferences - PHPeclipse - PHP - Code Templates */ include "..\\oob_safepost.php"; $sp = new oob_safepost("casita"); session_start(); $message = $input = ''; if (isset($_POST['testform_button'])) { $message = (string) ($sp->Validar() == TRUE) ? 'Input OK' : 'Data sent twice'; $input = $_POST['testform_button']; } ?> <html> <head> <title>Sample</title> </head> <body> <p><b><?php echo $message; ?> </b></p> <p><?php echo $input; ?> </p> <form name="token" action="safepost_test.php" method="post">