首页  >  文章  >  php教程  >  FK对接平台数据库测试研究

FK对接平台数据库测试研究

WBOY
WBOY原创
2016-07-11 08:44:041532浏览
跳至 [1] [全屏预览]
<?php


//1.导入配置文件
require("conf/dbconfig.php");

$link = mysql_connect(HOST, USER, PASS);

mysql_select_db(DBNAME);


?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>小雨在线-课堂教学评价跟踪表系统</title>
    <link href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
    <script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
    <script src="../js/jquery.stickytableheaders.min.js"></script>
    <script src="js/all.js"></script>


    <style>


        fieldset {
            padding: .35em .625em .75em;
            margin: 0 2px;
            border: 1px solid #DDDDDD
        }

        legend {
            padding: .5em;
            border: 0;
            width: auto
        }

    </style>

</head>

<body>


<div id="box" class="container-fluid">

    <fieldset>

        <legend>欢迎管理员</legend>


        <?php


        $sql = "SELECT
	edu_trxorder.id 'id',
	edu_trxorder.student_name 'stu_name',
	edu_trxorder.mobile 'stu_mob',
	edu_course.subject_major_str 'nianji',
	user_expand.realname 'tea_name',
	user_user.mobile 'tea_mob',
	edu_course.join_num 'bm_num',
	edu_trxorder.lession_num 'keshi',
	edu_trxorder.course_name 'kecheng',
	edu_course.course_plan 'kaike_time',
	edu_trxorder.pay_time 'tijiao_time'
FROM
	edu_trxorder
INNER JOIN edu_course ON edu_trxorder.course_id = edu_course.id
INNER JOIN edu_teacher ON edu_trxorder.teacher_id = edu_teacher.id
INNER JOIN user_user ON user_user.id = edu_teacher.user_id
INNER JOIN user_expand ON user_expand.user_id = user_user.id
ORDER BY
	edu_trxorder.id DESC";

        $result = mysql_query($sql);

        $n = 1;

        echo "<table border=\"1\" bordercolor=\"#CCCCCC\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse\" width=\"100%\">";
        echo "<tr>
                        <td>排序号</td>
                        <td>id</td>
                        <td>学生姓名</td>
                        <td>学生手机</td>
                        <td>年级/学科</td>
                        <td>教师姓名</td>
                        <td>教师手机</td>
                        <td>课时</td>
                        <td>报名人数</td>
                        <td>课程</td>
                        <td>课程安排</td>
                        <td>提交时间</td>
                   </tr>";


        while ($row = mysql_fetch_assoc($result)) {


            echo "<tr>
                            <td> {$n}</td>
                            <td> {$row['id']}</td>
                            <td> {$row['stu_name']}</td>
                            <td> {$row['stu_mob']}</td>
                            <td> {$row['nianji']}</td>
                            <td> {$row['tea_name']}</td>
                            <td> {$row['tea_mob']}</td>
                            <td>{$row['keshi']}</td>
                            <td>{$row['bm_num']}</td>
                            <td> {$row['kecheng']}</td>
                            <td> {$row['kaike_time']}</td>
                            <td> {$row['tijiao_time']}</td>
                      </tr>";

            $n++;

        }


        echo "</table>";


        ?>


    </fieldset>

</div>


<script type="text/javascript">


    $(document).ready(function () {


    });
</script>


</body>
</html>
声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn