Saludos / hi,,
Localizar en : / Locate in : encuestas.php
$opinar = $lang['opinar'];
Añadir debajo : / Insert below :
setcookie("actualizar");
Localizar en : / Locate in : encuestas_resultados.php
$maximas_opciones = $lang['maximas_opciones'];
Añadir debajo : / Insert below :
$actualizar = $HTTP_COOKIE_VARS["actualizar"];
Localizar : / Locate :
FOR ($grabar=1;$grabar<=$maximas_opciones;$grabar++){
if ($eleccion == $grabar ){
$valor_es[$grabar] = $valor[$grabar][$ultimo_registro];
$votacion[$grabar] = $votos[$grabar][$ultimo_registro] + 1;
}
else {
$valor_es[$grabar] = $valor[$grabar][$ultimo_registro];
$votacion[$grabar] = $votos[$grabar][$ultimo_registro];
}
}
Cambiar a : / Change to :
FOR ($grabar=1;$grabar<=$maximas_opciones;$grabar++){
if ($eleccion == $grabar ){
$valor_es[$grabar] = $valor[$grabar][$ultimo_registro];
if ($actualizar == ""){
$votacion[$grabar] = $votos[$grabar][$ultimo_registro] + 1;}
else
{
$votacion[$grabar] = $votos[$grabar][$ultimo_registro];}
}
else
{
$valor_es[$grabar] = $valor[$grabar][$ultimo_registro];
$votacion[$grabar] = $votos[$grabar][$ultimo_registro];
}
}
Localizar : / Locate :
$register_array = array();
$sql = "UPDATE ".ENCUESTAS_TABLE."
SET orden = '$orden[$ultimo_registro]', nombre = '$nombre[$ultimo_registro]', visitante = '$visitante[$ultimo_registro]',
plazo_votacion = '$plazo_votacion[$ultimo_registro]', fecha_inicio = '$fecha_inicio[$ultimo_registro]', fecha_cierre = '$fecha[$ultimo_registro]',
opcion_1 = '$valor_es[1]', votos_1 = '$votacion[1]',
opcion_2 = '$valor_es[2]', votos_2 = '$votacion[2]',
opcion_3 = '$valor_es[3]', votos_3 = '$votacion[3]',
opcion_4 = '$valor_es[4]', votos_4 = '$votacion[4]',
opcion_5 = '$valor_es[5]', votos_5 = '$votacion[5]',
opcion_6 = '$valor_es[6]', votos_6 = '$votacion[6]',
opcion_7 = '$valor_es[7]', votos_7 = '$votacion[7]',
opcion_8 = '$valor_es[8]', votos_8 = '$votacion[8]',
opcion_9 = '$valor_es[9]', votos_9 = '$votacion[9]',
opcion_10 = '$valor_es[10]', votos_10 = '$votacion[10]'
WHERE orden = '$orden[$ultimo_registro]'";
$site_db->query($sql);
}
Cambiar a : / Change to :
if ($actualizar == ""){
$register_array = array();
$sql = "UPDATE ".ENCUESTAS_TABLE."
SET orden = '$orden[$ultimo_registro]', nombre = '$nombre[$ultimo_registro]', visitante = '$visitante[$ultimo_registro]',
plazo_votacion = '$plazo_votacion[$ultimo_registro]', fecha_inicio = '$fecha_inicio[$ultimo_registro]', fecha_cierre = '$fecha[$ultimo_registro]',
opcion_1 = '$valor_es[1]', votos_1 = '$votacion[1]',
opcion_2 = '$valor_es[2]', votos_2 = '$votacion[2]',
opcion_3 = '$valor_es[3]', votos_3 = '$votacion[3]',
opcion_4 = '$valor_es[4]', votos_4 = '$votacion[4]',
opcion_5 = '$valor_es[5]', votos_5 = '$votacion[5]',
opcion_6 = '$valor_es[6]', votos_6 = '$votacion[6]',
opcion_7 = '$valor_es[7]', votos_7 = '$votacion[7]',
opcion_8 = '$valor_es[8]', votos_8 = '$votacion[8]',
opcion_9 = '$valor_es[9]', votos_9 = '$votacion[9]',
opcion_10 = '$valor_es[10]', votos_10 = '$votacion[10]'
WHERE orden = '$orden[$ultimo_registro]'";
$site_db->query($sql);
}
}
Localizar : / Locate :
FOR ($calculo=1;$calculo<=$maximas_opciones;$calculo++){
$valor_es[$calculo] = $valor[$calculo][$ultimo_registro];
$votacion[$calculo] = $votos[$calculo][$ultimo_registro];
$total_votos = $total_votos + $votacion[$calculo];
}
Cambiar a : /Change to :
FOR ($calculo=1;$calculo<=$maximas_opciones;$calculo++){
$total_votos = $total_votos + $votacion[$calculo];
}
Localizar : / Locate :
$site_template->print_template($site_template->parse_template($main_template));
include(ROOT_PATH.'includes/page_footer.php');
Cambiar a : / Change to
setcookie("actualizar","1");
$site_template->print_template($site_template->parse_template($main_template));
include(ROOT_PATH.'includes/page_footer.php');
excitex2