App/Lib/Action/Admin/ScheduleAction.class.php

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?php

class ScheduleAction extends CommonAction {
	
    public function index() {
		if ($this->isAjax ()) {
			$Form = D ( 'Schedule' );
			import ( "ORG.Util.Page" );
			$where = "";
			if (!empty($_SESSION['studentSessionInfo']['classID'])) {
				$where = " studentID = '{$_SESSION['studentSessionInfo']['id']}'";
			}
			$count = $Form->where($where)->count ();
			$Page  = new Page ( $count, $_REQUEST['rp']);
			$Page->firstRow = $_REQUEST['rp'] * ($_REQUEST['page'] - 1);
			$list  = $Form->where($where)->order ( 'id DESC' )->limit ( $Page->firstRow . ',' . $Page->listRows )->select ();
			$json  = array (
					'page'  => $_REQUEST['page'],
					'total' => $count,
					'rows'  => array ()
			);
			$g = __GROUP__;
			foreach ( $list as $key => $value )
				$json ['rows'] [] = array (
						'id' => $list [$key] ['id'],
						'cell' => array (
								'id'       => $list [$key] ['id'],
								'name'     => $list [$key] ['name'],
								'sktime'     => $list [$key] ['sktime'],
								'ektime'     => $list [$key] ['ektime'],
								'jiaoshi'     => $list [$key] ['jiaoshi'],
								'type'     => $list [$key] ['type'] == 0 ? "选修" : "必修" ,
								'is_lock'     => $list [$key] ['is_lock'] == 0 ? "未锁定" : "已锁定" ,
								'specialty_name'     => $this->getspecBylds($list[$key]['specialtyID']),
								'scale1'     => $list [$key] ['scale1'],
								'teacher'  => $this->getteaBylds($list[$key]['teacherID']),
								'remarks'  => $list [$key] ['remarks'],
						)
				);
			echo json_encode ( $json );
		} else {
			$this->toTemplate ( 'Schedule:index', '课表管理  > 所有课表 >' );
		}
	}
	 public function getteaBylds($ids){
        $teacher_namelist="";
        $Form=M('Teacher');
        $list=$Form->where('id in ('.$ids.',0)')->select();
        for($i=0;$i<count($list);$i++){
            if($i>0){
                $teacher_namelist.=",";
            }
            $teacher_namelist.=$list[$i]['name'];
        }
        return $teacher_namelist;
    }
    
    public function getteaBylds1($ids){
        $teacher_namelist=array();
        $Form=M('Teacher');
后面还有 49 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。