asi la tenia tambine y no me la compara tampoco
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú
if ($of<>'Y' or $of<>'N') {
$msg.= "Solo se permite Y o N en el campo oferta<br/>"; }
else { $ab=true; } //Contiene algun dato
if ($of!='Y' or $of!='N') {
$msg.= "Solo se permite Y o N en el campo oferta<br/>"; }
else { $ab=true; } //Contiene algun dato
//validar que la fecha si este bien
function validarfecha($input){
global $msg;
//Separadores de la fecha
$separator_type= array(
"/",
"-",
"."
);
$actdate=date('Y-m-d');
//Seperar toda la fecha para por hacer un checkdate
foreach ($separator_type as $separator) {
$find= stripos($input,$separator);
$find2= stripos($actdate,$separator);
if($find<>false){ $separator_used= $separator; }
}
$inputarray= explode($separator_used,$input); //Separacion de la fecha ingresada
$actinput= explode($separator_used,$actdate); //Separacion de la fecha actual
if (!checkdate($inputarray[1],$inputarray[2],$inputarray[0])) {
$msg .="La fecha introducida es invalida <br/>";
}else { $dtinput= $inputarray[1]."-".$inputarray[2]."-".$inputarray[0]; }
if (!($inputarray[0]>$actinput[0]) or !($inputarray[1]>$actinput[1]) or !($inputarray[2]>$actinput[2])) {
$msg .="La fecha no es superior a la actual <br/>";
}
$inputarray=array();
$actinput=array();
}
$msg=null;
if (file_exists('msg.txt')) {
$file=fopen('msg.txt','r');
$msg=fread($file,filesize($file));
fclose($file);
unlink($file);
}