<%@ page language="C#" autoeventwireup="true" inherits="WebAdmin_ShopEdit, LebiMall" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>修改店铺基本信息</title>
    <link href="css/css.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../images/js/My97DatePicker/WdatePicker.js"></script>
    <script type="text/javascript" src="js/checked.js"></script>
    <link href="css/tipswindown.css" type="text/css" rel="stylesheet" />
    <script src="js/jquery.js" type="text/javascript"></script>
    <script src="js/tipswindown.js" type="text/javascript"></script>
    <script src="js/topHead.js" type="text/javascript"></script>
    <script type="text/javascript">
        function validate(){
            var flag=true;
            if(document.getElementById("txt_sname").value==""){
                document.getElementById("msg_n").innerHTML="<span class='msg_submit'>店铺名不能为空！</span>";
                flag=false;
            }else{
                document.getElementById("msg_n").innerHTML="";
            }
            if(document.getElementById("txt_address").value==""){
                document.getElementById("msg_address").innerHTML="<span class='msg_submit'>地址不能为空！</span>";
                flag=false;
            }else{
                document.getElementById("msg_address").innerHTML="";
            }
            if(document.getElementById("txt_phone").value==""){
                document.getElementById("msg_phone").innerHTML="<span class='msg_submit'>电话不能为空！</span>";
                flag=false;
            }else{
                document.getElementById("msg_phone").innerHTML="";
            }
            if(document.getElementById("txt_qq").value==""){
                document.getElementById("msg_qq").innerHTML="<span class='msg_submit'>QQ不能为空！</span>";
                flag=false;
            }else{
                document.getElementById("msg_qq").innerHTML="<em>多个号码用,分隔</em>";
            }
            if(document.getElementById("txt_Spaylimit").value==""){
                document.getElementById("msg_Spaylimit").innerHTML="<span class='msg_submit'>运费限额不能为空！</span>";
                flag=false;
            }else{
                document.getElementById("msg_Spaylimit").innerHTML="";
            }
//            var txt_yu=document.getElementById("txt_yuming").value;
//            var flag1=txt_yu.search(/^[A-Za-z0-9-]+$/);
//            if(txt_yu==""){
//                document.getElementById("msg_yuming").innerHTML="<span class='msg_submit'>二级域名不能为空！</span>";
//                flag=false;
//            }else{
//                if(flag1==0){
//                    if(txt_yu=="blog" || txt_yu=="about" || txt_yu=="news" || txt_yu=="zhidao" || txt_yu=="class" || txt_yu=="dazhe" || txt_yu=="admin" || txt_yu=="bbs" || txt_yu=="http"){
//                        document.getElementById("msg_yuming").innerHTML="<span class='msg_submit'>二级域名不能填写关键字！</span>";
//                        flag=false;
//                    }
//                }else{
//                    document.getElementById("msg_yuming").innerHTML="<span class='msg_submit'>二级域名不能为中文！</span>";
//                    flag=false;
//                }
//            }
            if(document.getElementById("txt_endtime").value==""){
                document.getElementById("msg_endtime").innerHTML="<span class='msg_submit'>到期时间不能为空！</span>";
                flag=false;
            }else{
                document.getElementById("msg_endtime").innerHTML="";
            }
            if(document.getElementById("txt_cmax").value==""){
                document.getElementById("msg_cmax").innerHTML="<span class='msg_submit'>商品限额不能为空！</span>";
                flag=false;
            }else{
                document.getElementById("msg_cmax").innerHTML="";
            }
            return flag;
        }
         function resizeEditor2(id,size){
         var newheight = parseInt(document.getElementById(id).style.height, 10)+size;   
	        if(newheight >= 60) {   
		        document.getElementById(id).style.height = newheight + 'px';   
	        }  
    }
    function resizeEditor(name,size) {   
	    var newheight = parseInt(document.getElementById(name +"___Frame").style.height, 10) + size;   
	    if(newheight >= 150) {   
		    document.getElementById(name +"___Frame").style.height = newheight + 'px';   
	    }   
    } 
    </script>
