Ejemplo n.º 1
0
$randomColor = mt_rand(1, 4);
echo "<table id=\"lecke_number_in_tests\"><tr><td id=\"color{$randomColor}\"><div>{$numberOfFilledOutTests}</div></td></tr></table>";
?>
                <h4 style="text-align: right;">...tesztet töltött ki.</h4>
                <hr>
                <h4>A program végéig még...</h4>
                <?php 
$randomColor = mt_rand(1, 4);
echo "<table id=\"lecke_number_in_tests\"><tr><td id=\"color{$randomColor}\"><div>{$numberOfTestsThatAreLeft}</div></td></tr></table>";
?>
                <h4 style="text-align: right;">...tesztet kell (ajánlott) kitöltenie.</h4>
                <hr>
                <h4>Teljesítménye leckékre lebontva:</h4>
                <?php 
for ($i = 1; $i <= 5; $i++) {
    $statusInLecke = db_getStatusInLecke($userId, "lecke" . $i);
    if ($i % 2 == 0) {
        $igazit = "left";
    } else {
        $igazit = "right";
    }
    if ($i == 5) {
        $padding = "1.3em";
    } else {
        $padding = 0;
    }
    echo "<p style=\"text-align: {$igazit};font-style: italic;font-weight: bold;padding: 0 1em;\">{$i}. lecke</p>\n                          <div style=\"padding-bottom: {$padding};\" align=\"center\">\n                            <div id=\"progress{$i}\" class=\"graph\" align=\"left\">\n                                <div id=\"bar{$i}\" class=\"bar prog_color1\" style=\"width:{$statusInLecke}%\">\n                                    <p>{$statusInLecke}% teljesítve</p>\n                                </div>\n                            </div>\n                          </div>";
}
?>
                <hr>
                <h4>Legutóbbi 5 tevékenysége:</h4>
Ejemplo n.º 2
0
$active = "lecke";
$color = "magenta";
include_once 'includes/config.php';
//session_start();
if (!isset($_SESSION["is_auth"])) {
    header('location: login.php?msg=1');
    exit;
}
include 'includes/header.php';
$userId = $_SESSION['userId'];
$timeWindowName = $_SESSION['timeWindowName'];
$userFirstName = $_SESSION['userFirstName'];
$userLastLogin = date("Y.m.d.", strtotime($_SESSION['userLastLogin'])) . " nap " . date("H", strtotime($_SESSION['userLastLogin'])) . " óra " . date("i", strtotime($_SESSION['userLastLogin'])) . " perckor";
$statusInFullProgram = db_getStatusInFullProgram($userId);
$statusInLecke = db_getStatusInLecke($userId, $timeWindowName);
if (pregMatch_oneNumberFromString($timeWindowName)) {
    $numberOfLecke = pregMatch_oneNumberFromString($timeWindowName);
    $vid_title = $numberOfLecke . ". lecke videóanyagának megnyitása. (Ha szünetet tartana, csak állítsa meg, a rendszer megjegyzi, hol tartott.)";
    if ($numberOfLecke == 1) {
        $vidId = "rPMh2fETxEg";
    }
    if ($numberOfLecke == 2) {
        $vidId = "U6zt9S_dzlE";
    }
} else {
    $numberOfLecke = "";
    $vid_title = "Videó jelenleg nem elérhető.";
}
$randomColor1 = mt_rand(1, 4);
do {