You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			25 lines
		
	
	
		
			651 B
		
	
	
	
		
			PHP
		
	
			
		
		
	
	
			25 lines
		
	
	
		
			651 B
		
	
	
	
		
			PHP
		
	
| <?php
 | |
| /*
 | |
|  * Created on 12.07.2008
 | |
|  *
 | |
|  * @copyright (c) 2009 animegame.eu
 | |
|  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
 | |
|  *
 | |
|  */
 | |
| 
 | |
| function createAbholcode($charid){
 | |
|  	$code = mt_rand(0, 44*$charid);
 | |
|  	$code = md5($code.time());
 | |
|  	mysql_query('DELETE from char_abholcodes where charid = '.$charid);
 | |
|  	mysql_query('INSERT INTO char_abholcodes(charid, code) values('.$charid.', \''.$code.'\')');
 | |
| }
 | |
|  
 | |
| function checkAbholcode($charid, $code){
 | |
|  	$code_row = mysql_fetch_assoc(mysql_query('Select * from char_abholcodes where charid = '.$charid));
 | |
|  	if($code_row){
 | |
|  		return $code == $code_row['code'];
 | |
|  	}
 | |
|  	return true;
 | |
| }
 | |
| ?>
 |