Dodano wysyłanie kopii wiadomości kontaktowych na adres k.zarzyczny@vidok.com
This commit is contained in:
20
ajax.php
20
ajax.php
@@ -85,16 +85,18 @@ if ( \S::get( 'a' ) == 'contact_form' )
|
||||
\S::get( 'email' )
|
||||
) )
|
||||
{
|
||||
$mdb -> insert( 'pp_contact_emails', [
|
||||
'email' => \S::get( 'email' ),
|
||||
'phone' => \S::get('phone' ),
|
||||
'title' => \S::get( 'subject' ),
|
||||
'mail' => \S::get( 'text' ),
|
||||
'add_date' => date("Y-m-d, H:i")
|
||||
]);
|
||||
// send email to k.zarzyczny@vidok.com
|
||||
\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' ) );
|
||||
$mdb -> insert( 'pp_contact_emails', [
|
||||
'email' => \S::get( 'email' ),
|
||||
'phone' => \S::get('phone' ),
|
||||
'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 );
|
||||
exit;
|
||||
|
||||
@@ -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 ) )
|
||||
{
|
||||
// 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' ) );
|
||||
}
|
||||
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 ) )
|
||||
{
|
||||
// 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' ) );
|
||||
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 ) )
|
||||
{
|
||||
// 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' ) );
|
||||
}
|
||||
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 ) )
|
||||
{
|
||||
// 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' ) );
|
||||
header('Location: ' . $_SERVER['REQUEST_URI'] . '?form_sent=1');
|
||||
exit;
|
||||
|
||||
Reference in New Issue
Block a user