<?php
//Contact Form process
if (!empty($_POST['submit'])) {

    $txtname = $_POST['txtname'];
    $tele = $_POST['telephone'];
    $email = $_POST['email'];
    $msg = $_POST['txtmsg'];
    
    if (($_POST['txtmsg'] == '' || $_POST['txtmsg'] == 'Write your say!') || ( $_POST['txtname'] == '' || $_POST['txtname'] == 'Name:' ) || ( $_POST['email'] == '' || $_POST['email'] == 'Email:' )) {
        $err = 'Required field missing.';
    } elseif (empty($err) && !eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $_POST['email'])) {
        $err = 'Invalid email address.';
    }
    if (empty($err)) {
        $txtname = $_POST['txtname'];
        $email = $_POST['email'];
        $tele = $_POST['telephone'];
        $msg = nl2br(strip_tags($_POST['txtmsg'])); #$_POST['txtmsg']
        //$to = $cform;
        $to = 'asn@asnbd.com';
        $sub = 'Contact';
        $from = $txtname . "<" . $email . ">";
        $body = "
        Name : <strong>$txtname</strong> <br/> 
        Telephone : <strong>$tele</strong> <br/> 
        Email :<strong>$email</strong> <br/><br/>      
        Message : $msg <br /><br />Thank you<br />http://asnbd.com";
        $headers = "From: $from\r\n" . 'MIME-Version: 1.0' . "\r\n";
        $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
        $send_mail = mail($to, $sub, $body, $headers);

        if ($send_mail) {
            $success = ' Contact form submitted! We will be in touch soon.';
            $txtname = '';
            $tele = '';
            $email = '';
            $msg = '';
        } else {
            $err = 'Unable to send the mail. Please try again.';
        }
    }
}
?>
<!DOCTYPE html>
<html lang="en">
    <head>
        <title>ASN Corporation</title>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width; initial-scale=1.0" />
        <link rel="stylesheet" href="css/style.css" media="screen" />
        <link rel="icon" href="images/icons/favicon.ico" type="image/x-icon" />
        <link rel="shortcut icon" href="images/icons/favicon.ico" type="image/x-icon" />
        <script src="js/jquery-1.7.2.min.js"></script>
        <!--[if lt IE 9]>
                        <script src="js/html5.js"></script>
                        <link rel="stylesheet" href="css/ie.css"> 
                <![endif]-->
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head>
    <body id="page-inner">
        <!-- header -->
        <header>
<div class="row-3">
<div class="container_12">
<div class="grid_12">
<div class="logo">
<h1><a href="index.html" style="    background-size: contain;">ASN Corporation logo</a></h1>
</div>

<!-- menu -->

<nav id="main-nav-menu">
<ul class="sf-menu">
	<li><a href="index.html">Home</a></li>
	<li ><a href="about.html">About us</a></li>
	<li><a href="product-services.php">Product &amp; Services</a></li>
	<li class="active"><a href="contact.php">Contact Us</a></li>
</ul>
</nav>
<!-- end menu -->

<div class="follow">
<ul class="social">
	<li>Follow us &nbsp;</li>
	<li><a href="https://www.facebook.com/profile.php?id=100083061024240"><img alt="" class="img-1" src="images/icons/icon1.png" /><img alt="" class="img-2" src="images/icons/icon1-hover.png" title="Facebook" /></a></li>
</ul>
</div>
</div>

