Ignore:
Timestamp:
Dec 23, 2007, 2:55:36 PM (17 years ago)
Author:
george
Message:

Minimanager 0.1.6b

File:
1 edited

Legend:

Unmodified
Added
Removed
  • minimanager/register.php

    r147 r178  
    1515function doregister(){
    1616 global $lang_global, $realm_db, $disable_acc_creation, $limit_acc_per_ip, $valid_ip_mask,
    17                 $send_mail_on_creation, $create_acc_locked, $from_mail, $mailer_type, $smtp_cfg, $title, $MaximumAccountCount;
     17                $send_mail_on_creation, $create_acc_locked, $from_mail, $mailer_type, $smtp_cfg, $title;
    1818
    1919 if ( empty($_POST['pass']) || empty($_POST['email']) || empty($_POST['username']) ) {
    2020   redirect("register.php?err=1");
    2121 }
    22 
    23  $sql = new SQL;
    24  $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);
    25 
    26   $result = $sql->query("SELECT COUNT(*) FROM account");
    27   $AccountCount = $sql->result($result, 0, 'COUNT(*)');
    28   if($AccountCount >= $MaximumAccountCount) redirect("register.php?err=4");
    2922
    3023 if ($disable_acc_creation) redirect("register.php?err=4");
     
    307300        $body = str_replace("<password>", substr(sha1(strtoupper($user_name)),0,7), $body);
    308301        $body = str_replace("<activate_link>",
    309                 $_SERVER['HTTP_HOST'].substr($_SERVER["SCRIPT_NAME"], 0, strrpos($_SERVER["SCRIPT_NAME"], '/'))."/register.php?action=do_pass_activate&amp;h=".$sql->result($result, 0, 'I')."&amp;p=".substr(sha1(strtoupper($user_name)),0,7), $body);
     302                $_SERVER['HTTP_HOST']."/register.php?action=do_pass_activate&amp;h=".$sql->result($result, 0, 'I')."&amp;p=".substr(sha1(strtoupper($user_name)),0,7), $body);
    310303        $body = str_replace("<base_url>", $_SERVER['HTTP_HOST'], $body);
    311304
Note: See TracChangeset for help on using the changeset viewer.