diff --git a/ajax.php b/ajax.php index 78caebb..489207d 100644 --- a/ajax.php +++ b/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' ), '

Nr telefonu: ' . \S::get( 'phone' ) . '

' . '

Email: ' . \S::get( 'email' ) . '

' . '

' . \S::get( 'text' ) . '

', \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; diff --git a/plugins/special-actions-middle.php b/plugins/special-actions-middle.php index 38a0603..7ed4080 100644 --- a/plugins/special-actions-middle.php +++ b/plugins/special-actions-middle.php @@ -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;