Skip to content

Commit

Permalink
* new log viewer
Browse files Browse the repository at this point in the history
* turbine cssp support
* htaccess preconfigured
  • Loading branch information
digiogithub committed Sep 23, 2011
1 parent 562be6b commit 47d7539
Show file tree
Hide file tree
Showing 63 changed files with 8,486 additions and 7 deletions.
11 changes: 11 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Creamy</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>
2 changes: 1 addition & 1 deletion application/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
| variable so that it is blank.
|
*/
$config['index_page'] = 'index.php';
$config['index_page'] = '';

/*
|--------------------------------------------------------------------------
Expand Down
8 changes: 8 additions & 0 deletions public/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule .* - [E=HTTP_IF_MODIFIED_SINCE:%{HTTP:If-Modified-Since}]
RewriteRule .* - [E=HTTP_IF_NONE_MATCH:%{HTTP:If-None-Match}]
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond $1 !^(favicon\.ico|index\.php|js|css|imgs)
RewriteRule ^(.*)$ /index.php?/$1 [L]
</IfModule>
47 changes: 41 additions & 6 deletions public/log.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<?php
/**
* LOG utility by SeViR
* LOG utility
* SeViR
*/

$allow_ips = array(
'127.0.0.1'
);
if (!in_array($_SERVER['REMOTE_ADDR'], $allow_ips)) die('Ip not allowed');
if (!in_array($_SERVER['REMOTE_ADDR'], $allow_ips)) die('Your IP ('.$_SERVER['REMOTE_ADDR'].') is not allowed');

$cache_paths = array();
if (file_exists(dirname( __FILE__).'/system/logs/')){
Expand All @@ -15,20 +16,44 @@
define('LOG_PATH',dirname( __FILE__).'/../application/logs/');
}


$error_icon = 'data:image/gif;base64,R0lGODlhEAAQAPQfAOaQhNFiTfrUzPrq5vWEZ/KnmfN9YedxW+3FvPCXhOmJe8NPNuySheKmmctZQ/ePd+uBa/i0ovOypvSupO94Xviiifq8qPrAs+NgVN19b96hle+fkuuvov///+doWQAAACH5BAUAAB8ALAAAAAAQABAAQAWV4CeOZClSkUGtQue9XuGIw5NYBNF1hmEph8EIEVBMFC9FIbNAlAQPSCESKUAgAtKjUOkZdqsDI3EQSQ6Rw2uHaRcCjdKgEVgsHBqh6TO4PHIPF3okAgQ3FTkVFgwHWSIXEDgEXx0rKAccJxGTKzsHagcyIhAbCRSfGxMvGAoAATQHRi8MDG4ZDoMfRAEAGxuuTXvCJCEAOw%3D%3D';
$debug_icon = 'data:image/gif;base64,R0lGODlhEAAPAMQfAP3shv/12vvcS+vCc/vgXt6yPOvFeuuiJ+uaFOvLivraQuvJhfzhY+upN+ueHPvdUuvAbvzfWvveVv70zuu+aeu3Wbx8EuuwR/3vof7xsv3umP7yv/ziZv/24////////yH5BAEAAB8ALAAAAAAQAA8AAAVz4CeOn+eRKOklyZmqSdct7ustHcd1Ro16htyO4hsBhRxGoFIsDXIFC2NyKXqeuighsmn4PJAcIxqRZA61q5ixlTwEGLQI3GGwo2+BxnE62tt5CgoAfEABARMTGxkZGBoAkHwlFBUXDQcOCJqbaSaenyYiIQA7';
$info_icon = 'data:image/gif;base64,R0lGODlhEAAQAPU/AD5xtKvE4Xqlx6bC3YWr0+Tr9LvL4mmVwz1XkZ282klhlI2qzZC00muYxVJronKdzGih1P7//1uc06K+3LLJ5ZuqyF2Esr3T6NDc6kaKxXahz3mk0maQvk2Rz1R7rZ674JKz2uPo78bd8vT3++bw+Up3tL3G2Yyy2fX4+5i001uKuVKQxZO41Juu0pe62GKKuWiTwWKXyH2p1tTg7miczTxco6HG5KTJ56jM6khmo3KWvnidxDyDwaC/4F6Rv////yH5BAUAAD8ALAAAAAAQABAAQAavwJ9wSCwKeRRNo3GYjThQWAAhJElOFNkmENBsJoRSYWioCRK7l0WXEiBMRZEE0uN+YpkLUfIBaR4PExNLDQQuDkIJPgEHMAYRERgWFikeFUUhFQ4ICA4VIUZVOBAdHRI2JEYiHScGHwQEIAEEAHpCNzQUGxoaIyiAGgMqLUIZug9LkI0wDQE1QisJBEwwTi/XOyyIPwUlBBMcLyqTFgsCCqBkORYsAwMMHgpwofRDQQA7';

