0 ? show_mail_form() : send_mail_form(); } else { $out = show_mail_form(); } $out_body .= content_box('product', false, $out).'
'; /* odeslani mailu */ function send_mail_form() { global $lang, $msg; $header = "MIME-Version: 1.0\n"; $header .= "Content-type: text/plain; charset=UTF-8\n"; $header .= "X-Priority: 1\n"; $header .= "X-MSMail-Priority: High\n"; $header .= "X-Mailer: php\n"; $header .= "From: {$_POST['mail_from']} <{$_POST['mail_mail']}>\n"; $pad = 18; $subject = $_POST['mail_name']; $body = str_pad('Předmět:', $pad + 2) . $_POST['mail_name']."\n"; $body .= str_pad('Odesilatel: ', $pad) . $_POST['mail_from'].' <'.$_POST['mail_mail'].">\n"; $body .= $_POST['mail_mobil'] ? str_pad($lang['mail_mobil'] . ':', $pad) . $_POST['mail_mobil'] . "\n" : ''; $body .= $_POST['mail_telefon'] ? str_pad($lang['mail_telefon'] . ':', $pad) . $_POST['mail_telefon'] . "\n" : ''; $body .= "\n" . $_POST['mail_text']; # echo '
' . $header.'
-----------
'.$subject.'
-----------
'.$body.'
-----------
' . '
'; return; if ( mail('info@active-holiday.cz', $subject, $body, $header) ) { $out .= '
'; $out .= $lang['mail_sended'] . '

'; $out .= a_link($lang['mail_back'], $_SERVER['PHP_SELF']); $out .= '
'; } else { $msg[] = $lang['mail_err_send']; $out = show_mail_form(); } return $out; } /* text ke kontaktum */ function text_show() { global $conf_basedir, $msg; $sql = "SELECT c_content, c_header, c_header_show, c_photo, c_photo_side, p_x_big, p_y_big, p_alt FROM c_content `c` LEFT JOIN c_content_lng `l` ON `c`.c_id=`l`.c_id AND lng_id={$_SESSION['lng']} LEFT JOIN c_gallery `g` ON `g`.p_id=c_photo LEFT JOIN c_gallery_lng `gl` ON `gl`.p_id=c_photo AND p_lng={$_SESSION['lng']} WHERE c_descr='napiste' ORDER BY c_order"; $result = MSQ_utf($sql); while( $row = mysql_fetch_assoc($result) ) { $content .= str_replace(array(' a ', ' v ', ' s ', ' u ', ' o '), array(' a ', ' v ', ' s ', ' u ', ' o '), $row['c_content'])."

\n"; $out_body .= content_box( ( $i++ ? 'product' : 'big' ) , ( $row['c_header_show'] ? $row['c_header'] : '' ) , $content , $link , ( $row['c_photo'] ? sprintf( '%s' , $conf_basedir , $row['c_photo'] , $row['p_x_big'] , $row['p_y_big'] , 0 , $row['p_alt'] ) : false ) ); } return $out_body; } /* mailovy formular */ function show_mail_form() { global $lang, $msg, $conf_basedir; if ( count($msg) > 0 ) { $out = '
'; $out .= implode('
', $msg).'

'; $out .= '
'; } $out .= form_start('post', $conf_basedir . '/poptavka.html'); $out .= table_start(0, 1, 0); $out .= table_tr(false, array('d', 'd'), array( $lang['mail_od'].':', form_input('text', 'txt w150', 'mail_from', $_POST['mail_from']) ), array('c#mail-label', false) ); $out .= table_tr(false, array('d', 'd'), array( $lang['mail_mobil'].':', form_input('text', 'txt w150', 'mail_mobil', $_POST['mail_mobil'], 'maxlength="17"') ), array('c#mail-label', false) ); $out .= table_tr(false, array('d', 'd'), array( $lang['mail_telefon'].':', form_input('text', 'txt w150', 'mail_telefon', $_POST['mail_telefon'], 'maxlength="17"') ), array('c#mail-label', false) ); $out .= table_tr(false, array('d', 'd'), array( $lang['mail_mail'].':', form_input('text', 'txt w150', 'mail_mail', $_POST['mail_mail']) ), array('c#mail-label', false) ); $out .= table_tr(false, array('d', 'd'), array( $lang['mail_predmet'].':', form_input('text', 'txt w150', 'mail_name', $_POST['mail_name']) ), array('c#mail-label', false) ); $out .= table_tr(false, array('d', 'd'), array( $lang['mail_text'].':', form_textarea('txt', 'mail_text', 5, $_POST['mail_text']) ), array('c#mail-label^v#top', false) ); $out .= table_tr(false, array('d', 'd'), array( '
', form_input('submit', 'submit', 'submit', $lang['mail_odeslat']) ), array('c#mail-label^v#top', false) ); $out .= table_end(); $out .= form_end(); return $out; } require '../../../system/page_start.php'; // hlavicka stranky require '../../../system/page_body.php'; // telo stranky require '../../../system/page_end.php'; // paticka stranky vcetne uzavreni spojeni s databazi ?>