<?
// Security
define("opendomains", true);
session_start();
// include
include('include/config.php');
include('include/function.php');
include('include/mysql.php');
include("lang/".$config[lang]."/login.php");
include("lang/".$config[lang]."/register.php");
// security
if(!$_SERVER['HTTP_REFERER']) {
header("location: http://opendomains.vnn.bz");
}
function no($text) {
echo "<script language='Javascript'>
alert(\"".$text."\");
</script>";
}
?>
<script language="JavaScript"><!--
if (parent == self) {
top.location.href = 'http://opendomains.vnn.bz';
}
function set(div,html) {
eval("var dv = top.document.getElementById('" + div + "');");
eval("dv.innerHTML = html;");
}
//--></script>
<?
$scode=$_POST['txtcode'];
$email=kiemtra(0,$_POST['txtemail'],0,5,80,$lang["please_check_your_email"],0);
$account=kiemtra(0,$_POST['txtdomain'],0,4,80,$lang["please_check_your_account"],0);
// check email
if(!ereg("^[a-zA-Z0-9_\-\.]+@[a-zA-Z0-9\-\.]+.[a-zA-Z0-9\-\.]+$",$email)) {
no($lang["please_check_your_email"]);
stopme();
}
if($scode==$_SESSION['code']) {
$query=mysql_query("select * from `cl_domains` where wemail='$email'");
$html=$lang["request_pass"]." <br>";
$dem=0;
while($ht=mysql_fetch_array($query)) {
$html.="Domain: $ht[wdomain].$ht[wexe] <br>";
$html.="Password: $ht[wpass] <br>";
$dem++;
}
if($dem>0) {
no($lang["click_to_send"]);
$html.="Login URL:".$web[config][website];
mail($email, $lang["sub_request"], $html ,"From: ".$config[website]." <".$web[config][email].">\nReply-To: ".$web[config][email]."\r\nContent-Type: text/html");
$_SESSION['code']=rand(10000,99999);
no($lang["check_mail"]);
} else {
no($lang["no_account"]);
}
?>
<script language="javascript">
top.location='index.php';
</script>
<?
}
else {
no($lang["security_error"]);
}
?>