<? 
$title="Registration";
require 'templates/'.$tfold.'/header.php'; 
?>
	<table width="980" cellpadding="0" cellspacing="0" align="center">
	<tr>
<tr><td width="1%" height="24" valign="top"><img src=templates/<?=$tfold?>/img_files/t_header_l_bl.gif></td>
<td class="tdhead_main_bl" width="30%" height="24" valign="middle">

<table width="250" cellpadding="0" cellspacing="0" >
<tr><td width="1%" height="24" valign="top"><img src=templates/<?=$tfold?>/img_files/heading-left-reg.gif></td>
<td class="head_main_bl" width="98%" height="24" valign="middle">&nbsp;<B><? echo "$lang_593" ?></b></td>
<td width="1%" height="24" valign="top"><img src=templates/<?=$tfold?>/img_files/heading-right-bl.gif></td></tr>
	</table>
</td>
<td class="tdhead_main_bl" width="68%" height="24" valign="middle">&nbsp;</td>
<td width="1%" height="24" valign="top"><img src=templates/<?=$tfold?>/img_files/t_header_r_bl.gif></td></tr>
	</table>

<table width="980" cellpadding="0" cellspacing="0" align="center">
<tr height=20>
<td colspan="2" class="ft_right_bl">
&nbsp;<? echo "$r_steps" ?>
</td></tr>
<tr height=20>
<td align="right" colspan="2" style="padding-right:5px" class="ft_right_bl">
<font color=red size="+1" style="text-align:center"><b>*</b></font><? echo "$lang_440" ?>
</td></tr>
 
 <tr><td class="ft_right">
