<?
if ( \S::get( 'a' ) == 'send_contact_form' ) {
  if ( \S::get( 'form_email' ) and \S::get( 'form_phone' ) and \S::get( 'form_message' ) ) {
    if ( \S::send_email(
            $settings['contact_email'],
            \S::get( 'form_topic' ),
            '<p><b>Imię i nazwisko:</b> ' . \S::get( 'form_names' ) . '</p>'
            . '<p><b>Email:</b> ' . \S::get( 'form_email' ) . '</p>'
            . '<p><b>Numer telefonu:</b> ' . \S::get( 'form_phone' ) . '</p>'
            . '<p><b>Usługa:</b> ' . \S::get( 'form_service' ) . '</p>'
            . '<p><b>Budżet:</b> ' . \S::get( 'form_budget' ) . '</p>'
            . '<p><b>Wiadomość:</b> ' . \S::get( 'form_message' ) . '</p>',
            \S::get( 'form_email' )
          ) )
        $response = [ 'status' => 'ok' ];
  }
  echo json_encode( $response );
  exit;
}