require '../../../system/config.php'; // nastaveni systemovych promennych pro admin sekci
require '../../../system/db_connect.php'; // pripojeni k databazi
require '../../../system/sessions.php'; // nastartovani session
require '../../../system/functions.php'; // nacteni nadefinovanych funkci
require '../../../system/functions_output.php'; // nacteni nadefinovanych funkci pro vystup
require '../../../system/var_check.php'; // oslashovani promennych v $_POST a $_GET
/* VYKONNA CAST SKRIPTU */
$lang = load_lng_terms($_SESSION['lng']);
/* ZOBRAZOVACI CAST SKRIPTU */
$title = $lang['mt_03'] . ' | ' . $lang['cestovni_agentura'];
$result = MSQ_utf("
SELECT
c_content, c_header, c_header_show, c_photo, c_photo_side, p_x_big, p_y_big, p_alt, p_x_small, p_y_small
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 = 'kontakt'
ORDER BY
c_order
");
while( $row = mysql_fetch_assoc($result) ) {
unset($out, $a_1, $a_2, $a_3, $content, $img, $emails);
$content .= str_replace(
array(' a ', ' v ', ' s ', ' u ', ' o '),
array(' a ', ' v ', ' s ', ' u ', ' o '),
$row['c_content']
) . "
\n";
$tmp = preg_split('/\n/', $content);
$content = '';
foreach ( $tmp as $value ) {
$value = trim($value);
$value = str_replace('
', '', $value);
if ( strpos($value, '@') ) {
$emails[] = '' . $value . '';
}
else {
$content .= $value . '
';
}
}
if ( count($emails) ) {
$content .= '
';
$content .= '
'
, $conf_basedir, $row['c_photo']
, $conf_basedir, $row['c_photo']
, $row['p_x_small']
, $row['p_y_small']
, str_replace('"', """, $row['p_alt'])
);
$out_body .= content_box(
( $i++ ? 'product' : 'big' )
, ( $row['c_header_show'] ? $row['c_header'] : '' )
, $content
, $link
, $row['c_photo'] ? $gallery : false
/*
, ( $row['c_photo']
? sprintf(
'
'
, $conf_basedir
, $row['c_photo']
, $row['p_x_small']
, $row['p_y_small']
, 0
, $row['p_alt']
)
: false
)
*/
);
}
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
?>