示例#1
0
 function testUnpaid()
 {
     $y = Consultation::unpaid();
     $this->assertType('array', $y);
     $this->assertEquals(1, count($y));
     $z = array_shift($y);
     $this->assertType('Consultation', $z);
     $this->assertEquals(2, $z->id);
 }
示例#2
0
function profil($id)
{
    //On vérifie que le paramètre est bien un ID
    if ($id != null && $id == intval($id) && Consultation::exists($id)) {
        //Gestion du POST
        if (isset($_POST['posted'])) {
        }
        //Inclusion de la page
        $rdv = Consultation::select($id);
        $tabMedecin = Medecin::selectAll();
        $tabPatient = Patient::selectAll();
        $pConsult = Patient::select($rdv['id_patient']);
        $mConsult = Medecin::selectByID($rdv['id_medecin']);
        include VIEW . 'modifierConsultation.php';
    } else {
        unset($_POST);
        //Supprimer le post pour éviter les conflits avec l'autre page
        afficher();
        echo "<p id='mErreur'>Aucune consultation correspondante<p>";
    }
}
示例#3
0
 static function for_teacher($teacher_id)
 {
     return Consultation::for_query(sprintf("SELECT * FROM consultations WHERE id IN (SELECT DISTINCT consultation_id FROM consultations_teachers WHERE teacher_id=%d) ORDER BY id DESC", $teacher_id));
 }
示例#4
0
 function consultations()
 {
     return Consultation::for_teacher($this->id);
 }
示例#5
0
 function consultations()
 {
     return Consultation::for_student($this->id);
 }