<?php require_once("admin_public.php");?>
<div class="admin_bread">当前位置：页面管理</div>
<div class="admin_right">
  <div class="admin_main">
    <form action="result.php" method="post" name="admin_info" class="admin_info_form">
      <div class="admin_info" id="info_a">
        <h4 class="h1">页面管理</h4>
        <div class="admin_table">
          <?php 
	  if($_GET['id']){
		  $result=singlepage_view();
		  while($row=mysql_fetch_array($result))
				{
					$pagename=$row['pagename'];
					$content=$row['content'];  
				}
		  }
	  ?>
          <table width="100%">
            <tr>
              <input type="hidden" value="<?php echo $_GET['id']?>" name="id" />
              <td class="td1">文章名称</td>
              <td class="td2"><input type="hidden" name="pagename" value="<?php echo $pagename;?>" /><?php echo $pagename;?>
                <span>&nbsp;</span></td>
            </tr>
            <tr>
              <td class="td1">文章内容</td>
              <td class="td2"><?php require_once("fckeditor/fckeditor.php");?>
                <div class="editor" style="height:400px;">
                  <?php 
			$oFCKeditor = new FCKeditor('FCKeditor1')  ; 
			$oFCKeditor->BasePath = 'FCKeditor/' ;    
			$oFCKeditor->ToolbarSet = 'Custom' ; 
			$oFCKeditor->InstanceName = 'content' ; 
			$oFCKeditor->Width = '98%' ; 
			$oFCKeditor->Height = '400' ; 	
			$oFCKeditor->Value = "$content" ; 
			$oFCKeditor->Create() ;			
		?>
                </div>
                <span>&nbsp;</span></td>
            </tr>
            <tr>
              <td class="td1">&nbsp;</td>
              <td class="td2"><?php 
			if($_GET['id'])
			{
			?>
                <input type="submit" value="更新" class="submit" name="singlepage_update" />
                <?php
			}
			else
			{
			?>
                <input type="submit" value="增加" class="submit" name="addsinglepage" />
                <?php 
			}
			?></td>
            </tr>
          </table>
        </div>
      </div>
    </form>
  </div>
</div>
<?php require_once("admin_footer.php");?>