<? if($err_flag==1)
{ 
?>
<table align="center"><tr><td>
<img src="templates/<? echo "$tfold" ?>/img_files/xclabid.gif"></td>
<td><font class="head_font" color="red">&nbsp;&nbsp;<? echo "$lang_388" ?></font></td>
</tr>
<? if(!empty($err_dup_email))
{
?>
<tr><td></td><td><a href="user_reg.php#txtemail"><? echo "$lang_441" ?></a> - <?= $err_dup_email; ?></td></tr>
<? 
}
?>

<? if(!empty($err_first))
 {
 ?>
<tr><td></td><td><a href="user_reg.php#txtfirst"><? echo "$lang_291" ?></a> - <?= $err_first; ?></td></tr>
<? 
}
?>
<? if(!empty($err_last))
 {
 ?>
<tr><td></td><td><a href="user_reg.php#txtlast"><? echo "$lang_292" ?></a> - <?= $err_last; ?></td></tr>
<? 
}
?>
<? if(!empty($err_add))
 {
 ?>
<tr><td></td><td><a href="user_reg.php#txtaddress"><? echo "$lang_293" ?></a> - <?= $err_add; ?></td></tr>
<? 
}
?>
<? if(!empty($err_city))
 {
 ?>
<tr><td></td><td><a href="user_reg.php#txtcity">City</a> - <?= $err_city; ?></td></tr>
<? 
}
?>
<? if(!empty($err_state))
 {
 ?>
<tr><td></td><td><a href="user_reg.php#txtstate">State</a> - <?= $err_state; ?></td></tr>
<? 
}
?>
<? if(!empty($err_code))
 {
 ?>
<tr><td></td><td><a href="user_reg.php#txtzipcode"><? echo "$lang_294" ?></a> - <?= $err_code; ?></td></tr>
<? 
}
?>
<? if(!empty($err_country))
 {
 ?>
<tr><td></td><td><a href="user_reg.php#cbocountry">country</a> - <?= $err_country; ?></td></tr>
<? 
}
?>
<? if(!empty($err_primary))
 {
 ?>
<tr><td></td><td><a href="user_reg.php#txtprimary1">Primary</a> - <?= $err_primary; ?></td></tr>
<? 
}
?>
<? if(!empty($err_primary1))
 {
 ?>
<tr><td></td><td><a href="user_reg.php#txtprimary2">Primary</a> - <?= $err_primary1; ?></td></tr>
<? 
}
?>
<? if(!empty($err_primary2))
 {
 ?>
<tr><td></td><td><a href="user_reg.php#txtprimary">Primary</a> - <?= $err_primary2; ?></td></tr>
<? 
}
?>
<? if(!empty($err_secondary1))
 {
 ?>
<tr><td></td><td><a href="user_reg.php#txtsecondary1">Secondary</a> - <?= $err_secondary1; ?></td></tr>
<? 
}
?>
<? if(!empty($err_secondary))
 {
 ?>
<tr><td></td><td><a href="user_reg.php#txtsecondary">Secondary</a> - <?= $err_secondary; ?></td></tr>
<? 
}
?>
<? if(!empty($err_month))
{
?>
<tr><td>&nbsp;</td>
<td><a href="user_reg.php#cbomonth">Month</a> - <?= $err_month; ?></td></tr>
<? 
}
?>
<? if(!empty($err_day))
 {
 ?>
<tr><td>&nbsp;</td>
<td><a href="user_reg.php#cboday">Day </a> - <?= $err_day; ?></td></tr>
<? 
}
?>

<? if(!empty($err_year))
{
?>
<tr><td>&nbsp;</td>
<td><a href="user_reg.php#txtYear">Year</a> - <?= $err_year; ?></td></tr>
<? 
}
?>
<? if(!empty($err_dob))
 {
 ?>
<tr><td>&nbsp;</td><td><a href="user_reg.php#txtYear"><? echo "$lang_442" ?></a> - <?= $err_dob; ?></td></tr>
<? 
}
?>


<? if(!empty($err_email))
 {
 ?>
<tr><td>&nbsp;</td><td><a href="user_reg.php#txtemail"><? echo "$lang_295" ?></a> - <?= $err_email; ?></td></tr>
<? 
}
?>
<? if(!empty($err_reemail))
 {
 ?>
<tr><td>&nbsp;</td><td><a href="user_reg.php#txtreemail"><? echo "$lang_20" ?> Email</a> - <?= $err_reemail; ?></td></tr>
<? 
}
?>
<? if(!empty($err_terms) && ($en_dis[3]=="yes"))
 {
 ?>
<tr><td>&nbsp;</td><td><a href="user_reg.php#chkterms"><? echo "$lang_597" ?></a> - <?= $err_terms; ?></td></tr>
<? 
}
?>

<? if(!empty($err_captcha))
 {
 ?>
<tr><td>&nbsp;</td><td>&nbsp;<?= $err_captcha; ?></td></tr>
<? 
}
?>




<tr><td colspan="2"><hr noshade class="hr_color" size="1" width=600></td></tr>
</table>
<?
} 
?>
</td></tr>
  <tr><td class="ft_right_bl"> 
 <br>
 &nbsp;&nbsp;<? echo "$lang_415" ?> <? echo "$lang_598" ?></b>
<br>
 </td></tr>
 <tr><td class="ft_right_bl">
 <br>
 <form name=reg Action="user_reg.php" method=post enctype="multipart/form-data" style=padding-left:5px";>
 <table width="100%" cellpadding="2" cellspacing="0">
 
 <? if(!empty($err_first))
 {
 ?>
 <tr><td width=660><img src="templates/<? echo "$tfold" ?>/img_files/xclabids.gif">&nbsp;&nbsp;<font class="head_font" color=red><?= $err_first ?></font>
 -
 <b><font class="head_font" color=red>&nbsp;&nbsp;<? echo "$lang_291" ?>*</font></b></td><TR>
 <?
  }
 ?>
   <TR><TD><b><font class="head_font" >&nbsp;&nbsp;<? echo "$lang_291" ?></font></b><font size="2" color="red">*</font></td>
   <td width=660><div class="h_text_cell_mid"><input type="text" class="h_text_mid" name="txtfirst" class="txtmed" value=<?= "$first"; ?>></div></td>
 </tr>
   
 <? if(!empty($err_last))
 {?>
 <TR><td><img src="templates/<? echo "$tfold" ?>/img_files/xclabids.gif">&nbsp;<font class="head_font" color=red>&nbsp;&nbsp;<?= $err_last ?></font>
 -
 <b><font class="head_font" color=red>&nbsp;&nbsp;<? echo "$lang_292" ?></font></b>
 <b><font size="2" color="red">*</font></b> </td>
 </tr>
 <?
  }
