当前位置: 首页>>代码示例>>PHP>>正文


PHP Courses::addCourseLink方法代码示例

本文整理汇总了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");
开发者ID:nagyist,项目名称:Samarthya,代码行数:31,代码来源:dac.courseDetails.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);
开发者ID:nagyist,项目名称:Samarthya,代码行数:31,代码来源:dac.courses.php


注:本文中的Courses::addCourseLink方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。