<?
@require_once('../inc/fun.inc.php');
@require_once('../inc/config.db.php');
@require_once('cookie.php');
?>
<!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>
<script>
function checktou()
{
	var title=document.tou.file.value;	
	var name=document.tou.name.value;	
	if(title=="")
	{
		alert("请选择图片");
		return false;
		}
	else if(name==""){
		alert("请输入产品名称");
		return false;	
	}	
	else
	{   
	    document.tou.Submit.disabled=true;
		return true;
		
		}
}
</script>
</head>

<body>
<form action="admin.php?main=cpadd_act" method="post" enctype="multipart/form-data" name="tou" id="tou" onsubmit="return checktou()">
  <table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#000000">
    <tr>
      <td colspan="2" align="center" style="font-size:16px; color:#FFF; font-weight:bold">产品添加</td>
    </tr>
    <tr>
      <td align="right" bgcolor="#FFFFFF">产品名称:</td>
      <td bgcolor="#FFFFFF"><label for="title"></label>
      <input name="title" type="text" id="title" style="width:120px" maxlength="50" /></td>
    </tr>
    <tr>
      <td align="right" bgcolor="#FFFFFF">作者:</td>
      <td bgcolor="#FFFFFF"><label for="ze"></label>
      <input name="ze" type="text" id="ze" style="width:100px" maxlength="30" /></td>
    </tr>
    <tr>
      <td align="right" bgcolor="#FFFFFF">来源:</td>
      <td bgcolor="#FFFFFF"><label for="ly"></label>
      <input name="ly" type="text" id="ly" style="width:100px" maxlength="30" /></td>
    </tr>
    <tr>
      <td align="right" bgcolor="#FFFFFF">上传路径:</td>
      <td bgcolor="#FFFFFF"><label for="file"></label>
      <input name="file" type="file" id="file" size="35" maxlength="200" /></td>
    </tr>
    <tr>
      <td align="right" bgcolor="#FFFFFF">产品类别:</td>
      <td bgcolor="#FFFFFF">
        <label for="lb"></label>
        <select name="lb" id="lb" style="width:120px">
        <?
		$sql="select * from cplb order by id";
		$result=mysql_query($sql);   
		while($row=mysql_fetch_array($result)){
		?>
        	<option value="<?=$row["id"]?>"><?=$row["name"]?></option>
        <?
		}
		?>
      	</select>
      </td>
    </tr>
    <tr>
      <td align="right" bgcolor="#FFFFFF">产品说明:</td>
      <td bgcolor="#FFFFFF">
      <? require("FCKeditor/fckeditor.php");             //调用文件
			$sBasePath = "FCKeditor/" ;                       //根目录
			$oFCKeditor = new FCKeditor('content') ;  //设定name字段
			$oFCKeditor->BasePath	= $sBasePath ;
			$oFCKeditor->Height='400px';                 //高
			$oFCKeditor->Width='100%';                   //宽
			$oFCKeditor->Create() ;
	   ?>
      </td>
    </tr>
    <tr>
      <td align="right" bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF"><input type="submit" name="button" id="button" value="添加" /></td>
    </tr>
  </table>
</form>
</body>
</html>