Exemplo n.º 1
0
    if (isset($_POST['engName']) && $_POST['engName'] != $assignment->getEngName()) {
        $assignment->setEngName($conn, $_POST['engName']);
    }
    if (isset($_POST['skTextPopis']) && $_POST['skTextPopis'] != $assignment->getSkTxt()) {
        $assignment->setSkTxt($conn, $_POST['skTextPopis']);
    }
    if (isset($_POST['engTextPopis']) && $_POST['engTextPopis'] != $assignment->getEngTxt()) {
        $assignment->setEngTxt($conn, $_POST['engTextPopis']);
    }
    if (isset($_POST['textVideo']) && $_POST['textVideo'] != "") {
        $assignment->uploadVideo($conn, $_POST['textVideo']);
    }
    if (isset($_FILES['uploadedFiles'])) {
        $fileCount = count($_FILES['uploadedFiles']["name"]);
        if ($fileCount != 0 && $_FILES['uploadedFiles']["name"][0] != "") {
            $assignment->uploadFiles($conn, $_FILES['uploadedFiles']);
        }
    }
    $assignment->setAttachments($conn);
    if (isset($_GET['action'])) {
        $action = (int) $_GET['action'];
        if ($action == 1) {
            ?>
 <meta http-equiv="refresh" content="0;url=assignment.php?id=<?php 
            echo $assignment->getId();
            ?>
"><?php 
        } else {
            if ($action == 2) {
                ?>
 <meta http-equiv="refresh" content="0;url=prehladZadani.php"><?php