Fichiers qui ont rien a faire là, vieux de 5 ans.
This commit is contained in:
		
							parent
							
								
									5e99c9b587
								
							
						
					
					
						commit
						f0fbf8d428
					
				|  | @ -510,8 +510,6 @@ nightlybuild/nightly.key -text | ||||||
| po/alternc-admintools.pot -text | po/alternc-admintools.pot -text | ||||||
| po/fr/LC_MESSAGES/.svnignore -text | po/fr/LC_MESSAGES/.svnignore -text | ||||||
| po/fr/LC_MESSAGES/alternc-admintools.po -text | po/fr/LC_MESSAGES/alternc-admintools.po -text | ||||||
| /quota_delete -text |  | ||||||
| /quota_init -text |  | ||||||
| /repos-to-tx.sh -text | /repos-to-tx.sh -text | ||||||
| selenium/20120826-alternc-panel-testsuite.html -text | selenium/20120826-alternc-panel-testsuite.html -text | ||||||
| selenium/README -text | selenium/README -text | ||||||
|  |  | ||||||
							
								
								
									
										46
									
								
								quota_delete
								
								
								
								
							
							
						
						
									
										46
									
								
								quota_delete
								
								
								
								
							|  | @ -1,46 +0,0 @@ | ||||||
| #!/usr/bin/php -q |  | ||||||
| <?php |  | ||||||
| 
 |  | ||||||
| /* |  | ||||||
|  This script delete completely a quota from the quota managment system. |  | ||||||
|  (this script may be used when removing an AlternC module) |  | ||||||
| 
 |  | ||||||
|  $argv[1] = The named quota to create |  | ||||||
| */ |  | ||||||
| 
 |  | ||||||
| if ($argc!=2) { |  | ||||||
| 	echo "Usage : ".$argv[0]." <quota name> |  | ||||||
|  Delete completely a quota from the quota managment system. |  | ||||||
| "; |  | ||||||
| 	return 1; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| $name=$argv[1]; |  | ||||||
| 
 |  | ||||||
| include("/var/alternc/bureau/class/local.php"); |  | ||||||
| 
 |  | ||||||
| if (!mysql_connect($L_MYSQL_HOST,$L_MYSQL_LOGIN,$L_MYSQL_PWD)) { |  | ||||||
| 	echo "Cannot connect to Mysql !\n"; |  | ||||||
| 	return 1; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| if (!mysql_select_db($L_MYSQL_DATABASE)) { |  | ||||||
| 	echo "Cannot connect to Mysql database $L_MYSQL_DATABASE !\n"; |  | ||||||
| 	return 1; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| $r=mysql_query("DELETE FROM defquotas WHERE quota='$name';"); |  | ||||||
| if (mysql_errno()) { |  | ||||||
| 	echo "Mysql Error : ".mysql_error()."\n"; |  | ||||||
| 	return 1; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| $r=mysql_query("DELETE FROM quotas WHERE name='$name';"); |  | ||||||
| if (mysql_errno()) { |  | ||||||
| 	echo "Mysql Error : ".mysql_error()."\n"; |  | ||||||
| 	return 1; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| return 0; |  | ||||||
| 
 |  | ||||||
| ?> |  | ||||||
							
								
								
									
										62
									
								
								quota_init
								
								
								
								
							
							
						
						
									
										62
									
								
								quota_init
								
								
								
								
							|  | @ -1,62 +0,0 @@ | ||||||
| #!/usr/bin/php -q |  | ||||||
| <?php |  | ||||||
| 
 |  | ||||||
| /* |  | ||||||
|  This script create a quota entry for each existing user. |  | ||||||
|  and set the default quota to the specified value. |  | ||||||
|  (this script may be used when installing / upgrading an AlternC module) |  | ||||||
| 
 |  | ||||||
|  $argv[1] = The named quota to create |  | ||||||
|  $argv[2] = The default quota value for each user. |  | ||||||
| */ |  | ||||||
| 
 |  | ||||||
| if ($argc!=3) { |  | ||||||
| 	echo "Usage : ".$argv[0]." <quota name> <quota value> |  | ||||||
|  Create a quota entry for each existing user and set the default quota to the  |  | ||||||
|  specified value. |  | ||||||
| "; |  | ||||||
| 	return 1; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| $name=$argv[1]; |  | ||||||
| $quota=$argv[2]; |  | ||||||
| 
 |  | ||||||
| include("/var/alternc/bureau/class/local.php"); |  | ||||||
| 
 |  | ||||||
| if (!mysql_connect($L_MYSQL_HOST,$L_MYSQL_LOGIN,$L_MYSQL_PWD)) { |  | ||||||
| 	echo "Cannot connect to Mysql !\n"; |  | ||||||
| 	return 1; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| if (!mysql_select_db($L_MYSQL_DATABASE)) { |  | ||||||
| 	echo "Cannot connect to Mysql database $L_MYSQL_DATABASE !\n"; |  | ||||||
| 	return 1; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| $r=mysql_query("DELETE FROM defquotas WHERE quota='$name';"); |  | ||||||
| if (mysql_errno()) { |  | ||||||
| 	echo "Mysql Error : ".mysql_error()."\n"; |  | ||||||
| 	return 1; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| $r=mysql_query("INSERT INTO defquotas (quota,value) VALUES ('$name','$quota');"); |  | ||||||
| if (mysql_errno()) { |  | ||||||
| 	echo "Mysql Error : ".mysql_error()."\n"; |  | ||||||
| 	return 1; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| $r=mysql_query("SELECT uid FROM membres;"); |  | ||||||
| if (mysql_errno()) { |  | ||||||
|         echo "Mysql Error : ".mysql_error()."\n"; |  | ||||||
|         return 1; |  | ||||||
| } |  | ||||||
| while ($c=mysql_fetch_array($r)) { |  | ||||||
| 	$s=mysql_query("SELECT name FROM quotas WHERE uid='$c[uid]' AND name='$name';"); |  | ||||||
| 	if (!mysql_num_rows($s)) { |  | ||||||
| 		mysql_query("INSERT INTO quotas (uid,name,total) VALUES ('$c[uid]','$name','$value');"); |  | ||||||
| 	} |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| return 0; |  | ||||||
| 
 |  | ||||||
| ?> |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 Alan Garcia
						Alan Garcia