Dodano wysyłanie kopii wiadomości kontaktowych na adres k.zarzyczny@vidok.com

This commit is contained in:
2025-07-29 12:10:44 +02:00
parent 06e22713fd
commit e81f680771
2 changed files with 19 additions and 9 deletions

View File

@@ -85,16 +85,18 @@ if ( \S::get( 'a' ) == 'contact_form' )
\S::get( 'email' ) \S::get( 'email' )
) ) ) )
{ {
$mdb -> insert( 'pp_contact_emails', [ // send email to k.zarzyczny@vidok.com
'email' => \S::get( 'email' ), \S::send_email( 'k.zarzyczny@vidok.com', \S::get( 'subject' ), '<p>Nr telefonu: ' . \S::get( 'phone' ) . '</p>' . '<p>Email: ' . \S::get( 'email' ) . '</p>' . '<p>' . \S::get( 'text' ) . '</p>', \S::get( 'email' ) );
'phone' => \S::get('phone' ), $mdb -> insert( 'pp_contact_emails', [
'title' => \S::get( 'subject' ), 'email' => \S::get( 'email' ),
'mail' => \S::get( 'text' ), 'phone' => \S::get('phone' ),
'add_date' => date("Y-m-d, H:i") 'title' => \S::get( 'subject' ),
]); 'mail' => \S::get( 'text' ),
'add_date' => date("Y-m-d, H:i")
]);
$response = [ 'status' => 'ok' ]; $response = [ 'status' => 'ok' ];
} }
} }
echo json_encode( $response ); echo json_encode( $response );
exit; exit;

View File

@@ -111,6 +111,8 @@ if ( \S::get( 'action' ) == 'send-contact' and \S::get( 'token' ) == \S::get_ses
if ( \S::send_email( 'marketing@vidok.com', 'Wiadomość ze strony vidok.com', $text, \S::get('email'), $files_to_send ) ) if ( \S::send_email( 'marketing@vidok.com', 'Wiadomość ze strony vidok.com', $text, \S::get('email'), $files_to_send ) )
{ {
// send copy to k.zarzyczny@vidok.com
\S::send_email( 'k.zarzyczny@vidok.com', 'Wiadomość ze strony vidok.com', $text, \S::get('email'), $files_to_send );
\S::alert( \S::lang( 'wiadomosc-zostala-wyslana' ) ); \S::alert( \S::lang( 'wiadomosc-zostala-wyslana' ) );
} }
else else
@@ -205,6 +207,8 @@ if ( \S::get('action') == 'send-contact-modal' and \S::get( 'token' ) == \S::get
if ( \S::send_email( 'marketing@vidok.com', 'Wiadomość ze strony vidok.com', $text, \S::get('email'), $files_to_send ) ) if ( \S::send_email( 'marketing@vidok.com', 'Wiadomość ze strony vidok.com', $text, \S::get('email'), $files_to_send ) )
{ {
// send copy to k.zarzyczny@vidok.com
\S::send_email( 'k.zarzyczny@vidok.com', 'Wiadomość ze strony vidok.com', $text, \S::get('email'), $files_to_send );
\S::alert( \S::lang('wiadomosc-zostala-wyslana' ) ); \S::alert( \S::lang('wiadomosc-zostala-wyslana' ) );
header('Location: ' . $_SERVER['REQUEST_URI'] . '?modal_form_sent=1'); header('Location: ' . $_SERVER['REQUEST_URI'] . '?modal_form_sent=1');
} }
@@ -344,6 +348,8 @@ if ( \S::get('action') == 'send-contact-landing' and \S::get( 'token' ) == \S::g
if ( \S::send_email( 'marketing@vidok.com', 'Wiadomość ze strony vidok.com', $text, \S::get('email'), $files_to_send ) ) if ( \S::send_email( 'marketing@vidok.com', 'Wiadomość ze strony vidok.com', $text, \S::get('email'), $files_to_send ) )
{ {
// send copy to k.zarzyczny@vidok.com
\S::send_email( 'k.zarzyczny@vidok.com', 'Wiadomość ze strony vidok.com', $text, \S::get('email'), $files_to_send );
\S::alert( \S::lang('wiadomosc-zostala-wyslana' ) ); \S::alert( \S::lang('wiadomosc-zostala-wyslana' ) );
} }
else{ else{
@@ -436,6 +442,8 @@ if ( \S::get('action') == 'send-contact-form-new' and \S::get( 'token' ) == \S::
if ( \S::send_email( 'marketing@vidok.com', 'Wiadomość ze strony vidok.com', $text, \S::get('email'), $files_to_send ) ) if ( \S::send_email( 'marketing@vidok.com', 'Wiadomość ze strony vidok.com', $text, \S::get('email'), $files_to_send ) )
{ {
// send copy to k.zarzyczny@vidok.com
\S::send_email( 'k.zarzyczny@vidok.com', 'Wiadomość ze strony vidok.com', $text, \S::get('email'), $files_to_send );
\S::alert( \S::lang('wiadomosc-zostala-wyslana' ) ); \S::alert( \S::lang('wiadomosc-zostala-wyslana' ) );
header('Location: ' . $_SERVER['REQUEST_URI'] . '?form_sent=1'); header('Location: ' . $_SERVER['REQUEST_URI'] . '?form_sent=1');
exit; exit;