?>
  <tr>
 <td><b><font class="head_font">&nbsp;&nbsp;<? echo "$lang_292" ?></font></b><font size="2" color="red">*</font></td><td>
   
<div class="h_text_cell_mid"><input type="text" class="h_text_mid" name="txtlast" class="txtmed" value=<?= "$last"; ?>></div></td></tr>
 
 <? if(!empty($err_add))
 {
 ?>
 <tr><td><img src="templates/<? echo "$tfold" ?>/img_files/xclabids.gif">&nbsp;&nbsp;<font class="head_font" color=red><?= $err_add ?></font>
 -
 <b><font class="head_font" color=red>&nbsp;&nbsp;<? echo "$lang_293" ?></font></b>
 <b><font size="2" color="red">*</font></b></td>
 </tr>
 <?
  }
 ?>
 <TR><TD><b><font class="head_font">&nbsp;&nbsp;<? echo "$lang_293" ?></font></b><font size="2" color="red">*</font></td>
 <td>
<div class="h_text_cell_mid"><input type="text" class="h_text_mid" name="txtaddress" class="txtmed" value=<?= "$address"; ?>></div></td></tr>
  </td></tr>
  <? if(!empty($err_city))
 {
 ?>
 <tr><td><img src="templates/<? echo "$tfold" ?>/img_files/xclabids.gif">&nbsp;<font class="head_font" color=red>&nbsp;&nbsp;<?= $err_city ?></font>
 -
 <b><font class="head_font" color=red>City</font></b>
 <b><font size="2" color="red">*</font></b></td></tr>
 <?
  }
 ?>
 <TR><TD><b><font class="head_font">&nbsp;&nbsp;City<font size="2" color="red">*</font></font></b></td>
<td><div class="h_text_cell_mid"><input type="text" class="h_text_mid" name="txtcity" class="txtmed" value="<?= $city; ?>" ></div></td></tr>
 <? if(!empty($err_state))
 {
 ?>
 <TR><TD><img src="templates/<? echo "$tfold" ?>/img_files/xclabids.gif">&nbsp;<font class="head_font" color=red><?= $err_state ?></font>
 <br>
 <b>&nbsp;&nbsp;<font class="head_font" color=red>State</font></b>
 <b><font size="2" color="red">*</font></b></td></tr>
 <?
  }
 ?>
 <TR><TD>&nbsp;&nbsp;<b><font class="head_font">State</font></b><font size="2" color="red">*</font></td>
 <td><div class="h_text_cell_mid"><input type="text" class="h_text_mid" name="txtstate" class="txtmed" value="<?=$state; ?>" ></div></td>
 </tr>
 
   <? if(!empty($err_code))
 {
 ?>
 <tr>
 <td><img src="templates/<? echo "$tfold" ?>/img_files/xclabids.gif">&nbsp;<font class="head_font" color=red>&nbsp;&nbsp;<?= $err_code ?></font>
 <br>
 &nbsp;&nbsp;<b><font class="head_font" color=red>Zipcode </font></b><b><font size="2" color="red">*</font></b></td></tr>
<?
  }
 ?>
 <TR><TD>&nbsp;&nbsp;<b><font class="head_font">Zipcode</font></b><font size="2" color="red">*</font></td>
 <td><div class="h_text_cell_mid"><input type="text" class="h_text_mid" name="txtzipcode" class="txtmed" value=<?= "$code"; ?> > </div></td></tr>
 <? if(!empty($err_country))
 {
 ?>
 <TR><TD><img src="templates/<? echo "$tfold" ?>/img_files/xclabids.gif">&nbsp;<font class="head_font" color=red><?= $err_country ?></font>
 <br>
 &nbsp;&nbsp;<b><font class="head_font" color=red>Country</font></b>
 <b><font size="2" color="red">*</font></b></td></tr>
 <?
  }
 ?>
