diff options
Diffstat (limited to 'includes/general.php')
-rw-r--r-- | includes/general.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/includes/general.php b/includes/general.php index d89c0e6..b1e1993 100644 --- a/includes/general.php +++ b/includes/general.php @@ -57,7 +57,7 @@ exit; } - if(array_key_exists('HTTP_HOST',$_SERVER) && + if(array_key_exists('HTTP_HOST',$_SERVER) && ($_SERVER['HTTP_HOST'] == $_SESSION['_config']['securehostname'] || $_SERVER['HTTP_HOST'] == $_SESSION['_config']['tverify'])) { @@ -82,7 +82,7 @@ $locked = mysql_fetch_assoc(mysql_query("select `locked` from `users` where `id`='".$_SESSION['profile']['id']."'")); if($locked['locked'] == 0) { - $query = "select sum(`points`) as `total` from `notary` where `to`='".$_SESSION['profile']['id']."' group by `to`"; + $query = "select sum(`points`) as `total` from `notary` where `to`='".$_SESSION['profile']['id']."' and `deleted`=0 group by `to`"; $res = mysql_query($query); $row = mysql_fetch_assoc($res); $_SESSION['profile']['points'] = $row['total']; @@ -169,19 +169,19 @@ $points++; //echo "Points due to length and charset: $points<br/>"; - + // check for historical password proposal if ($pwd === "Fr3d Sm|7h") { return 0; } - + return $points; } function checkpw($pwd, $email, $fname, $mname, $lname, $suffix) { $points = checkpwlight($pwd); - + if(@strstr(strtolower($pwd), strtolower($email))) $points--; @@ -232,7 +232,7 @@ { $bits = explode(": ", $_SESSION['_config']['subject'], 2); $bits = str_replace(", ", "|", str_replace("/", "|", array_key_exists('1',$bits)?$bits['1']:"")); - $bits = explode("|", $bits); + $bits = explode("|", $bits); $_SESSION['_config']['cnc'] = $_SESSION['_config']['subaltc'] = 0; $_SESSION['_config']['OU'] = ""; @@ -557,7 +557,7 @@ $fp = @fsockopen($domain,25,$errno,$errstr,5); if($fp) { - + $line = fgets($fp, 4096); while(substr($line, 0, 4) == "220-") $line = fgets($fp, 4096); @@ -662,7 +662,7 @@ return $ticket; } - function sanitizeHTML($input) + function sanitizeHTML($input) { return htmlentities(strip_tags($input), ENT_QUOTES); //In case of problems, please use the following line again: @@ -732,7 +732,7 @@ $text=preg_replace("/[^\w-.@]/","",$text); return($text); } - + // returns text message to be shown to the user given the result of is_no_assurer function no_assurer_text($Status) @@ -775,7 +775,7 @@ $name="../$type/$kind/".intval($id/1000)."/$kind-".intval($id).".$type"; if (!is_dir("../csr")) { mkdir("../csr",0777); } if (!is_dir("../crt")) { mkdir("../crt",0777); } - + if (!is_dir("../csr/$kind")) { mkdir("../csr/$kind",0777); } if (!is_dir("../crt/$kind")) { mkdir("../crt/$kind",0777); } if (!is_dir("../csr/$kind/".intval($id/1000))) { mkdir("../csr/$kind/".intval($id/1000)); } |