<!--#include file="../utf-8.asp" -->
<!--#include file="../js/Function.asp" -->
<!--#include file="../CheckAdmin.asp" -->
<!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 NAME="copyright" CONTENT="Copyright 2010-2012 - yidacms.com" />
<META NAME="Author" CONTENT="世纪伟成  yidacms.com" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../js/admin.css" rel="stylesheet" type="text/css">
<title>QQ配置！</title>
<link rel="stylesheet" href="../js/reveal.css">	
<script type="text/javascript" src="../js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="../js/jquery.reveal.js"></script>
</head>
<body>
<% 
'版权：世纪伟成(http://yidacms.com)
'本信息不会影响您网站的正常访问，无论免费用户或是收费用户请保留这里的信息.
'如果您删除了这里的版权信息,将追究法律责任.

		if request("t")="qq" Then

			if len(trim(request.Form("shuaiweb_qqtitle")))<1 then
				response.write ("<script language=javascript> alert('部门/小组必填且不能少于1个字符！');history.back(-1);</script>")
				response.end
			end if
		
			if len(trim(request.Form("shuaiweb_qqname")))<1 then
				response.write ("<script language=javascript> alert('QQ名称必填且不能少于1个字符！');history.back(-1);</script>")
				response.end
			end if
			  
			if len(trim(request.Form("shuaiweb_qqnumber")))<1 then
				response.write ("<script language=javascript> alert('QQ号码不能为空，且不少于1个字符！');history.back(-1);</script>")
				response.end
			end if 
		  
		dim rs,sql
		set rs=server.createobject("adodb.recordset")
		sql="select * from shuaiweb_qq" 
		rs.open sql,dbok,3,2
		rs.addnew 
			rs("shuaiweb_qqtitle")=trim(request.form("shuaiweb_qqtitle"))
			rs("shuaiweb_qqname")=trim(request.form("shuaiweb_qqname"))
			rs("shuaiweb_qqnumber")=trim(request.form("shuaiweb_qqnumber"))
			rs("shuaiweb_picture")=trim(request.form("shuaiweb_picture"))		
			rs("shuaiweb_qqsort")=trim(request.form("shuaiweb_qqsort"))				
		rs.update
		rs.close
		set rs=nothing
		response.write "<script language=javascript> alert('成功添加！');location.replace('admin_qq.asp');</script>"
		End If 
				set rs = server.createobject("adodb.recordset")
				sql="select * from shuaiweb_qq ORDER BY shuaiweb_qqsort ASC"
				rs.open sql,dbok,1,1
%>   
		<table width="98%" border="1" cellpadding="6" cellspacing="0" bordercolor="#cccccc" style="border-collapse:collapse" bgcolor="#FFFFFF" align="center">
            <tr>
              <td colspan="6"><a href="#" class="big-link" data-reveal-id="myModal">+ 创建</a>
               </td>
             </tr>
		  <tr>
			<td width="17%" bgcolor="#CCCCCC">部门/小组</td>
			<td width="19%" bgcolor="#CCCCCC">姓名</td>
			<td width="19%" bgcolor="#CCCCCC">号码</td>
			<td width="10%" bgcolor="#CCCCCC">头像</td>
			<td width="12%" bgcolor="#CCCCCC">排序</td>
			<td width="23%" bgcolor="#CCCCCC">操作！</td>
		  </tr>
				<%
				if rs.bof and rs.eof then
					No_record = "暂无记录!"
						Else
				do while not rs.eof 
				%>	 
		  <tr onMouseOver="this.id='aa'" onMouseOut="this.id='bb'" class="cc">
			<td>[<%=rs("shuaiweb_qqtitle")%>]</td>
			<td><%=rs("shuaiweb_qqname")%></td>
			<td><%=rs("shuaiweb_qqnumber")%></td>
			<td><img src="<%=rs("shuaiweb_picture")%>" /></td>
			<td><%=rs("shuaiweb_qqsort")%></td>
			<td><a href="admin_qqedit.asp?id=<%=rs("id")%>"><img src="../images/023.jpg" alt="修改"/></a> <a href="../admin_del.asp?t=qqeditdel&id=<%=rs("id")%>"><img src="../images/015.gif" alt="删除" onclick="{if(confirm('确定删除它吗?')){return true;}return false;}"/></a> </td>
		  </tr>
				<%
				rs.MoveNext 
				loop   
				End If 
		rs.close
		set rs=nothing
%>
<tr>
                <td colspan="6"><%=No_record%></td>
</tr>
		</table>

		<div id="myModal" class="reveal-modal">
		<table width="98%" border="0" cellpadding="10" cellspacing="0" bordercolor="#666666" style="border-collapse:collapse" bgcolor="#FFFFFF" align="center">
		<form id="form1" name="form1" method="post" action="admin_qq.asp?t=qq">
		  <tr>
			<td onMouseOver="this.id='aa'" onMouseOut="this.id='bb'" class="cc">部门/小组<br /><input name="shuaiweb_qqtitle" type="text" id="shuaiweb_qqtitle" class="win"/> 如：开发部 / 技术组<font color=red>(必填)</font></td>
		  </tr>
		  <tr>
			<td onMouseOver="this.id='aa'" onMouseOut="this.id='bb'" class="cc">姓名<br /><input name="shuaiweb_qqname" type="text" id="shuaiweb_qqname" class="win"/> 如：唐晓伟 <font color=red>(必填)</font></td>
		  </tr>
		  <tr>
			<td onMouseOver="this.id='aa'" onMouseOut="this.id='bb'" class="cc">QQ号码<br /><input name="shuaiweb_qqnumber" type="text" id="shuaiweb_qqnumber" class="win"/> 如：993141000 <font color=red>(必填)</font></td>
		  </tr>
			<td onMouseOver="this.id='aa'" onMouseOut="this.id='bb'" class="cc">QQ头像<br />
			<select name="shuaiweb_picture" id="shuaiweb_picture" onchange="document.images['qq'].src=options[selectedIndex].value;" class="winla" >
			<%For i=1 To 48%>
			<option value=<%=sw_dizhi%>images/qq/<%=i%>.gif><%=i%></option>
			<%Next%>
			</select>
			<img src="<%=sw_dizhi%>images/qq/1.gif" id="qq">
			</td>
		  </tr>
		  <tr>
			<td onMouseOver="this.id='aa'" onMouseOut="this.id='bb'" class="cc">排序<br />
			<input name="shuaiweb_qqsort" type="text" id="shuaiweb_qqsort" value="1" onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}" onafterpaste="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}" class="win2"/>
			  必须是数字！
			</td>
		  </tr>
		  <tr>
			<td><input type="submit" name="Submit" value="添 加" class="inanniu"/>
			  <input type="reset" name="Submit2" value="重 置" class="inanniu"/></td>
		  </tr>
		</form>
		</table>
<a class="close-reveal-modal">&#215;</a>
		</div>
</body>
</html>
