<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head><title><!--{$UUDEV_PAGE_TITLE}--></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!--{include file=elements/header.css.html}-->
<!--{include file=elements/header.js.html type=common}-->
<!--{include file=elements/header.js.html type=ubb}-->
<!--{include file=elements/header.js.html type=upload}-->
<!--{include file=elements/header.js.html type=valid}-->
</head>
<body>
<div id="outside">
	<!--{include file=frame/top.html}-->
	<div id="mainareaContent">
		<!--{include file=frame/left.html}-->
		<div id="rightContent">
			<div id="topContent">
				<div class="sitmap">
					<span class="r"><!--{include file="elements/uuadvad.html"}--></span>网站管理&nbsp;&gt;&nbsp;属性设置&nbsp;&gt;&nbsp;站点信息
				</div>
			</div>
			<div class="tabcontent">
				<a href="index.php?r=SiteSet.basicset" class="nolink">站点信息</a>
				<a href="index.php?r=SiteSet.visitset" class="link">注册和访问</a>
				<a href="index.php?r=SiteSet.chinesewordunit" class="link">关键词屏蔽</a>
				<a href="index.php?r=SiteSet.illegalmobileiplist" class="link">屏蔽IP列表</a>
				<a href="index.php?r=SiteSet.legalmobileiplist" class="link">手机网关IP列表</a>
			</div>
			<div id="secrightContent">
				<div class="tableContent">
					<form id="UserForm" action="index.php?r=SiteSet.basicset" method="post">
						<input type="hidden" name="action" value="do"/>
						<table class="tbl_edit" width="100%">
							<tr>
								<td class="td_name">网站名称<span class="red">*</span></td>
								<td class="td_content"><input type="text" class="text" name="SITE_NAME" id="SITE_NAME" value="<!--{$SITE_NAME}-->" maxlength='256'/><span id="span_SITE_NAME"></span></td>
							</tr>
							<tr>
								<td class="td_name">网站LOGO</td>
								<td class="td_content">
									<input type="text" class="text" name="SITE_LOGO" id="SITE_LOGO" value="<!--{$SITE_LOGO}-->" readonly/>&nbsp;&nbsp;&nbsp;
									<span id="sp1" class="linkword">删除</span>
									<span id="uploadLogo" class="linkword">上传</span>
								</td>
							</tr>
							<!--{if $SITE_LOGO != null}-->
								<tr>
									<td class="td_name"></td>
									<td class="td_content"><img id="m1" src="<!--{$SITE_LOGO}-->"/></td>
								</tr>
							<!--{/if}-->
							<tr>
								<td class="td_name">网站域名<span class="red">*</span></td>
								<td class="td_content"><input type="text" class="text" id="SITE_DOMAIN" name="SITE_DOMAIN" value="<!--{$SITE_DOMAIN}-->" maxlength='256'/><img class="tiptip" title="用于前台地址访问和友情链接的地址" src="images/quest.gif"/><span id="span_SITE_DOMAIN"></span>  <br /> <span class="red">域名请以http://开头，完整格式：http://www.uudev.com，如果设置不正确，则前台无法访问</span></td>
							</tr>
							<tr>
								<td class="td_name">网站页面底部显示内容</td>
								<td class="td_content"><textarea id="SITE_BOTTOM_CONTENT" name="SITE_BOTTOM_CONTENT" ><!--{$SITE_BOTTOM_CONTENT}--></textarea></td>
							</tr>
							<tr>
								<td class="td_name">首页显示“设置机型”</td>
								<td class="td_content"><input type="radio" name="INDEX_MOBILESET_SHOW_STATUS" id="INDEX_MOBILESET_SHOW_STATUS" value="1" <!--{if $INDEX_MOBILESET_SHOW_STATUS == '1'}-->checked<!--{/if}-->/>&nbsp;是&nbsp;&nbsp;<input type="radio" name="INDEX_MOBILESET_SHOW_STATUS" id="INDEX_MOBILESET_SHOW_STATUS" value="0" <!--{if $INDEX_MOBILESET_SHOW_STATUS == '0'}-->checked<!--{/if}-->/>&nbsp;否</td>
							</tr>
							<tr>
								<td class="td_name">首页显示“登录/注册”</td>
								<td class="td_content"><input type="radio" name="INDEX_LOGIN_STATUS" id="INDEX_LOGIN_STATUS" value="1" <!--{if $INDEX_LOGIN_STATUS == '1'}-->checked<!--{/if}-->/>&nbsp;是&nbsp;&nbsp;<input type="radio" name="INDEX_LOGIN_STATUS" id="INDEX_LOGIN_STATUS" value="0" <!--{if $INDEX_LOGIN_STATUS == '0'}-->checked<!--{/if}-->/>&nbsp;否</td>
							</tr>
							<tr>
								<td class="td_name"><span style="text-decoration:underline;" class="tiptip" title="普通栏目:功能属性为常规模块的频道">普通栏目</span>显示“登录/注册”</td>
								<td class="td_content"><input type="radio" name="NOMCHANNEL_LOGIN_STATUS" id="NOMCHANNEL_LOGIN_STATUS" value="1" <!--{if $NOMCHANNEL_LOGIN_STATUS == '1'}-->checked<!--{/if}-->/>&nbsp;是&nbsp;&nbsp;<input type="radio" name="NOMCHANNEL_LOGIN_STATUS" id="NOMCHANNEL_LOGIN_STATUS" value="0" <!--{if $NOMCHANNEL_LOGIN_STATUS == '0'}-->checked<!--{/if}-->/>&nbsp;否&nbsp;<img class="tiptip" title="其他模块是否显示“登录/注册”，在模块管理里面对应每个模块的属性设置里面设置" src="images/quest.gif"/></td>
							</tr>
							<tr>
								<td class="noborder"></td>
								<td class="noborder"><button type="submit" class="butsubmit">提交</button></td>
							</tr>
						</table>
					</form>
				</div>
			</div>
		</div>
	</div>
