
27/08/2008, 10:34
|
| | Fecha de Ingreso: septiembre-2007
Mensajes: 101
Antigüedad: 17 años, 6 meses Puntos: 0 | |
Respuesta: Borrar asignación SEGUNDA PARTE
include("../conexion.php"); //conectamos para guardar el resultado de la consulta
$link=Conectarse();
$resultConsulta= mysql_query($consulta,$link);
$filas= @mysql_num_rows($resultConsulta);
if ($filas != 0) { // devuelve resultado la consulta ?>
<style type="text/css">
<!--
.Estilo1 {font-weight: bold}
.Estilo2 {color: #ffffcc}
body {
background-color: #ffffcc;
}
.Estilo3 {font-weight: bold; color: #ffffcc; }
.Estilo6 {font-size: 10px}
.Estilo8 {font-size: 10px; color: #592d00; }
.Estilo9 {font-weight: bold; color: #ffffcc; font-size: 12px; }
.Estilo10 {font-size: 12px}
-->
</style>
<form name="form3" method="post" >
<input name="id_horario" id="id_horario" type="hidden" value="">
<input name="id_empleado" id="id_empleado" type="hidden" value="">
<input id="ordena" name="ordena" type="hidden" value="0" />
<input id="parteconsu" name="parteconsu" type="hidden" value="<?echo $parteconsu?>" />
<style type="text/css">
<!--
.Estilo1 {color: #ffffcc}
.Estilo3 {color: #ffffcc; font-weight: bold; }
.Estilo4 {color: #592d00}
-->
</style>
</form>
<form name="form1" method="post" action="listahorarios.php">
<input id="parteconsu" name="parteconsu" type="hidden" value="<?echo $parteconsu?>">
<title>LISTA HORARIOS</title>
<style type="text/css">
<!--
.Estilo1 {color: #ffffcc}
.Estilo3 {color: #ffffcc; font-weight: bold; }
.Estilo4 {color: #592d00}
-->
</style>
<input id="ordena" name="ordena" type="hidden" value="0">
<div id="candidatos" style="position:absolute; left:9px; top:47px; width:772px; height:143px; z-index:5; visibility: visible;" class="Texto" >
<table width="768" border="1" class="capsubmenu">
<tr bgcolor="#9BB3C9">
<td colspan="2" bgcolor="#592d00" class="Estilo1" style="cursor:pointer" onClick="document.form1.ordena.value =17; form1.submit()"><div align="center" class="Estilo2 Estilo3 Estilo10"><strong><strong>Empleado<img src="../imagenes/orden.gif" width="24" height="18"></strong></strong></div></td>
<td width="68" valign="middle" bgcolor="#592d00" class="Estilo1" style="cursor:pointer" onClick="document.form1.ordena.value =5; form1.submit()"><div align="center" class="Estilo2 Estilo3 Estilo10"><strong><strong>F.inicio <img src="../imagenes/orden.gif" width="24" height="18"></strong></strong></div></td>
<td width="63" valign="middle" bgcolor="#592d00" class="Estilo1" style="cursor:pointer" onClick="document.form1.ordena.value =6; form1.submit()"><div align="center" class="Estilo2 Estilo3 Estilo10"><strong><strong>F.fin <img src="../imagenes/orden.gif" width="24" height="18"></strong></strong></div></td>
<td width="51" valign="middle" bgcolor="#592d00" class="Estilo3" style="cursor:pointer" onClick="document.form1.ordena.value =7; form1.submit()"><div align="center" class="Estilo10">H.inicio </div></td>
<td width="46" valign="middle" bgcolor="#592d00" class="Estilo3" style="cursor:pointer" onClick="document.form1.ordena.value =8; form1.submit()"><div align="center" class="Estilo10">H.fin </div></td>
<th width="34" valign="middle" nowrap="nowrap" bgcolor="#592d00" style="cursor:pointer" class="Estilo3" onClick="document.form1.ordena.value =9; form1.submit()"><div align="center" class="Estilo2 Estilo3 Estilo10"><strong><strong>L <img src="../imagenes/orden.gif" width="24" height="18"></strong></strong></div></th>
<th width="38" valign="middle" nowrap="nowrap" bgcolor="#592d00" style="cursor:pointer" class="Estilo3" onClick="document.form1.ordena.value =10; form1.submit()"><div align="center" class="Estilo2 Estilo3 Estilo10"><strong><strong>M <img src="../imagenes/orden.gif" width="24" height="18"></strong></strong></div></th>
<th width="37" valign="middle" nowrap="nowrap" bgcolor="#592d00" style="cursor:pointer" class="Estilo3" onClick="document.form1.ordena.value =11; form1.submit()"><div align="center" class="Estilo2 Estilo3 Estilo10"><strong><strong>X <img src="../imagenes/orden.gif" width="24" height="18"></strong></strong></div></th>
<th width="35" valign="middle" nowrap="nowrap" bgcolor="#592d00" style="cursor:pointer" class="Estilo3" onClick="document.form1.ordena.value =12; form1.submit()"><div align="center" class="Estilo2 Estilo3 Estilo10"><strong><strong>J <img src="../imagenes/orden.gif" width="24" height="18"></strong></strong></div></th>
<th width="40" valign="middle" nowrap="nowrap" bgcolor="#592d00" style="cursor:pointer" class="Estilo3" onClick="document.form1.ordena.value =13; form1.submit()"><div align="center" class="Estilo2 Estilo3 Estilo10"><strong><strong>V <img src="../imagenes/orden.gif" width="24" height="18"></strong></strong></div></th>
<th width="35" valign="middle" nowrap="nowrap" bgcolor="#592d00" style="cursor:pointer" class="Estilo3" onClick="document.form1.ordena.value =14; form1.submit()"><div align="center" class="Estilo2 Estilo3 Estilo10"><strong><strong>S <img src="../imagenes/orden.gif" width="24" height="18"></strong></strong></div></th>
<th width="48" valign="middle" nowrap="nowrap" bgcolor="#592d00" style="cursor:pointer" class="Estilo3" onClick="document.form1.ordena.value =15; form1.submit()"><div align="center" class="Estilo2 Estilo3 Estilo10"><strong><strong>D <img src="../imagenes/orden.gif" width="24" height="18"></strong></strong></div></th>
<th width="55" valign="middle" nowrap="nowrap" bgcolor="#592d00" class="Estilo9" style="cursor:pointer" onClick="document.form1.ordena.value =15; form1.submit()">Borrado</th>
</tr>
<?$sw=0;
$total=0;
$bajas=0;
?>
<?while ($row=mysql_fetch_array($resultConsulta))
{
$total ++;
if($sw==0){?>
<TR class="Estilo8" bgcolor="#DBEEFD" style="cursor:pointer" onClick="document.form3.id_horario.value='<?echo $row[0]?>'; document.form3.submit()" >
<?$sw=0;
}?>
<td colspan="2" background="#ffffcc" bgcolor="#ffffcc">
<span class="Estilo7">
<div align="left"><span class="Estilo6"></a> </span> </div>
<div align="center" class="Estilo8">
<div align="left"><? echo $row["apellido1"]." ". $row["apellido2"]." ". $row[19] ?></div>
</div></td>
<td background="#ffffcc" bgcolor="#ffffcc"><div align="center" class="Estilo8"><? echo cambiaf_a_normal($row["f_inicio"]) ?></div></td>
<td background="#ffffcc" bgcolor="#ffffcc"><div align="center" class="Estilo8"><? echo cambiaf_a_normal($row["f_fin"]) ?></div></td>
<td background="#ffffcc" bgcolor="#ffffcc"><div align="center" class="Estilo8"><? echo $row["h_inicio"] ?></div></td>
<td background="#ffffcc" bgcolor="#ffffcc"><div align="center" class="Estilo8"><? echo $row["h_fin"] ?></div></td>
<td background="#ffffcc" bgcolor="#ffffcc"><div align="center" class="Estilo8"><? echo $row["DL"] ?></div></td>
<td background="#ffffcc" bgcolor="#ffffcc"><div align="center" class="Estilo8"><? echo $row["DM"] ?></div></td>
<td background="#ffffcc" bgcolor="#ffffcc"><div align="center" class="Estilo8"><? echo $row["DX"] ?></div></td>
<td background="#ffffcc" bgcolor="#ffffcc"><div align="center" class="Estilo8"><? echo $row["DJ"] ?></div></td>
<td background="#ffffcc" bgcolor="#ffffcc"><div align="center" class="Estilo8"><? echo $row["DV"] ?></div></td>
<td background="#ffffcc" bgcolor="#ffffcc"><div align="center" class="Estilo8"><? echo $row["DS"] ?></div></td>
<td background="#ffffcc" bgcolor="#ffffcc"><div align="center" class="Estilo8"><? echo $row["DD"] ?></div></td>
<td background="#ffffcc" bgcolor="#ffffcc"><div align="center">
<input name="borrado" type="checkbox" id="borrado" value="S" />
</div></td>
</TR>
<?}?>
<TR>
<TD colspan="14"><p class="Estilo6"> </p>
<div align="center" class="Estilo6"><input name="Volver" type="button" class="boton" id="Volver" onClick="history.back()" value="Nueva Consulta">
<input id="accion" name="accion" type="hidden" value="">
<input id="borra" name="borra" type="hidden" value="">
<button type="button" style="cursor:pointer" name="elimina" title="Elimina el horario del empleado" onclick="document.form1.accion.value='anula';docum ent.form1.id_horario.value='<?echo $id_horario?>';confir_borrado_horario();document.f orm1.submit()"><img src="../imagenes/eliminar.gif" alt="Eliminar horario del empleado" name="eli" id="eli"></button>
</div></TD>
</TR>
</table>
</div>
<?}
else{//************************** NO ENCUENTRA DATOS*********************?>
</form>
<form name="formulariolista" method="post" action="consultahorarios.php">
<script>
alert("NO SE HAN ENCONTRADO HORARIOS.");
</script>
<input name="error" type="hidden" value="<?echo "$error"?>">
<script language="JavaScript">
document.formulariolista.submit();
</script>
</form>
<?}?> |