Viewing file: solicitante.php (8.96 KB) -rw-rw-rw- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?
// Configura la información de tu cuenta
$dbhost='192.168.10.3';
$dbusername='jaime';
$dbuserpass='123';
$dbname='pev';
session_start();
// Conexión a la base de datos
$conexion = mysql_connect ($dbhost, $dbusername, $dbuserpass);
mysql_select_db($dbname) or die('Cannot select database');
if (isset($_SESSION['s_username'])) {
//echo "".$_SESSION['s_username']."";
}else{
echo "Tu no estas autentificado dirígete al administrador ";
echo $_SESSION['s_username'];
}
?>
<html>
<head>
<title>Publicidad Exterior Visual -Secretaria Distrital de Ambiente</title>
<link href="css/style.css" rel="stylesheet" type="text/css">
<link href="css/miraflores.css" rel="stylesheet" type="text/css">
</head>
<body text="#000000" bgcolor="#FFFFFF" link="#0000EE" vlink="#551A8B" alink="#FF0000" background="imagenes/107.gif" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<img SRC="imagenes/logo.png" height=111 width=351><img SRC="imagenes/whiteblock2.gif" height=54 width=109>
<br>
<script language="JavaScript"> function escribirCMD(str){ document.CONS.CMD.value = str; if (MM_validateRequireds()) {document.CONS.submit();
} } </script>
<script language="JavaScript"> function escribirLista(str){ document.CONS.CMD.value = str; document.CONS.submit();
} </script><script language="JavaScript" type="text/javascript">
function getRequireds()
{
var vector = new Array();
return vector;
}
</script>
<script language="JavaScript" type="text/javascript">
function MM_jumpMenu(targ,selObj,restore)
{
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore)
selObj.selectedIndex=0;
}
</script>
<script language="JavaScript" src="js/script.js"></script>
<script language="JavaScript" src="js/popcalendar.js"></script>
</p><div onclick="bShow=true" id="calendar" style="z-index: 999; position: absolute; visibility: hidden;"><table style="border: 1px solid rgb(160, 160, 160); font-size: 11px; font-family: arial;" bgcolor="#ffffff" width="250"><tbody><tr bgcolor="#0000aa"><td><table width="248"><tbody><tr>
<td style="padding: 2px; font-family: arial; font-size: 11px;"><font color="#ffffff"><b><span id="caption"><span id="spanLeft" style="border: 1px solid rgb(51, 102, 255); cursor: pointer;" onmouseover='swapImage("changeLeft","left2.gif");this.style.borderColor="#88AAFF";window.status="Haga click para pasar al mes anterior."' onclick="javascript:decMonth()" onmouseout='clearInterval(intervalID1);swapImage("changeLeft","left1.gif");this.style.borderColor="#3366FF";window.status=""' onmousedown='clearTimeout(timeoutID1);timeoutID1=setTimeout("StartDecMonth()",500)' onmouseup="clearTimeout(timeoutID1);clearInterval(intervalID1)"> <img id="changeLeft" src="initservice_files/left1.gif" border="0" height="11" width="10"> </span> <span id="spanRight" style="border: 1px solid rgb(51, 102, 255); cursor: pointer;" onmouseover='swapImage("changeRight","right2.gif");this.style.borderColor="#88AAFF";window.status="Haga click para pasar al siguiente mes."' onmouseout='clearInterval(intervalID1);swapImage("changeRight","right1.gif");this.style.borderColor="#3366FF";window.status=""' onclick="incMonth()" onmousedown='clearTimeout(timeoutID1);timeoutID1=setTimeout("StartIncMonth()",500)' onmouseup="clearTimeout(timeoutID1);clearInterval(intervalID1)"> <img id="changeRight" src="imagenes/right1.gif" border="0" height="11" width="10"> </span> <span id="spanMonth" style="border: 1px solid rgb(51, 102, 255); cursor: pointer;" onmouseover='swapImage("changeMonth","drop2.gif");this.style.borderColor="#88AAFF";window.status="Haga click para seleccionar un mes."' onmouseout='swapImage("changeMonth","drop1.gif");this.style.borderColor="#3366FF";window.status=""' onclick="popUpMonth()"></span> <span id="spanYear" style="border: 1px solid rgb(51, 102, 255); cursor: pointer;" onmouseover='swapImage("changeYear","drop2.gif");this.style.borderColor="#88AAFF";window.status="Haga click para seleccionar un año."' onmouseout='swapImage("changeYear","drop1.gif");this.style.borderColor="#3366FF";window.status=""' onclick="popUpYear()"></span> </span></b></font></td>
<td align="right"><a href="javascript:hideCalendar()"><img src="imagenes/close.gif" alt="Cerrar el calendario" border="0" height="13" width="15"></a></td>
</tr></tbody></table></td></tr><tr><td style="padding: 5px;" bgcolor="#ffffff"><span id="content"></span></td></tr><tr bgcolor="#f0f0f0"><td style="padding: 5px;" align="center"><span id="lblToday">Hoy es <a onmousemove='window.status="Ir al mes actual"' onmouseout='window.status=""' title="Ir al mes actual" style="text-decoration: none; color: black;" href="javascript:monthSelected=monthNow;yearSelected=yearNow;constructCalendar();">Lun, 17 Sep 2007</a></span></td></tr></tbody></table></div><div id="selectMonth" style="z-index: 999; position: absolute; visibility: hidden;"></div><div id="selectYear" style="z-index: 999; position: absolute; visibility: hidden;"></div><script type="text/javascript">
function displayHelp(helpId)
{
mensaje = "?helpId=" + String(helpId);
window.open("/cav2/helpviewerservlet" + mensaje, "", "toolbar=no,scrollbars=yes");
}
</script>
<script language="JavaScript" type="text/JavaScript">
function MM_confirme(unMensaje)
{
var confirmo;
confirmo = confirm(unMensaje);
return confirmo;
}
</script>
<script language="JavaScript" type="text/JavaScript">
function escribirNavBar(str1,str2)
{
document.CONS.NAVBAR.value = str1;
document.CONS.NAVBAR_SECTION_NAME.value = str2;
document.CONS.submit();
}
</script>
<form action='solicitante.php' method='POST'>
<center>
<table BORDER=0 CELLSPACING=0 CELLPADDING=0 COLS=2 WIDTH="100%" >
<tr VALIGN=TOP>
<td VALIGN=TOP WIDTH="177"><img SRC="imagenes/button2.jpg" height=50 width=168><img SRC="imagenes/button2.jpg" height=50 width=168><a href="tecnica.php"><img SRC="imagenes/tecnica.gif" width=168 height=50 border="0"></a><img SRC="imagenes/button3.png" height=50 width=168><a href="consultar.php"><img SRC="imagenes/button2.png" width=168 height=50 border="0"></a></td>
<td>
<table border="3" align="center">
<tr>
<td height="15" class="texto"> <div align="left">NIT</div></td>
<td height="15" class="texto">DIG. DE VERIFICACION</td>
<td width="284" height="15" colspan="2" class="texto"> <div align="left">SOLICITANTE</div></td>
</tr>
<tr>
<td width="153" height="32" class="textohome"> <input name="id" type="text" class="textohome" id="txtNombre7" size="11" maxlength="11" >
</td>
<td width="143" class="textohome"><input name="digito_ver" type="text" class="textohome" id="cc" size="11" maxlength="11" ></td>
<td width="284" height="32" colspan="2" class="texto"> <div align="left">
<input name="nombre_emp" type="text" class="textohome" id="notificacion" size="30">
</div></td>
</tr>
<tr>
<td height="15" colspan="2" class="texto"> <div align="left">DIRECCION</div></td>
<td width="284" height="15" colspan="2" class="texto"> <div align="left">TELEFONO</div></td>
</tr>
<tr>
<td height="32" colspan="2" class="textohome"> <textarea name="direccion_emp" cols="30" class="textohome" id="textarea"></textarea></td>
<td width="284" height="32" colspan="2" class="texto"> <div align="left">
<input name="telefono_emp" type="text" class="textohome" id="telefono_emp" size="12" maxlength="15">
</div></td>
</tr>
<tr>
<td colspan="3" class="texto"> <div align="right">
<input name="inserta" type="submit" class="textohome" id="inserta" value="Ingresar" size="12" maxlength="15" align="right">
</div></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td></td>
<td><img SRC="imagenes/whiteblock2.gif" height=2 width=536></td>
</tr>
</table>
</form>
<? if( $inserta ){
$sql = "select * from empresa where id ='$id'";
echo"$sql";
$cursor = mysql_query( $sql, $conexion );
if( mysql_fetch_array( $cursor ) )
echo "<h3> Ya existe $nombre_emp ....</h3> ";
else{
$sql = "insert into empresa values ('$id','$digito_ver','$nombre_emp','$direccion_emp','$telefono_emp')";
echo"$sql";
if( mysql_query ( $sql, $conexion ) ){
echo "<h3> Registro ingresado....</h3>
<td width='10'>
<table width='75%' border='4' cellspacing='10' cellpadding='5'>
<tr>
<td>$id</td>
<td>$digito_ver</td>
<td>$nombre_emp</td>
<td>$direccion_emp</td>
<td>$telefono_emp</td>
</tr>
</table>
</td>
</tr>";
}
}
}
?>
</body>
</html>
|