<?php session_start();
/*--------------WebSite Title-------------------*/

$site = 'http://www.nepalticketing.com';

/*--------------Admin Email-------------------*/

$ccemail = 'info@nepalticketing.com';


/*------------DO NOT EDIT AFTER THIS LINE--------------*/
/*-----------------------------------------------
*  Copyright notice Tell A Friend 2.1.
*
*  (c) 2011 Predrag Rukavina - admin[at]phpform[dot]net
*  All rights reserved
*
*  This script is part of the Tell A Friend 2.1. project. 
*  The Tell A Friend 2.1. project is free software; you can redistribute it and/or
*  modify it under the terms of the GNU General Public License
*  as published by the Free Software Foundation; either version 2
*  of the License, or (at your option) any later version.
*
*  This program is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*  GNU General Public License for more details.
*
*  You should have received a copy of the GNU General Public License
*  along with this program; if not, write to the Free Software
*  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
*  MA  02110-1301, USA.
*
*  This copyright notice MUST appear in all copies of the script!
------------------------------------------------*/
if(isset($_POST['submit']))
{

$time = date ("h:i A"); 
$date = date ("l, F jS, Y");
$IP = $_SERVER['REMOTE_ADDR'];
$to = $_POST['to'];
$say = $_POST['say'];
$from = $_POST['from'];
$asty = $_POST['asty'];
$msg = $_POST['msg'];
$zigi = $_POST['zigi'];
$name=array($to,$say,$from,$msg,check);
foreach ($name as $name) 
{
if (preg_match("/%/", $name)) {
            echo "<center><span style=\"background:#FFF1A8;font-family:verdana;font-size:12px;\">Invalid Characters \"%\". Please <a href=\"javascript:history.go(-1)\">try again</a></div>";
            Die();
        }
        if (preg_match("/;/", $name)) {
            echo "<center><span style=\"background:#FFF1A8;font-family:verdana;font-size:12px;\">Invalid Characters \";\". Please <a href=\"javascript:history.go(-1)\">try again</a></div>";
            Die();
        }
        if (preg_match("/</", $name)) {
            echo "<center><span style=\"background:#FFF1A8;font-family:verdana;font-size:12px;\">Invalid Characters \"<\" HTML is not allowed. Please <a href=\"javascript:history.go(-1)\">try again</a>";
            Die();
        }
        if (preg_match("/\\[/", $name)) {
            echo "<center><span style=\"background:#FFF1A8;font-family:verdana;font-size:12px;\">Invalid Characters \"[\" BB code is not allowed. Please <a href=\"javascript:history.go(-1)\">try again</a>";
            Die();
        }

if (strlen($name) < 2) {
        echo "<center><span style=\"background:#FFF1A8;font-family:verdana;font-size:12px;\">Field must be at least 2 characters long. Please <a href=\"javascript:history.go(-1)\">try again</a>
</center>";
        die();
    }
    if (strlen($name) > 400) {
        echo "<center><span style=\"background:#FFF1A8;font-family:verdana;font-size:12px;\">Max Characters Field: 400. Please <a href=\"javascript:history.go(-1)\">try again</a>
</center>";
        die();
    }
}
if(($_POST['check']) == $_SESSION['check']) { 
//echo"<center><font size=\"1\" face=\"tahoma\" color=\"black\">Thank You";
}else{
 echo "<center><span style=\"background:#FFF1A8;font-family:verdana;font-size:12px;\">Wrong Security Text. Please <a href=\"javascript:history.go(-1)\">try again</a>
 </center>";
die();      
}
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
$headers .= "From: $say" . "\r\n";
$bodys = "
<head>
<style>
#content{
align:center;
padding:4px;
margin:0px auto;
background:#fff;
border:1px dotted #f8f8f8;
width:733px;
font-family;tahoma;
color:#222;
}
</style>
</head>
<div id = 'content'>
<font color=\"#0E89D8\">
<h2>Hi, $from, $date, $time</h2>
</font>
Take a minute and check out this website that I think you will enjoy.<br>Message: $msg<br><br>
<a href=$asty><font color=\"#0E89D8\">$asty</font></a>,    
<a href=mailto:$say><font color=\"#0E89D8\">Reply to a Message</a>.</font><br>
<br><br>
Sender IP Address: $IP<br>
";
$subject = "Message from $zigi";
mail($to, $subject, $bodys, $headers);
$date = date ("l, F jS, Y"); 
$time = date ("h:i A");
$subject = "Info";
$bodys = "Message:\n$msg\nTell a Friend\n $date at\n $time.\n From IP Address.$IP \n From E Address\n$say\nTo E Address\n $to. \nUrl.\n $site "; 
$IP = $_SERVER['REMOTE_ADDR'];
mail($ccemail, $subject, $bodys, $headers);
echo "<center><p><font style=\"font-size:13px;font-family:'trebuchet ms'\">Thank you! Your email has been sent to  $from.  <a href=\"index.php\">Back to Homepage</a></font></p>";
//session_destroy();
//session_unset();
}else{
$asty  = $_GET['id'];

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Tell to Friends about Nepal Ticketing</title>
<meta name="description" content="Real Adventure Nepal offers Nepal Flight Booking, Nepal Ticketing, Domestic Ticket Reserve, Helicopter Charter Flight, Bus Ticket, Nepal Tour Package, Kathmandu Air Tickets, International Flight in Nepal, Nepal Flight Information, Tour to Kathmandu, Kathamndu Pokhara Flight, Lukla Ticket Booking, Nepal E Ticket Booking" />
<meta name="keywords" content="Nepal Flight Booking, Nepal Ticketing, Domestic Ticket Reserve, Helicopter Charter Flight, Bus Ticket, Nepal Tour Package, Kathmandu Air Tickets, International Flight in Nepal, Nepal Flight Information, Tour to Kathmandu, Kathamndu Pokhara Flight, Lukla Ticket Booking, Nepal E Ticket Booking " />
<meta name="abstract" content="Nepal Flight Booking, Nepal Ticketing" />
<META NAME="distribution" content="Global" />
<meta name="revisit-after" content="5 Days" />
<meta name="document-type" content="web page" />
<meta name="resource-type" content="document" />
<meta name="author" content="Real Adventure Nepal - info@nepalticketing.com" />
<meta name="classification" content="Tour Operator" />
<meta name="category" content="Tour Operator" />
<meta name="copyright" content="nepalticketing.com" />
<link rel="stylesheet" type="text/css" media="screen" href="style/style.css" />
<link rel="stylesheet" type="text/css" media="screen" href="style/menu.css" />
<script language="javascript" type="text/javascript" src="js/image.js"></script>

</head>
<body>


<div id="headerwrap">
<div id="header">
<div id="header-in">

<!-- Logo bar -->
<div id="logo-bar">

<?php include ("includes/header.php"); ?>

</div>
<!-- Logo bar end -->
<!-- Main Menu -->
<div id="top-menu-bar">
<?php include ("includes/top-menu.php"); ?>
</div>
<!-- Main menu end -->

</div>
</div>
</div>
<!-- Header End -->
<!--- Body  -->
<div id="bodywrap">
<div id="body">
<div id="body-in">



<!-- Left column -->
<div id="leftcolumn">
<!-- Main Text box -->
<div id="topbox">
<h1> Tell to Friends</h1>

<p>Tell about our website to your friends. </p>
<div style="padding-left: 30px;">
<form name="myform" action="tell-a-friend.php" method="POST" onSubmit="return validationEmail(this)">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
    <td width="29%"><strong>Friends Name</strong></td>
    <td width="71%"><input type=text style="font-size: 13px; font-family:'trebuchet ms', tahoma, arial; font-weight: bold; color: #336699; BORDER: #ccc 1px dotted ; BACKGROUND-COLOR: #F8F8F8" name="from" size="25"></td>
  </tr>
  <tr>
    <td><strong>Friends E-mail</strong></td>
    <td><input type=text style="font-size: 13px; font-family:'trebuchet ms', tahoma, arial; font-weight: bold; color: #336699; BORDER: #ccc 1px dotted ; BACKGROUND-COLOR: #F8F8F8" name="to" size="25"></td>
  </tr>
  <tr>
    <td><strong>Your E-mail</strong></td>
    <td><input type=text style="font-size: 13px; font-family:'trebuchet ms', tahoma, arial; font-weight: bold; color: #336699; BORDER: #ccc 1px dotted ; BACKGROUND-COLOR: #F8F8F8" name="say" size="25"></td>
  </tr>
  <tr>
    <td><strong>Your Name</strong></td>
    <td><input type=text style="font-size: 13px; font-family:'trebuchet ms', tahoma, arial; font-weight: bold; color: #336699; BORDER: #ccc 1px dotted ; BACKGROUND-COLOR: #F8F8F8" name="zigi" size="25"></td>
  </tr>
  <tr>
    <td><strong>Your Message</strong></td>
    <td><textarea cols="25" rows="4" type=text style="font-size: 13px; font-family:'trebuchet ms', tahoma, arial; font-weight: bold; color: #336699; BORDER: #ccc 1px dotted ; BACKGROUND-COLOR: #F8F8F8" name="msg" size="25"></textarea></td>
  </tr>
  <tr>
    <td><i style="font-family:'trebuchet ms';font-size:12px;"><strong>Please enter security code</strong></i></td>
    <td><input type="hidden" value="<?php echo $asty  ?>" name="asty">

<img src="captcha.php" border="0" title="Please insert Captcha Code"><br>
<input type="text" style="font-size: 13px; font-family:'trebuchet ms', tahoma, arial; font-weight: bold; color: #336699; BORDER: #ccc 1px dotted ; BACKGROUND-COLOR: #F8F8F8" name="check" size="25"></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><div style="padding-top: 5px">
<input name="submit" type="submit" value="Submit" style="font-family:'trebuchet ms';
font-size:13px; font-weight:bold; font-style:none; border-style:dotted; 
border-color:#fff; border-width:1px; background:#52AEE8; color:#FFFFFF; width:8em">
<input type="reset" value="Reset" style="font-family:'trebuchet ms';
font-size:13px; font-weight:bold; font-style:none; border-style:dotted;
border-color:#fff; border-width:1px; background:#52AEE8; color:#FFFFFF; width:8em">
</div></td>
  </tr>
    </table>



</form></div>


</div>
<!-- main Text box end -->


  
</div>
<!-- Left column end -->

<!-- Right column -->
<div id="rightcolumn">



<!-- Flight boox box end -->

<?php include ("includes/intl-air1.php"); ?>


  </div>
  <!-- Right column end -->
  
 

</div>
</div>
</div>
<!-- Body end -->

<!-- Footer -->
<div id="footerwrap">
<div id="footer">
<div id="footer-in">
<!-- Footer menu -->
<div id="fmenu-bar">
<?php include ("includes/f-menu.php"); ?>
</div>
<!-- Footer menu end -->

<!-- Copyright bar -->
<div id="copyright-bar">

<?php include ("includes/footer.php"); ?>

</div>
<!-- Copyrihgt bar end -->

</div>
</div>
</div>
<!-- Footer end -->



</body>
</html>
<?php } ?>