<?php
// Pick up the form data and assign it to variables
$sMSG = "";
$succeed=0;
$pback = $_POST['pback'];
$name = $_POST['s_name'];
$organization = $_POST['s_organization'];
$Address1 =  $_POST['s_streetaddress'];
$City =  $_POST['s_city'];
$Country =  $_POST['s_country'];
$Zip = $_POST['s_zip'];
$Phone = $_POST['s_phone'];
$Fax = $_POST['s_fax'];
$email = $_POST['s_email'];
$comments = $_POST['s_description'];
$to = $_POST['recipient'];
$subject=$_POST['subject'];
if ($pback=="0"){
//Validate Data
	if (trim($name)==""){
		$sMSG= "$sMSG Enter your requirement description.<br>";
	}
	if (trim($Phone)==""){
		$Phone= "$sMSG Enter your Phone number.<br>";
	}
	if (trim($email)==""){
		$email= "$sMSG Enter your email.<br>";
	}
	if (trim($comments)==""){
	  $sMSG= "$sMSG Enter your requirement description.<br>";
	}
	
	if ($sMSG== ""){
		if (!check_email_address($email)) {
			$sMSG = "Enter a valid E-mail Address";			
		}		 
	}	
	if ($sMSG== ""){
		$strmsg="<h2>Online query: </h2><br>";
$strmsg = "$strmsg <br><b>Name:</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:$name" ;
$strmsg = "$strmsg <br><b>Organization:</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:$organization";
$strmsg = "$strmsg <br><b>Street Address:</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:$Address1";
$strmsg = "$strmsg <br><b>City:</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:$City";
$strmsg = "$strmsg <br><b>Country:</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:$Country";
$strmsg = "$strmsg <br><b>Zip:</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:$Zip";
$strmsg = "$strmsg <br><b>Phone:</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:$Phone";
$strmsg = "$strmsg <br><b>Fax:</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:$Fax";
$strmsg = "$strmsg <br><b>Email:</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:$email";
$strmsg = "$strmsg <br><b>Description:</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:$comments";
//$header = "From: Shkodenko V. Taras p0dl0m@gmail.com"nContent-Type: text/plain; charset="windows-1251\"\nContent-Transfer-Encoding: 8bit"; 

	//$to =  'talkingimage@gmail.com';
	//$subject = "Online inquiry";
	$headers = "From: $email";
	$headers .= "\nMIME-Version: 1.0\nContent-Type: text/html";

//echo $headers;
//echo $strmsg;
//echo $subject;
//echo $to;
	// Send the mail using PHPs mail() function
	mail($to, $subject, $strmsg, $headers);

echo $e['message'];


		$succeed=1;
		$sMSG = "Thanks for your feedback. We will get back to you soon.";
	}
}

function check_email_address($email) {
    // First, we check that there's one @ symbol, and that the lengths are right
    if (!ereg("^[^@]{1,64}@[^@]{1,255}$", $email)) {
        // Email invalid because wrong number of characters in one section, or wrong number of @ symbols.
        return false;
    }
    // Split it into sections to make life easier
    $email_array = explode("@", $email);
    $local_array = explode(".", $email_array[0]);
    for ($i = 0; $i < sizeof($local_array); $i++) {
         if (!ereg("^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&'*+/=?^_`{|}~\.-]{0,63})|(\"[^(\\|\")]{0,62}\"))$", $local_array[$i])) {
            return false;
        }
    }    
    if (!ereg("^\[?[0-9\.]+\]?$", $email_array[1])) { // Check if domain is IP. If not, it should be valid domain name
        $domain_array = explode(".", $email_array[1]);
        if (sizeof($domain_array) < 2) {
                return false; // Not enough parts to domain
        }
        for ($i = 0; $i < sizeof($domain_array); $i++) {
            if (!ereg("^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$", $domain_array[$i])) {
                return false;
            }
        }
    }
    return true;
}
?>
<SCRIPT LANGUAGE=javascript src="chmail.js"></script>
<SCRIPT LANGUAGE=javascript src="checkStr.js"></script>
<SCRIPT LANGUAGE=javascript>
<!--
function mOvr(src,clrOver) { if (!src.contains(event.fromElement)) { src.style.cursor = 'hand'; src.bgColor = clrOver; }}function mOut(src,clrIn){ if (!src.contains(event.toElement)) { src.style.cursor = 'default'; src.bgColor = clrIn; }} function mClk(src) { if(event.srcElement.tagName=='TD'){src.children.tags('A')[0].click();} }
function mClk2(src) { if(event.srcElement.tagName=='TR'){src.children.tags('A')[0].click();} }
function MM_openBrWindow(theURL,winName,features) {window.open(theURL,winName,features); }

