Exemplo n.º 1
0
<?php

/* Copyright (c) H. Reimers reimers@heye-tammo.de*/
require_once '../preload.php';
//Create Session an load Config
check_login_logout("eingabe");
//Test if Session is valid ($step)
test_session(2);
//print_r($_SESSION);
$lastpage = "picture_rotage.php";
//$nextpage="picture_crop2.php";
$nextpage = "data_input.php";
$filename = $_SESSION["image_temp_filename"];
$settings = $_SESSION["settings"];
//Bild drehen
if (isset($_POST["rotage"])) {
    $_SESSION["rotage"] = $_POST["rotage"];
}
//Bilddaten bestimmen, ist für die größe der CSS-Container wichtig
$settings = $_SESSION["settings"];
$image_height = $settings["show_picture_max_height"];
$image_width = $settings["show_picture_max_width"];
//echo "image_height:$image_height-image_width:$image_width<br>"; //Debug
if ($image_height > $image_width) {
    //hochformat
    $max_xy = $image_height;
    $img_padding = $image_height - $image_width;
} else {
    //querformat
    $max_xy = $image_width;
    $img_padding = ($image_width - $image_height) / 2;
Exemplo n.º 2
0
<?php

/* Copyright (c) H. Reimers reimers@heye-tammo.de*/
require_once '../preload.php';
//Create Session an load Config
check_login_logout("eingabe");
$lastpage = "index.php";
//Test if Session is valid ($step)
test_session(0);
$debug = 0;
//Start Page ($tilte, $style,$script,$meta,$body)
echo create_header($_SESSION["settings"]["html_title"], "", "", "", "", "logolisa.svg", false);
if (!isset($_POST["part1"]) or !isset($_POST["part2"]) or !isset($_POST["part3"])) {
    error_msg("Es fehlen Daten");
} else {
    $part1 = trim($_POST["part1"]);
    $part2 = trim($_POST["part2"]);
    $part3 = trim($_POST["part3"]);
}
$error_msg = "";
//Prüfe allgemeinen Aufbau (Quersumme muss %10=0 sein
if (quersumme($part2) % 10 != 0) {
    $error_msg .= "Der Block 2 ist fehlerhaft<br>";
}
//Prüfe allgemeinen Aufbau (Quersumme muss %10=0 sein)
if (quersumme($part3) % 10 != 0) {
    $error_msg .= "Der Block 3 ist fehlerhaft<br>";
}
if ($error_msg != "") {
    echo "\n\t\t\t<h3>Bitte geben Sie die TAN ein!</h3>\n\t\t\t<p>\n\t\t\t\t<form action='check_tan.php' method='POST' >\n\t\t\t\t\t<input type='text' name='part1' size='5' value='{$part1}'> -\n\t\t\t\t\t<input type='text' name='part2' size='5' value='{$part2}'> -\n\t\t\t\t\t<input type='text' name='part3' size='5' value='{$part3}'> -\n\t\t\t\t\t<input type='submit' value='weiter'>\n\t\t\t\t</form>\n\t\t\t</p>\t";
    error_msg($error_msg);
Exemplo n.º 3
0
<?php

/* Copyright (c) H. Reimers reimers@heye-tammo.de*/
require_once '../preload.php';
//Create Session an load Config
check_login_logout("eingabe");
$debug = 0;
if (isset($_SESSION["debug"])) {
    $debug = $_SESSION["debug"];
}
$lastpage = "picture_load_file.php";
$nextpage = "picture_rotage.php";
//Test if Session is valid ($step)
test_session(1);
$max_width = $_SESSION["settings"]["show_picture_max_width"];
$max_height = $_SESSION["settings"]["show_picture_max_height"];
$error = 1;
//zunächst wird von einem Fehler ausgegangen, wenn Upload OK-> $error=0;
//Teste ob eine Datei hochgeladen wurde
if (isset($_FILES["file"]["error"]) and isset($_FILES["file"]["name"])) {
    if ($_FILES["file"]["error"] == 0) {
        //Teste Dateiendung
        $imgtype = imagetype($_FILES["file"]["name"]);
        if ($imgtype != "UNKNOWN") {
            $_SESSION["image_type"] = $imgtype;
            $filename = $_SESSION["temp_image_file_path"] . ".{$imgtype}";
            $_SESSION["image_temp_filename"] = $filename;
            $_SESSION["image_temp_modified_filename"] = $_SESSION["temp_image_file_path"] . ".modified.{$imgtype}";
            //Kopiere Datei
            if (move_uploaded_file($_FILES["file"]["tmp_name"], $_SESSION["image_temp_filename"])) {
                $msg = "Datei ist valide und wurde erfolgreich hochgeladen.\n";
Exemplo n.º 4
0
<?php

/* Copyright (c) H. Reimers reimers@heye-tammo.de*/
require_once '../preload.php';
//Create Session an load Config
check_login_logout("eingabe");
$debug = 0;
if (isset($_SESSION["debug"])) {
    $debug = $_SESSION["debug"];
}
$nextpage = "index.php";
test_session(4);
//preecho($_SESSION);
$error = 0;
$error_msg = "Fehler!<br>\n";
$filename = $_SESSION["image_temp_filename"];
$settings = $_SESSION["settings"];
//Daten übernehmen;
$given_name = $_SESSION["given_name"];
$last_name = $_SESSION["last_name"];
$birthday = $_SESSION["birth_day"] . "." . $_SESSION["birth_month"] . "." . $_SESSION["birth_year"];
$class = $_SESSION["class"];
if (isset($_SESSION["tan"])) {
    //Prüfen ob die TAN vorhanden ist
    $tan_exists = false;
    //Grundannahme: TAN existiert nicht
    $filename = $_SESSION["lisa_path"] . "/" . $_SESSION["settings"]["tan_list.txt"];
    if ($handle = @fopen($filename, "r")) {
        while (!feof($handle)) {
            $zeile = trim(fgets($handle, 1024));
            $zeile = str_replace(" ", "", $zeile);
Exemplo n.º 5
0
<?php

/* Copyright (c) H. Reimers reimers@heye-tammo.de*/
require_once '../preload.php';
//Create Session an load Config
check_login_logout("eingabe");
$debug = 0;
if (isset($_SESSION["debug"])) {
    $debug = $_SESSION["debug"];
}
$lastpage = "picture_crop.php";
$nextpage = "data_save.php";
//Test if Session is valid ($step)
test_session(3);
//preecho($_SESSION);
if (isset($_POST["x"]) and isset($_POST["y"]) and isset($_POST["w"]) and isset($_POST["h"])) {
    $_SESSION["crop_x"] = round($_POST["x"]);
    $_SESSION["crop_y"] = round($_POST["y"]);
    $_SESSION["crop_w"] = round($_POST["w"]);
    $_SESSION["crop_h"] = round($_POST["h"]);
}
$error = 1;
//Zunächst wird von einem Fehler ausgegangen
$msg = "Unbekannter Fehler!<br>";
$filename = $_SESSION["image_temp_filename"];
//$settings=$_SESSION["settings"];
$configfile = $_SESSION["lisa_path"] . "/" . $_SESSION["settings"]["classes.csv"];
//Klassen einlesen
$classes = read_classes_from_csv($configfile);
if ($debug != 0) {
    echo "<pre>CLASSES:\n";