Solucio cap peus php2

De wikiserver
La revisió el 16:12, 31 oct 2014 per Asalinas (Discussió | contribucions) (Es crea la pàgina amb «cappeu.php <source lang="html"> <!DOCTYPE HTML> <html> <head> <title>Intranet</title> <link rel="stylesheet" type="text/css" href="files/estilos.css" …».)
(dif) ← Versió més antiga | Versió actual (dif) | Versió més nova → (dif)
Dreceres ràpides: navegació, cerca

cappeu.php

<!DOCTYPE HTML>
<html>
    <head>
        <title>Intranet</title>
        <link rel="stylesheet" type="text/css" href="files/estilos.css" />
    </head>
    <body>
        <header id="cap">
            <?php
            include "files/cap.php";
            ?>
        </header>

            <aside id="menu">
                <?php
                include "files/menu.php";
                ?>
            </aside>

            <section id="contenido">
                <?php
                include "files/contenido.php";
                ?>
            </section>



        <footer id="peu">
            <?php
            include "files/peu.php";
            ?>
        </footer>

    </body>
</html>

Estilos.css

html{
    font-family: "Arial";
}

#cap{
    top: 0px;
    width: 100%;
    background-color: red;
    
}

#peu{
    position: fixed;
    bottom: 0px;
    width: 100%;
    background-color: blue;
}

#menu
{
    width: 20%;
    float:left;
}
#contenido{
    width:70%;
    float:left;
}

Cap.php

<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

echo "<H1>INTRANET DE DAW2</H1>";

menu.php

<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 * HOME
 * Acerca de Nosotros
 */
echo "<a href='cappeu.php?opt=home'>Home</a><br>";
echo "<a href='cappeu.php?opt=AcercaDe'>Acerca de</a>";

Contenido.php

<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

if(isset($_REQUEST["opt"])){
    $opt = $_REQUEST["opt"];
    switch($opt){
        case "AcercaDe":
            include 'files/acercade.php';
            break;
        default:
            include 'files/home.php';
    }   
}
else {
    include 'files/home.php';
}

Peu.php

<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

echo "Creado por 2nDAW";

Home.php

home
 To change this license header, choose License Headers in Project Properties.
 To change this template file, choose Tools | Templates
 and open the template in the editor.

Acercade.php

ACERCA DE
To change this license header, choose License Headers in Project Properties.
 o change this template file, choose Tools | Templates
and open the template in the editor.