<?php 
	session_start(); 
	require_once('inc/conn.php');
	require_once('inc/constant.php');
	require_once('inc/ls_syscode.php');
	require_once('inc/check.php');
	$ls_msg="添加单页操作";
	$opendb=new mydb();
	require_once('inc/char_set.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=utf-8">
		<link href="css/admin.css" rel="stylesheet" type="text/css">
		<script language="JavaScript" src="js/ls.js"></script>
		<title>无标题文档</title>
		
	</head>

	<body>
		<table width="96%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#6396d6">
			<tr>
				<td height="18" background="images/admin_bg.gif"><div align="center"><font color="#ffffff"><strong>添加单页</strong></font></div>
				</td>
			</tr>
			<tr>
				<td height="213" valign="top" bgcolor="#dee7ff"><br>
				 <form name="newsform" enctype="multipart/form-data" method="post" action="savesinglepage.php" onSubmit="return checkSubmitForm('Num,pageTitle','序号,标题');">
					<input type="hidden" value="insert" name="ls">
					<table border="0" width="90%" align="center">
						<tr>
							<td>提示：<font color="#FF0000"><?php echo $ls_msg; ?></font></td>
							<td align="right"><img src="images/shao.gif">&nbsp;<a href="singlepage.php"><u>返回</u></a></td>
						</tr>
					</table>
					<table width="90%" border="0" align="center" cellpadding="3" cellspacing="0" bgcolor="#FFFFFF">
					 
					  <tr bgcolor="#B9DAFF"> 
						<td height="28" colspan="3"></td>
					  </tr>
					  <tr bgcolor="#f4f4f4"> 
						<td style="padding-left:50px;" width="17%">单页标题：</td>
						<td width="48%"><input type="text" name="pageTitle"  id="pageTitle" style="width:300px;"></td>
						<td width="35%">序号：
                          <?
                        	$select_sql2="select Num from ls_singlepages  order by Num desc  limit 1 ";
							//echo $select_sql2;
							$select_query2=$opendb->query($select_sql2);
							$row_num=mysql_fetch_assoc($select_query2); //总数

						?>
                        <input name="Num" id="Num" type="text" style="width:40px;" value="<?=$row_num['Num']+5?>" size="6" maxlength="6">
                        <span style="padding-left:20px;">日期：
                        <input name="pageDate" type="text"  value="<?php echo date('y-m-d');?>" size="14" maxlength="24" />
                        </span></td>
					  </tr>
					  <tr bgcolor="#f4f4f4">
						<td style="padding-left:50px;">单页说明：</td>
						<td colspan="2"><input name="pageBrief" type="text" style="width:500px;" ></td>
					  </tr>
					  <tr bgcolor="#f4f4f4"> 
						<td style="padding-left:50px;">单页内容：</td>
						<td style="padding-left:50px;">&nbsp;</td>
						<td style="padding-left:50px;"><input type="submit" value="添加" />
                        <input type="reset" name="button2" id="button2" value="重置" /></td>
					  </tr>
					  <tr>
					  	<td colspan="3"><!--
					  	<input type="hidden" name="pageText"  id="pageText" value="">
							<iframe ID="eWebEditor1" src="ewebeditor/ewebeditor.php?id=pageText&style=coolblue" frameborder="0" scrolling="no" width="100%" HEIGHT="350"></iframe>-->
						<?php
								require_once('fckeditor/fckeditor.php');
								$sBasePath=$_SERVER['PHP_SELF'];
								$sBasePath=substr($sBasePath,0,strpos($sBasePath,"ls_admin"));
								$sBasePath.="ls_admin/fckeditor/";
									
								$oFCKeditor=new FCKeditor('pageText');
								$oFCKeditor->BasePath=$sBasePath;
								$oFCKeditor->Config['SkinPath']=$sBasePath.'editor/skins/silver/';
								$oFCKeditor->Config['AutoDetectLanguage']=true;
								$oFCKeditor->ToolbarSet='Default';
								$oFCKeditor->Height='350';
								$oFCKeditor->Value='';
								$oFCKeditor->Create();
							?>
						</td>
					  </tr>
					  <tr bgcolor="#B9DAFF"> 
						<td height="25" colspan="2" align="center"><span style="padding-left:50px;">
						  <input type="submit" value="添加" />
                          <input type="reset" name="button" id="button" value="重置" />
						</span></td>
						<td height="25" align="right"><img src="images/shao.gif" alt="" />&nbsp;<a href="singlepage.php"><u>返回</u></a></td>
					  </tr>
					</table>
					<br />
                 </form>
				</td>
			</tr>
		</table>
	</body>
</html>