<div class="clear"></div>
</div>
</div>
</header>
        <!-- content -->
        <section id="content">
            <div class="container_12 all-page">   
                <div class="grid_5 find-us">
                    <div class="block-ident-4">
                        <h2>ASN Corporation</h2>
                        <dl>
                            <dt class="ident-bot-2"><b>House #27/1/B, Road # 3
				Flat # D-13, Alamin Apon Heights
				Shyamoli, Dhaka-1207 <br /> Banladesh.</b></dt>
                            	<dd><span>Mobile:  </span>+88-01711 547760 </dd>
                            <dd><span> Tel: </span> +88-02-9129956 | Fax: +88-02-9126690</dd>                  
                            <dd class="link-1">
                            <p>E-mail: <a href="mailto:asnint1@citech.net">asnint1@citech.net</a>&nbsp;│&nbsp;<a href="mailto:asn@asnbd.com">asn@asnbd.com</a>&nbsp; | &nbsp;<a href="mailto:info@asnbd.com">info@asnbd.com</a>&nbsp;| &nbsp;<a href="mailto:asnint@gmail.com">asnint@gmail.com</a><br>
Web: <a href="http://asnbd.com/">www.asnbd.com</a></p>
</dd>
                        </dl>
                    </div>
                </div>
                <div class="grid_5">
                    <h2>Get in Touch</h2>
                    <?php if (!empty($success)) { ?>
                        <div class="message-box-success" style="margin: 0 0 5px;"><?php echo $success; ?> </div>
                    <?php } ?>
                    <?php if (!empty($err)) { ?>
                        <h3 class="message-box-error" style="margin: 0 0 5px;"><?php echo $err ?></h3>
                    <?php } ?>
                    <!-- contact form -->
                    <div class="confirm">

                        <form id="form1" action="contact.php" method="POST" />

                        <fieldset>
                            <label class="name">
                                <input type="text" name="txtname" value="<?php echo!empty($txtname) ? $txtname : 'Name:' ?>" onfocus="if(this.value=='Name:')(this.value='')" onblur="if(this.value=='')(this.value='Name:')"/>
                                <span class="error">*This is not a valid name.</span> <span class="empty">*Please enter Full Name .</span> </label>
                            <label class="email">
                                <input type="email" name="email" value="<?php echo!empty($email) ? $email : 'Email:' ?>" onfocus="if(this.value=='Email:')(this.value='')" onblur="if(this.value=='')(this.value='Email:')" />
                                <span class="error">*This is not a valid email address.</span> <span class="empty">*Please enter Email Address.</span> </label>
                            <label class="phone">
                                <input type="tel" name="telephone" value="<?php echo!empty($tele) ? $tele : 'Phone:' ?>"  onfocus="if(this.value=='Phone:')(this.value='')" onblur="if(this.value=='')(this.value='Phone:')"/>
                                <span class="error">*This is not a valid phone number.</span> <span class="empty">*Please enter Phone Number.</span> </label>
                            <label class="message">
                                <textarea name="txtmsg" onfocus="if(this.value=='Message:')(this.value='')" onblur="if(this.value=='')(this.value='Message:')"><?php echo!empty($msg) ? $msg : 'Message:' ?></textarea>
                                <span class="error">*The message is too short.</span> <span class="empty">*Please enter Some Text .</span> </label>
                            <div class="clear"></div>
                            <!--                            <div class="btns"><a href="contact.php" class="button-red" data-type="reset">Clear</a><a href="contact.php" class="button-red" data-type="submit">send message</a></div>-->
                            <input name="submit" value="Submit" type="submit" class="formButton" />
                        </fieldset>
                        </form>
                    </div>
                    <!-- end contact form -->
                </div>
                <div class="clear"></div>
            </div>
        </section>
        <!-- end content -->
        <!-- footer -->
       <footer>
<div class="footer-2">
<div class="footer-logo"><span class="logo-icon"><img src="images/Logo-icon.png" width="95" /></span> <span class="made">Made by <a href="http://udsystem.com/">Unique &amp; Dynamic System</a> </span></div>

<div class="container_12">
<div class="wrapper">
<div class="grid_11">
<div class="policy">ASN Corporation. &copy; 2015 - 2016 | <a href="privacy-policy.html">Privacy Policy</a></div>
</div>
</div>
</div>
</div>
</footer>
<script src="js/custom.js"></script><grammarly-desktop-integration data-grammarly-shadow-root="true"></grammarly-desktop-integration></body>
</html>