<TR><TD>&nbsp;&nbsp;<b><font class="head_font">Country</font></b><font size="2" color="red">*</font></td>
 <td><select name=cbocountry>
 <option value=0>Select</option>
   <? 
  $country_sql="select * from site_countries";
  $country_res=mysql_query($country_sql);
  while($country_row=mysql_fetch_array($country_res))
 {
  if(trim($country_row['country_id'])==trim($country))
  {
   ?>
  <option value="<?= $country_row['country_id'] ?>" selected><?= $country_row['country']?></option>
  <? 
  }
  else
  {
  ?>
  <option value="<?= $country_row['country_id'] ?>"><?= $country_row['country']?></option>
  <?
  }
  }
  ?>
  </select>
  </td>
  </tr>
 
 <? if(!empty($err_primary) || !empty($err_primary1) || !empty($err_primary2) )
 {?>
 <tr><td><img src="templates/<? echo "$tfold" ?>/img_files/xclabids.gif">&nbsp;<font class="head_font" color=red><?= $err_primary ?></font>
 <br>
              <b><font color="red" size="2">&nbsp;&nbsp;<? echo "$lang_507" ?></font></b> <b><font size="2" color="red">*</font></b></td></tr>
              <?
  }
 ?>
<TR><TD><b><font size="2">&nbsp;&nbsp;<? echo "$lang_507" ?></font></b><font size="2" color="red">*</font></td>
   <td><table cellpadding="0" cellspacing="0" width=100%><tr><td width="10%">
<div class="h_text_cell_mic"><input type="text" class="h_text_mic" name="txtprimary1" style="font-size:12px;font-family:arial;width:40;height:20" value="<?= $primary1; ?>" maxlength="4" > </div>
</TD><TD width="10%">
<div class="h_text_cell_mic"><input type="text" class="h_text_mic" name="txtprimary2" style="font-size:12px;font-family:arial;width:40;height:20" value="<?= $primary2; ?>" maxlength="5" ></div></TD><TD width="80%">
<div class="h_text_cell_mid"><input type="text" class="h_text_mid" name="txtprimary" class="txtsmall" value="<?= $primary; ?>" maxlength="10"></div></td></tr></table></td>

   <? if(!empty($err_secondary) && !empty($err_secondary1))
 {?>
 <TR><TD><img src="templates/<? echo "$tfold" ?>/img_files/xclabids.gif">&nbsp;<font class="head_font" color=red>&nbsp;&nbsp;<?= $err_secondary ; ?></font>
 <br>
              <b><font class="head_font" color=red>&nbsp;&nbsp;<? echo "$lang_296" ?></font></b> 
              <b><font size="2" color="red">*</font></b></TD></TR>
              <?
  }
 ?>
<TR><TD><b><font class="head_font">&nbsp;&nbsp;<? echo "$lang_296" ?></font></b><font size="2" color="red">*</font></td>

<td ><table cellpadding="0" cellspacing="0" width=100%><tr><td width="10%">
<div class="h_text_cell_mic"><input type="text" class="h_text_mic" name="txtsecondary1" style="font-size:12px;font-family:arial;width:40;height:20" value="<?= $secondary1; ?>" maxlength="5" ></div></TD><TD width="80%"><div class="h_text_cell_mid"><input type="text" class="h_text_mid" name="txtsecondary" class="txtsmall" value="<?= $secondary; ?>" maxlength="10"></div></td></tr></table></td></tr>


 <? 
 if(!empty($err_day) or !empty($err_month) or !empty($err_year) or !empty($err_dob))
 {
 ?>
 <tr><td><img src="templates/<? echo "$tfold" ?>/img_files/xclabids.gif">&nbsp;<font class="head_font" color=red>&nbsp;&nbsp;<?= $err_email ; ?></font>
 <br>
 <b><font class="head_font" color=red>&nbsp;&nbsp;<? echo "$lang_442" ?></font></b>
 <b><font size="2" color="red">*</font></b> </td>
</tr>
 <?
  }
 ?>
  <TR><TD><b><font class="head_font">&nbsp;&nbsp;<? echo "$lang_442" ?></font></b><font size="2" color="red">*</font></td>
