[Cs-content-commits] SF.net SVN: cs-content:[507] releases/1.0
PHP Templating & Includes System
Brought to you by:
crazedsanity
From: <cra...@us...> - 2011-11-23 23:49:04
|
Revision: 507 http://cs-content.svn.sourceforge.net/cs-content/?rev=507&view=rev Author: crazedsanity Date: 2011-11-23 23:48:55 +0000 (Wed, 23 Nov 2011) Log Message: ----------- *** RELEASE 1.0.1 *** Summary of changes: * changes for CLI use * new local variables (e.g. $fullSectionArr) * fixes for PHP warnings/notices * remove deprecated PHP functions * __autoload hints to avoid slowness on sluggish disks with lots of classes * many more unit tests * script to (attempt to) automatically create __autoload hints file * minor cookie tweaks * tweaks for filesystem stuff (such as mkdir) * no empty indexes in local "sectionArr" variable/array Modified Paths: -------------- releases/1.0/VERSION releases/1.0/__autoload.php releases/1.0/contentSystem.class.php releases/1.0/cs_fileSystem.class.php releases/1.0/cs_genericPage.class.php releases/1.0/cs_globalFunctions.class.php releases/1.0/cs_session.class.php releases/1.0/sample_files/templates/menu.shared.tmpl releases/1.0/tests/testOfCSGlobalFunctions.php Added Paths: ----------- releases/1.0/bin/ releases/1.0/bin/generateHints.bash releases/1.0/notifications/ releases/1.0/notifications/css/ releases/1.0/notifications/css/images/ releases/1.0/notifications/css/images/ui-bg_diagonals-thick_18_b81900_40x40.png releases/1.0/notifications/css/images/ui-bg_diagonals-thick_20_666666_40x40.png releases/1.0/notifications/css/images/ui-bg_flat_10_000000_40x100.png releases/1.0/notifications/css/images/ui-bg_glass_100_f6f6f6_1x400.png releases/1.0/notifications/css/images/ui-bg_glass_100_fdf5ce_1x400.png releases/1.0/notifications/css/images/ui-bg_glass_65_ffffff_1x400.png releases/1.0/notifications/css/images/ui-bg_gloss-wave_35_f6a828_500x100.png releases/1.0/notifications/css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png releases/1.0/notifications/css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png releases/1.0/notifications/css/images/ui-icons_222222_256x240.png releases/1.0/notifications/css/images/ui-icons_228ef1_256x240.png releases/1.0/notifications/css/images/ui-icons_ef8c08_256x240.png releases/1.0/notifications/css/images/ui-icons_ffd27a_256x240.png releases/1.0/notifications/css/images/ui-icons_ffffff_256x240.png releases/1.0/notifications/css/jquery-ui-1.7.3.custom.css releases/1.0/notifications/includes/ releases/1.0/notifications/js/ releases/1.0/notifications/js/jquery-1.6.2.min.js releases/1.0/notifications/js/jquery-ui-1.7.3.custom.min.js releases/1.0/notifications/js/notifications.js releases/1.0/notifications/views/ releases/1.0/notifications/views/index.php releases/1.0/useForCLI.patch Removed Paths: ------------- releases/1.0/bin/generateHints.bash releases/1.0/notifications/css/ releases/1.0/notifications/css/images/ releases/1.0/notifications/css/images/ui-bg_diagonals-thick_18_b81900_40x40.png releases/1.0/notifications/css/images/ui-bg_diagonals-thick_20_666666_40x40.png releases/1.0/notifications/css/images/ui-bg_flat_10_000000_40x100.png releases/1.0/notifications/css/images/ui-bg_glass_100_f6f6f6_1x400.png releases/1.0/notifications/css/images/ui-bg_glass_100_fdf5ce_1x400.png releases/1.0/notifications/css/images/ui-bg_glass_65_ffffff_1x400.png releases/1.0/notifications/css/images/ui-bg_gloss-wave_35_f6a828_500x100.png releases/1.0/notifications/css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png releases/1.0/notifications/css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png releases/1.0/notifications/css/images/ui-icons_222222_256x240.png releases/1.0/notifications/css/images/ui-icons_228ef1_256x240.png releases/1.0/notifications/css/images/ui-icons_ef8c08_256x240.png releases/1.0/notifications/css/images/ui-icons_ffd27a_256x240.png releases/1.0/notifications/css/images/ui-icons_ffffff_256x240.png releases/1.0/notifications/css/jquery-ui-1.7.3.custom.css releases/1.0/notifications/includes/ releases/1.0/notifications/js/ releases/1.0/notifications/js/jquery-1.6.2.min.js releases/1.0/notifications/js/jquery-ui-1.7.3.custom.min.js releases/1.0/notifications/js/notifications.js releases/1.0/notifications/views/ releases/1.0/notifications/views/index.php Property Changed: ---------------- releases/1.0/ Property changes on: releases/1.0 ___________________________________________________________________ Modified: svn:mergeinfo - /trunk/1.0:464-474 + /trunk/1.0:464-500 /trunk/current:501-506 Modified: releases/1.0/VERSION =================================================================== --- releases/1.0/VERSION 2011-11-23 23:42:31 UTC (rev 506) +++ releases/1.0/VERSION 2011-11-23 23:48:55 UTC (rev 507) @@ -1,5 +1,6 @@ ## Stores the current version of the cs-content system, and it's source. Please do NOT modify this file. -VERSION: 1.0-RC1 +VERSION: 1.0.1 PROJECT: cs-content $HeadURL$ + Modified: releases/1.0/__autoload.php =================================================================== --- releases/1.0/__autoload.php 2011-11-23 23:42:31 UTC (rev 506) +++ releases/1.0/__autoload.php 2011-11-23 23:48:55 UTC (rev 507) @@ -21,71 +21,106 @@ function __autoload($class) { - $tried = array(); + $tried = array(); + + $fsRoot = dirname(__FILE__) .'/../../'; + if(defined('LIBDIR')) { + $fsRoot = constant('LIBDIR'); + } + $fs = new cs_fileSystem($fsRoot); + $fs->cd('lib'); + if(!_autoload_hints_parser($class, $fs)) { + $lsData = $fs->ls(null,false); - $fsRoot = dirname(__FILE__) .'/../../'; - if(defined('LIBDIR')) { - $fsRoot = constant('LIBDIR'); - } - $fs = new cs_fileSystem($fsRoot); - - //try going into a "lib" directory. - $fs->cd('lib'); - $lsData = $fs->ls(); - //attempt to find it here... $tryThis = array(); if(preg_match('/[aA]bstract/', $class)) { $myClass = preg_replace('/[aA]bstract/', '', $class); $tryThis[] = $class .'.abstract.class.php'; $tryThis[] = $myClass .'.abstract.class.php'; - $tryThis[] = 'abstract/'. $myClass .'.abstract.class.php'; } $tryThis[] = $class .'.class.php'; $tryThis[] = $class .'Class.php'; $tryThis[] = $class .'.php'; - $found=false; - foreach($tryThis as $filename) { - if(isset($lsData[$filename])) { - $tried[] = $fs->realcwd .'/'. $filename; - require_once($fs->realcwd .'/'. $filename); + _autoload_directory_checker($fs, $class, $tryThis); + if(!class_exists($class)) { + $gf = new cs_globalFunctions; + $gf->debug_print(__FILE__ ." - line #". __LINE__ ."::: couldn't find (". $class ."), realcwd=(". $fs->realcwd .")",1); + $gf->debug_print($tried,1); + $gf->debug_print($tryThis,1); + if(function_exists('cs_debug_backtrace')) { + cs_debug_backtrace(1); + } + exit; + } + } +}//end __autoload() + +function _autoload_hints_parser($class, $fs) { + $foundClass=false; + if(defined('AUTOLOAD_HINTS') && file_exists(constant('AUTOLOAD_HINTS'))) { + $data = $fs->read(constant('AUTOLOAD_HINTS'),true); + $myHints = array(); + foreach($data as $s) { + $bits = explode('|', rtrim($s)); + if(count($bits) == 2) { + $myHints[$bits[1]] = $bits[0]; + } + } + #print "<pre>"; + #print_r($myHints); + if(isset($myHints[$class])) { + $tryFile = constant('LIBDIR') .'/'. $myHints[$class]; + if(file_exists($tryFile)) { + require_once($tryFile); if(class_exists($class)) { - $found=true; - break; + $foundClass=true; } } } - - if(!$found) { - //try going into sub-directories to pull the files. - foreach($lsData as $i=>$d) { - if($d['type'] == 'dir') { - $subLs = $fs->ls($i); - foreach($tryThis as $filename) { - $fileLocation = $fs->realcwd .'/'. $i .'/'. $filename; - if(file_exists($fileLocation)) { - $tried[] = $fileLocation; - require_once($fileLocation); - if(class_exists($class)) { - $found=true; - break; - } - } + } + return($foundClass); +}//end _autoload_hints_parser() + + +function _autoload_directory_checker($fs, $class, $lookForFiles) { + $lsData = $fs->ls(null,false); + $dirNames = array(); + $curDirectory = $fs->realcwd; + + $found = false; + + if(is_array($lsData)) { + foreach($lsData as $objectName => $objectData) { + if($objectData['type'] == 'dir') { + $dirNames[] = $objectName; + } + elseif($objectData['type'] == 'file') { + if(in_array($objectName, $lookForFiles)) { + require_once($fs->realcwd .'/'. $objectName); + if(class_exists($class)) { + $found = true; + break; } } - if($found) { - break; - } } } + } - if(!$found) { - $gf = new cs_globalFunctions; - $gf->debug_print(__FILE__ ." - line #". __LINE__ ."::: couldn't find (". $class .")",1); - $gf->debug_print($tried,1); - $gf->debug_print($tryThis,1); - exit; + if(!$found && is_array($dirNames) && count($dirNames)) { + foreach($dirNames as $dir) { + $fs->cd($dir); + $found = _autoload_directory_checker($fs, $class, $lookForFiles); + $fs->cdup(); + + if($found === true) { + break; + } + } } -}//end __autoload() + + return($found); +} + ?> Deleted: releases/1.0/bin/generateHints.bash =================================================================== --- trunk/1.0/bin/generateHints.bash 2011-07-20 00:52:09 UTC (rev 500) +++ releases/1.0/bin/generateHints.bash 2011-11-23 23:48:55 UTC (rev 507) @@ -1,3 +0,0 @@ -#!/bin/bash -grep -i "^class " * -R --exclude=*.svn* --exclude=*.tmp| grep -e ".php" -e ".inc" | cut --delimiter=" " --fields 1,2 | sed "s/class //" | sed "s/:/\|/" | sed "s/{//" -grep -i "^abstract class " * -R --exclude=*.svn* --exclude=*.tmp| grep -e ".php" -e ".inc" | cut --delimiter=" " --fields 1,3 | sed "s/abstract //" | sed "s/:/\|/" | sed "s/{//" Copied: releases/1.0/bin/generateHints.bash (from rev 500, trunk/1.0/bin/generateHints.bash) =================================================================== --- releases/1.0/bin/generateHints.bash (rev 0) +++ releases/1.0/bin/generateHints.bash 2011-11-23 23:48:55 UTC (rev 507) @@ -0,0 +1,3 @@ +#!/bin/bash +grep -i "^class " * -R --exclude=*.svn* --exclude=*.tmp| grep -e ".php" -e ".inc" | cut --delimiter=" " --fields 1,2 | sed "s/class //" | sed "s/:/\|/" | sed "s/{//" +grep -i "^abstract class " * -R --exclude=*.svn* --exclude=*.tmp| grep -e ".php" -e ".inc" | cut --delimiter=" " --fields 1,3 | sed "s/abstract //" | sed "s/:/\|/" | sed "s/{//" Modified: releases/1.0/contentSystem.class.php =================================================================== --- releases/1.0/contentSystem.class.php 2011-11-23 23:42:31 UTC (rev 506) +++ releases/1.0/contentSystem.class.php 2011-11-23 23:48:55 UTC (rev 507) @@ -99,18 +99,22 @@ /** * The CONSTRUCTOR. Duh. */ - public function __construct($siteRoot=null) { + public function __construct($siteRoot=null, $section=null) { parent::__construct(); //setup the section stuff... $repArr = array($_SERVER['SCRIPT_NAME'], "/"); - $_SERVER['REQUEST_URI'] = ereg_replace('^/', "", $_SERVER['REQUEST_URI']); + $_SERVER['REQUEST_URI'] = preg_replace('/^\//', "", $_SERVER['REQUEST_URI']); //figure out the section & subsection stuff. $requestUri = preg_replace('/\/$/', '', $_SERVER['REQUEST_URI']); - $this->fullSectionArr = split('/', $requestUri); //TODO: will this cope with an APPURL being set? - $this->section = $this->clean_url($_SERVER['REQUEST_URI']); + $this->fullSectionArr = explode('/', $requestUri); //TODO: will this cope with an APPURL being set? + if(is_null($section)) { + $section = @$_SERVER['REQUEST_URI']; + } + $this->section = $this->clean_url($section); + $this->initialize_locals($siteRoot); }//end __construct() //------------------------------------------------------------------------ @@ -298,7 +302,7 @@ if(($this->section === 0 || is_null($this->section) || !strlen($this->section)) && defined('DEFAULT_SECTION')) { $this->section = preg_replace('/^\//', '', constant('DEFAULT_SECTION')); } - $myArr = split('/', $this->section); + $myArr = explode('/', $this->section); //if we've got something in the array, keep going. if(is_array($myArr) && count($myArr) > 0) { @@ -327,51 +331,17 @@ } //make sure we've still got something valid to work with. - if(!strlen($section)) { - //TODO: remove the extra return statement (should only be one at the bottom of the method). - return(NULL); - } - else { - - //if there's an "APPURL" constant, drop that from the section. - if(defined('APPURL') && strlen(constant('APPURL'))) { - $dropThis = preg_replace('/^\//', '', constant('APPURL')); - $dropThis = preg_replace('/\//', '\\/', $dropThis); - $section = preg_replace('/^'. $dropThis .'/', '', $section); + if(strlen($section)) { + try { + $section = $this->gfObj->clean_url($section); } - - //check the string to make sure it doesn't begin with a "/" - if($section[0] == '/') { - $section = substr($section, 1, strlen($section)); + catch(Exception $e) { + //hide the exception and allow it to return NULL. } - - //check the last char for a "/"... - if($section[strlen($section) -1] == '/') { - //last char is a '/'... kill it. - $section = substr($section, 0, strlen($section) -1); - } - - //if we've been sent a query, kill it off the string... - if(preg_match('/\?/', $section)) { - $section = split('\?', $section); - $section = $section[0]; - } - - if(ereg("\.", $section)) { - //disregard file extensions, but keep everything else... - // i.e. "index.php/yermom.html" becomes "index/yermom" - $tArr = split('/', $section); - foreach($tArr as $tSecName) { - $temp = split("\.", $tSecName); - if(strlen($temp[0]) > 1) { - $tSecName = $temp[0]; - } - $tSection = $this->gfObj->create_list($tSection, $tSecName, '/'); - } - $section = $tSection; - } } - + else { + $section = null; + } return($section); }//end clean_url() //------------------------------------------------------------------------ @@ -567,7 +537,7 @@ * name, or vice-versa. */ private function arrange_directory_contents($primaryIndex='section', $secondaryIndex='name') { - $directoryInfo = $this->tmplFs->ls(); + $directoryInfo = $this->tmplFs->ls(null,false); $arrangedArr = array(); if(is_array($directoryInfo)) { foreach($directoryInfo as $index=>$data) { @@ -673,7 +643,7 @@ $mySection = preg_replace('/\/index$/','', $mySection); } if($this->incFs->cd('/'. $mySection)) { - $lsData = $this->incFs->ls(); + $lsData = $this->incFs->ls(null,false); if(isset($lsData['shared.inc']) && is_array($lsData['shared.inc'])) { $this->add_include('shared.inc'); } @@ -695,7 +665,7 @@ * solely by load_includes(). */ private function load_dir_includes($section) { - $lsData = $this->incFs->ls(); + $lsData = $this->incFs->ls(null,false); $addThese = array(); @@ -735,8 +705,10 @@ * Called when something is broken. */ private function die_gracefully($details=NULL) { - if(isset($_SERVER['SERVER_PROTOCOL']) && $this->templateObj->template_file_exists('system/404.shared.tmpl')) { - header('HTTP/1.0 404 Not Found'); + if($this->templateObj->template_file_exists('system/404.shared.tmpl')) { + if(isset($_SERVER['SERVER_PROTOCOL'])) { + header('HTTP/1.0 404 Not Found'); + } //Simple "Page Not Found" error... show 'em. $this->templateObj->add_template_var('main', $this->templateObj->file_to_string('system/404.shared.tmpl')); @@ -802,6 +774,9 @@ //make the "final section" available to scripts. $finalSection = $this->finalSection; $sectionArr = $this->sectionArr; + if(count($sectionArr) && $sectionArr[(count($sectionArr)-1)] == "") { + array_pop($sectionArr); + } $fullSectionArr = $this->fullSectionArr; array_unshift($sectionArr, $this->baseDir); $finalURL = $this->gfObj->string_from_array($sectionArr, NULL, '/'); Modified: releases/1.0/cs_fileSystem.class.php =================================================================== --- releases/1.0/cs_fileSystem.class.php 2011-11-23 23:42:31 UTC (rev 506) +++ releases/1.0/cs_fileSystem.class.php 2011-11-23 23:48:55 UTC (rev 507) @@ -134,9 +134,10 @@ /** * Just like the linux version of the 'ls' command. */ - public function ls($filename=NULL, $args=NULL) { + public function ls($filename=NULL, $extendedInfo=true) { clearstatcache(); + $retval = null; //open the directory for reading. $this->dh = opendir($this->realcwd); clearstatcache(); @@ -145,13 +146,13 @@ $tFile=$this->filename2absolute($filename); if(file_exists($tFile)) { //it's there... get info about it. - $info = $this->get_fileinfo($tFile); + $info = $this->get_fileinfo($tFile, $extendedInfo); if($info['type'] == 'dir') { $oldCwd = $this->cwd; $oldRealCwd = $this->realcwd; $this->cd($filename); - $retval = $this->ls(); + $retval = $this->ls(null, $extendedInfo); $this->cwd = $oldCwd; $this->realcwd = $oldRealCwd; @@ -175,13 +176,10 @@ debug_print("FILE: $tFile || TYPE: $tType || is_file(): ". is_file($tFile) ."is_dir(): ". is_dir($tFile)); exit; } - #debug_print("FILE: $file || $dir". $file); unset($tType); } } } - #debug_print($retval); - #debug_print(readdir($this->dh)); return($retval); }//end ls() //======================================================================================== @@ -191,23 +189,25 @@ /** * Grabs an array of information for a given file. */ - public function get_fileinfo($tFile) { + public function get_fileinfo($tFile,$extendedInfo=true) { //TODO: shouldn't require putting the "@" in front of these calls! $retval = array( - "size" => @filesize($tFile), "type" => @filetype($tFile), - "accessed" => @fileatime($tFile), - "modified" => @filemtime($tFile), - "owner" => @$this->my_getuser_group(fileowner($tFile), 'uid'), - "uid" => @fileowner($tFile), - "group" => @$this->my_getuser_group(filegroup($tFile), 'gid'), - "gid" => @filegroup($tFile), - "perms" => @$this->translate_perms(fileperms($tFile)), - "perms_num" => @substr(sprintf('%o', fileperms($tFile)), -4), "is_readable" => is_readable($tFile), "is_writable" => is_writable($tFile) ); + if($extendedInfo) { + $retval["size"] = @filesize($tFile); + $retval["accessed"] = @fileatime($tFile); + $retval["modified"] = @filemtime($tFile); + $retval["owner"] = @$this->my_getuser_group(fileowner($tFile), 'uid'); + $retval["uid"] = @fileowner($tFile); + $retval["group"] = @$this->my_getuser_group(filegroup($tFile), 'gid'); + $retval["gid"] = @filegroup($tFile); + $retval["perms"] = @$this->translate_perms(fileperms($tFile)); + $retval["perms_num"]= @substr(sprintf('%o', fileperms($tFile)), -4); + } return($retval); }//end get_fileinfo() @@ -903,8 +903,8 @@ //======================================================================================== public function mkdir($name, $mode=0777) { - if(!is_numeric($mode) || strlen($mode) != 4) { - $mode = 0777; + if(isset($mode)) { + $mode = intval($mode); } $retval = NULL; if(!is_null($name) && strlen($name)) { Modified: releases/1.0/cs_genericPage.class.php =================================================================== --- releases/1.0/cs_genericPage.class.php 2011-11-23 23:42:31 UTC (rev 506) +++ releases/1.0/cs_genericPage.class.php 2011-11-23 23:48:55 UTC (rev 507) @@ -277,7 +277,7 @@ if(!strlen($out)) { $this->gfObj->debug_print($out); $this->gfObj->debug_print($this->mainTemplate); - $this->gfObj->debug_print("MANUAL FILE CONTENTS::: ". htmlentities(file_get_contents($this->tmplDir .'/'. $this->mainTemplate))); + $this->gfObj->debug_print("MANUAL FILE CONTENTS::: ". htmlentities(file_get_contents($this->mainTemplate))); exit(__METHOD__ .": mainTemplate (". $this->mainTemplate .") was empty...?"); } Modified: releases/1.0/cs_globalFunctions.class.php =================================================================== --- releases/1.0/cs_globalFunctions.class.php 2011-11-23 23:42:31 UTC (rev 506) +++ releases/1.0/cs_globalFunctions.class.php 2011-11-23 23:48:55 UTC (rev 507) @@ -176,7 +176,12 @@ } else { //now format it properly. - $array[$myIndex] = $this->cleanString($array[$myIndex], $myCleanStringArg); + $myUseSqlQuotes = null; + if(in_array($myCleanStringArg, array('int', 'integer', 'numeric', 'number', 'decimal', 'float'))) { + $myUseSqlQuotes = false; + } + $array[$myIndex] = $this->cleanString($array[$myIndex], $myCleanStringArg, $myUseSqlQuotes); + unset($myUseSqlQuotes); } } } @@ -398,6 +403,8 @@ break; + case "varchar": + case "text": case "sql_insert": /* * This is for descriptive fields, where double quotes don't need to be escaped: in these @@ -497,9 +504,10 @@ $cleanThis = preg_replace("/[^A-Za-z0-9\._@-]/","",$cleanThis); break; + case "email_plus": case "email_plus_spaces": //Remove all characters that aren't allowed in an email address. - $cleanThis = preg_replace("/[^A-Za-z0-9\ \._@-]/","",$cleanThis); + $cleanThis = preg_replace("/[^A-Za-z0-9\ \._@:-]/","",$cleanThis); break; case "phone_fax": @@ -507,15 +515,17 @@ $cleanThis = preg_replace("/[^0-9-+() ]/","",$cleanThis); break; + case "int": case "integer": case "numeric": + case "number": //Remove everything that's not numeric. if(is_null($cleanThis)) { $cleanThis = "NULL"; $sqlQuotes = 0; } else { - $cleanThis = preg_replace("/[^0-9]/","",$cleanThis); + $cleanThis = preg_replace("/[^0-9\-]/","",$cleanThis); } break; @@ -542,14 +552,6 @@ $cleanThis = $this->interpret_bool($cleanThis, array('f', 't')); break; - case "varchar": - $cleanThis=$this->cleanString($cleanThis,"query"); - $cleanThis="'" . $cleanThis . "'"; - if($cleanThis == "''") { - $cleanThis="NULL"; - } - break; - case "date": $cleanThis = preg_replace("/[^0-9\-]/","",$cleanThis); break; @@ -610,7 +612,7 @@ * * @return (string) printed data. */ - public function debug_print($input=NULL, $printItForMe=NULL, $removeHR=NULL) { + public function debug_print($input=NULL, $printItForMe=NULL, $removeHR=NULL, $usePreTags=true) { if(!is_numeric($removeHR)) { $removeHR = $this->debugRemoveHr; } @@ -623,9 +625,11 @@ print_r($input); $output = ob_get_contents(); ob_end_clean(); - - $output = "<pre>$output</pre>"; + if($usePreTags === true) { + $output = "<pre>$output</pre>"; + } + if(!isset($_SERVER['SERVER_PROTOCOL']) || !$_SERVER['SERVER_PROTOCOL']) { $output = strip_tags($output); $hrString = "\n***************************************************************\n"; @@ -683,12 +687,18 @@ $b="{"; $e="}"; } - - foreach($repArr as $key=>$value) { - //run the replacements. - $key = "$b" . $key . "$e"; - $template = str_replace("$key", $value, $template); + + if(is_array($repArr)) { + foreach($repArr as $key=>$value) { + //run the replacements. + $key = "$b" . $key . "$e"; + $template = str_replace("$key", $value, $template); + } } + else { + cs_debug_backtrace(1); + throw new exception(__METHOD__ .": no replacement array passed, or array was empty"); + } return($template); }//end mini_parser() @@ -863,7 +873,64 @@ return($this->debug_print($printThis, $printItForMe, $removeHr)); }//end debug_var_dump() //########################################################################## + + + + //------------------------------------------------------------------------ + /** + * Removes all the crap from the url, so we can figure out what section we + * need to load templates & includes for. + */ + public function clean_url($url=NULL) { + //make sure we've still got something valid to work with. + if(strlen($url)) { + //if there's an "APPURL" constant, drop that from the url. + if(defined('APPURL') && strlen(constant('APPURL'))) { + $dropThis = preg_replace('/^\//', '', constant('APPURL')); + $dropThis = preg_replace('/\//', '\\/', $dropThis); + $url = preg_replace('/^'. $dropThis .'/', '', $url); + } + + //check the string to make sure it doesn't begin with a "/" + if($url[0] == '/') { + $url = substr($url, 1, strlen($url)); + } + + //check the last char for a "/"... + if($url[strlen($url) -1] == '/') { + //last char is a '/'... kill it. + $url = substr($url, 0, strlen($url) -1); + } + + //if we've been sent a query, kill it off the string... + if(preg_match('/\?/', $url)) { + $url = split('\?', $url); + $url = $url[0]; + } + + if(preg_match("/\./", $url)) { + //disregard file extensions, but keep everything else... + // i.e. "index.php/yermom.html" becomes "index/yermom" + $tArr = explode('/', $url); + $tUrl = null; + foreach($tArr as $tUrlPart) { + $temp = explode(".", $tUrlPart); + if(strlen($temp[0])) { + $tUrlPart = $temp[0]; + } + $tUrl = $this->create_list($tUrl, $tUrlPart, '/'); + } + $url = $tUrl; + } + } + else { + $url = null; + } + return($url); + }//end clean_url() + //------------------------------------------------------------------------ + }//end cs_globalFunctions{} ?> Modified: releases/1.0/cs_session.class.php =================================================================== --- releases/1.0/cs_session.class.php 2011-11-23 23:42:31 UTC (rev 506) +++ releases/1.0/cs_session.class.php 2011-11-23 23:48:55 UTC (rev 507) @@ -24,14 +24,26 @@ */ function __construct($createSession=true) { parent::__construct(true); + $sessName = null; + $sessionId = null; if($createSession) { if(is_string($createSession) && strlen($createSession) >2) { + $sessName = $createSession; session_name($createSession); } + elseif(defined('SESSION_NAME') && constant('SESSION_NAME') && isset($_COOKIE) && isset($_COOKIE[constant('SESSION_NAME')])) { + $sessName = constant('SESSION_NAME'); + session_name(constant('SESSION_NAME')); + $sessionId = $_COOKIE[constant('SESSION_NAME')]; + session_id($sessionId); + } //now actually create the session. @session_start(); } + if(is_null($sessName)) { + $sessName = session_name(); + } //check if there's a uid in the session already. //TODO: need a setting somewhere that says what the name of this var should be, @@ -76,7 +88,7 @@ */ public function get_cookie($name) { $retval = NULL; - if(isset($_COOKIE) && $_COOKIE[$name]) { + if(isset($_COOKIE) && isset($_COOKIE[$name])) { $retval = $_COOKIE[$name]; } return($retval); @@ -93,7 +105,7 @@ * @param $value (string) value of cookie * @param $expiration (string/number) unix timestamp or value for strtotime(). */ - public function create_cookie($name, $value, $expiration=NULL) { + public function create_cookie($name, $value, $expiration=NULL, $path=NULL, $domain=NULL) { $expTime = NULL; if(!is_null($expiration)) { @@ -108,7 +120,16 @@ } } - $retval = setcookie($name, $value, $expTime, '/'); + if(is_null($domain)) { + $bits = explode('.', $_SERVER['SERVER_NAME']); + if(count($bits) > 1) { + $tldBit = $bits[count($bits)-1]; + $domBit = $bits[count($bits)]; + $domain = '.'. $domBit .'.'. $tldBit; + } + } + + $retval = setcookie($name, $value, $expTime, $path, $domain); return($retval); }//end create_cookie() @@ -151,4 +172,4 @@ }//end cs_session{} -?> \ No newline at end of file +?> Property changes on: releases/1.0/notifications ___________________________________________________________________ Added: svn:ignore + .buildpath .project .settings Added: bugtraq:number + true Property changes on: releases/1.0/notifications/css ___________________________________________________________________ Added: bugtraq:number + true Property changes on: releases/1.0/notifications/css/images ___________________________________________________________________ Added: bugtraq:number + true Deleted: releases/1.0/notifications/css/images/ui-bg_diagonals-thick_18_b81900_40x40.png =================================================================== (Binary files differ) Copied: releases/1.0/notifications/css/images/ui-bg_diagonals-thick_18_b81900_40x40.png (from rev 500, trunk/1.0/notifications/css/images/ui-bg_diagonals-thick_18_b81900_40x40.png) =================================================================== (Binary files differ) Deleted: releases/1.0/notifications/css/images/ui-bg_diagonals-thick_20_666666_40x40.png =================================================================== (Binary files differ) Copied: releases/1.0/notifications/css/images/ui-bg_diagonals-thick_20_666666_40x40.png (from rev 500, trunk/1.0/notifications/css/images/ui-bg_diagonals-thick_20_666666_40x40.png) =================================================================== (Binary files differ) Deleted: releases/1.0/notifications/css/images/ui-bg_flat_10_000000_40x100.png =================================================================== (Binary files differ) Copied: releases/1.0/notifications/css/images/ui-bg_flat_10_000000_40x100.png (from rev 500, trunk/1.0/notifications/css/images/ui-bg_flat_10_000000_40x100.png) =================================================================== (Binary files differ) Deleted: releases/1.0/notifications/css/images/ui-bg_glass_100_f6f6f6_1x400.png =================================================================== (Binary files differ) Copied: releases/1.0/notifications/css/images/ui-bg_glass_100_f6f6f6_1x400.png (from rev 500, trunk/1.0/notifications/css/images/ui-bg_glass_100_f6f6f6_1x400.png) =================================================================== (Binary files differ) Deleted: releases/1.0/notifications/css/images/ui-bg_glass_100_fdf5ce_1x400.png =================================================================== (Binary files differ) Copied: releases/1.0/notifications/css/images/ui-bg_glass_100_fdf5ce_1x400.png (from rev 500, trunk/1.0/notifications/css/images/ui-bg_glass_100_fdf5ce_1x400.png) =================================================================== (Binary files differ) Deleted: releases/1.0/notifications/css/images/ui-bg_glass_65_ffffff_1x400.png =================================================================== (Binary files differ) Copied: releases/1.0/notifications/css/images/ui-bg_glass_65_ffffff_1x400.png (from rev 500, trunk/1.0/notifications/css/images/ui-bg_glass_65_ffffff_1x400.png) =================================================================== (Binary files differ) Deleted: releases/1.0/notifications/css/images/ui-bg_gloss-wave_35_f6a828_500x100.png =================================================================== (Binary files differ) Copied: releases/1.0/notifications/css/images/ui-bg_gloss-wave_35_f6a828_500x100.png (from rev 500, trunk/1.0/notifications/css/images/ui-bg_gloss-wave_35_f6a828_500x100.png) =================================================================== (Binary files differ) Deleted: releases/1.0/notifications/css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png =================================================================== (Binary files differ) Copied: releases/1.0/notifications/css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png (from rev 500, trunk/1.0/notifications/css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png) =================================================================== (Binary files differ) Deleted: releases/1.0/notifications/css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png =================================================================== (Binary files differ) Copied: releases/1.0/notifications/css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png (from rev 500, trunk/1.0/notifications/css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png) =================================================================== (Binary files differ) Deleted: releases/1.0/notifications/css/images/ui-icons_222222_256x240.png =================================================================== (Binary files differ) Copied: releases/1.0/notifications/css/images/ui-icons_222222_256x240.png (from rev 500, trunk/1.0/notifications/css/images/ui-icons_222222_256x240.png) =================================================================== (Binary files differ) Deleted: releases/1.0/notifications/css/images/ui-icons_228ef1_256x240.png =================================================================== (Binary files differ) Copied: releases/1.0/notifications/css/images/ui-icons_228ef1_256x240.png (from rev 500, trunk/1.0/notifications/css/images/ui-icons_228ef1_256x240.png) =================================================================== (Binary files differ) Deleted: releases/1.0/notifications/css/images/ui-icons_ef8c08_256x240.png =================================================================== (Binary files differ) Copied: releases/1.0/notifications/css/images/ui-icons_ef8c08_256x240.png (from rev 500, trunk/1.0/notifications/css/images/ui-icons_ef8c08_256x240.png) =================================================================== (Binary files differ) Deleted: releases/1.0/notifications/css/images/ui-icons_ffd27a_256x240.png =================================================================== (Binary files differ) Copied: releases/1.0/notifications/css/images/ui-icons_ffd27a_256x240.png (from rev 500, trunk/1.0/notifications/css/images/ui-icons_ffd27a_256x240.png) =================================================================== (Binary files differ) Deleted: releases/1.0/notifications/css/images/ui-icons_ffffff_256x240.png =================================================================== (Binary files differ) Copied: releases/1.0/notifications/css/images/ui-icons_ffffff_256x240.png (from rev 500, trunk/1.0/notifications/css/images/ui-icons_ffffff_256x240.png) =================================================================== (Binary files differ) Deleted: releases/1.0/notifications/css/jquery-ui-1.7.3.custom.css =================================================================== --- trunk/1.0/notifications/css/jquery-ui-1.7.3.custom.css 2011-07-20 00:52:09 UTC (rev 500) +++ releases/1.0/notifications/css/jquery-ui-1.7.3.custom.css 2011-11-23 23:48:55 UTC (rev 507) @@ -1,405 +0,0 @@ -/* -* jQuery UI CSS Framework -* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) -* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. -*/ - -/* Layout helpers -----------------------------------*/ -.ui-helper-hidden { display: none; } -.ui-helper-hidden-accessible { position: absolute; left: -99999999px; } -.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } -.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } -.ui-helper-clearfix { display: inline-block; } -/* required comment for clearfix to work in Opera \*/ -* html .ui-helper-clearfix { height:1%; } -.ui-helper-clearfix { display:block; } -/* end clearfix */ -.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } - - -/* Interaction Cues -----------------------------------*/ -.ui-state-disabled { cursor: default !important; } - - -/* Icons -----------------------------------*/ - -/* states and images */ -.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } - - -/* Misc visuals -----------------------------------*/ - -/* Overlays */ -.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } - -/* -* jQuery UI CSS Framework -* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) -* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. -* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS,%20Tahoma,%20Verdana,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px -*/ - - -/* Component containers -----------------------------------*/ -.ui-widget { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1.1em; } -.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1em; } -.ui-widget-content { border: 1px solid #dddddd; background: #eeeeee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x; color: #333333; } -.ui-widget-content a { color: #333333; } -.ui-widget-header { border: 1px solid #e78f08; background: #f6a828 url(images/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; } -.ui-widget-header a { color: #ffffff; } - -/* Interaction states -----------------------------------*/ -.ui-state-default, .ui-widget-content .ui-state-default { border: 1px solid #cccccc; background: #f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #1c94c4; outline: none; } -.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; outline: none; } -.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus { border: 1px solid #fbcb09; background: #fdf5ce url(images/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #c77405; outline: none; } -.ui-state-hover a, .ui-state-hover a:hover { color: #c77405; text-decoration: none; outline: none; } -.ui-state-active, .ui-widget-content .ui-state-active { border: 1px solid #fbd850; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #eb8f00; outline: none; } -.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #eb8f00; outline: none; text-decoration: none; } - -/* Interaction Cues -----------------------------------*/ -.ui-state-highlight, .ui-widget-content .ui-state-highlight {border: 1px solid #fed22f; background: #ffe45c url(images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; color: #363636; } -.ui-state-highlight a, .ui-widget-content .ui-state-highlight a { color: #363636; } -.ui-state-error, .ui-widget-content .ui-state-error {border: 1px solid #cd0a0a; background: #b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat; color: #ffffff; } -.ui-state-error a, .ui-widget-content .ui-state-error a { color: #ffffff; } -.ui-state-error-text, .ui-widget-content .ui-state-error-text { color: #ffffff; } -.ui-state-disabled, .ui-widget-content .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } -.ui-priority-primary, .ui-widget-content .ui-priority-primary { font-weight: bold; } -.ui-priority-secondary, .ui-widget-content .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } - -/* Icons -----------------------------------*/ - -/* states and images */ -.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); } -.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } -.ui-widget-header .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } -.ui-state-default .ui-icon { background-image: url(images/ui-icons_ef8c08_256x240.png); } -.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } -.ui-state-active .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } -.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_228ef1_256x240.png); } -.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffd27a_256x240.png); } - -/* positioning */ -.ui-icon-carat-1-n { background-position: 0 0; } -.ui-icon-carat-1-ne { background-position: -16px 0; } -.ui-icon-carat-1-e { background-position: -32px 0; } -.ui-icon-carat-1-se { background-position: -48px 0; } -.ui-icon-carat-1-s { background-position: -64px 0; } -.ui-icon-carat-1-sw { background-position: -80px 0; } -.ui-icon-carat-1-w { background-position: -96px 0; } -.ui-icon-carat-1-nw { background-position: -112px 0; } -.ui-icon-carat-2-n-s { background-position: -128px 0; } -.ui-icon-carat-2-e-w { background-position: -144px 0; } -.ui-icon-triangle-1-n { background-position: 0 -16px; } -.ui-icon-triangle-1-ne { background-position: -16px -16px; } -.ui-icon-triangle-1-e { background-position: -32px -16px; } -.ui-icon-triangle-1-se { background-position: -48px -16px; } -.ui-icon-triangle-1-s { background-position: -64px -16px; } -.ui-icon-triangle-1-sw { background-position: -80px -16px; } -.ui-icon-triangle-1-w { background-position: -96px -16px; } -.ui-icon-triangle-1-nw { background-position: -112px -16px; } -.ui-icon-triangle-2-n-s { background-position: -128px -16px; } -.ui-icon-triangle-2-e-w { background-position: -144px -16px; } -.ui-icon-arrow-1-n { background-position: 0 -32px; } -.ui-icon-arrow-1-ne { background-position: -16px -32px; } -.ui-icon-arrow-1-e { background-position: -32px -32px; } -.ui-icon-arrow-1-se { background-position: -48px -32px; } -.ui-icon-arrow-1-s { background-position: -64px -32px; } -.ui-icon-arrow-1-sw { background-position: -80px -32px; } -.ui-icon-arrow-1-w { background-position: -96px -32px; } -.ui-icon-arrow-1-nw { background-position: -112px -32px; } -.ui-icon-arrow-2-n-s { background-position: -128px -32px; } -.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } -.ui-icon-arrow-2-e-w { background-position: -160px -32px; } -.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } -.ui-icon-arrowstop-1-n { background-position: -192px -32px; } -.ui-icon-arrowstop-1-e { background-position: -208px -32px; } -.ui-icon-arrowstop-1-s { background-position: -224px -32px; } -.ui-icon-arrowstop-1-w { background-position: -240px -32px; } -.ui-icon-arrowthick-1-n { background-position: 0 -48px; } -.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } -.ui-icon-arrowthick-1-e { background-position: -32px -48px; } -.ui-icon-arrowthick-1-se { background-position: -48px -48px; } -.ui-icon-arrowthick-1-s { background-position: -64px -48px; } -.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } -.ui-icon-arrowthick-1-w { background-position: -96px -48px; } -.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } -.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } -.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } -.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } -.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } -.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } -.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } -.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } -.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } -.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } -.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } -.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } -.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } -.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } -.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } -.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } -.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } -.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } -.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } -.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } -.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } -.ui-icon-arrow-4 { background-position: 0 -80px; } -.ui-icon-arrow-4-diag { background-position: -16px -80px; } -.ui-icon-extlink { background-position: -32px -80px; } -.ui-icon-newwin { background-position: -48px -80px; } -.ui-icon-refresh { background-position: -64px -80px; } -.ui-icon-shuffle { background-position: -80px -80px; } -.ui-icon-transfer-e-w { background-position: -96px -80px; } -.ui-icon-transferthick-e-w { background-position: -112px -80px; } -.ui-icon-folder-collapsed { background-position: 0 -96px; } -.ui-icon-folder-open { background-position: -16px -96px; } -.ui-icon-document { background-position: -32px -96px; } -.ui-icon-document-b { background-position: -48px -96px; } -.ui-icon-note { background-position: -64px -96px; } -.ui-icon-mail-closed { background-position: -80px -96px; } -.ui-icon-mail-open { background-position: -96px -96px; } -.ui-icon-suitcase { background-position: -112px -96px; } -.ui-icon-comment { background-position: -128px -96px; } -.ui-icon-person { background-position: -144px -96px; } -.ui-icon-print { background-position: -160px -96px; } -.ui-icon-trash { background-position: -176px -96px; } -.ui-icon-locked { background-position: -192px -96px; } -.ui-icon-unlocked { background-position: -208px -96px; } -.ui-icon-bookmark { background-position: -224px -96px; } -.ui-icon-tag { background-position: -240px -96px; } -.ui-icon-home { background-position: 0 -112px; } -.ui-icon-flag { background-position: -16px -112px; } -.ui-icon-calendar { background-position: -32px -112px; } -.ui-icon-cart { background-position: -48px -112px; } -.ui-icon-pencil { background-position: -64px -112px; } -.ui-icon-clock { background-position: -80px -112px; } -.ui-icon-disk { background-position: -96px -112px; } -.ui-icon-calculator { background-position: -112px -112px; } -.ui-icon-zoomin { background-position: -128px -112px; } -.ui-icon-zoomout { background-position: -144px -112px; } -.ui-icon-search { background-position: -160px -112px; } -.ui-icon-wrench { background-position: -176px -112px; } -.ui-icon-gear { background-position: -192px -112px; } -.ui-icon-heart { background-position: -208px -112px; } -.ui-icon-star { background-position: -224px -112px; } -.ui-icon-link { background-position: -240px -112px; } -.ui-icon-cancel { background-position: 0 -128px; } -.ui-icon-plus { background-position: -16px -128px; } -.ui-icon-plusthick { background-position: -32px -128px; } -.ui-icon-minus { background-position: -48px -128px; } -.ui-icon-minusthick { background-position: -64px -128px; } -.ui-icon-close { background-position: -80px -128px; } -.ui-icon-closethick { background-position: -96px -128px; } -.ui-icon-key { background-position: -112px -128px; } -.ui-icon-lightbulb { background-position: -128px -128px; } -.ui-icon-scissors { background-position: -144px -128px; } -.ui-icon-clipboard { background-position: -160px -128px; } -.ui-icon-copy { background-position: -176px -128px; } -.ui-icon-contact { background-position: -192px -128px; } -.ui-icon-image { background-position: -208px -128px; } -.ui-icon-video { background-position: -224px -128px; } -.ui-icon-script { background-position: -240px -128px; } -.ui-icon-alert { background-position: 0 -144px; } -.ui-icon-info { background-position: -16px -144px; } -.ui-icon-notice { background-position: -32px -144px; } -.ui-icon-help { background-position: -48px -144px; } -.ui-icon-check { background-position: -64px -144px; } -.ui-icon-bullet { background-position: -80px -144px; } -.ui-icon-radio-off { background-position: -96px -144px; } -.ui-icon-radio-on { background-position: -112px -144px; } -.ui-icon-pin-w { background-position: -128px -144px; } -.ui-icon-pin-s { background-position: -144px -144px; } -.ui-icon-play { background-position: 0 -160px; } -.ui-icon-pause { background-position: -16px -160px; } -.ui-icon-seek-next { background-position: -32px -160px; } -.ui-icon-seek-prev { background-position: -48px -160px; } -.ui-icon-seek-end { background-position: -64px -160px; } -.ui-icon-seek-first { background-position: -80px -160px; } -.ui-icon-stop { background-position: -96px -160px; } -.ui-icon-eject { background-position: -112px -160px; } -.ui-icon-volume-off { background-position: -128px -160px; } -.ui-icon-volume-on { background-position: -144px -160px; } -.ui-icon-power { background-position: 0 -176px; } -.ui-icon-signal-diag { background-position: -16px -176px; } -.ui-icon-signal { background-position: -32px -176px; } -.ui-icon-battery-0 { background-position: -48px -176px; } -.ui-icon-battery-1 { background-position: -64px -176px; } -.ui-icon-battery-2 { background-position: -80px -176px; } -.ui-icon-battery-3 { background-position: -96px -176px; } -.ui-icon-circle-plus { background-position: 0 -192px; } -.ui-icon-circle-minus { background-position: -16px -192px; } -.ui-icon-circle-close { background-position: -32px -192px; } -.ui-icon-circle-triangle-e { background-position: -48px -192px; } -.ui-icon-circle-triangle-s { background-position: -64px -192px; } -.ui-icon-circle-triangle-w { background-position: -80px -192px; } -.ui-icon-circle-triangle-n { background-position: -96px -192px; } -.ui-icon-circle-arrow-e { background-position: -112px -192px; } -.ui-icon-circle-arrow-s { background-position: -128px -192px; } -.ui-icon-circle-arrow-w { background-position: -144px -192px; } -.ui-icon-circle-arrow-n { background-position: -160px -192px; } -.ui-icon-circle-zoomin { background-position: -176px -192px; } -.ui-icon-circle-zoomout { background-position: -192px -192px; } -.ui-icon-circle-check { background-position: -208px -192px; } -.ui-icon-circlesmall-plus { background-position: 0 -208px; } -.ui-icon-circlesmall-minus { background-position: -16px -208px; } -.ui-icon-circlesmall-close { background-position: -32px -208px; } -.ui-icon-squaresmall-plus { background-position: -48px -208px; } -.ui-icon-squaresmall-minus { background-position: -64px -208px; } -.ui-icon-squaresmall-close { background-position: -80px -208px; } -.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } -.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } -.ui-icon-grip-solid-vertical { background-position: -32px -224px; } -.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } -.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } -.ui-icon-grip-diagonal-se { background-position: -80px -224px; } - - -/* Misc visuals -----------------------------------*/ - -/* Corner radius */ -.ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; } -.ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; } -.ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; } -.ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; } -.ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; } -.ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; } -.ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; } -.ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; } -.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; } - -/* Overlays */ -.ui-widget-overlay { background: #666666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat; opacity: .50;filter:Alpha(Opacity=50); } -.ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; background: #000000 url(images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 5px; -webkit-border-radius: 5px; }/* Resizable -----------------------------------*/ -.ui-resizable { position: relative;} -.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;} -.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } -.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0px; } -.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0px; } -.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0px; height: 100%; } -.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0px; height: 100%; } -.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } -.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } -.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } -.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* Accordion -----------------------------------*/ -.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } -.ui-accordion .ui-accordion-li-fix { display: inline; } -.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } -.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em 2.2em; } -.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } -.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; } -.ui-accordion .ui-accordion-content-active { display: block; }/* Dialog -----------------------------------*/ -.ui-dialog { position: relative; padding: .2em; width: 300px; } -.ui-dialog .ui-dialog-titlebar { padding: .5em .3em .3em 1em; position: relative; } -.ui-dialog .ui-dialog-title { float: left; margin: .1em 0 .2em; } -.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } -.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } -.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } -.ui-dialog .ui-dialog-content { border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } -.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } -.ui-dialog .ui-dialog-buttonpane button { float: right; margin: .5em .4em .5em 0; cursor: pointer; padding: .2em .6em .3em .6em; line-height: 1.4em; width:auto; overflow:visible; } -.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } -.ui-draggable .ui-dialog-titlebar { cursor: move; } -/* Slider -----------------------------------*/ -.ui-slider { position: relative; text-align: left; } -.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } -.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; } - -.ui-slider-horizontal { height: .8em; } -.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } -.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } -.ui-slider-horizontal .ui-slider-range-min { left: 0; } -.ui-slider-horizontal .ui-slider-range-max { right: 0; } - -.ui-slider-vertical { width: .8em; height: 100px; } -.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } -.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } -.ui-slider-vertical .ui-slider-range-min { bottom: 0; } -.ui-slider-vertical .ui-slider-range-max { top: 0; }/* Tabs -----------------------------------*/ -.ui-tabs { padding: .2em; zoom: 1; } -.ui-tabs .ui-tabs-nav { list-style: none; position: relative; padding: .2em .2em 0; } -.ui-tabs .ui-tabs-nav li { position: relative; float: left; border-bottom-width: 0 !important; margin: 0 .2em -1px 0; padding: 0; } -.ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding: .5em 1em; } -.ui-tabs .ui-tabs-nav li.ui-tabs-selected { padding-bottom: 1px; border-bottom-width: 0; } -.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } -.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ -.ui-tabs .ui-tabs-panel { padding: 1em 1.4em; display: block; border-width: 0; background: none; } -.ui-tabs .ui-tabs-hide { display: none !important; } -/* Datepicker -----------------------------------*/ -.ui-datepicker { width: 17em; padding: .2em .2em 0; } -.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } -.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } -.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } -.ui-datepicker .ui-datepicker-prev { left:2px; } -.ui-datepicker .ui-datepicker-next { right:2px; } -.ui-datepicker .ui-datepicker-prev-hover { left:1px; } -.ui-datepicker .ui-datepicker-next-hover { right:1px; } -.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } -.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } -.ui-datepicker .ui-datepicker-title select { float:left; font-size:1em; margin:1px 0; } -.ui-datepicker select.ui-datepicker-month-year {width: 100%;} -.ui-datepicker select.ui-datepicker-month, -.ui-datepicker select.ui-datepicker-year { width: 49%;} -.ui-datepicker .ui-datepicker-title select.ui-datepicker-year { float: right; } -.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } -.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } -.ui-datepicker td { border: 0; padding: 1px; } -.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } -.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } -.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } -.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } - -/* with multiple calendars */ -.ui-datepicker.ui-datepicker-multi { width:auto; } -.ui-datepicker-multi .ui-datepicker-group {... [truncated message content] |