Любая справка будет оценена < /p>
Пример PHP -кода для сообщения < /p>
Код: Выделить всё
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: Holiday System ' . "\r\n";
$href_path = 'http:\\\\example.com\\rauthpage.php';
$style = 'HUB';
$booking_ref = "8811624894907"; // example
//$authkey = self::mdlProcessAuthenticateKey($booking_ref);
$authkey = 123456789321654987; // example
$subject = 'Mail Module Tester';
$message = '';
$message .= $style;
$message .= '';
$message .= 'Hi Manager,';
$message .= '
A holiday request has been made. please chose one of these
';
$message .= 'ACTIONS:';
$message .= '
Accept
Reject
';
$message .= '';
$to = 'manager@example.com';
if (!is_null($to)) {
mail($to, $subject, $message, $headers);
}
$auth_key = $_GET['rauth'];
$action_code = $_GET['act'];
//valid auth
$valid_auth = HolidayController::ctrCheckRemoteValidiyOfRemoteKey($auth_key);
if ($valid_auth == 0) {
//show message on the screen to say the code invalid or expired
} else {
//Proceed with the booking
// Send a notification to employee and manager
}
< /code>
Первая часть кода PHP генерирует электронную почту, и это
что -то запускает гиперссылки, когда менеджер пользователь будет>
Подробнее здесь: https://stackoverflow.com/questions/796 ... ard-action