summaryrefslogtreecommitdiff
path: root/devel-utf8/itjs.php
diff options
context:
space:
mode:
authorNathan Gass2012-03-22 18:19:43 +0000
committerNathan Gass2012-03-22 18:19:43 +0000
commit1336ce6ac3baacd1cecbf776cfafa81f8d025272 (patch)
tree3924b3e2e12a5d5ea3b40890477d5e070498543c /devel-utf8/itjs.php
parentd59a4921188753dbe4c0161081755a28112c3ef6 (diff)
downloaditools-1336ce6ac3baacd1cecbf776cfafa81f8d025272.tar.gz
itools-1336ce6ac3baacd1cecbf776cfafa81f8d025272.tar.bz2
itools-1336ce6ac3baacd1cecbf776cfafa81f8d025272.zip
Wrong branch itools/live/devel-utf8 removed
Diffstat (limited to 'devel-utf8/itjs.php')
-rw-r--r--devel-utf8/itjs.php91
1 files changed, 0 insertions, 91 deletions
diff --git a/devel-utf8/itjs.php b/devel-utf8/itjs.php
deleted file mode 100644
index 03073e9..0000000
--- a/devel-utf8/itjs.php
+++ /dev/null
@@ -1,91 +0,0 @@
-<?php
-/*
-** $Id$
-**
-** Copyright (C) 1995-2007 by the ITools Authors.
-** This file is part of ITools - the Internet Tools Library
-**
-** ITools is free software; you can redistribute it and/or modify
-** it under the terms of the GNU General Public License as published by
-** the Free Software Foundation; either version 3 of the License, or
-** (at your option) any later version.
-**
-** ITools is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-** GNU General Public License for more details.
-**
-** You should have received a copy of the GNU General Public License
-** along with this program. If not, see <http://www.gnu.org/licenses/>.
-**
-** itjs.php - Delivers /itjs/ files through AliasMatch in httpd.conf
-*/
-
-require "itools/itools.lib";
-
-if (EDC('slowjs'))
- sleep(20);
-
-$data = "";
-$files = itjs::filenames(it::match('/itjs/([a-z0-9_,.-]*)', $_SERVER['PHP_SELF']));
-
-foreach ($files as $file)
-{
- ob_start(); # Needs to capture inside loop to guarantee file order
- if (!(it::match('W3C_CSS_Validator', $_SERVER['HTTP_USER_AGENT']) && it::match('jquery-ui\.css', $file)))
- $data .= it::replace(array('^1$' => ""), @include($file));
- $data .= ob_get_clean();
-}
-
-$checksum = strlen($data) . itjs::checksum($files);
-
-if (it::match('\.gif$', $file))
-{
- header("Content-Type: image/gif");
-}
-else if (it::match('\.css', $_SERVER['PHP_SELF']))
-{
- header("Content-Type: text/css");
- ob_start('ob_gzhandler');
- $data .= "\n#it_boot_dom { display:none }\n"; # Append magic style for it_boot
- if (!it::match('^devel', $GLOBALS['ULTRASERVERTYPE']))
- $data = it::replace(array('[ \t]*([{};])[ \t]*' => '$1', '/\*.*?\*/' => ""), $data);
- if (it::match('W3C_CSS_Validator', $_SERVER['HTTP_USER_AGENT']) || EDC('w3c')) {
- $data = it::replace(array('@-.*' => "", 'background[^;}]*(gradient|rgba)[^;}]*;?' => "", '(filter:\s*(progid|none)|text-overflow:|zoom:|-webkit-|display:-moz-|-moz-|-o-|cursor:|border-radius:|behavior:|\w+:expression)[^;}]*;?' => "", 'html\.ie6.*' => "", '([^/])\*(\w)' => '$1$2'), $data);
- }
-}
-else if (it::match('\.htc$', $file))
-{
- ob_start('ob_gzhandler');
- header("Content-Type: text/x-component");
-}
-else if (!it::match('\.html$', $file))
-{
- if ($_REQUEST['boot'] && !$_REQUEST['retry'])
- ob_start('ob_gzhandler');
-
- header("Content-Type: application/x-javascript; charset=iso-8859-1");
-}
-
-@header("Etag: $checksum");
-
-if ($checksum != $_SERVER['HTTP_IF_NONE_MATCH'])
-{
- if (!preg_match('/Opera/', $_SERVER['HTTP_USER_AGENT']) && it::is_live())
- header("Cache-Control: max-age=900");
-
- $data = itjs::strip($data);
-
- if ($_REQUEST['boot'])
- {
- $data .= "window.it_boot_init();\n";
- if (!$_REQUEST['script'])
- $data = sprintf("/*sln:%d*/\n%s/*eln:%d*/", strlen($data), strtr($data, array('%' => "%25", '.' => "%2e", 'e' => "%65", 'i' => "%69")), strlen($data)); # Protect from Firewalls/Proxies altering Javascript source code
- }
-
- echo it_untaint($data);
-}
-else
- header("HTTP/1.0 304 Not Modified");
-
-?>