/// <reference path="jquery-1.10.2.min.js" />
var pid = 1;


function Web_btn() {
    var Title = $.trim($("#Web_Title").val());
    var Word = $.trim($("#Web_Word").val());
    var Descr = $.trim($("#Web_Descr").val());
    var MRealm = $.trim($("#Web_MRealm").val());
    var Realm = $.trim($("#Web_Realm").val());
    var Statistics = $.trim($("#Web_Statistics").val());
    var Address = $.trim($("#Web_Address").val());
    var RadioKG = $('input[name=Web_RadioKG]:checked').val();
    var RegSmsKG = $('input[name=Web_RegSmsKG]:checked').val();
    var AuthKG = $('input[name=Web_AuthKG]:checked').val();
    var ModeKG = $('input[name=Web_ModeKG]:checked').val();
    var Path = $.trim($("#Web_Path").val());
    var Radio = $.trim($("#Web_Radio").val());
    var file = $.trim($("#Web_file").val());
    var QQ = $.trim($("#Web_QQ").val());
    var Tel = $.trim($("#Web_Tel").val());
    var Upload = $.trim($("#Web_Upload").val());
    var Zan = $.trim($("#Web_DianZan").val());
    var Cai = $.trim($("#Web_Cai").val());
    var Have = $.trim($("#Web_Have").val());
    var News = $.trim($("#Web_News").val());
    var RenQi = $.trim($("#Web_RenQi").val());
    var Dows = $.trim($("#Web_Dows").val());
    var Feed = $.trim($("#Web_Feed").val());
    var Link = $.trim($("#Web_Link").val());
    var UserNotice = $.trim($("#Web_UserNotice").val());
    var Tort = $.trim($("#Web_Tort").val());
    var None = $.trim($("#Web_None").val());
    var OpenLink = $.trim($("#Web_OpenLink").val());
    var Noteskg = $.trim($("#Web_None_Kg").val());
    var Notes = $.trim($("#Web_Notes").val());
    var GameNone = $.trim($("#Web_Game_None").val());
    var UploadNotes = $.trim($("#Web_UploadNotes").val());
    var Cookie = $.trim($("#Web_Cookie").val());
    var GameKg = $.trim($("#Web_Game_Kg").val());
    var GameNotes = $.trim($("#Web_Game_Notes").val());
    var Tort_Kg = $.trim($("#Web_Tort_Kg").children("option:selected").val());
    var NewsCom_Kg = $.trim($("#Web_NewsCom_Kg").val());
    var DataCom_Kg = $.trim($("#Web_DataCom_Kg").val());
    var GameCom_Kg = $.trim($("#Web_GameCom_Kg").val());
    var Copyright = $.trim($("#Web_Copyright").val());
    var Icp = $.trim($("#Web_Icp").val());
    var Code = $.trim($("#Web_Code").val());
    var Licence = $.trim($("#Web_Licence").val());
    var NewsPager = $.trim($("#Web_NewsPager").val());
    var DataPager = $.trim($("#Web_DataPager").val());
    var Beian = $.trim($("#Web_Beian").val());
    var Footer = $.trim($("#Web_WebFooter").val());

    $.post("/ajax/Admin_Config.ashx", { "pid": pid, "Title": Title, "Word": Word, "NewsPager": NewsPager, "DataPager": DataPager, "Descr": Descr, "Statistics": Statistics, "file": file, "Address": Address, "QQ": QQ, "Tel": Tel, "Copyright": Copyright, "Icp": Icp, "Licence": Licence, "Beian": Beian, "Footer": Footer, "Zan": Zan, "Cai": Cai, "Have": Have, "News": News, "RenQi": RenQi, "Dows": Dows, "Feed": Feed, "Link": Link, "Tort": Tort, "Tort_Kg": Tort_Kg, "MRealm": MRealm, "Realm": Realm, "NewsCom_Kg": NewsCom_Kg, "DataCom_Kg": DataCom_Kg, "GameCom_Kg": GameCom_Kg, "None": None, "Noteskg": Noteskg, "Notes": Notes, "GameNone": GameNone, "GameKg": GameKg, "GameNotes": GameNotes, "RadioKG": RadioKG, "Radio": Radio, "Code": Code, "RegSmsKG": RegSmsKG, "UserNotice": UserNotice, "Cookie": Cookie, "OpenLink": OpenLink, "AuthKG": AuthKG, "UploadNotes": UploadNotes, "ModeKG": ModeKG, "Path": Path, "Upload": Upload }, function (data) {
        if (data == "ok") {
            alert("修改成功");
            location.reload();
       

        } else {

            alert("修改失败");
        }


    });



    };

