Moved Smarty to the contrib directory
git-svn-id: http://svn.cleancode.org/svn/pickles@16 4d10bc64-7434-11dc-a737-d2d0f8310089
This commit is contained in:
parent
58f8fb7965
commit
6c31a4b587
74 changed files with 63 additions and 5 deletions
|
@ -6,8 +6,11 @@ class Controller {
|
||||||
global $smarty;
|
global $smarty;
|
||||||
|
|
||||||
$sections = Config::get('sections');
|
$sections = Config::get('sections');
|
||||||
|
|
||||||
if (isset($_REQUEST['section']) && in_array($_REQUEST['section'], array_keys($sections))) {
|
if (
|
||||||
|
isset($_REQUEST['section']) && in_array($_REQUEST['section'], array_keys($sections))
|
||||||
|
|| file_exists('../logic/' . $_REQUEST['section'] . ($_REQUEST['action'] ? '.' . $_REQUEST['action'] : null) . '.php')
|
||||||
|
) {
|
||||||
$section = $_REQUEST['section'];
|
$section = $_REQUEST['section'];
|
||||||
|
|
||||||
if (isset($_REQUEST['action'])) {
|
if (isset($_REQUEST['action'])) {
|
||||||
|
|
13
jLib.php
13
jLib.php
|
@ -18,9 +18,16 @@ if (stripos($_SERVER['REQUEST_URI'], '?PHPSESSID=') !== false) {
|
||||||
ini_set('arg_separator.output', '&');
|
ini_set('arg_separator.output', '&');
|
||||||
ini_set('url_rewriter.tags', 'a=href,area=href,frame=src,input=src,fieldset=');
|
ini_set('url_rewriter.tags', 'a=href,area=href,frame=src,input=src,fieldset=');
|
||||||
|
|
||||||
|
// Strips the subdomain before loading the configuration file
|
||||||
|
$config_array = split('\.', $_SERVER['SERVER_NAME']);
|
||||||
|
if (count($config_array) == 3) {
|
||||||
|
$subless_server = $config_array[1] . '.' . $config_array[2];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Do some prep work if we're working locally
|
||||||
if (strpos($_SERVER['SERVER_NAME'], '.localhost')) {
|
if (strpos($_SERVER['SERVER_NAME'], '.localhost')) {
|
||||||
foreach (array('com', 'net', 'org') as $tld) {
|
foreach (array('com', 'net', 'org') as $tld) {
|
||||||
$config = str_replace('.localhost', '.' . $tld, $_SERVER['SERVER_NAME']);
|
$config = str_replace('.localhost', '.' . $tld, $config);
|
||||||
|
|
||||||
if (Config::check($config)) {
|
if (Config::check($config)) {
|
||||||
$_SERVER['SERVER_NAME'] = $config;
|
$_SERVER['SERVER_NAME'] = $config;
|
||||||
|
@ -29,7 +36,7 @@ if (strpos($_SERVER['SERVER_NAME'], '.localhost')) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Config::load($_SERVER['SERVER_NAME']);
|
Config::load($subless_server ? $subless_server : $_SERVER['SERVER_NAME']);
|
||||||
|
|
||||||
// Generic "site down" message
|
// Generic "site down" message
|
||||||
if (Config::getDisable()) {
|
if (Config::getDisable()) {
|
||||||
|
@ -42,7 +49,7 @@ if (Config::getSession() && !isset($_SESSION)) {
|
||||||
|
|
||||||
// Smarty default stuff
|
// Smarty default stuff
|
||||||
if (Config::getSmarty()) {
|
if (Config::getSmarty()) {
|
||||||
require_once 'smarty/Smarty.class.php';
|
require_once 'contrib/smarty/Smarty.class.php';
|
||||||
|
|
||||||
$smarty = new Smarty();
|
$smarty = new Smarty();
|
||||||
|
|
||||||
|
|
48
static/js/pngfix.js
Normal file
48
static/js/pngfix.js
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
/*
|
||||||
|
|
||||||
|
Correctly handle PNG transparency in Win IE 5.5 & 6.
|
||||||
|
http://homepage.ntlworld.com/bobosola. Updated 18-Jan-2006.
|
||||||
|
|
||||||
|
Use in <HEAD> with DEFER keyword wrapped in conditional comments:
|
||||||
|
<!--[if lt IE 7]>
|
||||||
|
<script defer type="text/javascript" src="pngfix.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
|
||||||
|
@history 2008-03-15 Changed sizingMethod from 'scaled' to 'none' to fix a scaling issue
|
||||||
|
---------- Added code to readd the style as to not fuck up my intended display
|
||||||
|
---------- Added a catch for the image container (contained images shouldn't be transparent anyway)
|
||||||
|
---------- Reformatted the code cause the original coder was a slob
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
var arVersion = navigator.appVersion.split("MSIE")
|
||||||
|
var version = parseFloat(arVersion[1])
|
||||||
|
|
||||||
|
if ((version >= 5.5) && (document.body.filters)) {
|
||||||
|
for (var i=0; i<document.images.length; i++) {
|
||||||
|
var img = document.images[i]
|
||||||
|
var imgName = img.src.toUpperCase()
|
||||||
|
|
||||||
|
if (img.parentNode.className != 'imagecontainer') {
|
||||||
|
if (imgName.substring(imgName.length-3, imgName.length) == "PNG") {
|
||||||
|
var imgID = (img.id) ? "id='" + img.id + "' " : ""
|
||||||
|
var imgClass = (img.className) ? "class='" + img.className + "' " : ""
|
||||||
|
var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
|
||||||
|
//var imgStyle = "display:inline-block;" + img.style.cssText
|
||||||
|
var imgStyle = '';
|
||||||
|
|
||||||
|
if (img.align == "left") imgStyle = "float:left;" + imgStyle
|
||||||
|
if (img.align == "right") imgStyle = "float:right;" + imgStyle
|
||||||
|
if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
|
||||||
|
|
||||||
|
var strNewHTML = "<span " + imgID + imgClass + imgTitle
|
||||||
|
+ " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
|
||||||
|
+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
|
||||||
|
+ "(src=\'" + img.src + "\', sizingMethod='none');\"></span>"
|
||||||
|
|
||||||
|
img.outerHTML = strNewHTML
|
||||||
|
i = i-1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue