MOON
Server: Apache/2.2.34 (Unix) mod_ssl/2.2.34 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 FrontPage/5.0.2.2635
System: Linux server.asjudinet.com 2.6.32-042stab141.3 #1 SMP Fri Nov 15 22:45:34 MSK 2019 i686
User: asjudine (504)
PHP: 5.2.17
Disabled: NONE
Upload Files
File: /home/asjudine/public_html/apostventas/modificar_dat_cartera_bene.php
<?php
require_once("../Conectarse.php");
global $dbi;


$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, direccion, telefono, celular, ciudad, email FROM beneficiarios   WHERE cedula = "' . $HTTP_GET_VARS["id"]  . '" ');
if (!$control) {
	die('Invalid query 4 aqui: ' . mysql_error());
}	  
list($ced, $nom, $direccion, $telefono, $celular, $ciudad, $email) = mysql_fetch_row($control);


if(isset($_POST["guardar"]))
{
	$msql = mysql_query("UPDATE  beneficiarios  set direccion = '" . $_POST[direccionc] . "', telefono = '" . $_POST[telefonoc] . "' , celular = '" . $_POST[celularc] . "', ciudad = '" . $_POST[ciudadc] . "', email = '" . $_POST[emailc] . "' WHERE cedula = '" . $HTTP_GET_VARS["id"]  . "' "); 
		 
	if (!$msql) {
		die('Invalid query  1 update: ' . mysql_error());
	}

	$misql = mysql_query('SELECT cedula, nombre, direccion, telefono, celular, ciudad, email FROM beneficiarios  WHERE cedula = "' . $HTTP_GET_VARS["id"]  . '" ');
	if (!$misql) {
		die('Invalid query 4 aqui: ' . mysql_error());
	}

	list($ced, $nom, $direccion, $telefono, $celular, $ciudad, $email) = mysql_fetch_row($misql);


 	echo "<script>alert('La información se ha enviado correctamente ');</script>";
}	  


