• 大小: 14.52MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-07-14
  • 语言: PHP
  • 标签:

资源简介

后台:http://504.sucaishui.com/admin 用户名:admin 密码:123456 前台:http://504.sucaishui.com 用户名:sucaihuo 密码:123456 支付密码:123456

资源截图

代码片段和文件信息

/*
 * YUI Compressor
 * http://developer.yahoo.com/yui/compressor/
 * Author: Julien Lecomte -  http://www.julienlecomte.net/
 * Author: Isaac Schlueter - http://foohack.com/
 * Author: Stoyan Stefanov - http://phpied.com/
 * Copyright (c) 2011 Yahoo! Inc.  All rights reserved.
 * The copyrights embodied in the content of this file are licensed
 * by Yahoo! Inc. under the BSD (revised) open source license.
 */
package com.yahoo.platform.yui.compressor;

import java.io.IOException;
import java.io.Reader;
import java.io.Writer;
import java.util.regex.Pattern;
import java.util.regex.Matcher;
import java.util.ArrayList;

public class CssCompressor {

    private StringBuffer srcsb = new StringBuffer();

    public CssCompressor(Reader in) throws IOException {
        // Read the stream...
        int c;
        while ((c = in.read()) != -1) {
            srcsb.append((char) c);
        }
    }

    // Leave data urls alone to increase parse performance.
    protected String extractDataUrls(String css ArrayList preservedTokens) {

     int maxIndex = css.length() - 1;
        int appendIndex = 0;

     StringBuffer sb = new StringBuffer();

        Pattern p = Pattern.compile(“url\\(\\s*([\“‘]?)data\\:“);
        Matcher m = p.matcher(css);
        
        /* 
         * Since we need to account for non-base64 data urls we need to handle 
         * ‘ and ) being part of the data string. Hence switching to indexOf
         * to determine whether or not we have matching string terminators and
         * handling sb appends directly instead of using matcher.append* methods.
         */

        while (m.find()) {

         int startIndex = m.start() + 4;   // “url(“.length()
     String terminator = m.group(1);     // ‘ “ or empty (not quoted)
    
     if (terminator.length() == 0) {
       terminator = “)“;
     }

     boolean foundTerminator = false;

     int endIndex = m.end() - 1;
     while(foundTerminator == false && endIndex+1 <= maxIndex) {
     endIndex = css.indexOf(terminator endIndex+1);

     if ((endIndex > 0) && (css.charAt(endIndex-1) != ‘\\‘)) {
     foundTerminator = true;
     if (!“)“.equals(terminator)) {
     endIndex = css.indexOf(“)“ endIndex); 
     }
     }
     }

     // Enough searching start moving stuff over to the buffer
sb.append(css.substring(appendIndex m.start()));

     if (foundTerminator) {
     String token = css.substring(startIndex endIndex);
     token = token.replaceAll(“\\s+“ ““);
     preservedTokens.add(token);

     String preserver = “url(___YUICSSMIN_PRESERVED_TOKEN_“ + (preservedTokens.size() - 1) + “___)“;
     sb.append(preserver);

     appendIndex = endIndex + 1;
     } else {
     // No end terminator found re-add the whole match. Should we throw/warn here?
     sb.append(css.substring(m.start() m.end()));
     appendIndex = m.end();
     }
        }

        sb.append(css.substring(appendIndex));

        return sb.toString();

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-10-22 16:20  504_直销双轨\
     目录           0  2017-10-22 16:20  504_直销双轨\admin\
     文件         156  2016-10-10 08:48  504_直销双轨\admin\index.php
     目录           0  2017-10-22 16:20  504_直销双轨\app\
     文件      149297  2016-10-10 08:48  504_直销双轨\app\areadata.js
     目录           0  2017-10-22 16:20  504_直销双轨\app\control\
     文件        8870  2016-10-10 08:48  504_直销双轨\app\control\control.css
     文件       25802  2016-10-10 08:48  504_直销双轨\app\control\control.js
     目录           0  2017-10-22 16:20  504_直销双轨\app\control\images\
     文件        3897  2016-10-10 08:48  504_直销双轨\app\control\images\5-121204193R0-50.gif
     文件        2608  2016-10-10 08:48  504_直销双轨\app\control\images\5-121204194112.gif
     文件        1074  2016-10-10 08:48  504_直销双轨\app\control\images\a-back.png
     文件        1138  2016-10-10 08:48  504_直销双轨\app\control\images\a-ok.png
     文件        1577  2016-10-10 08:48  504_直销双轨\app\control\images\Alert.png
     文件        1006  2016-10-10 08:48  504_直销双轨\app\control\images\AlertMessage-bg.png
     文件        1887  2016-10-10 08:48  504_直销双轨\app\control\images\Help3.png
     文件        1544  2016-10-10 08:48  504_直销双轨\app\control\images\Info.png
     文件       11276  2016-10-10 08:48  504_直销双轨\app\control\images\load.gif
     文件        3951  2016-10-10 08:48  504_直销双轨\app\control\images\loading-bars.gif
     文件        7690  2016-10-10 08:48  504_直销双轨\app\control\images\loading.gif
     文件        4334  2016-10-10 08:48  504_直销双轨\app\control\images\loading_circle.gif
     文件       20789  2016-10-10 08:48  504_直销双轨\app\control\images\messagetitle-bg.png
     文件        1553  2016-10-10 08:48  504_直销双轨\app\control\images\msgloading.gif
     文件       22192  2016-10-10 08:48  504_直销双轨\app\control\images\myls05.png
     文件        1054  2016-10-10 08:48  504_直销双轨\app\control\images\popiframeClose.png
     文件        2022  2016-10-10 08:48  504_直销双轨\app\control\images\Right.png
     文件        1602  2016-10-10 08:48  504_直销双轨\app\control\images\Wrong.png
     目录           0  2017-10-22 16:20  504_直销双轨\app\date\
     文件       20792  2016-10-10 08:48  504_直销双轨\app\date\calendar.js
     文件         223  2016-10-10 08:48  504_直销双轨\app\date\config.js
     目录           0  2017-10-22 16:20  504_直销双轨\app\date\lang\
............此处省略1086个文件信息

评论

共有 条评论

相关资源