Viewing file: registro_oferta.php (25.84 KB) -rw-rw-rw- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
//prevents caching
header("Expires: Sat, 01 Jan 2000 00:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: post-check=0, pre-check=0",false);
session_cache_limiter();
session_start();
require('config.php');
require('functions.php');
//this is group name or username of the group or person that you wish to allow access to
// - please be advise that the Administrators Groups has access to all pages.
if (allow_access(gestores) != "yes")
{
include ('no_access.php');
exit;
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML>
<HEAD>
<TITLE>Secretaría Distrital de Ambiente</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
<script type="text/javascript">
_uacct = "UA-1458662-7";
urchinTracker();
</script>
<script language="JavaScript">
function validar(){
if ( (document.registro.dependencia[0].checked == false ) && (document.registro.dependencia[1].checked == false ) ){
alert("Seleccione si es territorio o localidad");
return false;
}
if ( (document.registro.dependencia[0].checked == true ) && (document.registro.territorio.value==0))
{
alert("Seleccione un territorio");
return false;
}
if ( (document.registro.dependencia[1].checked == true ) && (document.registro.localidad.value==0))
{
alert("Seleccione una localidad");
return false;
}
if(document.registro.oficina.value==""){
alert("Por favor ingrese el nombre de la oficina que provee la informacion");
document.registro.oficina.focus();
document.registro.oficina.style.backgroundColor="yellow";
return false;
}
if(document.registro.diagnostico.value==""){
alert("Por favor ingrese el diagnostico");
document.registro.diagnostico.focus();
document.registro.diagnostico.style.backgroundColor="yellow";
return false;
}
if(document.registro.avances.value==""){
alert("Por favor ingrese los avances");
document.registro.avances.focus();
document.registro.avances.style.backgroundColor="yellow";
return false;
}
if(document.registro.impactos.value==""){
alert("Por favor ingrese los impactos");
document.registro.impactos.focus();
document.registro.impactos.style.backgroundColor="yellow";
return false;
}
if(document.registro.dificultades.value==""){
alert("Por favor ingrese la identificación NIT o cédula");
document.registro.dificultades.focus();
document.registro.dificultades.style.backgroundColor="yellow";
return false;
}
if(document.registro.humanos.value==""){
alert("Por favor ingrese los recursos humanos");
document.registro.humanos.focus();
document.registro.humanos.style.backgroundColor="yellow";
return false;
}
if(document.registro.tecnicos.value==""){
alert("Por favor ingrese los impactos tecnicos");
document.registro.tecnicos.focus();
document.registro.tecnicos.style.backgroundColor="yellow";
return false;
}
if(document.registro.logisticos.value==""){
alert("Por favor ingrese los impactos logisticos");
document.registro.logisticos.focus();
document.registro.logisticos.style.backgroundColor="yellow";
return false;
}
if(document.registro.tecnologicos.value==""){
alert("Por favor ingrese los impactos tecnologicos");
document.registro.tecnologicos.focus();
document.registro.tecnologicos.style.backgroundColor="yellow";
return false;
}
if(document.registro.economicos.value==""){
alert("Por favor ingrese los impactos economicos");
document.registro.economicos.focus();
document.registro.economicos.style.backgroundColor="yellow";
return false;
}
if(document.registro.observaciones.value==""){
alert("Por favor ingrese las observaciones");
document.registro.observaciones.focus();
document.registro.observaciones.style.backgroundColor="yellow";
return false;
}
return true;
}
function habilitar_territorio()
{
var form = document.registro;
form.territorio.disabled = false;
form.localidad.disabled = true;
}
function habilitar_localidad()
{
var form = document.registro;
form.localidad.disabled = false;
form.territorio.disabled = true;
}
</script>
<style type="text/css">
body{ margin:0px; background-color:#EFEEEA;}
a{ text-decoration:none}
a:hover{ text-decoration:underline}
fieldset { -moz-border-radius: 8px; border-radius: px; padding:5px; }
.fuente{ font-family:verdana, Helvetica, sans-serif; font-size:11px; color:#666666; font-weight:normal; padding:4px}
.blanco {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: bolder;
color: #FFFFFF;
background-color: #999999;
}
a{ color:#006699;}
a.fuentewhite{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
color: #FFFFFF; text-decoration:none; padding-left:5px; padding-right:5px;
}
a.fuentewhite:hover{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
color: #FFFFcc; text-decoration:underline; padding-left:5px
}
#caja {font-family: verdana, arial; font-size:11px; border:1px solid #999999}
.amarillo{background-image:url(images/yell.jpg); background-repeat:repeat-x}
.style1 {color: #FFFFFF}
.negra1{font-family: verdana, arial; font-size:11px}
fieldset{border: 1px solid #ccc;}
-->
</style>
</HEAD>
<BODY>
<table border="0" cellpadding="0" cellspacing="0" align="center" width="928"><tr><td style="background-image:url(http://www.secretariadeambiente.gov.co/sda/libreria/jpg/new/fondoleft.jpg); background-repeat:repeat-y" width="14"></td>
<td><TABLE width="900" border=0 align="center" cellPadding=0 cellSpacing=0>
<TBODY>
<TR>
<TD bgColor=#7DB5C6 style="background-image:url(/sda/libreria/jpg/top08.jpg); background-repeat:no-repeat;" width="900" height="90" valign="bottom"><div align="right"><A href="/" class="fuentewhite">Inicio</A>
| <A href="http://www.secretariadeambiente.gov.co/sda/libreria/php/decide.php?patron=00.01" class="fuentewhite">Mapa
del Sitio</A> | <A href="http://192.168.10.3/php/reqintranet.php" class="fuentewhite">Intranet
SDA</A></div></TD>
</TR>
<TR>
<TD align=left vAlign=top bgColor=#000000><TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD width="73%" bgColor=#669966 background="http://www.secretariadeambiente.gov.co/sda/libreria/jpg/new/bg2.gif"><img src="http://www.secretariadeambiente.gov.co/sda/libreria/gif/bar2.gif" width="518" height="30" border="0" usemap="#Map"></TD>
<form name="form1" method="post" action="http://www.secretariadeambiente.gov.co/sda/libreria/php/frame_buscar.php">
<TD width="27%" bgColor=#669966 background="http://www.secretariadeambiente.gov.co/sda/libreria/jpg/new/bg2.gif">
<input name="buscar" type="text" size="20" id="caja">
<input type="submit" name="Submit" value="Buscar" style="font-size:10px">
<input name="accion" type="hidden" id="accion" value="1"></TD>
</form>
</TR>
<TR>
<TD colspan="2" bgColor=#FFFFFF><table width="900" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="195" valign="top" bgcolor="#F7F7F7">
<?php include("../sda/libreria/php/leftmenu2.php");?>
</td>
<td width="705" valign="top"><table width="100%" border="0" align="center" cellpadding="3" cellspacing="0" class="fuente" style="padding:3px;">
<tr>
<td height="45" align="left" valign="top"> <fieldset>
<legend><font color="#990000"><strong><font size="2" face="Geneva, Arial">Oficina
de participación</font></strong></font></legend>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td width="31%"><font size="2" face="Arial, Verdana"><strong><img src="images/ico.jpg" width="30" height="54" hspace="6" align="left"><font color="#990000">Bienvenido
</font></strong><font color="#990000"><?php echo $_SESSION[user_name]; ?>
</font><br>
Grupo Gestores<br>
Último acceso : <?php echo $_SESSION[last_login]; ?>
</font></td>
<td width="69%" align="right"><font size="2" face="Arial, Verdana"><a href="registro_participacion_gestores.php">Registro
de Organizaciones</a> | <a href="registro_informacion_local.php">Registro
información local</a> | <a href="logout.php">
Cerrar sesión</a> </font></td>
</tr>
</table>
<br>
<font color="#006699" size="4"><strong><br>
Registro de oferta SDA</strong></font> <br><br>
<?
// Connect to database
$errmsg = "";
if (! @mysql_connect("localhost","admin_uno","sda2008")) {
$errmsg = "No es posible la conexión a la BD";
}
@mysql_select_db("uno");
if(isset( $Submit ))
{
//If the Submitbutton was pressed do:
$limit_size=500000000;
$file_size=$HTTP_POST_FILES['imagefile']['size'];
if (($_FILES['imagefile']['type'] == "application/msword") || ($_FILES['imagefile']['type'] == "application/zip") || ($_FILES['imagefile']['type'] == "application/vnd.ms-excel") || ($_FILES['imagefile']['type'] == "text/plain") || ($_FILES['imagefile']['type'] == "application/pdf") && ($file_size < $limit_size)){
copy ($_FILES['imagefile']['tmp_name'], "./archivos/".$_FILES['imagefile']['name'])
or die ("No se pudo copiar");
chmod ("./archivos/".$_FILES['imagefile']['name'], 0666);
echo "";
$fecha = date("Y-m-d");
$lugar = $_POST['lugar'];
$comm = $_POST['comm'];
$imagen =$HTTP_POST_FILES['imagefile']['name'];
echo "Name: ".$_FILES['imagefile']['name']."<br>";
echo "Size: ".$_FILES['imagefile']['size']."<br>";
echo "Type: ".$_FILES['imagefile']['type']."<br>";
echo "<br>Archivo publicado....<br><br>";
$dependencia = $_POST['dependencia'];
$territorio = $_POST['territorio'];
$localidad = $_POST['localidad'];
$diagnostico = $_POST['diagnostico'];
$anexos = "./archivos/".$_FILES['imagefile']['name'];
$avances = $_POST['avances'];
$impactos = $_POST['impactos'];
$dificultades = $_POST['dificultades'];
$humanos = $_POST['humanos'];
$tecnicos = $_POST['tecnicos'];
$logisticos = $_POST['logisticos'];
$tecnologicos = $_POST['tecnologicos'];
$economicos = $_POST['economicos'];
$observaciones = $_POST['observaciones'];
$id_gestor = $_POST['id_gestor'];
$fecha = $_POST['fecha'];
$query1 = "insert into oferta (
`id` ,
`dependencia` ,
`territorio` ,
`localidad` ,
`oficina` ,
`diagnostico` ,
`anexos` ,
`avances` ,
`impactos` ,
`dificultades` ,
`humanos` ,
`tecnicos` ,
`logisticos` ,
`tecnologicos` ,
`economicos` ,
`observaciones` ,
`id_gestor` ,
`fecha` ) values ('','$dependencia', '$territorio', '$localidad', '$oficina', '$diagnostico', '$anexos', '$avances', '$impactos', '$dificultades' , '$humanos', '$tecnicos', '$logisticos',
'$tecnologicos', '$economicos', '$observaciones' , '$id_gestor', '$fecha')";
$result1 = mysql_query ($query1);
echo "La información ha quedado registrada exitosamente<p></p><p></p>";
}
else {
echo "<br><br>";
echo "No fue posible la copia, tipo de archivo incorrecto (".$_FILES['imagefile']['name'].") o excede el tamaño permitido<br> Limite de 200 Kb)<br>";
}
}
else{
?>
<form name="registro" onSubmit="return validar();" method="post" enctype="multipart/form-data"> <div style="padding:4px;">(*) Campos requeridos<br>
<input type="hidden" value="<?php echo date("j/m/Y g:i:s a");?>" name="fecha" />
<input type="hidden" name="id_gestor" value="<?php echo $_SESSION[id]; ?>"/>
<input type="hidden" value="0" name="estado" />
<input type="hidden" value="organizaciones" name="group1" />
<br>
<fieldset>
<legend><font color="#990000">*</font><strong>Seleccione
a continuación si es territorio o
localidad</strong></legend>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr align="center">
<td>
<input type="radio" name="dependencia" value="territorio" onClick="habilitar_territorio();">
<font size="1" face="Verdana, Arial, Helvetica, sans-serif">Territorio</font>
</td>
<td>
<input type="radio" name="dependencia" value="localidad" onClick="habilitar_localidad();">
<font size="1" face="Verdana, Arial, Helvetica, sans-serif">Localidad
</font></td>
</tr>
<tr align="center">
<td>
<select name="territorio" id="select3" style="font-size:11px" disabled>
<option selected value="0">Seleccione de la
lista</option>
<option value="rio bogota">Rio Bogotá</option>
<option value="rio fucha">Río
Fucha</option>
<option value="rio salitre">Río
Salitre</option>
<option value="rio tunjuelo">Río
Tunjuelo</option>
<option value="humedales">Humedales</option>
<option value="cerros orientales">Cerros
orientales</option>
<option value="paramos ruralidad">Páramos
y ruralidad</option>
<option value="borde norte">Borde
Norte</option>
</select></td>
<td>
<select name="localidad" size="1" id="select4" disabled style="font-size:11px" onChange="setOptions(document.registro.territorio,document.registro.localidad.options[document.registro.localidad.selectedIndex].value);">
<option value="0" selected>Seleccione</option>
<option value="1">Usaquén
<option value="2">Chapinero</option>
<option value="3">Santa fe</option>
<option value="4">San Cristobal</option>
<option value="5">Usme</option>
<option value="6">Tunjuelito</option>
<option value="7">Bosa</option>
<option value="8">Kennedy</option>
<option value="9">Fontibon</option>
<option value="10">Engativa</option>
<option value="11">Suba</option>
<option value="12">Barrios unidos</option>
<option value="13">Teusaquillo</option>
<option value="14">Martires</option>
<option value="15">Antonio nariño</option>
<option value="16">Puente aranda</option>
<option value="17">Candelaria</option>
<option value="18">Rafael uribe
uribe</option>
<option value="19">Ciudad bolivar</option>
<option value="20">Sumapaz</option>
<option value="21">Todas</option>
</select></td>
</tr>
</table>
<br>
<br>
</fieldset>
<br>
<fieldset>
<legend><strong><font color="#990000">*</font>Oficina
que provee la información</strong></legend>
<br>
<input name="oficina" type="text" size="40" maxlength="255" id="oficina">
<br>
<br>
</fieldset>
<br><fieldset>
<legend><font color="#990000">*</font><strong>Descripción
situación ambiental</strong></legend>
<table width="100%" border="0" cellspacing="0" cellpadding="2" style="font-size:11px">
<tr>
<td width="135" align="right">Diagnóstico</td>
<td width="548"><textarea name="diagnostico" cols="35" rows="4" id="diagnostico"></textarea></td>
</tr>
<tr>
<td align="right">Relacionar anexos</td>
<td>
<input type="file" name="imagefile">
<br>
<font color="#990000">Peso máximo:
1000 Kb - Formatos: doc, pdf, txt,
xls, zip</font></td>
</tr>
</table>
</fieldset>
<br>
<br><fieldset>
<legend><font color="#990000">*</font><strong>Oferta
institucional</strong></legend>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="2" style="font-size:11px">
<tr>
<td width="134" align="right">Avances</td>
<td width="549"><textarea name="avances" cols="35" rows="4" id="avances"></textarea></td>
</tr>
<tr>
<td align="right">Impactos</td>
<td><textarea name="impactos" cols="35" rows="4" id="impactos"></textarea></td>
</tr>
<tr>
<td align="right">Dificultades</td>
<td><textarea name="dificultades" cols="35" rows="4" id="dificultades"></textarea>
</td>
</tr>
</table>
</fieldset>
<br>
<br>
<fieldset>
<legend><font color="#990000">*</font><strong>Recursos
a disposición de la desconcentración</strong></legend>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="2" style="font-size:11px">
<tr>
<td width="134" align="right">Humanos</td>
<td width="549"><textarea name="humanos" cols="35" rows="4" id="humanos"></textarea></td>
</tr>
<tr>
<td align="right">Técnicos</td>
<td><textarea name="tecnicos" cols="35" rows="4" id="tecnicos"></textarea></td>
</tr>
<tr>
<td align="right">Logísticos</td>
<td><textarea name="logisticos" cols="35" rows="4" id="logisticos"></textarea>
</td>
</tr>
<tr>
<td align="right">Tecnológicos</td>
<td><textarea name="tecnologicos" cols="35" rows="4" id="tecnologicos"></textarea>
</td>
</tr>
<tr>
<td align="right">Económicos</td>
<td><textarea name="economicos" cols="35" rows="4" id="economicos"></textarea>
</td>
</tr>
</table>
</fieldset>
<br>
<br>
<fieldset>
<legend><font color="#990000">*</font><strong>Otra
información</strong></legend>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="2" style="font-size:11px">
<tr>
<td width="134" align="right">Observaciones</td>
<td width="549"><textarea name="observaciones" cols="35" rows="4" id="observaciones"></textarea></td>
</tr>
</table>
</fieldset>
<div align="center"><br>
<br>
<input type="submit" name="Submit" value="Enviar registro">
<input type="reset" name="Borrar" value="Borrar datos"></div>
</div>
</form>
<? } ?></fieldset></td></tr></table></td></tr><tr><td height="80" colspan="2" align="center" valign="middle" class="amarillo"><font size="1"><font face="Verdana, Arial"><strong>Secretaría
Distrital de Ambiente</strong></font></span><font face="Verdana, Arial"><br>Cra. 6 No. 14 - 98 Pisos 2, 5, 6, 7 y 12 Torre A y piso 3 y 4 Torre B, Edificio Condominio Parque Santander - Conmutador: 4441030 <br>Bogotá - Colombia<br><a href="mailto:webmaster@secretariadeambiente.gov.co">webmaster@secretariadeambiente.gov.co</a></font></font></td>
</tr></table></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></td><td style="background-image:url(http://www.secretariadeambiente.gov.co/sda/libreria/jpg/new/rightShadow.jpg); background-repeat:repeat-y" width="14"></td></tr></table>
<map name="Map"><area shape="rect" coords="6,8,77,19" href="http://www.secretariadeambiente.gov.co/sda/libreria/php/decide.php?patron=01." alt="Secretaría de Ambiente">
<area shape="rect" coords="266,6,408,20" href="http://www.secretariadeambiente.gov.co/sda/libreria/php/decide.php?patron=02." alt="Servicios al Ciudadano">
<area shape="rect" coords="98,6,240,21" href="http://www.secretariadeambiente.gov.co/sda/libreria/php/decide.php?patron=03.">
<area shape="rect" coords="433,7,514,20" href="http://www.secretariadeambiente.gov.co/sda/libreria/php/decide.php?patron=05." alt="En línea">
</map></BODY></HTML>
|