本文整理汇总了PHP中MainController::send_email_to_client方法的典型用法代码示例。如果您正苦于以下问题:PHP MainController::send_email_to_client方法的具体用法?PHP MainController::send_email_to_client怎么用?PHP MainController::send_email_to_client使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MainController
的用法示例。
在下文中一共展示了MainController::send_email_to_client方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createResrvationByAdmin
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);
}
}
}