<?php 
/*
##################################################################
#                       PHP 4&5 MySQL 4&5                        #
##################################################################
#           Copyright (c) 2004-2008 Armia Systems Inc            #
##################################################################
#               This file is part of Cybermatch site             #
##################################################################
#    Developed By: simi (simi@armia.com)                         #

##################################################################
#               Developed On:   03-04-2008                       #
##################################################################
#               Modified By:                                     #
##################################################################
#               Modified On:                                     #
##################################################################
# This script may not be distributed, sold, given away for free  #
# to third party, or used as a part of any internet services 	 #
# such as webdesign etc.                                         #
##################################################################
*/

require_once ("config.inc.php");
require_once ("includes/userlogincheck.inc.php");
require_once ("includes/mysql.inc.php");
require_once ("includes/arrays.inc.php");
require_once ("classes/misc.class.php");
require_once ("classes/userside.class.php");

$message	= "";
$script		= "";
$product	= isset($_REQUEST['product'])	?	trim($_REQUEST['product'])	:	"0";

if (!$objDB) {
	$message	= "Unable to Locate Database Server.";
} else {
	$objM		= new misc($objDB);
	$objU		= new userside($objDB);	
	
	if (isset($_POST['CNP'])) {
		$message	= $objU->idverification_form_check($_POST);

		if ($message == "") {
		
			header("Location:".$objU->SecureUrl()."/pay_now.php?product=$product&showmsgtype2=idvery");
			exit();
		}
	} else {
		$array	= $objU->select($_SESSION['user_id']);
		$objU->set_values($array);
	}
	$script		= $objU->get_script($message);
	$message	= $objU->remove_script($message);

}
include_once ("title.inc.php");
include_once ("tophtml.inc.php");
?>
<script language="javascript" type="text/javascript">
function changeCSS(obj, type)
{
	if (type == 'text') {
		obj.className = 'textbox';
	} else if (type == 'textarea') {
		obj.className = 'textbox_textarea';
	} else if (type == 'select') {
		obj.className = 'textbox';
	}
	else if (type == 'text2') {
		obj.className = 'textbox2';
	} else {
		obj.className = 'textbox';
	}
}
function validate1()
{
	var frm	= document.frmTell;
	
	if (frm.vFirstName.value == "") {
		alert("Please enter your first name.");
		frm.vFirstName.focus();
		frm.vFirstName.className ='errorinput';
		return false;
	}
	if (frm.vLastName.value == "") {
		alert("Please enter your last name.");
		frm.vLastName.focus();
		frm.vLastName.className ='errorinput';
		return false;
	}
	if (frm.vSSN.value == "") {
		alert("Please enter your SSN number.");
		frm.vSSN.focus();
		frm.vSSN.className ='errorinput';
		return false;
	}
	if (frm.vDD.value == "") {
		alert("Please enter day of your date of birth.");
		frm.vDD.focus();
		frm.vDD.className ='errorinput2';
		return false;
	}
	if (frm.vMM.value == "") {
		alert("Please enter month of your date of birth.");
		frm.vMM.focus();
		frm.vMM.className ='errorinput2';
		return false;
	}
	if (frm.vYYYY.value == "") {
		alert("Please enter year of your date of birth.");
		frm.vYYYY.focus();
		frm.vYYYY.className ='errorinput2';
		return false;
	}
	
	if (frm.vDriverLicenseNumber.value == "") {
		alert("Please enter your Driver License Number.");
		frm.vDriverLicenseNumber.focus();
		frm.vDriverLicenseNumber.className ='errorinput';
		return false;
	}
	if (frm.vDriverLicenseState.value == "") {
		alert("Please enter your Driver License State.");
		frm.vDriverLicenseState.focus();
		frm.vDriverLicenseState.className ='errorinput';
		return false;
	}
	if (frm.vStreet.value == "") {
		alert("Please enter your street address.");
		frm.vStreet.focus();
		frm.vStreet.className ='errorinput';
		return false;
	}
	if (frm.vCity.value == "") {
		alert("Please enter your city address.");
		frm.vCity.focus();
		frm.vCity.className ='errorinput';
		return false;
	}
	if (frm.vState.value == "") {
		alert("Please enter your state address.");
		frm.vState.focus();
		frm.vState.className ='errorinput';
		return false;
	}
	if (frm.vPostCode.value == "") {
		alert("Please enter your postal code address.");
		frm.vPostCode.focus();
		frm.vPostCode.className ='errorinput';
		return false;
	}
	if (frm.vPhone.value == "") {
		alert("Please enter your phone number.");
		frm.vPhone.focus();
		frm.vPhone.className ='errorinput';
		return false;
	}

	return true;
}
</script>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td valign="top" class="white"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="72%" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="5">
          <tr>
            <td>              <table width="100%"  border="0" cellspacing="0" cellpadding="5">
              <tr>
                <td class="box111 headings">Make Your Profile as ID Verified</td>
              </tr>
            </table>
				<table width="100%"  border="0" cellspacing="0" cellpadding="10">
                <tr>
                  <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td class="headings2">Make ID Verified</td>
                    </tr>
                  </table>
                    <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td><img src="images/spacer.gif" width="1" height="10"></td>
                      </tr>
                    </table>
					<form name="frmTell" method="post" action="<?php echo $_SERVER['PHP_SELF']?>" onSubmit="return validate1();">
                    <table width="100%"  border="0" cellspacing="0" cellpadding="5">
					<?php if(isset($message) && trim($message)!='')
					      {
					?>
                    <tr align="center">
                      <td colspan="2" class="maintext1 warning"><?php echo $message;?></td>
                      </tr>
					<?php }//end if?>
                    <tr>
                      <td colspan="2" class="maintext1">Make your profile as 'ID Verified' by paying an amount of $ <?php echo $objU->get_amount(5)?>.</td>
                      </tr>
                    <tr>
                      <td class="maintext1">First Name <span class="warning">*</span></td>
                      <td class="maintext1"><input name="vFirstName" type="text" class="textbox" onKeyDown="changeCSS(this, 'text');" value="<?php echo htmlspecialchars($objU->vFirstName)?>" size="30" maxlength="200"></td>
                    </tr>
                    <tr>
                      <td class="maintext1">Middle Name</td>
                      <td class="maintext1"><input name="vMiddleName" type="text" class="textbox" value="<?php echo htmlspecialchars($objU->vMiddleName)?>" size="30" maxlength="100"></td>
                    </tr>
                    <tr>
                      <td class="maintext1">Last Name <span class="warning">*</span></td>
                      <td class="maintext1"><input name="vLastName" type="text" class="textbox"  onKeyDown="changeCSS(this, 'text');" value="<?php echo htmlspecialchars($objU->vLastName)?>" size="30" maxlength="200"></td>
                    </tr>
                    <tr>
                      <td class="maintext1">SSN <span class="warning">*</span></td>
                      <td class="maintext1"><input name="vSSN" type="text" class="textbox"  onKeyDown="changeCSS(this, 'text');" value="<?php echo htmlspecialchars($objU->vSSN)?>" size="30" maxlength="200"></td>
                    </tr>
                    <tr>
                      <td class="maintext1">DOB <span class="warning">*</span></td>
                      <td class="maintext1">Day
                                    <input name="vDD" type="text" class="textbox2" onKeyDown="changeCSS(this, 'text2');" value="<?php echo addslashes($objU->vDD)?>" size="2" maxlength="2">
