Ver Mensaje Individual
  #1 (permalink)  
Antiguo 27/06/2011, 20:08
nandosoftware
 
Fecha de Ingreso: mayo-2011
Ubicación: españa
Mensajes: 10
Antigüedad: 12 años, 11 meses
Puntos: 0
Parse error,que falta?? no lo veo...

Hola a todos!
Me da error PARSE ERROR sintax....pero o veo el que.me podeis ayudar?
Codigo:
Código PHP:
<?php
require_once('F_design.php');
$MM_authorizedUsers "";
$MM_donotCheckaccess "true";

// *** Restringir el acceso a la página: Conceder o negar el acceso a esta página
function isAuthorized($strUsers$strGroups$UserName$UserGroup) { 
  
// Para mayor seguridad, empezar por asumir que el visitante no está autorizado.
  
$isValid False

  
// Cuando un visitante se ha registrado en este sitio, la variable de sesión MM_Username igual a su nombre de usuario.
   // Por lo tanto, sabemos que un usuario no se registra en el caso de que la variable de sesión está en blanco.
  
if (!empty($UserName)) { 
   
// Además de ser conectado, es posible restringir el acceso sólo a determinados usuarios sobre la base de un identificador creado cuando se inicia sesión.
     // Analizar las cuerdas en los arrays. 
    
$arrUsers Explode(","$strUsers); 
    
$arrGroups Explode(","$strGroups); 
    if (
in_array($UserName$arrUsers)) { 
      
$isValid true
    } 
    
// O bien, puede restringir el acceso sólo a ciertos usuarios en base a su nombre de usuario.
    
if (in_array($UserGroup$arrGroups)) { 
      
$isValid true
    } 
    if ((
$strUsers == "") && true) { 
      
$isValid true
    } 
  } 
  return 
$isValid
}

$MM_restrictGoTo "noautorizado.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;
}

//Cogemos los datos
$FILAS_POR_PAGINA 1;
$pagina = (isset($_GET["pagina"]))?$_GET["pagina"]:0;
if (isset(
$_GET["fecha_inicio"]))
{
  
$trozos explode("-",$_GET["fecha_inicio"]);
  
$fecha_inicio $trozos[2] . "-" $trozos[1] . "-" $trozos[0];
  
$fecha_inicio_str $_GET["fecha_inicio"];
}
else
{
  
$fecha_inicio "2010-01-01";
  
$fecha_inicio_str "2010-01-01";
}

if (isset(
$_GET["fecha_fin"]))
{
  
$trozos explode("-",$_GET["fecha_fin"]);
  
$fecha_fin $trozos[2] . "-" $trozos[1] . "-" $trozos[0];
  
$fecha_fin_str $_GET["fecha_fin"];
}
else
{
  
$fecha_fin date("yy-mm-dd");
  
$fecha_fin_str date("yy-mm-dd");
}

if (isset(
$_POST)) {
  
mysql_select_db($database_turno$turno);

  
$offset = ($FILAS_POR_PAGINA*$pagina);
  
$query=sprintf("SELECT * FROM diario WHERE FECHA>='%s' AND FECHA<='%s' LIMIT $FILAS_POR_PAGINA OFFSET $offset",
    
get_magic_quotes_gpc() ? $fecha_inicioaddslashes($fecha_inicio), get_magic_quotes_gpc() ? $fecha_fin addslashes($fecha_fin));
  
  
$result mysql_query($query$turno) or die(mysql_error());
  
$query=sprintf("SELECT * FROM diario WHERE FECHA>='%s' AND FECHA<='%s'",
    
get_magic_quotes_gpc() ? $fecha_inicioaddslashes($fecha_inicio), get_magic_quotes_gpc() ? $fecha_fin addslashes($fecha_fin));
  
$resultados mysql_query($query$turno) or die(mysql_error());
}
$readonly "readonly=\"readonly\"";
izq();
?>
<h1 align="center">Buscar registros anteriores </h1>
<form action=""><?php=$_SERVER["PHP_SELF"]?>
<table width="300px" align="center">
    <tr>
        <td><b>Fecha de inicio:</b></td>
        <td><input type="text" id="fecha_inicio" name="fecha_inicio"<?php=$fecha_inicio_str?>></td>
    </tr>
    <tr>
        <td><b>Fecha de fin:</b></td>
        <td><input type="text" id="fecha_fin" name="fecha_fin"<?php=$fecha_fin_str?>></td>
    </tr>
    <tr>
        <td align="center" colspan="2"><input type="submit" name="boton" value="Buscar" /></td>
    </tr></table>
</form>

<br />
<br />
<table class="resultados" align="center">
    <tr class="no-borde">
    <?php //con este php desaparece el texto entre los botones y el formulario.
    
if ($pagina>0) echo "<td><a class=\"boton\" href=\"buscar.php?pagina=".($pagina-1)."&fecha_inicio=".$fecha_inicio_str."&fecha_fin=".$fecha_fin_str."\">Anterior</a></td>\n";
    else echo 
"<td>&nbsp;</td>";
    echo 
"<td>&nbsp;</td>";
    if (
$FILAS_POR_PAGINA*($pagina+1) < mysql_num_rows($resultados)) echo "<td><a class=\"boton\" href=\"buscar.php?pagina=".($pagina+1)."&fecha_inicio=".$fecha_inicio_str."&fecha_fin=".$fecha_fin_str."\">Siguiente</a></td>\n";
    else echo 
