File manager - Edit - /home/missmand/public_html/learning/old/main/tuteur/refresh_left.php
Back
<?php // Require subrole methods require_once '../inc/global.inc.php'; require_once(api_get_path(SYS_PATH) . 'main/subrole/subrole.php'); require_once(api_get_path(SYS_PATH) . 'main/couple/model.php'); require_once(api_get_path(SYS_PATH) . 'main/couple/action.php'); require_once(api_get_path(SYS_PATH) . 'main/couple/agenda.php'); require_once(api_get_path(SYS_PATH) . 'main/couple/tchat.php'); require_once(api_get_path(SYS_PATH) . 'main/couple/eval.php'); require_once(api_get_path(SYS_PATH) . 'main/couple/doc.php'); require_once(api_get_path(SYS_PATH) . 'main/couple/doc_system.php'); $controller = new IndexManager("Ajax"); // Get info about tabs if (isset($_GET['tab'])) { $current_tab = intval($_GET['tab']); if (!is_int($current_tab) || $current_tab < 0 || $current_tab > 2) $current_tab = 0; } else { $current_tab = 0; } // Get couples or partner $my_user_id = api_get_user_id(); $subrole = get_subrole($my_user_id); if ($subrole == TUTOR) { $couple = couple_get_with($my_user_id, $_SESSION['mm_student']); } else { $tutor = couple_get_tutor($my_user_id); $tutor_user_id = $tutor['tu_user_id']; $couple = couple_get_with($tutor_user_id ,$my_user_id); } $couple_id = $couple['couple_id']; $couple_type = strtoupper($couple['type']); switch ($current_tab) { case 0 : $docs = doc_read($couple_id, $couple_type); $controller->tpl->assign('docs', $docs); break; case 1 : break; case 2 : error_throw('current_tab == 2 in tuteur/refresh_left'); break; } // Images $css_path = api_get_path(WEB_CSS_PATH); $images = array('img_edit' => 'mm_edit', 'img_ok' => 'mm_checkmark', 'img_ok_green' => 'mm_checkmark_green', 'img_create' => 'mm_new', 'img_restore' => 'mm_restore', 'img_bin' => 'mm_bin'); foreach ($images as $key => $value) { $controller->tpl->assign($key, $css_path . $value . '.png'); } // Render template $controller->tpl->assign('current_tab', $current_tab); $controller->tpl->assign('couple', $couple); $controller->tpl->assign('web_path', api_get_path(WEB_PATH)); $controller->tpl->assign('my_user_id', $my_user_id); $controller->tpl->assign('my_subrole', get_subrole($my_user_id)); // Tabs for ($i=0; $i < 3; $i++) { $labels = array('Documents', 'Bilans', 'Impressions'); $tabs[] = array("href" => "?tab=$i", "class" => ($current_tab == $i ? 'mm_tab_selected' : 'mm_tab'), "label" => $labels[$i]); } $controller->tpl->assign('tabs', $tabs); $controller->tpl->assign('part', 'tuteur'); switch ($current_tab) { case 0 : $tpl = $controller->tpl->get_template('layout/mm_coop_left.tpl'); break; case 1 : break; case 2 : break; } $controller->tpl->display($tpl); ?>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings