File: /home/asjudine/public_html/modificar_dat_cartera_err.php
<?php
include ("config.php");
global $dbi;
require_once("Conectarse.php");
$dia = date("d");
$mes = date("m");
$ano = date("Y");
//$misql = mysql_query("select codigo from Usuarios where Cedula = $cf", $dbi);
$misql = mysql_query('SELECT codigo FROM Usuarios WHERE Cedula = "' ."$cf". '" ');
if (!$misql) {
die('Invalid query 4 aqui: ' . mysql_error());
}
if($misql){list($codigo_funcionario) = mysql_fetch_row($misql);}
$control= mysql_query('SELECT cedula, nombre,grado, numerocontrato, tipocontrato, tipo_afiliado, codigo_sucursal, direccion, telefono, celular, ciudad, email,fecha_nacimiento FROM cartera_serviasjudinet WHERE cedula = "' . $_GET["id"] . '" ');
if (!$control) {
die('Invalid query 4 aqui: ' . mysql_error());
}
if ((mysql_num_rows($control)!=0))
{
list($ced, $nom,$grado,$contrato, $tipo, $tipo_afiliado, $codsuc, $direccion, $telefono, $celular, $ciudad, $email,$fecha_nacimiento) = mysql_fetch_row($control);
$nc2 = $contrato;
$tc2 = $tipo;
// $suc = mysql_query("select nombre from sucursal where codigo = '$codsuc'", $dbi);
$suc = mysql_query('SELECT nombre FROM sucursal WHERE codigo = "' ."$codsuc". '" ');
if (!$suc) {
die('Invalid query 4 aqui: ' . mysql_error());
}
if($suc){list($sucursal) = mysql_fetch_row($suc);}
$tres=substr($fecha_actuacion, 0, 2);
$dos=substr($fecha_actuacion, 3, 2);
$uno=substr($fecha_actuacion, 6, 4);
$fecha_actuacion = ($uno."-".$dos."-".$tres);
//////DIVISION DE LA FECHA
$separarfinicio = explode('-',$fecha_nacimiento);
$separarfinicio[0];
$separarfinicio[1];
$dianacimi=$separarfinicio[0];
$mesnacimi=$separarfinicio[1];
/////FINALIZA DIVISION FECHA
}
if(isset($_POST["guardar"]))
{
$msql = mysql_query("UPDATE cartera_serviasjudinet set nombre = '".$_POST['nombrec']."' WHERE cedula = '" . $_GET["id"] . "' ");
if (!$msql) {
die('Invalid query 1 update: ' . mysql_error());
}
echo "<SCRIPT LANGUAGE='javascript'>alert('Datos Actulizados')</SCRIPT>";
}
?>
<html>
<head>
<title>VENTANA PARA MODIFICAR DATOS DEL USUARIO</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
.titulos {font: 16px; color: red; font-family:Arial; font-weight:bold}
.boton { background-color: #FFCCCC; color:#FFFFFF; width:150px; border: 4px solid #0000CC; font-family:Arial; color:#990000;}
.texto {background-color: #CCFFCC; font-size: 13px; font-family: Arial; color:#0000CC; display: block;}
.fecha {background-color: #CCFFCC; font-size: 12px; font-family: Arial; color: #000099; width:10px display: block;}
.campo {background-color: #FFFFCC; border:1px solid #990000; font-family:Arial; font-size:11px; height: inherit}
.lista { background-color:#99FFFF; font-family: Arial; font-size: 11px; color: #990000;}
.label {background-color: #00CCFF ; font-size: 14px; font-family: Arial; color:#0000CC; display: block;}
.area {background-color: #CCFFCC; font-size: 13px; width:40px font-family: Arial; color:#0000CC; display: block;}
.variables {background-color: #CCFFCC; font-size: 12px; font-family: Arial; color: #003333 ; width:10px display: block; border: 2px solid #006633;}
.sel { background-color:#DDFFFF; width:400px; border: 1px solid #0099FF; font-family:Arial; font-style:italic; color:#990000 }
.sel2{ background-color:#DDFFFF; border: 1px solid #0099FF; font-family:Arial; font-style:italic; font-weight:bold; color:#990000 }
.seleccion { background-color: #CCFFCC; width:340px; border: 1px solid #0099FF; font-family:Arial; color:#990000;}
.boton2 {font-family: Verdana; font-size: 8 pt; color: #000080; background-color: #C0C0C0; border-style: solid; }
.letras {background-color: #99CCFF; font-size: 10px; font-family: Arial; color:#0000CC; display: block;}
.campo2 {background-color: #99CCCC; border:1px solid #0066FF; font-family:Arial; font-size:10px; height: inherit}
.sel3{ background-color:#DDFFFF; font-family:Arial; font-size:10px; color: #000066 }
body {
background-image: url(fondo_argollado.gif);
}
.Estilo10 {font-size: 11px; font-family: Arial, Helvetica, sans-serif; }
.Estilo11 {
font-size: 14px;
color: #0066FF;
font-weight: bold;
font-family: "Times New Roman", Times, serif;
}
.Estilo12 {
font-size: 14px;
color: red;
font-weight: bold;
font-family: "Times New Roman", Times, serif;
}
</style>
<script languaje="JavaScript">
function Mostrar_Fecha()
{
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("<b><font face='Arial, Helvetica, sans-serif'>"+dayarray[day]+" "+daym+" de "+montharray[month]+" de "+year+"</font></b>")
}
</script>
<SCRIPT LANGUAGE='JavaScript'>
var default1 = "VENTANA PARA EL INGRESO DE ACTUACIONES"; // only shown once at page load
var text1 = "El primer encabezado muestra en detalle los datos del proceso seleccionado";
var text2 = "la segunda parte muestra el formulario para el ingreso de revistas";
var text3 = "No se le olvide tener en cuenta el nĂºmero del folio que se entrega en el juzgado";
var changeRate = 3000; // 1000 = 1 second
var messageNumber = 0;
function changeStatus()
{
if (messageNumber == 0) {
window.status=default1;
document.title=default1;
}
else if (messageNumber == 1) {
window.status=text1;
}
else if (messageNumber == 2) {
window.status=text2;
}
else if (messageNumber == 3) {
window.status=text3;
messageNumber = 0;
}
messageNumber++;
setTimeout("changeStatus();",changeRate);
}
changeStatus(); // leave here to run right away
// -->
</SCRIPT>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="document.formulario.folio1.focus()">
<form name="formulario" action="" method="post" onSubmit="return validar(this)">
<input name="codigo_funcionario" type="hidden" value="<?php echo $codigo_funcionario; ?>">
<table width="707" border="0" align="center" cellpadding="2" cellspacing="2">
<tr bgcolor="#FFFFCC">
<td width="699" class="titulos"><div align="center">VISUALIZACION DE DATOS SELECCIONADOS</div></td>
</tr>
<tr bgcolor="#ECE9D8">
<td height="3" class="fecha"><div align="center">
<script languaje="JavaScript">Mostrar_Fecha()</script>
</div></td>
</tr>
<tr bgcolor="#FFCC99">
<td height="20" bgcolor="#FFFFFF"><fieldset>
<legend><span class="texto">Datos del usuario:</span></legend>
<table width="691" border="1" align="center" cellpadding="2" cellspacing="0" bordercolor="#ECE9D8">
<tr bgcolor="#FFFFFF">
<td width="204"><span class="label">Cédula (Titular-Beneficiario):</span></td>
<td colspan="2"><input name="cedulac" type="text" class="campo" id="cedulac" value="<?php echo $ced; ?>" size="15" maxlength="15" readonly>
<input name="projuridico" type="hidden" class="campo" id="projuridico" value="<?php echo $np ?>" size="6" maxlength="6"></td>
<td width="72"><span class="label">Nombre:</span></td>
<td width="211"><input name="nombrec" type="text" class="campo" id="nombrec" value="<?php echo $nom ?>" size="35" maxlength="35" required> </td>
</tr>
</span></td>
</tr>
</table>
</fieldset></td>
</tr>
</table>
<p align="center" >
<input name="guardar" type="submit" class="Estilo50" value ="Modificar Datos" >
</p>
</form>
</body>
</html>