pal Pizza aux Lentilles
Un petit outil de blogging sans prétention

 

Browse the code

Differences between 42 and 43 on /.
Number of edited files: 1 (0 added, 0 deleted and 1 modified)
Author: DiGk
Log message:
Date: 2009-01-14 22:13:25

Added file(s) Deleted file(s) Modified file(s)

 

Old New Code
1 1
<?php
2 2

                                        
3  
// Unzip/Zip class
4 3

                                        
5 4
class zip {
6 5

                                        
10 9
	var $old_offset = 0;
11 10
	var $dirs = Array(".");
12 11

                                        
13  
	function get_List($zip_name) {
  12
	public function get_List($zip_name) {
14 13
   		$zip = @fopen($zip_name, 'rb');
15 14
   		if(!$zip) return(0);
16 15
   		$centd = $this->ReadCentralDir($zip,$zip_name);
171 170
   		return $stat;
172 171
 	}
173 172
 	
174  
 	function ReadFileHeader($zip) {
  173
 	public function ReadFileHeader($zip) {
175 174
    	$binary_data = fread($zip, 30);
176 175
    	$data = unpack('vchk/vid/vversion/vflag/vcompression/vmtime/vmdate/Vcrc/Vcompressed_size/Vsize/vfilename_len/vextra_len', $binary_data);
177 176

                                        
204 203
    	return $header;
205 204
  	}
206 205
  	
207  
  	function ReadCentralFileHeaders($zip) {
  206
  	public function ReadCentralFileHeaders($zip) {
208 207
    	$binary_data = fread($zip, 46);
209 208
    	$header = unpack('vchkid/vid/vversion/vversion_extracted/vflag/vcompression/vmtime/vmdate/Vcrc/Vcompressed_size/Vsize/vfilename_len/vextra_len/vcomment_len/vdisk/vinternal/Vexternal/Voffset', $binary_data);
210 209

                                        
236 235
    	return $header;
237 236
 	}
238 237
 	
239  
 	function ReadCentralDir($zip, $zip_name) {
  238
 	public function ReadCentralDir($zip, $zip_name) {
240 239
  		$size = filesize($zip_name);
241 240
  		if ($size < 277) { $maximum_size = $size; }
242 241
  		else { $maximum_size=277; }
243 242