<?php session_start();  //Developed by ITechScripts
require 'include/announcements.php'; // ITECHBIDS Configuration File
require 'include/itechbids.php'; // Server compatibility Patch
require 'include/options.php'; // ITECHBIDS Configuration File
    $userid=$_SESSION[user_id];
	if(empty($userid))
	{
		  echo '<meta http-equiv="refresh" content="0;url=sorry.php">';
          exit();  
	}
    $user_sql = "select * from member_details where user_id = ".$userid;
	$user_result = mysql_query($user_sql);
	$user_row = mysql_fetch_array($user_result);
    $verification_code=$user_row['veri_code'];
    $username=$user_row['user_name'];
	$password=$_SESSION[repass];

    $admin_sql="select * from genaralsettings where set_id=1";
	$get_res=mysql_query($admin_sql);
	$get_row=mysql_fetch_array($get_res);
    $yoursite=$get_row['set_value'];
if($en_dis[9]=="no"){
	$mailbody = $welcome["mail_message2"];
}
if($en_dis[9]=="yes"){
	$mailbody = $welcome["mail_message1"];
}
      $mailto=$user_row['email'];
	$mailfrom = $welcome['mail_from'];
	$mailsubject = $welcome['mail_subject'];
	$headers  = "MIME-Version: 1.0\n";
	$headers .= "Content-type: text/html; charset=iso-8859-1\n";
	$headers .= "From: ". $mailfrom."\n";
	
        $mailbody = ereg_replace("<vcode>",$verification_code,$mailbody);
		$mailbody = ereg_replace("<url>",$yoursite,$mailbody);
		$mailbody = ereg_replace("<username>",$username,$mailbody);
		$mailbody = ereg_replace("<password>",$password,$mailbody);
        $mailbody = ereg_replace("<userid>",$userid,$mailbody);
		mail($mailto,$mailsubject,$mailbody,$headers);
?>

  <? require 'themes/verification_reg.tpl';?>
<? require 'templates/'.$tfold.'/footer.php'?></table>
  </body>
</html>
