Changeset 73
- Timestamp:
- Sep 15, 2007, 9:59:22 PM (17 years ago)
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
minimanager/register.php
r60 r73 13 13 // DO REGISTER 14 14 //##################################################################################################### 15 function doregister(){ 15 function doregister() 16 { 16 17 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 ;18 $send_mail_on_creation, $create_acc_locked, $from_mail, $mailer_type, $smtp_cfg, $title, $MaximumAccountCount; 18 19 19 20 if ( empty($_POST['pass']) || empty($_POST['email']) || empty($_POST['username']) ) { … … 21 22 } 22 23 24 $result = $sql->query("SELECT COUNT(*) FROM account"); 25 $AccountCount = $sql->result($result, 0, 'COUNT(*)'); 26 if($AccountCount > $MaximumAccountCount) redirect("register.php?err=4"); 27 23 28 if ($disable_acc_creation) redirect("register.php?err=4"); 24 29 -
minimanager/scripts/config.sample.php
r67 r73 72 72 //---- New account creation Options ---- 73 73 if($AllowedRegistrationCountPerDay == 0) $disable_acc_creation = true; //true = Do not allow new accounts to be created 74 else $disable_acc_creation = false; 74 else $disable_acc_creation = false; 75 //$MaximumAccountCount = 10000; // Total account count limitation 76 75 77 $send_mail_on_creation = false; //true = send mail at account creation. 76 78 $create_acc_locked = 0; //if set to '1' newly created accounts will be made locked to 0.0.0.0 IP disallowing user to login. -
registrace/check_registration.php
r67 r73 1 1 <?php 2 2 include('../global.php'); 3 4 $Database->select_db('realmd'); 5 $DbResult = $Database->query('SELECT COUNT(*) FROM account'); 6 $Row = $DbResult->fetch_array(); 7 $AccountCount = $Row[0]; 3 8 4 9 $Database->select_db('statistic'); … … 13 18 fputs($ConfigFile, '$AllowedRegistrationCountPerDay = '.$AllowedRegistrationCountPerDay.';'."\n"); 14 19 fputs($ConfigFile, '$YesterdayMaxPlayers = '.$YesterdayMaxPlayers.'; '."\n"); 20 fputs($ConfigFile, '$MaximumAccountCount = '.($AccountCount+$AllowedRegistrationCountPerDay).'; '."\n"); 15 21 fputs($ConfigFile, '?>'."\n"); 16 22 fclose($ConfigFile); -
registrace/reg_config.php
r67 r73 2 2 $AllowedRegistrationCountPerDay = 0; 3 3 $YesterdayMaxPlayers = 91; 4 $MaximumAccountnCount = 0; 4 5 ?>
Note:
See TracChangeset
for help on using the changeset viewer.