Commit 819b2fbc by biao

1

parent cae1f3ad
<?php
/**
* 商品分类管理
* $Id: product_category_change_display_order.php,v 1.1 2015/10/08 11:18:46 wanggb Exp $
* @author wulk
* @access public
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("ADMIN,MANAGER,STAFF")) {
// エラー表示
$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::getRequestNumber("id");
$category_mst = ArticleCategoryMst::getById($id);
if ($category_mst == null) {
// エラー表示
$layout_pages = array();
$layout_pages["footer"] = "footer.inc";
$layout_pages["top"] = "menu.inc";
$layout_pages["middle"] = "error.inc";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/topmenutopsub_layout.inc");
exit;
}
$type = ParamUtil::getRequestString("type", "up");
// 排序
$param = array();
$param["delete_flg"] = false;
$param["id_NOT"] = $id;
if ($type == "up") {
$param["display_order_MAX"] = $category_mst->display_order;
$tmp_list = ArticleCategoryMst::getList($param, "display_order", "desc", 0, 1);
} else {
$param["display_order_MIN"] = $category_mst->display_order;
$tmp_list = ArticleCategoryMst::getList($param, "display_order", "asc", 0, 1);
}
if (count($tmp_list) == 1) {
//临时保存
$display_order = $category_mst->display_order;
$category_mst->display_order = $tmp_list[0]->display_order;
$category_mst->save();
$tmp_list[0]->display_order = $display_order;
$tmp_list[0]->save();
}
// 跳到一览页
header("location: article_category_list.php");
exit;
?>
\ No newline at end of file
<?php
/**
* 商品分类管理
* $Id: product_category_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("PRODUCT")) {
// エラー表示
$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");
$category_mst = CategoryMst::getById($id);
if ($category_mst == null) {
// エラー表示
$layout_pages = array();
$layout_pages["footer"] = "footer.inc";
$layout_pages["top"] = "menu.inc";
$layout_pages["middle"] = "error.inc";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/topmenutopsub_layout.inc");
exit;
}
// 数据库更新
$category_mst->delete_flg = true;
$category_mst->save();
// 跳到一览页
header("Location:product_category_list.php");
exit;
<?php
/**
* 商品分类管理
* $Id: product_category_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("ADMIN,MANAGER,STAFF")) {
// エラー表示
$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");
$category_mst = ArticleCategoryMst::getById($id);
if ($category_mst == null) {
$category_mst = new ArticleCategoryMst();
$category_mst->is_valid = true;
}
$title = $category_mst->title;
$is_valid = $category_mst->is_valid;
$upload_thumbnail = ParamUtil::getRequestString("upload_thumbnail");
//用户权限
$user_status_list = UserStatus::getList();
$user_status_array = explode("|", $category_mst->user_status);
// 页面表示
$_SCRIPT_FILE = array("scripts/validators.js", "scripts/article_category_edit_input.js");
$layout_pages = array();
$layout_pages["top"] = "menu.inc";
$layout_pages["menu_clicked"] = "li_data";
$layout_pages["middle"] = "article_category_edit_input.inc";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/topmenutopsub_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 商品分类管理
* $Id: product_category_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("ADMIN,MANAGER,STAFF")) {
// エラー表示
$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");
$title = ParamUtil::getRequestString("title");
$upload_thumbnail_file = FileUploadUtil::getScalarFile($_FILES["upload_thumbnail_file"]);
$is_valid = ParamUtil::getRequestBoolean("is_valid", true);
$user_status_array = ParamUtil::getRequestArray("user_status", array());
$user_status_str = "|" . implode("|", $user_status_array) . "|";
$category_mst = ArticleCategoryMst::getById($id);
if (empty($category_mst)) {
$category_mst = new ArticleCategoryMst();
//获取最大的id
$display_order = 1;
$tmp_list = ArticleCategoryMst::getList(null,"display_order", "desc", 0, 1);
if(!empty($tmp_list)) {
$display_order = $tmp_list[0]->display_order + 1;
}
$category_mst->display_order = $display_order;
}
$error_flg = false;
// 图片Check
$upload_thumbnail = null;
if ($upload_thumbnail_file->size > 0) {
$image_type = ImageType::getByHeader($upload_thumbnail_file->type);
if ($image_type == null || !in_array($image_type->name, array("GIF", "PNG", "JPG"))) {
$error_flg = true;
$thumbnail_error_msg = "图片不是指定类型(gif、png、jpg)请重新上传。";
} else {
$upload_thumbnail ="CATEGORY_" . date("YmdHis") . "." . $image_type->extention;
$dest_file = ARTICLE_IMAGES_PATH . "/" . $upload_thumbnail;
move_uploaded_file($upload_thumbnail_file->tmp_name, $dest_file);
chmod($dest_file, 0777);
//删除老的文件
@unlink(ARTICLE_IMAGES_PATH . "/" . $category_mst->thumbnail);
//更新文件名
$category_mst->thumbnail = $upload_thumbnail;
}
}
// 有错误的时候表示错误
if ($error_flg) {
$_SCRIPT_FILE = array("scripts/validators.js", "scripts/article_category_edit_input.js");
$layout_pages = array();
$layout_pages["top"] = "menu.inc";
$layout_pages["menu_clicked"] = "li_data";
$layout_pages["middle"] = "article_category_edit_input.inc";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/topmenutopsub_layout.inc");
exit;
}
// 更新数据库
$category_mst->title = $title;
$category_mst->is_valid = $is_valid;
$category_mst->user_status = $user_status_str;
$category_mst->save();
// 跳到一览页
header("Location:article_category_list.php");
exit;
\ No newline at end of file
<?php
/**
* 商品分类管理
* $Id: product_category_list.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("ADMIN,MANAGER,STAFF")) {
// エラー表示
$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;
}
// 一览取得
$param = array();
$param["delete_flg"] = false;
$category_list = ArticleCategoryMst::getList($param, "display_order", "asc");
// ページ
$_SCRIPT_FILE = array("scripts/product.js");
$layout_pages = array();
$layout_pages["top"] = "menu.inc";
$layout_pages["menu_clicked"] = "li_data";
$layout_pages["middle"] = "article_category_list.inc";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/topmenutopsub_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 消息管理
* $Id: message_list.php,v 1.1 2016-9-22 09:58:31 cuixl Exp $
* @author cuixl
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("ADMIN,MANAGER,STAFF")) {
// エラー表示
$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;
}
// 一览取得
$page_num = ParamUtil::getRequestNumber("page_num", 1);
$category_id = ParamUtil::getRequestNumber("category_id", 0);
$search_flg = ParamUtil::getRequestBoolean("search_flg",false);
//系列列表
$param = array();
$param["delete_flg"] = false;
$category_list = ArticleCategoryMst::getList($param, "display_order", "desc");
if($category_id == 0 && !empty($category_list)) {
$category_id = $category_list[0]->id;
}
$session_name = "article_dat_list";
if (!$search_flg) {
if (isset($_SESSION[$session_name])){
// ページ番、ソート順など保存
if (isset($_SESSION[$session_name]["page_num"]) && !isset($_REQUEST["page_num"])) {
$page_num = $_SESSION[$session_name]["page_num"];
}
$_SESSION[$session_name]["page_num"] = $page_num;
$_SESSION[$session_name]["category_id"] = $category_id;
}
} else {
if (isset($_SESSION[$session_name])){
unset($_SESSION[$session_name]);
}
// 再設定
$page_num = $_SESSION[$session_name]["page_num"];
$category_id = $_SESSION[$session_name]["category_id"];
}
//当前页取得
$paging_url_link = "article_dat_list.php";
$param = array();
$param["delete_flg"] = false;
if($category_id != 0) {
$param["category_id"] = $category_id;
}
$total_count = ArticleDat::getListCount($param);
$dream_dat_list = array();
if ($total_count > 0) {
$page_row = 50;
$offset = ($page_num - 1) * $page_row;
$article_dat_list = ArticleDat::getList($param, "display_order", "asc", $offset, $page_row);
$page_count = ceil($total_count / $page_row);
$show_page_num = 5;
$page_range = PagingHandler::getPageRange($page_num, $page_count, $show_page_num);
$page_first = $page_range[0];
$page_end = $page_range[1];
}
// ページ
$_SCRIPT_FILE = array("scripts/validators.js", "scripts/article_dat.js");
$layout_pages = array();
$layout_pages["top"] = "menu.inc";
$layout_pages["menu_clicked"] = "li_data";
$layout_pages["middle"] = "article_dat_list.inc";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/topmenutopsub_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 商品分类管理
* $Id: product_category_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("ADMIN,MANAGER,STAFF")) {
// エラー表示
$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::getRequestNumber("id");
$action_type = ParamUtil::getRequestString("action_type");
$article_dat = new ArticleDat();
//编辑
if($action_type == "edit") {
$article_dat = ArticleDat::getById($id);
}
// 文章分类
$param = array();
$param["delete_flg"] = false;
$category_list = ArticleCategoryMst::getList($param, "display_order", "desc");
// 页面表示
$_SCRIPT_FILE = array("scripts/validators.js", "scripts/article_dat.js");
$layout_pages = array();
$layout_pages["top"] = "menu.inc";
$layout_pages["menu_clicked"] = "li_article";
$layout_pages["middle"] = "article_data_edit.inc";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/topmenutopsub_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 商品分类管理
* $Id: product_category_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("ADMIN,MANAGER,STAFF")) {
// エラー表示
$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;
}
// 参数取得
$action_type = ParamUtil::getRequestString("action_type");
$category_id = ParamUtil::getRequestNumber("category_id", 0);
$id = ParamUtil::getRequestNumber("id", 0);
$title = ParamUtil::getRequestString("title");
$video_url = ParamUtil::getRequestString("video_url");
$mp3 = ParamUtil::getRequestString("mp3");
$comment = ParamUtil::getRequestString("comment");
//图片getArrayFile
$upload_thumbnail_file = FileUploadUtil::getScalarFile($_FILES["upload_thumbnail_file"]);
//编辑
if($action_type == "new") {
$article_dat = new ArticleDat();
//获取最大ID
$display_order = 1;
$tmp_list = ArticleDat::getList(null,"id", "desc", 0, 1);
if(!empty($tmp_list)) {
$display_order = $tmp_list[0]->id + 1;
}
$article_dat->display_order = $display_order;
}
if($action_type == "edit") {
$article_dat = ArticleDat::getById($id);
}
$article_dat->category_id = $category_id;
$article_dat->title = $title;
$article_dat->mp3 = $mp3;
$article_dat->video_url = $video_url;
$article_dat->comment = $comment;
$error_flg = false;
// 图片Check
$upload_thumbnail = null;
if ($upload_thumbnail_file->size > 0) {
$image_type = ImageType::getByHeader($upload_thumbnail_file->type);
if ($image_type == null || !in_array($image_type->name, array("GIF", "PNG", "JPG"))) {
$error_flg = true;
$thumbnail_error_msg = "图片不是指定类型(gif、png、jpg)请重新上传。";
} else {
$upload_thumbnail ="ARTICLE_" . date("YmdHis") . "." . $image_type->extention;
$dest_file = ARTICLE_IMAGES_PATH . "/" . $upload_thumbnail;
move_uploaded_file($upload_thumbnail_file->tmp_name, $dest_file);
chmod($dest_file, 0777);
//删除老的文件
@unlink(ARTICLE_IMAGES_PATH . "/" . $article_dat->front_image);
//更新文件名
$article_dat->front_image = $upload_thumbnail;
}
}
$article_dat->save();
header("Location:article_dat_list.php?category_id=" . $article_dat->category_id);
exit;
\ No newline at end of file
<?php
/**
* 创建渠道推广二维码
* $Id: miniplay_traffic_creat_qr.php,v 1.1 2015/10/08 11:18:46 zongbiao Exp $
* @author wulk
* @access public
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("ADMIN")) {
// エラー表示
$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::getRequestNumber("id");
$miniplay_traffic = MiniplayTrafficMst::getById($id);
if ($miniplay_traffic == null) {
// エラー表示
$layout_pages = array();
$layout_pages["footer"] = "footer.inc";
$layout_pages["top"] = "menu.inc";
$layout_pages["middle"] = "error.inc";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/topmenutopsub_layout.inc");
exit;
}
$path = "";
$path_obj = PromotionPath::getById($miniplay_traffic->path);
$path = $path_obj->path . "?cid=" . $miniplay_traffic->channel_id;
//获取access_token
$appid = "wx7744cad94e45a84b";
$appMst = AppMst::getByAppId($appid);
$app_secret = $appMst->app_secret;
$url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=".$appid."&secret=".$app_secret;
$result = file_get_contents($url);//就是一个普通的get方式调用https接口的请求,我就不写出来了,自己找去。
$res = json_decode($result,true); //json字符串转数组
$access_token = $res["access_token"];
//调用接口获取图片
$arr = array();
$arr["path"] = $path;
$arr["width"] = 600;
$arr["auto_color"] = true;
$arr["line_color"] = "{'r':'0',"g":"0","b":"0"}";
$data = json_encode($arr);
$url = "https://api.weixin.qq.com/cgi-bin/wxaapp/getwxacode?access_token=" . $access_token;
$curl = curl_init(); // 启动一个CURL会话
curl_setopt($curl, CURLOPT_URL, $url); // 要访问的地址
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); // 对认证证书来源的检测
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2); // 从证书中检查SSL加密算法是否存在
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Expect:')); //解决数据包大不能提交
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1); // 使用自动跳转
curl_setopt($curl, CURLOPT_AUTOREFERER, 1); // 自动设置Referer
curl_setopt($curl, CURLOPT_POST, 1); // 发送一个常规的Post请求
curl_setopt($curl, CURLOPT_POSTFIELDS, $data); // Post提交的数据包
curl_setopt($curl, CURLOPT_TIMEOUT, 30); // 设置超时限制防止死循
curl_setopt($curl, CURLOPT_HEADER, 0); // 显示返回的Header区域内容
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); // 获取的信息以文件流的形式返回
$tmpInfo = curl_exec($curl); // 执行操作
curl_close($curl);
//输出图片
header('Content-Type: image/jpeg');
print_r($tmpInfo);
/**
if(curl_errno($ch)) {
return false;
}else{
return $tmpInfo;
}
*/
?>
\ No newline at end of file
<?php
/**
*
* $Id: miniplay_traffic_edit.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("ADMIN,MANAGER")) {
// エラー表示
$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::getRequestNumber("id");
$action_type = ParamUtil::getRequestString("action_type");
//新添加
if($action_type == "new") {
//获取当前最大channel_id
$channel_no = 0;
$tmp_list = ChannelMst::getList(null,"channel_no", "desc", 0, 1);
if(!empty($tmp_list)) {
$channel_no = intval($tmp_list[0]->channel_no) + 1;
} else {
$channel_no = 1001;
}
$channel_mst = new ChannelMst();
$channel_mst->channel_no = $channel_no;
}
//编辑
if($action_type == "edit") {
$channel_mst = ChannelMst::getById($id);
}
// 页面表示
$_SCRIPT_FILE = array("scripts/validators.js", "scripts/channel.js");
$layout_pages = array();
$layout_pages["top"] = "menu.inc";
$layout_pages["menu_clicked"] = "li_miniplay";
$layout_pages["middle"] = "channel_edit.inc";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/topmenutopsub_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 广告登陆
* $Id: miniplay_ad_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("ADMIN,MANAGER")) {
// エラー表示
$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;
}
// 参数取得
$action_type = ParamUtil::getRequestString("action_type");
$id = ParamUtil::getRequestString("id");
$channel_no = ParamUtil::getRequestString("channel_no");
$title = ParamUtil::getRequestString("title");
$comment = ParamUtil::getRequestString("comment");
//编辑
if($action_type == "edit") {
$channel_mst = ChannelMst::getById($id);
$channel_mst->channel_no = $channel_no;
$channel_mst->title = $title;
$channel_mst->comment = $comment;
$channel_mst->save();
}
//添加
if($action_type == "new") {
$channel_mst = new ChannelMst();
$channel_mst->channel_no = $channel_no;
$channel_mst->title = $title;
$channel_mst->comment = $comment;
$channel_mst->save();
}
header("Location:channel_list.php?rand=".time());
exit;
\ No newline at end of file
<?php
/**
* 消息管理
* $Id: message_list.php,v 1.1 2016-9-22 09:58:31 cuixl Exp $
* @author cuixl
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("ADMIN,MANAGER")) {
// エラー表示
$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;
}
// 一览取得
$param = array();
$param["delete_flg"] = false;
$channel_list = ChannelMst::getList($param,"id", "desc");
// ページ
$_SCRIPT_FILE = array("scripts/validators.js", "scripts/channel.js");
$layout_pages = array();
$layout_pages["top"] = "menu.inc";
$layout_pages["menu_clicked"] = "li_channel";
$layout_pages["middle"] = "channel_list.inc";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/topmenutopsub_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 管理员管理
* $Id: grade_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("ADMIN")) {
// エラー表示
$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");
$class_mst = ClassMst::getById($id);
if ($class_mst == null) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "class_list.inc";
$layout_pages["menu_clicked"] = "menu_grade";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
}
// 数据库更新
$class_mst->delete_flg = true;
$class_mst->save();
// 跳到一览页
header("Location:class_list.php");
exit;
<?php
/**
* 班级管理
* $Id: class_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("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;
}
// 参数取得
$id = ParamUtil::getRequestString("id");
$class_mst = ClassMst::getById($id);
$school_title = SchoolMst::getById($class_mst->school_id)->title;
$grade_title = GradeMst::getById($class_mst->grade_id)->title;
// 页面表示
$_SCRIPT_FILE = array("scripts/validators.js", "scripts/class.js");
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "class_edit_input.inc";
$layout_pages["menu_clicked"] = "1-3";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 管理员管理
* $Id: grade_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("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;
}
// 参数取得
$member_count = ParamUtil::getRequestString("member_count");//new edit
$id = ParamUtil::getRequestString("id");
//编辑
$class_mst = ClassMst::getById($id);
if ($class_mst == null) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "error.inc";
$layout_pages["menu_clicked"] = "1-3";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
}
// 数据库更新
$class_mst->member_count = $member_count;
$class_mst->save();
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "class_edit_result.inc";
$layout_pages["menu_clicked"] = "1-3";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 班级设定
* $Id: class_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("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_id = ParamUtil::getRequestString("school_id");
if(!empty($_account->school_id)){
$school_id = $_account->school_id;
$school_mst = SchoolMst::getById($school_id);
}
// 一览取得
$param = array();
if(!empty($school_id)){
$param["school_id"] = $school_id;
}
$class_list = CompassHandler::getClassList($param,"id","asc");
if(empty($school_id)){
$param = array();
$param["delete_flg"] = false;
$school_list = SchoolMst::getList($param);
}
// ページ
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "class_list.inc";
$layout_pages["menu_clicked"] = "1-3";
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
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("ADMIN,MANAGER,STAFF")) {
// エラー表示
$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;
}
//试卷
// ページ
$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");
exit;
\ No newline at end of file
<?php
/**
* 系统报表
* $Id: report_list.php
* @author zhoz
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("SYSTEM")) {
// エラー表示
$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;
}
// 参数取得
$date_min = ParamUtil::getRequestString("date_min", date("Y-m-01"));
$date_max = ParamUtil::getRequestString("date_max", date("Y-m-d"));
if (!DateUtil::checkValidDate($date_min)) {
$date_min = date("Y-m-01");
}
if (!DateUtil::checkValidDate($date_max)) {
$date_max = date("Y-m-d");
}
$param = array();
$param["date_min"] = $date_min;
$param["date_max"] = $date_max;
// 一览取得:
$data_list = getReportList($param);
/**
* 充值总金额,充值总代币数,消耗总代币数,兑换总代币数,平台剩余代币数
* 充值金额,充值代币数,转盘消耗代币数,兑换代币数,代币数增减(充值-消耗-兑换)
*/
function getReportList($param = array()) {
$diff_date_array = array();
$result_array = array();
$total_array = array(
"pay_count" => 0,
"point_count" => 0,
"cost_point_count" => 0,
"ex_point_count" => 0,
"remain_point" => 0
);
$date_min = $param["date_min"];
$date_max = $param["date_max"];
$d = floor((strtotime($date_max)-strtotime($date_min))/(24*60*60));
for ($i=0; $i<=$d; $i++) {
$diff_date_array[] = date("Y-m-d", strtotime("$date_max-$i day"));
}
$db = &FishowDBManager::getInstance();
// 充值金额,充值代币数user_course_dat
$sql1 = "select date_trunc('day', target_date) as target_date,sum(amount) as price, sum(point) as point from user_course_dat where delete_flg=false and status='SUCCESS'" .
" and date_trunc('day', target_date)>='" . $date_min . "'" .
" and date_trunc('day', target_date)<='" . $date_max . "' group by date_trunc('day', target_date)";
$result1 = $db->executeQuery($sql1);
// 兑换代币数user_order_dat !NEW
$sql2 = "select date_trunc('day', target_date) as target_date,sum(point) as ex_point from user_order_dat where delete_flg=false and status != 'NEW'" .
" and date_trunc('day', target_date)>='" . $date_min . "'" .
" and date_trunc('day', target_date)<='" . $date_max . "' group by date_trunc('day', target_date)";
$result2 = $db->executeQuery($sql2);
// 其它消耗:这里是负数要小心
$sql4 = "select date_trunc('day', target_date) as target_date,sum(point) as cost_point2 from user_point_log_dat where delete_flg=false and point<0" .
" and date_trunc('day', target_date)>='" . $date_min . "'" .
" and date_trunc('day', target_date)<='" . $date_max . "' group by date_trunc('day', target_date)";
$result4 = $db->executeQuery($sql4);
foreach ($diff_date_array as $diff_date) {
$result_array[$diff_date] = array(
"date" => $diff_date,
"price" => 0,
"point" => 0,
"cost_point" => 0,
"ex_point" => 0
);
foreach ($result1 as $tmp) {
if (date("Y-m-d", strtotime($tmp["target_date"])) == $diff_date) {
$result_array[$diff_date]["price"] += $tmp["price"];
$result_array[$diff_date]["point"] += $tmp["point"];
}
}
foreach ($result2 as $tmp) {
if (date("Y-m-d", strtotime($tmp["target_date"])) == $diff_date) {
$result_array[$diff_date]["ex_point"] += $tmp["ex_point"];
}
}
foreach ($result4 as $tmp) {
if (date("Y-m-d", strtotime($tmp["target_date"])) == $diff_date) {
$result_array[$diff_date]["cost_point"] -= $tmp["cost_point2"];
}
}
}
// 充值总金额,充值总代币数,消耗总代币数,兑换总代币数,平台剩余代币数
$sql_total1 = "select sum(amount) as pay_count, sum(point) as point_count from user_course_dat where delete_flg=false and status='SUCCESS'";
$result_total1 = $db->executeQuery($sql_total1);
if (!empty($result_total1[0]["pay_count"])) {
$total_array["pay_count"] = $result_total1[0]["pay_count"];
}
if (!empty($result_total1[0]["point_count"])) {
$total_array["point_count"] = $result_total1[0]["point_count"];
}
// 其它总消耗:这里是负数要小心
$sql_total3 = "select sum(point) as cost_point_count2 from user_point_log_dat where delete_flg=false and point<0";
$result_total3 = $db->executeQuery($sql_total3);
if (!empty($result_total3[0]["cost_point_count2"])) {
$total_array["cost_point_count"] -= $result_total3[0]["cost_point_count2"];
}
// 平台剩余代币数
$sql_total4 = "select sum(point) as remain_point from user_point_dat where delete_flg=false";
$result_total4 = $db->executeQuery($sql_total4);
if (!empty($result_total4[0]["remain_point"])) {
$total_array["remain_point"] = $result_total4[0]["remain_point"];
}
// 兑换代币数user_order_dat !NEW
$sql_total5 = "select sum(point) as ex_point_count from user_order_dat where delete_flg=false and status != 'NEW'";
$result_total5 = $db->executeQuery($sql_total5);
if (!empty($result_total5[0]["ex_point_count"])) {
$total_array["ex_point_count"] = $result_total5[0]["ex_point_count"];
}
$result_array["total_count"] = $total_array;
return $result_array;
}
// ページ
$layout_pages = array();
$layout_pages["top"] = "menu.inc";
$layout_pages["menu_clicked"] = "li_system";
$layout_pages["middle"] = "report_list.inc";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/topmenutopsub_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 解梦分类编集
* $Id: product_category_new_input.inc,v 1.1 2015/10/08 11:18:53 wanggb Exp $
* @author wanggb
* @access public
* @package manager.templates
**/
global $upload_thumbnail;
global $thumbnail_error_msg;
?>
<b>文章系列添加/编集</b><br />
<br />
<form name="article_category_edit_input" action="article_category_edit_result.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="id" value="<?=$id ?>" />
<table>
<tr>
<td>名称</td>
</tr>
<tr>
<td class="begin_blank">
<input type="text" name="title" value="<?=htmlspecialchars($title) ?>" />
</td>
</tr>
<tr>
<td>封面</td>
</tr>
<tr>
<td class="begin_blank">
<input type="file" id="upload_thumbnail_file" name="upload_thumbnail_file" onChange="checkUploadThumbnailFile()" />
<?=!empty($thumbnail_error_msg) ? "<font color=\"red\">{$thumbnail_error_msg}</font>" : "" ?>
<br />
<span id="upload_thumbnail">
<?
if (!empty($upload_thumbnail)) {
?><img id="upload_thumbnail_preview" src="<?=KoalaHandler::getImageUrl($upload_thumbnail) ?>" style="width:40px;height:40px;" /><?
} else if (!empty($category_mst->thumbnail)) {
?><img id="upload_thumbnail_preview" src="<?=KoalaHandler::getImageUrl($category_mst->thumbnail, "category", "") ?>" style="width:40px;height:40px;" /><?
} else {
?><img id="upload_thumbnail_preview" src="" style="width:40px;height:40px;display:none;" /><?
}
?>
</span>
</td>
</tr>
<tr>
<td>观看权限</td>
</tr>
<tr>
<td class="begin_blank">
<?
foreach ($user_status_list as $user_status_obj) {
?>
<label><input type="checkbox" name="user_status[]" value="<?=$user_status_obj->id ?>"<?=in_array($user_status_obj->id, $user_status_array) ? " checked=\"checked\"" : "" ?> /><?=$user_status_obj->title ?></label>
<?
}
?>
</td>
</tr>
</table>
<br />
<input type="button" value="编集" class="button_width_normal" onClick="doCheck();" />
</form>
<?php
/**
* 解梦分类一览
* $Id: product_category_list.inc,v 1.1 2015/10/08 11:18:53 wanggb Exp $
* @author zhouhj
* @access public
* @package manager.templates
*/
?>
<b>文章系列一览</b><br /><br />
<a class="flatbutton" href="article_category_edit_input.php">添加系列</a>
<br /><br />
<div id="result_list">
<table>
<tr>
<th class="contents_title" width="5%">系列ID</th>
<th class="contents_title" width="10%">系列名称</th>
<th class="contents_title" width="15%">封面</th>
<th class="contents_title" width="50%">观看限制</th>
<th class="contents_title" width="10%">排序</th>
<th class="contents_title">操作</th>
</tr>
<?
if (count($category_list) > 0) {
foreach ($category_list as $category) {
$user_status_ids = explode("|", $category->user_status);
$user_status_titles = "";
foreach($user_status_ids as $user_status_id) {
if(is_numeric($user_status_id)) {
$user_status_titles .= "[" . UserStatus::getTitleById($user_status_id) . "]";
}
}
?>
<tr<?=!$category->is_valid ? " class=\"gray_mask\"" : "" ?>>
<td align="center"><?=$category->id ?></td>
<td align="center"><?=htmlspecialchars($category->title) ?></td>
<td align="center">
<?
if(!empty($category->thumbnail)) {
?>
<img src="<?=KoalaHandler::getImageUrl($category->thumbnail, "category", "") ?>" style="width:60px;" />
<?
}
?>
</td>
<td align="left"><?=htmlspecialchars($user_status_titles) ?></td>
<td align="center">
<a class="flatbutton" href="article_category_change_display_order.php?id=<?=$category->id ?>&type=up"></a>
<a class="flatbutton" href="article_category_change_display_order.php?id=<?=$category->id ?>&type=down"></a>
</td>
<td align="center">
<a class="flatbutton" href="article_category_edit_input.php?id=<?=$category->id ?>">编集</a>
<a class="flatbutton" href="article_dat_list.php?category_id=<?=$category->id ?>">文章列表</a>
</td>
</tr>
<?
}
}
?>
</table>
</div>
\ No newline at end of file
<?php
/**
* 文章列表
* $Id: article_dat_list.inc,v 1.1 2016-9-22 09:58:31 cuixl Exp $
* @author cuixl
* @access public
* @package manager.templates
*/
?>
<br />
<b>文章列表</b><br />
<form name="search_input" method="post" action="?">
<table>
<tr>
<td>系列</td>
<td>
<select name="category_id">
<?
foreach ($category_list as $category_obj) {
?>
<option value="<?=$category_obj->id ?>"<?=$category_obj->id == $category_id ? " selected " : "" ?>><?=$category_obj->title ?></option>
<?
}
?>
</select>
</td>
<td><input type="button" value="搜索" onclick="searchArticle()" /></td>
</tr>
</table>
<input type="button" value="添加文章" class="button_width_normal" onClick="articleDatEdit()"/>
</form>
<br />
<?
require_once("page_common.inc");
?>
<div id="result_list">
<table>
<tr>
<th class="contents_title" width="5%" nowrap>ID</th>
<th class="contents_title" width="10%">标题</th>
<th class="contents_title" width="15%">系列</th>
<th class="contents_title" width="10%">地址</th>
<th class="contents_title" width="10%">操作</th>
</tr>
<?
if (!empty($article_dat_list)) {
foreach($article_dat_list as $article_dat) {
$category_title = "[未指定]";
$category_mst = ArticleCategoryMst::getById($article_dat->category_id);
if(!empty($category_mst)) {
$category_title = $category_mst->title;
}
?>
<tr>
<td align="center" nowrap><?=htmlspecialchars($article_dat->id) ?></td>
<td align="center" nowrap><?=htmlspecialchars($article_dat->title) ?></td>
<td align="center" nowrap><?=htmlspecialchars($category_title) ?></td>
<td align="center" nowrap><?=htmlspecialchars($article_dat->title) ?></td>
<td align="center">
<a class="flatbutton" href="article_data_edit.php?id=<?=$article_dat->id ?>&action_type=edit">编集</a>
</td>
</tr>
<?
}
}
?>
</table>
</div>
\ No newline at end of file
<?php
/**
* 文章编辑
* $Id: product_category_new_input.inc,v 1.1 2015/10/08 11:18:53 wanggb Exp $
* @author wanggb
* @access public
* @package manager.templates
**/
?>
<b>文章添加/编辑</b><br />
<br />
<form name="article_edit_input" action="article_edit_result.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="action_type" value="<?=$action_type ?>" />
<input type="hidden" name="id" value="<?=$id ?>" />
<table width="80%">
<tr>
<td>系列选择</td>
</tr>
<tr>
<td class="begin_blank">
<select name="category_id" name="category_id" size="150" style="width:200px;height:40px;line-height:20px;">
<?
foreach ($category_list as $category_mst) {
?>
<option value="<?=$category_mst->id ?>"<?=$category_mst->id == $article_dat->category_id ? " selected " : "" ?>><?=$category_mst->title ?></option>
<?
}
?>
</select>
</td>
</tr>
<tr>
<td>标题</td>
</tr>
<tr>
<td class="begin_blank">
<input type="text" id="title" name="title" value="<?=htmlspecialchars($article_dat->title) ?>" style="width:300px;"/>
</td>
</tr>
<tr>
<td>图片</td>
</tr>
<tr>
<td class="begin_blank">
<input type="file" id="upload_thumbnail_file" name="upload_thumbnail_file" onChange="checkUploadThemeFront()" />
<?=!empty($thumbnail_error_msg) ? "<font color=\"red\">{$thumbnail_error_msg}</font>" : "" ?>
<br />
<span id="upload_preview">
<?
if (!empty($upload_thumbnail)) {
?><img id="upload_thumbnail_preview" src="<?=KoalaHandler::getImageUrl($upload_thumbnail) ?>" style="width:75px;" /><?
} else if (!empty($article_dat->front)) {
?><img id="upload_thumbnail_preview" src="<?=KoalaHandler::getImageUrl($article_dat->front, "theme", "") ?>" style="width:75px;" /><?
} else {
?><img id="upload_thumbnail_preview" src="" style="width:75px;display:none;" /><?
}
?>
</span>
</td>
</tr>
<tr>
<td>MP3(指定文件名)</td>
</tr>
<tr>
<td class="begin_blank">
<input type="text" id="mp3" name="mp3" value="<?=$article_dat->mp3?>" style="width:300px;"/>
</td>
</tr>
<tr>
<td>视频地址</td>
</tr>
<tr>
<td class="begin_blank">
<input type="text" id="video_url" name="video_url" value="<?=htmlspecialchars($article_dat->video_url) ?>" style="width:400px;"/>
</td>
</tr>
<tr>
<td>内容</td>
</tr>
<tr>
<td class="begin_blank">
<textarea name="comment" style="width:400px;height:300px;"><?=htmlspecialchars($article_dat->comment) ?></textarea>
</td>
</tr>
</table>
<br />
<input type="button" value="编集" class="button_width_normal" onClick="doCheck();"/>
</form>
<?php
/**
* 流量主添加/编辑
* $Id: channel_mst_edit.inc,v 1.1 2015/10/08 11:18:53 wanggb Exp $
* @author zongbiao
* @access public
* @package manager.templates
**/
global $upload_thumbnail;
global $thumbnail_error_msg;
?>
<b>渠道添加/编辑</b><br />
<br />
<form name="channel_edit_form" action="channel_edit_result.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="action_type" value="<?=$action_type ?>" />
<input type="hidden" name="id" value="<?=$id ?>" />
<table>
<tr>
<td>渠道编号</td>
</tr>
<tr>
<td class="begin_blank">
<input type="text" id="channel_no" name="channel_no" value="<?=htmlspecialchars($channel_mst->channel_no) ?>" size=12 readonly/>
</tr>
<tr>
<td>渠道名称</td>
</tr>
<tr>
<td class="begin_blank">
<input type="text" id="title" name="title" value="<?=htmlspecialchars($channel_mst->title) ?>" size=15/>
</tr>
<tr>
<td>备注</td>
</tr>
<td class="begin_blank">
<textarea name="comment" cols="30" rows="3"><?=htmlspecialchars($channel_mst->comment) ?></textarea>
</td>
</tr>
</table>
<br />
<br />
<input type="button" value="编集/添加" class="button_width_normal" onClick="doCheck();"/>
</form>
<?php
/**
* 推广广告表
* $Id: worldcup_schedule_list.inc,v 1.1 2016-9-22 09:58:31 cuixl Exp $
* @author cuixl
* @access public
* @package manager.templates
*/
?>
<br /><b>流量渠道列表</b><br />
<br />
<form name="search_input" method="post" action="?">
<input type="button" value="添加渠道" class="button_width_normal" onClick="addChannel()"/>
</form>
<br />
<div id="result_list">
<table>
<tr>
<th class="contents_title" width="5%" nowrap>渠道编号</th>
<th class="contents_title" width="15%" nowrap>名称</th>
<th class="contents_title" width="25%" nowrap>说明</th>
<th class="contents_title" width="35%" nowrap>推广路径</th>
<th class="contents_title" >编辑</th>
</tr>
<?
if (count($channel_list) > 0) {
foreach($channel_list as $channel_mst) {
$path = "";
$path = SCHOOL_TOP . "?cno=" . $channel_mst->channel_no;
?>
<tr>
<td align="center" nowrap><?=htmlspecialchars($channel_mst->channel_no) ?></td>
<td align="center" nowrap><?=htmlspecialchars($channel_mst->title) ?></td>
<td align="left" nowrap><?=htmlspecialchars($channel_mst->comment) ?></td>
<td align="left" nowrap><?=htmlspecialchars($path) ?></td>
<td align="center">
<a class="flatbutton" href="channel_edit.php?rand=<?=$rand?>&id=<?=$channel_mst->id ?>&action_type=edit">编集</a>
<!--<a class="flatbutton" href="channel_mst_creat_qr.php?rand=<?=$rand?>&id=<?=$channel_mst->id ?>" target="view_window">获取二维码</a>-->
</td>
</tr>
<?
}
}
?>
</table>
</div>
\ No newline at end of file
<?php
/**
* 班级管理
* $Id: class_edit_input.inc,v 1.1 2015/10/08 11:18:53 wanggb Exp $
* @author wanggb
* @access public
* @package manager.templates
**/
?>
<div id="change">
<p class="edit_title">班级编辑</p>
<form id="class_edit_input" action="class_edit_result.php" method="post">
<input type="hidden" name="id" value="<?=$id?>"/>
<div class="edit_content">
<p>学校名称</p>
<p class="begin_blank"><?=htmlspecialchars($school_title) ?></p>
<p>年级名称</p>
<p class="begin_blank"><?=htmlspecialchars($grade_title) ?>&nbsp;</p>
<p>班级名称</p>
<p class="begin_blank"><?=htmlspecialchars($class_mst->title) ?>&nbsp;</p>
<p>班级人数</p>
<el-input v-model="member_count" name="member_count" type='number' class="input_200"></el-input><br />
<el-button type="danger" @click="edit()" class="edit_btn">编辑</el-button>
<el-button type="danger" @click="back()" class="edit_btn">返回</el-button>
</div>
</form>
</div>
<script type="text/javascript">
new Vue({
el:'#change',
data:{
id:<?=$id?$id:0 ?>,
member_count:'<?=htmlspecialchars($class_mst->member_count) ?>'
},
methods:{
edit:function(){
if(!this.member_count){
this.$message({
type: 'error',
message: '请输入教育管局名称!'
});
return;
}
$('#class_edit_input').submit();
},
back:function(){
window.history.go(-1);
}
}
})
</script>
<?php
/**
* 班级管理编辑完成
* $Id: class_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='./class_list.php';
}
}
})
</script>
\ No newline at end of file
<?php
/**
* 管理员管理
* $Id: account_list.inc,v 1.1 2015/10/08 11:18:50 wanggb Exp $
* @author netvillage
* @access public
* @package manager.templates
*/
?>
<style type="text/css">
.result_list{
width: 701px;
}
</style>
<div id="classSetting">
<div class="list_title">
班级设定<!-- <el-button type="primary" style="margin-right: 10px;" @click="addClass()">年级添加</el-button>-->
</div>
<br/>
学校名称:
<?if(isset($school_mst)){?>
<?=$school_mst->title?>
<?}else{?>
<el-select v-model="school_id" size='medium' >
<div class="el-select-dropdown__item"><input v-model="searchVal" style="border-radius: 4px;background: url(images/search_icon.png) no-repeat 150px;"type="text" autocomplete="off"></div>
<el-option
v-for="item in new_school_list"
:key="item.id"
:label="item.title"
:value="item.id">
</el-option>
</el-select>
<?}?>
<br/>
<div class="result_list">
<el-table :data="tableData" border style="width: 100%">
<el-table-column
prop="grade_title"
label="年级名称"
>
</el-table-column>
<el-table-column
prop="title"
label="班级名称"
>
</el-table-column>
<el-table-column
prop="member_count"
label="班级人数"
>
</el-table-column>
<el-table-column
label="操作"
width="100">
<template slot-scope="scope">
<el-button @click="handleChange(scope.row)" type="text" size="small">编辑</el-button>
</template>
</el-table-column>
</el-table>
</div>
</div>
<script type="text/javascript">
var list=[];
<?
foreach ($class_list as $class_mst) {
$school_id = isset($school_id)?$school_id:$school_list[0]->id;
if($class_mst["school_id"] == $school_id){
?>
var data={
id:<?=$class_mst["id"] ?>,
title:'<?=$class_mst["title"] ?>',
grade_title:'<?=$class_mst["grade_title"] ?>',
member_count:'<?=$class_mst["member_count"]?>'
};
list.push(data);
<?
}
}
?>
new Vue({
el:'#classSetting',
data:{
tableData: list,
school_id:'<?=isset($school_list)?$school_list[0]->id:0?>',
school_list:<?=isset($school_list)?json_encode($school_list):''?>,
class_list:<?=json_encode($class_list)?>,
searchVal:''
},
methods:{
handleChange(row) {
console.log(row);
window.location.href='class_edit_input.php?id='+row.id;
}
},
watch:{
school_id(val,oldval){
var new_list=[];
this.class_list.map(function(item) {
if (item.school_id == val) {
new_list.push(item);
}
});
this.tableData = new_list;
}
},
computed: {
new_school_list() {
var _this = this;
var new_school_list = [];
_this.school_list.map(function(item) {
if (item.title.search(_this.searchVal) != -1) {
new_school_list.push(item);
}
});
if(new_school_list.length == 0){
new_school_list = _this.school_list;
}
return new_school_list;
}
}
})
</script>
<?php
/**
* 管理员管理
* $Id: account_list.inc,v 1.1 2015/10/08 11:18:50 wanggb Exp $
* @author netvillage
* @access public
* @package manager.templates
*/
?>
<br /><br />
<div id="result_list">
<a href="user_use_coupon_list.php">优惠券兑换</a><br /><br />
<a href="user_buy_course_list.php">学员报名</a><br /><br />
<a href="user_eximation_list.php">学员答卷</a><br /><br />
</div>
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