<td>
  <table cellpadding="0" cellspacing="0" width=100%><tr><td width="10%">
 <select name=cbomonth>
  <option value=0> Month </option>
 <? for($i=1;$i<=12;$i++)
 {
 if($month==$i)
 {
 ?>
   <option value=<?= $i ?> selected > <?= $i ?> </option>
 <?
  }
  else
  {
 ?>
  <option value=<?= $i ?> > <?= $i ?> </option>
 <?
 }
 }
 ?>
 </select></td><td width="10%"><select name=cboday>
  <option value=0> Day </option>
 <? for($i=1;$i<=31;$i++)
 {
 if($day==$i)
 {
 ?>
  <option value=<?= $i ?> selected> <?= $i ?> </option>
  <?
 }
 else
 {
 ?>
 <option value=<?= $i ?> > <?= $i ?> </option>
  <?
 }
 }
 ?>
 </select></td><td width="80%">
<div class="h_text_cell_mic"><input type="text" class="h_text_mic" name="txtYear" style="font-size:12px;font-family:arial;width:40;height:20" maxlength=4 value="<?= $year ?>">
</td></tr></table></td>
</tr>
 <tr><td colspan="6"></td></tr>  
  <tr><td colspan="6"><b><font size="2" color="green"></font></b>&nbsp;&nbsp;<font size="2">
</font><br><br></td></tr>

 
 <? if(!empty($err_email))
 {
 ?>
 <tr><td><img src="templates/<? echo "$tfold" ?>/img_files/xclabids.gif">&nbsp;<font class="head_font" color=red>&nbsp;&nbsp;<?= $err_email ; ?></font>
 <br>
 <b><font class="head_font" color=red>&nbsp;&nbsp;<? echo "$lang_295" ?></font></b>
 <b><font size="2" color="red">*</font></b> </td>
 </tr>
 <?
  }
 ?>
<TR><TD><b><font class="head_font">&nbsp;&nbsp;<? echo "$lang_295" ?></font></b><font size="2" color="red">*</font></td>
<td>
  <div class="h_text_cell_mid"><input type="text" class="h_text_mid" name="txtemail" value=<?= "$email"; ?>></div>
  <? 
  $domain_table=mysql_query("select * from  blocked_domain");
	$domain_name=" ";
	if(mysql_num_rows($domain_table)!=0)
	{
	while($domain_row=mysql_fetch_array($domain_table))
	{
	$domain_name.=$domain_row[blocked_domain];
	$domain_name.="&nbsp;&nbsp;&nbsp;";
	} ?>
  <font color=red>Bolcked domain(s):</font><? echo $domain_name; } ?><br>
</td></tr>
   
   <? if(!empty($err_reemail))
 {
 ?>
 <tr><td><img src="templates/<? echo "$tfold" ?>/img_files/xclabids.gif">&nbsp;<font class="head_font" color=red>&nbsp;&nbsp;<?= $err_reemail ; ?></font>
 <br>
 <b><font class="head_font" color=red>&nbsp;&nbsp;<? echo "$lang_20" ?> Email</font></b>
 <b><font size="2" color="red">*</font></b>   </td>
   </tr>
 <?
  }
 ?>
<TR><TD><b><font class="head_font">&nbsp;&nbsp;<? echo "$lang_20" ?> Email</font></b><font size="2" color="red">*</font></td><td><div class="h_text_cell_mid"><input type="text" class="h_text_mid" name="txtreemail" value=<?= "$reemail"; ?>></div></td>
    </tr>
  <tr><td colspan="6">
  <? if(!empty($email_enable_status))
  {
  ?>
  &nbsp;&nbsp;<input type="checkbox" name=email_status checked>
  <? 
   }
  else
  { 
  ?>
  &nbsp;&nbsp;<input type="checkbox" name=email_status>
  <? 
  }
  ?>
     &nbsp;Received Email Notification</td>
          </tr>

