コード例 #1
0
<div class="container">
  <?php 
mb_internal_encoding('UTF-8');
mb_http_output('UTF-8');
include 'sunapeedb.php';
$db = new SunapeeDB();
$db->connect();
if ($_SESSION["user_type"] == 1) {
    $db->getFlight($_GET['leaveCity'], $_GET['arriveCity'], $_GET['startDate'], $_GET['endDate']);
    // print("<form action='function.php'>");
    // print("<button class='btn btn-lg' type='submit'>GO BACK TO SEARCH</button>");
    // print("</form>");
} else {
    if ($_SESSION["user_type"] == 2) {
        $db->getEmpFlight($_GET['leaveCity'], $_GET['arriveCity'], $_GET['startDate'], $_GET['endDate']);
        // print("<form action='function.php'>");
        // print("<button class='btn btn-lg' type='submit'>GO BACK TO SEARCH</button>");
        // print("</form>");
    } else {
        // print("<form action='function.php'>");
        // print("<button class='btn btn-lg' type='submit'>GO BACK TO SEARCH</button>");
        // print("</form>");
    }
}
// if($db->isCust($_GET["userName"],$_GET["userPassword"]))
// {a
//   $db->get_table("FLIGHT");
//   $db->disconnect();
// } else {
//   print("<form action='index.html'>");