Beispiel #1
0
<?php 
include 'funciones.php';
include 'validaciones.php';
include '../mails.php';
if (!$campo) {
    $campo = 'turno';
}
?>
   
<body topmargin="0" rightmargin="0" leftmargin="0" bottommargin="0" onLoad="poner_foco('<?php 
echo $campo;
?>
');">   

<?php 
menu_scrap($folio);
switch ($op) {
    case "editar_1":
        $s_1 = "delete from scrap_partes_tmp where id_emp='{$_SESSION['IDEMP']}'";
        $r_1 = mysql_query($s_1);
        $s_ = "select * from scrap_partes where no_folio='{$folio}'";
        $r_ = mysql_query($s_);
        while ($d_ = mysql_fetch_array($r_)) {
            $s_1 = "insert into scrap_partes_tmp values('','{$d_['padre']}','{$d_['no_parte']}','{$d_['tipo']}','{$d_['tipo_sub']}', ";
            $s_1 .= "'{$d_['descripcion']}', '{$d_['cantidad']}', '{$d_['costo']}', '{$d_['total']}', '{$d_['batch_id']}', ";
            $s_1 .= "'{$d_['serial_unidad']}', '{$d_['ubicacion']}', '{$_SESSION['IDEMP']}')";
            $r_1 = mysql_query($s_1);
        }
        editar($folio, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', $from, '', '');
        break;
    case "editar":
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
	<td width="5" valign="top"></td><td></td><td width="5"></td>
</tr>
<tr height="600" valign="top">
    <td background="../imagenes/borde_izq_tabla.png">&nbsp;</td>
    <td>&nbsp;
		<!--Todo el contenido de cada página--->
		<?php 
switch ($op) {
    case "nuevo":
        menu_scrap();
        nuevo($comentario, $accion_correctiva);
        break;
    case "guardar_1":
        menu_scrap();
        guardar_1($partes, $partes_name, $comentario, $accion_correctiva);
        break;
    case "cancelar":
        $s_ = "delete from scrap_folios_tmp where id_emp='{$_SESSION['IDEMP']}'";
        $r_ = mysql_query($s_);
        $s_ = "delete from scrap_codigos_tmp where id_emp='{$_SESSION['IDEMP']}'";
        $r_ = mysql_query($s_);
        $s_ = "delete from scrap_partes_35 where id_emp='{$_SESSION['IDEMP']}'";
        $r_ = mysql_query($s_);
        nuevo($comentario, $accion_correctiva);
        break;
    case "guardar":
        guardar();
        $s_ = "delete from scrap_partes_35 where id_emp='{$_SESSION['IDEMP']}'";
        $r_ = mysql_query($s_);