Example #1
0
File: index.php Project: engel/yase
<?php

require_once "classes/YASE/Framework.php";
require_once "classes/Template.php";
Template::head();
Template::leftbar();
?>
<br>
<H1> About YASE </H1>
<br><br>

<p>
YASE lets you put your webpages into a database where you can search them.
</p>

<?php 
Template::bottom();
Example #2
0
 public static function admintop()
 {
     Template::login();
     Template::head();
     Template::leftbar();
 }
Example #3
0
<?php

/**
 * Author: Rene Kremer
 * Date: 20.08.15
 * Time: 13:27
 * Version 1.0
 *
 * Description: Main App to roll the dices
 */
include 'templates/template.class.php';
include "dice.class.php";
$template = new Template("templates", "img");
$template->header();
$template->head();
// check if first time or reroll
if (isset($_GET["dice"]) || isset($_GET["numberOfDices"])) {
    $dice = new Dice($_GET["dice"], $_GET["numberOfDices"]);
    $value = $_GET["dice"];
} else {
    if (isset($_POST["dice"]) && isset($_POST["dice"])) {
        $dice = new Dice($_POST["dice"], $_POST["numberOfDices"]);
        $value = $_POST["dice"];
    } else {
        //echo file_get_contents("templates/errorWrongDice.tpl");
        return false;
    }
}
if (!$dice->wrongDice && $template->showDice($value)) {
    $dice->roll();
}
Example #4
0
<?php

/**
 * Author: Rene Kremer
 * Date: 20.08.15
 * Time: 13:27
 * Version: 1.0
 */
include 'templates/template.class.php';
$template = new Template("templates", "img");
$template->header("header.tpl");
$template->head("head.tpl");
$template->openContent();
$template->setContent('<p>This app rolls a given number of dices</p>

        <form action="rollDice.php" method="post">
        <table>
            <tr>
                <td>Number of Dices:</td>
                <td><input name="numberOfDices" placeholder="Default is 1"/></td>
            </tr>
            </table>
            <table>
            <tr>
            <td><label><input type="radio" name="dice" value="d4"/><img src="img/d4.png" alt="d4"/></label></td>
            <td><label><input type="radio" name="dice" value="d6"/><img src="img/d6.png" alt="d6"/></label></td>
            <td><label><input type="radio" name="dice" value="d8"/><img src="img/d8.png" alt="d8"/></label></td>
            </tr>
            <tr>
            <td/>
            <td><label><input type="radio" name="dice" value="d10"/><img src="img/d10.png" alt="d10"/></label></td>