function checkSubmit(index) {
    var emailReg = /^[_A-Za-z0-9]+@([_A-Za-z0-9]+\.)+[A-Za-z0-9]{2,3}$/;
    var pwdReg = /[a-z0-9]$/;
    if ($("input[name='act']").value == "") {
        layer.msg("页面错误！", {
            icon: 2, btn: ['确定']
        }, function () {

        });
        return false;
    }
  
    //else if ($("select[name='fixdsc']").get(index).value == "") {
    //    layer.msg("请选择限定预约时长！", {
    //        icon: 2, btn: ['确定']
    //    }, function () {

    //        $("select[name='fixdsc']").get(index).focus();
    //    });
    //    return false;
    //}
    //else if ($("select[name='fixdkc']").get(index).value == "") {
    //    layer.msg("课程信息限定！", {
    //        icon: 2, btn: ['确定']
    //    }, function () {

    //        $("select[name='fixdkc']").get(index).focus();
    //    });
    //    return false;
    //}
    else if ($("select[name='fisize']").get(index).value == "") {
        layer.msg("请选择显示记录个数", {
            icon: 2, btn: ['确定']
        }, function () {

            $("select[name='fisize']").get(index).focus();
        });
        return false;
    }
    else if ($("textarea[name='fntzxx']").get(index).value == "") {
        layer.msg("通知信息！", {
            icon: 2, btn: ['确定']
        }, function () {

            $("textarea[name='fntzxx']").get(index).select();
            $("textarea[name='fntzxx']").get(index).focus();
        });
        return false;
    }
   
   
    else {
        //"&fixdsc=" + $("select[name='fixdsc']").get(index).value + "&fixdkc=" + $("select[name='fixdkc']").get(index).value +
        var1 = "beduajax.aspx?act=" + $("#act").val() + "&fisize=" + $("select[name='fisize']").get(index).value + "&fbsfzc=" + $("select[name='fbsfzc']").get(index).value + "&fbsfsh=" + $("select[name='fbsfsh']").get(index).value;
        var fntzxx1 = UVBM($("textarea[name='fntzxx']").get(index).value);
   
        $.ajax({
            type: "post",
            url: var1,
            contentType: "application/json; charset=UTF-8",
            data: { bigdata1: fntzxx1 },
              // dataType: "json",
            // contentType: "application/x-www-form-urlencoded; charset=UTF-8",   POST
            success: function (response) {
                //alert(response);
                Zsend(response);
                  }
        });
    }

    return true;
}


 //发送AJAX