function Web_Para_btn() {
    var GameClassPara = $.trim($("#Web_GameClassPara").val());
    var AppClassPara = $.trim($("#Web_AppClassPara").val());
    var SensitivePara = $.trim($("#Web_SensitivePara").val());
    var SoftClassPara = $.trim($("#Web_SoftClassPara").val());
    var SoftaClassPara = $.trim($("#Web_SoftaClassPara").val());
    var SoftwClassPara = $.trim($("#Web_SoftwClassPara").val());
    var SofteClassPara = $.trim($("#Web_SofteClassPara").val());
    var SoftrClassPara = $.trim($("#Web_SoftrClassPara").val());
    var SofttClassPara = $.trim($("#Web_SofttClassPara").val());
    var SoftyClassPara = $.trim($("#Web_SoftyClassPara").val());
    var SoftuClassPara = $.trim($("#Web_SoftuClassPara").val());
    $.post("/ajax/Admin_Other.ashx", { "pid": pid, "GameClassPara": GameClassPara, "type": "Para", "AppClassPara": AppClassPara, "SensitivePara": SensitivePara, "SoftClassPara": SoftClassPara, "SoftaClassPara": SoftaClassPara, "SoftwClassPara": SoftwClassPara, "SofteClassPara": SofteClassPara, "SoftrClassPara": SoftrClassPara, "SofttClassPara": SofttClassPara, "SoftyClassPara": SoftyClassPara, "SoftuClassPara": SoftuClassPara }, function (data) {
        var data = eval('(' + data + ')');
        if (data.Success == true) {
            alert("修改成功");
            location.reload();
       

        } else {

            alert("修改失败");
        }
    });
}

function Logobtn() {
    var Id = $.trim($("#Web_Id").val());
    var img = $.trim($("#img").attr("src"));
    var imgico = $.trim($("#img-ico").attr("src"));
    var imgm = $.trim($("#img-m").attr("src"));
    $.post("/ajax/Admin_Other.ashx", {"Id":Id,"img": img, "imgico": imgico, "imgm": imgm, "type": "mdpic" }, function (data) {
        var data = eval('('+data+')');
        if(data.Success == true)
        {
            alert("修改成功");
            window.location.href = "./Admin_Logo.aspx";

        } else {

            alert("修改失败");
        }






    })



}
$(function () {
    $("#RadiosKG").on("change", function () {
        if ($(this).val() == "1") {
            $("#Radiost").show();
        } else {
            $("#Radiost").hide();

        }

    })

    $("#RadiosKGs").on("change", function () {
        if ($(this).val() == "2") {
            $("#Radiost").hide();
        } else {
            $("#Radiost").show();

        }

    })


})

$(function () {
    $("#Web_None_Kg").on("change", function () {
        if ($(this).val() == "1") {
            $("#Rtionst").show();
        } else {
            $("#Rtionst").hide();

        }

    })
})

$(function () {
    $("#Web_Game_Kg").on("change", function () {
        if ($(this).val() == "1") {
            $("#Rtionsts").show();
        } else {
            $("#Rtionsts").hide();

        }

    })
})

$("input[name='Web_RadioKG']").prop("checked", "checked");