<?
if($en_dis[3]=="yes"){ ?>
		  <tr><td colspan="6"><hr></td></tr>
 <tr>
   <td colspan="6"> <b><font class="head_font">&nbsp;&nbsp;<? echo "$lang_443" ?></font></b> </td>
 </tr>
   <tr><td colspan="3" style="padding-left:10px;">
<IFRAME 
     SRC="usr_trms.php" 
     WIDTH=450 HEIGHT=150 
     FRAMEBORDER=1
     >
</IFRAME>
  </td></tr>
  <tr><td colspan="3">
  <? if(!empty($err_terms))
 {
 ?>
 <img src="templates/<? echo "$tfold" ?>/img_files/xclabids.gif">&nbsp;<font class="head_font" color=red>&nbsp;&nbsp;<?= $err_reemail ; ?></font>
 <br>
 <b><font class="head_font" color=red> &nbsp;&nbsp;<? echo "$lang_120" ?> <? echo "$lang_444" ?></font></b>
 <b><font size="2" color="red">*</font></b> 
 <?
  }
  else
  {
 ?>
  <font size="2" ><b>&nbsp;&nbsp;
  <? echo "$lang_120" ?> <? echo "$lang_444" ?> *
  </b></font>
  <?
  }
  ?>
   </td>
  </tr>
  <tr><td colspan="3">
  <table cellpadding="0" cellspacing="0">
  <tr><td colspan="2">
   &nbsp;&nbsp;<input type="checkbox" name=chkterms <?if(!empty($terms)){ echo "checked=checked";}?>>
   &nbsp;I agree to the following:
  </td></tr>
  <tr><td>
  <ul type="disc">
  &nbsp;&nbsp;<li>  I accept the User Agreement and Privacy Policy above.
  </li>
   <li> <? echo "$lang_445" ?> <? echo "$lang_146" ?>  
  </li>
  </ul></td></tr></table>
</td></tr>
<? } ?>

<TR><TD colspan="4" align="left">
<table border="0"  style="padding-left:10px; padding-top:20px;" align="left">
<TR>
  <td height="40" style="font-size:15px;padding-left:10px;" valign="top"><p><strong>Secure Confirmation </strong></p>
    </td>
</TR>
 
<TR>
<td style="font-size: 14px;" valign="top" width="36%" height="20"><p><font class="head_font">Enter Text in the box below: (not case sensative) </font></p>  </td>
</TR> 
  <tr>
    <td width="36%" height="66">
 <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse;">
  <tr>
    <td width="275" rowspan="2"><img id="captcha" src="securimage_show.php" alt="CAPTCHA Image" /></td>
    <td width="24"><a href="#" onclick="document.getElementById('captcha').src = 'securimage_show.php?' + Math.random(); return false">
    <img src="templates/<? echo "$tfold" ?>/img_files/refresh.gif" border="0"></a></td>
  </tr>
  <tr>
    <td width="24"><a href="securimage_play.php"><img src="templates/<? echo "$tfold" ?>/img_files/audio_icon.gif" border="0"></a></td>
  </tr>
</table>    </td>
  </tr>
  <tr>
    <td width="36%" height="47"><div class="h_text_cell_mid">
<input class="h_text_mid"  type="text" name="captcha_code" size="40"></div></td>
  </tr>
</table>

</TD></TR>





 <tr><td colspan="6">
 <hr noshade class="hr_color" size="1" width="600"><br></td></tr>
 <input type="hidden" name=step value=1>
 <input type="hidden" name="member" value=<?= $member; ?>>
 <tr><td colspan="6" align="center">
 <?
    
	if(strlen($_SESSION['introname'])!=0) 
	{
		$introname=$_SESSION['introname'];
		$check_intro_query="select * from member_details where user_name='$introname'";
		$check_intro_result=mysql_query($check_intro_query);
		$check_intro_row=mysql_fetch_array($check_intro_result);
		$intro_id=$check_intro_row['user_id']; ?>
			<input type=hidden name=introid value=" <?= $intro_id ?>" >
	<? 
	}
 ?>
 <input class="submit_button" type="submit" value="Continue" name=submit onclick="check12()"></td></tr>
 </form>
</table></td></tr></table>

<table width="980" cellpadding="0" cellspacing="0" align="center">
<tr>
<td width="98%" height="5" align="center"><img src=templates/<?=$tfold?>/img_files/t_bot_bl.gif border="0"></b></td>
</tr>
	</table>
