Bueno, en la pagina que estoy desarrollando, hay un sistema de puntuacion, el cual hasta hace un tiempo funcionaba perfecto, lo deje de usar (1 mes aproximadamente) ya que tenia que terminar otras cosas, despues hice un cambio significativo (a mi modo de ver las cosas), cambie
include_once por
require y
$_GET por
$_POST, luego de hacer el cambio, me dejo de funcionar

, probe volver todo a $_GET como estaba antes y nada, entonces, para ver que era lo que pasaba, me fui al zend debugger y lo ejecute paso a paso, FUNCIONO TODO! sin ningun error, fue cuando pense " Mi pc se volvio loca o yo necesito un nuevo cerebro. ", bueno, volvi a Firefox para correr la pagina, y bueno, NO FUNCIONO! en una de esas, voy a IE a probar la pagina, y ahi SI FUNCIONO! entonces.... ya no entiendo nada, antes andaba perfecto en FF y IE, ahora solo en IE!. Probe con copias anteriores del sistema, y ahora no funciona la puntuacion en ninguna, siendo que andaba perfecto! Ya no entiendo nada!, dejo el codigo para ver si alguien tiene alguna idea o si le paso algo similar.
Calificar.php Código PHP:
<?php
require("template.php");
$clave=$_POST['clave'];
set_file("todo","calificar.html");
set_var("clave",$clave);
pparse("todo");
?>
Calificar.html Código PHP:
<script type="text/javascript">
function validar(e) { // 1
tecla = (document.all) ? e.keyCode : e.which; // 2
if (tecla==8) return true; // 3
patron =/[<>]/; // 4
te = String.fromCharCode(tecla); // 5
return !patron.test(te); // 6
}
function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit) // if too long...trim it!
field.value = field.value.substring(0, maxlimit);
// otherwise, update 'characters left' counter
else
countfield.value = maxlimit - field.value.length;
}
function valida_envia(){
var Promo1=form1.tipopuntuacion[0].checked;
var Promo2=form1.tipopuntuacion[1].checked;
var Promo3=form1.tipopuntuacion[2].checked;
if ((Promo1==false) && (Promo2==false) && (Promo3==false)){
alert("Debe Marcar un Tipo de Puntuacion");
return 0;
}
if (document.form1.message.value.length==0){
alert("Debe Ingresar un Comentario.");
return 0;
}
document.form1.action = "guarda_calificacion.php?clave={clave}";
document.form1.submit();
}
</script>
<style type="text/css">
#centrado-total ul{
list-style:none;
text-align: center; /*esto pone el ul centrado horiz*/
line-height: 22px; /*esto iguala el height del div y lo centra vertical*/
margin: auto; /*reseteado de márgenes*/
width: 470px; /*tamaño del div */
border:1px solid #000000;
background: #FFC;
font-size: 12px;
}
</style>
</head>
<body>
<br><br>
<form name="form1" method="post" action="guarda_calificacion.php"><div align="center">
<table width="80%" style="border-top-style:solid;border-right-style:solid;border-bottom-style:none;border-left-style:solid;border-top-color:#000000;border-right-color:#000000;border-bottom-color:#000000;border-left-color:#000000;border-top-width: 2px;border-right-width:2px;border-bottom-width:2px;border-left-width:2px;" border="0" cellspacing="0" cellpadding="0">
<tr>
<td background="mas_buscados_titulo_fondo.jpg"><div align="center"><strong>Usa este formulario para calificar a los vendedores</strong></div></td>
</tr>
</table>
<table width="80%" style="border-top-style:none;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:#000000;border-right-color:#000000;border-bottom-color:#000000;border-left-color:#000000;border-top-width: 2px;border-right-width:2px;border-bottom-width:2px;border-left-width:2px;" border="0" bordercolor="#000000" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="23%" bgcolor="#FFE8AC"> </td>
<td width="50%" rowspan="4" bgcolor="#FFE8AC"><p>
<textarea name="message" wrap="physical" cols="60" rows="5"
onKeyDown="textCounter(this.form.message,this.form.remLen,600);"
onKeyUp="textCounter(this.form.message,this.form.remLen,600);" onpaste="return false" oncopy="return false" onKeyPress="return validar(event)" id="message"></textarea>
</p>
<p align="center">caracteres restantes:
<input readonly type="text" name="remLen" size="3" maxlength="3" value="600">
</p></td>
<td width="27%" bgcolor="#FFE8AC"> <input type="radio" name="tipopuntuacion" id="radio" value="+1">
+1</td>
</tr>
<tr>
<td bgcolor="#FFE8AC"><center>
Comentario:
</center> </td>
<td bgcolor="#FFE8AC"><input type="radio" name="tipopuntuacion" id="radio2" value="neutro">
Neutro</td>
</tr>
<tr>
<td rowspan="2" bgcolor="#FFE8AC"> </td>
<td bgcolor="#FFE8AC"> <input type="radio" name="tipopuntuacion" id="radio3" value="-1">
-1</td>
</tr>
<tr>
<td bgcolor="#FFE8AC"> </td>
</tr>
<tr>
<td colspan="3" bgcolor="#FFE8AC"><center>
<input type="submit" name="Enviar" id="Enviar" onClick="valida_envia()" value="Enviar">
<label>
<input type="reset" name="Restablecer" id="Restablecer" value="Restablecer">
</label>
<label>
<input type="button" name="cancelar" id="cancelar" value="Cancelar" onClick="javascript:history.go(-1)" >
</label>
</center></td>
</tr>
</table>
</div>
</form>
SIGUE ABAJO