<%@ page language="C#" autoeventwireup="true" inherits="adead_bizAdd, kfenlei" %><%@ Register Src="../inc/adminTop.ascx" TagName="adminTop" TagPrefix="qth8" %><!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../css.css" rel="stylesheet" type="text/css" />
<title>框分类信息系统 后台管理</title>
</head>
<body>
<div align="center">
<div class="main" align="left">
<qth8:adminTop ID="AdminTop1" runat="server" />
<div class="d01">
<div class="tabTitle">添加商家</div>
<form name="editUser" class="layui-form" action="action.aspx?s=bizAdd" method="post">
<input type="hidden" name="templateWap" id="templateWap" value="<%=sTemplateWap %>" />
<input type="hidden" name="template" id="template" value="<%=sTemplate %>" />
<table border="0" width="100%" class="layui-table" cellspacing="0" cellpadding="0">
<tr><td width="200">用户名</td><td><div class="fl5"><input type="text" class="inputText" value="" name="username" id="username" onblur="checkusername()" size="50" /></div><span id="UserNamePs"></span></td></tr>
<tr><td width="200">密码</td><td><input type="text" class="inputText" value="" name="password" size="50" /></td></tr>
<tr><td>二级域名</td><td><input type="text" class="inputText" size="10" value="<%=user_name%>" name="user_name" /> .<%=webdomain %></td></tr>
<tr><td>商家状态</td>
<td><input type="radio" value="1" name="power" title="未审核" /><input type="radio" value="0" name="power" checked="checked" title="已审核" /></td></tr>
<tr><td>商家类别</td>
<td><input type="radio" value="0" name="vip" checked="checked" title="普通商家" /><input type="radio" value="1" name="vip" title="VIP商家" /></td></tr>
<tr><td>vip日期</td>
<td><input type="text" class="inputText" size="22" onclick="layui.laydate({elem:this})" value="<%=vstartdate%>" name="vstartdate" /> - <input type="text" class="inputText" size="22" onclick="layui.laydate({elem:this})" value="<%=voverdate%>" name="voverdate" />
</td></tr>
<tr><td>人为排序<br /><span class="comments">数字大于200为首页热门商家</span></td>
<td><input type="text" class="inputText" value="<%=num%>" name="num" size="50" /></td></tr>
<tr><td>链接设置<br /><span class="comments">用于手动设置商家的链接地址</span></td>
<td><input type="text" class="inputText" size="50" value="<%=url%>" name="url" /></td></tr>
<tr><td>其它</td>
<td>当天查看数 <input type="text" class="inputText" value="<%=todayPoint%>" name="todayPoint" size="5" /> 总查看数 <input type="text" class="inputText" value="<%=point%>" name="point" size="5" /> 评论数 <input type="text" class="inputText" value="<%=reviewCount%>" name="reviewCount" size="5" /> 点赞数 <input type="text" class="inputText" value="<%=kill%>" name="kill" size="5" /></td></tr>
</table>
<div class="tabTitle">商家资料</div>
<table border="0" width="100%" class="layui-table" cellspacing="0" cellpadding="0">
<tr>
<td width="200">商家名称</td>
<td><input type="text" class="inputText" name="name" size="50" value="<%=name%>" /></td></tr>
<tr><td>商家图标</td>
<td><input type="text" class="inputText" size="50" value="<%=pic%>" id="pic" name="pic" /> <a href="/<%=pic%>" target="_blank">[查看]</a> <a href="#nogo" onclick="showDiv('upfileDiv')">[上传]</a>
<div class="upfileDiv" id="upfileDiv">
<div class="upfileClose" onclick="hideDiv('upfileDiv')">关闭</div>
<iframe width="400" height="100" style="padding:0px; margin:0px;" src="../inc/upFile.aspx?tn=pic&fn=editUser&size=600,0&js=top.hideDiv('upfileDiv');top.valiUpPic('pic','','{picUrl}');" frameborder="0" scrolling="no"></iframe>
</div></td></tr>
<tr><td>所在地</td>
<td><div class="selectDivLine"><%=tools.showAddressSelectAdmin("address","city") %></div></td></tr>
<tr><td>分类</td>
<td><div class="selectDivLine"><% =tools.showBizSortSelectAdmin("sort", "sort_1")%></div></td></tr>
<tr>
<td>企业地址</td>
<td><input type="text" class="inputText" name="address_1" value="<%=address_1%>" size="50" /></td></tr>
<tr>
<td>联系方式</td>
<td>电话 <input type="text" class="inputText" size="12" value="<%=phone%>" name="phone" /> 手机 <input type="text" class="inputText" size="12" value="<%=tel%>" name="tel" /> 传真 <input type="text" class="inputText" size="12" value="<%=faxes%>" name="faxes" /> QQ <input type="text" class="inputText" size="12" value="<%=qq%>" name="qq" /> 邮箱 <input type="text" class="inputText" size="12" value="<%=email%>" name="email" /> 营业时间 <input type="text" class="inputText" size="12" value="<%=businesshours%>" name="businesshours" /></td></tr>
<tr>
<td>商家介绍</td>
<td><textarea name="about" cols="80" rows="8" class="layui-textarea"><%=about%></textarea></td></tr>
<tr>
<td>商家备注</td>
<td><textarea name="remark" cols="80" rows="8" class="layui-textarea"><%=remark%></textarea></td></tr>
</table>
<div class="tabTitle">商家建站设置</div>
<table border="0" width="100%" class="layui-table" cellspacing="0" cellpadding="0">
<tr><td width="200">商家网站模板</td><td>
<a href="#nogo" id="tlsort" class="layui-btn layui-btn-small">更换模板</a> <a href="#nogo" id="tlsort1" class="layui-btn layui-btn-small">更换手机模板</a>
<script type="text/javascript">
var obj;
var objInput;
$("#tlsort").click(function()
{
obj=layer.tab({
  area: ['80%', '80%'],
  tab: [{title: '模板选择',content:$("#templateSort").html()}]});
});
$("#tlsort1").click(function()
{
obj=layer.tab({
  area: ['80%', '80%'],
  tab: [{title: '模板选择',  content:$("#templateSort1").html()}]});
});
function setTemplate(value,tname)
{
    $("#"+tname).val(value);
    if(tname=="template")
    {
        $("#templateSort .tlBox").removeClass("ck");
        $("#templateSort div[templateName='"+value+"']").addClass("ck");
    }
     if(tname=="templateWap")
    {
        $("#templateSort1 .tlBox").removeClass("ck");
        $("#templateSort1 div[templateName='"+value+"']").addClass("ck");
    }
    layer.close(obj);
}

function checkusername(){
	var user_name_value=$("#username").val();
	if(!/^[a-zA-Z0-9\u4e00-\u9fa5_]{2,16}$/.test(user_name_value)){
	document.getElementById("UserNamePs").className="error_text";
	document.getElementById("UserNamePs").innerHTML="请输入汉字、字母、数字、下划线";
	}
	else{
	var xmlhttp;
		if (window.XMLHttpRequest)
  		{// code for IE7+, Firefox, Chrome, Opera, Safari
  			xmlhttp=new XMLHttpRequest();
  		}
		else
  		{// code for IE6, IE5
 		 	xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  		}
		xmlhttp.onreadystatechange=function()
  		{
  			if (xmlhttp.readyState==4 && xmlhttp.status==200)
    		{
				document.getElementById("UserNamePs").className="";
    			document.getElementById("UserNamePs").innerHTML=xmlhttp.responseText;
    		}
  		}
		xmlhttp.open("GET","/services/?s=checkUserName&v="+user_name_value,true);
		xmlhttp.send();
		}
	}
</script>
</td></tr>
<tr>
<td>网站标题<br /><span class="comments">(Title)</span></td>
<td><input class="inputText" value="<%=title%>" name="title" type="text" size="50" /></td>
</tr>
<tr>
<td>网站关键词<br />
<span class="comments">(Keywords)</span></td>
<td><input class="inputText" value="<%=keywords%>" name="keywords" type="text" size="50" /></td>
</tr>
<tr>
<td>网站描述<br />
<span class="comments">(Description)</span></td>
<td><input class="inputText" value="<%=description%>" name="description" type="text" size="50" /></td>
</tr>
<tr><td>网站头部图片</td><td><input type="text" size="50" class="inputText" value="<%=top_pic%>" id="top_pic" name="top_pic" /> <a href="/<%=top_pic%>" target="_blank">[查看]</a> <a href="#nogo" onclick="showDiv('upfileDiv1')">[上传]</a><div class="upfileDiv" id="upfileDiv1">
<div class="upfileClose" onclick="hideDiv('upfileDiv1')">关闭</div>
<iframe width="400" height="100" style="padding:0px; margin:0px;" src="../inc/upFile.aspx?tn=top_pic&fn=editUser&js=top.hideDiv('upfileDiv1');top.valiUpPic('top_pic','','{picUrl}');" frameborder="0" scrolling="no"></iframe>
</div></td></tr>
<tr><td>手机网站头部图片</td>
<td><input type="text" size="50" class="inputText" value="<%=top_pic1%>" id="top_pic1" name="top_pic1" /> <a href="/<%=top_pic1%>" target="_blank">[查看]</a> <a href="#nogo" onclick="showDiv('upfileDiv3')">[上传]</a>
<div class="upfileDiv" id="upfileDiv3">
<div class="upfileClose" onclick="hideDiv('upfileDiv3')">关闭</div>
<iframe width="400" height="100" style="padding:0px; margin:0px;" src="../inc/upFile.aspx?tn=top_pic1&fn=editUser&js=top.hideDiv('upfileDiv3');top.valiUpPic('top_pic1','','{picUrl}');" frameborder="0" scrolling="no"></iframe>
</div></td></tr>
<tr><td>网站背景图片</td>
<td><input type="text" class="inputText" size="50" value="<%=bg_pic%>" id="bg_pic" name="bg_pic" /> <a href="/<%=bg_pic%>" target="_blank">[查看]</a> <a href="#nogo" onclick="showDiv('upfileDiv2')">[上传]</a>
<div class="upfileDiv" id="upfileDiv2">
<div class="upfileClose" onclick="hideDiv('upfileDiv2')">关闭</div>
<iframe width="400" height="100" style="padding:0px; margin:0px;" src="../inc/upFile.aspx?tn=bg_pic&fn=editUser&js=top.hideDiv('upfileDiv2');top.valiUpPic('bg_pic','','{picUrl}');" frameborder="0" scrolling="no"></iframe>
</div></td></tr>
<tr><td>企业视频</td>
<td><input type="text" class="inputText" size="50" value="<%=video%>" name="video" /> 支持flv、swf格式，可转youku等视频网站视频</td>
</tr>
<tr><td>统计代码</td>
<td><textarea name="stat" cols="80" rows="5" class="layui-textarea"><%=stat%></textarea></td></tr>
<tr><td>备案</td>
<td><textarea name="beian" cols="80" rows="5" class="layui-textarea"><%=beian%></textarea></td></tr>
<tr><td>友情链接</td>
<td><textarea name="link" cols="80" rows="4" class="layui-textarea"></textarea></td></tr>
<tr><td>域名绑定<br /><span class="comments">多个域名用逗号隔开，不需要http://</span></td>
<td><input type="text" size="50" class="inputText" value="<%=domain%>" name="domain" />&nbsp; 到期日期 <input type="text" class="inputText" size="20" onclick="layui.laydate({elem:this})" value="<%=domainDate%>" name="domainDate" /></td>
<tr><td></td><td><input type="submit" class="layui-btn" value="添加商家" /></td></tr>
</table></form>
</div>
</div>
</div>
<div id="templateSort" style="display:none;"><%=sTemplateSort %></div>
<div id="templateSort1" style="display:none;"><%=sTemplateSort1 %></div>
<script type="text/javascript">
layui.use(['form','laydate'], function(){
var form = layui.form();
form.render();
form.on('select(address)', function(data){
acLoadAddress($("#address").val(),"");
});
form.on('select(sort)', function(data){
acLoadBizSort($("#sort").val(),'');
});
});
ckSelect("address","<%=address %>");
ckRadio("vip","<%=vip %>");
ckRadio("power","<%=power %>");
ckRadio("template","<%=sTemplate%>");
ckRadio("templateWap","<%=sTemplateWap%>");
ckSelect("sort","<%=sort%>");
acLoadAddress("<%=address%>","<%=city%>")
acLoadBizSort("<%=sort%>","<%=sort_1%>");
  function showDiv(divId)
  {
  	document.getElementById(divId).style.display="block"
  }
  function hideDiv(divId)
  {
  	document.getElementById(divId).style.display="none"
  }
    </script>
</body>
</html>
