<script language="javascript">
$(document).ready(function(){
	$("#adddj").click(function(){
		var S_Name=$("#S_Name").val();
		var S_Pic=$("#S_Pic").val();
		var S_Cname=$("#S_Cname").val();
		var re = /^[a-z0-9]*$/gi
	$("#S_Name").css("border-color","#666 #ccc #ccc #666");
	$("#S_Pic").css("border-color","#666 #ccc #ccc #666");
	$("#S_Cname").css("border-color","#666 #ccc #ccc #666");
	if(S_Name==""){
		$("#S_Name").css("border","1px solid red");
		$("#tishi").text("出错了，请填写专集名称！").css("color","red");
		return false;
		}
	else if(S_Pic==""){
		$("#S_Pic").css("border","1px solid red");
		$("#tishi").text("出错了，请上传专集封面！").css("color","red");
		return false;
		}
	else if(S_Cname==""){
		$("#S_Cname").css("border","1px solid red");
		$("#tishi").text("出错了，请填写英文别名！").css("color","red");
		return false;}
	else if(re.test(S_Cname)==false){
		$("#S_Cname").css("border","1px solid red");
		$("#tishi").text("英文别名必须是数字或字母组成！").css("color","red");
		return false;}
	});

});
</script>
<?php
if($op==""){
$op="my";
}?>
		<div class="userMain">
			<div class="uMain_title"><span class="iconTopic">我的专集</span></div>
			<div class="uMain_content">
				<div class="stageBox">
					<div class="stageBoxTop"><span></span></div>
					<div class="stageBoxCenter">
						<div class="stageBoxCenterContent">
							<div class="main_nav">
								<ul>
								<li class="<?php if($op=="my"){ echo "nava_4";}else{ echo "navb_5";}?>"><a href="?ac=topic&op=my">我的专集</a></li>
								<li class="<?php if($op=="list"){ echo "nava_4";}else{ echo "navb_5";}?>"><a href="?ac=topic&op=list">大家的专集</a></li>
								</ul>
								<div class="action"><a href="?ac=topic&op=add">制作新专集</a></div>
							</div>
<?php
if($op=="add"){
?>
							<div class="main_nav2">
 
								<div class="profile">
									<div class="title">
										<div class="name">专集发布</div>
									</div>
									<ul><form  name="form3" action="do.php?ac=topic&op=add" method="post"> 
										<li>
											<div class="name">中文名称：</div>
											<div class="input"><input type="texe" style="width:190px;" class="input_normal" name="S_Name" id="S_Name" maxlength="50"/></div>
											<div class="input_msg" id="moldpassword"><font color="#FF0000">＊专集名称如:Mc水观音。</font></div>
										</li>
										<li>
											<div class="name">英文别名：</div>
											<div class="input"><input type="texe" style="width:190px;" class="input_normal" name="S_Cname" id="S_Cname" maxlength="50"/></div>
											<div class="input_msg" id="moldpassword"><font color="#FF0000">＊英文名称如:Mcshuiguanyin。</font></div>
										</li>
										<li>
											<div class="name">专集封面：</div>
											<div class="input"><input type="texe" style="width:190px;" class="input_normal" name="S_Pic" id="S_Pic"  value="" maxlength="30"  readonly/></div>
											<div class="input_msg" id="mpassword"><iframe src="flash/uploada.php?action=zj" scrolling="No" topmargin="0" width="400" height="30" marginwidth="0" marginheight="0" frameborder="0" align="center"></iframe></div>
										</li>
										<li>
											<div class="name">专集作者：</div>
											<div class="input"><input type="texe" style="width:190px;" class="input_normal" name="S_Keywords" id="S_Keywords"  value="<?php echo $chsh_username?>" maxlength="30"  readonly/></div>
											<div class="input_msg" id="mpassword"><font color="#FF0000">＊专集作者,自动获取。</font></div>
										</li>
										<li>
											<div class="name">专集介绍：</div>
											<div class="input"><textarea name="S_Content" id="S_Content" style="width:400px;height:210px"></textarea></div>
											<div class="input_msg" id="mpassword2"><font color="#FF0000">＊专集介绍。</font></div>
										</li>
 
			<li></li>
			<li></li>
			<li></li>
			<li></li>
										<li>
											<div class="name"></div>
											<div class="input"><span class="button-main"><span><button type="submit" id="adddj" >确定发布</button></span></span></div>
									                <div class="input_msg" id="mpassword2"><span id="tishi"></span></div>
										</li></form>
									</ul>
								</div>
															</div>
						</div>
					</div>
<?php
}else{
?>
							<div class="minHeight500">
								<div class="imageFriend">
																		<ul>
<?php
$a=0;
	global $db;
   if($op=="list"){
	$sql="select * from s_topic order by s_id desc";
   }else{
	$sql="select * from s_topic where S_Keywords='".$chsh_username."' order by s_id desc";
   }
		$Arr=getuserpage($sql,"30");//sql,每页显示条数
		$result=$db->query($Arr[2]);
		$numdate="a";
		if($result){
			while ($row = $db ->fetch_array($result)){
		$numdate="b";
	$sqlu="select s_logo,S_RealName from s_users where S_name='".$row["S_Keywords"]."' order by s_id desc";
	$rsu=$db->query($sqlu);
	$rowu=$db->fetch_array($rsu);
?>
																		<li>
										<div class="pic"><a href="<?php echo LinkClassUrl("s_topic",$row['S_ID'],$row['S_SystemID'],1,S_Slists)?>" target="_blank"><img onerror="pubLibs.imageError(this);"  src="<?php echo picshow($row['S_Pic'],'3')?>"/></a></div>
										<div class="user" title="<?php echo $row["S_Keywords"]?>"><img src="<?php echo piclink("logo",$rowu["s_logo"],"big")?>" onerror="this.onerror=null;this.src='<?php echo S_SiteDomain?>/user/images/avatar/noface_small.gif'"/><a href="<?php echo LinkClassUrl("s_topic",$row['S_ID'],$row['S_SystemID'],1,S_Slists)?>" target="_blank"><?php echo $row["S_Name"]?></a></div>
									</li>
<?php
	}
}
if($numdate=="a"){
		echo("<div class='nothing'>没有专集。</div>");
}
?>

																		</ul>
																	</div>
																<div class="page"><div class="pages"><?php echo $Arr[0];?></div></div>
															</div>
							<div id="currPageNum">1</div>
						</div>
					</div>
<?php
	}
?>

					<div class="stageBoxBottom"><span></span></div>
				</div>
			</div>