"<td>&nbsp;</td>";
    
?>
    </tr>
</table>

 <?php while ($datos mysql_fetch_array($resultMYSQL_BOTH)) {
   
//Convertimos la fecha a un formato legible
   
$fecha explode("-",$datos["FECHA"]);
   
$fecha_str $fecha[2] . "-" $fecha[1] . "-" $fecha[0];
   
?>
  <table align="center">
    <tr valign="baseline">
      <td nowrap align="right">FECHA:</td>
      <td align="left"><?php=$fecha_str?></td>
    </tr>
    <tr valign="baseline">
      <td nowrap align="right">TURNO:</td>
      <td align="left"><?php=$datos["TURNO"]?>
      </td>
    </tr>
    <tr valign="baseline">
      <td nowrap align="right" valign="top">LINEA 1-2:</td>
      <td align="left"><textarea name="LINEA12" cols="80" rows="8" <?php=$readonly?>></textarea></td>
    </tr>
    <tr valign="baseline">
      <td nowrap align="right" valign="top">LINEA 3-4:</td>
      <td align="left"><textarea name="LINEA34" cols="80" rows="8" <?php=$readonly?>></textarea></td>
    </tr>
    <tr valign="baseline">
      <td nowrap align="right" valign="top">CF-SS</td>
      <td align="left"><textarea name="CFSS" cols="80" rows="8" <?php=$readonly?>></textarea></td>
    </tr>
    <tr valign="baseline">
      <td nowrap align="right" valign="top">CF-FV:</td>
      <td align="left"><textarea name="CFFV" cols="80" rows="8" <?php=$readonly?>></textarea></td>
    </tr>
    <tr valign="baseline">
      <td nowrap align="right" valign="top">CF-HP/PHP/CF-AH:</td>
      <td align="left"><textarea name="CFHPPHPCFAH" cols="80" rows="8" <?php=$readonly?>></textarea></td>
    </tr>
    <tr valign="baseline">
      <td nowrap align="right" valign="top">USRD/USCC/E.A.LAM:</td>
      <td align="left"><textarea name="USRDUSCCEALAM" cols="80" rows="8" <?php=$readonly?>></textarea></td>
    </tr>
    <tr valign="baseline">
      <td nowrap align="right" valign="top">CF-PL2:</td>
      <td align="left"><textarea name="CFPL2" cols="80" rows="8" <?php=$readonly?>></textarea></td>
    </tr>
    <tr valign="baseline">
      <td nowrap align="right" valign="top">3FPL/3FFV:</td>
      <td align="left"><textarea name="3FPL3FFV" cols="80" rows="8" <?php=$readonly?>></textarea></td>
    </tr>
    <tr valign="baseline">
      <td nowrap align="right" valign="top">C+C/I+D+I/FT:</td>
      <td align="left"><textarea name="CCIDIFT" cols="80" rows="8" <?php=$readonly?>></textarea></td>
    </tr>
    <tr valign="baseline">
      <td nowrap align="right" valign="top">EDAR:</td>
      <td align="left"><textarea name="EDAR" cols="80" rows="8" <?php=$readonly?>></textarea></td>
    </tr>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right" valign="top">SERV/MANNTO:</td>
      <td align="left"><textarea name="SERVMANNTO" cols="80" rows="8" <?php=$readonly?>></textarea></td>
    </tr>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right">SOSA:</td>
      <td align="left"><input type="text" name="SOSA" <?php=$readonly?><?php=$datos["SOSA"]?>></td>
    </tr>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right">ALGIBE</td>
      <td align="left"><input type="text" name="ALGIBE" <?php=$readonly?><?php=$datos["ALGIBE"]?>></td>
    </tr>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right">D-7001:</td>
      <td align="left"><input type="text" name="D7001" <?php=$readonly?><?php=$datos["D7001"]?>></td>
    </tr>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right">D-417:</td>
      <td align="left"><input type="text" name="D417" <?php=$readonly?><?php=$datos["D-417"]?>></td>
    </tr>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right">GRUPOS DE FRIO :</td>
      <td align="left"><input type="text" name="GRUPOSDEFRIO" <?php=$readonly?><?php=$datos["GRUPOSDEFRIO"]?>></td>
    </tr>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right">CLORO :</td>
      <td align="left"><input type="text" name="CLORO" <?php=$readonly?><?php=$datos["CLORO"]?>></td>
    </tr>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right">ENTRANTE:</td>
      <td align="left"><input type="text" name="ENTRANTE" <?php=$readonly?><?php=$datos["ENTRANTE"]?>></td>
    </tr>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right">SALIENTE:</td>
      <td align="left"><input type="text" name="SALIENTE" <?php=$readonly?><?php=$datos["SALIENTE"]?>></td>
    </tr>
    <tr valign="baseline">
      <td nowrap align="right">V&ordm;B&ordm; JEFE MANTTO.:</td>
      <td align="left"><input type="checkbox" <?php if ($datos["VBJEFEMANNTO"]!="") echo "checked=\"checked\""?> <?php if ($readonly!="") echo "disabled=\"disabled\""?>></td>
    </tr>
</table>
<?php}?>
<script>
    $(function(){
        $('#fecha_inicio').datepicker({dateFormat:'yy-mm-dd'});
        $('#fecha_fin').datepicker({dateFormat:'yy-mm-dd'});
    });
</script>
<?php
der
();?>