Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
<?php
extract($HTTP_GET_VARS);
extract($HTTP_POST_VARS);
if($sid!=""){
session_id($sid);
}
session_start(); // start up your PHP session!
$sess_id=session_id();
include("conf.php");
$db=mysql_connect($db_host,$database_user,$database_pass) or die("<b>MySQL Error:</b> Unable to connect to database please check that you have provided the correct <li>Database Login username<li>Database Login Password"); //Connect to database or give error if failed
mysql_select_db($db_name,$db)or die("<b>MySQL Error:</b> Unable to select database please check that you have provided the correct <li>Database name");
?>
<HTML>
<head><style type="text/css">
TD {
FONT-SIZE: 12px; COLOR: #000000; FONT-FAMILY: Verdana
}
BODY {
FONT-SIZE: 12px; COLOR: #000000; FONT-FAMILY: Verdana
}
INPUT {
FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana; border-width:2px;
}
A:link {text-decoration: none; color: #2E26CD;}
A:visited {text-decoration: none; color: #2E26CD;}
A:hover {text-decoration: none; color: #990000; font-style: normal; background-color: transparent; text-decoration: underline position: relative; top: 1.5px; left: 1.5px;}
HR{
COLOR:#AFC6DB;HEIGHT:1px;
}
</style>
</head>
<BODY>
<Table cellspacing=2 border=0><TR><TD width=5%><img src='img/host.gif'><FONT SIZE="3" COLOR="#3333FF"><B>Member</B></FONT> <FONT SIZE="4" COLOR="#000000"><B>Control Panel</B></FONT></TD></TR></Table><center>
<?php
if(!isset($_SESSION['loged'])){
echo"<Table width=100%><TR bgcolor=#AFC6DB><TD align=right> </TD></TR></Table>";
}
if($action=="logout"){
if(isset($_SESSION['loged'])){
@session_destroy();
echo "<BR><BR>You are loged out.";
echo "<Table><TD><img src='img/host.gif'></TD><TD><FONT SIZE=4 COLOR=#000000>Login</FONT></TD></Table><br><form method=post action=members.php><Table cellspacing=4 style=\"BORDER:#3399FF 1px solid;BACKGROUND:#F9F9F9;\" width=35%><tr><td width=14% ><font size=-1>Username:</font></td><td width=187><input type=text name=username size=20></td></tr><tr><td width=14%>Password:</td><td><input type=password name=password ></td></tr><tr><td width=59></td><td><input type=submit name=submit value=Submit></td></tr></table><BR><Table border=0><TR><TD>Not a member? <A HREF=\"index.php?action=join\">Join</A></TD></TR><TR><TD><a href='index.php?action=forgot'>Forgot Password</a></TD></TR></Table>";
}
}
if($action=="join"){
echo "<center>";
if(strlen($id)>"3" && strlen($id)<="10" && strlen($pass)>"3"){
$id=strtolower($id);
if($pass==$cpass){
if(substr_count($email,"@")=="1"){
$prev=mysql_query("SELECT * FROM mhp_user WHERE uid='$id'");
$cnt=mysql_num_rows($prev);
$prev1=mysql_query("SELECT * FROM mhp_user WHERE uemail='$email'");
$cnt1=mysql_num_rows($prev1);
if($cnt==1||$cnt1==1){
echo "This username already exists, please choose another username.";
}else{
if(substr_count($id," ")==0 && substr_count($id,"?")==0 && substr_count($id,"#")==0&&substr_count($id,";")==0&&substr_count($id,"+")==0&&substr_count($id,",")==0&& substr_count($id,"'")==0){
//////////Proceed Signup!//////////////////////
$ip = getenv(REMOTE_ADDR);
$dt=date('D M:d:Y');
$tm=time()-111000000;
$signup=@mysql_query("INSERT INTO mhp_user SET uid='$id',upass='$pass',uemail='$email',uname='$name',date='$dt',status='unconfirmed',activation='$tm',ip='$ip'");
$link1=getenv(HTTP_HOST);
$link2=$_SERVER["PHP_SELF"];
$blink=$link1.$link2;
$link="http://$blink?action=verify&cid=$tm&uid=$id";
$bc=mysql_query("SELECT * FROM mhp_admin");
$adminifo=mysql_fetch_array($bc);
$mess="Dear $name,\nIn order to activate your account you need to verify your email address, click the link below to verify your email address:\n$link\nRegards\n$company";
$subject="Please verify your email";
$mailheaders="Return-path: $adminifo[company] <$adminifo[admin_email]>\n";
$mailheaders.="From: $adminifo[company] <$adminifo[admin_email]>\n";
$mailheaders.="Reply-To: $adminifo[admin_email]\n";
$set=mail(trim($email), $subject, $mess, $mailheaders);
if($set){
echo "A verification link has been sent to your email address, click that link to verify your email and activate your account.";
}else{
echo "Email could not be sent to your address, please verify that you have provided correct email.";
}
$do="donr";
///////////////////////////////////////
}else{
echo "<font color=red>Your ID contains an invalid character.</font>";
}
}
}else{
echo "<font color=red>Please provide a valid email.</font>";
}
}else{
echo "<font color=red>Password and confirm password do not match.</font>";
}
}elseif(strlen($id)<="3" && strlen($id)>"10" && $_POST['id']==true){
echo "Your username or password is too short or too long!";
}
if($do!="donr"){
echo "<H2>Signup, its FREE!</H2>";
echo "<form method=post><center><Table cellspacing=4 style=\"BORDER:#AFC6DB 1px solid;BACKGROUND:#F9F9F9;\" width=80%>
<TR><TD width=30%>Full Name:</TD><TD><input type=text name=name></TD></TR>
<TR><TD width=30%>Login ID:</TD><TD><input type=text name=id> 4-10 characters</TD></TR>
<TR><TD width=30%>Email:</TD><TD><input type=text name=email> Must be valid</TD></TR>
<TR><TD width=30%>Password:</TD><TD><input type=password name=pass> 4-10 characters</TD></TR>
<TR><TD width=30%>Confirm Password:</TD><TD><input type=password name=cpass></TD></TR>
<TR><TD><BR></TD><TD>By clicking the button below you agree to our <a href='index.php?action=terms'><B>terms and conditions</B></a></TD></TR>
<TR><TD><BR>All fields are required<BR></TD><TD><input type=submit value=' Signup '></TD></TR>
</Table><BR></Center></form>";
}
}
if($action=="terms"){
include "terms.txt";
}
if($action=="verify"){
////////////////////////////////////Verification Starts Here///////////////
if($cid!=""){
$seek=mysql_query("SELECT * FROM mhp_user WHERE uid='$uid' AND status='unconfirmed'");
$cvou=mysql_num_rows($seek);
if($cvou=="1"){
$nimo=mysql_fetch_array($seek);
$seek=mysql_query("UPDATE mhp_user SET status='confirmed' WHERE uid='$uid'");
@mkdir("users/$uid");
$mk=@fopen("users/$uid.txt","w");
@fwrite($mk,"0");
@fclose($mk);
$mk=@fopen("users/$uid/index.html","w");
@fwrite($mk,"<HTML><HEAD><TITLE>$uid Homepage</TITLE></HEAD><BODY><H3>You are seeing this webpage, since you have not yet uploaded your home page, please upload your website as soon as possible, all inactive users are deleted without any warning.</H3></BODY></HTML>");
@fclose($mk);
echo "<b>Your email has been verified, you may now login to your account and upload your website.</b><BR>";
echo "<Table><TD><img src='img/host.gif'></TD><TD><FONT SIZE=4 COLOR=#000000>Login</FONT></TD></Table><br><form method=post action=members.php><Table cellspacing=4 style=\"BORDER:#3399FF 1px solid;BACKGROUND:#F9F9F9;\" width=35%><tr><td width=14% ><font size=-1>Username:</font></td><td width=187><input type=text name=username size=20></td></tr><tr><td width=14%>Password:</td><td><input type=password name=password ></td></tr><tr><td width=59></td><td><input type=submit name=submit value=Submit></td></tr></table><BR><Table border=0><TR><TD>Not a member? <A HREF=\"index.php?action=join\">Join</A></TD></TR><TR><TD><a href='index.php?action=forgot'>Forgot Password</a></TD></TR></Table>";
$link1=getenv(HTTP_HOST);
$link2=$_SERVER["PHP_SELF"];
$blink=$link1.$link2;
$link="http://$blink";
$bc=mysql_query("SELECT * FROM mhp_admin");
$adminifo=mysql_fetch_array($bc);
$mess="Dear $nimo[uname],\nThank you for your registration at $adminifo[company]\nHere is your login information:\nUsername:$nimo[uid]\nPassword:$nimo[upass]\nYou may now start uploading your website by logging on to:\n$link\nHere is the link for your homepage:\nhttp://$link1/users/$nimo[uid]\nRegards\n$adminifo[company]";
$subject="Thank you for your registration at $adminifo[company]";
$mailheaders="Return-path: $adminifo[company] <$adminifo[admin_email]>\n";
$mailheaders.="From: $adminifo[company] <$adminifo[admin_email]>\n";
$mailheaders.="Reply-To: $adminifo[admin_email]\n";
$set=mail(trim($nimo[uemail]), $subject, $mess, $mailheaders);
}
}else{
echo "Error!, please paste the given link in your browser.";
}
////////////////////////////////////Ends Here///////////////////////////////
}
if($action=="forgot"){
////////////////////////////////////Forgot///////////////
if($_POST['email']==true){
$seek=mysql_query("SELECT * FROM mhp_user WHERE uemail='$email' AND status='confirmed'");
$cvou=mysql_num_rows($seek);
if($cvou=="1"){
$nimo=mysql_fetch_array($seek);
//////////////////////////////////////
$bc=mysql_query("SELECT * FROM mhp_admin");
$adminifo=mysql_fetch_array($bc);
$mess="Dear $nimo[uname],\nHere is your login information:\nUsername:$nimo[uid]\nPassword:$nimo[upass]\nRegards\n$adminifo[company]";
$subject="Your login details at $adminifo[company]";
$mailheaders="Return-path: $adminifo[company] <$adminifo[admin_email]>\n";
$mailheaders.="From: $adminifo[company] <$adminifo[admin_email]>\n";
$mailheaders.="Reply-To: $adminifo[admin_email]\n";
$set=mail(trim($nimo[uemail]), $subject, $mess, $mailheaders);
if($set){
echo "<center>Email has been sent to your email with your login details.</center>";
}else{
echo "Mail could not be sent, please contact the administrator and inform about this error.";
}
//////////////////////////////////////
}else{
echo "<form method=post action=?action=forgot><BR><font color=red><b>This email does not exist in our database.</b></font><BR><BR><Table cellspacing=4 style=\"BORDER:#3399FF 1px solid;BACKGROUND:#F9F9F9;\" width=35%><tr><td width=14%><font size=-1>Email:</font></td><td width=187><input type=text name=email size=28></td><TR><TD></TD><TD><input type=submit value=' Submit '></TD></TR></Table></form>";
}
}else{
echo "<Table><TD><img src='img/host.gif'></TD><TD><FONT SIZE=4 COLOR=#000000>Forgot Password?</FONT></TD></Table><br>Enter your email address you used for signup, your login details will be emailed to you.<form method=post action=members.php?action=forgot><Table cellspacing=4 style=\"BORDER:#3399FF 1px solid;BACKGROUND:#F9F9F9;\" width=35%><tr><td width=14%><font size=-1>Email:</font></td><td width=187><input type=text name=email size=28></td><TR><TD></TD><TD><input type=submit value=' Submit '></TD></TR></Table>";
}
////////////////////////////////////Ends Here///////////////////////////////
}
if($action=="login"){
echo "<H3>Login:</H3>";
echo "<table border=0 cellpadding=0 cellspacing=0><TD><img src='img/host.gif'></TD><TD><FONT SIZE=4 COLOR=#000000>Login</FONT></TD></Table><br><form method=post action=members.php><table width=80% border=0 cellspacing=2 cellpadding=2><tr><td width=14% ><font size=-1>Username:</font></td><td width=187><input type=text name=username size=20></td></tr><tr><td width=14%>Password:</td><td><input type=password name=password ></td></tr><tr><td width=59></td><td><input type=submit name=submit value=Submit></td></tr></table><BR><table><tr><td>Not a member <A HREF=\"?action=join\">Join</A></td></tr><tr><td><a href='?action=forgot'>Forgot Password</a></td></tr></table></form></TD></Table></TD>";
}
if($action==""){
if(isset($_SESSION['loged'])){
$bn=base64_decode($_SESSION['loged']);
$list=mysql_query("SELECT * FROM mhp_user WHERE uid='$bn'");
$num=mysql_num_rows($list);
}else{
$list=mysql_query("SELECT * FROM mhp_user WHERE uid='$username' && upass='$password' && status='confirmed'");
$list2=mysql_query("SELECT * FROM mhp_user WHERE uid='$username' && upass='$password' && status='unconfirmed'");
$num=mysql_num_rows($list);
$num1=mysql_num_rows($list2);
}
if($num1==1){
echo "<font color=red>Your email has yet not been verified, please check your email.</font>";
}else if($num==1){
$inf=mysql_fetch_array($list);
$_SESSION['loged'] = base64_encode($inf['uid']);
$new_message=0;
$udir=base64_decode($_SESSION['loged']);
$um=file("users/spc.txt");
$used_spc=dir_size("users/$udir")/1024;
if($used_spc>=1024){
$esize=round(($used_spc/1024),2);
$ext="Mb";
}else{
$esize=round($used_spc,2);
$ext="Kb";
}
$bc=$used_spc/(1024);
$ratio=round(($bc/$um[0]),3);
if ($ratio>0.9){
$bg="#FF0000";
}else{
$bg="#009966";
}
$wdt=$ratio*100;
$left=100-$wdt;
include "mem.php";
}else{
if($_POST['username']==true){
echo "<font color=red>Invalid Login ID/Password</font>";
}
echo "<Table><TD><img src='img/host.gif'></TD><TD><FONT SIZE=4 COLOR=#000000>Login</FONT></TD></Table><br><form method=post action=members.php><Table cellspacing=4 style=\"BORDER:#3399FF 1px solid;BACKGROUND:#F9F9F9;\" width=35%><tr><td width=14% ><font size=-1>Username:</font></td><td width=187><input type=text name=username size=20></td></tr><tr><td width=14%>Password:</td><td><input type=password name=password ></td></tr><tr><td width=59></td><td><input type=submit name=submit value=Submit></td></tr></table><BR><Table border=0><TR><TD>Not a member? <A HREF=\"index.php?action=join\">Join</A></TD></TR><TR><TD><a href='index.php?action=forgot'>Forgot Password</a></TD></TR></Table>";
}
}
function dir_size($dir)
{
$handle = opendir($dir);
while ($file = readdir($handle)) {
if ($file!= '..' && $file!= '.' &&!is_dir($dir.'/'.$file)) {
$mas += filesize($dir.'/'.$file);
} else if (is_dir($dir.'/'.$file) && $file!= '..' && $file!= '.') {
$mas += dir_size($dir.'/'.$file);
}
}
return $mas;
}
?>
</center>
<BR><BR><BR><Table width=100% align=center><TR bgcolor=#AFC6DB><TD> Можеби искате нещо по сериозно ? <b>www.z-bg.com<b> </TD></TR></Table>
</BODY>
</HTML>
<?php
extract($HTTP_GET_VARS);
extract($HTTP_POST_VARS);
if($sid!=""){
session_id($sid);
}
session_start(); // start up your PHP session!
$sess_id=session_id();
include("conf.php");
$db=mysql_connect($db_host,$database_user,$database_pass) or die("<b>MySQL Error:</b> Unable to connect to database please check that you have provided the correct <li>Database Login username<li>Database Login Password"); //Connect to database or give error if failed
mysql_select_db($db_name,$db)or die("<b>MySQL Error:</b> Unable to select database please check that you have provided the correct <li>Database name");
?>
<HTML>
<head><style type="text/css">
TD {
FONT-SIZE: 12px; COLOR: #000000; FONT-FAMILY: Verdana
}
BODY {
FONT-SIZE: 12px; COLOR: #000000; FONT-FAMILY: Verdana
}
INPUT {
FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana; border-width:2px;
}
A:link {text-decoration: none; color: #2E26CD;}
A:visited {text-decoration: none; color: #2E26CD;}
A:hover {text-decoration: none; color: #990000; font-style: normal; background-color: transparent; text-decoration: underline position: relative; top: 1.5px; left: 1.5px;}
HR{
COLOR:#AFC6DB;HEIGHT:1px;
}
</style>
</head>
<BODY>
<Table cellspacing=2 border=0><TR><TD width=5%><img src='img/host.gif'><FONT SIZE="3" COLOR="#3333FF"><B>Member</B></FONT> <FONT SIZE="4" COLOR="#000000"><B>Control Panel</B></FONT></TD></TR></Table><center>
<?php
if(!isset($_SESSION['loged'])){
echo"<Table width=100%><TR bgcolor=#AFC6DB><TD align=right> </TD></TR></Table>";
}
if($action=="logout"){
if(isset($_SESSION['loged'])){
@session_destroy();
echo "<BR><BR>You are loged out.";
echo "<Table><TD><img src='img/host.gif'></TD><TD><FONT SIZE=4 COLOR=#000000>Login</FONT></TD></Table><br><form method=post action=members.php><Table cellspacing=4 style=\"BORDER:#3399FF 1px solid;BACKGROUND:#F9F9F9;\" width=35%><tr><td width=14% ><font size=-1>Username:</font></td><td width=187><input type=text name=username size=20></td></tr><tr><td width=14%>Password:</td><td><input type=password name=password ></td></tr><tr><td width=59></td><td><input type=submit name=submit value=Submit></td></tr></table><BR><Table border=0><TR><TD>Not a member? <A HREF=\"index.php?action=join\">Join</A></TD></TR><TR><TD><a href='index.php?action=forgot'>Forgot Password</a></TD></TR></Table>";
}
}
if($action=="join"){
echo "<center>";
if(strlen($id)>"3" && strlen($id)<="10" && strlen($pass)>"3"){
$id=strtolower($id);
if($pass==$cpass){
if(substr_count($email,"@")=="1"){
$prev=mysql_query("SELECT * FROM mhp_user WHERE uid='$id'");
$cnt=mysql_num_rows($prev);
$prev1=mysql_query("SELECT * FROM mhp_user WHERE uemail='$email'");
$cnt1=mysql_num_rows($prev1);
if($cnt==1||$cnt1==1){
echo "This username already exists, please choose another username.";
}else{
if(substr_count($id," ")==0 && substr_count($id,"?")==0 && substr_count($id,"#")==0&&substr_count($id,";")==0&&substr_count($id,"+")==0&&substr_count($id,",")==0&& substr_count($id,"'")==0){
//////////Proceed Signup!//////////////////////
$ip = getenv(REMOTE_ADDR);
$dt=date('D M:d:Y');
$tm=time()-111000000;
$signup=@mysql_query("INSERT INTO mhp_user SET uid='$id',upass='$pass',uemail='$email',uname='$name',date='$dt',status='unconfirmed',activation='$tm',ip='$ip'");
$link1=getenv(HTTP_HOST);
$link2=$_SERVER["PHP_SELF"];
$blink=$link1.$link2;
$link="http://$blink?action=verify&cid=$tm&uid=$id";
$bc=mysql_query("SELECT * FROM mhp_admin");
$adminifo=mysql_fetch_array($bc);
$mess="Dear $name,\nIn order to activate your account you need to verify your email address, click the link below to verify your email address:\n$link\nRegards\n$company";
$subject="Please verify your email";
$mailheaders="Return-path: $adminifo[company] <$adminifo[admin_email]>\n";
$mailheaders.="From: $adminifo[company] <$adminifo[admin_email]>\n";
$mailheaders.="Reply-To: $adminifo[admin_email]\n";
$set=mail(trim($email), $subject, $mess, $mailheaders);
if($set){
echo "A verification link has been sent to your email address, click that link to verify your email and activate your account.";
}else{
echo "Email could not be sent to your address, please verify that you have provided correct email.";
}
$do="donr";
///////////////////////////////////////
}else{
echo "<font color=red>Your ID contains an invalid character.</font>";
}
}
}else{
echo "<font color=red>Please provide a valid email.</font>";
}
}else{
echo "<font color=red>Password and confirm password do not match.</font>";
}
}elseif(strlen($id)<="3" && strlen($id)>"10" && $_POST['id']==true){
echo "Your username or password is too short or too long!";
}
if($do!="donr"){
echo "<H2>Signup, its FREE!</H2>";
echo "<form method=post><center><Table cellspacing=4 style=\"BORDER:#AFC6DB 1px solid;BACKGROUND:#F9F9F9;\" width=80%>
<TR><TD width=30%>Full Name:</TD><TD><input type=text name=name></TD></TR>
<TR><TD width=30%>Login ID:</TD><TD><input type=text name=id> 4-10 characters</TD></TR>
<TR><TD width=30%>Email:</TD><TD><input type=text name=email> Must be valid</TD></TR>
<TR><TD width=30%>Password:</TD><TD><input type=password name=pass> 4-10 characters</TD></TR>
<TR><TD width=30%>Confirm Password:</TD><TD><input type=password name=cpass></TD></TR>
<TR><TD><BR></TD><TD>By clicking the button below you agree to our <a href='index.php?action=terms'><B>terms and conditions</B></a></TD></TR>
<TR><TD><BR>All fields are required<BR></TD><TD><input type=submit value=' Signup '></TD></TR>
</Table><BR></Center></form>";
}
}
if($action=="terms"){
include "terms.txt";
}
if($action=="verify"){
////////////////////////////////////Verification Starts Here///////////////
if($cid!=""){
$seek=mysql_query("SELECT * FROM mhp_user WHERE uid='$uid' AND status='unconfirmed'");
$cvou=mysql_num_rows($seek);
if($cvou=="1"){
$nimo=mysql_fetch_array($seek);
$seek=mysql_query("UPDATE mhp_user SET status='confirmed' WHERE uid='$uid'");
@mkdir("users/$uid");
$mk=@fopen("users/$uid.txt","w");
@fwrite($mk,"0");
@fclose($mk);
$mk=@fopen("users/$uid/index.html","w");
@fwrite($mk,"<HTML><HEAD><TITLE>$uid Homepage</TITLE></HEAD><BODY><H3>You are seeing this webpage, since you have not yet uploaded your home page, please upload your website as soon as possible, all inactive users are deleted without any warning.</H3></BODY></HTML>");
@fclose($mk);
echo "<b>Your email has been verified, you may now login to your account and upload your website.</b><BR>";
echo "<Table><TD><img src='img/host.gif'></TD><TD><FONT SIZE=4 COLOR=#000000>Login</FONT></TD></Table><br><form method=post action=members.php><Table cellspacing=4 style=\"BORDER:#3399FF 1px solid;BACKGROUND:#F9F9F9;\" width=35%><tr><td width=14% ><font size=-1>Username:</font></td><td width=187><input type=text name=username size=20></td></tr><tr><td width=14%>Password:</td><td><input type=password name=password ></td></tr><tr><td width=59></td><td><input type=submit name=submit value=Submit></td></tr></table><BR><Table border=0><TR><TD>Not a member? <A HREF=\"index.php?action=join\">Join</A></TD></TR><TR><TD><a href='index.php?action=forgot'>Forgot Password</a></TD></TR></Table>";
$link1=getenv(HTTP_HOST);
$link2=$_SERVER["PHP_SELF"];
$blink=$link1.$link2;
$link="http://$blink";
$bc=mysql_query("SELECT * FROM mhp_admin");
$adminifo=mysql_fetch_array($bc);
$mess="Dear $nimo[uname],\nThank you for your registration at $adminifo[company]\nHere is your login information:\nUsername:$nimo[uid]\nPassword:$nimo[upass]\nYou may now start uploading your website by logging on to:\n$link\nHere is the link for your homepage:\nhttp://$link1/users/$nimo[uid]\nRegards\n$adminifo[company]";
$subject="Thank you for your registration at $adminifo[company]";
$mailheaders="Return-path: $adminifo[company] <$adminifo[admin_email]>\n";
$mailheaders.="From: $adminifo[company] <$adminifo[admin_email]>\n";
$mailheaders.="Reply-To: $adminifo[admin_email]\n";
$set=mail(trim($nimo[uemail]), $subject, $mess, $mailheaders);
}
}else{
echo "Error!, please paste the given link in your browser.";
}
////////////////////////////////////Ends Here///////////////////////////////
}
if($action=="forgot"){
////////////////////////////////////Forgot///////////////
if($_POST['email']==true){
$seek=mysql_query("SELECT * FROM mhp_user WHERE uemail='$email' AND status='confirmed'");
$cvou=mysql_num_rows($seek);
if($cvou=="1"){
$nimo=mysql_fetch_array($seek);
//////////////////////////////////////
$bc=mysql_query("SELECT * FROM mhp_admin");
$adminifo=mysql_fetch_array($bc);
$mess="Dear $nimo[uname],\nHere is your login information:\nUsername:$nimo[uid]\nPassword:$nimo[upass]\nRegards\n$adminifo[company]";
$subject="Your login details at $adminifo[company]";
$mailheaders="Return-path: $adminifo[company] <$adminifo[admin_email]>\n";
$mailheaders.="From: $adminifo[company] <$adminifo[admin_email]>\n";
$mailheaders.="Reply-To: $adminifo[admin_email]\n";
$set=mail(trim($nimo[uemail]), $subject, $mess, $mailheaders);
if($set){
echo "<center>Email has been sent to your email with your login details.</center>";
}else{
echo "Mail could not be sent, please contact the administrator and inform about this error.";
}
//////////////////////////////////////
}else{
echo "<form method=post action=?action=forgot><BR><font color=red><b>This email does not exist in our database.</b></font><BR><BR><Table cellspacing=4 style=\"BORDER:#3399FF 1px solid;BACKGROUND:#F9F9F9;\" width=35%><tr><td width=14%><font size=-1>Email:</font></td><td width=187><input type=text name=email size=28></td><TR><TD></TD><TD><input type=submit value=' Submit '></TD></TR></Table></form>";
}
}else{
echo "<Table><TD><img src='img/host.gif'></TD><TD><FONT SIZE=4 COLOR=#000000>Forgot Password?</FONT></TD></Table><br>Enter your email address you used for signup, your login details will be emailed to you.<form method=post action=members.php?action=forgot><Table cellspacing=4 style=\"BORDER:#3399FF 1px solid;BACKGROUND:#F9F9F9;\" width=35%><tr><td width=14%><font size=-1>Email:</font></td><td width=187><input type=text name=email size=28></td><TR><TD></TD><TD><input type=submit value=' Submit '></TD></TR></Table>";
}
////////////////////////////////////Ends Here///////////////////////////////
}
if($action=="login"){
echo "<H3>Login:</H3>";
echo "<table border=0 cellpadding=0 cellspacing=0><TD><img src='img/host.gif'></TD><TD><FONT SIZE=4 COLOR=#000000>Login</FONT></TD></Table><br><form method=post action=members.php><table width=80% border=0 cellspacing=2 cellpadding=2><tr><td width=14% ><font size=-1>Username:</font></td><td width=187><input type=text name=username size=20></td></tr><tr><td width=14%>Password:</td><td><input type=password name=password ></td></tr><tr><td width=59></td><td><input type=submit name=submit value=Submit></td></tr></table><BR><table><tr><td>Not a member <A HREF=\"?action=join\">Join</A></td></tr><tr><td><a href='?action=forgot'>Forgot Password</a></td></tr></table></form></TD></Table></TD>";
}
if($action==""){
if(isset($_SESSION['loged'])){
$bn=base64_decode($_SESSION['loged']);
$list=mysql_query("SELECT * FROM mhp_user WHERE uid='$bn'");
$num=mysql_num_rows($list);
}else{
$list=mysql_query("SELECT * FROM mhp_user WHERE uid='$username' && upass='$password' && status='confirmed'");
$list2=mysql_query("SELECT * FROM mhp_user WHERE uid='$username' && upass='$password' && status='unconfirmed'");
$num=mysql_num_rows($list);
$num1=mysql_num_rows($list2);
}
if($num1==1){
echo "<font color=red>Your email has yet not been verified, please check your email.</font>";
}else if($num==1){
$inf=mysql_fetch_array($list);
$_SESSION['loged'] = base64_encode($inf['uid']);
$new_message=0;
$udir=base64_decode($_SESSION['loged']);
$um=file("users/spc.txt");
$used_spc=dir_size("users/$udir")/1024;
if($used_spc>=1024){
$esize=round(($used_spc/1024),2);
$ext="Mb";
}else{
$esize=round($used_spc,2);
$ext="Kb";
}
$bc=$used_spc/(1024);
$ratio=round(($bc/$um[0]),3);
if ($ratio>0.9){
$bg="#FF0000";
}else{
$bg="#009966";
}
$wdt=$ratio*100;
$left=100-$wdt;
include "mem.php";
}else{
if($_POST['username']==true){
echo "<font color=red>Invalid Login ID/Password</font>";
}
echo "<Table><TD><img src='img/host.gif'></TD><TD><FONT SIZE=4 COLOR=#000000>Login</FONT></TD></Table><br><form method=post action=members.php><Table cellspacing=4 style=\"BORDER:#3399FF 1px solid;BACKGROUND:#F9F9F9;\" width=35%><tr><td width=14% ><font size=-1>Username:</font></td><td width=187><input type=text name=username size=20></td></tr><tr><td width=14%>Password:</td><td><input type=password name=password ></td></tr><tr><td width=59></td><td><input type=submit name=submit value=Submit></td></tr></table><BR><Table border=0><TR><TD>Not a member? <A HREF=\"index.php?action=join\">Join</A></TD></TR><TR><TD><a href='index.php?action=forgot'>Forgot Password</a></TD></TR></Table>";
}
}
function dir_size($dir)
{
$handle = opendir($dir);
while ($file = readdir($handle)) {
if ($file!= '..' && $file!= '.' &&!is_dir($dir.'/'.$file)) {
$mas += filesize($dir.'/'.$file);
} else if (is_dir($dir.'/'.$file) && $file!= '..' && $file!= '.') {
$mas += dir_size($dir.'/'.$file);
}
}
return $mas;
}
?>
</center>
<BR><BR><BR><Table width=100% align=center><TR bgcolor=#AFC6DB><TD> Можеби искате нещо по сериозно ? <b>www.z-bg.com<b> </TD></TR></Table>
</BODY>
</HTML>