Commit 5e8dc2c0 by biao

1

parent c764c87c
<?php
/**
* 用户申请证书删除
* $Id: certificate_apply_delete_result.php,v 1.1 2015/10/08 11:18:46 wanggb Exp $
* @author lixq
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("12")) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "error.inc";
$message = "权限不足,请联系系统管理员。";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
}
// 参数取得
$id = ParamUtil::getRequestString("id");
$certificate_dat = UserCertificateDat::getById($id);
if ($certificate_dat == null) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "certificate_apply_list.inc";
$layout_pages["menu_clicked"] = "5-5";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
}
// 数据库更新
$certificate_dat->delete_flg = true;
$certificate_dat->save();
// 跳到一览页
header("Location:certificate_apply_list.php");
exit;
<?php
/**
* 视频课程分类删除
* $Id: course_category_delete_result.php,v 1.1 2015/10/08 11:18:46 wanggb Exp $
* @author lixq
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("12")) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "error.inc";
$message = "权限不足,请联系系统管理员。";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
}
// 参数取得
$id = ParamUtil::getRequestString("id");
$course_category_dat = CourseCategoryDat::getById($id);
if ($course_category_dat == null) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "course_category_list.inc";
$layout_pages["menu_clicked"] = "4-5";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
}
// 数据库更新
$course_category_dat->delete_flg = true;
$course_category_dat->save();
// 跳到一览页
header("Location:course_category_list.php");
exit;
<?php
/**
* 视频课程分类编辑
* $Id: course_category_edit_input.php,v 1.1 2015/10/08 11:18:46 wanggb Exp $
* @author lixq
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("12")) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "error.inc";
$message = "权限不足,请联系系统管理员。";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
}
// 参数取得
$id = ParamUtil::getRequestNumber("id");
$action_type = ParamUtil::getRequestString("action_type");
$course_category_dat = new CourseCategoryDat();
if($action_type =="edit"){
$course_category_dat = CourseCategoryDat::getById($id);
if ($course_category_dat == null) {
// エラー表示
$message = "对象不存在.";
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "error.inc";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
}
}
$parent_id = !empty($course_category_dat->parent_id)?$course_category_dat->parent_id:1;
$title = $course_category_dat->title;
$category_list = CourseParentCategory::getList();
// 页面表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "course_category_edit_input.inc";
$layout_pages["menu_clicked"] = "4-5";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 视频课程分类编辑
* $Id: course_category_edit_result.php,v 1.1 2015/10/08 11:18:46 wanggb Exp $
* @author lixq
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("12")) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "error.inc";
$message = "权限不足,请联系系统管理员。";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
}
// 参数取得
$id = ParamUtil::getRequestString("id");
$action_type = ParamUtil::getRequestString("action_type");
$title = ParamUtil::getRequestString("title");
$parent_id = ParamUtil::getRequestString("parent_id");
//创建的时候
if($action_type == "new") {
$course_category_dat = new CourseCategoryDat();
}
//编辑
if($action_type == "edit") {
$course_category_dat = CourseCategoryDat::getById($id);
if ($course_category_dat== null) {
// エラー表示
$message = "对象不存在";
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "error.inc";
$layout_pages["menu_clicked"] = "4-5";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
}
}
// 数据库更新
$course_category_dat->title = $title;
$course_category_dat->parent_id = $parent_id;
$course_category_dat->save();
// 页面表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "course_category_edit_result.inc";
$layout_pages["menu_clicked"] = "4-5";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
...@@ -28,6 +28,8 @@ if (!checkAuthority("3")) { ...@@ -28,6 +28,8 @@ if (!checkAuthority("3")) {
$param = array(); $param = array();
$param["delete_flg"] = false; $param["delete_flg"] = false;
$course_category_list = CourseCategoryDat::getList($param,"id","asc"); $course_category_list = CourseCategoryDat::getList($param,"id","asc");
$all_category_list = CourseParentCategory::getList();
array_unshift($all_category_list, new CourseParentCategory(array("id"=>0, "title"=>"请选择")));
// ページ // ページ
$layout_pages = array(); $layout_pages = array();
......
<?php
/**
* $Id: display_image.php
* @author g_wang
* @access public
* @package www
*/
require_once("manager_include.inc");
// パラメータを取得
$file_name = ParamUtil::getRequestString("file_name");
$file_path = MP3_PATH . "/" . $file_name;
if (file_exists($file_path)) {
header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache"); // HTTP/1.0
$handle = fopen($file_path, "rb");
$mp3_data = fread($handle, filesize($file_path));
$size = getimagesize($file_path);
header("Content-type: audio/mpeg");
header("Content-length: " . strlen($mp3_data));
print $mp3_data;
fclose($handle);
exit;
}
exit;
header("HTTP/1.0 404 Not Found");
header("Status: 404 Not Found");
exit;
\ No newline at end of file
...@@ -61,21 +61,21 @@ ...@@ -61,21 +61,21 @@
if(!this.name){ if(!this.name){
this.$message({ this.$message({
type: 'error', type: 'error',
message: '请输收货人姓名!' message: '请输收货人姓名!'
}); });
return; return;
} }
if(!this.mobile){ if(!this.mobile){
this.$message({ this.$message({
type: 'error', type: 'error',
message: '请输收货人号码!' message: '请输收货人号码!'
}); });
return; return;
} }
if(!this.address){ if(!this.address){
this.$message({ this.$message({
type: 'error', type: 'error',
message: '请输收货人地址!' message: '请输收货人地址!'
}); });
return; return;
} }
......
<?php
/**
* 视频课程分类编辑
* $Id: course_category_edit_input.inc,v 1.1 2015/10/08 11:18:53 wanggb Exp $
* @author lixq
* @access public
* @package manager.templates
**/
?>
<div id="change">
<p class="edit_title">视频课程分类编辑</p>
<form id="course_category_edit" action="course_category_edit_result.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="id" value="<?=$id?>"/>
<input type="hidden" name="parent_id" value="<?=$parent_id?>"/>
<input type="hidden" name="action_type" value="<?=$action_type?>"/>
<div class="edit_content">
<p>一级分类名称</p>
<el-select v-model="parent_id" size="small">
<el-option
v-for="item in category_list"
:key="item.id"
:label="item.title"
:value="item.id">
</el-option>
</el-select>
<p>分类名称</p>
<el-input v-model="title" name="title" class="input_200"></el-input>
<br/>
<br/>
<el-button type="danger" @click="edit()" class="edit_btn">编辑</el-button>
<el-button type="danger" @click="back()" class="edit_btn">返回</el-button>
<br/><br/>
</div>
</form>
</div>
<script type="text/javascript">
new Vue({
el:'#change',
data:{
title:'<?=$title?>',
parent_id:<?=$parent_id?>,
category_list:<?=json_encode($category_list)?>
},
methods:{
back:function(){
window.history.go(-1);
},
edit:function(){
if(!this.title){
this.$message({
type: 'error',
message: '请输入分类名称!'
});
return;
}
$("input[name='parent_id']").val(this.parent_id);
$('#course_category_edit').submit();
}
}
})
</script>
<?php
/**
* 视频课程分类编辑完成
* $Id: course_category_edit_result.inc,v 1.12020/01/03 11:18:46 Exp $
* @author lixq
* @access public
* @package manager.templates
*/
?>
<br />
视频课程分类更新完成!
<br />
<br />
<div id="result">
<el-button type="danger" @click="back()" class="edit_btn">返回</el-button>
</div>
<script type="text/javascript">
new Vue({
el:'#result',
methods:{
back:function(){
window.location.href='./course_category_list.php';
}
}
})
</script>
\ No newline at end of file
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
一级分类名称: 一级分类名称:
<el-select v-model="parent_id" size='medium' > <el-select v-model="parent_id" size='medium' >
<el-option <el-option
v-for="item in category_list" v-for="item in parent_list"
:key="item.id" :key="item.id"
:label="item.title" :label="item.title"
:value="item.id"> :value="item.id">
...@@ -62,6 +62,7 @@ ...@@ -62,6 +62,7 @@
var data={ var data={
id:<?=$tmp->id ?>, id:<?=$tmp->id ?>,
title:'<?=$tmp->title ?>', title:'<?=$tmp->title ?>',
parent_id:<?=$tmp->parent_id?>,
parent_title:'<?=CourseParentCategory::getTitleById($tmp->parent_id)?>' parent_title:'<?=CourseParentCategory::getTitleById($tmp->parent_id)?>'
}; };
list.push(data); list.push(data);
...@@ -72,9 +73,9 @@ ...@@ -72,9 +73,9 @@
el:'#classSetting', el:'#classSetting',
data:{ data:{
tableData: list, tableData: list,
parent_list:<?=json_encode(array_push(CourseParentCategory::getList(), new CourseParentCategory(array("id"=>0, "title"=>"请选择"))))?>, parent_list:<?=json_encode($all_category_list)?>,
parent_id:0, parent_id:0,
category_list:'<?=json_encode($course_category_list)?>', category_list:list,
searchVal:'' searchVal:''
}, },
methods:{ methods:{
...@@ -107,13 +108,17 @@ ...@@ -107,13 +108,17 @@
}, },
watch:{ watch:{
parent_id(val,oldval){ parent_id(val,oldval){
var new_list = []; if(val == 0){
this.category_list.map(function(item) { this.tableData = this.category_list;
if (item.id == val) { }else{
new_list.push(item); var new_list = [];
} this.category_list.map(function(item) {
}); if (item.parent_id == val) {
this.tableData = new_list; new_list.push(item);
}
});
this.tableData = new_list;
}
} }
} }
}) })
......
...@@ -28,15 +28,14 @@ if(empty($courseMst)) { ...@@ -28,15 +28,14 @@ if(empty($courseMst)) {
$param = array(); $param = array();
$param['course_id'] = $courseId; $param['course_id'] = $courseId;
$param['delete_flg'] = false; $param['delete_flg'] = false;
$courseMediaList = CourseMedia_dat::getList($param,'id','asc'); $courseMediaList = CourseMediaDat::getList($param,'id','asc');
//接口返回数据 //接口返回数据
$result["allCount"] = $allCount; $result["teacherName"] = $courseMst->teacher_name;
$result["page"] = $page; $result["teacherProfile"] = $courseMst->teacher_profile;
$result["rowCount"] = $rowCount; $result["mediaCount"] = $courseMst->media_count;
$result["list"] = $courseMediaList; $result["list"] = $courseMediaList;
ErrorLogger::doOutput("Compass...ajax_get_course_detail.php....End.", 0); ErrorLogger::doOutput("Compass...ajax_get_course_detail.php....End.", 0);
......
<?php <?php
// 根据课程id获取课程详细信息 // 提交用户观看信息
require_once ("../user_include.inc"); require_once ("../user_include.inc");
ErrorLogger::doOutput("Compass...ajax_get_course_detail.php....Start.", 0); ErrorLogger::doOutput("Compass...ajax_get_course_detail.php....Start.", 0);
//获取参数 //获取参数
$unionId = ParamUtil::getRequestString("unionId");
$courseId = ParamUtil::getRequestNumber("courseId", 0); $courseId = ParamUtil::getRequestNumber("courseId", 0);
$mediaId = ParamUtil::getRequestNumber("mediaId", 0);
//参数检查 //参数检查
if(empty($courseId)) { if(empty($unionId) || empty($courseId) || empty($mediaId)) {
$result["message"] = "参数错误!"; $result["message"] = "参数错误!";
responseNG($result); responseNG($result);
} }
$result = array(); //检索用户是否存在
$param['unionid'] = $unionId;
$param['delete_flg'] = false;
$tmpUserMstList = UserMst::getList($param,'id','desc', 0, 1);
if(empty($tmpUserMstList)) {
responseNG("参数错误!");
}
//检查媒体文件是否存在
$courseMediaDat = CourseMediaDat::getById($mediaId);
if(empty($courseMediaDat)) {
responseNG("参数错误!");
}
//数据插入
$user = $tmpUserMstList[0];
//免费观看课程
if($courseMediaDat->is_free) {
//观看次数+1
$courseMediaDat->view_count++;
$courseMediaDat->save();
//添加用户观看记录[此处仅限免费观看视频,收费观看视频在付费的时候更新]
$userMediaDat = new UserMediaDat();
$userMediaDat->user_id = $user->id;
$userMediaDat->course_id = $courseId;
$userMediaDat->media_id = $media_id;
$userMediaDat->is_free = $courseMediaDat->is_free;
$userMediaDat->money = $courseMediaDat->money;
$userMediaDat->save();
} else {
//收费观看课程
}
//每页显示条数 //每页显示条数
$rowCount = 10; $rowCount = 10;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment