<%@ Page Language="C#" MasterPageFile="Main.Master" AutoEventWireup="true" CodeFile="Config.aspx.cs" Inherits="eFrameWork.Manage.Config" %>
<%@ Import Namespace="EKETEAM.FrameWork" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="nav">您当前位置：<a href="Default.aspx">首页</a> -> 配置</div>
<%if (eRegisterInfo.Base == 0 && eRegisterInfo.Loaded)
  { %>
    <div style="margin:6px;line-height:25px;font-size:13px;">
<div class="tips" style="margin-bottom:6px;"><b>未授权提示</b><br><a href="http://frame.eketeam.com/getSerialNumber.aspx" style="color:#ff0000;" target="_blank">申请临时授权</a>,享更多功能。</div>
   </div>
 <%} %>


<div style="margin:6px;line-height:25px;font-size:13px;">
<script>
    function checksave(frm) {
        var json = getjson(frm);
        $("#result").val(json);
        var url = "?act=setvalue&t=" + now();

        $.ajax({
            type: "POST", async: false,
            data: { value: json },
            url: url,
            dataType: "json",
            success: function (data) {
                layer.msg(data.message);
               
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                //alert("error:" + XMLHttpRequest.responseText + "::" + XMLHttpRequest.status + "::" + XMLHttpRequest.readyState + "::" + XMLHttpRequest.statusText);
            }
        });
    };
    function getjson(frm)
    {
        var json = "{";
        if (typeof (frm) == "string") { frm = document.forms[frm]; }
        var elements = frm.elements;

        var idx = 0;
        for (var i = 0; i < elements.length; i++) {
            if (elements[i].getAttribute("Exclude") != null) { continue; }
            if (elements[i].name.length == 0) { continue; }
            
            var type = "";          
            if (elements[i].getAttribute("type")) { type = elements[i].getAttribute("type").toString().toLowerCase(); }
            if (type == "hidden") { continue; }
            if (type.length == 0) {
                if (elements[i].tagName.toLowerCase() != "select" && elements[i].tagName.toLowerCase() != "textarea") {
                    continue;
                }
            }
            if (type == "submit" || type == "button" || type == "reset") { continue; }
            if ((type == "radio" || type == "checkbox") && elements[i].checked == false) { continue; }

          
            
          

            if (idx > 0) json += ',';
            json += '"' + elements[i].name + '":"' + elements[i].value.replace(/\"/gi, "&quot;") + '"'; //elements[i].value.encode()
            idx++;
        }
        json += "}";
        return json;
    };
</script>



<textarea id="result11" name="textarea" cols="100" rows="8" style="width:99%;display:none;"><%=valuejson %></textarea>

<input type="hidden" id="result" name="result" value="<%=valuejson %>">

<form id="frmaddoredit" name="frmaddoredit" method="post" action="">
<input type="hidden" id="act" name="act" value="save">
    
<asp:Literal ID="LitBody" runat="server" />

<a class="button" href="javascript:;" onclick="checksave(frmaddoredit);"><span><i class="save">保存</i></span></a>

</form>

</div>
</asp:Content>