"; $nname = ""; $sidebarLeft = ""; $sidebarRight = ""; $maincontent = ""; $contactTxt = ""; $name = ""; $email = ""; $tel = ""; $comments = ""; $frmout2 = ""; if (isset($_POST['submit'])) { $frm_errors = 0; $name = addslashes(trim($_POST['name'])); if ($name == "") { $frm_errors++; } $email = addslashes(trim($_POST['email'])); if ($email == "") { $frm_errors++; } $tel = addslashes(trim($_POST['tel'])); if ($tel == "") { $frm_errors++; } $comments = addslashes(trim($_POST['comments'])); if ($comments == "") { $frm_errors++; } $ccode = strtolower(trim($_POST['ccode'])); if ($ccode == "" or $ccode != $_SESSION['captchacode']) { $frm_errors++; } $regex = "/^[_+a-z0-9-]+(\.[_+a-z0-9-]+)*" ."@[a-z0-9-]+(\.[a-z0-9-]{1,})*" ."\.([a-z]{2,}){1}$/"; if(!preg_match($regex,$email)) { $frm_errors++; } if ($frm_errors == 0) { $body = ""; $body .= "Name: ".$name."\n"; $body .= "Email: ".$email."\n"; $body .= "Phone: ".$tel."\n"; $body .= "Comments: ".$comments."\n"; require_once "includes/lib/swift_required.php"; // $connection1 = Swift_SmtpTransport::newInstance("localhost", 25); // $connection1 = Swift_SmtpTransport::newInstance('smtp.example.org', 587, 'ssl'); $connection1 = Swift_SmtpTransport::newInstance('smtp.celestial-communications.de', 25) ->setUsername('m025cb08') ->setPassword('Ex8J4kqmaSdSM6nd'); // ; $swift = Swift_Mailer::newInstance($connection1); $message = Swift_Message::newInstance() ->setCharset('utf-8'); $message->setFrom(array('test@celestial-communications.de' => 'celestial webmaster')); $message->setSubject("Navarino contact form"); $message->setBody($body, "text/plain", 'utf-8'); // $message->setTo(array('info@celestial-communications.de' => 'celestial')); $message->setTo(array('info@celestial-communications.de' => 'Celestial')); //Send the message $result = $swift->send($message); if ($result) { $mailsent = 1; $frmout = CONTACT_RESULT_1; } else { $mailsent = 0; $frmout = CONTACT_RESULT_0; } } else { $frmout2 = CONTACT_RESULT_NODATA; } } $_SESSION['captchacode'] = captchacode(); if (!isset($frmout)) $frmout = "
Name:
Phone:
Email:
Comments:
\"\"
".$frmout2."
"; /* ============= slideshow layout ============= */ $res2 = mysql_query("select * from pages where id=1"); while ($row2 = mysql_fetch_array ($res2)) { $contactTxt = stripslashes($row2['description']); if ($row2['slideshow_type'] == 1 and $row2['gallery_id']>0) { // background slideshow $x = 1; $htmlimg = ""; $jsimg = ""; $htmlbull = ""; $res2 = mysql_query("select * from photos where gallery_id='".$row2['gallery_id']."' order by id asc"); while ($prow = mysql_fetch_array($res2)) { $htmlimg .= "
\n"; $jsimg .= " { \"title\" : \"img ".$prow['id']."\", \"image\" : \"".SITE_URL."galleriesimg/".$prow['image1']."\", \"firstline\" : \"".str_replace(array("\r\n", "'"), array("\\\r\n", "\'"), stripslashes($prow['name']))."\" },"; $htmlbull .= "\"".$x."\"\n"; $x++; } $__content__ .= " "; $ssHtml = "
".$htmlimg."
".$htmlbull."
"; } else if ($row2['slideshow_type'] == 2 and $row2['gallery_id']>0) { //ImageFlow $x = 1; $htmlimg = ""; $jsimg = ""; $htmlbull = ""; $res2 = mysql_query("select * from photos where gallery_id='".$row2['gallery_id']."' order by id asc"); while ($prow = mysql_fetch_array($res2)) { $htmlimg .= "\"".strip_tags(stripslashes($prow['name']))."\"\n"; //gia home width=\"120\" height=\"80\" $x++; } $ssHtml = "
".$htmlimg."
"; $__content__ .= " "; } else if ($row2['slideshow_type'] == 3) { // html $ssHtml = "
".stripslashes($row2['htmlcode'])."
"; } else if ($row2['slideshow_type'] == 4 and $row2['banner_id']>0) { // banner $res3 = mysql_query("select * from banners where id='".$row2['banner_id']."'"); while ($brow = mysql_fetch_array($res3)) { if ($brow['linkurl1'] != "") { $ssHtml = "
\"\"
"; } else { $ssHtml = "
\"\"
"; } } } else { $ssHtml = "
"; } } /* ============= - ============= */ //$sidebarLeft = $categories->get_parent_sidebar(1); $sidebarLeft = " "; $sidebarRight = "
Share

\"Share \"Share

"; $sidebarRight .= $sidebarsearch; $__content__ .= "
".$sidebarLeft."

Contact us

For information contact us on the following address
".$contactTxt."
You can send your comments using the following form:
".$frmout."
".$sidebarRight."
"; $ttemplate = $template; $ttemplate = str_replace("_____SLIDESHOW_____", $ssHtml, $ttemplate); $ttemplate = str_replace("_____SITE_TITLE_____", "Contact us".SITE_TITLE, $ttemplate); $ttemplate = str_replace("_____CONTENT_____", $__content__, $ttemplate); echo $ttemplate; ?>