</p>
			
				<p><?php 
            echo $i->descEntreprise;
            ?>
</p>
				<h3 align="center">les prestations de <?php 
            echo $i->nomEntreprise;
            ?>
 :</h3>
							<table>
							<tr><td>Description</td><td>Prix</td><td>Payable Paypal</td><td>Durée</td></tr>
							<?php 
            if ($prest != null) {
                while ($unePrest = $prest->fetch(PDO::FETCH_OBJ)) {
                    $unePresta = infosPrestation($unePrest->id_presta);
                    echo "<tr><td>{$unePresta->descriptif_presta}</td>\r\n\t\t\t\t\t\t\t\t\t\t\t  <td>{$unePresta->cout} €</td>\r\n\t\t\t\t\t\t\t\t\t\t\t  <td>";
                    if ($unePresta->paypal >= 1) {
                        echo "oui";
                    } else {
                        echo "non";
                    }
                    echo "</td>\r\n\t\t\t\t\t\t\t\t\t\t  <td>{$unePresta->duree} min</td></tr>";
                }
            }
        }
    }
}
//	}
?>
							</table>
Beispiel #2
0
             $_SESSION["nomSession"] = $_GET['nomEntreprise'];
         }
     }
 }
 $erreur = 0;
 if (isset($_POST['continue'])) {
     if (!empty($_POST['daterdv']) && !empty($_POST['heurerdv'])) {
         $days = array('Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi');
         $jn = $days[date('w', strtotime($_POST['daterdv']))];
         if ($_POST['daterdv'] < date('Y-m-d')) {
             $erreur = 1;
         } else {
             if ($jn != 'Dimanche') {
                 $dureeRes = 0;
                 foreach ($_SESSION['prestListe'] as $val) {
                     $info = infosPrestation($val);
                     $dureeRes = $dureeRes + $info->duree;
                 }
                 $emp = employeOk($_SESSION['prestListe']);
                 $employe = employeReserv($_POST['daterdv'], $jn, $_POST['heurerdv'], $emp, $dureeRes);
                 $valeurFaux = array(1, 2, 3, 4);
                 if (!in_array($employe, $valeurFaux)) {
                     $_SESSION["date"] = $_POST['daterdv'];
                     $_SESSION["heure"] = $_POST['heurerdv'];
                     $_SESSION["employeRes"] = $employe;
                     header('Location: resume_reserv.php?nomEntreprise=' . $nomE);
                 }
             } else {
                 $erreur = 3;
             }
         }
            } else {
                $connexion = connect();
                $nomE = $_SESSION["nomSession"];
                $id = $_GET['id_presta'];
                if (isset($_POST['modif'])) {
                    $paypal = isset($_POST['paypal']) ? 1 : 0;
                    //Permet de modifier une prestation
                    majPresta($connexion, $_POST['descrip'], $_POST['cout'], $_POST['duree'], $_POST['categorie'], $paypal, $id);
                    if (isset($_POST['dejaCap'])) {
                        ajouteComp2($connexion, $_POST['dejaCap'], $id);
                    } else {
                        ajouteComp2($connexion, null, $id);
                    }
                }
                $i = infosEntreprise();
                $presta = infosPrestation($id);
                $empComp = listeEmpCapable($id);
                $empNonComp = listeEmpNonCapable($id);
            }
        }
    }
}
?>

<html>
	<head>
		<title>Portail de réservation : BackOffice</title>
		<link rel="stylesheet" href="assets/css/main.css" />
		<SCRIPT LANGUAGE="JavaScript">
			function Deplacer( liste_depart, liste_arrivee ){
		    	for( i = 0; i < liste_depart.options.length; i++ ){