Example #1
0
include_once '../dbio/NewsArticles.php';
include_once 'nologin.php';
//获得URL参数
$articleId = $_GET['articleId'];
$Id = $_GET['Id'];
$news = NewsArticles::getNewsById($articleId);
//获得表单提交的数据
$articleId2 = $_POST['articleId'];
//echo $articleId;
$title = $_POST["title"];
$typeId = $_POST["typeId"];
$writer = $_POST["writer"];
$source = $_POST["source"];
$newsImg = $_FILES["newsImg"];
$content = $_POST["content"];
$result = NewsArticles::modification($content, $title, $typeId, $userName, $writer, $source, $savePath, $articleId2);
print_r($result);
$newsTypes = NewsTypes::getNewsTypes();
//显示所有分类
?>
<!DOCTYPE html>
<html>
  <head>
    <title>添加新闻</title>
    <meta http-equiv="content-type" content="text/html;charset=utf-8">
    <link href="../css/admin.css" type="text/css" rel="stylesheet" />
    <script type="text/javascript" src="../jquery/jquery-1.4.js"></script>
    <script type="text/javascript" src="../kindeditor/kindeditor.js"></script>
    <script type="text/javascript">
      var editor;
      KindEditor.ready(function(e){