📄 manage.js
字号:
// ***********************************************************************************||
// 系统配置
// ***********************************************************************************||
// 修改配置信息时检测
function on_modify_config(){
}
// ***********************************************************************************||
// 管理员
// ***********************************************************************************||
// 重新排序
function do_manager_order(){
document.Form1.submit();
}
// 修改分组为
function do_manager_grade(){
if (trim(document.Form1.gradeid.value)=="" || trim(document.Form1.gradeid.value)=="0"){
window.alert("请先选择目标会员分组");
}else{
if (sc_select_count($n('Manager'))>0){
document.Form1.Command.value = "Manager_Grade";
document.Form1.action = "../service/option_action.aspx";
document.Form1.submit();
}else{
window.alert("您没有选择任何管理员,无法继续操作");
}
}
}
// 添加管理员
function do_manager_add(){
if (trim(document.Form1.manage_grade.value)=="" || trim(document.Form1.manage_grade.value)=="0"){
window.alert("请先选择管理分组");
}else{
if (trim(document.Form1.email.value)==""){
window.alert("您没有输入会员帐号,无法继续操作");
}else{
document.Form1.Command.value = "Manager_Add";
document.Form1.action = "../service/option_action.aspx";
document.Form1.submit();
}
}
}
// ***********************************************************************************||
// 会员分组
// ***********************************************************************************||
// 编辑会员分组信息
function do_grade_edit_ready(id){
window.open("Grade_Detail.aspx?gradeid=" + id, "_self", "");
}
// 增加新的会员分组
function do_grade_add_ready(){
window.open("Grade_Detail.aspx?gradeid=0", "_self", "");
}
// 修改会员分组信息时检测脚本
function on_grade_edit_check(){
this.imageaffix = function(myimage){
var idotindex = myimage.lastIndexOf(".");
var affix = myimage.substring(idotindex, myimage.length);
return affix.toLowerCase();
}
if (trim(document.Form1.name.value)==""){
window.alert("分组名称不能为空。");
document.Form1.name.focus();
return false;
}
if (trim(document.Form1.icon.value)!=""){
this.myaffixs = ".jpeg.jpg.gif.bmp.png";
if (myaffixs.indexOf(this.imageaffix(document.Form1.icon.value))<0){
window.alert("标识图片格式不正确,标识图片仅支持 JPEG GIF BMP PNG 格式。");
document.Form1.icon.focus();
return false;
}
}
document.Form1.bok.disabled = true;
return true;
}
// 删除会员分组
function do_grade_delete(id){
if (confirm("您确定要删除此会员分组吗?")){
window.open("../service/option_action.aspx?Command=Grade_Delete&gradeid="+id, "_self", "");
}
}
// 设置分组为默认分组
function do_grade_default(id){
window.open("../service/option_action.aspx?Command=Grade_Default&gradeid="+id, "_self", "");
}
// ***********************************************************************************||
// 日志
// ***********************************************************************************||
// 查询管理日志
function do_log_search(){
document.Form1.submit();
}
// ***********************************************************************************||
// 推荐标签
// ***********************************************************************************||
// 修改标签样式
function do_tag_style(){
if (sc_select_count($n('Tag'))>0){
document.Form1.Command.value = "Tag_Style";
document.Form1.action = "../Service/Option_Action.aspx";
document.Form1.submit();
}else{
window.alert("没有选择任何标签,无法执行修改样式操作");
}
}
// 推荐标签
function do_tag_vouch(){
if (trim(document.Form1.newtags.value)==""){
window.alert("没有输入要推荐的标签");
}else{
document.Form1.Command.value = "Tag_Vouch";
document.Form1.action = "../Service/Option_Action.aspx";
document.Form1.submit();
}
}
// 取消推荐标签
function do_tag_unvouch(){
if (sc_select_count($n('Tag'))>0){
if (confirm("您确定要取消推荐选中的标签吗?")){
document.Form1.Command.value = "Tag_Unvouch";
document.Form1.action = "../Service/Option_Action.aspx";
document.Form1.submit();
}
}else{
window.alert("没有选择任何标签,无法执行取消推荐操作。");
}
}
// ***********************************************************************************||
// 分类
// ***********************************************************************************||
// 增加新的分类
function do_sort_add_ready(obj, parentid){
obj.disabled = true;
window.open("../option/sort_detail.aspx?parentid="+parentid, "_self", "");
}
// 修改主题分类信息
function do_sort_edit_ready(obj, id, parentid){
obj.disabled = true;
window.open("../option/sort_detail.aspx?sortid="+id+"&parentid="+parentid, "_self", "");
}
// 修改主题分类信息检测脚本
function on_sort_edit_check(){
this.imageaffix = function(myimage){
var idotindex = myimage.lastIndexOf(".");
var affix = myimage.substring(idotindex, myimage.length);
return affix.toLowerCase();
}
if (trim(document.Form1.name.value)==""){
window.alert("分类名称不能为空。");
document.Form1.name.focus();
return false;
}
if (trim(document.Form1.icon.value)!=""){
this.myaffixs = ".jpeg.jpg.gif.bmp.png";
if (myaffixs.indexOf(this.imageaffix(document.Form1.icon.value))<0){
window.alert("标识图片格式不正确,标识图片仅支持 JPEG GIF BMP PNG 格式。");
document.Form1.icon.focus();
return false;
}
}
document.Form1.bok.disabled = true;
return true;
}
// 删除主题分类
function do_sort_delete(obj, id, parentid){
if (confirm("您确定要删除此分类吗?此操作将不可恢复。")){
obj.disabled = true;
window.open('../Service/Option_Action.aspx?Command=Sort_Delete&sortid='+id+'&parentid='+parentid, "_self", "");
}
}
// 分类权限设置
function do_sort_popem_ready(obj, id, parentid){
obj.disabled = true;
window.open("../option/sort_popem.aspx?sortid="+id+"&parentid="+parentid, "_self", "");
}
// ***********************************************************************************||
// 文件管理
// ***********************************************************************************||
// 重新排序
function do_file_order(){
document.Form1.submit();
}
// 查询文件
function do_file_search(){
if (trim($("searchkey").value)==""){
window.alert("查询关键字不能为空");
}else{
document.Form1.submit();
}
}
// 删除文件
function do_file_deletes(){
if (sc_select_count($n('File'))>0){
if (confirm("您确定要删除选中的文件吗?")){
document.Form1.Command.value = "File_Deletes";
document.Form1.action = "../service/file_action.aspx";
document.Form1.submit();
}
}else{
window.alert("您没有选择任何文件,无法继续操作");
}
}
// ***********************************************************************************||
// 注册会员管理
// ***********************************************************************************||
// 重新排序
function do_user_order(){
document.Form1.submit();
}
// 查询文件
function do_user_search(){
if (trim($("searchkey").value)==""){
window.alert("查询关键字不能为空");
}else{
document.Form1.submit();
}
}
// 删除会员
function do_user_deletes(){
if (sc_select_count($n('User'))>0){
if (confirm("您确定要删除选中的会员吗?")){
document.Form1.Command.value = "User_Deletes";
document.Form1.action = "../service/user_action.aspx";
document.Form1.submit();
}
}else{
window.alert("您没有选择任何会员,无法继续操作");
}
}
// 修改分组为
function do_user_grade(){
if (trim(document.Form1.togradeid.value)=="" || trim(document.Form1.togradeid.value)=="0"){
window.alert("请先选择目标会员分组");
}else{
if (sc_select_count($n('User'))>0){
document.Form1.Command.value = "User_Grade";
document.Form1.action = "../service/user_action.aspx";
document.Form1.submit();
}else{
window.alert("您没有选择任何会员,无法继续操作");
}
}
}
// ***********************************************************************************||
// 专辑管理
// ***********************************************************************************||
// 专辑重新排序
function do_special_order(){
document.Form1.submit();
}
// 查询专辑
function do_special_search(){
if (trim($("searchkey").value)==""){
window.alert("查询关键字不能为空");
}else{
document.Form1.submit();
}
}
// 删除专辑
function do_special_deletes(){
if (sc_select_count($n('Special'))>0){
if (confirm("您确定要删除选中的专辑吗?")){
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -