Ver Mensaje Individual
  #1 (permalink)  
Antiguo 09/04/2011, 13:46
juancondarts
 
Fecha de Ingreso: julio-2010
Mensajes: 70
Antigüedad: 13 años, 10 meses
Puntos: 0
Mozilla - PHP

Hola, tengo una pagina de ingreso de datos que tiene funciona bien en Chrome, Explorer y Opera pero no funciona en Firefox.
Hay alguna clave para que funcione tambien en el Mozilla ?

El siguiente es el codigo (parte de php), alguien me podrá decir donde esta el error?

Gracias por adelantado
JC


<?php
if (!isset($_SESSION)) {
session_start();
}
$MM_authorizedUsers = "";
$MM_donotCheckaccess = "true";

// *** Restrict Access To Page: Grant or deny access to this page
function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) {
// For security, start by assuming the visitor is NOT authorized.
$isValid = False;

// When a visitor has logged into this site, the Session variable MM_Username set equal to their username.
// Therefore, we know that a user is NOT logged in if that Session variable is blank.
if (!empty($UserName)) {
// Besides being logged in, you may restrict access to only certain users based on an ID established when they login.
// Parse the strings into arrays.
$arrUsers = Explode(",", $strUsers);
$arrGroups = Explode(",", $strGroups);
if (in_array($UserName, $arrUsers)) {
$isValid = true;
}
// Or, you may restrict access to only certain users based on their username.
if (in_array($UserGroup, $arrGroups)) {
$isValid = true;
}
if (($strUsers == "") && true) {
$isValid = true;
}
}
return $isValid;
}

$MM_restrictGoTo = "loginainscripcion.php";
if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {
$MM_qsChar = "?";
$MM_referrer = $_SERVER['PHP_SELF'];
if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
if (isset($QUERY_STRING) && strlen($QUERY_STRING) > 0)
$MM_referrer .= "?" . $QUERY_STRING;
$MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
header("Location: ". $MM_restrictGoTo);
exit;
}
?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO inscripciones (nombretorneo, Apellido, sexo, mail, categoria, arma, sala, maestro, provincia, telefono, Nombre, numdoc, categoria_Fecba, ranking_anual, pais) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['nombretorneo'], "text"),
GetSQLValueString($_POST['Apellido'], "text"),
GetSQLValueString($_POST['sexo'], "text"),
GetSQLValueString($_POST['mail'], "text"),
GetSQLValueString($_POST['categoria'], "text"),
GetSQLValueString($_POST['arma'], "text"),
GetSQLValueString($_POST['sala'], "text"),
GetSQLValueString($_POST['maestro'], "text"),
GetSQLValueString($_POST['provincia'], "text"),
GetSQLValueString($_POST['telefono'], "text"),
GetSQLValueString($_POST['Nombre'], "text"),
GetSQLValueString($_POST['documen'], "text"),
GetSQLValueString($_POST['categoria_Fecba'], "int"),
GetSQLValueString($_POST['ranking_anual'], "int"),
GetSQLValueString($_POST['pais'], "text"));


mysql_select_db($database_ingresotiradores, $ingresotiradores);
$Result1 = mysql_query($insertSQL, $ingresotiradores) or die(mysql_error());
$sufijo = strtoupper(substr($_POST['arma'],0,1)).'-'.ucwords(substr($_POST['categoria'],0,3));


$quien = $row_quienentro['numdoc'];
$insertGoTo = "menuinscripciones.php?id=$quien";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
mysql_select_db($database_ingresotiradores, $ingresotiradores);
$query_Seleccionartorneos = "SELECT * FROM basetorneos WHERE habilitada = 'Y'";
$Seleccionartorneos = mysql_query($query_Seleccionartorneos, $ingresotiradores) or die(mysql_error());
$row_Seleccionartorneos = mysql_fetch_assoc($Seleccionartorneos);
$totalRows_Seleccionartorneos = mysql_num_rows($Seleccionartorneos);

$colname_quienentro = "-1";
if (isset($_GET['id'])) {
$colname_quienentro = $_GET['id'];
}
mysql_select_db($database_ingresotiradores, $ingresotiradores);
$query_quienentro = sprintf("SELECT * FROM basetiradores WHERE numdoc = %s", GetSQLValueString($colname_quienentro, "int"));
$quienentro = mysql_query($query_quienentro, $ingresotiradores) or die(mysql_error());
$row_quienentro = mysql_fetch_assoc($quienentro);
$totalRows_quienentro = mysql_num_rows($quienentro);

mysql_select_db($database_admin_fecba, $admin_fecba);
$query_salas = "SELECT * FROM basesalas ORDER BY basesalas.nombresala";
$salas = mysql_query($query_salas, $admin_fecba) or die(mysql_error());
$row_salas = mysql_fetch_assoc($salas);
$totalRows_salas = mysql_num_rows($salas);