From 229dc9bee802bf84bb6b8d8140baa0330cd47975 Mon Sep 17 00:00:00 2001 From: leiyong <1549684884@qq.com> Date: Mon, 7 Sep 2020 10:15:34 +0800 Subject: [PATCH] * Finish task#7735. --- module/my/control.php | 26 ++++-- module/my/view/program.html.php | 158 +++++++++++++++++++++++++------- 2 files changed, 143 insertions(+), 41 deletions(-) diff --git a/module/my/control.php b/module/my/control.php index 95775dd47b..cf3a54a5e2 100644 --- a/module/my/control.php +++ b/module/my/control.php @@ -400,24 +400,32 @@ class my extends control /** * My programs. * - * @param int $recTotal - * @param varchar $date - * @param varchar $direction + * @param string $status + * @param string $orderBy + * @param int $recTotal + * @param int $recPerPage + * @param int $pageID * @access public * @return void */ - public function program($recTotal = 0, $date = '', $direction = 'next') - { - $this->app->loadLang('program'); + public function program($status = 'all', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 15, $pageID = 1) + { + $this->loadModel('program'); $this->app->loadLang('project'); + $this->app->session->set('programList', $this->app->getURI(true)); + /* Set the pager. */ $this->app->loadClass('pager', $static = true); - $pager = new pager($recTotal, $recPerPage = 50, $pageID = 1); + $pager = new pager($recTotal, $recPerPage, $pageID); - $this->view->position[] = $this->lang->my->myProgram; $this->view->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->myProgram; - $this->view->programs = $this->loadModel('program')->getList($status = 'all', $orderBy = 'id_desc', $pager); + $this->view->position[] = $this->lang->my->myProgram; + $this->view->programs = $this->program->getList($status, $orderBy, $pager, true); + $this->view->users = $this->loadModel('user')->getPairs('noletter'); + $this->view->pager = $pager; + $this->view->status = $status; + $this->view->orderBy = $orderBy; $this->display(); } diff --git a/module/my/view/program.html.php b/module/my/view/program.html.php index 6f1cee7213..a2e9acec50 100644 --- a/module/my/view/program.html.php +++ b/module/my/view/program.html.php @@ -11,7 +11,8 @@ */ ?> - +