<?php include("header.php");

//echo'<pre>';print_r($_POST);

$msg="";$msg1="";

if(isset($_POST['register']))

{

	$fname=mysql_real_escape_string(ucfirst($_POST['fname']));

	$lname=mysql_real_escape_string(ucfirst($_POST['lname']));

	$pnumber=$_POST['pnumber'];

	$hidenumber=$_POST['hidenumber'];

	$Gender=$_POST['Gender'];

	$email=$_POST['email'];

	$password=md5($_POST['password']);

	

	$sqlcheck=mysql_query("select * from tbl_users where email='$email'");

	if(mysql_num_rows($sqlcheck)>0)

	{

		$msg1="Registration Cancel...Email Exists Already";

	}

	else

	{

		$insert=mysql_query("insert into tbl_users(fullname,number,hidenumber,gender,email,password,date) values('".$fname." ".$lname."','$pnumber','$hidenumber','$Gender','$email','$password',now())");

		

		

		/*$_SESSION['cname']=$fname." ".$lname;

		$_SESSION['cid']=mysql_insert_id();

		$_SESSION['cemail']=$email;*/

		

		

		

		$msg="Registration Complete";

	    

		$message='<div id=":nm" class="ii gt m152202c763663e6d adP adO"><div id=":nl" class="a3s" style="overflow: hidden;"><div marginwidth="0" marginheight="0"><div class="adM">

	   </div><div dir="ltr" style="background-color:#f5f5f5;margin:0;padding:70px 0 70px 0;width:100%"><div class="adM">

		  </div><table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%">

			 <tbody>

				<tr>

				   <td align="center" valign="top">

					  <div>

					  </div>

					  <table style="background-color:#fdfdfd;border:1px solid #dcdcdc;border-radius:3px!important" border="0" cellpadding="0" cellspacing="0" width="600">

						 <tbody>  

						 <tr>

							   <td align="center" valign="top">

								  <table style="margin-top:20px" border="0" cellpadding="0" cellspacing="0" width="600">

									 <tbody>

										<tr>

										   <td align="center" style="text-align: center;

font-family: Open Sans Condensed,Helvetica Neue,sans-serif;

font-size: 28px;

font-weight: bold;

text-transform: uppercase;">

												<a href="'.$actual_link.'index" style="color:#5e5e5e;">

 

												<span class="logo-icon"><i class="icon icon-search-1 ln-shadow-logo shape-0"></i> </span> Exchangekarde.com </a> 

												

											   				

											  

										   </td>

										   

										</tr>

									 </tbody>

								  </table>

							   </td>

							</tr>                      

							<tr>

							   <td align="center" valign="top">

								  <table border="0" cellpadding="0" cellspacing="0" width="600">

									 <tbody>

										<tr>

										   <td style="background-color:#fdfdfd" valign="top">

											  <table border="0" cellpadding="20" cellspacing="0" width="100%">

												 <tbody>

													<tr>

													   <td style="padding:48px" valign="top">

														  <div style="color:#000;font-family:&quot;Helvetica Neue&quot;,Helvetica,Roboto,Arial,sans-serif;font-size:14px;line-height:150%;text-align:left">

															 

															 <p style="margin:0 0 16px">Dear '.$fname." ".$lname.',<br><br>  Welcome to exchangekrdede.com. Please checkout your account detail.<br>

															 

															 <p>Fullname: '.$fname." ".$lname.'</p>

															 <p>Gender: '.$Gender.'</p>

															 <p>Contact No:'.$pnumber.'</p>

															 <p>Username: '.$email.'</p>

															 <p>Password: '.$_POST['password'].'</p>

															 

															 </p>                                                         

														  </div>

													   </td>

													</tr>

												 </tbody>

											  </table>

										   </td>

										</tr>

									 </tbody>

								  </table>

							   </td>

							</tr>

							<tr>

							   <td align="center" valign="top">

								  <table border="0" cellpadding="10" cellspacing="0" width="600">

									 <tbody>

										<tr>

										   <td style="padding:0" valign="top">

											  <table border="0" cellpadding="10" cellspacing="0" width="100%">

												 <tbody>

													<tr>

													   <td colspan="2" style="border:0;color:#000;font-family:Arial;font-size:12px;line-height:125%;text-align:center" valign="middle">

														  <p>Powered by Exchange Kar DE</p>

													   </td>

													</tr>

												 </tbody>

											  </table>

										   </td>

										</tr>

									 </tbody>

								  </table>

							   </td>

							</tr>

						 </tbody>

					  </table>

				   </td>

				</tr>

			 </tbody>

		  </table></div></div></div></div>';

		  

			$subject="Account Information";

			$to   = $email;

			$from = 'info@exchangekarde.com';

			

			$headers = "From: " . strip_tags($from) . "\r\n";

			$headers .= "Reply-To: ". strip_tags($from) . "\r\n";

			

			$headers .= "MIME-Version: 1.0\r\n";

			$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";

			

			mail($to, $subject, $message, $headers);

				

				

			

		

		

		

		?>

			<script>

			setTimeout(function(){

				window.location="account_home";

			},5000);

			</script>

		<?php 

	}

}

