<?php require_once "conf/top.php"; include_once "models/class.Cours.php"; include_once "models/class.Doc.php"; include_once "models/class.Year.php"; include_once "models/class.Promo.php"; include_once "models/class.DocShared.php"; $cours = new Cours(); $doc = new Doc(); $docS = new DocShared(); $promo = new Promo(); $semestre = 1; if ($semestre == 1) { if ($level == 1 || $level == 2) { $cours_l = $cours->CoursListProfS1($userid); $doc_l = $docS->allyeardocProfS1($userid); } else { $promo_id = $promo->user_promo_id($userid); $cours_l = $cours->CoursListPS1($promo_id[0]['promo_id']); $doc_l = $docS->allyeardocS1($promo_id[0]['promo_id']); } } else { if ($level == 1 || $level == 2) { $cours_l = $cours->CoursListProfS2($userid); $doc_l = $docS->allyeardocProfS2($userid); } else { $promo_id = $promo->user_promo_id($userid); $cours_l = $cours->CoursListPS2($promo_id[0]['promo_id']); $doc_l = $docS->allyeardocS2($promo_id[0]['promo_id']); }
<?php require_once "conf/top.php"; include_once "models/class.DocShared.php"; if (isset($_REQUEST['submit'])) { if (isset($_REQUEST['doc']) && isset($_REQUEST['cour'])) { $doc_id = $_REQUEST['doc']; $cour_id = $_REQUEST['cour']; $doc = new DocShared(); $doc->new_doc_in_cour(0, $doc_id, $cour_id); $session->redirect('mes_cours.php'); } else { $session->redirect('index.php'); } }
<?php require_once "conf/top.php"; //$user = new User($_SESSION['user_session']); include_once 'models/class.Droit.php'; include_once 'models/class.DocShared.php'; $dic = new DocShared(); $doc_list = $dic->alluserdoc($userid); echo $twig->render("index.html.twig", array("doc_l" => $doc_list));