Anhang C "Index“ PHP Seitenaufbau (index.php)

zurück zur Seite des Unterrichtsszenarios

header.php
<?php
 
/*!
 * header.php v4.2.0 (for Thesis Project)
 * Copyright (C) 2016 Simon Marik <simon.marik@univie.ac.at>
 * Licensed under the GNU General Public License v3.0
 */
 
/**
* HEADER FILE
* @param  void
* @var    string    $out 
* @return $out
*/
 
$out = '<!DOCTYPE html>
        <!--
           Thesis Project v4.2.0
           Copyright (C) 2016 Simon Marik <simon.marik@univie.ac.at>
           Licensed under the GNU General Public License v3.0
        -->
        <html lang="de">
            <head>
                <meta http-equiv="content-type" content="text/html; charset=utf-8">
                <meta name="author" content="Simon Marik">
                <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
                <title>Thesis Projekt</title>
                <link rel="stylesheet" type="text/css" href="layout.css">
            </head>
            <body>
                <nav>
                    <ul>
                        <li><a href="index.html">Thesis Projekt</a></li>
                        <li><a href="about.html"> ̈Uber</a></li>
                    </ul>
                </nav>';
echo $out;
?>
index.php
<?php
 
/*!
 * index.php v4.2.0 (for Thesis Project)
 * Copyright (C) 2016 Simon Marik <simon.marik@univie.ac.at>
 * Licensed under the GNU General Public License v3.0
 */
 
/**
* INDEX FILE
* @param  void
* @uses   function   require_once()
* @var    string     $title
* @var    string     $out
* @return $out
*/
 
session_start();
$title = 'INDEX';
 
define('ROOT', './');
require_once(ROOT.'core/header.php');
$out = '<main>
            <div class="container">
                <div class="row">
                    <div class="col-12">
                        <div class="jumbotron">
                            <h1>Hallo miteinander!</h1>
                            <p>Lorem ipsum</p>
                            <p>Lorem ipsum</p>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-6">
                        <div class="well">
                            <h2>Quicklinks</h2>
                            <hr>
                            <ul>
                                <li><p><a href="about.html"> ̈Uber</a></p></li>
                                <li><p><a href="mailto:simon.marik@univie.ac.at">Kontakt</a></p></li>
                            </ul>
                        </div>
                    </div>
                    <div class="col-6">
                        <div class="well">
                            <h2>Login</h2>
                            <hr>
                            <form class="form-signin" action=".ROOT.’core/scr/scr.signin.php" method="post" autocomplete="off">
                                <input type="text" name="inputUsername" id="inputUsername"><br>
                                <input type="password" name="inputPassword" id="inputPassword">
                                <input type="checkbox" name="remember" value="remember-me"> Merken<br>
                                <button class="btn" id="submit" type="submit">Anmelden</button>
                                <button class="btn" id="reset" type="reset">Reset</button>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </main>';
echo $out;
require_once(ROOT.'core/footer.php');
?>
footer.php
<?php
 
/*!
 * footer.php v4.2.0 (for Thesis Project)
 * Copyright (C) 2016 Simon Marik <simon.marik@univie.ac.at>
 * Licensed under the GNU General Public License v3.0
 */
 
/**
* FOOTER FILE
* @param  void
* @var    string    $out 
* @return $out
*/
 
$out = '<footer>
            <p>Thesis Projekt v4.2.0 &copy;2016 
                <a href="mailto:simon.marik@univie.ac.at">Simon Marik</a>
            </p>
        </footer>
    </body>
</html>';
echo $out; 
?>