Example #1
0
function displayForm($camposPendientes)
{
    cabecera();
    pie();
    if ($camposPendientes) {
        ?>
        <p class="error">Hubo algunos problemas con el formulario que usted presentó.
            Por favor, complete correctamente los campos obligatorios y haga clic en <b>Enviar</b> para volver a enviar el formulario.</p>
    <?php 
    } else {
        ?>
        <b>Por favor, rellene sus datos a continuacion y haga clic en "enviar encuesta":</b><br><br>
    <?php 
    }
    ?>
    <form method="post">
        Edad*: <input type="text" name="edad" /><br>
        ¿Asistes a algunos de estos espectaculos durante el año?
        <select  size="4"  multiple name="ocio[]">
            <option value="teatro">Teatro</option>
            <option value="cine">Cine</option>
            <option value="futbol">Futbol</option>
            <option value="conciertos">Conciertos</option>
        </select><br><br><br>
        ¿Qué tipo de restaurante prefieres?<br>
        Americano <input type="checkbox" name="restaurante[]" value="americano"/><br>
        Japones <input type="checkbox" name="restaurante[]" value="japones"/><br>
        Chino <input type="checkbox" name="restaurante[]" value="chino"/><br>
        Italiano <input type="checkbox" name="restaurante[]" value="italiano"/><br>
        <input type="submit" value="Enviar encuesta" name="enviar" />
    </form>

    <?php 
}
function conectaDb()
{
    global $dbDb;
    try {
        $db = new PDO("sqlite:" . $dbDb);
        return $db;
    } catch (PDOException $e) {
        cabecera("Error grave", MENU_PRINCIPAL);
        print "  <p>Error: No puede conectarse con la base de datos.</p>\n";
        print "  <p>Error: " . $e->getMessage() . "</p>\n";
        pie();
        exit;
    }
}
function conectaDb()
{
    try {
        $db = new PDO(MYSQL_HOST, MYSQL_USUARIO, MYSQL_PASSWORD);
        $db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true);
        $db->exec("set names utf8mb4");
        return $db;
    } catch (PDOException $e) {
        cabecera("Error grave", MENU_PRINCIPAL);
        print "  <h4>Error: No puede conectarse con la base de datos.</h4>\n\n";
        print "  <h4>Error: " . $e->getMessage() . "</h4>\n";
        pie();
        exit;
    }
}
Example #4
0
function displayForm($camposPendientes)
{
    cabecera();
    pie();
    if ($camposPendientes) {
        ?>
        <p class="error">Hubo algunos problemas con el formulario que usted presentó.
            Por favor, complete correctamente los campos obligatorios y haga clic en <b>Enviar</b> para volver a enviar el formulario.</p>
    <?php 
    } else {
        ?>
        <b>Por favor, rellene sus datos a continuacion y haga clic en "enviar encuesta":</b><br><br>
    <?php 
    }
    ?>
    <form method="post">
        Nombre*: <input type="text" name="nombre" /><br>
        Elige tu color de coche favorito<br>

        Rojo <input type="radio" name="color[]" value="rojo"><br>
        Verde <input type="radio" name="color[]" value="verde"><br>
        Azul <input type="radio" name="color[]" value="azul">
        <br><br>
        Elige los extras<br>
        Aire acondicionado <input type="checkbox" name="extras[]" value="aire_acondicionado"/><br>
        Yantas <input type="checkbox" name="extras[]" value="yantas"/><br>
        Tapiceria <input type="checkbox" name="extras[]" value="tapiceria"/><br><br>
        
        ¿Cual es el precio máximo que estarías dispuesto a pagar?
        <br>

        <input type="submit" value="Enviar" name="enviar" />
        <input type="reset" value="Borrar">
    </form>

    <?php 
}
   
   

<!-----###-END OF MENU TABLES-###---->




<center>

    <iframe id="mainContent" name="mainContent" src="./user/Cat/Catalogos_Ajax/Preservation_M/index.php" width="100%" height="150%" frameborder="0" style="margin: 0px; height: 150%;" scrolling="si" onload="resizeMe(this)">
    [Your user agent does not support frames or is currently configured
    not to display frames. However, you may visit
    &lt;A href="info_page_tabs.php"&gt;the related document.&lt;/A&gt;]
</iframe>

    
</center>


  </td>
</tr>




