Autor 
      Wiadomość 
    
    
		Zamknięty przez: qbs  Sob 27 Maj, 2006		  
	
			Registeration daily limits  
    
   
               
      
         
		  qbs    		  
		  
          
                  Posty: 598 Piwa: 353 /29  Skąd: wroc?aw  
                
      
         
            
               			   Wysłany: Sob 27 Maj, 2006   Registeration daily limits 
                                 
               Adres forum:  n/a                                
                     
             
            
                
             
            
               Modyfikacja dodaj?ca mozliwosc nalozenia dziennego limitu rejestracji. limit zmieniamy modyfikujac wartosc zmiennej $regs_per_day 
 
 
 
plik usercp_register.php 
 
 
  Kod --- [ find ] -----
 
 
 
if ( !defined('IN_PHPBB') )
 
{
 
	die('Hacking attempt');
 
	exit;
 
}
 
 
 
 
--- [ after add ] -----
 
 
 
 
// registeration daily limits
 
$regs_per_day = 20;
 
$last_reg_date = date("Y-m-d");
 
 
function update_reg_data()
 
{
 
	global $board_config, $db;
 
	$sql = "update " . CONFIG_TABLE . " set config_value = '" . ($board_config['this_day_reg_count'] + 1) . "' where config_name = 'this_day_reg_count'";
 
	if ( !$db->sql_query($sql) )
 
	{
 
		message_die(GENERAL_ERROR, 'Could not update forum configuration', '', __LINE__, __FILE__, $sql);
 
	}
 
	sql_cache('clear', 'board_config');
 
}
 
 
if ( $last_reg_date )
 
{
 
	$clear_cache = 0;
 
	if ( !isset($board_config['last_reg_date']) )
 
	{
 
		$sql = "insert into " . CONFIG_TABLE . " ( config_name, config_value )
 
			values ('last_reg_date', '$last_reg_date')";
 
		if ( !$db->sql_query($sql) )
 
		{
 
                        message_die(GENERAL_ERROR, 'Could not update forum configuration', '', __LINE__, __FILE__, $sql);
 
		}
 
		$clear_cache = 1;
 
		$board_config['last_reg_date'] = $last_reg_date;
 
	}
 
	if ( !isset($board_config['this_day_reg_count']) )
 
	{
 
		$sql = "insert into " . CONFIG_TABLE . " ( config_name, config_value )
 
			values ('this_day_reg_count', '0')";
 
		if ( !$db->sql_query($sql) )
 
		{
 
                        message_die(GENERAL_ERROR, 'Could not update forum configuration', '', __LINE__, __FILE__, $sql);
 
		}
 
		$clear_cache = 1;
 
		$board_config['this_day_reg_count'] = 0;
 
	}
 
	if ( $board_config['last_reg_date'] != $last_reg_date )
 
	{
 
		$sql_a = "update " . CONFIG_TABLE . " set config_value = '$last_reg_date' where config_name = 'last_reg_date'";
 
		$sql_b = "update " . CONFIG_TABLE . " set config_value = '0' where config_name = 'this_day_reg_count'";
 
		if ( !$db->sql_query($sql_a) || !$db->sql_query($sql_b) )
 
		{
 
			message_die(GENERAL_ERROR, 'Could not update forum configuration', '', __LINE__, __FILE__, $sql_a . '<hr />' . $sql_b);
 
		}
 
		$board_config['last_reg_date'] = $last_reg_date;
 
		$board_config['this_day_reg_count'] = 0;
 
		$clear_cache = 1;
 
	}
 
	if ( $clear_cache )
 
	{
 
		sql_cache('clear', 'board_config');
 
	}
 
}
 
else
 
{
 
	message_die(GENERAL_MESSAGE, 'last_reg_date variable is empty, for help check <a href="http://mody.lastinn.info" target="_blank">http://mody.lastinn.info</a>');
 
}
 
 
if ( $board_config['this_day_reg_count'] > $regs_per_day )
 
{
 
	message_die(GENERAL_MESSAGE, 'Witaj go¶ciu, niestety dzienny limit rejestracji zosta? wyczerpany, prosimy spr?bowa? w dniu jutrzejszym.');
 
}
 
 
 
--- [ find ] -----
 
 
 
			if ( !($result = $db->sql_query($sql, BEGIN_TRANSACTION)) )
 
			{
 
				message_die(GENERAL_ERROR, 'Could not insert data into users table', '', __LINE__, __FILE__, $sql);
 
			}
 
 
 
--- [ after add ] -----
 
 
 
                        // registeration daily limits
 
			else
 
			{
 
				update_reg_data();
 
			}
 
 
 
 
ciekawe jak dziala to odkrywanie hide'ow     
 
przypominam ze do rozmow odnosnie modyfikacji sluzy dzial offtopic: http://mody.lastinn.info/forum,2.html   
             
						
				_________________ixdude.com  
 
i have been waiting, all of my life, for you to come along and make everything all right. my body shaking, right through the bones, so take my by the hand, please don't leave me here alone. and i wonder if you know just how i feel, i feel... yeah... and i wonder how i know it is... it's real... it's real. coz' i want you to save me, just please save me, save me... coz' i need you to save me, just please save me, save me...   
			 
						         
       
    
	
		
						 					 
		
			
       
    
	  
      
	 
    
   
	Więcej szczegółów  
	Wystawiono 29 piw(a):tjon , mck1964 , SoNiAk , geman  , Kica , MrK , DeX , Graffi , kontra , ZaMeR , Loud , ORI  , Kula , kastak , Kaka22 , Leone , rutek , elymus , Dervish , colir , Renger , m1chu , garcu , marcinn12 , pichus , Slavikord , KaweX , mmat2 , Beg For Mercy   
    
   
         
      
         
       
    
   
      Nie możesz  pisać nowych tematówNie możesz  odpowiadać w tematachNie możesz  zmieniać swoich postówNie możesz  usuwać swoich postówNie możesz  głosować w ankietachNie możesz  załączać plików na tym forumMożesz  ściągać załączniki na tym forum 
      Dodaj temat do Ulubionych Wersja do druku  
    
 
 
   
	 
Za treść postów administracja nie odpowiada. W przypadku naruszenia prawa, wszelkie zgromadzone dane o osobie łamiącej prawo, zostaną przekazane odpowiednim władzom. Kopiowanie elementów graficznych oraz rozwiązań technologicznych zastosowanych na niniejszej witrynie surowo wzbronione .