From 46ef2c85fb5be4cc54b7a23df4f5a774a854cf5e Mon Sep 17 00:00:00 2001 From: RomanGolienko Date: Tue, 10 Dec 2024 12:30:43 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B0=D0=B7=D0=B4=D0=B5=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D1=84=D1=83=D0=BD=D0=BA=D1=86=D0=B8=D0=BE?= =?UTF-8?q?=D0=BD=D0=B0=D0=BB=D0=B0=20=D0=B4=D0=B5=D0=B9=D1=81=D1=82=D0=B2?= =?UTF-8?q?=D0=B8=D0=B9=20=D0=BD=D0=B0=20=D1=80=D0=B0=D0=B7=D0=BD=D1=8B?= =?UTF-8?q?=D1=85=20=D1=81=D1=82=D1=80=D0=B0=D0=BD=D0=B8=D1=86=D0=B0=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inc/attendancelog.php | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/inc/attendancelog.php b/inc/attendancelog.php index 7764eaf..a11b51f 100644 --- a/inc/attendancelog.php +++ b/inc/attendancelog.php @@ -118,7 +118,9 @@ class attendancelog { $awn = json_decode(file_get_contents($url),1); return $awn['week_cur']; } + public function headmanAddEdit(){ + } public function predmetsAddEdit($predmet_name){ //принимает имя предмета. Делает запись в таблицу предметов, если такой нет. В любом случае возвращает айди предмета $sql_search = 'SELECT id, name FROM acs_attendancelog_predmets WHERE name="'. $predmet_name .'"'; @@ -200,6 +202,11 @@ class attendancelog { return $out; } } + function headmanPageAction(){ + $des = ''; if(isset($_GET['des'])) $des = $_GET['des']; + if($des == 'add_edit'){ + } + } function HTML() { GLOBAL $smarty; @@ -207,19 +214,20 @@ class attendancelog { $currentUserInfo = $this->currentUserInfo(); $currentTime = $this->currentTime(); $AttendanceAddEdit = $this->AttendanceAddEdit();// должен вызываться перед mainPageAction - $actionResult = $this->mainPageAction(); + $mainPageActionResult = $this->mainPageAction(); + $headmanPageActionResult = $this->headmanPageAction(); $predmetsAddEdit = $this->predmetsAddEdit('Исследование операций и методы оптимизации'); //$html .= '
'. print_r($groups,1) . '
'; //$html .= '
'. print_r($currentUserInfo,1) . '
'; - $html .= '
'. print_r($actionResult,1) . '
'; - $html .= '
'. print_r($predmetsAddEdit,1) . '
'; + //$html .= '
'. print_r($mainPageActionResult,1) . '
'; + //$html .= '
'. print_r($predmetsAddEdit,1) . '
'; //$html .= '
'. print_r($currentTime,1) . '
'; //$html .= '
'. print_r($_SESSION,1) . '
'; //$html .= '
'. print_r($AttendanceAddEdit,1) . '
'; //$html .= '
'. print_r($_GET,1) . '
'; - $html .= '
'. print_r($_POST,1) . '
'; + //$html .= '
'. print_r($_POST,1) . '
'; //$html .= '
'. print_r($_SESSION,1) . '
'; $page = ''; if(isset($_GET['page'])) $page = $_GET['page']; @@ -229,6 +237,9 @@ class attendancelog { $smarty->assign('currentTime', $currentTime); $smarty->assign('currentUserInfo', $currentUserInfo); if($page == 'headman') { + $facult_groups = $this->getAllGrupps($currentUserInfo['facult']['facult_id']); + $smarty->assign('facult_groups',$facult_groups); + $smarty->assign('headmanPageActionResult', $headmanPageActionResult); $smarty->clearCache('moduls/attendancelog/tpl/headman.html'); $html .= $smarty->fetch('moduls/attendancelog/tpl/headman.html'); } @@ -245,10 +256,10 @@ class attendancelog { $html .= $smarty->fetch('moduls/attendancelog/tpl/main_page.html'); } - if ($page == 'main'){//Староста + if ($page == 'main'){ if ($des == 'show'){ $smarty->assign('AttendanceAddEdit', $AttendanceAddEdit); - $smarty->assign('actionResult', $actionResult); + $smarty->assign('mainPageActionResult', $mainPageActionResult); $groupName = $this->getGroupNameByID((int)$_GET['id']); $groupName = $groupName[1]['sokr']; $smarty->assign('groupName', $groupName);