本文整理汇总了PHP中Courses类的典型用法代码示例。如果您正苦于以下问题:PHP Courses类的具体用法?PHP Courses怎么用?PHP Courses使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Courses类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: youtubeBuilder
/**
* Description of dac
*
* @author user1
*/
function youtubeBuilder($courseID)
{
$courseObj = new Courses();
$json = $courseObj->viewCourseFullDetails($courseID);
$dejson = json_decode($json);
$html = '';
for ($ind = 0; $ind < count($dejson); $ind++) {
$subcourseId = $dejson[$ind]->{'idCourseLinks'};
$courseId = $dejson[$ind]->{'courseID'};
$title = $dejson[$ind]->{'title'};
$engVideo = $dejson[$ind]->{'courseEngVideoLink'};
$hindiVideo = $dejson[$ind]->{'courseEngVideoLink'};
$telVideo = $dejson[$ind]->{'courseEngVideoLink'};
$engPDF = $dejson[$ind]->{'courseEngPDFLink'};
$html .= '<div class="col-xs-12 col-xs-6 col-md-4">';
$html .= '<div class="course-video">';
$html .= '<h5 class="course-title">' . $title . '</h5>';
if (isset($engVideo)) {
$html .= '<div id="englishVideo" align="center" class="video-frame">';
$html .= '<iframe width="92%" height="80%" src="' . $engVideo . '" frameborder="0" allowfullscreen></iframe>';
$html .= '</div>';
} else {
if (isset($hindiVideo)) {
$html .= '<div id="hindiVideo" align="center" class="video-frame">';
$html .= '<iframe width="92%" height="80%" src="' . $hindiVideo . '" frameborder="0" allowfullscreen onclick="alert(\\"English Video\\")"></iframe>';
$html .= '</div>';
} else {
if (isset($telVideo)) {
$html .= '<div id="teluguVideo" align="center" class="video-frame">';
$html .= '<a href="' . $telVideo . '"';
$html .= '<iframe width="92%" height="80%" src="' . $telVideo . '" frameborder="0" allowfullscreen></iframe>';
$html .= '</a>';
$html .= '</div>';
}
}
}
$html .= '<div>';
$html .= '<a href="' . $engVideo . '" target="new"><div class="english"></div></a>';
$html .= '<a href="' . $hindiVideo . '" target="new"><div class="hindi"></div></a>';
$html .= '<a href="' . $telVideo . '" target="new"><div class="telugu"></div></a>';
$html .= '<a href="' . $engPDF . '" target="new" onclick="pdfDownloadLogs(\'' . $title . '\',\'' . $subcourseId . '\',\'' . $courseId . '\')">';
$html .= '<div class="pdf-download"></div>';
$html .= '</a>';
$html .= '</div>';
$html .= '</div>';
$html .= '</div>';
}
return $html;
}
开发者ID:nagyist,项目名称:Samarthya,代码行数:54,代码来源:dac.youtube.php
示例2: actionShow
public function actionShow()
{
$auth = Auth::checkAuth();
if ($auth) {
$user = Users::findOneByPK($auth);
$user->getProfile();
}
$course_id = $_GET['course_id'];
$view = new View();
// $view->user_login = $user->user_login;
// $view->user_group = $user->user_group;
if (isset($course_id)) {
$lessons = Lessons::findAllByColumn('parent_id', $course_id);
$course = Courses::findOneByPK($course_id);
$crumbs = Breadcrumbs::getCrumbs($course);
$view->crumbs = $crumbs;
$view->user = $user;
$view->lessons = $lessons;
$view->page_title = $course->name;
$view->display('header.php');
$view->display('lessons/list.php');
$view->display('footer.php');
} else {
throw new ControllerException('Невозможно отобразить список уроков для данного курса', '404');
}
}
开发者ID:AK-VoronM,项目名称:edu-znatok,代码行数:26,代码来源:LessonsController.php
示例3: actionShowLesson
public function actionShowLesson()
{
$auth = Auth::checkAuth();
$view = new View();
$view->auth = $auth;
if (!isset($_GET['id'])) {
header("Location: /learns/");
}
if ($auth) {
$user = Auth::getUser();
$id = $_GET['id'];
$lesson = Lessons::getLesson($id);
$course = Courses::getCourse($lesson->course_id);
$lesson_prew = Lessons::getLessonByNumber($lesson->lesson_number - 1, $lesson->course_id);
$lesson_next = Lessons::getLessonByNumber($lesson->lesson_number + 1, $lesson->course_id);
$view->user_login = $user->user_login;
$view->user_group = $user->user_group;
$view->lesson = $lesson;
$view->course = $course;
$view->lesson_prew = $lesson_prew;
$view->lesson_next = $lesson_next;
$view->display('header.php');
$view->display('lessons/lesson_view.php');
$view->display('footer.php');
} else {
header("Location: /learns/");
}
}
开发者ID:AK-VoronM,项目名称:learns,代码行数:28,代码来源:LessonsController.php
示例4: add_new_class_franchise
public function add_new_class_franchise()
{
$currentPage = "CLASSES_FRANCHISE";
$mainMenu = "CLASSES_MAIN";
$franchiseeCourses = Courses::where('franchisee_id', '=', Session::get('franchiseId'))->get();
$franchiseeBaseprice = ClassBasePrice::getBasePricebyFranchiseeId();
$getAllClassesForFranchise = Classes::getAllClassesForFranchise();
for ($i = 0; $i < sizeof($getAllClassesForFranchise); $i++) {
$courseMasterId = Courses::where('id', '=', $getAllClassesForFranchise[$i]['course_id'])->get();
$courseMasterId = $courseMasterId[0];
$courseName = CoursesMaster::where('id', '=', $courseMasterId['master_course_id'])->get();
$courseName = $courseName[0];
$getAllClassesForFranchise[$i]['course_name'] = $courseName['course_name'];
$getBasePrice = ClassBasePrice::where('base_price_no', '=', $getAllClassesForFranchise[$i]['base_price_no'])->get();
$getBasePrice = ClassBasePrice::where('base_price_no', '=', $getAllClassesForFranchise[$i]['base_price_no'])->get();
//$getBasePrice = $getBasePrice[0];
if ($getAllClassesForFranchise[$i]['base_price_no'] == 0) {
$getAllClassesForFranchise[$i]['base_price'] = '';
} else {
$getAllClassesForFranchise[$i]['base_price'] = $getBasePrice[0]['base_price'];
}
}
//return $getAllClassesForFranchise;
return View::make('pages.classes.add_new_class_franchise', compact('currentPage', 'mainMenu', 'franchiseeCourses', 'franchiseeBaseprice', 'getAllClassesForFranchise'));
}
开发者ID:Headrun-php,项目名称:TLG,代码行数:25,代码来源:ClassesController.php
示例5: actionShow
public function actionShow()
{
$id = $_GET['id'];
$auth = Auth::checkAuth();
if ($auth) {
$user = Users::findOneByPK($auth);
$user->getProfile();
}
$courses = Courses::findAllByColumn('parent_id', $id);
$view = new View();
$view->user = $user;
$view->courses = $courses;
// $view->user_login = $user->user_login;
// $view->user_group = $user->user_group;
$parent_course = Courses::findOneByPK($id);
$crumbs = Breadcrumbs::getCrumbs($parent_course);
$view->crumbs = $crumbs;
$view->page_title = $parent_course->name;
$view->display('header.php');
if (isset($id)) {
$view->display('courses/child-list.php');
} else {
$view->display('courses/list.php');
}
$view->display('footer.php');
}
开发者ID:AK-VoronM,项目名称:edu-znatok,代码行数:26,代码来源:CoursesController.php
示例6: index
function index()
{
$coursesModel = new Courses();
$coursesList = $coursesModel->getAllCourses();
$lorem = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla libero neque, dictum ac adipiscing non, auctor at justo. Mauris sit amet enim tortor, nec porta quam. In posuere tempus eros, consequat congue diam imperdiet tristique. Maecenas ipsum arcu, porta a congue sit amet, convallis sed massa. Cras eros libero, dictum non gravida non, sagittis et ligula. Aenean in ligula eget odio cursus egestas vitae vel nisi. Maecenas a augue metus, ac egestas nulla. Suspendisse ac mauris tortor, eget condimentum ligula. Duis dolor diam, sagittis vel egestas nec, sollicitudin rutrum lectus. Donec et tellus et tortor cursus sollicitudin in et odio. Aenean sit amet diam sapien. Integer ut tellus nec quam dignissim pellentesque ut at nulla. Nullam et eros nibh. Proin vitae arcu ac ligula fermentum pellentesque a quis nulla. Sed venenatis consectetur mattis. Proin id neque orci.
Donec sit amet dolor non arcu elementum faucibus. Nam consequat magna ac nunc faucibus vitae dignissim velit hendrerit. Curabitur vitae sapien vitae elit pellentesque sagittis sed eget justo. Phasellus a nisi mi. Mauris condimentum, quam id elementum consequat, libero sem venenatis tellus, in dapibus libero purus a orci. Praesent vel accumsan ligula. Sed rutrum fermentum scelerisque. Integer turpis lacus, luctus sit amet convallis eu, ultrices ac lorem. Nam et dolor eros. Maecenas eget urna mi. Aliquam erat volutpat. Curabitur vel mauris metus, sed condimentum quam. Vestibulum arcu mauris, posuere nec molestie nec, ornare et velit.
Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla facilisi. Etiam eu eros turpis, sed tempus nisl. Nullam ut ante lacus. Nam sit amet commodo augue. Etiam eget augue non felis fringilla bibendum. Duis et magna ligula. Ut at nisl diam, eget adipiscing tortor. Cras dignissim consequat viverra. Donec porttitor vestibulum elit, quis ultricies nisl condimentum eget. Ut imperdiet, dui sed pulvinar cursus, tellus orci iaculis nibh, in molestie tellus nisl non urna.
Morbi ornare turpis at elit fermentum ut placerat velit mollis. Donec ac orci nec ipsum euismod malesuada et mattis orci. Suspendisse ante mauris, suscipit ut porttitor nec, luctus porttitor turpis. Morbi nec leo at massa ullamcorper dictum. Aliquam gravida libero id dui tempor eu elementum libero hendrerit. Vivamus lacinia porta leo, ut auctor purus congue non. Suspendisse eget nibh risus. Nunc nec metus mi, ac fermentum nulla. Etiam pharetra nisl et tellus consectetur eleifend. Ut sed malesuada justo. Vivamus pretium facilisis turpis. Curabitur quis turpis augue, convallis placerat ipsum. Curabitur et libero luctus sapien eleifend pellentesque. Mauris blandit ullamcorper turpis, eu elementum ipsum porttitor ac. Aenean fermentum vehicula libero, ac malesuada est tincidunt ac. Etiam quis hendrerit tortor. Proin vitae erat consectetur neque consequat pulvinar.
Duis suscipit libero nec mauris vestibulum laoreet. Suspendisse lobortis bibendum felis, id porta sem tincidunt at. Phasellus leo magna, viverra id suscipit in, varius in metus. Nunc gravida tincidunt eros et lacinia. Suspendisse potenti. Donec congue porttitor lectus, sed ullamcorper neque consequat condimentum. Mauris ligula quam, ornare at posuere at, vulputate ut lorem. Proin blandit magna vel metus iaculis semper. Curabitur eleifend euismod metus blandit molestie. Fusce non lorem libero. Nulla ac lorem sed nunc porta euismod sit amet ac erat. Cras ante est, porttitor et sollicitudin a, vehicula ac velit. Integer eget facilisis orci. Integer in metus nibh. Vivamus at ante sem, sed volutpat massa. ';
$data = array('leftColumn' => $coursesList, 'content' => $lorem, 'rightColumn' => $lorem);
$this->load->view('template/welcome', $data);
}
开发者ID:mayurz,项目名称:cidmel,代码行数:16,代码来源:welcome.php
示例7: actionTest
public function actionTest()
{
$course = Courses::findOneByPK(11);
$course->delete();
var_dump($course);
die;
}
开发者ID:AK-VoronM,项目名称:edu-znatok,代码行数:7,代码来源:IndexController.php
示例8: courseDelete
public function courseDelete()
{
$course_id = Input::get('deleteId');
Homework::where('course_id', '=', $course_id)->delete();
Courseware::where('course_id', '=', $course_id)->delete();
Courses::find($course_id)->delete();
return Redirect::to('course-edit');
}
开发者ID:Konaeu,项目名称:ubicom,代码行数:8,代码来源:AdminController.php
示例9: actionSave
public function actionSave()
{
$data_array = $_POST;
if (!empty($data_array)) {
$course = new Courses();
foreach ($data_array as $key => $value) {
$course->{$key} = $value;
}
if (!empty($_FILES)) {
$course->img = Files::upload($_FILES, 'courses');
}
$course->save();
} else {
header('Location: ' . ADMIN_PATH);
}
header('Location: ' . ADMIN_PATH . '?ctrl=courses&act=edit&id=' . $course->id);
}
开发者ID:AK-VoronM,项目名称:edu-znatok,代码行数:17,代码来源:CoursesController.php
示例10: getIndex
public function getIndex($idCourse, $idInscription)
{
$course = Courses::find($idCourse);
$inscription = Inscriptions::find($idInscription);
$files = $inscription->files;
$array = array('course' => $course, 'inscription' => $inscription, 'files' => $files, 'route' => self::parseRoute($course->id, $idInscription), 'parent' => self::parseParent($course->id), 'ancestor' => self::$ancestor, 'msg_success' => Session::get('msg_success'), 'msg_error' => Session::get('msg_error'));
return View::make('backend.inscriptions.files')->with($array);
}
开发者ID:nagyist,项目名称:abge,代码行数:8,代码来源:FileController.php
示例11: getCreate
public function getCreate($idCourse)
{
$course = Courses::find($idCourse);
if ($course) {
return View::make('backend.usertypes.create', array('course' => $course, 'route' => self::parseRoute($idCourse)));
} else {
return Redirect::to($this->parent)->with(array('msg_error' => Lang::get('messages.course_not_found')));
}
}
开发者ID:nagyist,项目名称:abge,代码行数:9,代码来源:UserTypeController.php
示例12: actionBycode
public function actionBycode($code, $student = null)
{
$course = Courses::model()->findByAttributes(array("code" => $code));
if (!$course) {
Yii::app()->notify->add("Курс не найден");
return false;
}
$this->actionByid($course->id);
}
开发者ID:Kapodastr,项目名称:grow,代码行数:9,代码来源:CoursesController.php
示例13: actionBycourse
public function actionBycourse($code)
{
$course = Courses::model()->with("Tracks.Algorithms")->findByAttributes(array("code" => $code));
if (!$course) {
Yii::app()->notify->add("Курс не найден", "warning");
$this->render('/site/index');
return false;
}
$this->render('bycourse', array('course' => $course));
}
开发者ID:Kapodastr,项目名称:grow,代码行数:10,代码来源:AlgorithmsController.php
示例14: GetCourse
public function GetCourse($data, $row)
{
if ($data->course) {
$course = Courses::model()->findByAttributes(array('id' => $data->course));
if ($course->course_name) {
return ucfirst($course->course_name);
} else {
echo '-';
}
} else {
echo '-';
}
}
开发者ID:akilraj1255,项目名称:rajeshwari,代码行数:13,代码来源:FileUploads.php
示例15: getCreate
public function getCreate($idCourse, $idUserType, $idDate = '')
{
$course = Courses::find($idCourse);
if ($course) {
$usertype = UserTypes::find($idUserType);
if ($usertype) {
return View::make('backend.dates.create', array('course' => $course, 'usertype' => $usertype, 'route' => self::parseRoute($idCourse, $idUserType)));
} else {
return Redirect::to(self::parseRoute($idCourse, $idUserType))->with(array('msg_error' => Lang::get('messages.usertype_not_found')));
}
} else {
return Redirect::to($this->ancestor)->with(array('msg_error' => Lang::get('messages.course_not_found')));
}
}
开发者ID:nagyist,项目名称:abge,代码行数:14,代码来源:DateController.php
示例16: postIndex
public function postIndex($route = '', $content = '', $idContent = '')
{
$course = Courses::findRoute($route);
$course->start = date("d-m-Y", strtotime($course->start));
$course->end = date("d-m-Y", strtotime($course->end));
if ($course) {
switch ($content) {
case 'arquivos':
return self::postCourseFiles($course->id, $course, $idContent);
break;
}
} else {
return View::make('specialpages.404');
}
}
开发者ID:nagyist,项目名称:abge,代码行数:15,代码来源:FrontendCourseController.php
示例17: actionSearch
public function actionSearch($q)
{
$result = array();
$term = trim(addcslashes($q, '%_'));
// escape LIKE's special characters
if (!empty($term)) {
$param = new CDbCriteria(array('condition' => "name LIKE :match AND degree_id=" . $_SESSION['did'], 'params' => array(':match' => "%{$term}%")));
$cursor = Courses::model()->findAll($param);
if (!empty($cursor)) {
foreach ($cursor as $id => $value) {
$result[] = array('id' => $value['cid'], 'name' => $value['name']);
}
}
}
echo json_encode($result);
Yii::app()->end();
}
开发者ID:bafio89,项目名称:qea-u,代码行数:17,代码来源:DefaultController.php
示例18: actionShow
public function actionShow()
{
$courses = Courses::findAllByColumn('parent_id', 0);
$auth = Auth::checkAuth();
if ($auth) {
$user = Users::findOneByPK($auth);
$user->getProfile();
}
$view = new View();
$view->user = $user;
$view->courses = $courses;
// $view->user_login = $user->user_login;
// $view->user_group = $user->user_group;
$view->display('header.php');
$view->display('content.php');
$view->display('footer.php');
}
开发者ID:AK-VoronM,项目名称:edu-znatok,代码行数:17,代码来源:IndexController.php
示例19: return_courses_class
static function return_courses_class()
{
$diretorios = Courses::return_courses();
$dir_all = [];
foreach ($diretorios as $diretorio) {
$dir_classes = scandir('arquivos/' . $diretorio);
foreach ($dir_classes as $dir_turma) {
if ($dir_turma == '.' || $dir_turma == '..') {
$key = array_search($dir_turma, $dir_classes);
unset($dir_classes[$key]);
} else {
$dir_all[] = $dir_turma;
}
}
}
return $dir_all;
}
开发者ID:germanocorrea,项目名称:carometro,代码行数:17,代码来源:Courses.class.php
示例20: edit
function edit()
{
if (isset($_POST['save'])) {
$id = $this->input->post('id');
$data = array('course_name' => trim($this->input->post('course_name')), 'graduation_type' => trim($this->input->post('graduation_type')), 'state' => $this->input->post('state'));
$dataIn = $this->courses_model->edit($id, $data);
if ($dataIn) {
$this->admintemp->write('message', 'Edited Successfully');
redirect('courses');
} else {
$this->admintemp->write('message', 'Error occured while editing');
Courses::index();
}
} else {
Courses::_edit();
}
}
开发者ID:resolverRaun,项目名称:hosp123,代码行数:17,代码来源:courses.php
注:本文中的Courses类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论