</head>
<body>
    <form id="form1" runat="server" onsubmit="return validate()">
        <script>header(1,0,"images/");</script>
   
    <!--面包屑-->
    <div class="blank clearfix"></div>
    
    <!--功能区-->
   <div class="tabmenus mainwidth">
        <ul>
            <li class="current"><a href="Shoplist.aspx"><span>店铺管理</span></a></li>
            <li><a href="ShoplistClose.aspx"><span>过期店铺管理</span></a></li>
             <li><a href="ShopListOver.aspx"><span>过期店铺管理</span></a></li>
             <li><a href="ShopListR.aspx"><span>回收站</span></a></li>
        </ul>
    </div>
    <div class="tab-mainbody">
        <div class="tab-mainbody2">
        <div class="functionHandleArea clearfix">
             <input id="Button2" type="button" runat="server" class="btn-app" onserverclick="Button2_ServerClick" />
                            <input type="image" name="Submit" title=" 重填 " onclick="reset();return false;" src="images/bt_res.gif"align="absmiddle" />
                            <input type="image" border="0" title=" 返回 " onclick="history.back();return false;"src="images/bt_bak.gif" align="absmiddle" />
        </div>
        <div id="datalist">
                <table cellpadding="0" cellspacing="0" width="100%" border="0" id="list">
                    <tr>
                        <th>修改店铺基本信息</th>
                        <th><span class="title_r" id="msg_sub"></span></th>
                        <script type="text/javascript">
                         var $=jQuery;
                            var i = 2;
                            var f="<%=Session["returnValue"] %>";
                            var page="<%=page %>";
                            if(f=="true"){
                            
                                tipsWindown('操作结果','text:操作成功！','250','60','true','2000','true','text');
                                <% Session["returnValue"]= null; %>
                                setInterval("fun()", 1000);
                            }
                            if(f=="false"){
                                tipsWindown('操作结果','text:操作失败！','250','60','true','2000','true','text');
                                <% Session["returnValue"]= null; %>
                            }
                            function fun() {
                                if (i == 1) {
                                    if(page=="open"){
                                        window.location.href="ShopList.aspx";
                                    }
                                    if(page=="close"){
                                        window.location.href="ShopListClose.aspx";
                                    }
                                    if(page=="over"){
                                        window.location.href="ShopListOver.aspx";
                                    }
                                }
                                i--;
                            }
                        </script>
                    </tr>
                    <tr>
                        <td >
                            是否开启：
                        </td>
                        <td >
                            <input id="Radio1" type="radio" name="r1" runat="server" />是<input id="Radio2" type="radio"
                                name="r1" runat="server" />否
                        </td>
                    </tr>
                    <tr>
                        <td >
                            用户名：
                        </td>
                        <td >
                            <%=ds.Tables[0].Rows[0]["username"] %>
                        </td>
                    </tr>
                    <tr>
                        <td >
                            店铺名称：
                        </td>
                        <td >
                            <input type="text" runat="server" id="txt_sname" class="input" />&nbsp;<span id="msg_n"></span>
                        </td>
                    </tr>
                    <tr>
                        <td >
                            地址：
                        </td>
                        <td >
                            <input type="text" runat="server" id="txt_address" class="input" />&nbsp;<span id="msg_address"></span>
                        </td>
                    </tr>
                    <tr>
                        <td >
                            电话：
                        </td>
                        <td >
                            <input type="text" runat="server" id="txt_phone" class="input" />&nbsp;<span id="msg_phone"></span>
                        </td>
                    </tr>
                    <tr>
                        <td >
                            QQ号：
                        </td>
                        <td >
                            <input type="text" runat="server" id="txt_qq" class="input" />&nbsp;<span id="msg_qq"><em>多个号码用,分隔</em></span>
                        </td>
                    </tr>
                    <tr>
                        <td >
                            运费限额：
                        </td>
                        <td >
                            <input type="text" runat="server" id="txt_Spaylimit" class="input" />&nbsp;<span id="msg_Spaylimit"></span>
                        </td>
                    </tr>
                    <tr>
                        <td >
                            二级域名：
                        </td>
                        <td >
                            <input type="text" runat="server" id="txt_yuming" class="input" />&nbsp;<span id="msg_yuming"></span>
                        </td>
                    </tr>
                    <tr>
                        <td >
                            到期时间：
                        </td>
                        <td >
                            <input type="text" id="txt_endtime" class="texttime" runat="server" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',skin:'whyGreen',autoPickDate:'null'})" />&nbsp;<span
                                id="msg_endtime"></span>
                        </td>
                    </tr>
                    <tr>
                        <td >
                            商品限额：
                        </td>
                        <td >
                            <input type="text" runat="server" id="txt_cmax" class="input" />个&nbsp;<span id="msg_cmax"></span>
                        </td>
                    </tr>
                    <tr>
                        <td >
                            介绍：
                        </td>
                        <td >
                            <FCKeditorV2:FCKeditor ID="fck" runat="server" ToolbarSet="Mall2" BasePath="~/images/js/fckeditor/" Height="180px" Width="450px">
                            </FCKeditorV2:FCKeditor>
                                                            <a href="javascript:resizeEditor('fck',-100)">
                                    <img src="images/bt_close.gif" border='0'></a>&nbsp;<a href="javascript:resizeEditor('fck',150)"><img
                                        src="images/bt_open.gif" border='0'></a>                        </td>
                    </tr>
                    <tr>
                        <td >
                            备注：<br /><em>仅供管理员查看</em>
                        </td>
                        <td >
                            <textarea id="txt_remark" runat="server" style="height:60px; width:300px;" class="input-textarea"></textarea><br />
                            <input type="image" src="images/bt_close.gif" onclick="javascript:resizeEditor2('txt_remark',-50);return false;" />
                            <input type=image src="images/bt_open.gif" onclick="javascript:resizeEditor2('txt_remark',50);return false;" />
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" class="list-foot">
                            <input id="Button1" type="button" runat="server" class="btn-app" onserverclick="Button2_ServerClick"/>
                        </td>
                    </tr>
                </table>

                <script type="text/javascript">tdshowm("list");</script>
</div>
            </div>
        </div>
    </form>
</body>
</html>