</body>
</html>
<?php 
pie();
Example #6
0
    $w = "where version like '" . $_GET['version'] . "%'";
}
$query = "SELECT exit_code AS `key`, COUNT(exit_code) AS `value` FROM `godspeed_stats` {$w} GROUP BY exit_code ORDER BY COUNT(exit_code) DESC";
$rs = mysql_query($query);
if (!mysql_query($query)) {
    echo mysql_error();
}
$keys = array('OK', 'Error');
$values = array(0, 0);
$colors = array(array(69, 197, 229), array(251, 131, 53));
while ($row = mysql_fetch_assoc($rs)) {
    if ($row['key'] == 0) {
        $values[0] += $row['value'];
    } else {
        $values[1] += $row['value'];
    }
}
$data = array("keys" => $keys, "values" => $values);
$title = 'Stability';
if (isset($_GET['version'])) {
    $title .= ' (Version ' . $_GET['version'] . ')';
}
pie($data, $title, $name, $colors);
$fp = fopen($name, 'rb');
if (!$debug) {
    header("Content-Type: image/png");
    header("Content-Length: " . filesize($name));
    fpassthru($fp);
} else {
    print_r($data);
}
Example #7
0
        <td>2 Personas</td>
        <td><input type="text" name="tblj_" id="textfield2" value="" /></td>
        <td><input type="text" name="tbvd_" id="textfield3" value="" /></td>
        <td><input type="text" name="taf_" id="textfield4" value="" /></td>
      </tr>
-->
<input type="submit" name="submit" id="submit" value="Guardar" />
</form>
<br />
  </div>
  </div>
      	<!-- FIN DIV caja -->
        </div>
    <!-- FIN DIV FORMULARIO DE ACCESO -->
</div>
<!--FIN DIV CONTENIDO -->
<br style="clear:both" /><br />
    <!-- DIV FOOTER -->
	<div class="foot-ajustable" align="center">
    <?php 
echo pie();
?>
</div>
	<!-- FIN DIV FOOTER -->
