Skip to content
This repository has been archived by the owner on Apr 2, 2021. It is now read-only.

Commit

Permalink
Update to last opennos db's
Browse files Browse the repository at this point in the history
  • Loading branch information
fmohican committed Apr 16, 2017
1 parent 3f55494 commit 7725dd5
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion account.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
echo "<h1 style='color:whitesmoke;'>You'r password are too weak, try another one.</h1>";
break;
case "authfail":
echo "<h1 style='color:whitesmoke;'>Authentification failed!</h1>";
echo "<h1 style='color:whitesmoke;text-align:center;text-align:-webkit-center;'>Authentification failed!</h1>";
break;
case "gfail":
echo "<h1 style='color:whitesmoke;'>Sorry but you don't pass captcha test. Are you a robot?!</h1>";
Expand Down
6 changes: 3 additions & 3 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
?>
<html>
<head>
<title><?= $title?></title>
<title><?php echo $title;?></title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
Expand Down Expand Up @@ -166,13 +166,13 @@
?>
<input type='hidden' name='passkey' value='<?= $secret?>'>
<center><button type='submit' class='btn btn-success'>Register</button>
<? if(!empty($dl['1']))
<?php if(!empty($dl['1']))
echo "<div class='btn btn-info' style='margin-left:5px;' data-toggle='modal' data-target='#myModal'><a style='color:white !important;font-weight:700;text-decoration:none'><i class='fa fa-cloud-download'></i> Download</a></div>";?>
</center>
</form>
</div>
</div>
<?
<?php
if(!empty($dl['1'])) {
echo '
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
Expand Down
11 changes: 7 additions & 4 deletions mail.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -881,14 +881,17 @@ function forgotmail($email, $mailtoken)

function rank($data) {
switch ($data) {
case "-1":
return "Unverified user";
case "2":
return "Admin";
break;
case "1":
return "Moderator";
break;
case "0":
return "Confirmed User";
break;
case "2":
return "Admin";
case "-1":
return "Unverified user";
break;
case "-2":
return "Banned";
Expand Down
11 changes: 5 additions & 6 deletions register.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,18 @@
if($restul < 1)
{
$pass = hash("sha512", $pass);
$session = rand(1,9).rand(0,9);
if($sendverification == true){
$mailtoken = $passkey.$pass.$user.$data.$ip.$passkey.$title.$email.$session;
$mailtoken = $passkey.$pass.$user.$data.$ip.$passkey.$title.$email;
$mailtoken = md5(md5($mailtoken).md5($mailtoken).$data.$ip);
$sql = "INSERT INTO Account (Name, Password, Authority, LastSession, LastCompliment, Email, RegistrationIP, VerificationToken) VALUES ( ?, ?, '-1', ?, ?, ?, ?, ?)";
$params = array($user, $pass, $session, $data, $email, $ip, $mailtoken);
$sql = "INSERT INTO Account (Name, Password, Authority, Email, RegistrationIP, VerificationToken) VALUES ( ?, ?, '-1', ?, ?, ?)";
$params = array($user, $pass, $email, $ip, $mailtoken);
$result = sqlsrv_query($mssql, $sql, $params);
registermail($email, $mailtoken, $user);
exit(header("Location: index.php?reg=success&user=$user&mail=$email"));
}
else{
$sql = "INSERT INTO Account (Name, Password, Authority, LastSession, LastCompliment, Email, RegistrationIP, VerificationToken) VALUES ( ?, ?, '0', ?, ?, ?, ?, 'yes')";
$params = array($user, $pass, $session, $data, $email, $ip);
$sql = "INSERT INTO Account (Name, Password, Authority, Email, RegistrationIP, VerificationToken) VALUES ( ?, ?, '0', ?, ?, 'yes')";
$params = array($user, $pass, $email, $ip);
$result = sqlsrv_query($mssql, $sql, $params);
exit(header("Location: index.php?reg=sucess&user=$user"));
}
Expand Down

0 comments on commit 7725dd5

Please sign in to comment.