<?php
require_once("debug.php");
require_once("exceldate.php");
require_once("excelfont.php");
require_once("dataprovider.php");
//------------------------------------------------------------------------
// ABC Excel Parser Pro (ExcelFileParser class)
//
// Version: 3.0
// PHP compatibility: 4.3.x
//
//------------------------------------------------------------------------
class ExcelFileParser {
var $dp = null;
var $max_blocks;
var $max_sblocks;
// Internal variables
var $fat;
var $sfat;
// Removed: var $sbd;
// Removed: var $syear;
var $formats;
var $xf;
var $fonts;
var $dbglog;
function ExcelFileParser($logfile="",$level=ABC_NO_LOG) {
$this->dbglog = &DebugOut::getWriterSingleton($logfile,"",$level);
$this->dbglog->info("Logger started");
}
function populateFormat() {
$this->dbglog->trace(" populateFormat() function call");
$ret = array (
0=> "General",
1=> "0",
2=> "0.00",
3=> "#,##0",
4=> "#,##0.00",
5=> "($#,##0_);($#,##0)",
6=> "($#,##0_);[Red]($#,##0)",
7=> "($#,##0.00);($#,##0.00)",
8=> "($#,##0.00_);[Red]($#,##0.00)",
9=> "0%",
0xa=> "0.00%",
0xb=> "0.00E+00",
0xc=> "# ?/?",
0xd=> "# ??/??",
0xe=> "m/d/yy",
0xf=> "d-mmm-yy",
0x10=> "d-mmm",
0x11=> "mmm-yy",
0x12=> "h:mm AM/PM",
0x13=> "h:mm:ss AM/PM",
0x14=> "h:mm",
0x15=> "h:mm:ss",
0x16=> "m/d/yy h:mm",
// 0x17 - 0x24 reserved for international and undocumented
0x17=> "0x17",
0x18=> "0x18",
0x19=> "0x19",
0x1a=> "0x1a",
0x1b=> "0x1b",
0x1c=> "0x1c",
0x1d=> "0x1d",
0x1e=> "0x1e",
0x1f=> "0x1f",
0x20=> "0x20",
0x21=> "0x21",
0x22=> "0x22",
0x23=> "0x23",
0x24=> "0x24",
// 0x17 - 0x24 reserved for international and undocumented
0x25=> "(#,##0_);(#,##0)",
0x26=> "(#,##0_);[Red](#,##0)",
0x27=> "(#,##0.00_);(#,##0.00)",
0x28=> "(#,##0.00_);[Red](#,##0.00)",
0x29=> "_(*#,##0_);_(*(#,##0);_(* \"-\"_);_(@_)",
0x2a=> "_($*#,##0_);_($*(#,##0);_($* \"-\"_);_(@_)",
0x2b=> "_(*#,##0.00_);_(*(#,##0.00);_(*\"-\"??_);_(@_)",
0x2c=> "_($*#,##0.00_);_($*(#,##0.00);_($*\"-\"??_);_(@_)",
0x2d=> "mm:ss",
0x2e=> "[h]:mm:ss",
0x2f=> "mm:ss.0",
0x30=> "##0.0E+0",
0x31=> "@");
$this->dbglog->dump($ret,"\$ret");
$this->dbglog->trace("populateFormat() function return");
return $ret;
}
function xls2tstamp($date) {
$date=$date>25568?$date:25569;
/*There was a bug if Converting date before 1-1-1970 (tstamp 0)*/
$ofs=(70 * 365 + 17+2) * 86400;
return ($date * 86400) - $ofs;
}
function getDateArray($date) {
return ExcelDateUtil::getDateArray($date);
}
function isDateFormat($val){
$f_i=$this->xf['format'][$val];
if(preg_match("/[m|d|y]/i",$this->format[$f_i])!=0){
if(strrpos($this->format[$f_i],'[')!=FALSE) {
$tmp = preg_replace("/(\[\/?)(\w+)([^\]]*\])/","'\\1'.''.'\\3'",$this->format[$f_i]);
if(preg_match("/[m|d|y]/i",$tmp)!=0)
return TRUE;
else
return FALSE;
} else {
return TRUE;
}
} else
return FALSE;
}
function getUnicodeString($str,$ofs){
$size=0;
$i_ofs=0;
/* if (ord($str[$ofs])==255) {
$size=ord($str[$ofs])+ 256*(ord($str[$ofs+1]));
$i_ofs=2;
} else {*/
$size=ord($str[$ofs]);
$i_ofs=1;
/* }*/
return substr($str,$ofs+$i_ofs+1,$size);
}
function getByteString($str,$ofs){
$size=0;
$i_ofs=0;
// if (ord($str[$ofs])==255) {
// $size=ord($str[$ofs])+ 256*(ord($str[$ofs+1]));
// $i_ofs=2;
// } else {
$size=ord($str[$ofs]);
$i_ofs=1;
// }
return substr($str,$ofs+$i_ofs+1,$size);
}
/*
* Get blocks chain
*/
function get_blocks_chain($start,$small_fat=false) {
$this->dbglog->trace("get_blocks_chain(".var_export($start,true).",".var_export($small_fat,true).") function call ");
$chain = array();
$next_block = $start;
if( !$small_fat ) {
while( ($next_block!=0xfffffffe) &&
($next_block <= $this->max_blocks) &&
($next_block < count($this->fat)) )
{
$chain[] = $next_block;
$next_block = $this->fat[$next_block];
}
} else {
while( ($next_block!=0xfffffffe) &&
($next_block <= $this->max_sblocks) &&
($next_block < count($this->sfat)) )
{
$chain[] = $next_block;
$next_block = $this->sfat[$next_block];
}
}
if( $next_block != 0xfffffffe )
return false;
$this->dbglog->dump($chain,"\$chain");
$this->dbglog->trace("get_blocks_chain() function return");
return $chain;
}
/* Find stream by name
*
*/
function find_stream( $dir, $item_name,$item_num=0) {
$this->dbglog->trace("find_stream(".var_export($dir,true).",".var_export($item_name,true).",".var_export($item_num,true).") function call ");
$dt = $dir->getOrd( $item_num * 0x80 + 0x42 );
$prev = $dir->getLong( $item_num * 0x80 + 0x44 );
$next = $dir->getLong( $item_num * 0x80 + 0x48 );
$dir_ = $dir->getLong( $item_num * 0x80 + 0x4c );
$curr_name = '';
if( ($dt==2) || ($dt==5) )
for( $i=0;
$i < ( $dir->getOrd( $item_num * 0x80 + 0x40 ) +
256 * $dir->getOrd( $item_num * 0x80 + 0x41 ) )/2-1;
$i++ )
$curr_name .= $dir->getByte( $item_num * 0x80 + $i * 2 );
if( (($dt==2) || ($dt==5)) && (strcmp($curr_name,$item_name)==0) ){
$this->dbglog->trace("find_stream() function return with ".var_export($item_num,true));
return $item_num;
}
if( $prev != 0xffffffff ) {
$i = $this->find_stream( $dir, $item_name, $prev);
if( $i>=0 ){
$this->dbglog->trace("find_stream() function return with ".var_export($i,true));
return $i;
}
}
if( $next != 0xffffffff ) {
$i = $this->find_stream( $dir, $item_name, $next);
if( $i>=0 ){
$this->dbglog->trace("find_stream() function return with ".var_export($i,true));
return $i;
}
}
if( $dir_ != 0xffffffff ) {
$i = $this->find_stream( $dir, $item_name, $dir_ );
if( $i>=0 ) {
$this->dbglog->trace("find_stream() function return with ".var_export($i,true));
return $i;
}
}
$this->dbglog->trace("find_stream() function return with -1");
return -1;
}
function rk_decode($rk) {
// $this->dbglog->trace("rk_decode(".var_export($rk,true).") function call");
$res = array();
if( $rk & 2 ) {
// integer
$val = ($rk & 0xfffffffc) >> 2;
if( $rk & 1 ) $val = $val / 100;
if (((float)$val) == floor((float)$val)){
$res['val'] = (int)$val;
$res['type'] = 1;
} else {
$res['val'] = (float)$val;
$res['type'] = 2;
}
} else {
// float
$res['type'] = 2;
$frk = $rk;
$fexp = (($frk & 0x7ff00000) >> 20) - 1023;
$val = 1+(($frk & 0x000fffff) >> 2)/262144;
if( $fexp > 0 ) {
for( $i=0; $i<$fexp; $i++ )
$val *= 2;
} else {
if( $fexp==-1023 ) {
$val=0;
} else {
for( $i=0; $i<abs($fexp); $i++ )
$val /= 2;
}
}
if( $rk & 1 ) $val = $val / 100;
if( $rk & 0x80000000 ) $val = -$val;
$res['val'] = (float)$val;
}
// $this->dbglog->trace("rk_decode() function returns");
return $res;
}
// Parse worksheet
//-----------------
function parse_worksheet($ws) {
$this->dbglog->debug("parse_worksheet(DATA) function");
if( strlen($ws) <= 0 ){
$this->dbglog->trace("parse_worksheet()
没有合适的资源?快使用搜索试试~ 我知道了~
Abc.eStore.v3.0.nulled.zip_ABC
共173个文件
php:73个
gif:62个
html:24个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 16 浏览量
2022-09-24
20:27:31
上传
评论
收藏 234KB ZIP 举报
温馨提示
Store PHP script full fitur for your all
资源推荐
资源详情
资源评论
收起资源包目录
Abc.eStore.v3.0.nulled.zip_ABC (173个子文件)
style.css 10KB
style.css 2KB
file_id.diz 539B
file_id.diz 539B
image001.gif 10KB
logo01.gif 3KB
admin_logo_250.gif 2KB
estore_logo_blue.gif 2KB
box04_top.gif 455B
box04_buttom.gif 453B
box01_top.gif 363B
box02_top.gif 344B
box02_buttom.gif 343B
box01_buttom.gif 337B
box03_top.gif 336B
box03_buttom.gif 319B
add_to_cart.gif 265B
bb6.gif 224B
blue4.gif 223B
bb3.gif 223B
blue1.gif 222B
blue3.gif 222B
bb4.gif 222B
bb1.gif 221B
blue6.gif 219B
bw6.gif 213B
box05_left.gif 212B
bw4.gif 211B
box06_right.gif 211B
bw1.gif 211B
box06_left.gif 210B
bw3.gif 209B
box05_right.gif 202B
go.gif 189B
img.gif 159B
bb2.gif 132B
bb5.gif 132B
blue2.gif 132B
blue5.gif 132B
bw5.gif 118B
bw2.gif 118B
cat_nophoto.gif 100B
box01_midle.gif 99B
box02_midle.gif 85B
box04_midle.gif 80B
bullet.gif 80B
box03_midle.gif 79B
box06_center.gif 64B
box05_center.gif 64B
blue_right.gif 60B
bb_right.gif 60B
blue_left.gif 60B
bb_left.gif 60B
vert_line01.gif 54B
bw_left.gif 54B
bw_rigth.gif 54B
nophoto_small.gif 45B
nophoto.gif 45B
nophoto.gif 45B
bb_bg.gif 44B
bw_bg.gif 44B
z.gif 43B
stat_green.gif 43B
stat_blue.gif 43B
stat_red.gif 43B
spacer.gif 43B
ABC_eStore_users_guide.htm 134KB
order.html 9KB
customer.html 7KB
index.html 6KB
left.html 5KB
account.html 5KB
header.html 4KB
view_order.html 3KB
view_cart.html 3KB
right.html 3KB
view_product.html 3KB
tellafriend.html 3KB
search.html 2KB
orders.html 2KB
password.html 1KB
privacy.html 688B
footer.html 456B
index.html 0B
index.html 0B
index.html 0B
index.html 0B
index.html 0B
index.html 0B
index.html 0B
index.html 0B
xlupload.lock 13B
gtt_released.nfo 6KB
gtt_released.nfo 6KB
excelparser.php 29KB
settings.inc.php 26KB
install.php 17KB
edit_product.php 16KB
template.inc.php 15KB
edit_settings.php 15KB
共 173 条
- 1
- 2
资源评论
weixin_42653672
- 粉丝: 93
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功