source: branches/MootoolsFileManager-Update/plugins/MootoolsFileManager/mootools-filemanager/Assets/Connector/Assets/getid3/module.misc.msoffice.php @ 1300

Last change on this file since 1300 was 1300, checked in by gogo, 8 years ago

Update the MootoolsFileManager? to the latest cpojer with some modifications.
Add a demo for the MFM examples/mootools-file-manager.php
Change the default config for ImageManager? and ExtendedFileManager? for added security.

File size: 1.5 KB
Line 
1<?php
2/////////////////////////////////////////////////////////////////
3/// getID3() by James Heinrich <info@getid3.org>               //
4//  available at http://getid3.sourceforge.net                 //
5//            or http://www.getid3.org                         //
6/////////////////////////////////////////////////////////////////
7// See readme.txt for more details                             //
8/////////////////////////////////////////////////////////////////
9//                                                             //
10// module.archive.doc.php                                      //
11// module for analyzing MS Office (.doc, .xls, etc) files      //
12// dependencies: NONE                                          //
13//                                                            ///
14/////////////////////////////////////////////////////////////////
15
16
17class getid3_msoffice
18{
19
20        function getid3_msoffice(&$fd, &$ThisFileInfo) {
21                fseek($fd, $ThisFileInfo['avdataoffset'], SEEK_SET);
22                $DOCFILEheader = fread($fd, 8);
23                $magic = "\xD0\xCF\x11\xE0\xA1\xB1\x1A\xE1";
24                if (substr($DOCFILEheader, 0, 8) != $magic) {
25                        $ThisFileInfo['error'][] = 'Expecting "'.getid3_lib::PrintHexBytes($magic).'" at '.$ThisFileInfo['avdataoffset'].', found '.getid3_lib::PrintHexBytes(substr($DOCFILEheader, 0, 8)).' instead.';
26                        return false;
27                }
28                $ThisFileInfo['fileformat'] = 'msoffice';
29
30$ThisFileInfo['error'][] = 'MS Office (.doc, .xls, etc) parsing not enabled in this version of getID3() [v'.GETID3_VERSION.']';
31return false;
32
33        }
34
35}
36
37
38?>
Note: See TracBrowser for help on using the repository browser.