Source for file zip.lib.php
Documentation is available at zip.lib.php
/** ensure this file is being included by a parent file */
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
// $Id: zip.lib.php,v 1.1 2005/07/22 01:53:54 eddieajau Exp $
// The "GNU General Public License" (GPL) is available at
// http://www.gnu.org/copyleft/gpl.html.
// http://www.zend.com/codex.php?id=535&single=1
// By Eric Mueller <eric@themepark.com>
// http://www.zend.com/codex.php?id=470&single=1
// by Denis125 <webmaster@atlant.ru>
// A patch from Peter Listiak <mlady@users.sourceforge.net> for last modified
// date and time of the compressed file
// Official ZIP file format: http://www.pkware.com/appnote.txt
// ensure this file is being included by a parent file
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
if ($timearray['year'] <
1980) {
$timearray['year'] =
1980;
$timearray['minutes'] =
0;
$timearray['seconds'] =
0;
return (($timearray['year'] -
1980) <<
25) |
($timearray['mon'] <<
21) |
($timearray['mday'] <<
16) |
($timearray['hours'] <<
11) |
($timearray['minutes'] <<
5) |
($timearray['seconds'] >>
1);
function addFile($data, $name, $time =
0) {
$hexdtime =
'\x' .
$dtime[6] .
$dtime[7] .
'\x' .
$dtime[4] .
$dtime[5] .
'\x' .
$dtime[2] .
$dtime[3] .
'\x' .
$dtime[0] .
$dtime[1];
eval
('$hexdtime = "' .
$hexdtime .
'";');
$fr =
"\x50\x4b\x03\x04\x14\x00\x00\x00\x08\x00" .
$hexdtime;
$cdrec =
"\x50\x4b\x01\x02\x00\x00\x14\x00\x00\x00\x08\x00" .
$hexdtime .
pack('V', $crc) .
pack('V', $c_len) .
pack('V', $unc_len) .
pack('v', strlen($name)) .
pack('v', 0) .
pack('v', 0) .
pack('v', 0) .
pack('v', 0) .
pack('V', 32) .
pack('V', $this -> old_offset );
Documentation generated on Mon, 05 May 2008 16:24:37 +0400 by phpDocumentor 1.4.0