Greetings, a long time ago not habia used this wonderful tool and when I saw the updates and improvements gave many desire me to prove them in my systems but when installing the bookstore does not work in firefox if somebody can say to me because it will be? the agradesco mainly when use the function of onCorrect () to keep the data and to recharge the page.
Changed at 07 July 08 / 22:32
Thanks to respond to Johan, sides I work with smarty to make the groups of my system and this it is the code that really does not work in firefox not because but when surcharge the page does not appear the form nevertheless if you keep the data in from mysql
<?php
session_start();
include './configs/funciones.php';
include './configs/smarty.php';
include './configs/bd.php';
include './configs/bdfh3.php';
include './modelo/bd_guardar_periodos.php';
include './modelo/bd_obt_periodos.php';
$_SESSION['ini']=parse_ini_file('./configs/config.ini',true);
$f1=new dbFormHandler('periodos',NULL,'onclick="highlight(event)"');
$f1->setLanguage('es');
$f1->setConnectionResource($link,'periodos','mysql');
$f1->borderStart('Agregar/Modificar Periodos');
$f1->textField('Período','nombre',FH_NOT_EMPTY,10,255);
$f1->dateField('Año','year',FH_NOT_EMPTY,1,'y',"15:02");
$f1->textField('Costo de UC','uc',FH_FLOAT,10,10);
$f1->textField('Costo de Preinscripción','cos_pre',FH_FLOAT,10,10);
$f1->RadioButton('Estado','estado',$estado,FH_NOT_EMPTY);
$f1->setHelpText('nombre','Por Favor Introduzca el Nombre del Período');
$f1->setMask(
" <tr>\n".
" <td> </td>\n".
" <td> </td>\n".
" <td>%field% %field%</td>\n".
" </tr>\n"
);
$f1->submitButton('Registrar','registrar');
$f1->resetButton();
$f1->borderStop();
$f1->onCorrect("procesar");
function procesar($d)
{
$nombre=$d['nombre'];
$n=sql2value("SELECT COUNT(*) FROM periodos WHERE nombre LIKE '$nombre'");
if ($n==0)
{
bd_guardar_periodos($d);
$_SESSION['mensaje']="PERIODO REGISTRADO CORRECTAMENTE";
}
else
{
$_SESSION['mensaje']="EL PERIODO YA EXISTE POR FAVOR INTRODUZCA UNO NUEVO";
}
ir('periodos.php');
}