Month
<input name="vMM" type="text" class="textbox2" onKeyDown="changeCSS(this, 'text2');" value="<?php echo addslashes($objU->vMM)?>" size="2" maxlength="2">
Year
<input name="vYYYY" type="text" class="textbox2" onKeyDown="changeCSS(this, 'text2');" value="<?php echo addslashes($objU->vYYYY)?>" size="6" maxlength="4"></td>
                    </tr>
                    <tr>
                      <td width="54%" class="maintext1">Driver License Number <span class="warning">*</span></td>
                      <td width="46%" class="maintext1"><input name="vDriverLicenseNumber" type="text" class="textbox"  onKeyDown="changeCSS(this, 'text');" value="<?php echo htmlspecialchars($objU->vDriverLicenseNumber)?>" size="30" maxlength="200"></td>
                    </tr>
                    <tr>
                      <td class="maintext1">Driver License State</td>
                      <td class="maintext1"><select name="vDriverLicenseState" class="textbox">
                                    <?php foreach ($arrState as $key => $value) { ?>
                                    <option value="<?php echo $key?>" <?php echo $objU->vDriverLicenseState == $key ? "selected" : ""?>>
                                    <?php echo $value?>
                                    </option>
                                    <?php } ?>
                                  </select></td>
                    </tr>
                    <tr>
                      <td class="maintext1">Street <span class="warning">*</span></td>
                      <td class="maintext1"><input name="vStreet" type="text" class="textbox" onKeyDown="changeCSS(this, 'text');" value="<?php echo htmlspecialchars($objU->vStreet)?>" size="30" maxlength="100"></td>
                    </tr>
                    <tr>
                      <td class="maintext1">City <span class="warning">*</span></td>
                      <td class="maintext1"><input name="vCity" type="text" class="textbox" onKeyDown="changeCSS(this, 'text');" value="<?php echo htmlspecialchars($objU->vCity)?>" size="30" maxlength="100"></td>
                    </tr>
                    <tr>
                      <td class="maintext1">State <span class="warning">*</span></td>
                      <td class="maintext1"><select name="vState" class="textbox">
                                    <?php foreach ($arrState as $key => $value) { ?>
                                    <option value="<?php echo $key?>" <?php echo $objU->vState == $key ? "selected" : ""?>>
                                    <?php echo $value?>
                                    </option>
                                    <?php } ?>
                                  </select></td>
                    </tr>
                    <tr>
                      <td class="maintext1">Postal Code <span class="warning">*</span></td>
                      <td class="maintext1"><input name="vPostCode" type="text" class="textbox" onKeyDown="changeCSS(this, 'text');" value="<?php echo htmlspecialchars($objU->vPostCode)?>" size="30" maxlength="100"></td>
                    </tr>
                    <tr>
                      <td class="maintext1">Telephone Number <span class="warning">*</span></td>
                      <td class="maintext1"><input name="vPhone" type="text" class="textbox" onKeyDown="changeCSS(this, 'text');" value="<?php echo htmlspecialchars($objU->vPhone)?>" size="30" maxlength="100"></td>
                    </tr>
                    <tr>
                      <td>&nbsp;</td>
                      <td>&nbsp;</td>
                    </tr>
                    <tr>
                      <td>&nbsp;</td>
                      <td><input name="CNP" type="submit" class="loginbutton" value="Make ID Verified"><input type="hidden" name="step" value="3"><input type="hidden" name="product" value="5"></td>
                    </tr>
                  </table>
					</form>
                    </td>
                </tr>
              </table>
              <div id="hide"><?php echo $script?></div>
			</td>
          </tr>
        </table></td>
        <td width="28%" valign="top"><?php include_once ("left.inc.php");?></td>
      </tr>
    </table>      
      </td>
  </tr>
</table>
<?php include_once('bottomhtml.inc.php');?>
