<?php
include("vistas/es_ES/head_public.php");
include_once ("vistas/es_ES/menuinterno.php");
?>
<table border=0 align="center" width=90%>
<tr>
<td>
<table width="100%" align="center">
<tr>
<td height="40" align="right"><div align="left" class="subtitulos"><b>Detalles de contrato</b></div></td>
</tr>
</table>
<?
/* De acuerdo al estado del contrato se muestra información diferente */
$id_estado = $_SESSION['contrato']['con_id_estado'];
switch($id_estado) {
/* En caso de borrador de pliego */
case 1:
?>
<table cellpadding=4 cellspacing=0 width="100%" align="center">
<tr>
<td colspan=2 bgcolor='#e9e9e0' class="cabezacaja"><b>Contrato</b></td>
</tr>
<tr>
<td colspan=2 width="100%"><b><center><a href="index.php?view=vistas/<?=$_SESSION[lang]?>/enviar_comentario.php&id_contrato=<?= $contrato['id_objeto']?>&numero=<?= $contrato['con_numero']?>">Envíenos un comentario acerca de este contrato<img src="<?=PATH_CMS?>/src/contratos/vistas/imagenes/discuss.gif" width=18 height=18 alt="Comentarios acerca de este contrato..." border=0></a></center></b></td>
</tr>
<tr>
<td width="29%" height="22" valign="top" class="atributos"><b>Número de contrato:</b></td>
<td width="71%" height="22" valign="top"><?= $_SESSION['contrato']['con_numero']?></td>
</tr>
<tr>
<td height="22" valign="top" class="atributos"><b>Estado:</b></td>
<td height="22" valign="top"><? echo $_SESSION['lista_estados_contratos'][$id_estado-1][nombre] ?></td>
</tr>
<tr>
<td height="22" valign="top" class="atributos"><b>Objeto:</b></td>
<td height="22" valign="top"><?= $_SESSION['contrato']['con_objeto']?></td>
</tr>
<tr>
<td height="22" valign="top" class="atributos"><b>Presupuesto:</b></td>
<td height="22" valign="top"><?= number_format($_SESSION['contrato']['con_presupuesto']);?></td>
</tr>
<tr>
<td height="22" valign="top" class="atributos"><b>Dependencia:</b></td>
<td height="22" valign="top">
<? foreach ($_SESSION['listado_dependencias'] as $dependencias) {
if ($_SESSION['contrato']['con_id_dependencia'] == $dependencias['id_objeto'])
echo $dependencias['nombre'];
}
?>
</td>
</tr>
<?
if( $_SESSION['contrato']['con_ordenador_gasto'] != "" ) {
?>
<tr>
<td height="22" valign="top" class="atributos"><b>Ordenador del gasto:</b></td>
<td height="22" valign="top"><?= $_SESSION['contrato']['con_ordenador_gasto']?></td>
</tr>
<?
}
?>
</table>
<br>
<table cellpadding=4 cellspacing=0 width="100%" align="center">
<?
$j = 0;
/* Se muestran los pliegos definitivos */
while( $j < sizeof($_SESSION['archivos']) ) {
if( $_SESSION['archivos'][$j]['id_tipo_archivo'] == 1 || $_SESSION['archivos'][$j]['id_tipo_archivo'] == 3 || $_SESSION['archivos'][$j]['id_tipo_archivo'] == 8 ) {
$a2 = PATH_IMAGES."contratos/" . $_SESSION['archivos'][$j]['nombre'];
if ( file_exists($a2) ) {
if( $_SESSION['archivos'][$j]['tarch_nombre'] != $_SESSION['archivos'][$j-1]['tarch_nombre'] ) {
?>
<tr>
<td colspan=2 bgcolor='#e9e9e0' class="cabezacaja"><b><?= $_SESSION['archivos'][$j]['tarch_nombre'] ?></b></td>
</tr>
<?
}
?>
<tr>
<td width="29%" height="30" align="left" valign="middle" class="atributos">Descargar </td>
<td width="71%" valign="middle"><a href="phrame.php?action=descargar_archivo&go=publico&id_archivo=<?=$_SESSION['archivos'][$j]['id_archivo']?>"><?=$_SESSION['archivos'][$j]['nombre']?></a> | <a href="phrame.php?action=descargar_archivo&go=publico&id_archivo=<?=$_SESSION['archivos'][$j]['id_archivo']?>"><img src="<?=PATH_CMS?>/src/contratos/vistas/imagenes/download.gif" width=16 height=14 alt="Descargar archivo" border=0></a> | </b><font class="small">(<? if( $_SESSION['archivos'][$j]['descargas'] == "" ) echo "0"; else echo $_SESSION['archivos'][$j]['descargas']; ?> descargas)</font></td>
</tr>
<?
}
}
$j++;
}
?>
<tr>
<td colspan=2><b> </b></td>
</tr>
</table>
<table cellpadding=4 cellspacing=0 width="100%" align="center">
<tr>
<td height="40" align="center"> <input type="button" onClick="window.location='index.php?view=vistas/<?=$_SESSION[lang]?>/adicionar_proponente.php&id_contrato=<?= $contrato['id_objeto']?>';" value="Registrarse como proponente..." class="botonentrar"></td>
</tr>
</table>
<br>
<table cellpadding=4 cellspacing=0 width="100%" align="center">
<tr>
<td colspan=2 class="cabezacaja"><b>Recepción de propuestas</b></td>
</tr>
<tr>
<td width="29%" height="22" valign="top" class="atributos"><b>Departamento:</b></td>
<td width="71%" height="22" valign="top"><?= $_SESSION['contrato']['con_departamento']?></td>
</tr>
<tr>
<td height="22" valign="top" class="atributos"><b>Ciudad:</b></td>
<td height="22" valign="top"><?= $_SESSION['contrato']['con_ciudad']?></td>
</tr>
<tr>
<td height="22" valign="top" class="atributos"><b>Dirección:</b></td>
<td height="22" valign="top"><?= $_SESSION['contrato']['con_direccion_propuestas']?></td>
</tr>
<tr>
<td height="22" valign="top" class="atributos"><b>Fecha y hora de apertura:</b></td>
<td height="22" valign="top"><?= $_SESSION['contrato']['con_fecha_hora_apertura_pr']?></td>
</tr>
<tr>
<td height="22" valign="top" class="atributos"><b>Fecha y hora de cierre:</b></td>
<td height="22" valign="top"><?= $_SESSION['contrato']['con_fecha_hora_cierre_pr']?></td>
</tr>
</table>
<br>
<table cellpadding=4 cellspacing=0 width="100%" align="center">
<tr>
<td colspan=2 class="cabezacaja"><b>Puntos de información</b></td>
</tr>
<?
if( $_SESSION['contrato']['con_email_pi'] != "" ) {
?>
<tr>
<td width="29%" height="22" valign="top" class="atributos"><b>Correo electrónico:</b></td>
<td width="71%" height="22" valign="top"><a href="mailto:<?= $_SESSION['contrato']['con_email_pi']?>"><?= $_SESSION['contrato']['con_email_pi']?></a></td>
</tr>
<?
}
if( $_SESSION['contrato']['con_direccion_web_pi'] != "" ) {
$http = substr (trim($_SESSION['contrato']['con_direccion_web_pi']), 0, 7);
if( $http == "http://" )
$url = $_SESSION['contrato']['con_direccion_web_pi'];
else
$url = "http://".$_SESSION['contrato']['con_direccion_web_pi'];
?>
<tr>
<td width="29%" height="22" valign="top" class="atributos"><b>Dirección Web:</b></td>
<td width="71%" height="22" valign="top"><a target="_blank" href="<?= $url?>"><?= $_SESSION['contrato']['con_direccion_web_pi']?></a></td>
</tr>
<?
}
?>
</table>
<br>
<table cellpadding=4 cellspacing=0 width="100%" align="center">
<tr>
<td width="100%" colspan=2 bgcolor='#e9e9e0' class="cabezacaja"><b>Listado de proponentes</b></td>
</tr>
<?
foreach ($_SESSION['listado_proponentes'] as $k => $proponentes) {
$class = ($k % 2) ? 'class="tdpar"' : 'class="tdimpar"';
?>
<tr <?= $class ?> height="15">
<td height="22" align="left" valign="middle"><?= $proponentes['nombre'] ?></td>
</tr>
<?
}
if( sizeof($_SESSION['listado_proponentes']) == 0 && isset($_SESSION['mensaje_proponentes']) ) {
?>
<tr <?= $class ?> height="15">
<td height="22" align="center" valign="middle"><?= $_SESSION['mensaje_proponentes']; ?></td>
</tr>
<?
}
?>
</table>
<br><br>
<?
break;
/* En caso de Pliegos definitivos */
case 2:
?>
<table cellpadding=4 cellspacing=0 width="100%" align="center">
<tr>
<td colspan=2 bgcolor='#e9e9e0' class="cabezacaja"><b>Contrato</b></td>
</tr>
<tr>
<td width="29%" height="22" valign="top" class="atributos"><b>Número de contrato:</b></td>
<td width="71%" height="22" valign="top"><?= $_SESSION['contrato']['con_numero']?></td>
</tr>
<tr>
<td height="22" valign="top" class="atributos"><b>Estado:</b></td>
<td height="22" valign="top"><? echo $_SESSION['lista_estados_contratos'][$id_estado-1][nombre] ?></td>
</tr>
<tr>
<td height="22" valign="top" class="atributos"><b>Objeto:</b></td>
<td height="22" valign="top"><?= $_SESSION['contrato']['con_objeto']?></td>
</tr>
<tr>
<td height="22" valign="top" class="atributos"><b>Presupuesto:</b></td>
<td height="22" valign="top"><?= number_format($_SESSION['contrato']['con_presupuesto']);?></td>
</tr>
<tr>
<td height="22" valign="top" class="atributos"><b>Dependencia:</b></td>
<td height="22" valign="top">
<? foreach ($_SESSION['listado_dependencias'] as $dependencias) {
if ($_SESSION['contrato']['con_id_dependencia'] == $dependencias['id_objeto'])
echo $dependencias['nombre'];
}
?>
</td>
</tr>
<?
if( $_SESSION['contrato']['con_ordenador_gasto'] != "" ) {
?>
<tr>
<td height="22" valign="top" class="atributos"><b>Ordenador del gasto:</b></td>
<td height="22" valign="top"><?= $_SESSION['contrato']['con_ordenador_gasto']?></td>
</tr>
<?
}
?>
</table>
<br>
<table cellpadding=4 cellspacing=0 width="100%" align="center">
<?
$j = 0;
/* Se muestran los pliegos definitivos */
while( $j < sizeof($_SESSION['archivos']) ) {
if( $_SESSION['archivos'][$j]['id_tipo_archivo'] == 2 || $_SESSION['archivos'][$j]['id_tipo_archivo'] == 4 || $_SESSION['archivos'][$j]['id_tipo_archivo'] == 7 || $_SESSION['archivos'][$j]['id_tipo_archivo'] == 8 ) {
$a2 = PATH_IMAGES."contratos/" . $_SESSION['archivos'][$j]['nombre'];
if ( file_exists($a2) ) {
if( $_SESSION['archivos'][$j]['tarch_nombre'] != $_SESSION['archivos'][$j-1]['tarch_nombre'] ) {
?>
<tr>
<td colspan=2 bgcolor='#e9e9e0' class="cabezacaja"><b><?= $_SESSION['archivos'][$j]['tarch_nombre'] ?></b></td>
</tr>
<?
}
?>
<tr>
<td width="29%" height="22" valign="top" class="atributos">Descargar </td>
<td width="71%" height="22" valign="top"><a href="phrame.php?action=descargar_archivo&go=publico&id_archivo=<?=$_SESSION['archivos'][$j]['id_archivo']?>"><?=$_SESSION['archivos'][$j]['nombre']?></a> | <a href="phrame.php?action=descargar_archivo&go=publico&id_archivo=<?=$_SESSION['archivos'][$j]['id_archivo']?>"><img src="<?=PATH_CMS?>/src/contratos/vistas/imagenes/download.gif" width=16 height=14 alt="Descargar archivo" border=0></a> | </b><font class="small">(<? if( $_SESSION['archivos'][$j]['descargas'] == "" ) echo "0"; else echo $_SESSION['archivos'][$j]['descargas']; ?> descargas)</font></td>
</tr>
<?
}
}
$j++;
}
?>
<tr>
<td colspan=2><b> </b></td>
</tr>
</table>
<table cellpadding=4 cellspacing=0 width="100%" align="center">
<tr>
<td align="center"><input type="button" onClick="window.location.href('index.php?view=vistas/<?=$_SESSION[lang]?>/adicionar_proponente.php&id_contrato=<?= $contrato['id_objeto']?>');" value="Registrarse como proponente..." class="botonentrar"></td>
</tr>
</table>
<br>
<table cellpadding=4 cellspacing=0 width="100%" align="center">
<tr>
<td colspan=2 bgcolor='#e9e9e0' class="cabezacaja"><b>Recepción de propuestas</b></td>
</tr>
<tr>
<td width="29%" height="22" valign="top" class="atributos"><b>Departamento:</b></td>
<td height="22" valign="top"><?= $_SESSION['contrato']['con_departamento']?></td>
</tr>
<tr>
<td height="22" valign="top" class="atributos"><b>Ciudad:</b></td>
<td height="22" valign="top"><?= $_SESSION['contrato']['con_ciudad']?></td>
</tr>
<tr>
<td height="22" valign="top" class="atributos"><b>Dirección:</b></td>
<td height="22" valign="top"><?= $_SESSION['contrato']['con_direccion_propuestas']?></td>
</tr>
<tr>
<td height="22" valign="top" class="atributos"><b>Fecha y hora de apertura:</b></td>
<td height="22" valign="top"><?= $_SESSION['contrato']['con_fecha_hora_apertura_pr']?></td>
</tr>
<tr>
<td height="22" valign="top" class="atributos"><b>Fecha y hora de cierre:</b></td>
<td height="22" valign="top"><?= $_SESSION['contrato']['con_fecha_hora_cierre_pr']?></td>
</tr>
</table>
<br>
<table cellpadding=4 cellspacing=0 width="100%" align="center">
<tr>
<td colspan=2 bgcolor='#e9e9e0' class="cabezacaja"><b>Puntos de información</b></td>
</tr>
<?
if( $_SESSION['contrato']['con_email_pi'] != "" ) {
?>
<tr>
<td width="29%" height="22" valign="top" class="atributos"><b>Correo electrónico:</b></td>
<td width="71%" height="22" valign="top"><a href="mailto:<?= $_SESSION['contrato']['con_email_pi']?>"><?= $_SESSION['contrato']['con_email_pi']?></a></td>
</tr>
<?
}
if( $_SESSION['contrato']['con_direccion_web_pi'] != "" ) {
$http = substr (trim($_SESSION['contrato']['con_direccion_web_pi']), 0, 7);
if( $http == "http://" )
$url = $_SESSION['contrato']['con_direccion_web_pi'];
else
$url = "http://".$_SESSION['contrato']['con_direccion_web_pi'];
?>
<tr>
<td width="29%" height="22" valign="top" class="atributos"><b>Dirección Web:</b></td>
<td width="71%" height="22" valign="top"><a target="_blank" href="<?= $url?>"><?= $_SESSION['contrato']['con_direccion_web_pi']?></a></td>
</tr>
<?
}
?>
</table>
<br>
<table cellpadding=4 cellspacing=0 width="100%" align="center">
<tr>
<td colspan=2 bgcolor='#e9e9e0' class="cabezacaja"><b>Listado de proponentes</b></td>
</tr>
<?
foreach ($_SESSION['listado_proponentes'] as $k => $proponentes) {
$class = ($k % 2) ? 'class="tdpar"' : 'class="tdimpar"';
?>
<tr <?= $class ?> height="15">
<td height="22" align="left" valign="middle"><?= $proponentes['nombre'] ?></td>
</tr>
<?
}
if( sizeof($_SESSION['listado_proponentes']) == 0 && isset($_SESSION['mensaje_proponentes']) ) {
?>
<tr <?= $class ?> height="15">
<td height="22" align="left" valign="middle"><?= $_SESSION['mensaje_proponentes']; ?></td>
</tr>
<?
}
?>
</table>
<br><br>
<?
break;
/* En caso de adjudicados */
case 3:
?>
<table cellpadding=4 cellspacing=0 width="100%" align="center">
<tr>
<td colspan=2 bgcolor='#e9e9e0' class="cabezacaja"><b>Contrato</b></td>
</tr>
<tr>
<td width="29%" height="22" valign="top" class="atributos"><b>Número de contrato:</b></td>
<td width="71%" height="22" valign="top"><?= $_SESSION['contrato']['con_numero']?></td>
</tr>
<tr>
<td height="22" valign="top" class="atributos"><b>Estado:</b></td>
<td height="22" valign="top"><? echo $_SESSION['lista_estados_contratos'][$id_estado-1][nombre] ?></td>
</tr>
<tr>
<td height="22" valign="top" class="atributos"><b>Objeto:</b></td>
<td height="22" valign="top"><?= $_SESSION['contrato']['con_objeto']?></td>
</tr>
<?
if( $_SESSION['contrato']['con_contratista'] != "" ) {
?>
<tr>
<td height="22" valign="top" class="atributos"><b>Contratista:</b></td>
<td height="22" valign="top"><?= $_SESSION['contrato']['con_contratista']?></td>
</tr>
<?
}
?>
<tr>
<td height="22" valign="top" class="atributos"><b>Dependencia:</b></td>
<td height="22" valign="top"><? foreach ($_SESSION['listado_dependencias'] as $dependencias) {
if ($_SESSION['contrato']['con_id_dependencia'] == $dependencias['id_objeto'])
echo $dependencias['nombre'];
}
?>
</td>
</tr>
<tr>
<td height="22" valign="top" class="atributos"><b>Fecha de adjudicación:</b></td>
<td height="22" valign="top"><?= $_SESSION['contrato']['con_fecha_adjudicacion'] ?></td>
</tr>
<?
if( $_SESSION['contrato']['con_ordenador_gasto'] != "" ) {
?>
<tr>
<td height="22" valign="top" class="atributos"><b>Ordenador del gasto:</b></td>
<td height="22" valign="top"><?= $_SESSION['contrato']['con_ordenador_gasto'] ?></td>
</tr>
<?
}
?>
</table>
<br>
<table cellpadding=4 cellspacing=0 width="100%" align="center">
<?
$j = 0;
/* Se muestran los pliegos definitivos */
while( $j < sizeof($_SESSION['archivos']) ) {
if( $_SESSION['archivos'][$j]['id_tipo_archivo'] == 5 || $_SESSION['archivos'][$j]['id_tipo_archivo'] == 6 ) {
$a2 = PATH_IMAGES."contratos/" . $_SESSION['archivos'][$j]['nombre'];
if ( file_exists($a2) ) {
if( $_SESSION['archivos'][$j]['tarch_nombre'] != $_SESSION['archivos'][$j-1]['tarch_nombre'] ) {
?>
<tr>
<td colspan=2 bgcolor='#e9e9e0' class="cabezacaja"><b><?= $_SESSION['archivos'][$j]['tarch_nombre'] ?></b></td>
</tr>
<?
}
?>
<tr>
<td width="29%" height="22" valign="top" class="atributos">Descargar </td>
<td width="71%" valign="middle"><a href="phrame.php?action=descargar_archivo&go=publico&id_archivo=<?=$_SESSION['archivos'][$j]['id_archivo']?>"><?=$_SESSION['archivos'][$j]['nombre']?></a> | <a href="phrame.php?action=descargar_archivo&go=publico&id_archivo=<?=$_SESSION['archivos'][$j]['id_archivo']?>"><img src="<?=PATH_CMS?>/src/contratos/vistas/imagenes/download.gif" width=16 height=14 alt="Descargar archivo" border=0></a> | </b><font class="small">(<? if( $_SESSION['archivos'][$j]['descargas'] == "" ) echo "0"; else echo $_SESSION['archivos'][$j]['descargas']; ?> descargas)</font></td>
</tr>
<?
}
}
$j++;
}
?>
<tr>
<td colspan=2><b> </b></td>
</tr>
</table>
<br>
<table cellpadding=4 cellspacing=0 width="100%" align="center">
<tr>
<td colspan=2 bgcolor='#e9e9e0' class="cabezacaja"><b>Puntos de información</b></td>
</tr>
<?
if( $_SESSION['contrato']['con_email_pi'] != "" ) {
?>
<tr>
<td height="22" valign="top" class="atributos"><b>Correo electrónico:</b></td>
<td height="22" valign="top"><a href="mailto:<?= $_SESSION['contrato']['con_email_pi']?>"><?= $_SESSION['contrato']['con_email_pi']?></a></td>
</tr>
<?
}
if( $_SESSION['contrato']['con_direccion_web_pi'] != "" ) {
$http = substr (trim($_SESSION['contrato']['con_direccion_web_pi']), 0, 7);
if( $http == "http://" )
$url = $_SESSION['contrato']['con_direccion_web_pi'];
else
$url = "http://".$_SESSION['contrato']['con_direccion_web_pi'];
?>
<tr>
<td width="29%" height="22" valign="top" class="atributos"><b>Dirección Web:</b></td>
<td width="71%" height="22" valign="top"><a target="_blank" href="<?= $url?>"><?= $_SESSION['contrato']['con_direccion_web_pi']?></a></td>
</tr>
<?
}
?>
</table>
<br>
<table cellpadding=4 cellspacing=0 width="100%" align="center">
<tr>
<td colspan=2 bgcolor='#e9e9e0' class="cabezacaja"><b>Listado de proponentes</b></td>
</tr>
<?
foreach ($_SESSION['listado_proponentes'] as $k => $proponentes) {
$class = ($k % 2) ? 'class="tdpar"' : 'class="tdimpar"';
?>
<tr <?= $class ?> height="15">
<td height="22" align="left" valign="middle"><?= $proponentes['nombre'] ?></td>
</tr>
<?
}
if( sizeof($_SESSION['listado_proponentes']) == 0 && isset($_SESSION['mensaje_proponentes']) ) {
?>
<tr <?= $class ?> height="15">
<td height="22" align="left" valign="middle"><?= $_SESSION['mensaje_proponentes']; ?></td>
</tr>
<?
}
?>
</table>
<br><br>
<?
break;
}
/* Se cierra el switch */
?>
</td>
</tr>
</table>
<? include("vistas/foot_public.php") ?>