Ejemplo n.º 1
0
                            $day = 1;
                            $month++;
                        } else {
                            $day++;
                        }
                    }
                }
            }
        }
    }
    return $time_array;
}
?>
<table width="87%;"; id="s_week"; height="550px;"; style="font-size:10px;";>
    <?php 
$time_rili = rili('2013', '2', '25');
echo "\r\n\t<tr align=center height=50px;>\r\n        <td></td>\r\n        <td>星期一[" . $time_rili[$week][1] . "]</td>\r\n        <td>星期二[" . $time_rili[$week][2] . "]</td>\r\n        <td>星期三[" . $time_rili[$week][3] . "]</td>\r\n        <td>星期四[" . $time_rili[$week][4] . "]</td>\r\n        <td>星期五[" . $time_rili[$week][5] . "]</td>\r\n        <td>星期六[" . $time_rili[$week][6] . "]</td>\r\n        <td>星期日[" . $time_rili[$week][7] . "]</td>\r\n      </tr>";
//查询当前周排课信息
$sql = "select * from teacher_sj_schedule where substr(time_add,1,12) = '{$id}'";
$result = $conn->query($sql);
$cnt = 0;
if ($result) {
    while ($info = $result->fetch_array()) {
        $cnt++;
        $sql1 = "select * from course where course_id = '" . $info['course_id'] . "'";
        //获取课程名及教师号
        $result1 = $conn->query($sql1);
        if ($result1 && ($info1 = $result1->fetch_array())) {
            $sql2 = "select * from teacher where teacher_id = '" . $info1['teacher_id'] . "'";
            //获取教师名
            $result2 = $conn->query($sql2);
Ejemplo n.º 2
0
<?php

require_once dirname(__FILE__) . "/../include/common.inc.php";
require_once DEDEINC . "/channelunit.func.php";
$rili = rili($date, '', true);
$db = new dedesql();
$curtime = time();
//获得时间戳
if (empty($date)) {
    $timestamp = $curtime;
    $date = date('Y-n-d', $timestamp);
} else {
    $timestamp = strtotime($date);
}
$selectedyear = date('Y', $timestamp);
$selectedmonth = date('n', $timestamp);
$selectedday = date('d', $timestamp);
$starttime = mktime(0, 0, 0, $selectedmonth, $selectedday, $selectedyear);
$endtime = $starttime + 86400;
$where = '';
$tid = intval($tid);
if ($tid > 0) {
    $where = " and typeid={$tid}";
}
$pagesize = 30;
//默认一页30条数据
$maxpages = 9;
//
$pagepre = 4;
//分页用
$pageno = isset($_GET["pageno"]) ? intval($_GET["pageno"]) : 1;