</div>
</body>
<script language="javascript">
$("#sp1").click(function(){
	$.ajax({
		url:"index.php?r=SiteSet.delload&name="+$("#m1").attr("src"), 
		type:"get",
		cache:false
	});
	$("#SITE_LOGO").val("");
	$("#m1").hide();
})

$(document).ready(function(){
	$("#SITE_BOTTOM_CONTENT").addClass("cleditorTextarea").cleditor({
		width: "80%",
		height: 120,
		controls: "bold italic underline break | undo redo | " +
			" image link file | basic-function advertising-system access-statistics"
	});
	
	var uploadLogo = $("#uploadLogo");
	new AjaxUpload(uploadLogo, {
		action: "index.php?r=SiteSet.logoupload",
		name: "image_file",
		onSubmit: function(file, ext){
			this.disable();
			uploadLogo.html("<img src=\"images/ajax.gif\"/>");
		},
		onComplete: function(file, response){
			var data = eval("("+response+")");
			if (data.flag == 1) {
				$("#SITE_LOGO").val(data.name);
				uploadLogo.html("上传");
				$("#m1").attr("src",$("#SITE_LOGO").val());
				$("#logo_img").html(file);
			} else if(data.flag == -1) {
				alert("不能上传格式为" + data.fileext + "的文件!");
			} else if(data.flag == -2) {
				alert("上传文件的大小超出指定范围!");
				uploadLogo.html("上传");
			} else {
				alert("上传文件失败!");
				uploadLogo.html("上传");
			}
			this.enable();
		}
	});	
});
</script>
<script>
$(document).ready(function(){
	

	$("#UserForm").validate({
		rules: {
			"SITE_NAME": {
				required : true
			},
			"SITE_DOMAIN": {
				required : true,
				remote: {
			        url: "index.php?r=Init.checkDomain",
			        type: "post",
			        data: {
			          domain: function() {
			            return $("#SITE_DOMAIN").val();
			          }
			        }
			   }
			}
		},	
		messages: {
			"SITE_NAME": {
				required : "网站名称不能为空"
			},
			"SITE_DOMAIN": {
				required : "网络域名不能为空",
				remote:"域名格式错误"
			}
		},
		errorPlacement: function(error, element){
			$("#span_" + element.attr("id")).html(error).attr("class", "error");
		},
		submitHandler: function(form){
			setDisabled(":button",window.document);
			form.submit();
		},
		errorClass: "invalid",
		success: function(label){
			label.parent().html("&nbsp;").attr("class", "valid");
		},
		onkeyup: false
	});
});
</script>
</html>