<?php
session_start();
include "conn/config.php";
include "ckeditor/ckeditor.php";

$cked = new CKEditor();
$cked->basePath = "ckeditor/";

//删除图片
if($_GET['order'] == "del"){
	$id = $_GET['id'];
	$query = mysql_query("delete from {$total_pr}picture where id='".$id."'");
	if($query){
		header("location:picture.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 type="text/css" rel="stylesheet" href="css/style.css" />
<title>尘烟博客</title>
<script type="text/javascript">
   function check_release(form){
	  if(form.title.value == ""){
		  alert("文章标题不能为空！");
		  form.title.focus();
		  return false;
	  }
	  
	  return true;
   }
</script>
</head>

<body>
<div id="wrap">
<!-------------头部开始-------------->
   <div id="header">
	 <?php
      include "include/top.php";
      ?>
   </div>
<!-------------头部结束-------------->
<!-------------主体部分开始----------->
   <div id="content">

<!-----发表部分内容开始----->
     <div id="release">
     <form action="art_upload_do.php" method="post" onsubmit="return check_release(this)">
       <div class="ckeditor_title">
       <h1>文章发表</h1>
         标题：<input type="text" name="title" id="title" />
       </div>
       <div class="ckeditor_con">
        <?php
		  $cked->editor("editor1");
		?>
       </div>
       <div class="ckeditor_button">
         <input type="submit" name="sub" id="sub" value="发表文章" />
       </div>
     </form>
     </div>
<!-----发表部分内容结束----->
   </div>
<!-------------主体部分结束----------->
<!-------------尾部内容开始----------->
   <div id="footer">
	  <?php
       include "include/bottom.php";
      ?>
   </div>
<!-------------尾部内容结束----------->
</div>
</body>
</html>