
$S3SubmittedData = $this -> getRowById(389, $DeleteID);

define('S3_Development_Key', $S3SubmittedData['Collection_389_2'] );
define('S3_Development_Secret', $S3SubmittedData['Collection_389_3']);
require_once $_SERVER['DOCUMENT_ROOT'].'/classes/StorageS3Amazon/sdk.class.php';

$BucketName = $S3SubmittedData['Collection_389_4'];

try {
						
						$s3 = new AmazonS3();
						
						$response = $s3->get_bucket_list();
						
						
						$response = $s3->delete_bucket($BucketName);
						
																	
						if (!$response->isOK())
						{
										$ruleErrors[] = 'There was an error connecting to S3. Failed deleting bucket ' . addslashes($BucketName) . '. The bucket might not be empty. If you belive it is empty, please try again. ';
						}
											
						
												
}						
catch(Exception $ex) {
				
						$ruleErrors[] = 'There was an error deleting S3, bucket name ' . addslashes($BucketName) . '. Please check the keys and bucket name.';
}			