本文整理汇总了PHP中Courses::addCourseLink方法的典型用法代码示例。如果您正苦于以下问题:PHP Courses::addCourseLink方法的具体用法?PHP Courses::addCourseLink怎么用?PHP Courses::addCourseLink使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Courses
的用法示例。
在下文中一共展示了Courses::addCourseLink方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: basename
$returnInf = '';
$do = $_POST["coursedetailsOperation"];
$idCourseLinks = $_POST["idCourseLinks"];
$courseId = '';
if (!isset($_POST["view-courseName2"])) {
$courseId = $_POST["setCourseName"];
} else {
$courseId = $_POST["view-courseName2"];
}
$title = $_POST["addcourse-titleName"];
$engvideoLInk = $_POST["addcourse-EngVideoLink"];
$hinvideoLInk = $_POST["addcourse-HinVideoLink"];
$telvideoLInk = $_POST["addcourse-TelVideoLink"];
$engvideoLInk = str_replace("watch?v=", "embed/", $engvideoLInk);
$hinvideoLInk = str_replace("watch?v=", "embed/", $hinvideoLInk);
$telvideoLInk = str_replace("watch?v=", "embed/", $telvideoLInk);
$engPDFLink = basename($_FILES["addcourse-EngBookLink"]["name"]);
// Upload
$target_file = "../PDF-Text/Course-" . $courseId . "/" . $engPDFLink;
if (isset($_FILES['addcourse-EngBookLink'])) {
if (move_uploaded_file($_FILES["addcourse-EngBookLink"]["tmp_name"], $target_file)) {
$returnInf = 'Success';
}
}
$courseObj = new Courses();
if ($do == 'Add') {
$courseObj->addCourseLink($courseId, $title, $engvideoLInk, $engPDFLink, $hinvideoLInk, '', $telvideoLInk, '');
} else {
$courseObj->updateCourseLink($idCourseLinks, $courseId, $title, $engvideoLInk, $engPDFLink, $hinvideoLInk, '', $telvideoLInk, '');
}
header("location: ../manage-courses.php");
示例2: Courses
if ($action == 'DeleteCourse') {
$idCourses = $_GET["idCourses"];
$course = new Courses();
$course->deleteCourses($idCourses);
} else {
if ($action == 'AddNewCourseDetails') {
$courseId = $_GET["courseId"];
$title = $_GET["title"];
$courseEngVideo = $_GET["courseEngVideo"];
$courseEngPDF = $_GET["courseEngPDF"];
$courseHinVideo = $_GET["courseHinVideo"];
$courseHinPDF = $_GET["courseHinPDF"];
$courseTelVideo = $_GET["courseTelVideo"];
$courseTelPDF = $_GET["courseTelPDF"];
$course = new Courses();
$course->addCourseLink($courseId, $title, $courseEngVideo, $courseEngPDF, $courseHinVideo, $courseHinPDF, $courseTelVideo, $courseTelPDF);
} else {
if ($action == 'DeleteCourseDetails') {
$idCourseLinks = $_GET["idCourseLinks"];
$courseName = $_GET["courseName"];
$title = $_GET["title"];
$course = new Courses();
$course->deleteCourseLink($idCourseLinks, $courseName, $title);
} else {
if ($action == 'AddUserVisitedHistory') {
$courseLinksID = $_GET["courseLinksID"];
$userID = $_GET["userID"];
$CourseID = $_GET["CourseID"];
$View = '1';
$course = new Courses();
$course->activateCoursesDetails($courseLinksID, $userID, $CourseID, $View);