if(isset($_GET['f'])){
if(strpos($_GET['f'], './') !== FALSE) die('invalid access');

if (file_exists(LOG_PATH.$_GET['f'])){
echo file_get_contents(LOG_PATH.$_GET['f']);
echo '<pre>'.str_replace(
array(
'ERROR -',
'INFO -',
'DEBUG -'
),
array(
'</pre><pre class="error"><img alt="error" src="'.$error_icon.'" />',
'</pre><pre class="info"><img alt="info" src="'.$info_icon.'" />',
'</pre><pre class="debug"><img alt="debug" src="'.$debug_icon.'" />',
),file_get_contents(LOG_PATH.$_GET['f'])
).'</pre>';
}
}
else if (isset($_GET['log']))
{
if (file_exists(LOG_PATH.'log-'.date('Y-m-d').'.php'))
{
echo file_get_contents(LOG_PATH.'log-'.date('Y-m-d').'.php');
echo '<pre>'.str_replace(
array(
'ERROR -',
'INFO -',
'DEBUG -'
),
array(
'</pre><pre class="error"><img alt="error" src="'.$error_icon.'" />',
'</pre><pre class="info"><img alt="info" src="'.$info_icon.'" />',
'</pre><pre class="debug"><img alt="debug" src="'.$debug_icon.'" />',
),file_get_contents(LOG_PATH.'log-'.date('Y-m-d').'.php')
).'</pre>';

if (isset($_GET['r']) && $_GET['r']=='1')
{
Expand Down Expand Up @@ -264,8 +289,18 @@ function loadLog(href){
pre{
font-family: arial,sans-serif;;
font-size: 12px;
color: #C11;
color: #515151;
padding-left: 10px;
margin: 0;
}
pre.error{
color: #C11;
}
pre.debug{
color: #1C2310;
}
pre.info{
color: #001D52;
}
#log_panel{
float: left;
Expand Down
33 changes: 33 additions & 0 deletions tools/turbine/authors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Authors ordered by first contribution
=====================================

- [Peter Kröner][1]
- [Christian Schaefer][2]
- [Christian Hayungs][10]
- [Frank Bültge][3]
- [Alexander Rösel][9]
- [Karsten Bellwied][11]



Turbine uses parts of the following projects:
=============================================

- [ie7-js][4] by Dean Edwards
- [cssmin.php][5] by Joe Scylla
- [Whatever:hover][6] by Peter Nederlof
- [IE5.5+ PNG Alpha Fix][7] by Angus Turnbull
- [Box Sizing Behavior][8] by Erik Arvidsson


[1]: http://www.peterkroener.de
[2]: http://twitter.com/derSchepp
[3]: http://bueltge.de
[4]: http://code.google.com/p/ie7-js/
[5]: http://code.google.com/p/cssmin/
[6]: http://www.xs4all.nl/~peterned/
[7]: http://www.twinhelix.com
[8]: http://webfx.eae.net/dhtml/boxsizing/boxsizing.html
[9]: http://twitter.com/traxmaxx
[10]: http://hayungs.de/
[11]: http://zierfischkaefig.de/
1 change: 1 addition & 0 deletions tools/turbine/cache/empty
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
87 changes: 87 additions & 0 deletions tools/turbine/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
Changelog
=========


1.0.11
------
- Fix: Box shadows with zero offset now work in IE
- Fix: Prevent trailing semicolons in file list from throwing errors about missing files
- Fix: Box sizing should now work in IE 6 and 7


1.0.10
------
- Fix: Semicolons were not stripped vom @turbine's plugin rule
- Improvement: Updated browser sniffer


1.0.9
-----
- Fix: Box sizing turned out not to work in IE < 8 at all. Fixed.
- Improvement: Added reasonable comments to boxsizing.htc
- Improvement: Added "Vary: Accept-Encoding" header to css output


1.0.8
-----
- Fix: Gradients couldn't be disabled in IE
- Fix: "none" didn't work as a value for box-shadow in IE
- Fix: IE8 doesn't need the htc file to support box-sizing
- Improvement: Better soft shadow strength calculation for box-shadow in IE
- Improvement: Remove duplicate filter values before output


1.0.7
-----
- Fix: IE didn't use background properties when a gradient declaration was present
- Fix: -ms-filter was not quoted correctly
- Fix: The -ms-filter property was not always ouput after the filter property, which is necessary because IE8 sometimes interprets -ms-filter AND filter
- Improvement: Made some plugins independent of ua sniffing
- Improvement: Transform plugin displays an error when width and height of an element are not defined (which in required for transforms in IE)


1.0.6
-----
- Fix: Allow directories inside the base directory
- Fix: Parser wasn't handling the values of @css lines correctly
- Improvement: Allow explicit closing of @media blocks using "@media none"
- Improvement: Fail silently when version.txt goes missing
- Improvement: Display an error when a plugin that doesn't exist is called
- Improvement: Display an error when a file outside the base directory is being accessed


1.0.5
-----
- Fix: Prevent directory traversal by only allowing turbine to access files in the css_base_dir
- Fix: Made background gradient plugin more tolerant to whitespace


1.0.4
-----
- Fix: Background gradient sometimes didn't work in Opera
- Fix: Multiple filters in IE8 didn't work


1.0.3
-----
- Fix: Inheritance from multiple instances of the same selector failed
- Improvement: Better debugging output when dealing with inheritance


1.0.2
-----
- Fix: Bugfix plugin inserted unnecessary behavior values
- Fix: Wrong paths for htc files in bugfix plugin
- Fix: Removed non-existing IE6 plugin from legacy meta plugin


1.0.1
-----
- Fix: IE7 didn't recieve images as MHTML
- Fix: Loader plugin preserved original file paths for included modules
- Fix: Box sizing wasn't part of CSS3 meta plugin


1.0.0
-----
- Initial Version
33 changes: 33 additions & 0 deletions tools/turbine/config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

/**
* This file is part of Turbine
* http://github.com/SirPepe/Turbine
*
* Copyright Peter Kröner
* Licensed under GNU LGPL 3, see license.txt or http://www.gnu.org/licenses/
*/


$config = array(


// Sets debugging off (0), on (1), or in developer mode (2)
// Mode 0 hides all error messages
// Mode 1 displays error messages related to the style sheets (like elements trying to inherit properties that don't exist)
// Mode 2 additionally displays php developer messages and sets error_reporting to E_ALL
'debug_level' => 0,


// Base path to cssp and css files relative to css.php
'css_base_dir' => '',


// Minify regular css files (true) oder include them completely unchanged (false)
'minify_css' => true


);


?>
Loading

0 comments on commit 47d7539

Please sign in to comment.