コード例 #1
0
ファイル: modif_desc.php プロジェクト: Groupe666/Lincs2i
<?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($_REQUEST['id']);
echo $twig->render("modif_desc.html.twig", array("cours" => $cours, "desc" => $cours->getDesc()));
if (isset($_REQUEST['submit'])) {
    if (isset($_REQUEST['desc'])) {
        $db = Database::getInstance();
        $cours->updateDesc($_REQUEST['desc']);
        header('Location: mes_cours.php');
    }
}