static function createResrvationByAdmin()
 {
     $today = date("Y-m-d");
     $hours_id = $_POST['hours_id'];
     $name = $_POST['name'];
     $tel = $_POST['telefon'];
     $date = $_POST['date'];
     $directionID = $_POST['directionID'];
     $email = $_POST['email'];
     $adminReserve = $_POST['adminReserve'];
     $reserve_type = $_POST['reserve_type'];
     $instructor_id = $_POST['instructor_id'];
     $choosen_places = $_POST['choosen_places'];
     $language = $_POST['language'];
     $directionField = "directions_" . $_POST['language'] . "_id";
     Dispatcher::$mysqli->query("insert into person(`name`, telefone, password, email, `permission`) " . "values('{$name}', '{$tel}', 'admin', '{$email}', 'client')");
     $client_id = Dispatcher::$mysqli->insert_id;
     Dispatcher::$mysqli->query("insert into reservation(`date`, `Person_id`) values ('{$today}', {$client_id})");
     $reservation_id = Dispatcher::$mysqli->insert_id;
     $hoursCursor = Dispatcher::$mysqli->query("select *, reservation_has_hours.{$directionField} as dirID " . "from hours_to_display join reservation_has_hours " . "on hours_to_display.id=reservation_has_hours.hours_id where hours_to_display.id={$hours_id}");
     print_r(Dispatcher::$mysqli->error);
     $hoursRow[0] = $hoursCursor->fetch_assoc();
     $hoursRow[0]['choosen_places'] = $choosen_places;
     $hoursRow[0]['dirID'] = $directionID;
     $hoursRow[0]['hours_id'] = $hours_id;
     MainController::booking_create_reservation_summary($reservation_id, $client_id, $date, $hoursRow, $reserve_type);
     if ($reserve_type == "tourists") {
         MainController::send_email_to_toursit_client($reservation_id, 0);
     } else {
         if ($reserve_type == "slevomat") {
             MainController::send_email_to_client($reservation_id, 1);
         }
     }
 }