码迷,mamicode.com
首页 > 其他好文 > 详细

私房库视频学习笔记-小清新BBS系统开发技术归纳三

时间:2015-10-21 00:30:57      阅读:168      评论:0      收藏:0      [点我收藏+]

标签:技术   开发   前台   

前台数据展示处理方法:

<?php include ‘inc/header.inc.php‘?>
<div id="main">
    <div class="title">父版块列表</div>
    <form method="post">
    <table class="list">
        <tr>
            <th>排序</th>              
            <th>版块名称</th>
            <th>操作</th>
        </tr>
        <?php
        $query="select * from sfk_father_module";
        $result=execute($link,$query);
        while ($data=mysqli_fetch_assoc($result)){
            $url=urlencode("father_module_delete.php?id={$data[‘id‘]}");
            $return_url=urlencode($_SERVER[‘REQUEST_URI‘]);
            $message="你真的要删除父版块 {$data[‘module_name‘]} 吗?";
            $delete_url="confirm.php?url={$url}&return_url={$return_url}&message={$message}";

$html=<<<A
            <tr>
                <td><input class="sort" type="text" name="sort[{$data[‘id‘]}]" value="{$data[‘sort‘]}" /></td>
                <td>{$data[‘module_name‘]}[id:{$data[‘id‘]}]</td>
                <td><a href="#">[访问]</a>&nbsp;&nbsp;<a href="father_module_update.php?id={$data[‘id‘]}">[编辑]</a>&nbsp;&nbsp;<a href="$delete_url">[删除]</a></td>
            </tr>
A;
            echo $html;

        }
        ?>
    </table>
    <input style="margin-top:20px;cursor:pointer;" class="btn" type="submit" name="submit" value="排序" />
    </form>
</div>


在这儿还有一系列的处理:

前台页面的显示-->删除操作的提示(第二次确认)-->操作结果的显示。

father_module.php confirm.php                                   

本文出自 “孤舟夜航之家” 博客,请务必保留此出处http://cysky.blog.51cto.com/211942/1704659

私房库视频学习笔记-小清新BBS系统开发技术归纳三

标签:技术   开发   前台   

原文地址:http://cysky.blog.51cto.com/211942/1704659

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!