$intError = 0; } if (trim($_POST["mname"]) == "") { $strErrormessage .= "Please enter module name.<br>"; $intError = 0; } if (trim($_POST["fname"]) == "") { $strErrormessage .= "Presenter file should not be empty.<br>"; $intError = 0; } /*if($hldGlobal->fnCheckDescription($_POST["mdescription"]) == ""){ $strErrormessage .= "Please enter module description.<br>"; $intError = 0; }*/ if (trim($_POST["mname"]) != "") { if ($hldGlobal->fnCheckMoudleName(addslashes(trim($_POST["mname"])), trim($_POST["course_id"]), $_POST["course_id"])) { $strErrormessage .= "Module name already added.<br>"; $intError = 0; } } if ($hldGlobal->fnCheckFname(trim($_POST["fname"]))) { $strErrormessage .= "Presenter file name already present.<br>"; $intError = 0; } if (is_array($_FILES["img"]) && $_FILES["img"]["error"] == 0) { list($width, $height, $type, $attr) = getimagesize($_FILES['img']['tmp_name']); $arrPathInfo = pathinfo($_FILES["img"]["name"]); $strExtension = $arrPathInfo["extension"]; list($usec, $sec) = explode(" ", microtime()); $filename = $arrPathInfo["filename"] . $usec . $sec . "." . $arrPathInfo["extension"]; $uploaddir = '../images/upload';
$intError = 0; } if (trim($_POST["mname"]) == "") { $strErrormessage .= "Please enter module name.<br>"; $intError = 0; } if (trim($_POST["fname"]) == "") { $strErrormessage .= "Presenter file should not be empty.<br>"; $intError = 0; } /*if($hldGlobal->fnCheckDescription($_POST["mdescription"]) == ""){ $strErrormessage .= "Please enter module description.<br>"; $intError = 0; }*/ if (trim($_POST["mname"]) != "") { if ($hldGlobal->fnCheckMoudleName(trim($_POST["mname"]), $_POST["course_id"], $_GET["id"])) { $strErrormessage .= "Module name already added.<br>"; $intError = 0; } } if ($hldGlobal->fnCheckFname(trim($_POST["fname"]), $_GET["id"])) { $strErrormessage .= "Presenter file name already present.<br>"; $intError = 0; } if (is_array($_FILES["img"]) && $_FILES["img"]["error"] == 0) { list($width, $height, $type, $attr) = getimagesize($_FILES['img']['tmp_name']); $arrPathInfo = pathinfo($_FILES["img"]["name"]); $strExtension = $arrPathInfo["extension"]; list($usec, $sec) = explode(" ", microtime()); $filename = $arrPathInfo["filename"] . $usec . $sec . "." . $arrPathInfo["extension"]; $uploaddir = '../images/upload';