Foros del Web » Programando para Internet » PHP »

modificar registro cuando se muestra en "REPETIR REGION"

Estas en el tema de modificar registro cuando se muestra en "REPETIR REGION" en el foro de PHP en Foros del Web. como lo dice el titulo yo muestro un monton de personal que tengo registrado en mi base de datos y lo ago con repetir region ...
  #1 (permalink)  
Antiguo 09/11/2009, 14:30
 
Fecha de Ingreso: noviembre-2007
Mensajes: 49
Antigüedad: 16 años, 4 meses
Puntos: 0
modificar registro cuando se muestra en "REPETIR REGION"

como lo dice el titulo yo muestro un monton de personal que tengo registrado en mi base de datos y lo ago con repetir region de Dreamweaver, ahora mi idea es pasar la asistencia por lo cual yo isea otra tabla denominada "asistencia" en la cual en esta ire poniendo la fecha del dia correspondiente y una x si asistio o f si fallo pero no lo logro hacer me podrian ayudar??? para que entiendan un poco mejor les dejo mi codigo

Código PHP:
<?php require_once('Connections/cfl.php'); ?>
<?php
function GetSQLValueString($theValue$theType$theDefinedValue ""$theNotDefinedValue ""
{
  
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $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"] == "asistencia")) {
  
$insertSQL sprintf("INSERT INTO asistencia (fecha, asisten, id_personal) VALUES (%s, %s, %s)",
                       
GetSQLValueString($_POST['fecha'], "text"),
                       
GetSQLValueString($_POST['asisten'], "text"),
                       
GetSQLValueString($_POST['id_personal'], "text"));

  
mysql_select_db($database_cfl$cfl);
  
$Result1 mysql_query($insertSQL$cfl) or die(mysql_error());
}

$maxRows_personal 10;
$pageNum_personal 0;
if (isset(
$_GET['pageNum_personal'])) {
  
$pageNum_personal $_GET['pageNum_personal'];
}
$startRow_personal $pageNum_personal $maxRows_personal;

mysql_select_db($database_cfl$cfl);
$query_personal "SELECT * FROM personal";
$query_limit_personal sprintf("%s LIMIT %d, %d"$query_personal$startRow_personal$maxRows_personal);
$personal mysql_query($query_limit_personal$cfl) or die(mysql_error());
$row_personal mysql_fetch_assoc($personal);

if (isset(
$_GET['totalRows_personal'])) {
  
$totalRows_personal $_GET['totalRows_personal'];
} else {
  
$all_personal mysql_query($query_personal);
  
$totalRows_personal mysql_num_rows($all_personal);
}
$totalPages_personal ceil($totalRows_personal/$maxRows_personal)-1;
?><head>
<script language='javascript' src="popcalendar.js"></script> 
<title>Inicio de Actividades</title>
<style type="text/css">
<!--
.Estilo1 {font-size: 36px}
body {
    background-color: #000000;
}
.Estilo6 {font-size: 11px; font-style: italic; }
.Estilo7 {font-size: 12px; font-style: italic; }
.Estilo8 {font-size: 12px}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
<body>
        <center>
          <table width="949" border="0" align="center" bgcolor="#FFFFFF">
           <tr>
             <td><table width="100%" border="0">
                 <tr>
                   <td width="286"><img src="imagenes/logo cfl.JPG" width="391" height="195" /></td>
                   <td><div align="center"><span class="Estilo1">Terrazas de Huechuraba </span></div></td>
                 </tr>
             </table></td>
           </tr>
           <tr>
             <td height="326" valign="top"><table width="369" border="0">
                 <tr>
                   <td width="52"><a href="index.php">Inicio</a></td>
                   <td width="150"><a href="cactividades.php">Cese de actividades </a></td>
                   <td width="153"><a href="resumenpersonal.php">Resumen de personal </a></td>
                 </tr>
               </table>
               <p>&nbsp;</p>
               <form action="<?php echo $editFormAction?>" method="POST" name="asistencia" id="asistencia">
                 <table width="90%" align="center" cellpadding="0" cellspacing="0">
                   <col width="27" />
                   <col width="142" />
                   <col width="80" span="2" />
                   <col width="85" />
                   <tr height="18">
                     <td width="144">PATERNO</td>
                     <td width="132">NOMBRES</td>
                     <td width="99">RUT</td>
                     <td width="113">CARGO</td>
                     <td width="129">F,ING<span class="Estilo6">
                       <input name="fecha" type="hidden" id="fecha" value="&lt;script languaje=&quot;JavaScript&quot;&gt; ">
                     </span></td>
                     <td width="230"><script languaje="JavaScript"> 

var mydate=new Date() 
var year=mydate.getYear() 
if (year < 1000) 
year+=1900 
var day=mydate.getDay() 
var month=mydate.getMonth() 
var daym=mydate.getDate() 
if (daym<10) 
daym="0"+daym 
var dayarray=new Array("Domingo","Lunes","Martes","Miercoles","Jueves","Viernes","Sabado") 
var montharray=new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre") 
document.write("<small><font color='000000' face='Arial'>"+dayarray[day]+" "+daym+" de "+montharray[month]+" de "+year+"</font></small>") 

                 </script>                     </td>
                   </tr>
                   <?php do { ?>
                   <tr height="18">
                     <td height="19" align="right"><div align="left" class="Estilo7"><?php echo $row_personal['apellidos']; ?>
                       <input name="id_personal" type="hidden" id="id_personal" value="<?php echo $row_personal['id']; ?>">
                     </div></td>
                     <td height="18"><span class="Estilo7"><?php echo $row_personal['nombres']; ?></span></td>
                     <td height="18"><span class="Estilo7"><?php echo $row_personal['rut']; ?></span></td>
                     <td height="18" align="right"><div align="left" class="Estilo7"><?php echo $row_personal['labor']; ?></div></td>
                     <td height="18" align="right"><div align="left" class="Estilo7"><?php echo $row_personal['fingreso']; ?></div></td>
                     <td align="center"><span class="Estilo8">
                     <label>
                     </span>
                       <div align="center" class="Estilo8">
                         <input name="asisten" type="text" id="asisten" size="10">
                     </div>                       
                       <span class="Estilo8">
                       </label>
                     </span></td>
                   </tr>
                     <?php } while ($row_personal mysql_fetch_assoc($personal)); ?>
                 </table>
                 <input type="hidden" name="MM_insert" value="asistencia">
<label>
                 <input type="submit" name="Submit" value="Enviar">
               </label>
               </form>
             <p>&nbsp;</p></td>
           </tr>
         </table>
        </center>
<?php
mysql_free_result
($personal);
?>
desde ya Muchas Gracias
  #2 (permalink)  
Antiguo 10/11/2009, 13:29
 
Fecha de Ingreso: noviembre-2007
Mensajes: 49
Antigüedad: 16 años, 4 meses
Puntos: 0
Respuesta: modificar registro cuando se muestra en "REPETIR REGION"

aun nadien puede ayudarme????? tan dificil es lo que pido ????
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 07:33.