function Zsend(var1) {
//alert(var1);
    temptext = var1;
         layer.msg(temptext, { icon: 1, btn: ['确定'] }, function () {
             
            
             if (temptext.indexOf("成功修改系统设置") > -1) {
                 return true;
             }
             return true;
         });
     }
     ////

     function Rback() {//备份
         layer.confirm('确认要备份吗？', {
             icon: 3, btn: ['确定', '取消'] //按钮
             }, function () {
                temp= ZQDBACK();
                 //return true;
         });
     }

     function ZQDBACK() {//确认备份
         var var1 = "beduajax.aspx?act=03D536BA22817D2698561A81B28108A4";
         document.getElementById("errhtm").innerHTML = "正在备份中";
         var temptext = "";
         var1 = encodeURI((var1));
         $.ajax({
             type: "Post",
             url: var1,
             data: { data1: '13D17C93EDB', },
             cache: false,
             contentType: "application/x-www-form-urlencoded; charset=UTF-8",
             success: function (temptext) {
                 layer.msg(temptext, { icon: 1, btn: ['确定'] }, function () {
                     if (temptext.indexOf("备份成功") > -1) {
                         len = document.getElementById("ListBox1").length;
                         temptext = temptext.substring(temptext.indexOf("备份成功") + 5);
                         var newOption;
                         newOption = document.createElement("OPTION");
                         newOption.text = temptext;
                         newOption.value = temptext;
                         //qhdeduwggl.sql
                         var lstStaffs = document.getElementById("ListBox1");
                         var temp = 0;
                         for (var i = 0; i < lstStaffs.options.length; i++) {
                             if (lstStaffs.options[i].value.indexOf("qhdeduwggl.sql") > -1) {
                                 temp = 1;
                                 break;
                             }
                         }
                         if (temp == 0)
                         { document.getElementById("ListBox1").options.add(newOption, len); }
                         document.getElementById("errhtm").innerHTML = "备份成功";
 
                     }
                     else {
                         layer.msg(temptext, { icon: 1, btn: ['确定'] }, function () {
                             return true;
                         });
                     }
                 });
             }
         });
  }

     function Rback1() {//快速备份
         // layer.close(layer_index);    F12A6B0C45B86E3EA6014B035D5146AA 
         var var1 = "beduajax.aspx?act=03D536BA22817D2647D643D49EA54603";
         // alert(var1);
         document.getElementById("errhtm").innerHTML = "正在备份中";
         var temptext = "";
         var1 = encodeURI(var1);
         $.ajax({
             type: "Post",
             url: var1,
             data: { data1: '13D17C93EDB', },
             cache: false,
             contentType: "application/x-www-form-urlencoded; charset=UTF-8",
             success: function (temptext) {
                 document.getElementById("errhtm").innerHTML = temptext;
                 layer.msg(temptext, { icon: 1, btn: ['确定'] }, function () {
                     location.replace(location.href);
                     // }
                 });

             }
         });

     }
     function Rdown() {//下载
         if (document.getElementById("ListBox1").value == "") {
             layer.msg("请选择一个要下载的备份文件名称" , { icon: 2, btn: ['确定'] }, function () {
                 return true;
             });
             return false;
         }
         else {
             window.document.location.href = "zdownfile.aspx?WEBFROM=fxtsz.aspx&FILENAME=" + document.getElementById("ListBox1").value;
         }
     }
     
     function  Rdele()
     {//删除备份 
         if (document.getElementById("ListBox1").value=="") 
         {
             layer.msg("请选择一个要删除的文件名称", { icon: 2, btn: ['确定'] }, function () {
                 return false;
             });
             return false;
         }
         layer.confirm('确认要删除吗？', {
             icon: 3, btn: ['确定', '取消'] //按钮
         }, function () {
             temp = ZQDdele();
             //return true;
         });
      
     }
     function ZQDdele() {//确认 删除备份 
         var var1 = "beduajax.aspx?act=EF1B767C42BE51FAC6B0466BA32812E8&FILENAME=" + document.getElementById("ListBox1").value;
         var temptext = "";
         var1 = encodeURI((var1));
         $.ajax({
             type: "Post",
             url: var1,
             data: { data1: '13D17C93EDB', },
             cache: false,
             contentType: "application/x-www-form-urlencoded; charset=UTF-8",
             success: function (temptext) {
                 layer.msg(temptext, { icon: 1, btn: ['确定'] }, function () {
                      if (temptext.indexOf("删除成功") > -1) {
                             document.getElementById("ListBox1").remove(document.getElementById("ListBox1").selectedIndex)
                         }
                     });
             }
         });
     }

     function Rzip() {
         var var1 = "beduajax.aspx?act=34015831373486BA4AFB44AF9E4F3820";
         document.getElementById("errhtm").innerHTML = "正在压缩ZIP中";
         var temptext = "";
         var1 = encodeURI((var1));
         $.ajax({
             type: "Post",
             url: var1,
             data: { data1: '13D17C93EDB', },
             cache: false,
             contentType: "application/x-www-form-urlencoded; charset=UTF-8",
             success: function (temptext) {
                 layer.msg(temptext, { icon: 1, btn: ['确定'] }, function () {
                     if (temptext.indexOf("压缩成功") > -1) {
                         len = document.getElementById("ListBox1").length;
                         temptext = temptext.substring(temptext.indexOf("压缩成功") + 5);
                         var newOption;
                         newOption = document.createElement("OPTION");
                         newOption.text = temptext;
                         newOption.value = temptext;
                         document.getElementById("ListBox1").options.add(newOption, len);
                         document.getElementById("errhtm").innerHTML = "压缩ZIP成功";
                     }
                 });
             }
         });
     }


    

     function RSend() {
         var var1 = "beduajax.aspx?act=8F93586407CF83EFDBDF2797D11338A9&filename=" + document.getElementById("ListBox1").value;
         document.getElementById("errhtm").innerHTML = "正在发送中";
         var temptext = "";
         var1 = encodeURI((var1));
         $.ajax({
             type: "Post",
             url: var1,
             data: { data1: '13D17C93EDB', },
             cache: false,
             contentType: "application/x-www-form-urlencoded; charset=UTF-8",
             success: function (temptext) {
                 layer.msg(temptext, { icon: 1, btn: ['确定'] }, function () {
                     document.getElementById("errhtm").innerHTML = temptext;
                     return true;
                 });
             }
         });
     }