function ch(form)
{
	if(trim(form.s_description.value)=="")
	{
		alert("Describe your requirements.");
		form.s_description.focus();
		return false;
	}
	
	if(txtSearch(form.s_name.value)==false)
	{
		alert("Please enter your name.")
		form.s_name.focus();
		return false;
	}
	if(isNaN(form.s_name.value)==false)
	{
		alert("Name can't be numeric")
		form.s_name.focus();
		return false
	}
	
	if(echeck(trim(form.s_email.value))==false)
	{
		form.s_email.select();
		form.s_email.focus();
		return false;
	}
	if(trim(form.s_phone.value)=="")
	{
		alert("Please enter your phone no.");
		form.s_phone.focus();
		form.s_phone.select();
		return false;
	}
	
	if(trim(form.s_country.value)=="")
	{
		alert("Please enter country value.");
		form.s_country.focus();
		return false;
	}	
	else{
		
		return true;
	}
}
//-->
</SCRIPT>


    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link href="styles.css" rel="stylesheet" type="text/css">
<style type="text/css">
  @media(min-width:768px){
  #menu-wrap{min-height: 92px;}
}
ul.slimmenu {
    margin-top: 13px !important;
    margin-bottom: 10px !important;
}
<!--
.style1 {	font-size: 11px
}
.style2 {color: 74653d; font-weight: normal; text-decoration: none; padding: 0px; font-family: tahoma;}
.style11 {	color: #25c1e7
}
body {
	background-color: #92B2CB;
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.style5 {color: #CC0000}
-->
</style>
<link href="stylesheet.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style12 {	color: #426F85;
	font-weight: bold;
}
-->

</style>
</head>

<body background="images/bg.jpg">
<FORM NAME="form1" action="<?php echo $PHP_SELF;?>" method="post" onsubmit="return ch(this);">
<input name="recipient" type="hidden" value="mukta@archage.com">
<input type="hidden" value="Business Enquiry Through archage.com" name="subject">
<input type="hidden" name=pback value="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td class="adv"><table width="963" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr> 
          <td height="82"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td width="24%" rowspan="3"><div align="right"><a href="index.html"><img src="images/archage-group-logo.jpg" width="233" height="136" border="0"></a></div></td>
                <td width="18%" rowspan="3" bgcolor="#663300"> <div align="left"><img src="images/tp-pattern.jpg" width="159" height="136"></div></td>
                <td width="58%" height="58" background="images/bg1.jpg"><div align="right"><img src="images/facebook-ico.png" width="57" height="27" hspace="20" border="0" usemap="#Map2">
                    <map name="Map2">
                      <area shape="rect" coords="1,3,23,26" href="http://www.facebook.com/#!/pages/New-Delhi-India/Archage-Group/163455310333646" target="_blank">
                      <area shape="rect" coords="29,3,55,25" href="http://www.twitter.com/archagegroup" target="_blank">
                    </map>
                  </div></td>
              </tr>
              <tr> 
                <td height="51" valign="top"><img src="images/link.jpg" width="576" height="53" border="0" usemap="#Map" href="#"></td>
              </tr>
              <tr> 
                <td valign="top" background="images/bg3.jpg"><img src="images/bg2.jpg" width="576" height="24"></td>
              </tr>
            </table></td>
        </tr>
        <tr> 
          <td bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="11" cellpadding="0">
              <tr> 
                <td><img src="images/hd.jpg" width="306" height="153"><img src="images/services1.jpg" width="630" height="153"></td>
              </tr>
              <tr> 
                <td bgcolor="#d6d6c6"><table width="100%" border="0" cellspacing="11" cellpadding="0">
                    <tr> 
                      <td bgcolor="#e1d097"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                          <tr> 
                            <td width="5%" height="72"> <div align="right"><img src="images/circle.png" width="30" height="28"></div></td>
                            <td width="95%" class="new-heading">Feedback</td>
                          </tr>
                        </table>
                        <table width="892" border="0" align="center" cellpadding="0" cellspacing="0" class="about-txt">
                          <tr> 
                            <td height="365" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr> 
                                  <td bgcolor="#FFFFFF">&nbsp;</td>
                                </tr>
                                <tr> 
                                  <td valign="top" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                      <tr> 
                                        <td width="400%" colspan="2" valign="top" class="pg-txt"><TABLE WIDTH="90%" BORDER="0" ALIGN="CENTER" CELLPADDING="3" CELLSPACING="1" class="text1Copy">
                                            <?php if($sMSG!=""){?>
                                            <tr> 
                                              <td width='48%'><br> <?php echo $sMSG; ?> 
                                              </td>
                                            </tr>
                                            <?php }
		          if ($succeed==0){?>
                                            <TR> 
                                              <TD COLSPAN="2" ALIGN="CENTER" CLASS="query">(<FONT COLOR="RED">*</FONT>) 
                                                represents compulsory fields.</TD>
                                            </TR>
                                            <TR> 
                                              <TD COLSPAN="2">&nbsp;</TD>
                                            </TR>
                                            <TR> 
                                              <TD VALIGN="TOP" CLASS="query"><FONT COLOR="RED">*</FONT>Please 
                                                Describe Your Requirements :</TD>
                                              <TD width="52%"><TEXTAREA NAME="s_description" ROWS="3" COLS="29" WRAP="Virtual"></TEXTAREA></TD>
                                            </TR>
                                            <TR> 
                                              <TD CLASS="query">Organization/Company 
                                                Name :</TD>
                                              <TD><INPUT NAME="s_organization" SIZE="35" MAXLENGTH="48"></TD>
                                            </TR>
                                            <TR> 
                                              <TD CLASS="query"><FONT COLOR="RED">*</FONT>Your 
                                                Name :</TD>
                                              <TD><INPUT NAME="s_name" SIZE="35" MAXLENGTH="48"></TD>
                                            </TR>
                                            <TR> 
                                              <TD CLASS="query"><FONT COLOR="RED">*</FONT>Your 
                                                E-Mail : </TD>
                                              <TD><INPUT NAME="s_email" MAXLENGTH="48" SIZE="35"></TD>
                                            </TR>
                                            <TR> 
                                              <TD CLASS="query"><FONT COLOR="RED">*</FONT>Phone 
                                                :(Include Country/Area Code)</TD>
                                              <TD><INPUT NAME="s_phone" SIZE="35" MAXLENGTH="48"></TD>
                                            </TR>
                                            <TR> 
                                              <TD CLASS="query">Fax :(Include 
                                                Country/ Area Code)</TD>
                                              <TD><INPUT NAME="s_fax" SIZE="35" MAXLENGTH="48"></TD>
                                            </TR>
                                            <TR> 
                                              <TD CLASS="query">Street Address 
                                                : </TD>
                                              <TD><INPUT NAME="s_streetaddress" SIZE="35"></TD>
                                            </TR>
                                            <TR> 
                                              <TD CLASS="query">City/State : </TD>
                                              <TD><INPUT NAME="s_city" SIZE="35" MAXLENGTH="48"></TD>
                                            </TR>
                                            <TR> 
                                              <TD CLASS="query">Zip/Postal Code 
                                                :</TD>
                                              <TD><INPUT NAME="s_zip" SIZE="15" MAXLENGTH="20"></TD>
                                            </TR>
                                            <TR> 
                                              <TD CLASS="query"><FONT COLOR="RED">*</FONT>Country 
                                                :</TD>
                                              <TD><INPUT TYPE="TEXT" SIZE="35" MAXLENGTH="48" NAME="s_country"></TD>
                                            </TR>
                                            <TR> 
                                              <TD COLSPAN="2"><div align="right"> 
                                                  &nbsp;&nbsp;&nbsp; 
                                                  <INPUT NAME="Input" TYPE="SUBMIT" value="Submit">
                                                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                                                </div></TD>
                                            </TR>
                                            <?php } ?>
                                          </TABLE></td>
                                      </tr>
                                    </table></td>
                                </tr>
                                <tr> 
                                  <td bgcolor="#FFFFFF">&nbsp;</td>
                                </tr>
                                <tr> 
                                  <td valign="top" bgcolor="#FFFFFF"><br />
                                    <br /></td>
                                </tr>
                              </table></td>
                          </tr>
                        </table>
                        <br> <img src="images/gr-line.gif" width="922" height="5"></td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
        </tr>
        <tr> 
          <td bgcolor="#FFFFFF"><div align="center"><img src="images/wht-line.gif" width="950" height="8"> 
              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr> 
                  <td width="60%" class="bot-link"><strong>Archage Group</strong><br> 
                    &copy; 2010. All Rights Reserved. </td>
                  <td width="40%" class="bot-link"><div align="right"><a href="#"></a><a href="#">Sitemap</a></div></td>
                </tr>
              </table>
            </div></td>
        </tr>
      </table></td>
  </tr>
</table>
<map name="Map">
  <area shape="rect" coords="16,9,74,40" href="index.html">
  <area shape="rect" coords="77,12,139,41" href="why-us.htm">
  <area shape="rect" coords="153,13,221,37" href="services.htm">
  <area shape="rect" coords="232,11,310,34" href="team.htm">
  <area shape="rect" coords="392,13,460,39" href="contact.htm">
  <area shape="rect" coords="494,16,567,52" href="feedback.php">
  <area shape="rect" coords="316,11,376,39" href="media.htm">
</map>

</body>
</html>
