Пример #1
0
<title>Crear Formulario</title>

<link rel="stylesheet" type="text/css" href="recursos/calendario/css/jquery-ui-1.7.2.custom.css" />
<link rel="stylesheet" type="text/css" href="recursos/autocompleta/jquery.autocomplete.css" />

<style>
#formulario{
margin-top:50px;
float:left;}
</style>

</head>
<?php 
if (isset($_POST['guardar'])) {
    include_once '../controller/class_formulario_comunicacion.php';
    $formulario = new FormularioComunicacion();
    $a[0] = 2;
    $a[1] = $_POST['fecha_formulario'];
    $a[2] = $_POST['rut'] . '-' . $_POST['dv'];
    $a[3] = $_POST['nomFranc'];
    $a[4] = 2;
    $a[5] = $_POST['codCur'];
    $a[6] = 0;
    if ($formulario->addFormulario($a)) {
        echo "<script>alert('Se han registrado correctamente los datos del formulario')</script>";
        echo "<script>document.location(\"formulario_pestanas.php?rut=1-9\");</script>";
    } else {
        echo "<script>alert('Se ha generado un problema al registrar el formulario')</script>";
    }
}
$fecha_actual = "" . date("d") . "/" . date("m") . "/" . date("Y");
$ciudades = new ciudades();
$r = $ciudades->getCiudadById($ciuEm);
$fila = mysql_fetch_object($r);
$ciudadEmpresa = $fila->nombre;
include_once '../controller/class_tipo_calle.php';
$calle = new TipoCalle();
$r = $calle->getTipoCalleById($tipoDeCalle);
$fila = mysql_fetch_object($r);
$tipCalle = $fila->nombre;
include_once '../controller/class_comuna.php';
$calle = new comunas();
$r = $calle->getComunaById($comunaId);
$fila = mysql_fetch_object($r);
$comunaEmpresa = $fila->nombre;
include_once '../controller/class_formulario_comunicacion.php';
$formulario = new FormularioComunicacion();
$r = $formulario->getFormularioCabezeraPestañas(1);
$fila = mysql_fetch_object($r);
$numformulario = $fila->id;
$EstadoFormulario = $fila->estado_envio;
$fechCreacionForm = $fila->fecha_formulario;
$comiteBipartido = $fila->comite_bipartito;
$deteccionNecesidades = $fila->deteccionNecesidades;
$codigoActividad = $fila->codigo_curso;
include_once '../controller/class_curso.php';
$curso = new Curso();
$r = $curso->getCursoByCod($codigoActividad);
$fila = mysql_fetch_object($r);
$id_institucion = $fila->insotic_institucion_id;
$nomCurso = $fila->nombre;
$NumeroHoras = $fila->total_horas;
<table width="100%" border="0" cellspacing="2" cellpadding="2">
  <tr>
    <th bgcolor="#CCCCCC" class="texto_adm_negrita" scope="col">NRO. FORMULARIO</th>
    <th bgcolor="#CCCCCC" class="texto_adm_negrita" scope="col">Rut EMPRESA</th>
    <th bgcolor="#CCCCCC" class="texto_adm_negrita" scope="col">CODIGO SENCE</th>
    <th bgcolor="#CCCCCC" class="texto_adm_negrita" scope="col">FECHA INICIO</th>
    <th bgcolor="#CCCCCC" class="texto_adm_negrita" scope="col">FECHA INICIO</th>
    <th bgcolor="#CCCCCC" class="texto_adm_negrita" scope="col">TOTAL HORAS</th>
    <th bgcolor="#CCCCCC" class="texto_adm_negrita" scope="col">ESTADO ENVIO</th>
    <th bgcolor="#CCCCCC" class="texto_adm_negrita" scope="col">MODIFICAR</th>
    <th bgcolor="#CCCCCC" class="texto_adm_negrita" scope="col">ELIMINAR</th>
  </tr>
	  
	<?php 
include_once '../controller/class_formulario_comunicacion.php';
$formulario = new FormularioComunicacion();
$r = $formulario->getFormulario();
while ($f = mysql_fetch_object($r)) {
    ?>
      <tr>
            <td class="texto_adm"><?php 
    echo $f->id;
    ?>
</td>
            <td class="texto_adm"><?php 
    echo $f->insotic_empresa_rut;
    ?>
</td>
            <td class="texto_adm"><?php 
    echo $f->codigo_curso;
    ?>