?>
<html>
<head>
<title>VENTANA PARA MODIFICAR DATOS DEL USUARIO</title>
<meta http-equiv="X-UA-Compatible" content="IE=8; IE=9; IE=edge" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    
<style type="text/css">
	*{margin: 0;padding: 0;}
    body{background-color:#D5D5D5;font-family:Geneva, Arial, Helvetica, sans-serif; text-transform:capitalize;}
    header {background-color: #B7271F; text-align: center;}
    .cerrarsesion{width: auto;background-color: #DBD8C9;color: #000;font-size: 13px;position:absolute;top: 15px;right:10px;z-index:0;padding: 10px;border-radius: 10px;cursor: pointer;}
    .cerrarsesion:hover{background-color: #ffffff;color: #000;}
    .titulo{width: 100%;text-align: center;background-color: #dbd8c9;color: #b20606;padding: 6px 0;font-size: 18px;}
    table{margin: 0 auto;border: 1px solid #bebebe; text-align: center;
	box-shadow: 6px 5px 15px -1px rgba(0,0,0,0.75);}
    .divirmenu{text-align: center;}
    .irmenu{width: 150px;background-color: #1c4fa0;color: #fff; padding: 4px;border-radius: 6px;}
    .irmenu:hover{background-color: #67a0d9; color: #000;}
    
    .fecha{background-color: #d6e08b; padding: 2px;color: #000;font-size: 15px; text-align: center;}
    .tdizq{background-color: #EEE; padding: 1px 2px;color: #00135F;font-size: 14px;font-weight: 300; text-align: left;}
    .tdcen{background-color: #EEE; padding: 1px 2px;color: #00135F;font-size: 14px;font-weight: 300; text-align: center;}
    .tdder{background-color: #EEE; padding: 1px 5px 0 0;color: #00135F;font-size: 14px;font-weight: 300; text-align: right;}
	
	.tdi{background-color: #FDFCC1; padding: 1px 2px;color: #00135F;font-size: 14px;font-weight: 300; text-align: left;}
    .tdc{background-color: #FDFCC1; padding: 1px 2px;color: #00135F;font-size: 14px;font-weight: 300; text-align: center;}
    .tdd{background-color: #FDFCC1; padding: 1px 5px 0 0;color: #00135F;font-size: 14px;font-weight: 300; text-align: right;}
	
	.exp{color:#8A0000; font-size:13px;}
    .boton1{background-color: #ffffff;color: #000;border-radius:3px; padding:2px 6px;}
    .boton1:hover{background-color: #67a0d9; color: #000;}
	.direcciona{height:26px; background-color: #961013;color: #fff;border-radius: 3px; padding:2px 6px; font-size:11px;}
	.direcciona:hover{background-color: #67a0d9; color: #000;}
	.enviar{height:26px; background-color: #266C04;color: #fff;border-radius: 3px; padding:2px 6px; font-size:11px;}
	.enviar:hover{background-color: #67a0d9; color: #000;}
	.rechazo{height:26px; background-color: #040A44;color: #fff;border-radius: 3px; padding:2px 6px; font-size:11px;}
	.rechazo:hover{background-color: #67a0d9; color: #000;}
	
    input[type=text]{border-radius: 5px; padding: 2px;background-color: #FFFEF4;}
	select{border-radius: 5px; padding: 3px;background-color: #FFFEF4;}
	textarea{padding:5px;}
	
	.tdtitulo{background-color: #e3dec0; color: #b20606; padding: 1px; text-align: center; font-size: 11px; font-weight: 700}
    .tdfull{background-color: #fff; color: #000000; padding: 1px; text-align: center; font-size: 12px;}
    .botonnew{width: 90px; height:30px; background-color: #E4E4E4;color: #990000;padding: 1px;border-radius:2px;}
    .botonnew:hover{width: 90px; background-color: #cbbd6a;color: #000;padding: 1px;border-radius:5px;}
	
	.parrafo{color:#C81115; font-size:14px; padding:1px 20px; font-weight:700;}
	.informacion{color:#1A3273; font-size:12px; padding:1px 20px; text-align:justify;}
	.Estilo5{color:#FF2B30;}
	td{border:none;}
</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">
<!--
function validar()
{

  if (formulario.folio2.value == "")
  {
    alert("Falta ingresar el Folio2");
    formulario.folio2.focus();
    return (false);
  }   

	if(formulario.folio2.value < pf)
	{	 
     	   alert('El folio2 no debe ser menor que el folio1');
           formulario.folio2.focus();
           return (false);	
	}	

  if (formulario.actuacion.value == "")
  {
    alert("Falta ingresar la actuación");
    formulario.actuacion.focus();
    return (false);
  }

  if (formulario.codigo_funcionario.value == "")
  {
    alert("Falta seleccionar el nombre del funcionario");
    formulario.codigo_funcionario.focus();
    return (false);
  }

return (true);
}
//--></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()">
<header>
    <img src="../ELEMENTS/bannerInterasjudinet.png" alt="" width=" 700" height="70">
</header>
<h3 class="titulo">MODIFICAR DATOS BENEFICIARIO</h3>

<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 DATOS  BENEFICIARIO</div></td>
  </tr>-->
<tr>
    <td height="3" class="fecha"><div align="center">
      <script languaje="JavaScript">Mostrar_Fecha()</script>
    </div></td>
</tr>

<tr>
	<td height="20"><fieldset>
   <legend><span class="exp">Datos del usuario:</span></legend>
<table width="691" border="1" align="center" cellpadding="2" cellspacing="0" bordercolor="#ECE9D8">
<tr >
	<td class="tdder" width="204">C&eacute;dula (Titular-Beneficiario):</td>
    <td class="tdizq" 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 class="tdder" width="72">Nombre:</td>
    <td class="tdizq" width="211"><input name="nombrec" type="text" class="campo" id="nombrec" value="<?php echo $nom ?>" size="35" maxlength="35" readonly=""> </td>
</tr>

<tr>
	<td class="tdder">Direccion:</td>
    <td class="tdizq" colspan="4"><input name="direccionc" type="text" class="campo" id="direccionc" value="<?php echo $direccion ?>" size="50" maxlength="50" >
  	</td>
</tr>

<tr>
	<td class="tdder">Telefono:</td>
    <td class="tdizq" colspan="4"><input name="telefonoc" type="text" class="campo" id="telefonoc" value="<?php echo $telefono ?>" size="35" maxlength="35"></td>
</tr>

<tr>
	<td class="tdder">Celular:</td>
    <td class="tdizq" colspan="4"><input name="celularc" type="text" class="campo" id="celularc" value="<?php echo $celular ?>" size="25" maxlength="25"></td>
</tr>


<tr>
	<td class="tdder">Ciudad:</td>
    <td class="tdizq" colspan="4"><input name="ciudadc" type="text" class="campo" id="ciudadc" value="<?php echo $ciudad ?>" size="50" maxlength="50"></td>
</tr>

<tr>
	<td class="tdder">E-mail:</td>
    <td class="tdizq" >
    <input name="emailc" type="text" class="campo" id="emailc" value="<?php echo $email ?>" size="40" maxlength="40" ></td>
</tr>
</table> 
</fieldset></td>
</tr>
</table>
<br>
<hr>
<br>
<p align="center" class="parrafo">Para tener un continuo contacto con usted,   actualice su datos y luego haga click en MODIFICAR DATOS </p>

<p align="center" >
 <input name="guardar" type="submit"  class="direcciona"  value ="Modificar Datos" >
</p>


</form>
</body>
</html>