function getProjetIntervention(){ include('config/config.inc.php'); $MySQL = new Mysql($cfg['url'], $cfg['user'], $cfg['password'], $cfg['table'],$cfg['lang'],$cfg['verbose']); $MySQL->executionSQL( 'SELECT n_projet, nom_projet, descrip_projet, procedure_projet, YEAR(date_debut_pr) as DebutAAAA,MONTH(date_debut_pr) as DebutMM,dayofmonth(date_debut_pr) as DebutJJ,year(date_fin_pr) as FinAAAA,MONTH(date_fin_pr) as FinMM,dayofmonth(date_fin_pr) as FinJJ,n_statut, n_intervenant' .' FROM projet' .' WHERE projet.n_client = '.$this->getNum() ); echo "\n".'
'."\n"; echo '

Listes des projets et interventions

'."\n"; echo '

'.htmlentities($this->getNom()).'

'; echo '
'; //On encode la classe Client $ClientSerial = serialize($this); $ClientDeSerial = urlencode($ClientSerial); echo 'Informations client'; if($MySQL->nombreResultat(1) > 0) echo "

Liste des interventions avec projet


"; else echo "

Aucun projet

"; echo "\n".''."\n"; echo "
"; $MySQLInterventionRapide = new Mysql($cfg['url'], $cfg['user'], $cfg['password'], $cfg['table'],$cfg['lang'],$cfg['verbose']); //On effectue une sélection d'intervention concernant un client et ayant la valeur NULL dans n_projet $MySQLInterventionRapide->executionSQL( 'SELECT *' .' FROM intervention, statut' .' WHERE intervention.n_client = '.$this->getNum() .' AND intervention.n_statut = statut.n_statut' .' AND n_projet = 0' ); if($MySQLInterventionRapide->nombreResultat(1) > 0) { echo "

Liste des interventions \"rapide\"

"; //On parcours toutes les interventions sans projet for($i=1; $i <= $MySQLInterventionRapide->nombreResultat(1); $i++){ $dataInterventionRapide = $MySQLInterventionRapide->resultat(1); $tmpInterventionRapide = new Intervention($dataInterventionRapide['n_intervention'], $dataInterventionRapide['descrip_intervention'], $dataInterventionRapide['procedure_intervention'], $dataInterventionRapide['prevision_intervention'], $dataInterventionRapide['date_debut'], $dataInterventionRapide['date_fin'], $dataInterventionRapide['n_statut'], $dataInterventionRapide['n_projet'], $this->getNum(), $dataInterventionRapide['n_intervenant']); //On encode la classe Projet $InterventionSerialRapide = serialize($tmpInterventionRapide); $InterventionDeSerialRapide = urlencode($InterventionSerialRapide); echo '
  • '.$tmpInterventionRapide->getDescription().'
  • '."\n"; } }else { echo "

    Aucune intervention \"rapide\"

    "; } }