?>



 

<div class="main-container">

<div class="container">

<div class="row">

<div class="col-md-8 page-content">

<div class="inner-box category-content">

<?php if($msg!=="")

{

	?>

		<div class="alert alert-success">

          <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>

		  <?php echo $msg;?>

        </div>

	<?php

}

if($msg1!=="")

{

	?>

		<div class="alert alert-danger">

          <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>

		  <?php echo $msg1;?>

        </div>

	<?php

}

?>

<h2 class="title-2"> <i class="icon-user-add"></i> Create your account, Its free </h2>

<div class="row">

<div class="col-sm-12">

<form class="form-horizontal" method="post">

<fieldset>

<!--<div class="form-group required">

<label class="col-md-4 control-label">You are a <sup>*</sup></label>

<div class="col-md-6">

<div class="radio">

<label>

<input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked>

Professional </label>

</div>

<div class="radio">

<label>

<input type="radio" name="optionsRadios" id="optionsRadios2" value="option2">

Individual </label>

</div>

</div>

</div>-->

 

<div class="form-group required">

<label class="col-md-4 control-label">First Name <sup>*</sup></label>

<div class="col-md-6">

<input name="fname" placeholder="First Name" class="form-control input-md"  type="text">

</div>

</div>

 

<div class="form-group required">

<label class="col-md-4 control-label">Last Name <sup>*</sup></label>

<div class="col-md-6">

<input name="lname" placeholder="Last Name" required class="form-control input-md" type="text">

</div>

</div>

 

<div class="form-group required">

<label class="col-md-4 control-label">Phone Number <sup>*</sup></label>

<div class="col-md-6">

<input name="pnumber" pattern="[0-9.]+" required placeholder="Phone Number" class="form-control input-md" type="text">

<div class="checkbox">

<label>

<input type="checkbox"  name="hidenumber">

<small> Hide the phone number on the published ads.</small> </label>

</div>

</div>

</div>

 

<div class="form-group">

<label class="col-md-4 control-label">Gender</label>

<div class="col-md-6">

<div class="radio">

<label for="Gender-0">

<input name="Gender" id="Gender-0" value="male" required type="radio">

Male </label>

</div>

<div class="radio">

<label for="Gender-1">

<input name="Gender" id="Gender-1" value="female" required type="radio">

Female </label>

</div>

</div>

</div>

 

<!--<div class="form-group">

<label class="col-md-4 control-label" for="textarea">About Yourself</label>

<div class="col-md-6">

<textarea class="form-control" id="textarea" name="textarea">About Yourself</textarea>

</div>

</div>-->

<div class="form-group required">

<label for="inputEmail3" class="col-md-4 control-label">Email <sup>*</sup></label>

<div class="col-md-6">

<input type="email" name="email" required class="form-control" id="inputEmail3" placeholder="Email">

</div>

</div>

<div class="form-group required">

<label for="inputPassword3" class="col-md-4 control-label">Password </label>

<div class="col-md-6">

<input type="password" name="password" required class="form-control" id="inputPassword3" placeholder="Password">

<!--<p class="help-block">At least 5 characters  </p>-->

</div>

</div>

<div class="form-group">

<label class="col-md-4 control-label"></label>

<div class="col-md-8">

<!--<div class="termbox mb10">

<label class="checkbox-inline" for="checkboxes-1">

<input name="checkboxes" id="checkboxes-1" value="1" type="checkbox">

I have read and agree to the <a href="terms-conditions.html">Terms & Conditions</a> </label>

</div>-->

<div style="clear:both"></div>

<input type="submit" name="register" class="btn btn-primary" value="Register"> </div>

</div>

</fieldset>

</form>

</div>

</div>

</div>

</div>

 

<div class="col-md-4 reg-sidebar">

<div class="reg-sidebar-inner text-center">

<div class="promo-text-box"> <i class=" icon-picture fa fa-4x icon-color-1"></i>

<h3><strong>Post a Free Classified</strong></h3>

<p> Post your free online classified ads with us. Lorem ipsum dolor sit amet, consectetur adipiscing elit. </p>

</div>

<div class="promo-text-box"> <i class=" icon-pencil-circled fa fa-4x icon-color-2"></i>

<h3><strong>Create and Manage Items</strong></h3>

<p> Nam sit amet dui vel orci venenatis ullamcorper eget in lacus.

Praesent tristique elit pharetra magna efficitur laoreet.</p>

</div>

<div class="promo-text-box"> <i class="  icon-heart-2 fa fa-4x icon-color-3"></i>

<h3><strong>Create your Favorite ads list.</strong></h3>

<p> PostNullam quis orci ut ipsum mollis malesuada varius eget metus.

Nulla aliquet dui sed quam iaculis, ut finibus massa tincidunt.</p>

</div>

</div>

</div>

</div>

 

</div>

 

</div>

 

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