</div>
<!-- DIV PARA CENTRAR PAGINA -->
<script type="text/javascript">
swfobject.registerObject("FlashID");
</script>
</body>
</html>
Example #8
0
    echo mysql_error();
}
$keys = array();
$values = array();
$j = 0;
$o = 0;
while ($row = mysql_fetch_assoc($rs)) {
    $k = $row['key'];
    $v = $row['value'];
    if ($k == 'I') {
        $k = 'Install (' . $v . ')';
    }
    if ($k == 'U') {
        $k = 'Uninstall (' . $v . ')';
    }
    array_push($keys, $k);
    array_push($values, $v);
    $j++;
}
$data = array("keys" => $keys, "values" => $values);
$title = 'Install';
pie($data, $title, $name);
$fp = fopen($name, 'rb');
if (!$debug) {
    header("Content-Type: image/png");
    header("Content-Length: " . filesize($name));
    fpassthru($fp);
} else {
    echo $query;
    print_r($data);
}
Example #9
0
    $pdf->Cell(30, 4, ' ' . $literal, 1, 0, 'L');
    $pdf->Cell(23, 4, ' ' . $obs, 1, 1, 'L');
    $cont++;
}
pie($nro_paginas);
//------------------- estadistica ---------------------------------------------------
if ($cont <= 28) {
    estadistica($id_programa, $AV, $AD, $RV, $RD, $AbV, $AbD, $Aprobados, $Reprobados, $Abandonos, $id_periodo, $id_gestion, $cont);
} else {
    for ($y = $cont; $y <= $mod; $y++) {
        $pdf->Cell(90, 4, '', 0, 1);
    }
    encabezado($name_aux, $id_programa, $facultad, $programa, $nombresDocente, $sigla, $materia, $id_grupo, $cod_se, $id_periodo, $id_gestion, $descrip_grupo, $str_com, $cerrado);
    //titulo();
    //$pdf->Image('fondo.jpg',73,88,80,100);
    pie($nro_paginas);
    estadistica($id_programa, $AV, $AD, $RV, $RD, $AbV, $AbD, $Aprobados, $Reprobados, $Abandonos, $id_periodo, $id_gestion, 0);
}
//--------------- Fin de la Planilla ---------------------
$pdf->Ln();
$pdf->Output($archivo, 'D');
//-------------------------------------------------------------------------------------------------------
//------------ FUNCIONES --------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------
function encabezado($name_aux, $id_programa, $facultad, $programa, $nombresDocente, $sigla, $materia, $id_grupo, $cod_se, $id_periodo, $id_gestion, $descrip_grupo, $str_com, $cerrado)
{
    $fechaplanilla = date('d-m-Y');
    global $pdf;
    $pdf->SetFont('Arial', 'IB', 7);
    $pdf->SetTextColor(10, 10, 150);
    $pdf->Cell(90, 3, 'UNIVERSIDAD AUTONOMA "TOMAS FRIAS"', 0, 0, 'C');
Example #10
0
function displayForm($camposPendientes)
{
    cabecera();
    if ($camposPendientes) {
        ?>
        <p class="error">Hubo algunos problemas con el formulario que usted presentó.
            Por favor, complete correctamente los campos remarcados de abajo y haga clic en Enviar para volver a enviar el formulario.</p>
    <?php 
    } else {
        ?>
        <p>por favor, rellene sus datos a continuación y haga clic en Enviar.
            Los campos marcados con un asterisco (*) son obligatorios.</p>
    <?php 
    }
    ?>
    <form action = "" method = "post">
        <fieldset>
            <label for="nombreUsuario" <?php 
    validateField("nombreUsuario", $camposPendientes);
    ?>
>Introduce tu nombre * </label>
            <input type = "text" name = "nombreUsuario" id="nombreUsuario" value="<?php 
    setValue("nombreUsuario");
    ?>
">
            <label for="apellidos" <?php 
    validateField("apellidos", $camposPendientes);
    ?>
>y tus apellidos *</label>
            <input type = "text" name = "apellidos" id="apellidos" value="<?php 
    setValue("apellidos");
    ?>
" ><br><br>
            <label for="tipoMusica">¿Qué tipo de música te gusta escuchar?</label>
            <select name="tipoMusica[]" id="tipoMusica" size="4" multiple="multiple">
                <option value="Rock"<?php 
    setSelected("tipoMusica", "Rock");
    ?>
>Rock </option>
                <option value="Pop"<?php 
    setSelected("tipoMusica", "Pop");
    ?>
>Pop </option>
                <option value="Regee"<?php 
    setSelected("tipoMusica", "Regee");
    ?>
>Regee </option>
                <option value="Clásica"<?php 
    setSelected("tipoMusica", "Clásica");
    ?>
>Clásica </option>
            </select><br><br>
            ¿Que tipo de libros lees? <br>
            <label for="novelaNegra">Novela Negra</label>
            <input type="checkbox" name="tipoLibros[]" id="novelaNegra"
                   value="Novela Negra"<?php 
    setChecked("tipoLibros", "Novela Negra");
    ?>
><br>
            <label for="cienciaFiccion">Ciencia Ficción</label>
            <input type="checkbox" name="tipoLibros[]" id="cienciaFiccion"
                   value="Ciencia Ficción" <?php 
    setChecked("tipoLibros", "Ciencia Ficción");
    ?>
><br>
            <label for="fantasia">Fantasía</label>
            <input type="checkbox" name="tipoLibros[]" id="fantasia" value="Fantasía" <?php 
    setChecked("tipoLibros", "Fantasía");
    ?>
><br><br>
            <input type = "submit" name="enviar" value="Enviar">
        </fieldset>
    </form>
    <?php 
    pie();
}
Example #11
0
function displayThanks($mensajeFinal)
{
    cabecera();
    ?>
    <h1>Gracias</h1>
    <p>Gracias por enviar su foto<?php 
    if ($_POST["nombre"]) {
        echo ", " . $_POST["nombre"];
    }
    ?>
!</p>
    <?php 
    echo "<p>Esta es su {$foto}:</p>";
    ?>
<p><img src = "fotos/<?php 
    echo $_FILES["{$foto}"]["name"];
    ?>
" alt = "Foto" /></p>
    <?php 
    pie();
}
Example #12
0
function displayGracias()
{
    cabecera();
    ?>
    <h1>Final del formulario </h1>
    <?php 
    echo "Gracias ", $_POST["nombre"], " tu solicitud ha sido recibida";
    pie();
}
Example #13
0
function displayGracias()
{
    cabecera();
    ?>
    <h1>GRACIAS </h1>
    <?php 
    echo "Gracias ", $_POST["nombre"], " tu solicitud ha sido recibida";
    echo 'Esta es su foto: ';
    ?>
    <img src="./fotos/<?php 
    echo $_POST["foto"];
    ?>
">
    <?php 
    pie();
}
Example #14
0
function displayGracias()
{
    cabecera();
    ?>
    <h1>Final del formulario </h1>
    <?php 
    echo "Gracias ", $_POST["nombre"], " tendremos en cuenta que tienes especial interes en los siguientes deportes:";
    pie();
}