Commit bc9aabd4 by biao

1

parent 1cdc6935
......@@ -13,7 +13,7 @@ require_once("manager_include.inc");
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("ADMIN")) {
if (!checkAuthority("1")) {
// エラー表示
$layout_pages = array();
$layout_pages["footer"] = "footer.inc";
......
......@@ -13,7 +13,7 @@ require_once("manager_include.inc");
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("ADMIN")) {
if (!checkAuthority("1")) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
......
......@@ -13,7 +13,7 @@ require_once("manager_include.inc");
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("ADMIN")) {
if (!checkAuthority("1")) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
......
......@@ -12,7 +12,7 @@ require_once("manager_include.inc");
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("ADMIN")) {
if (!checkAuthority("1")) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
......
......@@ -13,7 +13,7 @@ require_once("manager_include.inc");
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("ADMIN")) {
if (!checkAuthority("1")) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
......
......@@ -13,7 +13,7 @@ require_once("manager_include.inc");
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("ADMIN")) {
if (!checkAuthority("1")) {
// エラー表示
$layout_pages = array();
$layout_pages["right"] = "error.inc";
......
......@@ -13,7 +13,7 @@ require_once("manager_include.inc");
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("12")) {
if (!checkAuthority("16")) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
......
......@@ -13,7 +13,7 @@ require_once("manager_include.inc");
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("12")) {
if (!checkAuthority("16")) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
......
......@@ -13,7 +13,7 @@ require_once("manager_include.inc");
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("12")) {
if (!checkAuthority("16")) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
......
......@@ -12,7 +12,7 @@ require_once("manager_include.inc");
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("12")) {
if (!checkAuthority("16")) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
......@@ -81,7 +81,7 @@ if ($search_flg) {
$user_certificate_list = [];
$param["delete_flg"] = false;
//总件数
$user_certificate_count = CompassHandler::getUserCertificateListCount($param);
// 获取相应页面的数据
......
......@@ -13,7 +13,7 @@ require_once("manager_include.inc");
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("12")) {
if (!checkAuthority("15")) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
......
......@@ -13,7 +13,7 @@ require_once("manager_include.inc");
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("12")) {
if (!checkAuthority("15")) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
......
......@@ -13,7 +13,7 @@ require_once("manager_include.inc");
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("12")) {
if (!checkAuthority("15")) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
......@@ -48,9 +48,10 @@ if($action_type=="edit") {
exit;
}
}
if(!empty($_FILES['front_image']['tmp_name'])){
$upload_file = FileUploadUtil::getScalarFile(@$_FILES["front_image"]);
$tmp_file_name = date("Ymd") . "_" . trim(basename($upload_file->name));
$tmp_file_name = date("YmdHis") . "_" . trim(basename($upload_file->name));
$aliHandler = new AliUploadHandler();
if(!empty($certificate_mst->front_image)){
......@@ -62,7 +63,9 @@ if(!empty($_FILES['front_image']['tmp_name'])){
// 数据库更新
$certificate_mst->title = $title;
$certificate_mst->display_order = $display_order;
$certificate_mst->front_image = $url;
if(isset($url)){
$certificate_mst->front_image = $url;
}
$certificate_mst->save();
// 页面表示
......
......@@ -12,7 +12,7 @@ require_once("manager_include.inc");
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("12")) {
if (!checkAuthority("15")) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
......@@ -27,7 +27,7 @@ $order_key = ParamUtil::getRequestString("order_key", "display_order");
$sort = ParamUtil::getRequestString("sort", "DESC");
$page_num = ParamUtil::getRequestNumber("page_num", 1);
$page_row = MANAGER_DEFAULT_ROW_COUNT;
$paging_url_link = "./certificate_list.php";
$paging_url_link = "./certificate_criteria.php";
$certificate_list = [];
......
......@@ -38,19 +38,19 @@ function checkAuthority($allow_types = null) {
exit;
}
ErrorLogger::doOutput($allow_types . $_account->modules,0);
return true;
// // 超级管理员 或 无限制的场合,返回true
// if (empty($allow_types)) {
// return false;
// }
// $account_authority_type_list = explode("|", $_account->modules);
// foreach ($account_authority_type_list as $account_authority_type) {
// if ($allow_types == $account_authority_type) {
// ErrorLogger::doOutput($allow_types . $_account->modules,0);
// return true;
// }
// }
// return false;
// 超级管理员 或 无限制的场合,返回true
if (empty($allow_types)) {
return false;
}
$account_authority_type_list = explode("|", $_account->modules);
foreach ($account_authority_type_list as $account_authority_type) {
if ($allow_types == $account_authority_type) {
return true;
}
}
return false;
}
?>
\ No newline at end of file
......@@ -13,7 +13,7 @@ require_once("manager_include.inc");
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("ADMIN")) {
if (!checkAuthority("4")) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
......
......@@ -13,7 +13,7 @@ require_once("manager_include.inc");
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("3")) {
if (!checkAuthority("4")) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
......
......@@ -13,7 +13,7 @@ require_once("manager_include.inc");
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("3")) {
if (!checkAuthority("4")) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
......
......@@ -12,7 +12,7 @@ require_once("manager_include.inc");
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("3")) {
if (!checkAuthority("4")) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
......
<?php
/**
* 合集视频删除
* $Id: collection_media_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("11")) {
// エラー表示
$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_mst = CourseMst::getById($id);
if ($course_mst == null) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "collection_media_list.inc";
$layout_pages["menu_clicked"] = "4-1";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
}
$aliHandler = new AliUploadHandler();
$aliHandler->delete(substr ( $course_mst->front_image, strrpos ( $course_mst->front_image, "/" ) + 1 ));
// 数据库更新
$course_mst->delete_flg = true;
$course_mst->save();
// 跳到一览页
header("Location:collection_media_list.php?search_flg=true");
exit;
<?php
/**
* 合集视频编辑
* $Id: collection_media_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("11")) {
// エラー表示
$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_mst = new CourseMst();
if($action_type =="edit"){
$course_mst = CourseMst::getById($id);
if ($course_mst == 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_category_list = CourseParentCategory::getList();
$param = array();
$param["delete_flg"] = false;
$sub_category_list = CourseCategoryDat::getList($param,"id");
$parent_category_id = $course_mst->parent_category_id??$parent_category_list[0]->id;
$sub_category_id = $course_mst->sub_category_id??getFirstSubCategoryId($sub_category_list,$parent_category_list);
$front_image = $course_mst->front_image;
$title = $course_mst->title;
$teacher_name = $course_mst->teacher_name;
$teacher_profile = $course_mst->teacher_profile;
$new_sub_category_list = [];
foreach ($sub_category_list as $tmp){
if($tmp->parent_id == $sub_category_id){
array_push($new_sub_category_list, $tmp);
}
}
function getFirstSubCategoryId($sub_category_list,$parent_category_list){
foreach ($sub_category_list as $tmp){
if($tmp->parent_id == $parent_category_list[0]->id){
return $tmp->id;
}
}
return "";
}
// 页面表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "collection_media_edit_input.inc";
$layout_pages["menu_clicked"] = "4-1";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 合集视频编辑
* $Id: collection_media_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("11")) {
// エラー表示
$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");
$title = ParamUtil::getRequestString("title");
$parent_category_id = ParamUtil::getRequestNumber("parent_category_id");
$sub_category_id = ParamUtil::getRequestNumber("sub_category_id");
$teacher_name = ParamUtil::getRequestString("teacher_name");
$teacher_profile = ParamUtil::getRequestString("teacher_profile");
//创建的时候
if($action_type == "new") {
$course_mst = new CourseMst();
}
//编辑
if($action_type == "edit") {
$course_mst = CourseMst::getById($id);
if ($course_mst == null) {
// エラー表示
$message = "对象不存在";
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "error.inc";
$layout_pages["menu_clicked"] = "4-1";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
}
}
if(!empty($_FILES['front_image']['tmp_name'])){
$upload_file = FileUploadUtil::getScalarFile(@$_FILES["front_image"]);
$tmp_file_name = date("YmdHis") . "_" . trim(basename($upload_file->name));
$aliHandler = new AliUploadHandler();
if(!empty($course_mst->front_image)){
$aliHandler->delete(substr ( $course_mst->front_image, strrpos ( $course_mst->front_image, "/" ) + 1 ));
}
$url = $aliHandler->uploadImg($tmp_file_name, $upload_file->tmp_name);
ErrorLogger::doOutput($url);
$course_mst->front_image = $url;
}
// 数据库更新
$course_mst->title = $title;
$course_mst->parent_category_id = $parent_category_id;
$course_mst->sub_category_id = $sub_category_id;
$course_mst->teacher_name = $teacher_name;
$course_mst->teacher_profile = $teacher_profile;
$course_mst->save();
// 页面表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "collection_media_edit_result.inc";
$layout_pages["menu_clicked"] = "4-1";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
......@@ -23,15 +23,16 @@ if (!checkAuthority("11")) {
}
$title = ParamUtil::getRequestString("title");
$order_key = ParamUtil::getRequestString("order_key", "id");
$sort = ParamUtil::getRequestString("sort", "ASC");
$sort = ParamUtil::getRequestString("sort", "DESC");
$page_num = ParamUtil::getRequestNumber("page_num", 1);
$page_row = MANAGER_DEFAULT_ROW_COUNT;
$paging_url_link = "./collection_media_list.php";
// trueの場合、Sessionを再設定
$search_flg = ParamUtil::getRequestBoolean("search_flg", false);
$session_name = "collection_media_list";
$session_name = "collection_media_criteria";
if ($search_flg) {
if (isset($_SESSION[$session_name])){
$param = $_SESSION[$session_name];
......@@ -49,7 +50,7 @@ if ($search_flg) {
} else {
// 検索条件を作成してsessionに設定
$param = array();
if (!empty($school_title)) {
if (!empty($title)) {
$param["title"] = $title;
}
......@@ -59,31 +60,24 @@ if ($search_flg) {
$_SESSION[$session_name] = $param;
}
$school_list = [];
// 一览取得
$param = array();
$param["delete_flg"] = false;
if (!empty($title)) {
$param["title_ALT"] = "%" . $title . "%";
}
$course_list = [];
//总件数
$course_count = CourseMst::getListCount($param);
// 获取相应页面的数据
$course_count = CompassHandler::getCourseListCount($param);
// // 一览取得
if ($course_count > 0) {
$offset = ($page_num - 1) * $page_row;
$course_list = CompassHandler::getCourseList($param, $order_key, $sort, $offset, $page_row);
$page_count = ceil($school_count / $page_row);
$page_count = ceil($course_count / $page_row);
$show_page_num = MANAGER_PAGING_SHOW_PAGE_COUNT;
$page_range = PagingHandler::getPageRange($page_num, $page_count, $show_page_num);
$page_first = $page_range[0];
$page_end = $page_range[1];
}
// ページ
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "school_list.inc";
$layout_pages["menu_clicked"] = "1-1";
$layout_pages["right"] = "collection_media_list.inc";
$layout_pages["menu_clicked"] = "4-1";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
......@@ -13,7 +13,7 @@ require_once("manager_include.inc");
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("12")) {
if (!checkAuthority("11")) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
......
......@@ -13,7 +13,7 @@ require_once("manager_include.inc");
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("12")) {
if (!checkAuthority("11")) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
......
......@@ -13,7 +13,7 @@ require_once("manager_include.inc");
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("12")) {
if (!checkAuthority("11")) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
......
......@@ -2,7 +2,7 @@
/**
* 视频课程分类表
* $Id: course_category_list.php,v 1.1 2015/10/08 11:18:46 wanggb Exp $
* @author zhanghuichuan
* @author lixq
* @package manager.public_html
*/
// 底层包含
......@@ -14,7 +14,7 @@ require_once("check_login.inc");
// 权限检查
if (!checkAuthority("3")) {
if (!checkAuthority("11")) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
......
<?php
/**
* 视频一览
* $Id: media_list.php,v 1.1 2020/01/03 11:18:46 Exp $
* @author lixq
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("11")) {
// エラー表示
$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");
$title = ParamUtil::getRequestString("title");
$media_type = ParamUtil::getRequestString("media_type");//种类 0:所有 1:单个 2:合集
$media_kind = ParamUtil::getRequestString("media_kind");//类型 0:所有 1:志愿免费 2:公益收费
$order_key = ParamUtil::getRequestString("order_key", "id");
$sort = ParamUtil::getRequestString("sort", "DESC");
$page_num = ParamUtil::getRequestNumber("page_num", 1);
$page_row = MANAGER_DEFAULT_ROW_COUNT;
$paging_url_link = "./course_media_list.php";
// trueの場合、Sessionを再設定
$search_flg = ParamUtil::getRequestBoolean("search_flg", false);
$session_name = "course_media_criteria";
if ($search_flg) {
if (isset($_SESSION[$session_name])){
$param = $_SESSION[$session_name];
} else {
$param = array();
}
if (isset($param["title"])) {
$title = $param["title"];
}
if (isset($param["media_type"])) {
$media_type = $param["media_type"];
}
if (isset($param["media_kind"])) {
$media_kind = $param["media_kind"];
}
if (isset($param["page_num"])) {
$page_num = $param["page_num"];
}
} else {
// 検索条件を作成してsessionに設定
$param = array();
if (!empty($media_type)) {
$param["media_type"] = $media_type;
}
if (!empty($media_kind)) {
$param["media_kind"] = $media_kind;
}
if (!empty($title)) {
$param["title"] = $title;
}
if (!empty($page_num)) {
$param["page_num"] = $page_num;
}
$_SESSION[$session_name] = $param;
}
$course_list = [];
$param["course_id"] = $id;
//总件数
$course_count = CompassHandler::getCourseMediaListCount($param);
// // 一览取得
if ($course_count > 0) {
$offset = ($page_num - 1) * $page_row;
$course_list = CompassHandler::getCourseMediaList($param, $order_key, $sort, $offset, $page_row);
$page_count = ceil($course_count / $page_row);
$show_page_num = MANAGER_PAGING_SHOW_PAGE_COUNT;
$page_range = PagingHandler::getPageRange($page_num, $page_count, $show_page_num);
$page_first = $page_range[0];
$page_end = $page_range[1];
}
$course_mst = CourseMst::getById($id);
// ページ
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "course_media_list.inc";
$layout_pages["menu_clicked"] = "4-1";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
......@@ -529,7 +529,94 @@ th.contents_title {
}
#img_thumbnail{
visibility: hidden;
margin-top: 55px;
margin-top: 60px;
height:150px;
}
.search_btn{
margin-left:10px !important;
}
/* 多图上传 */
.zhl_admin_update_more {
width: 527px;
max-height: 320px;
min-height: 208px;
position: absolute;
/*top: 50%;*/
/*left: 50%;*/
margin-top: -40px;
/*margin-left: -260px;*/
background: #fff;
z-index: 2;
font-size: 14px;
}
#zhl_admin_update {
width: 70%;
height: 100%;
border: 1px solid #ccc;
padding: 5px;
background: #fff;
position: relative;
}
#zhl_admin_update img {
width: 98px;
height: 98px;
border: 1px solid transparent;
margin-left: 2.5px;
margin-right: 2.5px;
margin-bottom: 5px;
}
#zhl_admin_update #zhl_admin_img {
width: 98px;
height: 98px;
}
#zhl_update_hint {
float: right;
font-size: 12px;
color: #666;
margin: -20px 10px 0 0;
}
#close {
cursor: pointer;
position: absolute;
top: 0px;
right: 5px;
background: #fff;
width: 25px;
height: 25px;
/*border:1px solid #999;*/
/*border-radius:20px;*/
font-size: 25px;
color: #999;
line-height: 25px;
text-align: center;
}
.delete-img:hover {
content: url('../images/delete_hover.png');
}
.member_img{
max-height:500px;
margin-top:10px;
}
.el-input__icon{
line-height: 30px !important;
}
.m-l{
margin-left: 10px;
}
.el-image img{
width:auto;
}
.list_img{
width: 150px;
}
.list_img img{
width:100%;
}
/*******2020/1/3添加新式样结束*******/
<?php
/**
* 募捐活动详情
* $Id: donations_dat_detail.php,v 1.1 2020/01/03 11:18:46 Exp $
* @author lixq
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("1")) {
// エラー表示
$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");
$donations_dat = DonationsEventDat::getById($id);
if ($donations_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;
}
// ページ
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "donations_dat_detail.inc";
$layout_pages["menu_clicked"] = "3-4";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 募捐活动删除
* $Id: donations_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("1")) {
// エラー表示
$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");
$donations_event_dat= DonationsEventDat::getById($id);
if ($donations_event_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;
}
$aliHandler = new AliUploadHandler();
$aliHandler->delete(substr ( $donations_event_dat->front_image, strrpos ( $donations_event_dat->front_image, "/" ) + 1 ));
// 数据库更新
$donations_event_dat->delete_flg = true;
$donations_event_dat->save();
// 跳到一览页
header("Location:donations_event_list.php?search_flg=true");
exit;
<?php
/**
* 募捐活动列表-数据详情
* $Id: donations_detail_list.php,v 1.1 2020/01/03 11:18:46 Exp $
* @author lixq
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("1")) {
// エラー表示
$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");
$name = ParamUtil::getRequestString("name");
$status = ParamUtil::getRequestString("status");
$order_key = ParamUtil::getRequestString("order_key", "id");
$sort = ParamUtil::getRequestString("sort", "ASC");
$page_num = ParamUtil::getRequestNumber("page_num", 1);
$page_row = MANAGER_DEFAULT_ROW_COUNT;
$paging_url_link = "./donations_detail_list.php";
// trueの場合、Sessionを再設定
$search_flg = ParamUtil::getRequestBoolean("search_flg", false);
$session_name = "event_detail_list_criteria";
if ($search_flg) {
if (isset($_SESSION[$session_name])){
$param = $_SESSION[$session_name];
} else {
$param = array();
}
if (isset($param["id"])) {
$id = $param["id"];
}
if (isset($param["name"])) {
$name = $param["name"];
}
if (isset($param["status"])) {
$status = $param["status"];
}
if (isset($param["page_num"])) {
$page_num = $param["page_num"];
}
} else {
// 検索条件を作成してsessionに設定
$param = array();
if (!empty($id)) {
$param["id"] = $id;
}
if (!empty($name)) {
$param["name"] = $name;
}
if (!empty($status)) {
$param["status"] = $status;
}
if (!empty($page_num)) {
$param["page_num"] = $page_num;
}
$_SESSION[$session_name] = $param;
}
$donations_event_dat = DonationsEventDat::getById($id);
if ($donations_event_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;
}
$user_donation_list = [];
//总件数
$user_donation_count = CompassHandler::getUserDonationListCount($param);
// // 一览取得
if ($user_donation_count > 0) {
$offset = ($page_num - 1) * $page_row;
$user_donation_list = CompassHandler::getUserDonationList($param, $order_key, $sort, $offset, $page_row);
$page_count = ceil($user_donation_count / $page_row);
$show_page_num = MANAGER_PAGING_SHOW_PAGE_COUNT;
$page_range = PagingHandler::getPageRange($page_num, $page_count, $show_page_num);
$page_first = $page_range[0];
$page_end = $page_range[1];
}
// ページ
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "donations_detail_list.inc";
$layout_pages["menu_clicked"] = "3-4";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 募捐活动编辑
* $Id: donations_edit_input.php,v 1.1 2020/01/03 11:18:46 Exp $
* @author lixq
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("1")) {
// エラー表示
$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");
$donations_event_dat = new DonationsEventDat();
if($action_type == "edit"){
$donations_event_dat = DonationsEventDat::getById($id);
if ($donations_event_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;
}
}
// JavaScriptページ
$_SCRIPT_FILE = array("scripts/validators.js");
// ページ
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "donations_edit_input.inc";
$layout_pages["menu_clicked"] = "3-4";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
<?php
/**
* 活动发布完成
* $Id: donations_edit_result.php,v 1.1 2020/01/03 11:18:46 Exp $
* @author lixq
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("14")) {
// エラー表示
$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");
$title = ParamUtil::getRequestString("title");
$comment = ParamUtil::getRequestString("comment");
$max_money = ParamUtil::getRequestString("max_money");
$start_time = ParamUtil::getRequestString("start_time");
$finish_time = ParamUtil::getRequestString("finish_time");
//$money = ParamUtil::getRequestString("money");
$author= ParamUtil::getRequestString("author");
$donations_event_dat = new DonationsEventDat();
if($action_type == "edit"){
$donations_event_dat = DonationsEventDat::getById($id);
if ($donations_event_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;
}
}else{
$donations_event_dat->status = "NEW";
}
$donations_event_dat->title = $title;
$donations_event_dat->comment = $comment;
$donations_event_dat->start_time = $start_time;
$donations_event_dat->finish_time = $finish_time;
$donations_event_dat->max_money = $max_money;
//$volunteer_event_dat->money = $money;
if(empty($author)){
$donations_event_dat->author = $_account->name;
}else{
$donations_event_dat->author = $author;
}
if(!empty($_FILES['front_image']['tmp_name'])){
$upload_file = FileUploadUtil::getScalarFile(@$_FILES["front_image"]);
$tmp_file_name = date("YmdHis") . "_" . trim(basename($upload_file->name));
$aliHandler = new AliUploadHandler();
$aliHandler->delete(substr ( $donations_event_dat->front_image, strrpos ( $donations_event_dat->front_image, "/" ) + 1 ));
$url = $aliHandler->uploadImg($tmp_file_name, $upload_file->tmp_name);
ErrorLogger::doOutput($url);
$donations_event_dat->front_image = $url;
}
$donations_event_dat->save();
// ページ
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "donations_edit_result.inc";
$layout_pages["menu_clicked"] = "3-4";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 慈善募捐活动列表
* $Id: donations_event_list.php,v 1.1 2015/10/08 11:18:46 Exp $
* @author lixq
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("1")) {
// エラー表示
$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;
}
$order_key = ParamUtil::getRequestString("order_key", "id");
$sort = ParamUtil::getRequestString("sort", "DESC");
$page_num = ParamUtil::getRequestNumber("page_num", 1);
$page_row = MANAGER_DEFAULT_ROW_COUNT;
$paging_url_link = "./donations_event_list.php";
$donations_event_list = [];
$param = array();
$param["delete_flg"] = false;
//总件数
$donations_event_count = DonationsEventDat::getListCount($param);
// 一览取得
if ($donations_event_count > 0) {
$offset = ($page_num - 1) * $page_row;
$donations_event_list = DonationsEventDat::getList($param, $order_key, $sort, $offset, $page_row);
$page_count = ceil($donations_event_count / $page_row);
$show_page_num = MANAGER_PAGING_SHOW_PAGE_COUNT;
$page_range = PagingHandler::getPageRange($page_num, $page_count, $show_page_num);
$page_first = $page_range[0];
$page_end = $page_range[1];
}
// ページ
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "donations_event_list.inc";
$layout_pages["menu_clicked"] = "3-4";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 募捐活动审核-详情
* $Id: donations_examine_input.php,v 1.1 2020/01/03 11:18:46 Exp $
* @author lixq
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("1")) {
// エラー表示
$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");
$donations_event_dat = DonationsEventDat::getById($id);
if ($donations_event_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;
}
if ($donations_event_dat->status != "NEW") {
// エラー表示
$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;
}
// ページ
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "donations_examine_input.inc";
$layout_pages["menu_clicked"] = "3-5";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 募捐活动审核
* $Id: donations_examine_list.php,v 1.1 2020/01/03 11:18:46 Exp $
* @author lixq
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("1")) {
// エラー表示
$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;
}
$finish_time = ParamUtil::getRequestString("finish_time");
$author = ParamUtil::getRequestString("author");
$start_time = ParamUtil::getRequestString("start_time");
$order_key = ParamUtil::getRequestString("order_key", "id");
$sort = ParamUtil::getRequestString("sort", "ASC");
$page_num = ParamUtil::getRequestNumber("page_num", 1);
$page_row = MANAGER_DEFAULT_ROW_COUNT;
$paging_url_link = "./donations_examine_list.php";
// trueの場合、Sessionを再設定
$search_flg = ParamUtil::getRequestBoolean("search_flg", false);
$session_name = "donations_examine_criteria";
if ($search_flg) {
if (isset($_SESSION[$session_name])){
$param = $_SESSION[$session_name];
} else {
$param = array();
}
if (isset($param["registration_date_MAX"])) {
$finish_time = $param["registration_date_MAX"];
}
if (isset($param["registration_date_MIN"])) {
$start_time = $param["registration_date_MIN"];
}
if (isset($param["author"])) {
$author = $param["author"];
}
} else {
// 検索条件を作成してsessionに設定
$param = array();
if (!empty($finish_time)) {
$param["registration_date_MAX"] = $finish_time;
}
if (!empty($start_time)) {
$param["registration_date_MIN"] = $start_time;
}
if (!empty($author)) {
$param["author"] = $author;
}
$_SESSION[$session_name] = $param;
}
// 一览取得
$param["delete_flg"] = false;
$param["status"] = "NEW";
$donations_event_list = [];
$donations_event_count = DonationsEventDat::getListCount($param);
// 一览取得
if ($donations_event_count > 0) {
$offset = ($page_num - 1) * $page_row;
$donations_event_list = DonationsEventDat::getList($param, $order_key, $sort, $offset, $page_row);
$page_count = ceil($donations_event_count / $page_row);
$show_page_num = MANAGER_PAGING_SHOW_PAGE_COUNT;
$page_range = PagingHandler::getPageRange($page_num, $page_count, $show_page_num);
$page_first = $page_range[0];
$page_end = $page_range[1];
}
// JavaScriptページ
$_SCRIPT_FILE = array("scripts/validators.js");
// ページ
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "donations_examine_list.inc";
$layout_pages["menu_clicked"] = "3-5";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 募捐活动审核完成
* $Id: donations_examine_result.php,v 1.1 2020/2/28 11:18:46 wanggb Exp $
* @author lixq
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("1")) {
// エラー表示
$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");
$status = ParamUtil::getRequestString("status");
$donations_event_dat = DonationsEventDat::getById($id);
if ($donations_event_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;
}
// 更新数据库
$donations_event_dat->status = $status;
$donations_event_dat->auditor_id = $_account->id;
$donations_event_dat->auditor_name = $_account->name;
$donations_event_dat->save();
// 页面表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "donations_examine_result.inc";
$layout_pages["menu_clicked"] = "3-5";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
......@@ -108,7 +108,37 @@ function setCheckboxValue(viewTarget, valueTarget, requestUrl, formName) {
// セットしたら閉める
closeSelectPopup();
}
/**
* setRadioboxValue
* @param viewTarget
* @param valueTarget
* @param requestUrl
*/
function setRadioboxValue(viewTarget, valueTarget, requestUrl, formName) {
var radios = document.getElementsByName("radio_array[]");
var checked_value = 0;
for (var i = 0; i < radios.length; i++) {
var radio = radios[i];
if (radio.checked) {
var checked_value = radio.value;
}
}
if (valueTarget == "course_id") {
if (checked_value != 0) {
requestUrl = requestUrl + "&id=" + checked_value;
$.getJSON(requestUrl, function(json){
document.getElementsByName(viewTarget)[0].value = json[0]["title"];
})
} else {
selectClear(formName, 'course_name', 'course_id');
}
} else {
document.getElementsByName(viewTarget)[0].value = checked_value;
}
document.getElementsByName(valueTarget)[0].value = checked_value;
// セットしたら閉める
closeSelectPopup();
}
/**
* 選んだ候補をセットします。
* @param formName
......
<?php
/**
* 活动详情
* $Id: event_dat_detail.php,v 1.1 2020/01/03 11:18:46 Exp $
* @author lixq
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("14")) {
// エラー表示
$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");
$volunteer_event_dat = VolunteerEventDat::getById($id);
if ($volunteer_event_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;
}
if(!empty($volunteer_event_dat->circle_id)){
$volunteer_event_dat->author = CircleDat::getById($volunteer_event_dat->circle_id)->title;
}
// ページ
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "event_dat_detail.inc";
$layout_pages["menu_clicked"] = "3-1";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 活动删除
* $Id: event_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("14")) {
// エラー表示
$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");
$volunteer_event_dat= VolunteerEventDat::getById($id);
if ($volunteer_event_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;
}
$aliHandler = new AliUploadHandler();
$aliHandler->delete(substr ( $volunteer_event_dat->front_image, strrpos ( $volunteer_event_dat->front_image, "/" ) + 1 ));
// 数据库更新
$volunteer_event_dat->delete_flg = true;
$volunteer_event_dat->save();
// 跳到一览页
header("Location:event_list.php?search_flg=true");
exit;
<?php
/**
* 活动列表-数据详情
* $Id: event_detail_list.php,v 1.1 2020/01/03 11:18:46 Exp $
* @author lixq
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("14")) {
// エラー表示
$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");
$name = ParamUtil::getRequestString("name");
$mobile = ParamUtil::getRequestString("mobile");
$is_circle = ParamUtil::getRequestString("is_circle");
$is_finish = ParamUtil::getRequestString("is_finish");
$circle_id = ParamUtil::getRequestString("circle_id");
$order_key = ParamUtil::getRequestString("order_key", "index_no");
$sort = ParamUtil::getRequestString("sort", "ASC");
$page_num = ParamUtil::getRequestNumber("page_num", 1);
$page_row = MANAGER_DEFAULT_ROW_COUNT;
$paging_url_link = "./event_detail_list.php";
// trueの場合、Sessionを再設定
$search_flg = ParamUtil::getRequestBoolean("search_flg", false);
$session_name = "event_detail_list_criteria";
if ($search_flg) {
if (isset($_SESSION[$session_name])){
$param = $_SESSION[$session_name];
} else {
$param = array();
}
if (isset($param["id"])) {
$id = $param["id"];
}
if (isset($param["name"])) {
$name = $param["name"];
}
if (isset($param["is_finish"])) {
$is_finish = $param["is_finish"];
}
if (isset($param["mobile"])) {
$mobile = $param["mobile"];
}
if (isset($param["is_circle"])) {
$is_circle = $param["is_circle"];
}
if (isset($param["circle_id"])) {
$circle_id = $param["circle_id"];
}
if (isset($param["page_num"])) {
$page_num = $param["page_num"];
}
} else {
// 検索条件を作成してsessionに設定
$param = array();
if (!empty($id)) {
$param["id"] = $id;
}
if (!empty($name)) {
$param["name"] = $name;
}
if (!empty($mobile)) {
$param["mobile"] = $mobile;
}
if (!empty($is_circle)) {
$param["is_circle"] = $is_circle;
}
if (!empty($is_finish)) {
$param["is_finish"] = $is_finish;
}
if (!empty($circle_id)) {
$param["circle_id"] = $circle_id;
}
if (!empty($page_num)) {
$param["page_num"] = $page_num;
}
$_SESSION[$session_name] = $param;
}
$event_dat = VolunteerEventDat::getById($id);
if ($event_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;
}
$event_member_list = [];
$total_count = 0;
$finish_count = 0;
$circle_list = [];
array_push($circle_list, ["title"=>"请选择","id"=>""]);
//总件数
$event_member_count = CompassHandler::getEventMemberListCount($param);
// // 一览取得
if ($event_member_count > 0) {
$offset = ($page_num - 1) * $page_row;
$event_member_list = CompassHandler::getEventMemberList($param, $order_key, $sort, $offset, $page_row);
$page_count = ceil($event_member_count / $page_row);
$show_page_num = MANAGER_PAGING_SHOW_PAGE_COUNT;
$page_range = PagingHandler::getPageRange($page_num, $page_count, $show_page_num);
$page_first = $page_range[0];
$page_end = $page_range[1];
$total_count = count($event_member_list);
foreach ($event_member_list as $tmp){
if(!empty($tmp["finish_time"])){
$finish_count += 1;
}
if($tmp["circle_id"] != 0){
array_push($circle_list, ["title"=>$tmp["circle_title"],"id"=>$tmp["circle_id"]]);
$circle_list = array_unique($circle_list,SORT_REGULAR);
}
}
}
// ページ
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "event_detail_list.inc";
$layout_pages["menu_clicked"] = "3-1";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 志愿者活动编辑
* $Id: event_edit_input.php,v 1.1 2020/01/03 11:18:46 Exp $
* @author lixq
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("14")) {
// エラー表示
$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");
$volunteer_event_dat = VolunteerEventDat::getById($id);
if ($volunteer_event_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;
}
$checkedScope = [];
if(!empty($volunteer_event_dat->province)){
array_push($checkedScope, "school");
}
if($volunteer_event_dat->include_social_user){
array_push($checkedScope, "social");
}
$province_list = [["lable"=>"","value"=>""]];
$city_list = [];
$district_list = [];
if($_account->role == 10 || $_account->role == 99){
$param = array();
$param["delete_flg"] = false;
$school_list = SchoolMst::getList($param);
foreach ($school_list as $tmp){
if(!empty($tmp->province)){
array_push($province_list, ["lable"=>$tmp->province,"value"=>$tmp->province]);
}
if(!empty($tmp->city)){
array_push($city_list,["lable"=>$tmp->province,"value"=>$tmp->city]);
}
if(!empty($tmp->district)){
array_push($district_list,["lable"=>$tmp->city,"value"=>$tmp->district]);
}
}
$province_list = array_unique($province_list,SORT_REGULAR);
$city_list = array_unique($city_list,SORT_REGULAR);
$district_list = array_unique($district_list,SORT_REGULAR);
}
$new_city_list = [];
$new_district_list = [];
if(!empty($volunteer_event_dat->province)){
array_push($new_city_list, ["lable"=>"", "value"=>""]);
foreach ($city_list as $tmp){
if ($volunteer_event_dat->province == $tmp["lable"]){
array_push($new_city_list, ["lable"=>$tmp["lable"], "value"=>$tmp["value"]]);
}
}
array_push($new_district_list, ["lable"=>"", "value"=>""]);
foreach ($district_list as $tmp){
if ($volunteer_event_dat->city == $tmp["lable"]){
array_push($new_district_list, ["lable"=>$tmp["lable"], "value"=>$tmp["value"]]);
}
}
}
$scope_list = [];
if($_account->user_id != 0){
array_push($scope_list, ["id"=>"school","title"=>"区域内学校"]);
array_push($scope_list, ["id"=>"social","title"=>"社会人士"]);
}else if($_account->school_id != 0){
array_push($scope_list, ["id"=>"school","title"=>"校内"]);
array_push($scope_list, ["id"=>"social","title"=>"社会人士"]);
}else if($_account->government_id != 0){
array_push($scope_list, ["id"=>"school","title"=>"辖区区域内学校"]);
array_push($scope_list, ["id"=>"social","title"=>"社会人士"]);
}else {
array_push($scope_list, ["id"=>"school","title"=>"指定区域内学校"]);
array_push($scope_list, ["id"=>"social","title"=>"社会人士"]);
}
// JavaScriptページ
$_SCRIPT_FILE = array("scripts/validators.js");
// ページ
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "event_edit_input.inc";
$layout_pages["menu_clicked"] = "3-1";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 活动发布完成
* $Id: event_publishing_result.php,v 1.1 2020/01/03 11:18:46 Exp $
* @author lixq
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("14")) {
// エラー表示
$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");
$title = ParamUtil::getRequestString("title");
$comment = ParamUtil::getRequestString("comment");
$position = ParamUtil::getRequestString("position");
$position_longitude = ParamUtil::getRequestString("position_longitude");
$position_latitude = ParamUtil::getRequestString("position_latitude");
$scope = ParamUtil::getRequestArray("scope", array());
$province = ParamUtil::getRequestString("province");
$city = ParamUtil::getRequestString("city");
$district = ParamUtil::getRequestString("district");
$max_member_flg = ParamUtil::getRequestString("max_member_flg");
$max_member = ParamUtil::getRequestNumber("max_member");
$start_time = ParamUtil::getRequestString("start_time");
$finish_time = ParamUtil::getRequestString("finish_time");
$time_length = ParamUtil::getRequestString("time_length");
$enroll_time = ParamUtil::getRequestString("enroll_time");
$leader_name = ParamUtil::getRequestString("leader_name");
$leader_contact = ParamUtil::getRequestString("leader_contact");
$venue = ParamUtil::getRequestString("venue");
$venue_time = ParamUtil::getRequestString("venue_time");
$author= ParamUtil::getRequestString("author");
$volunteer_event_dat = VolunteerEventDat::getById($id);
if ($volunteer_event_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;
}
$volunteer_event_dat->title = $title;
$volunteer_event_dat->comment = $comment;
$volunteer_event_dat->start_time = $start_time;
$volunteer_event_dat->finish_time = $finish_time;
$volunteer_event_dat->enroll_time = $enroll_time;
$volunteer_event_dat->position = $position;
if(empty($position_latitude)){
$volunteer_event_dat->position_latitude = $position_latitude;
}
if(empty($position_longitude)){
$volunteer_event_dat->position_longitude= $position_longitude;
}
$volunteer_event_dat->account_id = $_account->id;
if(empty($author)){
$volunteer_event_dat->author = $_account->name;
}else{
$volunteer_event_dat->author = $author;
}
$volunteer_event_dat->author_role = $_account->role;
if($_account->school_id != 0){
$school_mst = SchoolMst::getById($_account->school_id);
$volunteer_event_dat->school_no = $school_mst->school_no;
$volunteer_event_dat->original_source = $school_mst->original_source;
}
if(in_array("school", $scope)){
if($_account->user_id != 0){
$user_mst = UserMst::getById($_account->user_id);
$volunteer_event_dat->province = $user_mst->province;
$volunteer_event_dat->city = $user_mst->city;
$volunteer_event_dat->district = $user_mst->district;
}else if($_account->school_id != 0){
$school_mst = SchoolMst::getById($_account->school_id);
$volunteer_event_dat->province = $school_mst->province;
$volunteer_event_dat->city = $school_mst->city;
$volunteer_event_dat->district = $school_mst->district;
}else if($_account->government_id != 0){
$government_mst = GovernmentMst::getById($_account->government_id);
$volunteer_event_dat->province = $government_mst->province;
$volunteer_event_dat->city = $government_mst->city;
$volunteer_event_dat->district = $government_mst->district;
}else {
$volunteer_event_dat->province = $province;
$volunteer_event_dat->city = $city;
$volunteer_event_dat->district = $district;
}
}else if(in_array("social", $scope)){
$volunteer_event_dat->include_social_user = true;
}
if($max_member_flg == "2"){
$volunteer_event_dat->max_member = $max_member;
}
$volunteer_event_dat->time_length = $time_length;
$volunteer_event_dat->leader_name = $leader_name;
$volunteer_event_dat->leader_contact = $leader_contact;
$volunteer_event_dat->venue = $venue;
$volunteer_event_dat->venue_time = $venue_time;
if(!empty($_FILES['front_image']['tmp_name'])){
$upload_file = FileUploadUtil::getScalarFile(@$_FILES["front_image"]);
$tmp_file_name = date("YmdHis") . "_" . trim(basename($upload_file->name));
$aliHandler = new AliUploadHandler();
$aliHandler->delete(substr ( $volunteer_event_dat->front_image, strrpos ( $volunteer_event_dat->front_image, "/" ) + 1 ));
$url = $aliHandler->uploadImg($tmp_file_name, $upload_file->tmp_name);
ErrorLogger::doOutput($url);
$volunteer_event_dat->front_image = $url;
}
$volunteer_event_dat->save();
// ページ
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "event_edit_result.inc";
$layout_pages["menu_clicked"] = "3-1";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 活动审核
* $Id: event_examine.php,v 1.1 2020/01/03 11:18:46 Exp $
* @author lixq
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("15")) {
// エラー表示
$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;
}
$finish_time = ParamUtil::getRequestString("finish_time");
$author = ParamUtil::getRequestString("author");
$start_time = ParamUtil::getRequestString("start_time");
$order_key = ParamUtil::getRequestString("order_key", "id");
$sort = ParamUtil::getRequestString("sort", "ASC");
$page_num = ParamUtil::getRequestNumber("page_num", 1);
$page_row = MANAGER_DEFAULT_ROW_COUNT;
$paging_url_link = "./event_examine.php";
// trueの場合、Sessionを再設定
$search_flg = ParamUtil::getRequestBoolean("search_flg", false);
$session_name = "event_examine_criteria";
if ($search_flg) {
if (isset($_SESSION[$session_name])){
$param = $_SESSION[$session_name];
} else {
$param = array();
}
if (isset($param["registration_date_MAX"])) {
$finish_time = $param["registration_date_MAX"];
}
if (isset($param["registration_date_MIN"])) {
$start_time = $param["registration_date_MIN"];
}
if (isset($param["author"])) {
$author = $param["author"];
}
} else {
// 検索条件を作成してsessionに設定
$param = array();
if (!empty($finish_time)) {
$param["registration_date_MAX"] = $finish_time;
}
if (!empty($start_time)) {
$param["registration_date_MIN"] = $start_time;
}
if (!empty($author)) {
$param["author"] = $author;
}
$_SESSION[$session_name] = $param;
}
// 一览取得
$param["delete_flg"] = false;
$param["status"] = "NEW";
if($_account->user_id != 0){
//TODO
}
$volunteer_event_list = [];
$volunteer_event_count = VolunteerEventDat::getListCount($param);
// 一览取得
if ($volunteer_event_count > 0) {
$offset = ($page_num - 1) * $page_row;
$volunteer_event_list = VolunteerEventDat::getList($param, $order_key, $sort, $offset, $page_row);
$page_count = ceil($volunteer_event_count / $page_row);
$show_page_num = MANAGER_PAGING_SHOW_PAGE_COUNT;
$page_range = PagingHandler::getPageRange($page_num, $page_count, $show_page_num);
$page_first = $page_range[0];
$page_end = $page_range[1];
}
foreach ($volunteer_event_list as $tmp){
if(!empty($tmp->circle_id)){
$tmp->author = CircleDat::getById($tmp->circle_id)->title;
}
}
// JavaScriptページ
$_SCRIPT_FILE = array("scripts/validators.js");
// ページ
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "event_examine.inc";
$layout_pages["menu_clicked"] = "3-3";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 活动审核详情
* $Id: event_examine_input.php,v 1.1 2020/01/03 11:18:46 Exp $
* @author lixq
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("15")) {
// エラー表示
$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");
$volunteer_event_dat = VolunteerEventDat::getById($id);
if ($volunteer_event_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;
}
if ($volunteer_event_dat->status != "NEW") {
// エラー表示
$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;
}
if(!empty($volunteer_event_dat->circle_id)){
$volunteer_event_dat->author = CircleDat::getById($volunteer_event_dat->circle_id)->title;
}
// ページ
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "event_examine_input.inc";
$layout_pages["menu_clicked"] = "3-3";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 活动审核完成
* $Id: event_examine_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("15")) {
// エラー表示
$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");
$status = ParamUtil::getRequestString("status");
$volunteer_event_dat = VolunteerEventDat::getById($id);
if ($volunteer_event_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;
}
// 更新数据库
$volunteer_event_dat->status = $status;
$volunteer_event_dat->auditor_id = $_account->id;
$volunteer_event_dat->auditor_name = $_account->name;
$volunteer_event_dat->save();
// 页面表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "event_examine_result.inc";
$layout_pages["menu_clicked"] = "3-3";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 活动列表-数据详情-时长录入
* $Id: event_input_time.php,v 1.1 2015/10/08 11:18:46 wanggb Exp $
* @author wanggb
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("14")) {
// エラー表示
$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;
}
// 参数取得
$event_id = ParamUtil::getRequestString("event_id");
$ids = ParamUtil::getRequestString("ids");
$names = ParamUtil::getRequestString("names");
if (empty($ids) || empty($names)) {
// エラー表示
$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;
}
// JavaScriptページ
$_SCRIPT_FILE = array("scripts/validators.js","scripts/event_input_time.js");
// 页面表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "event_input_time.inc";
$layout_pages["menu_clicked"] = "3-1";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 活动列表-数据详情-时长录入完成
* $Id: event_input_time_result.php,v 1.1 2020/01/03 11:18:46 Exp $
* @author lixq
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("14")) {
// エラー表示
$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;
}
// 参数取得
$event_id = ParamUtil::getRequestString("event_id");
$ids = ParamUtil::getRequestString("ids");
$comment = ParamUtil::getRequestString("comment");
$time_length = ParamUtil::getRequestString("time_length");
$base64 = ParamUtil::getRequestArray("base64", array());
$image_url = "";
if (count($base64) > 0) {
$aliHandler = new AliUploadHandler();
for ($i = 0;$i<count($base64);$i++){
$json = json_decode($base64[$i],true);
$imgBase64 = $json["base64data"];
$file_name = $json["filename"];
$file_size = $json["filesize"];
$new_file = UPLOAD_TMP_DIR . "/" .$file_name;
if (preg_match('/^(data:\s*image\/(\w+);base64,)/',$imgBase64,$res)) {
if (file_put_contents($new_file,base64_decode(str_replace($res[1],'', $imgBase64)))) {
$url = $aliHandler->uploadImg($file_name,$new_file);
if(strpos($url, "http") === 0){
$image_url .= $url;
$image_url .= "|";
}
}
@unlink($new_file);
}
}
}
if(!empty($image_url)){
$image_url = substr($image_url,0,strlen($image_url)-1);
}
$id_arr = explode(",", $ids);
foreach ($id_arr as $id){
$volunteer_event_member_dat = VolunteerEventMemberDat::getById($id);
if(empty($volunteer_event_member_dat)){
continue;
}
$volunteer_event_member_dat->comment = $comment;
$volunteer_event_member_dat->time_length = $time_length;
$volunteer_event_member_dat->images = $image_url;
$volunteer_event_member_dat->status = "TIME";
$volunteer_event_member_dat->save();
}
// 页面表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "event_input_time_result.inc";
$layout_pages["menu_clicked"] = "3-1";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 系统动态
* $Id: account_list.php,v 1.1 2015/10/08 11:18:46 wanggb Exp $
* @author zhanghuichuan
* 活动列表
* $Id: event_list.php,v 1.1 2015/10/08 11:18:46 Exp $
* @author lixq
* @package manager.public_html
*/
// 底层包含
......@@ -12,23 +12,42 @@ require_once("manager_include.inc");
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("ADMIN,MANAGER,STAFF")) {
if (!checkAuthority("14")) {
// エラー表示
$layout_pages = array();
$layout_pages["footer"] = "footer.inc";
$layout_pages["top"] = "menu.inc";
$layout_pages["middle"] = "error.inc";
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "error.inc";
$message = "权限不足,请联系系统管理员。";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/topmenutopsub_layout.inc");
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
}
//试卷
$order_key = ParamUtil::getRequestString("order_key", "id");
$sort = ParamUtil::getRequestString("sort", "DESC");
$page_num = ParamUtil::getRequestNumber("page_num", 1);
$page_row = MANAGER_DEFAULT_ROW_COUNT;
$paging_url_link = "./event_list.php";
$param = array();
$param["delete_flg"] = false;
//总件数
$event_count = VolunteerEventDat::getListCount($param);
// 一览取得
if ($event_count > 0) {
$offset = ($page_num - 1) * $page_row;
$event_list = CompassHandler::getEventList($param, $order_key, $sort, $offset, $page_row);
$page_count = ceil($event_count / $page_row);
$show_page_num = MANAGER_PAGING_SHOW_PAGE_COUNT;
$page_range = PagingHandler::getPageRange($page_num, $page_count, $show_page_num);
$page_first = $page_range[0];
$page_end = $page_range[1];
}
// ページ
$layout_pages = array();
$layout_pages["top"] = "menu.inc";
$layout_pages["menu_clicked"] = "li_event";
$layout_pages["middle"] = "event_list.inc";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/topmenutopsub_layout.inc");
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "event_list.inc";
$layout_pages["menu_clicked"] = "3-1";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 活动列表-数据详情-用户详情
* $Id: event_member_detail.php,v 1.1 2020/01/03 11:18:46 Exp $
* @author lixq
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("14")) {
// エラー表示
$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");
$volunteer_event_member_dat = VolunteerEventMemberDat::getById($id);
if ($volunteer_event_member_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;
}
$images = [];
if(!empty($volunteer_event_member_dat->images)){
$images = explode("|", $volunteer_event_member_dat->images);
}
$event_dat = VolunteerEventDat::getById($volunteer_event_member_dat->volunteer_event_id);
$param = [];
$param["member_id"] = $id;
$event_member_list = CompassHandler::getEventMemberList($param);
// ページ
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "event_member_detail.inc";
$layout_pages["menu_clicked"] = "3-1";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 活动发布
* $Id: event_publishing.php,v 1.1 2020/01/03 11:18:46 Exp $
* @author lixq
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("14")) {
// エラー表示
$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;
}
$province_list = [["lable"=>"","value"=>""]];
$city_list = [];
$district_list = [];
if($_account->role == 10 || $_account->role == 99){
$param = array();
$param["delete_flg"] = false;
$school_list = SchoolMst::getList($param);
foreach ($school_list as $tmp){
if(!empty($tmp->province)){
array_push($province_list, ["lable"=>$tmp->province,"value"=>$tmp->province]);
}
if(!empty($tmp->city)){
array_push($city_list,["lable"=>$tmp->province,"value"=>$tmp->city]);
}
if(!empty($tmp->district)){
array_push($district_list,["lable"=>$tmp->city,"value"=>$tmp->district]);
}
}
$province_list = array_unique($province_list,SORT_REGULAR);
$city_list = array_unique($city_list,SORT_REGULAR);
$district_list = array_unique($district_list,SORT_REGULAR);
}
$scope_list = [];
if($_account->user_id != 0){
array_push($scope_list, ["id"=>"school","title"=>"区域内学校"]);
array_push($scope_list, ["id"=>"social","title"=>"社会人士"]);
}else if($_account->school_id != 0){
array_push($scope_list, ["id"=>"school","title"=>"校内"]);
array_push($scope_list, ["id"=>"social","title"=>"社会人士"]);
}else if($_account->government_id != 0){
array_push($scope_list, ["id"=>"school","title"=>"辖区区域内学校"]);
array_push($scope_list, ["id"=>"social","title"=>"社会人士"]);
}else {
array_push($scope_list, ["id"=>"school","title"=>"指定区域内学校"]);
array_push($scope_list, ["id"=>"social","title"=>"社会人士"]);
}
// JavaScriptページ
$_SCRIPT_FILE = array("scripts/validators.js");
// ページ
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "event_publishing.inc";
$layout_pages["menu_clicked"] = "3-2";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 活动发布完成
* $Id: event_publishing_result.php,v 1.1 2020/01/03 11:18:46 Exp $
* @author lixq
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("14")) {
// エラー表示
$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;
}
// 参数取得
$title = ParamUtil::getRequestString("title");
$comment = ParamUtil::getRequestString("comment");
$position = ParamUtil::getRequestString("position");
$position_longitude = ParamUtil::getRequestString("position_longitude");
$position_latitude = ParamUtil::getRequestString("position_latitude");
$scope = ParamUtil::getRequestArray("scope", array());
$province = ParamUtil::getRequestString("province");
$city = ParamUtil::getRequestString("city");
$district = ParamUtil::getRequestString("district");
$max_member_flg = ParamUtil::getRequestString("max_member_flg");
$max_member = ParamUtil::getRequestNumber("max_member");
$start_time = ParamUtil::getRequestString("start_time");
$finish_time = ParamUtil::getRequestString("finish_time");
$time_length = ParamUtil::getRequestString("time_length");
$enroll_time = ParamUtil::getRequestString("enroll_time");
$leader_name = ParamUtil::getRequestString("leader_name");
$leader_contact = ParamUtil::getRequestString("leader_contact");
$venue = ParamUtil::getRequestString("venue");
$venue_time = ParamUtil::getRequestString("venue_time");
$author= ParamUtil::getRequestString("author");
$volunteer_event_dat = new VolunteerEventDat();
$volunteer_event_dat->title = $title;
$volunteer_event_dat->comment = $comment;
$volunteer_event_dat->start_time = $start_time;
$volunteer_event_dat->finish_time = $finish_time;
$volunteer_event_dat->enroll_time = $enroll_time;
$volunteer_event_dat->position = $position;
$volunteer_event_dat->position_latitude = $position_latitude;
$volunteer_event_dat->position_longitude = $position_longitude;
$volunteer_event_dat->account_id = $_account->id;
if(empty($author)){
$volunteer_event_dat->author = $_account->name;
}else{
$volunteer_event_dat->author = $author;
}
$volunteer_event_dat->author_role = $_account->role;
if($_account->school_id != 0){
$school_mst = SchoolMst::getById($_account->school_id);
$volunteer_event_dat->school_no = $school_mst->school_no;
$volunteer_event_dat->original_source = $school_mst->original_source;
}
if(in_array("school", $scope)){
if($_account->user_id != 0){
$user_mst = UserMst::getById($_account->user_id);
$volunteer_event_dat->province = $user_mst->province;
$volunteer_event_dat->city = $user_mst->city;
$volunteer_event_dat->district = $user_mst->district;
}else if($_account->school_id != 0){
$school_mst = SchoolMst::getById($_account->school_id);
$volunteer_event_dat->province = $school_mst->province;
$volunteer_event_dat->city = $school_mst->city;
$volunteer_event_dat->district = $school_mst->district;
}else if($_account->government_id != 0){
$government_mst = GovernmentMst::getById($_account->government_id);
$volunteer_event_dat->province = $government_mst->province;
$volunteer_event_dat->city = $government_mst->city;
$volunteer_event_dat->district = $government_mst->district;
}else {
$volunteer_event_dat->province = $province;
$volunteer_event_dat->city = $city;
$volunteer_event_dat->district = $district;
}
}else if(in_array("social", $scope)){
$volunteer_event_dat->include_social_user = true;
}
if($max_member_flg == "2"){
$volunteer_event_dat->max_member = $max_member;
}
$volunteer_event_dat->time_length = $time_length;
$volunteer_event_dat->leader_name = $leader_name;
$volunteer_event_dat->leader_contact = $leader_contact;
$volunteer_event_dat->venue = $venue;
$volunteer_event_dat->venue_time = $venue_time;
$volunteer_event_dat->status = "NEW";
if(!empty($_FILES['front_image']['tmp_name'])){
$upload_file = FileUploadUtil::getScalarFile(@$_FILES["front_image"]);
$tmp_file_name = date("YmdHis") . "_" . trim(basename($upload_file->name));
$aliHandler = new AliUploadHandler();
$url = $aliHandler->uploadImg($tmp_file_name, $upload_file->tmp_name);
ErrorLogger::doOutput($url);
$volunteer_event_dat->front_image = $url;
}
$volunteer_event_dat->save();
// ページ
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "event_publishing_result.inc";
$layout_pages["menu_clicked"] = "3-2";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
......@@ -13,7 +13,7 @@ require_once("manager_include.inc");
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("ADMIN")) {
if (!checkAuthority("2")) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
......
......@@ -12,7 +12,7 @@ require_once("manager_include.inc");
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("ADMIN")) {
if (!checkAuthority("2")) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
......
......@@ -12,7 +12,7 @@ require_once("manager_include.inc");
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("ADMIN")) {
if (!checkAuthority("2")) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
......
......@@ -18,7 +18,7 @@ require_once("manager_include.inc");
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("ADMIN")) {
if (!checkAuthority("2")) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
......
......@@ -12,7 +12,7 @@ require_once("manager_include.inc");
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("ADMIN")) {
if (!checkAuthority("2")) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
......
......@@ -12,7 +12,7 @@ require_once("manager_include.inc");
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("ADMIN")) {
if (!checkAuthority("2")) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
......
<?php
/**
* 领导机构删除
* $Id: government_delete_result.php,v 1.1 2020/01/03 11:18:46 Exp $
* @author lixq
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("2")) {
// エラー表示
$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");
$government_mst = GovernmentMst::getById($id);
if ($government_mst == null) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "government_list.inc";
$layout_pages["menu_clicked"] = "menu_grade";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
}
// 数据库更新
$government_mst->delete_flg = true;
$government_mst->save();
// 跳到一览页
header("Location:government_list.php");
exit;
<?php
/**
* 领导机构-二维码编辑
* $Id: government_qr_edit.php,v 1.1 2020/01/03 11:18:46 Exp $
* @author lixq
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("2")) {
// エラー表示
$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");
$government_id = ParamUtil::getRequestString("government_id");
$government_title = ParamUtil::getRequestString("government_title");
$action_type = ParamUtil::getRequestString("action_type");
$government_qr_dat = new GovernmentQrDat();
if($action_type =="edit"){
$government_qr_dat= GovernmentQrDat::getById($id);
if ($government_qr_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;
}
}
$qr_image = $government_qr_dat->qr_image;
$use_count = $government_qr_dat->use_count;
$max_count = $government_qr_dat->max_count;
$limit_date = $government_qr_dat->limit_date;
$qr_image = $government_qr_dat->qr_image;
$_SCRIPT_FILE = array("scripts/validators.js", "scripts/government_qr_edit_input.js");
// 页面表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "government_qr_edit_input.inc";
$layout_pages["menu_clicked"] = "5-2";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 领导机构编辑完成
* $Id: government_edit_result.php,v 1.1 2020/01/03 11:18:46 Exp $
* @author lixq
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("2")) {
// エラー表示
$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");
$government_id = ParamUtil::getRequestString("government_id");
$government_title = ParamUtil::getRequestString("government_title");
$action_type = ParamUtil::getRequestString("action_type");
$max_count = ParamUtil::getRequestNumber("max_count");
$limit_date = ParamUtil::getRequestString("limit_date");
if($action_type =="new"){
$government_qr_mst = new GovernmentQrDat();
}else{
$government_qr_mst = GovernmentQrDat::getById($id);
if ($government_qr_mst == null) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "error.inc";
$layout_pages["menu_clicked"] = "5-2";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
}
}
$government_mst = GovernmentMst::getById($government_id);
$government_qr_mst->government_id = $government_id;
$government_qr_mst->province = $government_mst->province;
$government_qr_mst->city = $government_mst->city;
$government_qr_mst->district = $government_mst->district;
$government_qr_mst->use_count = 0;
$government_qr_mst->max_count = $max_count;
$government_qr_mst->limit_date = $limit_date;
$government_qr_mst->title = $government_mst->title;
$government_qr_mst->save();
if(empty($government_qr_mst->qr_image)){
$param = array();
$param["delete_flg"] = false;
$government_qr_id = GovernmentQrDat::getList($param,"id","DESC")[0]->id;
//$qrHandler = new GetWxQrHandler(3,'pages/leaderRegister/leaderRegister');
$qrHandler = new GetWxQrHandler($government_qr_id);
$qr_img = $qrHandler->get_qrcode();
if(!$qr_img){
$error_msg = "二维码未生成,请联系管理员。";
}else{
$tmp_file_name = date("YmdHis") . "_" . $government_id . "_" . $government_qr_id. ".jpg";
if(!is_dir(UPLOAD_TMP_DIR)){
mkdir($path, 0777, true);
}
$file_path = UPLOAD_TMP_DIR . "/" . $tmp_file_name;
file_put_contents($file_path,$qr_img);
$aliHandler = new AliUploadHandler();
$url = $aliHandler->uploadImg($tmp_file_name, $file_path);
$government_qr_mst = GovernmentQrDat::getById($government_qr_id);
$government_qr_mst->qr_image = $url;
$government_qr_mst->save();
@unlink($file_path);
$error_msg = "二维码已生成!";
}
}
// 页面表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "government_qr_edit_result.inc";
$layout_pages["menu_clicked"] = "5-2";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 领导机构-二维码管理
* $Id: government_qr_list.php,v 1.1 2020/01/03 11:18:46 Exp $
* @author lixq
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("2")) {
// エラー表示
$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");
$government_mst = GovernmentMst::getById($id);
if ($government_mst == null) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "error.inc";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
}
$government_qr_list = [];
$order_key = ParamUtil::getRequestString("order_key", "id");
$sort = ParamUtil::getRequestString("sort", "DESC");
$page_num = ParamUtil::getRequestNumber("page_num", 1);
$page_row = MANAGER_DEFAULT_ROW_COUNT;
$paging_url_link = "./government_qr_list.php";
// 一览取得
$param = array();
$param["delete_flg"] = false;
$param["government_id"] = $id;
//总件数
$government_qr_count = GovernmentQrDat::getListCount($param);
// 获取相应页面的数据
if ($government_qr_count > 0) {
$offset = ($page_num - 1) * $page_row;
$government_qr_list = GovernmentQrDat::getList($param, $order_key, $sort, $offset, $page_row);
$page_count = ceil($government_qr_count / $page_row);
$show_page_num = MANAGER_PAGING_SHOW_PAGE_COUNT;
$page_range = PagingHandler::getPageRange($page_num, $page_count, $show_page_num);
$page_first = $page_range[0];
$page_end = $page_range[1];
}
// ページ
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "government_qr_list.inc";
$layout_pages["menu_clicked"] = "5-2";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
......@@ -13,7 +13,7 @@ require_once("manager_include.inc");
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("ADMIN")) {
if (!checkAuthority("3")) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
......
......@@ -13,7 +13,7 @@ require_once("manager_include.inc");
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("ADMIN")) {
if (!checkAuthority("3")) {
// エラー表示
$layout_pages = array();
$layout_pages["footer"] = "footer.inc";
......
......@@ -30,7 +30,7 @@ $title = ParamUtil::getRequestString("title");
if(!empty($_FILES['front_image']['tmp_name'])){
$upload_file = FileUploadUtil::getScalarFile(@$_FILES["front_image"]);
$tmp_file_name = date("Ymd") . "_" . trim(basename($upload_file->name));
$tmp_file_name = date("YmdHis") . "_" . trim(basename($upload_file->name));
$aliHandler = new AliUploadHandler();
$aliHandler->delete(substr ( $school_mst->front_image, strrpos ( $tmp_file_name, "/" ) + 1 ));
......@@ -38,7 +38,6 @@ if(!empty($_FILES['front_image']['tmp_name'])){
ErrorLogger::doOutput($url);
$school_mst->front_image = $url;
}
exit;
//创建的时候
if($action_type=="new") {
$certificate_mst = new CertificateMst();
......
<?php
/**
* 视频删除
* $Id: media_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("11")) {
// エラー表示
$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_media_mst = CourseMediaDat::getById($id);
if ($course_media_mst == null) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "media_list.inc";
$layout_pages["menu_clicked"] = "4-2";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
}
$aliHandler = new AliUploadHandler();
$aliHandler->delete(substr ( $course_media_mst->front_image, strrpos ( $course_media_mst->front_image, "/" ) + 1 ));
$aliHandler->delete(substr ( $course_media_mst->media, strrpos ( $course_media_mst->media, "/" ) + 1 ));
if($course_media_mst->course_id != 0){
$course_mst = CourseMst::getById($course_media_mst->course_id);
$course_mst->media_count -= 1;
$course_mst->save();
}
// 数据库更新
$course_media_mst->delete_flg = true;
$course_media_mst->save();
// 跳到一览页
header("Location:media_list.php?search_flg=true");
exit;
<?php
/**
* 视频编辑
* $Id: media_upload.php,v 1.1 2020/01/03 11:18:46 Exp $
* @author lixq
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("11")) {
// エラー表示
$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_media_dat = CourseMediaDat::getById($id);
if ($course_media_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;
}
$param = [];
$param["delete_flg"] = false;
$media_tag_list = MediaTagDat::getList($param);
$course_list = CourseMst::getList($param);
$title = $course_media_dat->title;
$tags = implode(",", explode("|", $course_media_dat->tags));
$teacher = $course_media_dat->teacher;
$media_type = $course_media_dat->course_id == 0?"0":"1";
$media_kind = $course_media_dat->is_free?"false":"true";
$price = $course_media_dat->price;
$front_image = $course_media_dat->front_image;
$course_name = '';
$course_id = $course_media_dat->course_id;
if( $course_id != 0){
$course_name = CourseMst::getById($course_id)->title;
}
// JavaScriptページ
$_SCRIPT_FILE = array("scripts/validators.js", "scripts/media_upload.js","scripts/form_checkbox_common.js","scripts/form_radio_common.js");
// ページ
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "media_edit_input.inc";
$layout_pages["menu_clicked"] = "4-2";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 视频编辑
* $Id: media_upload_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("11")) {
// エラー表示
$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");
$title = ParamUtil::getRequestString("title");
$tags = ParamUtil::getRequestString("tags");
$teacher = ParamUtil::getRequestString("teacher");
$media_type = ParamUtil::getRequestNumber("media_type");
$media_kind = ParamUtil::getRequestString("media_kind");
$price = ParamUtil::getRequestString("price");
$course_id = ParamUtil::getRequestNumber("course_id");
// error_log("title-->" . $title);
// error_log("tags-->" . $tags);
// error_log("teacher-->" . $teacher);
// error_log("media_type-->" . $media_type);
// error_log("media_kind-->" . $media_kind);
// error_log("price-->" . $price);
// error_log("course_id-->" . $course_id);
// exit;
$course_media_dat = CourseMediaDat::getById($id);
if ($course_media_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;
}
if(!empty($_FILES['front_image']['tmp_name'])){
$aliHandler = new AliUploadHandler();
//图片上传
$upload_file = FileUploadUtil::getScalarFile(@$_FILES["front_image"]);
$tmp_file_name = date("YmdHis") . "_" . trim(substr($upload_file->name, strrpos($upload_file->name, '/')+1));
$url = $aliHandler->uploadImg($tmp_file_name, $upload_file->tmp_name);
$course_media_dat->front_image = $url;
ErrorLogger::doOutput($url);
}
// 数据库更新
$course_media_dat->title = $title;
$course_media_dat->tags = implode("|", explode(",", $tags));
$course_media_dat->teacher = $teacher;
if($media_kind == 'true'){
$course_media_dat->price = $price;
$course_media_dat->is_free = false;
}else{
$course_media_dat->is_free = true;
}
if($media_type == 1){
$course_media_dat->course_id = $course_id;
}else{
$course_media_dat->course_id = 0;
}
$course_media_dat->save();
// 页面表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "media_edit_result.inc";
$layout_pages["menu_clicked"] = "4-2";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 视频一览
* $Id: media_list.php,v 1.1 2020/01/03 11:18:46 Exp $
* @author lixq
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("11")) {
// エラー表示
$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;
}
$title = ParamUtil::getRequestString("title");
$media_type = ParamUtil::getRequestString("media_type");//种类 0:所有 1:单个 2:合集
$media_kind = ParamUtil::getRequestString("media_kind");//类型 0:所有 1:志愿免费 2:公益收费
$order_key = ParamUtil::getRequestString("order_key", "id");
$sort = ParamUtil::getRequestString("sort", "DESC");
$page_num = ParamUtil::getRequestNumber("page_num", 1);
$page_row = MANAGER_DEFAULT_ROW_COUNT;
$paging_url_link = "./media_list.php";
// trueの場合、Sessionを再設定
$search_flg = ParamUtil::getRequestBoolean("search_flg", false);
$session_name = "media_criteria";
if ($search_flg) {
if (isset($_SESSION[$session_name])){
$param = $_SESSION[$session_name];
} else {
$param = array();
}
if (isset($param["title"])) {
$title = $param["title"];
}
if (isset($param["media_type"])) {
$media_type = $param["media_type"];
}
if (isset($param["media_kind"])) {
$media_kind = $param["media_kind"];
}
if (isset($param["page_num"])) {
$page_num = $param["page_num"];
}
} else {
// 検索条件を作成してsessionに設定
$param = array();
if (!empty($media_type)) {
$param["media_type"] = $media_type;
}
if (!empty($media_kind)) {
$param["media_kind"] = $media_kind;
}
if (!empty($title)) {
$param["title"] = $title;
}
if (!empty($page_num)) {
$param["page_num"] = $page_num;
}
$_SESSION[$session_name] = $param;
}
$course_list = [];
//总件数
$course_count = CompassHandler::getCourseMediaListCount($param);
// // 一览取得
if ($course_count > 0) {
$offset = ($page_num - 1) * $page_row;
$course_list = CompassHandler::getCourseMediaList($param, $order_key, $sort, $offset, $page_row);
$page_count = ceil($course_count / $page_row);
$show_page_num = MANAGER_PAGING_SHOW_PAGE_COUNT;
$page_range = PagingHandler::getPageRange($page_num, $page_count, $show_page_num);
$page_first = $page_range[0];
$page_end = $page_range[1];
}
// ページ
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "media_list.inc";
$layout_pages["menu_clicked"] = "4-2";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
......@@ -29,7 +29,7 @@ $media_tag_list = MediaTagDat::getList($param);
$course_list = CourseMst::getList($param);
// JavaScriptページ
$_SCRIPT_FILE = array("scripts/validators.js", "scripts/media_upload.js","scripts/form_checkbox_common.js");
$_SCRIPT_FILE = array("scripts/validators.js", "scripts/media_upload.js","scripts/form_checkbox_common.js","scripts/form_radio_common.js");
// ページ
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
......
<?php
/**
* 视频上传
* $Id: media_upload_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("11")) {
// エラー表示
$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;
}
// 参数取得
$title = ParamUtil::getRequestString("title");
$tags = ParamUtil::getRequestString("tags");
$teacher = ParamUtil::getRequestString("teacher");
$media_type = ParamUtil::getRequestNumber("media_type");
$media_kind = ParamUtil::getRequestString("media_kind");
$price = ParamUtil::getRequestString("price");
$course_id = ParamUtil::getRequestNumber("course_id");
// error_log("size-->" . filesize($upload_file->tmp_name));
// error_log("title-->" . $title);
// error_log("tags-->" . $tags);
// error_log("teacher-->" . $teacher);
// error_log("media_type-->" . $media_type);
// error_log("media_kind-->" . $media_kind);
// error_log("price-->" . $price);
// error_log("course_id-->" . $course_id);
$course_media_dat = new CourseMediaDat();
$aliHandler = new AliUploadHandler();
//图片上传
$upload_file = FileUploadUtil::getScalarFile(@$_FILES["front_image"]);
$tmp_file_name = date("YmdHis") . "_" . trim(substr($upload_file->name, strrpos($upload_file->name, '/')+1));
$url = $aliHandler->uploadImg($tmp_file_name, $upload_file->tmp_name);
$course_media_dat->front_image = $url;
ErrorLogger::doOutput($url);
//视频上传
$upload_file = FileUploadUtil::getScalarFile(@$_FILES["media"]);
$tmp_file_name = date("YmdHis") . "_" . trim(substr($upload_file->name, strrpos($upload_file->name, '/')+1));
$url = $aliHandler->uploadVideo($tmp_file_name, $upload_file->tmp_name);
$course_media_dat->media = $url;
$course_media_dat->size = filesize($upload_file->tmp_name);
ErrorLogger::doOutput($url);
// 数据库更新
$course_media_dat->title = $title;
$course_media_dat->tags = implode("|", explode(",", $tags));
$course_media_dat->teacher = $teacher;
if($media_kind == 'true'){
$course_media_dat->price = $price;
$course_media_dat->is_free = false;
}else{
$course_media_dat->is_free = true;
}
if($media_type == 1){
$course_media_dat->course_id = $course_id;
$course_mst = CourseMst::getById($course_id);
$course_mst->media_count += 1;
$course_mst->save();
}
$course_media_dat->save();
// 页面表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "media_upload_result.inc";
$layout_pages["menu_clicked"] = "4-3";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 机构账号管理
* $Id: org_account_delete_result.php,v 1.1 2015/10/08 11:18:46 wanggb Exp $
* @author wanggb
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("13")) {
// エラー表示
$layout_pages = array();
$layout_pages["footer"] = "footer.inc";
$layout_pages["top"] = "menu.inc";
$layout_pages["middle"] = "error.inc";
$message = "权限不足,请联系系统管理员。";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/topmenutopsub_layout.inc");
exit;
}
// 参数取得
$id = ParamUtil::getRequestString("id");
$account_mst = AccountMst::getById($id);
if ($account_mst == null) {
// エラー表示
$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;
}
// 数据库更新
if ($account_mst->id != 1) {
$account_mst->delete_flg = true;
$account_mst->save();
}
// 跳到一览页
header("Location:org_account_list.php?id=" . $account_mst->user_id);
exit;
<?php
/**
* 机构账号管理编辑
* $Id: org_account_edit_input.php,v 1.1 2015/10/08 11:18:46 wanggb Exp $
* @author wanggb
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("13")) {
// エラー表示
$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");
$uid = ParamUtil::getRequestString("user_id");
$action_type = ParamUtil::getRequestString("action_type");
if($action_type == "new"){
$account_mst = new AccountMst();
}
if($action_type == "edit"){
$account_mst = AccountMst::getById($id);
if ($account_mst == 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;
}
}
$login = $account_mst->login;
$password = $account_mst->password;
$name = $account_mst->name;
$contact = $account_mst->contact;
$comment = $account_mst->comment;
$_SCRIPT_FILE = array("scripts/validators.js");
// 页面表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["menu_clicked"] = "2-1";
$layout_pages["right"] = "org_account_edit_input.inc";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 机构账号管理
* $Id: org_account_edit_result.php,v 1.1 2015/10/08 11:18:46 wanggb Exp $
* @author wanggb
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("13")) {
// エラー表示
$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");
if($action_type == "new"){
$account_mst = new AccountMst();
}
if($action_type == "edit"){
$account_mst = AccountMst::getById($id);
if ($account_mst == null) {
// エラー表示
$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;
}
}
$name = ParamUtil::getRequestString("name");
$login = ParamUtil::getRequestString("login");
$password = ParamUtil::getRequestString("password");
$contact = ParamUtil::getRequestString("contact");
$comment = ParamUtil::getRequestString("comment");
$uid = ParamUtil::getRequestNumber("uid");
// 登陆帐号唯一性判断
$param = array();
$param["delete_flg"] = false;
$param["login"] = $login;
$account_list = AccountMst::getList($param);
if (count($account_list) > 1) {
$error_message = "登陆帐号已经被使用,请换一个。";
$_SCRIPT_FILE = array("scripts/validators.js");
// 页面表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "org_account_edit_input.inc";
$layout_pages["menu_clicked"] = "2-1";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
}
// 数据库更新
$account_mst->login = $login;
$account_mst->password = $password;
$account_mst->name = $name;
$account_mst->contact = $contact;
$account_mst->comment = $comment;
$account_mst->user_id = $uid;
$account_mst->modules = "14";
$account_mst->role = 9;
$account_mst->save();
// 页面表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "org_account_edit_result.inc";
$layout_pages["menu_clicked"] = "2-1";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 机构账号管理
* $Id: org_account_list.php,v 1.1 2015/10/08 11:18:46 wanggb Exp $
* @author zhanghuichuan
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("13")) {
// エラー表示
$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");
$user_mst = UserMst::getById($id);
if ($user_mst == null || $user_mst->organization_status != "OK") {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "error.inc";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
}
$order_key = ParamUtil::getRequestString("order_key", "registration_date");
$sort = ParamUtil::getRequestString("sort", "DESC");
$page_num = ParamUtil::getRequestNumber("page_num", 1);
$page_row = MANAGER_DEFAULT_ROW_COUNT;
$paging_url_link = "./org_account_list.php";
$account_list = [];
// 一览取得
$param = array();
$param["delete_flg"] = false;
$param["user_id"] = $id;
//总件数
$account_count = AccountMst::getListCount($param);
// 获取相应页面的数据
if ($account_count > 0) {
$offset = ($page_num - 1) * $page_row;
$account_list = CompassHandler::getAccountlList($param, $order_key, $sort, $offset, $page_row);
$page_count = ceil($account_count / $page_row);
$show_page_num = MANAGER_PAGING_SHOW_PAGE_COUNT;
$page_range = PagingHandler::getPageRange($page_num, $page_count, $show_page_num);
$page_first = $page_range[0];
$page_end = $page_range[1];
}
// ページ
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "org_account_list.inc";
$layout_pages["menu_clicked"] = "2-1";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 机构认证-审阅
* $Id: org_accredited_input.php,v 1.1 2020/01/03 11:18:46 Exp $
* @author lixq
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("13")) {
// エラー表示
$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");
$user_mst = UserMst::getById($id);
if ($user_mst== 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;
}
// 页面表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "org_accredited_input.inc";
$layout_pages["menu_clicked"] = "2-1";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 机构认证
* $Id: org_accredited_list.php,v 1.1 2020/01/03 11:18:46 Exp $
* @author lixq
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("13")) {
// エラー表示
$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;
}
$title = ParamUtil::getRequestString("title");
$status = ParamUtil::getRequestString("status");
$order_key = ParamUtil::getRequestString("order_key", "id");
$sort = ParamUtil::getRequestString("sort", "DESC");
$page_num = ParamUtil::getRequestNumber("page_num", 1);
$page_row = MANAGER_DEFAULT_ROW_COUNT;
$paging_url_link = "./org_accredited_list.php";
// trueの場合、Sessionを再設定
$search_flg = ParamUtil::getRequestBoolean("search_flg", false);
$session_name = "org_accredited_criteria";
if ($search_flg) {
if (isset($_SESSION[$session_name])){
$param = $_SESSION[$session_name];
} else {
$param = array();
}
if (isset($param["title"])) {
$title = $param["title"];
}
if (isset($param["status"])) {
$status = $param["status"];
}
if (isset($param["page_num"])) {
$page_num = $param["page_num"];
}
} else {
// 検索条件を作成してsessionに設定
$param = array();
if (!empty($status)) {
$param["status"] = $status;
}
if (!empty($title)) {
$param["title"] = $title;
}
if (!empty($page_num)) {
$param["page_num"] = $page_num;
}
$_SESSION[$session_name] = $param;
}
$user_list = [];
//总件数
$user_count = CompassHandler::getOrgAccreditedListCount($param);
// // 一览取得
if ($user_count > 0) {
$offset = ($page_num - 1) * $page_row;
$user_list = CompassHandler::getOrgAccreditedList($param, $order_key, $sort, $offset, $page_row);
$page_count = ceil($user_count / $page_row);
$show_page_num = MANAGER_PAGING_SHOW_PAGE_COUNT;
$page_range = PagingHandler::getPageRange($page_num, $page_count, $show_page_num);
$page_first = $page_range[0];
$page_end = $page_range[1];
}
// ページ
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "org_accredited_list.inc";
$layout_pages["menu_clicked"] = "2-1";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 机构认证-审阅
* $Id: org_accredited_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("13")) {
// エラー表示
$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");
$organization_status = ParamUtil::getRequestString("organization_status");
$user_mst = UserMst::getById($id);
if ($user_mst== 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;
}
// 更新数据库
$user_mst->organization_status = $organization_status;
$user_mst->save();
// 页面表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "org_accredited_result.inc";
$layout_pages["menu_clicked"] = "2-1";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
......@@ -20,8 +20,11 @@ if (!checkAuthority("11")) {
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
}
$id = ParamUtil::getRequestNumber("id");
$param["delete_flg"] = false;
if(isset($id)){
$param["id"] = $id;
}
$course_list = CourseMst::getList($param,"id","ASC");
$result = array();
foreach ($course_list as $tmp) {
......
<?php
/**
* 公益收益一览
* $Id: proceeds_list.php,v 1.1 2020/01/03 11:18:46 Exp $
* @author lixq
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("11")) {
// エラー表示
$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;
}
$page_num = ParamUtil::getRequestNumber("page_num", 1);
$page_row = MANAGER_DEFAULT_ROW_COUNT;
$paging_url_link = "./proceeds_list.php";
$uer_media_list = [];
//总件数
$proceeds_count = CompassHandler::getProceedsMedia();
$proceeds = CompassHandler::getProceeds();
$param = array();
$param["name"] = "COURSE_RATE";
$course_rate = SystemConstantDat::getList($param)[0]->constant_value;
$count = CompassHandler::getProceedsMediaListCount();
// // 一览取得
if ($count> 0) {
$offset = ($page_num - 1) * $page_row;
$uer_media_list = CompassHandler::getProceedsMediaList(null, "id", "DESC", $offset, $page_row);
$page_count = ceil($count/ $page_row);
$show_page_num = MANAGER_PAGING_SHOW_PAGE_COUNT;
$page_range = PagingHandler::getPageRange($page_num, $page_count, $show_page_num);
$page_first = $page_range[0];
$page_end = $page_range[1];
}
// ページ
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "proceeds_list.inc";
$layout_pages["menu_clicked"] = "4-4";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
......@@ -47,7 +47,7 @@ if ($school_mst == null) {
if(!empty($_FILES['front_image']['tmp_name'])){
$upload_file = FileUploadUtil::getScalarFile(@$_FILES["front_image"]);
$tmp_file_name = date("Ymd") . "_" . trim(basename($upload_file->name));
$tmp_file_name = date("YmdHis") . "_" . trim(basename($upload_file->name));
$aliHandler = new AliUploadHandler();
$aliHandler->delete(substr ( $school_mst->front_image, strrpos ( $school_mst->front_image, "/" ) + 1 ));
......
......@@ -11,6 +11,17 @@ require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("3")) {
// エラー表示
$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;
}
if(!empty($_account->school_id)){
$school_mst = SchoolMst::getById($_account->school_id);
$id = $_account->school_id;
......@@ -24,16 +35,7 @@ if(!empty($_account->school_id)){
exit;
}
// 权限检查
if (!checkAuthority("3")) {
// エラー表示
$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;
}
$school_title = ParamUtil::getRequestString("school_title");
$order_key = ParamUtil::getRequestString("order_key", "id");
......@@ -44,7 +46,7 @@ $paging_url_link = "./school_list.php";
// trueの場合、Sessionを再設定
$search_flg = ParamUtil::getRequestBoolean("search_flg", false);
$session_name = "school_list";
$session_name = "school_criteria";
if ($search_flg) {
if (isset($_SESSION[$session_name])){
$param = $_SESSION[$session_name];
......@@ -80,7 +82,7 @@ if (!empty($school_title)) {
$param["title"] = $school_title;
}
//总件数
$school_count = SchoolMst::getListCount($param);
$school_count = CompassHandler::getSchoollListCount($param);
// 获取相应页面的数据
if ($school_count > 0) {
$offset = ($page_num - 1) * $page_row;
......
var zhl_update_num = 10;
var index = 0;
$(function () {
// 上传数量控制,判断是否定义并赋值
zhl_update_num = typeof zhl_update_num != "undefined" && zhl_update_num ? zhl_update_num : 1;
// 上传大小控制,当前为1M
//var zhl_update_size = 1 * 1024 * 1024;
/**
* 文件选择触发
*/
$("#zhl_admin_file").change(function () {
var fileAll = this.files.length;
var uploaded_len = $('#zhl_admin_imgs>div>img').length;
var total_len = uploaded_len + fileAll;
if (total_len > zhl_update_num) {
alert('最多' + zhl_update_num + '张图片');
return false;
}
for (var i = 0; i < fileAll; i++) {
var file = this.files[i];
// if (file.size > zhl_update_size) {
// var d = parseInt(i + 1);
// alert("你选择的第" + d + "个文件太大了!");
// return false;
// }
if (!/image\/\w+/.test(file.type)) {
alert("文件必须为图片!");
return false;
}
var path = file.type;
var extStart = path.lastIndexOf('/');
var ext = path.substring(extStart, path.length).toUpperCase();
//判断图片格式
if (ext !== '/PNG' && ext !== '/JPG' && ext !== '/JPEG' && ext !== '/GIF') {
alert('请上传正确格式的图片(PNG/JPG/JPEG/GIF)');
return false;
}
var filename = this.files[i]['name']; //文件名称
var reader = new FileReader();
//读取文件过程方法
reader.onerror = function (e) {
console.log("文件读取异常....");
alert('文件上传异常请关闭重试....');
}
reader.onabort = function (e) {
console.log("文件读取异常....");
alert('文件上传异常请关闭重试....');
};
reader.onload = function (e) {
index++;
var json = '{"filesize":"' + file.size + '","filename":"' + filename + '","base64data":"' + e.target.result + '"}';
var imgstr = '';
imgstr += '<div id="div_' + index + '" style="position: relative;display: inline-block" >';
imgstr += '<img id="img_' + index + '" src="' + e.target.result + '" class="zhl_admin_update_imgtmp" />';
imgstr += '<input type="hidden" name="base64[]" value=' + json + '>';
imgstr += '<div onclick="deleteImg(' + index + ')" id="close_' + index + '" style="position:absolute; z-indent:2;right:5px;top:5px;"><img class="delete-img" src="images/delete.png" style="width: 25px;height: 25px"/>';
imgstr += '</div>';
//限制上传的图片数
var len = $('#zhl_admin_imgs>div>img').length;
if (len < zhl_update_num) {
if (len == zhl_update_num - 1) {
$('#zhl_admin_img').hide();
} else {
$('#zhl_admin_img').show();
}
$('#zhl_admin_imgs').append(imgstr);
} else {
alert('最多' + zhl_update_num + '张图片');
$('#zhl_admin_img').hide();
return false;
}
$(".uploaded-num").html(len + 1);
}
reader.readAsDataURL(file);
}
});
})
/**
* 点击删除预选的图片
*/
function deleteImg(i) {
v.$confirm('删除该张图片?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
$("#div_" + i).remove();
$('#zhl_admin_img').show();
var len = $('#zhl_admin_imgs>div>img').length;
$(".uploaded-num").html(len);
v.$message({
type: 'success',
message: '删除成功!'
});
}).catch(() => {
v.$message({
type: 'info',
message: '已取消删除'
});
});
}
......@@ -70,7 +70,7 @@ function doCheckPopup(formName, viewTarget, valueTarget, requestUrl) {
html_data += '</table>';
html_data += '<table width=100%>';
html_data += '<tr>';
html_data += '<td align="center" nowrap><button type="button" class="el-button height_30 el-button--primary" onClick="setCheckboxValue(&quot;' + viewTarget + '&quot;, &quot;' + valueTarget + '&quot;, &quot;' + requestUrl + '&quot;, &quot;' + formName + '&quot;);" >确定</button></td>';
html_data += '<td align="center" nowrap><button class="el-button height_30 el-button--primary" onClick="setCheckboxValue(&quot;' + viewTarget + '&quot;, &quot;' + valueTarget + '&quot;, &quot;' + requestUrl + '&quot;, &quot;' + formName + '&quot;);" >确定</button></td>';
html_data += '</tr>';
html_data += '</table>';
doSelectPopup(html_data);
......
function doRadioPopup(formName, viewTarget, valueTarget, requestUrl) {
str_id = document.getElementsByName(valueTarget)[0].value;
id_array = str_id.split(",");
requestUrl = requestUrl + "?r=" + Math.round(Math.random() * 10000);
// TODO IEの場合は、背景の灰色は使わない。
// TODO IEの場合は、position: absolute;を指定して、大体同じに見えるようにする。
// TODO requestUrlに指定されたファイルから、jsonデータを受け取ってHTMLを生成する。
// 以下内容はテスト用サンル。
$.getJSON(requestUrl, function(json){
if (valueTarget == "course_id") {
type ="id";
}
var html_data = '';
html_data += '<table class="candidatetable">';
if (json.length == 0) {
html_data += '<td class="no_popup_result"><font color="#ff0000">无数据。</font></td></tr>';
} else if (json.length % 2 == 0) {
for(var i=0; i<json.length; i++){
var check_txt_left = '';
var check_txt_right = '';
html_data += '<tr>';
if(in_array(json[i][type], id_array)) {
check_txt_left = " checked";
}
if(in_array(json[(i+1)][type], id_array)) {
check_txt_right = " checked";
}
html_data += '<td align="left" nowrap><label><input type="radio" name="radio_array[]" value="' + json[i][type] + '"' + check_txt_left + '>' + json[i]["title"] + '</label></td>';
html_data += '<td align="left" nowrap><label><input type="radio" name="radio_array[]" value="' + json[(i+1)][type] + '"' + check_txt_right + '>' + json[(i+1)]["title"] + '</label></td>';
html_data += '</tr>';
i++;
}
} else {
for(var i=0; i<json.length-1; i++){
var check_txt_left = '';
var check_txt_right = '';
html_data += '<tr>';
if(in_array(json[i][type], id_array)) {
check_txt_left = " checked";
}
if(in_array(json[(i+1)][type], id_array)) {
check_txt_right = " checked";
}
html_data += '<td align="left" nowrap><label><input type="radio" name="radio_array[]" value="' + json[i][type] + '"' + check_txt_left + '>' + json[i]["title"] + '</label></td>';
html_data += '<td align="left" nowrap><label><input type="radio" name="radio_array[]" value="' + json[(i+1)][type] + '"' + check_txt_right + '>' + json[(i+1)]["title"] + '</label></td>';
html_data += '</tr>';
i++;
}
check_txt_left = '';
if(in_array(json[(json.length-1)][type], id_array)) {
check_txt_left = " checked";
}
html_data += '<tr><td align="left" nowrap><label><input type="radio" name="radio_array[]" value="' + json[(json.length-1)][type] + '"' + check_txt_left + '>' + json[(json.length-1)]["title"] + '</label></td><td></td></tr>';
}
html_data += '</table>';
html_data += '<table width=100%>';
html_data += '<tr>';
html_data += '<td align="center" nowrap><button class="el-button height_30 el-button--primary" onClick="setRadioboxValue(&quot;' + viewTarget + '&quot;, &quot;' + valueTarget + '&quot;, &quot;' + requestUrl + '&quot;, &quot;' + formName + '&quot;);">確認</button></td>';
html_data += '</tr>';
html_data += '</table>';
doSelectPopup(html_data);
})
}
\ No newline at end of file
$(document).ready(function () {
$("#limit_date").datepicker({
dateFormat: "yy-mm-dd",
showMonthAfterYear: "true",
minDate:"today",
monthNames: ['年 01 月', '年 02 月', '年 03 月', '年 04 月', '年 05 月', '年 06 月', '年 07 月', '年 08 月', '年 09 月', '年 10 月', '年 11 月', '年 12 月'],
});
})
$(document).ready(function () {
var post_max = document.media_upload.post_max.value;
var upload_max = document.media_upload.upload_max.value;
$('#file_max_size').html((post_max >upload_max?upload_max:post_max));
var post_max_str = document.media_upload.post_max.value;
var post_max = parseInt(post_max_str.substr(0, post_max_str.length - 1));
var upload_max_str = document.media_upload.upload_max.value;
var upload_max = parseInt(upload_max_str.substr(0, upload_max_str.length - 1));
$('#file_max_size').html((post_max > upload_max?upload_max:post_max));
})
function popAddTag(){
......@@ -34,22 +36,6 @@ function addTag(){
}
function popAddCourse(){
var html_data = '<div style="padding-left:20px;">';
html_data += '<p>合集名称</p>';
html_data += '<div class="input_200 el-input">';
html_data += '<input type="text" autocomplete="off" id="media_tag" class="el-input__inner"></div><br/>';
html_data += '<p>合集封面图</p>';
html_data += '<div><ul class="el-upload-list el-upload-list--picture-card"></ul>';
html_data += '<div tabindex="0" class="el-upload el-upload--picture-card"><i class="el-icon-plus"></i><input type="file" name="course_front_image" accept="image/png,image/gif,image/jpg,image/jpeg" class="el-upload__input"></div></div>';
// html_data += '<el-upload accept="image/png,image/gif,image/jpg,image/jpeg" list-type="picture-card" :on-change="handleChangeImg"'+
// ' :before-upload="onBeforeUploadImg"'+ ' :auto-upload="false"'+ ' :file-list="courseImgFileList"'+ ' name="course_front_image">'+ ' <i class="el-icon-plus"></i>'+
// '</el-upload>';
html_data += '<p>讲师介绍</p>';
html_data += '<el-input type="textarea" :rows="4" placeholder="请输入内容" name="teacher_profile" v-model="teacher_profile"></el-input>';
html_data += '<button type="button" class="el-button height_30 el-button--primary" onClick="addTag()" >确定</button>';
html_data += '<br/><br/></div>';
//html_data = $('#add_course').html();
doSelectPopup(html_data);
window.open('collection_media_edit_input.php?action_type=new','_self')
}
......@@ -13,7 +13,7 @@ require_once("manager_include.inc");
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("ADMIN")) {
if (!checkAuthority("1")) {
// エラー表示
$layout_pages = array();
$layout_pages["footer"] = "footer.inc";
......
......@@ -13,7 +13,7 @@ require_once("manager_include.inc");
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("ADMIN")) {
if (!checkAuthority("1")) {
// エラー表示
$layout_pages = array();
$layout_pages["footer"] = "footer.inc";
......
......@@ -12,7 +12,7 @@ require_once("manager_include.inc");
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("ADMIN")) {
if (!checkAuthority("1")) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
......
......@@ -57,10 +57,15 @@ global $modules;
</div>
<p>权限 <span style="color:#FF0000">※全不选即为超级管理员</span></p>
<template v-for="(modules, index) in modules_list">
<input type="checkbox" name="modules[]" :value="modules.id" v-model='checked' :id="modules.id" />
<label :for="modules.id">{{ modules.module }}</label>
<br>
<!-- <template v-for="(modules, index) in modules_list"> -->
<!-- <input type="checkbox" name="modules[]" :value="modules.id" v-model='checked' :id="modules.id" /> -->
<!-- <label :for="modules.id">{{ modules.module }}</label> -->
<!-- <br> -->
<!-- </template> -->
<template>
<el-checkbox-group v-model="checked">
<el-checkbox name="modules[]" style="display:block;" v-for="modules in modules_list" :label="modules.id" :key="modules.id" >{{modules.module}}</el-checkbox>
</el-checkbox-group>
</template>
<p>备注</p>
<el-input v-model="comment" name="comment" class="input_300"></el-input><br />
......
......@@ -53,10 +53,10 @@ global $account_role;
</div>
<p>权限 <span style="color:#FF0000">※全不选即为超级管理员</span></p>
<template v-for="(modules, index) in modules_list">
<input type="checkbox" name="modules[]" :value="modules.id" v-model='checked' :id="modules.id" />
<label :for="modules.id">{{ modules.module }}</label>
<br>
<template>
<el-checkbox-group v-model="checked">
<el-checkbox name="modules[]" style="display:block;" v-for="modules in modules_list" :label="modules.id" :key="modules.id" >{{modules.module}}</el-checkbox>
</el-checkbox-group>
</template>
<p>备注</p>
<el-input v-model="comment" name="comment" class="input_300"></el-input><br />
......
......@@ -22,17 +22,17 @@
<form id="form" action="certificate_apply_list.php" method="post">
<input type="hidden" name="status" value="<?=$status?>"/>
申请人姓名:<input type="text" value="<?=$user_name?>" name="user_name" class="el-input__inner input_100 m-l"/>
申请证书名:<input type="text" value="<?=$certificate_title?>" name="certificate_title" class="el-input__inner input_100 m-l"/><br/>
申请证书名:<input type="text" value="<?=$certificate_title?>" name="certificate_title" class="el-input__inner input_100 m-l"/>
收货人姓名:<input type="text" value="<?=$name?>" name="name" class="el-input__inner input_100 m-l"/>
状态:<el-select v-model="status" size="small" style="width:100px;margin-left: 53px;">
状态:<el-select v-model="status" size="small" style="width:100px;margin-left: 10px;">
<el-option
v-for="item in status_list"
:key="item.id"
:label="item.title"
:value="item.id">
</el-option>
</el-select><br/>
<el-button type="primary" @click="search()" class="edit_btn">检索</el-button>
</el-select>
<el-button type="primary" @click="search()" class="edit_btn search_btn">检索</el-button>
</form>
<br />
<div class="result_list">
......
......@@ -25,9 +25,9 @@
label="证书名称"
width="400">
</el-table-column>
<el-table-column prop="front_image" label="封面图" min-width="20%" >
<el-table-column label="封面图" min-width="20%" >
<template slot-scope="scope">
<img :src="scope.row.front_image" height="50px" />
<el-image style="height: 50px" :src="scope.row.front_image" :preview-src-list="scope.row.srcList"></el-image>
</template>
</el-table-column>
<el-table-column
......@@ -60,7 +60,8 @@ require_once("page_common.inc");
var data={
id:<?=$tmp->id ?>,
title:'<?=$tmp->title ?>',
front_image:'<?=$tmp->front_image?>'
front_image:'<?=$tmp->front_image?>',
srcList: ['<?=$tmp->front_image?>']
};
list.push(data);
<?
......
<?php
/**
* 合集视频编辑
* $Id: collection_media_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="collection_media_edit" action="collection_media_edit_result.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="id" value="<?=$id?>"/>
<input type="hidden" name="parent_category_id" value="<?=$parent_category_id?>"/>
<input type="hidden" name="sub_category_id" value="<?=$sub_category_id?>"/>
<input type="hidden" name="action_type" value="<?=$action_type?>"/>
<div class="edit_content">
<p>一级分类名称</p>
<el-select v-model="parent_category_id" size="small">
<el-option
v-for="item in parent_category_list"
:key="item.id"
:label="item.title"
:value="item.id">
</el-option>
</el-select>
<p>二级分类名称</p>
<el-select v-model="sub_category_id" size="small">
<el-option
v-for="item in new_sub_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>
<p>封面图</p>
<a href='javascript:void(0);' class="el-button el-button--primary blueButton">选择文件</a>
<input id="image_file" class="myFileUpload" name="front_image" type="file" accept="image/*"/>
<div id="img_thumbnail">
<img id="imgshow" height="150px" alt="学校封面图" />
</div>
<p>讲师名称</p>
<el-input v-model="teacher_name" name="teacher_name" class="input_200"></el-input>
<p>讲师介绍</p>
<textarea v-model="teacher_profile" name="teacher_profile" rows="5"></textarea><br />
<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:{
action_type:'<?=$action_type?>',
parent_category_id:<?=$parent_category_id?>,
sub_category_id:'<?=$sub_category_id?>',
title:'<?=$title?>',
front_image:'<?=$front_image?>',
teacher_name:'<?=$teacher_name?>',
teacher_profile:'<?=$teacher_profile?>',
sub_category_list:<?=json_encode($sub_category_list)?>,
new_sub_category_list:<?=json_encode($new_sub_category_list)?>,
parent_category_list:<?=json_encode($parent_category_list)?>
},
watch:{
parent_category_id(val,oldval){
var new_list = [];
this.sub_category_list.map(function(item) {
if (item.parent_id == val) {
new_list.push(item);
}
});
this.new_sub_category_list = new_list;
this.sub_category_id = this.new_sub_category_list[0]["id"];
}
},
methods:{
back:function(){
window.history.go(-1);
},
edit:function(){
if(!this.sub_category_id){
this.$message({
type: 'error',
message: '选择二级分类!'
});
return;
}
if(!this.title){
this.$message({
type: 'error',
message: '请输入合集名称!'
});
return;
}
if(!$('#image_file').get(0).files[0] && this.action_type == "new"){
this.$message({
type: 'error',
message: '请选择封面图!'
});
return;
}
if(!this.teacher_name){
this.$message({
type: 'error',
message: '请输入讲师名称!'
});
return;
}
$("input[name='parent_category_id']").val(this.parent_category_id);
$("input[name='sub_category_id']").val(this.sub_category_id);
$('#collection_media_edit').submit();
}
}
})
window.onload = function(){
if(<?=$front_image?1:0 ?>){
$('#imgshow').get(0).src = '<?=$front_image?>';
$('#img_thumbnail').css("visibility","visible");
}
$('#image_file').change(function(){
var file = $('#image_file').get(0).files[0];
var reader = new FileReader();
reader.readAsDataURL(file);
reader.onload=function(e){
$('#imgshow').get(0).src = e.target.result;
}
$('#img_thumbnail').css("visibility","visible");
})
}
</script>
<?php
/**
* 合集视频编辑完成
* $Id: collection_media_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='./collection_media_list.php?search_flg=true';
}
}
})
</script>
\ No newline at end of file
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