예제 #1
0
     }
 } else {
     $assignment = new Assignment($conn, 0);
     $flag = true;
 }
 if (isset($_POST['checkbox'])) {
     $assignment->deleteAttachments($conn, $_POST['checkbox']);
 }
 if (isset($_POST['skName']) && $_POST['skName'] != $assignment->getSkName()) {
     $assignment->setSkName($conn, $_POST['skName']);
 }
 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'])) {