<!-- This tool is developed by HIOX INDIA. -->
<?php
@session_start();
include "A-header.php";
//echo "---";
include "url.txt";
$ip = $_SERVER['REMOTE_ADDR'];
$type = $_POST['type'];
$subb=$_POST['sub'];
?>
<style>
.ta{background-color: ffff44;}
.rad{color:green; font-weight:bold; background-color: ffff44;}
table{font-size: 13px; font-family: arial, verdana, san-serif;}
</style>
<script LANGUAGE="JavaScript" src="register.js">
</script>
<script LANGUAGE="JavaScript" src="register.js">
</script>
<table border=0 align=center><tr><td align=center>
<?php
if($subb=="submit")
{
$key=$_SESSION['count'];
$imag = $_POST['number'];
$user = md5($imag);
//echo "$imag = = = $key<br>";
//echo("$user");
}
?>
<?php
require_once "../../auth/config.php";
if($type== "updateadmin")
{
$em = $_POST['email'];
if($em != "")
$em = strtolower($em);
$em1 = $_POST['email1'];
if($em1 != "")
$em = strtolower($em1);
$name = $_POST['name'];
$pw = $_POST['passw'];
$pn = $_POST['passn'];
$country = $_POST['country'];
$state=$_POST['state'];
$city=$_POST['city'];
$phoneno=$_POST['phoneno'];
$address= htmlentities($_POST['address'], ENT_QUOTES);
$website=$_POST['website'];
$vv = true;
$status = "UV";
$pw2=md5($pw);
$link = @mysql_connect($hostname, $username,$password);
if($link)
{
$dbcon = @mysql_select_db($dbname,$link);
if($dbcon)
{
if($name == "" || $pw == "" || $em == "" || $country == "" || $city=="" || $pn == "" || $em1 == "")
{
echo(" <table width=100% align=center><tr><td>
<table height =50 widht=400 align=center><tr>
<td style=\"border:1px red solid; font-size: 15px;\" align=left>
There are empty fields.<br>
Please enter proper values in all the fields<br>");
echo(" </td></tr></table> </td></tr></table>");
$vv = false;
}
else
{
$result1 = @mysql_query("select email from hioxpm where email like '$em'",$link);
$dssd = @mysql_fetch_row($result1);
$emaile = $dssd[0];
if($emaile == $em)
{
echo(" <table align=center><tr><td>
<table bgcolor=#efefef align=center><tr>
<td style=\"border:1px red solid; font-size: 15px;\" align=center>
A user with this email is already present in the database.<br>");
echo(" </td></tr></table> </td></tr></table>");
$vv = false;
}
else{
if($user==$key)
{
$q="insert into hioxpm values('','$name','$em', '$pw', '$pw2', '$ip','$status', curdate(),'$country','$city','$phoneno','$address','$website')";
//echo"$q";
$r=@mysql_query($q,$link);
@mail("hide@address.com", "$url: Your Account Verification Code" , $q, $headers1);
if($r){
$qers = "insert into mailid values('','$em','user')";
//echo $qers;
$result = mysql_query($qers,$link);
$message = "<html><body>Hi <b>$name</b>,<br><br>";
$message .= "We welcome you to $url<br>";
//$message .= "Your home page is <a href=\"http://www.$url//user/$em\">$url/user/$em</a><br>";
$message .= "You can start using your account after verifying the account using any one of the options below<br>";
$message .= "<br><u>OPTION 1</u>: <br>";
$message .= " Just click on the below link and you will be verified <br>";
$message .= "<a href=\"http://www.$url/HRAS/login/verify.php?email=$em&scode=$pw2\">Direct Link to Verify New user Account</a><br><br>";
$message .= "<br><u>OPTION 2</u>: <br>";
$message .= "Go to the page <br>";
$message .= "<a href=\"http://www.$url/HRAS/login/verify.php\">http://www.$url/HRAS/login/verify.php</a> and enter the below details<br>";
$message .= "Email - $em<br>";
$message .= "Security Code - $pw2<br><br>";
$message .= "If you have problems in trying to verify this registration please do not reply to this email. Contact us at hide@address.com<br><br>Please verify your account with in 10 days of registration, otherwise registration will be deleted. Have a good day.";
$message .= "<br><br>http://www.$url";
$message .= "<br><br>---------------";
$headers1 = "MIME-Version: 1.0\r\n";
$headers1 .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers1 .= "From: $from\r\n";
@mail($em, "$url: Your Account Verification Code" , $message, $headers1);
echo(" <table align=center><tr><td>
<table bgcolor=ffffff align=left style=\"padding: 10px;\"><tr><td>
<td style=\"color: green; padding: 10px; border: 1px red groove; font-size: 15px;\">
<br>Congratulations!<br>Your email id has been registered.<br>
<font color=blue>A verification mail has been sent to your id</font> <font color=red>$em</font>.<br><br>
Please check your primary email account to continue. If you do not see an email from us, check your SPAM and/or BULK folders and be certain to set your filters to allow our emails in the future. Thank You!<br><br><font color=blue> The email contains the details for verifying this acount.</font>
After verification you can login to your account at $url.<br>
Login Page - <a href=\"http://$url/HRAS/login/index.php\"> Login </a><br><br>");
echo(" </td></tr></table> </td></tr></table>");
}else{
echo(" <table align=center><tr><td>
<table bgcolor=ffffff align=left style=\"padding: 10px;\"><tr><td>
<td style=\"color: green; padding: 10px; border: 1px red groove; font-size: 15px;\">
<br>Sorry!<br> Your data is not added in to the database. Some data is not valid.
Please contact hide@address.com for further support.<br><br>");
echo(" </td></tr></table> </td></tr></table>");
}
}
else{
echo("<table align=center><tr><td>
<table bgcolor=#efefef align=center><tr>
<td style=\"border:1px red solid; font-size: 15px;\" align=center>
You have entered wrong verification code.<br>");
echo(" </td></tr></table> </td></tr></table>");
$vv = false;
}
}
}
}
else
{
echo "Internal server DB error: Please try after some time";
}
}
else
{
echo "Internal server LINK error: Please try after some time";
}
}
if($vv != true){
?>
<table align=center cellspacing=3 cellpadding=3 style="border:0px #DCDCDC solid;">
<tr><td style="color:#114709; font-size: 15px;" align=center>
<b>NEW USER REGISTRATION</b></td></tr>
<tr><td align=center style="color: #000088; font-size: 14px; padding:10px; ">
Enter proper values in all the fields.
<form name=setf method=POST action="<?php echo $PHP_SELF;?>" onsubmit="return check()">
<input name="type" type=hidden value="updateadmin"><br>
<table align=center cellspacing=3 cellpadding=3>
<tr><td>Your Name<font color=red>*</font> </td><td> <input name="name" value="<?php echo($name); ?>" type=text></td></tr>
<tr><td>Your Email<font color=red>*</font> </td><td> <input name="email" value="<?php echo($em); ?>" type=text></td></tr>
<tr><td>Confirm Email<font color=red>*</font> </td><td> <input name="email1" value="<?php echo($em1); ?>" type=text></td></tr>
<tr><td>Password<font color=red>*</font> </td><td> <input name="passw" value="<?php echo($pw); ?>" MAXLENGTH=15 type=password></td></tr>
<tr><td>Confirm password<font color=red>*</font> </td><td> <input name="passn" value="<?php echo($pn); ?>" type=password MAXLENGTH=15></td></tr>
<tr><td>Your country<font color=red>*</font> </td><td>
<select name=country>
<option value=""> </option>
<script language="javascript">
for(var hi=0; hi<states.length; hi++){
var std = states[hi];
if(std == "<?php echo($country); ?>")
document.write("<option value=\""+std+"\" selected>"+std+"</option>");
else
document.write("<option value=\""+std+"\">"+std+"</option>");
}
</script>
</select>
</td></tr>
<tr><td>Your City<font color=red>*</font> </td><td> <input name="city" value="<?php echo($city); ?>" type=text></td></tr>
<tr><td>Your Phone No.</td><td> <input name="phoneno" value="<?php echo($phoneno); ?>" type=text></td></tr>
<tr><td>Your Address </td><td> <input name="address" value="<?php echo($address); ?>" type=text></td></tr>
<tr><td>Your website </td><td> <input name="website" value="<?php echo($website); ?>" type=text></td></tr>
<tr><td> IP Address</td><td><input type=text name="ipadd" value="<?php echo($ip); ?>" readonly="ture"></td></tr>
<tr><td align="center" colspan="2"><img src="./Cap_Img.php"><br><br>
<input type="button" value="Refresh Image" onClick="window.location.href=window.location.href"></td></tr>
<tr><td colspan=2 align="center"> Please enter the string shown in the image.
<input name="number" type="text"></td><tr>
<input type=hidden value="submit" name=sub>
<tr><td colspan=2 align=center><input type=submit value="Register"></td></tr>
</form>
</td></tr></table>
<?php
}
?>
</td></tr></table></div>
</td></tr></table>
<!-- This tool is developed by HIOX INDIA. -->
<?php
include "A-footer.php";
?>