<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: 			*/
// +----------------------------------------------------------------------+
// | PHP version 4/5                                                      |
// +----------------------------------------------------------------------+
// | Copyright (c) 2004-2010 ARMIA INC                                    |
// +----------------------------------------------------------------------+
// | This source file is a part of iScripts VistaCart                     |
// +----------------------------------------------------------------------+
// | Authors: Jipson<jipson.thomas@armiasystems.com>             		  |
// +----------------------------------------------------------------------+
?>
<?php echo $javascript->link('jquery.js');	?>
<script language="javascript" type="text/javascript">
function chk(thisform){	
	    var i=0;
		var fcs_fld=new Array();
	    var errorstr = '';
	    var msgstr = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n\n";					
		if ($.trim($('#ContactCname').val()) == '') { errorstr += "- Please enter your Name.\n";  fcs_fld[i]='ContactCname'; i++;}
		if ($.trim($('#ContactCemail').val()) == '') { errorstr += "- Please enter your Email Address.\n";  fcs_fld[i]='ContactCemail'; i++;}
		if ($.trim($('#ContactCdescr').val()) == '') { errorstr += "- Please enter your Feedback.\n";  fcs_fld[i]='ContactCdescr'; i++;}
		if (errorstr != '')
		{
			msgstr = msgstr + errorstr;
			alert(msgstr);
			$('#'+fcs_fld[0]+'').focus();
			return false;
		}
		else
		{
			thisform.submit();
			return true;
		}
} 
</script>
			<div class="col-sm-6 col-sm-offset-3">
              <h2 class="title text-center mainhd">Contact Us</h2>
              <!--items display area start -->
              <div class="signup-form">
                <div>   
			<?php if($session->check('Message.flash')) { ?>	<br /><div id="okbox"><?php $session->flash(); ?></div><?php } ?>
				<?php echo $form->create('Contact', array('name' =>'Contact','action' =>'add'));?>
				   <div id="admin_heading">Enter Feedback on website</div>
				      <div class="wid100p">
                    
                    
						
                     <?php echo $form->input('cname', array('label' => '', 'placeholder' => '* Username', 'size' => 27)); ?>
                        
                    <div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif');?></div>
                  </div>
                  <div class="wid100p">
        						<?php echo $form->input('cemail', array('label' => '', 'placeholder' => '* Email', 'size' => 27)); ?>
                  </div>
                  <div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif');?></div>
                  <div class="wid100p">
                    
          						<?php echo $form->input('cdescr',array('rows' => '3','label' => '', 'placeholder' => '* Enter Feedback', 'size' => 27));?>
                  </div>
                 
                 <div class="wid100p margtop10px">
					
        					<button type="button" onClick="return chk(document.Contact);" class="btn btn-default left margrt10px">Save</button>
        					<button type="button" onClick="javascript:history.go(-1);" class="btn btn-default resetbtn left">Cancel</button>
					
			           </div>
         </div>
				<?php echo $form->end(); ?>
                <!--form area end -->
</div>
              <div align="left" class="float_clear1"></div>
            </div>
            <div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif');?></div>
            <style>
                .error-message{
                    font-size: 13px;
                    color: red;
                }
            </style>
			