コード例 #1
0
ファイル: NiveauCpt.php プロジェクト: roger-jb/edeip
header('content-type: text/html; charset=utf-8');
session_start();
require_once '../Require/Objects.php';
$utilisateur = new Utilisateur();
if (isset($_SESSION['id'])) {
    $utilisateur = Utilisateur::getById($_SESSION['id']);
    if (!$utilisateur->estAdministrateur()) {
        header('location: ../Intranet/mesInformations.php');
    }
} else {
    header('location: ../Intranet/connexion.php');
}
if (isset($_POST['btSubmit'])) {
    $niveauCpt = new NiveauCpt();
    if (!empty($_POST['idNiveauCpt']))
        $niveauCpt = NiveauCpt::getById($_POST['idNiveauCpt']);

    if (!empty(trim($_POST['libelleNiveauCpt'])))
        $niveauCpt->setLibelleNiveauCpt($_POST['libelleNiveauCpt']);
    if (!empty(trim($_POST['codeNiveauCpt'])))
        $niveauCpt->setCodeNiveauCpt($_POST['codeNiveauCpt']);
    if (!empty(trim($niveauCpt->getLibelleNiveauCpt())))
        if (empty($niveauCpt->getIdNiveauCpt())) {
            if (!empty(trim($niveauCpt->getLibelleNiveauCpt())))
                $niveauCpt->insert();
        } else
            $niveauCpt->update();
}
?>
<!DOCTYPE html>
<html>
コード例 #2
0
ファイル: getById.php プロジェクト: roger-jb/edeip

switch ($_GET['action']) {
	case 'CarnetLiaison' :
		echo json_encode(CarnetLiaison::getById($_GET['idCarnetLiaison'])->toArray());
		break;
	case 'Evaluation':
		echo json_encode(Evaluation::getById($_GET['idEvaluation'])->toArray());
		break;
    case 'Matiere' :
        echo json_encode(Matiere::getById($_GET['idMatiere'])->toArray());
        break;
    case 'Module' :
        echo json_encode(Module::getById($_GET['idModule'])->toArray());
        break;
    case 'Niveau' :
        echo json_encode(Niveau::getById($_GET['idNiveau'])->toArray());
        break;
    case 'NiveauCpt' :
        echo json_encode(NiveauCpt::getById($_GET['idNiveauCpt'])->toArray());
        break;
	case 'Periode':
		echo json_encode(Periode::getById($_GET['idPeriode'])->toArray());
		break;
	case 'Trimestre':
		echo json_encode(Trimestre::getById($_GET['idTrimestre'])->toArray());
		break;
    case 'Utilisateur' :
        echo json_encode(Utilisateur::getById($_GET['idUtilisateur'])->toArray());
        break;
}
コード例 #3
0
			<td>A : <?php 
echo NiveauCpt::getById(1)->getLibelleNiveauCpt();
?>
</td>
			<td>B : <?php 
echo NiveauCpt::getById(2)->getLibelleNiveauCpt();
?>
</td>
		</tr>
		<tr>
			<td>C : <?php 
echo NiveauCpt::getById(3)->getLibelleNiveauCpt();
?>
</td>
			<td>D : <?php 
echo NiveauCpt::getById(4)->getLibelleNiveauCpt();
?>
</td>
		</tr>
	</table>
	<br>
	<br>
	<table cellspacing="0" style="width: 100%; margin: 0; padding: 0;" class="tableau">
		<col style="width: 10mm"> <!-- Culture -->
		<col style="width: 5mm"> <!-- SousCulture -->
		<col style="width: 5mm"> <!-- Matiere -->
		<col style="width: 5mm"> <!-- Domaine -->
		<col style="width: 90mm"> <!-- Point Cpt -->
		<col style="width: 15mm"> <!-- A -->
		<col style="width: 15mm"> <!-- B -->
		<col style="width: 15mm"> <!-- C -->
コード例 #4
0
ファイル: Evaluation.php プロジェクト: roger-jb/edeip
					$oldNote->setIdEvaluation($evaluation->getIdEvaluation());
					$oldNote->insert();
				}
			}
			echo json_encode($oldNote->toArray());
			break;
		case 'modifCpt':
			//idEval: idEval, idEleve: idEleve, idPointCpt: idPointCpt, nivCpt: nivCpt, action: 'modifCpt'
			$evaluation = Evaluation::getById($_GET['idEval']);
			$eleve = Eleve::getById($_GET['idEleve']);
			$laCpt = EleveEvaluationPointCpt::getById($eleve->getIdEleve(), EvaluationPointCpt::getByEvalPoint($evaluation->getIdEvaluation(), $_GET['idPointCpt'])->getIdEvaluationPointCpt());
			if ($_GET['nivCpt'] == ''){
				$laCpt->delete();
			}
			else{
				$nivCpt = NiveauCpt::getById($_GET['nivCpt']);
				$laCpt->setIdNiveauCpt($nivCpt->getIdNiveauCpt());
				if ($laCpt->getIdEvaluationPointCpt() != ''){
					$laCpt->update();
				}
				else {
					$laCpt->setIdEleve($eleve->getIdEleve());
					$laCpt->setIdEvaluationPointCpt(EvaluationPointCpt::getByEvalPoint($evaluation->getIdEvaluation(), $_GET['idPointCpt'])->getIdEvaluationPointCpt());
					$laCpt->insert();
				}
			}
			echo json_encode($laCpt->toArray());
			break;

		case 'getListeEleveNoteByEval':
			//idEval: idEval, action: 'getListeEleveNoteByEval'
コード例 #5
0
	public function getNiveauCpt(){
		return NiveauCpt::getById($this->getIdNiveauCpt());
	}