<!--#include file ="../connadmin.asp"-->
<!--#include file = "tuzh_pri.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 http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<style type="text/css">
body  {
SCROLLBAR-FACE-COLOR: #9CC5D7;
SCROLLBAR-HIGHLIGHT-COLOR: #ffffff; 
SCROLLBAR-SHADOW-COLOR: #006699; 
SCROLLBAR-3DLIGHT-COLOR: #006699; 
SCROLLBAR-ARROW-COLOR: #330000; 
SCROLLBAR-TRACK-COLOR: #E2F3F1; 
SCROLLBAR-DARKSHADOW-COLOR: #ffffff;}
</style>
<link rel="stylesheet" type="text/css" href="../img/css.css" />
<script language="javascript" src="../Images/Disp.js"></script>
<script type="text/javascript" src="fckeditor/fckeditor.js" ></script>
<body>
<form action="pic_add.asp?add=ok" method="post" name="editForm" id="editForm">
<table class="border" width="95%" border="0" align="center" cellpadding="1" cellspacing="0">
  <tr>
    <td height="49" align="center" valign="top" class="bg_low"><table width="100%" height="25" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td align="center" valign="middle" class="bgtop"><font class="bgtop_title">发布明星 </font></td>
      </tr>
    </table>
        <table width="100%" border="1" cellpadding="1" cellspacing="0" bordercolor="#ABCEDD">
          <tr>
            <td width="100" align="right">人物名称：</td>
            <td align="left"><input name="name" type="text" id="name" /></td>
          </tr>
          


          <tr>
            <td align="right" valign="top">职业：</td>
            <td align="left"><select name="Professional">
              <option value="教师">教师</option>
              <option value="学生">学生</option>
                             </select></td>
          </tr>
          <tr>
            <td align="right" valign="top">年龄：</td>
            <td align="left"><input name="age" type="text" id="age" /></td>
          </tr>
          <tr>
            <td align="right" valign="top">性别：</td>
            <td align="left"><input name="sex" type="radio" value="男" checked="checked" />
              男 
              <input type="radio" name="sex" value="女" />
              女</td>
          </tr>
          
          <tr>
            <td align="right" valign="top">上传照片： </td>
            <td align="left">
				<input name="BigPic" type="text">
		<input type="checkbox" onClick="display('upload');" id="mox"/><label for='mox'>上传图片</label><br>
		<div id="upload" style="display:none;">			
		<iframe frameborder=0 width=290 height=25 scrolling=no src="Admin_upload.asp?action=pro"></iframe>
		</div>		</td></tr>
          
          <tr>
            <td align="right" valign="top">人物简介：</td>
            <td align="left">
			<textarea name="content" id="content"  ></textarea>
			<script type="text/javascript">
<!--
function showFCK(){
  var FCKeditor1 = new FCKeditor('content', '100%', '460', 'Default', '') ;

  FCKeditor1.ReplaceTextarea() ;
}
showFCK();


//-->
</script>			</td>
          </tr>
          
          <tr>
            <td align="right" valign="top">首页推荐 ： </td>
            <td align="left"><input name="Recommended" type="radio" value="1" checked="checked" />
                        推荐
                        <input name="Recommended" type="radio" value="0" />
                        不推荐 勾选后会在首页出现</td>
          </tr>
          <tr>
            <td width="100" align="right" valign="top">&nbsp;</td>
            <td align="left"><input type="submit" name="Submit" value="确定添加" />
            <input type="reset" name="Submit2" value="清除表单" /></td>
          </tr>
          <tr>
            <td width="100" align="right"></td>
            <td></td>
          </tr>
      </table></td>
  </tr>
</table>
</form>
</body>
</html>
<%
if Request.QueryString("add")="ok" then
set rs=server.createobject("adodb.recordset")
sql="select * from star"
rs.open sql,conn,1,3
name =request.form("name")
Professional=request.form("Professional")
sex=request.form("sex")
photo=request.form("photo")
age=request.form("age")
content=request.form("content")
Recommended=request.form("Recommended")
if name=""  then 
response.Write("<script language=javascript>alert('标题不能为空！');history.go(-1)</script>") 
response.end 
end if
if content="" then 
response.Write("<script language=javascript>alert('详细内容不能为空！');history.go(-1)</script>") 
response.end 
end if
rs.addnew
rs("name")=name
rs("Professional")=Professional
rs("sex")=sex
rs("age")=age
rs("photo")=request.form("BigPic")
rs("content")=content
rs("Recommended")=Recommended
rs("join_date") = now()
rs.update
rs.close
set rs=nothing
conn.close
set rs=nothing
Response.Write "<script language=javascript>alert('添加成功！');window.location.href='pic_manage.asp';</script>" 
end if
%>