function loadNote() { $db = new LectureNote(); $course_id = $db->getCourseId($_POST["lecturecourse"]); $note = $db->getNote($_POST["order"]); $jsonarray = array(); $jsonarray[0]["content"] = $contentArray[5]; print json_encode($jsonarray); }
//round(microtime(true)) . '.' . end($temp);//// //filename $uploadOk = 1; $imageFileType = strtolower($temp[1]); // Check if file already exists // Check file size if ($_FILES["file_name"]["size"] > 50000000000) { // echo "Sorry, your file is too large."; $uploadOk = 0; } // Allow certain file formats if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg" && $imageFileType != "gif" && $imageFileType != "pdf") { // echo "Sorry, only JPG, JPEG, PNG , GIF & PDF files are allowed."; $uploadOk = 0; } // Check if $uploadOk is set to 0 by an error if ($uploadOk == 0) { // echo "Sorry, your file was not uploaded."; // if everything is ok, try to upload file } else { if (move_uploaded_file($_FILES["file_name"]["tmp_name"], $target_dir . $newfilename)) { $upload_result = "SUCCESS"; //echo "The file ". basename( $_FILES["file_name"]["name"]). " has been uploaded."; } } $db = new LectureNote(); $c_id = $db->getCourseId($_POST["lecturecourse"]); $result = $db->insertPage($c_id, $_POST["lecturenumber"], $_POST["input_page"], $newfilename); } ?>