Beispiel #1
0
 public function show()
 {
     $Mdb = M_User_Student::getInstance();
     $arr = $Mdb->where(array("id>0"))->limit(3)->fetchAll();
     //每页三行
     $this->assign("students", $arr);
     $this->assign("page_str", $Mdb->showPages("", 9));
     //显示区间为6,/demo/show/page/
     $this->display();
 }
Beispiel #2
0
 public function info()
 {
     $Mdb = M_User_Student::getInstance();
     if ($_GET['name']) {
         $arr = $Mdb->getByUsername($_GET['name']);
     } else {
         $arr = $Mdb->find($_GET['id']);
     }
     $this->assign("student", $arr);
     $this->display();
 }
Beispiel #3
0
 public function show()
 {
     $Mdb = M_User_Student::getInstance();
     $arr = $Mdb->limit(3)->fetchAll();
     $this->assign("students", $arr);
     $Mdb->AjaxType = true;
     //$Mdb->AjaxFunction=getPage;
     $this->assign("page_str", $Mdb->showPages());
     //   /demo/show/page/
     $this->display();
 }
Beispiel #4
0
 public function show()
 {
     $Mdb = M_User_Student::getInstance();
     $arr = $Mdb->where(array("id>0"))->limit(3)->fetchAll();
     //echo $Mdb->LastQueryString;
     $this->assign("students", $arr);
     //$Mdb->Limit(3);
     //$page_num= $Mdb->count();
     $this->assign("page_str", $Mdb->showPages("", 6));
     //$this->assign("page_num",$page_num);
     $this->display();
 }
Beispiel #5
0
 public function __empty()
 {
     $Mdb = M_User_Student::getInstance();
     $arr = $Mdb->getByUsername(ModuleAction);
     //$Mdb->test();
     $this->assign("student", $arr);
     $this->assign("alert", "空操作演示");
     $this->display('student/info.html');
     $time_end = explode(" ", microtime());
     $c = $time_end[0] + $time_end[1] - $_SESSION['time_start'][0] - $_SESSION['time_start'][1];
     echo "<center>运行时间:" . $c . "秒</center>";
 }