ACIL FM
Dark
Refresh
Current DIR:
/home/mhhtmff/app/NH-HR/php/profile
/
home
mhhtmff
app
NH-HR
php
profile
Upload
Zip Selected
Delete Selected
Pilih semua
Nama
Ukuran
Permission
Aksi
change_password.php
352 B
chmod
View
DL
Edit
Rename
Delete
check_verification_code.php
878 B
chmod
View
DL
Edit
Rename
Delete
password_reset_content.php
1.12 MB
chmod
View
DL
Edit
Rename
Delete
profile_content.php
3.09 MB
chmod
View
DL
Edit
Rename
Delete
send_verification_code.php
1.22 MB
chmod
View
DL
Edit
Rename
Delete
Edit file: /home/mhhtmff/app/NH-HR/php/profile/send_verification_code.php
<?php include "../database.php"; require_once '../../plugins/sendgrid/config.php'; require "../../plugins/sendgrid/sendgrid-php.php"; session_start(); $code = rand(1000, 9999); $date = date("Y-m-d H:i:s"); $currentDate = strtotime($date); $futureDate = $currentDate + (60 * 5); $formatDate = date("Y-m-d H:i:s", $futureDate); $sql_insert = "INSERT INTO verification_codes VALUES (NULL,'" . $_SESSION["email"] . "','Password reset'," . $code . ",'" . $formatDate . "')"; if ($con->query($sql_insert) === true) { //Invio mail creatore $email = new \SendGrid\Mail\Mail(); $email->setFrom("info@n-hub.com", "NH-HR"); $email->addTo("" . $_SESSION["email"] . "", "" . $_SESSION["username"] . ""); $email->SetTemplateId("d-4cc102622d9e45f780395130e8e44196"); //Here is the Place holder values you need to replace. $email->addDynamicTemplateData("NHHR_verification_code", "$code"); $email->addDynamicTemplateData("NHHR_code_expiration", "" . date('d/m/Y H:i', strtotime($formatDate)) . ""); $sendgrid = new \SendGrid(SENDGRID_API_KEY); try { $response = $sendgrid->send($email); echo "ok"; } catch (Exception $e) { echo 'Caught exception: ' . $e->getMessage() . "\n"; } } else { echo "error"; }
Simpan
Batal
Isi Zip:
Unzip
Create
Buat Folder
Buat File
Terminal / Execute
Run
Chmod Bulk
All File
All Folder
All File dan Folder
Apply