国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Fungsi pengubahsuaian berita di belakang pentas

1. Ubah suai halaman operasi paparan kategori dan tambahkan teg di sini

Klik tag untuk melompat

Buat fail newupdate.php

adalah seperti berikut

kod berikut

Ubah suai Menambah fungsi gema halaman berita adalah sama seperti menambah kategori Pada masa yang sama, anda perlu menambah kod berikut dalam newsave:

<?php
include 'include/mysqli.php';
?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
    <link rel="stylesheet" type="text/css" href="css/style.css"/>
    <script src="plugin/kindeditor/kindeditor/kindeditor-all.js"></script>
    <script src="plugin/calendar/calendar.js"></script>
</head>
<body>
<?php
?>
<table width="100%" border="1" bordercolor="#dddddd" style="border-collapse: collapse">
    <?php
    $id=$_GET["id"];
    $typeid=$_GET["typeid"];
    ?>
    <form action="newsave.php?action=update" method="post" enctype="multipart/form-data">
        <tr><td width="100">分類:</td><td><select name="typeid">
                    <option value="">請選擇類別</option>
                    <?php
                    function show($fid,$i){
                        $i++;
                        $blank="";
                        for($n=0;$n<$i;$n++){
                            $blank.="---";
                        }
                        global $mysqli;
                        $sql = "select *from type where fid=$fid order by orderid";
                        $result = $mysqli->query($sql);
                        while ($row = $result->fetch_assoc()) {
                            global $typeid;
                            ?>
                            <option <?php if($typeid==$row['id']){echo "selected";}?> value="<?php echo $row['id'] ?>"><?php echo $blank.$row['typename'].$blank?></option>
                            <?php
                            show($row['id'],$i);
                        }
                    }
                    show(0,0);
                    ?>
                </select></td></tr>
        <?php
        global $id;
        $sql="select *from news where id=$id";
        $result=$mysqli->query($sql);
        while($row=$result->fetch_assoc()){
        ?>
            <input type="hidden" name="id" value="<?php echo $row['id']?>">
        <tr><td>標(biāo)題:</td><td><input type="text" name="title" value="<?php echo $row['title']?>"></td></tr>
        <tr><td>圖片:</td><td><input type="file" name="picurl" value="<?php echo $row['picurl']?>"></td></tr>
        <tr><td>來源:</td><td><input type="text" name="source" value="<?php echo $row['source']?>"></td></tr>
        <tr><td>摘要:</td><td><textarea rows="6" cols="100" name="description" value="<?php echo $row['description']?>"></textarea></td></tr>
        <tr><td>文章的內(nèi)容:</td><td><textarea name="content" rows="15" cols="100" id="content" value="<?php echo $row['content']?>"></textarea>
                <script>
                    KindEditor.ready(function(K) {
                        window.editor = K.create('#content',{
                            afterBlur:function(){this.sync();}
                        })
                    });
                </script>
            </td></tr>
            <?php
                $posttime=date("Y-m-d h:i:s",$row['posttime']);
            ?>
        <tr><td>日期</td><td><input type="text" name="posttime" value="<?php echo $posttime?>" id="posttime" readonly="readonly">
                <script type="text/javascript">
                    Calendar.setup({
                        inputField     :    "posttime",
                        ifFormat       :    "%Y-%m-%d %H:%M:%S",
                        showsTime      :    true,
                        timeFormat     :    "24"
                    });
                </script>
            </td></tr>
        <?php
        }
        ?>
        <tr><td></td><td><input type="submit" name="dosub" value="修改"></td></tr>
    </form>
</table>
</body>
</html>

Paparan kesan: gif5新文件 (9).gif


?? ????
Meneruskan pembelajaran
||
<?php echo "修改新聞頁面";