Subversion Repositories Sites.obs-saisons.fr

Rev

Rev 31 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 31 Rev 262
Line 1185... Line 1185...
1185
        preg_match("/\$?([A-I]?[A-Z])\$?(\d+)/",$cell,$match);
1185
        preg_match("/\$?([A-I]?[A-Z])\$?(\d+)/",$cell,$match);
1186
        $col     = $match[1];
1186
        $col     = $match[1];
1187
        $row     = $match[2];
1187
        $row     = $match[2];
Line 1188... Line 1188...
1188
    
1188
    
1189
        // Convert base26 column string to number
1189
        // Convert base26 column string to number
1190
        $chars = split('', $col);
1190
        $chars = explode('', $col);
1191
        $expn  = 0;
1191
        $expn  = 0;
Line 1192... Line 1192...
1192
        $col   = 0;
1192
        $col   = 0;
1193
    
1193
    
Line 1215... Line 1215...
1215
    {
1215
    {
1216
        $password = 0x0000;
1216
        $password = 0x0000;
1217
        $i        = 1;       // char position
1217
        $i        = 1;       // char position
Line 1218... Line 1218...
1218
 
1218
 
1219
        // split the plain text password in its component characters
1219
        // split the plain text password in its component characters
1220
        $chars = preg_split('//', $plaintext, -1, PREG_SPLIT_NO_EMPTY);
1220
        $chars = preg_explode('//', $plaintext, -1, PREG_SPLIT_NO_EMPTY);
1221
        foreach($chars as $char)
1221
        foreach($chars as $char)
1222
        {
1222
        {
1223
            $value        = ord($char) << $i;   // shifted ASCII value 
1223
            $value        = ord($char) << $i;   // shifted ASCII value 
1224
            $rotated_bits = $value >> 15;       // rotated bits beyond bit 15
1224
            $rotated_bits = $value >> 15;       // rotated bits beyond bit 15
Line 1683... Line 1683...
1683
    
1683
    
1684
        // Pack the option flags
1684
        // Pack the option flags
Line 1685... Line 1685...
1685
        $options     = pack("V", 0x03);
1685
        $options     = pack("V", 0x03);
1686
    
1686
    
1687
        // Convert URL to a null terminated wchar string
1687
        // Convert URL to a null terminated wchar string
Line 1688... Line 1688...
1688
        $url         = join("\0", preg_split("''", $url, -1, PREG_SPLIT_NO_EMPTY));
1688
        $url         = join("\0", preg_explode("''", $url, -1, PREG_SPLIT_NO_EMPTY));
1689
        $url         = $url . "\0\0\0";
1689
        $url         = $url . "\0\0\0";
Line 1745... Line 1745...
1745
    
1745
    
1746
        // Pack the option flags
1746
        // Pack the option flags
Line 1747... Line 1747...
1747
        $options     = pack("V", 0x08);
1747
        $options     = pack("V", 0x08);
1748
    
1748
    
1749
        // Convert the URL type and to a null terminated wchar string
1749
        // Convert the URL type and to a null terminated wchar string
Line 1750... Line 1750...
1750
        $url         = join("\0", preg_split("''", $url, -1, PREG_SPLIT_NO_EMPTY));
1750
        $url         = join("\0", preg_explode("''", $url, -1, PREG_SPLIT_NO_EMPTY));
1751
        $url         = $url . "\0\0\0";
1751
        $url         = $url . "\0\0\0";
Line 1828... Line 1828...
1828
        }
1828
        }
Line 1829... Line 1829...
1829
    
1829
    
1830
        // Determine if the link contains a sheet reference and change some of the
1830
        // Determine if the link contains a sheet reference and change some of the
1831
        // parameters accordingly.
1831
        // parameters accordingly.
1832
        // Split the dir name and sheet name (if it exists)
1832
        // Split the dir name and sheet name (if it exists)
1833
        list($dir_long , $sheet) = split('/\#/', $url);
1833
        list($dir_long , $sheet) = explode('/\#/', $url);
Line 1834... Line 1834...
1834
        $link_type               = 0x01 | $absolute;
1834
        $link_type               = 0x01 | $absolute;
1835
    
1835
    
1836
        if (isset($sheet)) {
1836
        if (isset($sheet)) {
1837
            $link_type |= 0x08;
1837
            $link_type |= 0x08;
1838
            $sheet_len  = pack("V", strlen($sheet) + 0x01);
1838
            $sheet_len  = pack("V", strlen($sheet) + 0x01);
1839
            $sheet      = join("\0", split('', $sheet));
1839
            $sheet      = join("\0", explode('', $sheet));
1840
            $sheet     .= "\0\0\0";
1840
            $sheet     .= "\0\0\0";
1841
        }
1841
        }
1842
        else {
1842
        else {
Line 1853... Line 1853...
1853
    
1853
    
1854
        // Store the short dos dir name (null terminated)
1854
        // Store the short dos dir name (null terminated)
Line 1855... Line 1855...
1855
        $dir_short   = preg_replace('/\.\.\\/', '', $dir_long) . "\0";
1855
        $dir_short   = preg_replace('/\.\.\\/', '', $dir_long) . "\0";
1856
    
1856
    
1857
        // Store the long dir name as a wchar string (non-null terminated)
1857
        // Store the long dir name as a wchar string (non-null terminated)
Line 1858... Line 1858...
1858
        $dir_long       = join("\0", split('', $dir_long));
1858
        $dir_long       = join("\0", explode('', $dir_long));
1859
        $dir_long       = $dir_long . "\0";
1859
        $dir_long       = $dir_long . "\0";
1860
    
1860