mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 19:04:27 +02:00
update release notes
This commit is contained in:
4
NEWS
4
NEWS
@@ -1,3 +1,7 @@
|
|||||||
|
- added overLib functionality (Monte)
|
||||||
|
- updated debug console with config file vars (Monte)
|
||||||
|
- added debugging url control (Monte)
|
||||||
|
- added 'quotes' type to escape modifier (Monte, Mike Krus)
|
||||||
- added 'total' and 'iteration' section properties. (Andrei)
|
- added 'total' and 'iteration' section properties. (Andrei)
|
||||||
- added 'start', 'max', and step section attributes/properties. (Andrei)
|
- added 'start', 'max', and step section attributes/properties. (Andrei)
|
||||||
- fixed a bug with security checking of functions inside {if} tags. (Andrei)
|
- fixed a bug with security checking of functions inside {if} tags. (Andrei)
|
||||||
|
2
README
2
README
@@ -2,7 +2,7 @@ NAME:
|
|||||||
|
|
||||||
Smarty - the PHP compiling template engine
|
Smarty - the PHP compiling template engine
|
||||||
|
|
||||||
VERSION: 1.4.2
|
VERSION: 1.4.3
|
||||||
|
|
||||||
AUTHORS:
|
AUTHORS:
|
||||||
|
|
||||||
|
@@ -1,7 +1,17 @@
|
|||||||
|
1.4.4
|
||||||
|
-----
|
||||||
|
|
||||||
|
A few bug fixes, debugging console function for control via URL, and overLib
|
||||||
|
integration.
|
||||||
|
|
||||||
1.4.3
|
1.4.3
|
||||||
-----
|
-----
|
||||||
The major additions were the security system and the debugging console. Several
|
|
||||||
bugs were fixed. See Changelog for more details.
|
This release has a few bug fixes and several enhancements. Smarty now supports
|
||||||
|
template security for third-party template editing. These features disallow the
|
||||||
|
ability for someone to execute commands or PHP code from the template language.
|
||||||
|
Smarty also now has a built-in debugging console, which is a javascript pop-up
|
||||||
|
window that displays all the included template names and assigned variables.
|
||||||
|
|
||||||
1.4.2
|
1.4.2
|
||||||
-----
|
-----
|
||||||
|
@@ -88,6 +88,10 @@ function smarty_mod_escape($string, $esc_type = 'html')
|
|||||||
case 'url':
|
case 'url':
|
||||||
return urlencode($string);
|
return urlencode($string);
|
||||||
|
|
||||||
|
case 'quotes':
|
||||||
|
// escape unescaped single quotes
|
||||||
|
return preg_replace("%(?<!\\\\)'%", "\\'", $string);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return $string;
|
return $string;
|
||||||
}
|
}
|
||||||
@@ -614,13 +618,913 @@ function smarty_func_counter() {
|
|||||||
function smarty_func_assign_debug_info($args, &$smarty_obj) {
|
function smarty_func_assign_debug_info($args, &$smarty_obj) {
|
||||||
$assigned_vars = $smarty_obj->_tpl_vars;
|
$assigned_vars = $smarty_obj->_tpl_vars;
|
||||||
ksort($assigned_vars);
|
ksort($assigned_vars);
|
||||||
|
$config_vars = $smarty_obj->_config[0];
|
||||||
|
ksort($config_vars);
|
||||||
$included_templates = $smarty_obj->_included_tpls;
|
$included_templates = $smarty_obj->_included_tpls;
|
||||||
$smarty_obj->assign("_debug_keys",array_keys($assigned_vars));
|
$smarty_obj->assign("_debug_keys",array_keys($assigned_vars));
|
||||||
$smarty_obj->assign("_debug_vals",array_values($assigned_vars));
|
$smarty_obj->assign("_debug_vals",array_values($assigned_vars));
|
||||||
|
$smarty_obj->assign("_debug_config_keys",array_keys($config_vars));
|
||||||
|
$smarty_obj->assign("_debug_config_vals",array_values($config_vars));
|
||||||
$smarty_obj->assign("_debug_tpls",$included_templates);
|
$smarty_obj->assign("_debug_tpls",$included_templates);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*======================================================================*\
|
||||||
|
Function: smarty_func_overlib_init
|
||||||
|
Purpose: initialize use of overlib
|
||||||
|
\*======================================================================*/
|
||||||
|
function smarty_func_overlib_init($args, &$smarty_obj) {
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
<DIV ID="overDiv" STYLE="position:absolute; visibility:hidden; z-index:1000;"></DIV>
|
||||||
|
<SCRIPT LANGUAGE=javascript>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
|
||||||
|
//\//////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//\ overLIB 3.33 -- This notice must remain untouched at all times.
|
||||||
|
//\ Copyright Erik Bosrup 1998-2001. All rights reserved.
|
||||||
|
//\
|
||||||
|
//\ By Erik Bosrup (erik@bosrup.com). Last modified 2001-01-26.
|
||||||
|
//\ Portions by Dan Steinman (dansteinman.com). Additions by other people are
|
||||||
|
//\ listed on the overLIB homepage.
|
||||||
|
//\
|
||||||
|
//\ Get the latest version at http://www.bosrup.com/web/overlib/
|
||||||
|
//\
|
||||||
|
//\ This script is published under an open source license. Please read the license
|
||||||
|
//\ agreement online at: http://www.bosrup.com/web/overlib/license.html
|
||||||
|
//\ If you have questions regarding the license please contact erik@bosrup.com.
|
||||||
|
//\
|
||||||
|
//\ This script library was originally created for personal use. By request it has
|
||||||
|
//\ later been made public. This is free software. Do not sell this as your own
|
||||||
|
//\ work, or remove this copyright notice. For full details on copying or changing
|
||||||
|
//\ this script please read the license agreement at the link above.
|
||||||
|
//\
|
||||||
|
//\ Please give credit on sites that use overLIB and submit changes of the script
|
||||||
|
//\ so other people can use them as well. This script is free to use, don't abuse.
|
||||||
|
//\//////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
var INARRAY=1;
|
||||||
|
var CAPARRAY=2;
|
||||||
|
var STICKY=3;
|
||||||
|
var BACKGROUND=4;
|
||||||
|
var NOCLOSE=5;
|
||||||
|
var CAPTION=6;
|
||||||
|
var LEFT=7;
|
||||||
|
var RIGHT=8;
|
||||||
|
var CENTER=9;
|
||||||
|
var OFFSETX=10;
|
||||||
|
var OFFSETY=11;
|
||||||
|
var FGCOLOR=12;
|
||||||
|
var BGCOLOR=13;
|
||||||
|
var TEXTCOLOR=14;
|
||||||
|
var CAPCOLOR=15;
|
||||||
|
var CLOSECOLOR=16;
|
||||||
|
var WIDTH=17;
|
||||||
|
var BORDER=18;
|
||||||
|
var STATUS=19;
|
||||||
|
var AUTOSTATUS=20;
|
||||||
|
var AUTOSTATUSCAP=21;
|
||||||
|
var HEIGHT=22;
|
||||||
|
var CLOSETEXT=23;
|
||||||
|
var SNAPX=24;
|
||||||
|
var SNAPY=25;
|
||||||
|
var FIXX=26;
|
||||||
|
var FIXY=27;
|
||||||
|
var FGBACKGROUND=28;
|
||||||
|
var BGBACKGROUND=29;
|
||||||
|
var PADX=30;
|
||||||
|
var PADY=31;
|
||||||
|
var PADX2=32;
|
||||||
|
var PADY2=33;
|
||||||
|
var FULLHTML=34;
|
||||||
|
var ABOVE=35;
|
||||||
|
var BELOW=36;
|
||||||
|
var CAPICON=37;
|
||||||
|
var TEXTFONT=38;
|
||||||
|
var CAPTIONFONT=39;
|
||||||
|
var CLOSEFONT=40;
|
||||||
|
var TEXTSIZE=41;
|
||||||
|
var CAPTIONSIZE=42;
|
||||||
|
var CLOSESIZE=43;
|
||||||
|
var FRAME=44;
|
||||||
|
var TIMEOUT=45;
|
||||||
|
var FUNCTION=46;
|
||||||
|
var DELAY=47;
|
||||||
|
var HAUTO=48;
|
||||||
|
var VAUTO=49;
|
||||||
|
if(typeof ol_fgcolor=='undefined'){var ol_fgcolor="#CCCCFF";}
|
||||||
|
if(typeof ol_bgcolor=='undefined'){var ol_bgcolor="#333399";}
|
||||||
|
if(typeof ol_textcolor=='undefined'){var ol_textcolor="#000000";}
|
||||||
|
if(typeof ol_capcolor=='undefined'){var ol_capcolor="#FFFFFF";}
|
||||||
|
if(typeof ol_closecolor=='undefined'){var ol_closecolor="#9999FF";}
|
||||||
|
if(typeof ol_textfont=='undefined'){var ol_textfont="Verdana,Arial,Helvetica";}
|
||||||
|
if(typeof ol_captionfont=='undefined'){var ol_captionfont="Verdana,Arial,Helvetica";}
|
||||||
|
if(typeof ol_closefont=='undefined'){var ol_closefont="Verdana,Arial,Helvetica";}
|
||||||
|
if(typeof ol_textsize=='undefined'){var ol_textsize="1";}
|
||||||
|
if(typeof ol_captionsize=='undefined'){var ol_captionsize="1";}
|
||||||
|
if(typeof ol_closesize=='undefined'){var ol_closesize="1";}
|
||||||
|
if(typeof ol_width=='undefined'){var ol_width="200";}
|
||||||
|
if(typeof ol_border=='undefined'){var ol_border="1";}
|
||||||
|
if(typeof ol_offsetx=='undefined'){var ol_offsetx=10;}
|
||||||
|
if(typeof ol_offsety=='undefined'){var ol_offsety=10;}
|
||||||
|
if(typeof ol_text=='undefined'){var ol_text="Default Text";}
|
||||||
|
if(typeof ol_cap=='undefined'){var ol_cap="";}
|
||||||
|
if(typeof ol_sticky=='undefined'){var ol_sticky=0;}
|
||||||
|
if(typeof ol_background=='undefined'){var ol_background="";}
|
||||||
|
if(typeof ol_close=='undefined'){var ol_close="Close";}
|
||||||
|
if(typeof ol_hpos=='undefined'){var ol_hpos=8;}
|
||||||
|
if(typeof ol_status=='undefined'){var ol_status="";}
|
||||||
|
if(typeof ol_autostatus=='undefined'){var ol_autostatus=0;}
|
||||||
|
if(typeof ol_height=='undefined'){var ol_height=-1;}
|
||||||
|
if(typeof ol_snapx=='undefined'){var ol_snapx=0;}
|
||||||
|
if(typeof ol_snapy=='undefined'){var ol_snapy=0;}
|
||||||
|
if(typeof ol_fixx=='undefined'){var ol_fixx=-1;}
|
||||||
|
if(typeof ol_fixy=='undefined'){var ol_fixy=-1;}
|
||||||
|
if(typeof ol_fgbackground=='undefined'){var ol_fgbackground="";}
|
||||||
|
if(typeof ol_bgbackground=='undefined'){var ol_bgbackground="";}
|
||||||
|
if(typeof ol_padxl=='undefined'){var ol_padxl=1;}
|
||||||
|
if(typeof ol_padxr=='undefined'){var ol_padxr=1;}
|
||||||
|
if(typeof ol_padyt=='undefined'){var ol_padyt=1;}
|
||||||
|
if(typeof ol_padyb=='undefined'){var ol_padyb=1;}
|
||||||
|
if(typeof ol_fullhtml=='undefined'){var ol_fullhtml=0;}
|
||||||
|
if(typeof ol_vpos=='undefined'){var ol_vpos=36;}
|
||||||
|
if(typeof ol_aboveheight=='undefined'){var ol_aboveheight=0;}
|
||||||
|
if(typeof ol_caption=='undefined'){var ol_capicon="";}
|
||||||
|
if(typeof ol_frame=='undefined'){var ol_frame=self;}
|
||||||
|
if(typeof ol_timeout=='undefined'){var ol_timeout=0;}
|
||||||
|
if(typeof ol_function=='undefined'){var ol_function=Function();}
|
||||||
|
if(typeof ol_delay=='undefined'){var ol_delay=0;}
|
||||||
|
if(typeof ol_hauto=='undefined'){var ol_hauto=0;}
|
||||||
|
if(typeof ol_vauto=='undefined'){var ol_vauto=0;}
|
||||||
|
var ol_texts=new Array("Array Text 0", "Array Text 1");
|
||||||
|
var ol_caps=new Array("Array Caption 0", "Array Caption 1");
|
||||||
|
var otext="";
|
||||||
|
var ocap="";
|
||||||
|
var osticky=0;
|
||||||
|
var obackground="";
|
||||||
|
var oclose="Close";
|
||||||
|
var ohpos=8;
|
||||||
|
var ooffsetx=2;
|
||||||
|
var ooffsety=2;
|
||||||
|
var ofgcolor="";
|
||||||
|
var obgcolor="";
|
||||||
|
var otextcolor="";
|
||||||
|
var ocapcolor="";
|
||||||
|
var oclosecolor="";
|
||||||
|
var owidth=100;
|
||||||
|
var oborder=1;
|
||||||
|
var ostatus="";
|
||||||
|
var oautostatus=0;
|
||||||
|
var oheight=-1;
|
||||||
|
var osnapx=0;
|
||||||
|
var osnapy=0;
|
||||||
|
var ofixx=-1;
|
||||||
|
var ofixy=-1;
|
||||||
|
var ofgbackground="";
|
||||||
|
var obgbackground="";
|
||||||
|
var opadxl=0;
|
||||||
|
var opadxr=0;
|
||||||
|
var opadyt=0;
|
||||||
|
var opadyb=0;
|
||||||
|
var ofullhtml=0;
|
||||||
|
var ovpos=36;
|
||||||
|
var oaboveheight=0;
|
||||||
|
var ocapicon="";
|
||||||
|
var otextfont="Verdana,Arial,Helvetica";
|
||||||
|
var ocaptionfont="Verdana,Arial,Helvetica";
|
||||||
|
var oclosefont="Verdana,Arial,Helvetica";
|
||||||
|
var otextsize="1";
|
||||||
|
var ocaptionsize="1";
|
||||||
|
var oclosesize="1";
|
||||||
|
var oframe=self;
|
||||||
|
var otimeout=0;
|
||||||
|
var otimerid=0;
|
||||||
|
var oallowmove=0;
|
||||||
|
var ofunction=Function();
|
||||||
|
var odelay=0;
|
||||||
|
var odelayid=0;
|
||||||
|
var ohauto=0;
|
||||||
|
var ovauto=0;
|
||||||
|
var ox=0;
|
||||||
|
var oy=0;
|
||||||
|
var oallow=0;
|
||||||
|
var oshowingsticky=0;
|
||||||
|
var oremovecounter=0;
|
||||||
|
var over=null;
|
||||||
|
var ns4=(document.layers)? true:false;
|
||||||
|
var ns6=(document.getElementById)? true:false;
|
||||||
|
var ie4=(document.all)? true:false;
|
||||||
|
var ie5=false;
|
||||||
|
if(ie4){
|
||||||
|
if(navigator.userAgent.indexOf('MSIE 5')>0){
|
||||||
|
ie5=true;
|
||||||
|
}
|
||||||
|
if(ns6){
|
||||||
|
ns6=false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if((ns4)||(ie4)||(ns6)){
|
||||||
|
document.onmousemove=mouseMove
|
||||||
|
if(ns4)document.captureEvents(Event.MOUSEMOVE)
|
||||||
|
}else{
|
||||||
|
overlib=no_overlib;
|
||||||
|
nd=no_overlib;
|
||||||
|
ver3fix=true;
|
||||||
|
}
|
||||||
|
function no_overlib(){
|
||||||
|
return ver3fix;
|
||||||
|
}
|
||||||
|
function overlib(){
|
||||||
|
otext=ol_text;
|
||||||
|
ocap=ol_cap;
|
||||||
|
osticky=ol_sticky;
|
||||||
|
obackground=ol_background;
|
||||||
|
oclose=ol_close;
|
||||||
|
ohpos=ol_hpos;
|
||||||
|
ooffsetx=ol_offsetx;
|
||||||
|
ooffsety=ol_offsety;
|
||||||
|
ofgcolor=ol_fgcolor;
|
||||||
|
obgcolor=ol_bgcolor;
|
||||||
|
otextcolor=ol_textcolor;
|
||||||
|
ocapcolor=ol_capcolor;
|
||||||
|
oclosecolor=ol_closecolor;
|
||||||
|
owidth=ol_width;
|
||||||
|
oborder=ol_border;
|
||||||
|
ostatus=ol_status;
|
||||||
|
oautostatus=ol_autostatus;
|
||||||
|
oheight=ol_height;
|
||||||
|
osnapx=ol_snapx;
|
||||||
|
osnapy=ol_snapy;
|
||||||
|
ofixx=ol_fixx;
|
||||||
|
ofixy=ol_fixy;
|
||||||
|
ofgbackground=ol_fgbackground;
|
||||||
|
obgbackground=ol_bgbackground;
|
||||||
|
opadxl=ol_padxl;
|
||||||
|
opadxr=ol_padxr;
|
||||||
|
opadyt=ol_padyt;
|
||||||
|
opadyb=ol_padyb;
|
||||||
|
ofullhtml=ol_fullhtml;
|
||||||
|
ovpos=ol_vpos;
|
||||||
|
oaboveheight=ol_aboveheight;
|
||||||
|
ocapicon=ol_capicon;
|
||||||
|
otextfont=ol_textfont;
|
||||||
|
ocaptionfont=ol_captionfont;
|
||||||
|
oclosefont=ol_closefont;
|
||||||
|
otextsize=ol_textsize;
|
||||||
|
ocaptionsize=ol_captionsize;
|
||||||
|
oclosesize=ol_closesize;
|
||||||
|
otimeout=ol_timeout;
|
||||||
|
ofunction=ol_function;
|
||||||
|
odelay=ol_delay;
|
||||||
|
ohauto=ol_hauto;
|
||||||
|
ovauto=ol_vauto;
|
||||||
|
if((ns4)||(ie4)||(ns6)){
|
||||||
|
oframe=ol_frame;
|
||||||
|
if(ns4)over=oframe.document.overDiv
|
||||||
|
if(ie4)over=oframe.overDiv.style
|
||||||
|
if(ns6)over=oframe.document.getElementById("overDiv");
|
||||||
|
}
|
||||||
|
var c=-1;
|
||||||
|
var ar=arguments;
|
||||||
|
for(i=0;i < ar.length;i++){
|
||||||
|
if(c==0){
|
||||||
|
if(ar[i]==1){c=1;}
|
||||||
|
if(ar[i]==2){c=2;}
|
||||||
|
if(ar[i]==3){c=z3(ar[i]);}
|
||||||
|
if(ar[i]==4){c=4;}
|
||||||
|
if(ar[i]==5){c=z5(ar[i]);}
|
||||||
|
if(ar[i]==6){c=6;}
|
||||||
|
if(ar[i]==7){c=zHPOS(ar[i]);}
|
||||||
|
if(ar[i]==8){c=zHPOS(ar[i]);}
|
||||||
|
if(ar[i]==9){c=zHPOS(ar[i]);}
|
||||||
|
if(ar[i]==10){c=10;}
|
||||||
|
if(ar[i]==11){c=11;}
|
||||||
|
if(ar[i]==12){c=12;}
|
||||||
|
if(ar[i]==13){c=13;}
|
||||||
|
if(ar[i]==14){c=14;}
|
||||||
|
if(ar[i]==15){c=15;}
|
||||||
|
if(ar[i]==16){c=16;}
|
||||||
|
if(ar[i]==17){c=17;}
|
||||||
|
if(ar[i]==18){c=18;}
|
||||||
|
if(ar[i]==19){c=19;}
|
||||||
|
if(ar[i]==20){c=z20(ar[i]);}
|
||||||
|
if(ar[i]==21){c=z21(ar[i]);}
|
||||||
|
if(ar[i]==22){c=22;}
|
||||||
|
if(ar[i]==23){c=23;}
|
||||||
|
if(ar[i]==24){c=24;}
|
||||||
|
if(ar[i]==25){c=25;}
|
||||||
|
if(ar[i]==26){c=26;}
|
||||||
|
if(ar[i]==27){c=27;}
|
||||||
|
if(ar[i]==28){c=28;}
|
||||||
|
if(ar[i]==29){c=29;}
|
||||||
|
if(ar[i]==30){c=30;}
|
||||||
|
if(ar[i]==31){c=31;}
|
||||||
|
if(ar[i]==34){c=z34(ar[i]);}
|
||||||
|
if(ar[i]==35){c=zVPOS(ar[i]);}
|
||||||
|
if(ar[i]==36){c=zVPOS(ar[i]);}
|
||||||
|
if(ar[i]==37){c=37;}
|
||||||
|
if(ar[i]==38){c=38;}
|
||||||
|
if(ar[i]==39){c=39;}
|
||||||
|
if(ar[i]==40){c=40;}
|
||||||
|
if(ar[i]==41){c=41;}
|
||||||
|
if(ar[i]==42){c=42;}
|
||||||
|
if(ar[i]==43){c=43;}
|
||||||
|
if(ar[i]==44){c=44;}
|
||||||
|
if(ar[i]==45){c=45;}
|
||||||
|
if(ar[i]==46){c=46;}
|
||||||
|
if(ar[i]==47){c=47;}
|
||||||
|
if(ar[i]==48){c=z48(ar[i]);}
|
||||||
|
if(ar[i]==49){c=z49(ar[i]);}
|
||||||
|
}else{
|
||||||
|
if(c < 0){
|
||||||
|
if(ar[i]==1){
|
||||||
|
c=1;
|
||||||
|
}else{
|
||||||
|
otext=ar[i];
|
||||||
|
c=0;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if(c==1){c=z1(ar[i]);}
|
||||||
|
if(c==2){c=z2(ar[i]);}
|
||||||
|
if(c==4){c=z4(ar[i]);}
|
||||||
|
if(c==6){c=z6(ar[i]);}
|
||||||
|
if(c==10){c=z10(ar[i]);}
|
||||||
|
if(c==11){c=z11(ar[i]);}
|
||||||
|
if(c==12){c=z12(ar[i]);}
|
||||||
|
if(c==13){c=z13(ar[i]);}
|
||||||
|
if(c==14){c=z14(ar[i]);}
|
||||||
|
if(c==15){c=z15(ar[i]);}
|
||||||
|
if(c==16){c=z16(ar[i]);}
|
||||||
|
if(c==17){c=z17(ar[i]);}
|
||||||
|
if(c==18){c=z18(ar[i]);}
|
||||||
|
if(c==19){c=z19(ar[i]);}
|
||||||
|
if(c==22){c=z22(ar[i]);}
|
||||||
|
if(c==23){c=z23(ar[i]);}
|
||||||
|
if(c==24){c=z24(ar[i]);}
|
||||||
|
if(c==25){c=z25(ar[i]);}
|
||||||
|
if(c==26){c=z26(ar[i]);}
|
||||||
|
if(c==27){c=z27(ar[i]);}
|
||||||
|
if(c==28){c=z28(ar[i]);}
|
||||||
|
if(c==29){c=z29(ar[i]);}
|
||||||
|
if(c==32){c=z32(ar[i]);}// must be before 30
|
||||||
|
if(c==33){c=z33(ar[i]);}// must be before 31
|
||||||
|
if(c==30){c=z30(ar[i]);}
|
||||||
|
if(c==31){c=z31(ar[i]);}
|
||||||
|
if(c==37){c=z37(ar[i]);}
|
||||||
|
if(c==38){c=z38(ar[i]);}
|
||||||
|
if(c==39){c=z39(ar[i]);}
|
||||||
|
if(c==40){c=z40(ar[i]);}
|
||||||
|
if(c==41){c=z41(ar[i]);}
|
||||||
|
if(c==42){c=z42(ar[i]);}
|
||||||
|
if(c==43){c=z43(ar[i]);}
|
||||||
|
if(c==44){c=z44(ar[i]);}
|
||||||
|
if(c==45){c=z45(ar[i]);}
|
||||||
|
if(c==46){c=z46(ar[i]);}
|
||||||
|
if(c==47){c=z47(ar[i]);}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(odelay==0){
|
||||||
|
return overlib333();
|
||||||
|
}else{
|
||||||
|
odelayid=setTimeout("overlib333()", odelay);
|
||||||
|
if(osticky){
|
||||||
|
return false;
|
||||||
|
}else{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function nd(){
|
||||||
|
if(oremovecounter >=1){oshowingsticky=0};
|
||||||
|
if((ns4)||(ie4)||(ns6)){
|
||||||
|
if(oshowingsticky==0){
|
||||||
|
oallowmove=0;
|
||||||
|
if(over !=null)hideObject(over);
|
||||||
|
}else{
|
||||||
|
oremovecounter++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
function overlib333(){
|
||||||
|
var layerhtml;
|
||||||
|
if(obackground !="" || ofullhtml){
|
||||||
|
layerhtml=ol_content_background(otext, obackground, ofullhtml);
|
||||||
|
}else{
|
||||||
|
if(ofgbackground !=""){
|
||||||
|
ofgbackground="BACKGROUND=\""+ofgbackground+"\"";
|
||||||
|
}
|
||||||
|
if(obgbackground !=""){
|
||||||
|
obgbackground="BACKGROUND=\""+obgbackground+"\"";
|
||||||
|
}
|
||||||
|
if(ofgcolor !=""){
|
||||||
|
ofgcolor="BGCOLOR=\""+ofgcolor+"\"";
|
||||||
|
}
|
||||||
|
if(obgcolor !=""){
|
||||||
|
obgcolor="BGCOLOR=\""+obgcolor+"\"";
|
||||||
|
}
|
||||||
|
if(oheight > 0){
|
||||||
|
oheight="HEIGHT=" + oheight;
|
||||||
|
}else{
|
||||||
|
oheight="";
|
||||||
|
}
|
||||||
|
if(ocap==""){
|
||||||
|
layerhtml=ol_content_simple(otext);
|
||||||
|
}else{
|
||||||
|
if(osticky){
|
||||||
|
layerhtml=ol_content_caption(otext, ocap, oclose);
|
||||||
|
}else{
|
||||||
|
layerhtml=ol_content_caption(otext, ocap, "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(osticky){
|
||||||
|
oshowingsticky=1;
|
||||||
|
oremovecounter=0;
|
||||||
|
}
|
||||||
|
layerWrite(layerhtml);
|
||||||
|
if(oautostatus > 0){
|
||||||
|
ostatus=otext;
|
||||||
|
if(oautostatus > 1){
|
||||||
|
ostatus=ocap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
oallowmove=0;
|
||||||
|
if(otimeout > 0){
|
||||||
|
if(otimerid > 0)clearTimeout(otimerid);
|
||||||
|
otimerid=setTimeout("cClick()", otimeout);
|
||||||
|
}
|
||||||
|
disp(ostatus);
|
||||||
|
if(osticky){
|
||||||
|
oallowmove=0;
|
||||||
|
return false;
|
||||||
|
}else{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function ol_content_simple(text){
|
||||||
|
txt="<TABLE WIDTH="+owidth+" BORDER=0 CELLPADDING="+oborder+" CELLSPACING=0 "+obgcolor+" "+oheight+"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 "+ofgcolor+" "+ofgbackground+" "+oheight+"><TR><TD VALIGN=TOP><FONT FACE=\""+otextfont+"\" COLOR=\""+otextcolor+"\" SIZE=\""+otextsize+"\">"+text+"</FONT></TD></TR></TABLE></TD></TR></TABLE>";
|
||||||
|
set_background("");
|
||||||
|
return txt;
|
||||||
|
}
|
||||||
|
function ol_content_caption(text, title, close){
|
||||||
|
closing="";
|
||||||
|
if(close !=""){
|
||||||
|
closing="<TD ALIGN=RIGHT><A HREF=\"/\" onMouseOver=\"cClick();\"><FONT COLOR=\""+oclosecolor+"\" FACE=\""+oclosefont+"\" SIZE=\""+oclosesize+"\">"+close+"</FONT></A></TD>";
|
||||||
|
}
|
||||||
|
if(ocapicon !=""){
|
||||||
|
ocapicon="<IMG SRC=\""+ocapicon+"\"> ";
|
||||||
|
}
|
||||||
|
txt="<TABLE WIDTH="+owidth+" BORDER=0 CELLPADDING="+oborder+" CELLSPACING=0 "+obgcolor+" "+obgbackground+" "+oheight+"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD><B><FONT COLOR=\""+ocapcolor+"\" FACE=\""+ocaptionfont+"\" SIZE=\""+ocaptionsize+"\">"+ocapicon+title+"</FONT></B></TD>"+closing+"</TR></TABLE><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 "+ofgcolor+" "+ofgbackground+" "+oheight+"><TR><TD VALIGN=TOP><FONT COLOR=\""+otextcolor+"\" FACE=\""+otextfont+"\" SIZE=\""+otextsize+"\">"+text+"</FONT></TD></TR></TABLE></TD></TR></TABLE>";
|
||||||
|
set_background("");
|
||||||
|
return txt;
|
||||||
|
}
|
||||||
|
function ol_content_background(text, picture, hasfullhtml){
|
||||||
|
if(hasfullhtml){
|
||||||
|
txt=text;
|
||||||
|
}else{
|
||||||
|
txt="<TABLE WIDTH="+owidth+" BORDER=0 CELLPADDING=0 CELLSPACING=0 HEIGHT="+oheight+"><TR><TD COLSPAN=3 HEIGHT="+opadyt+"></TD></TR><TR><TD WIDTH="+opadxl+"></TD><TD VALIGN=TOP WIDTH="+(owidth-opadxl-opadxr)+"><FONT FACE=\""+otextfont+"\" COLOR=\""+otextcolor+"\" SIZE=\""+otextsize+"\">"+text+"</FONT></TD><TD WIDTH="+opadxr+"></TD></TR><TR><TD COLSPAN=3 HEIGHT="+opadyb+"></TD></TR></TABLE>";
|
||||||
|
}
|
||||||
|
set_background(picture);
|
||||||
|
return txt;
|
||||||
|
}
|
||||||
|
function set_background(pic){
|
||||||
|
if(pic==""){
|
||||||
|
if(ie4)over.backgroundImage="none";
|
||||||
|
if(ns6)over.style.backgroundImage="none";
|
||||||
|
}else{
|
||||||
|
if(ns4){
|
||||||
|
over.background.src=pic;
|
||||||
|
}else if(ie4){
|
||||||
|
over.backgroundImage="url("+pic+")";
|
||||||
|
}else if(ns6){
|
||||||
|
over.style.backgroundImage="url("+pic+")";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function disp(statustext){
|
||||||
|
if((ns4)||(ie4)||(ns6)){
|
||||||
|
if(oallowmove==0){
|
||||||
|
placeLayer();
|
||||||
|
showObject(over);
|
||||||
|
oallowmove=1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(statustext !=""){
|
||||||
|
self.status=statustext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function placeLayer(){
|
||||||
|
var placeX, placeY;
|
||||||
|
if(ofixx > -1){
|
||||||
|
placeX=ofixx;
|
||||||
|
}else{
|
||||||
|
winoffset=(ie4)? oframe.document.body.scrollLeft : oframe.pageXOffset;
|
||||||
|
if(ie4)iwidth=oframe.document.body.clientWidth;
|
||||||
|
if(ns4)iwidth=oframe.innerWidth;// was screwed in mozilla, fixed now?
|
||||||
|
if(ns6)iwidth=oframe.outerWidth;
|
||||||
|
if(ohauto==1){
|
||||||
|
if((ox - winoffset)>((eval(iwidth))/ 2)){
|
||||||
|
ohpos=7;
|
||||||
|
}else{
|
||||||
|
ohpos=8;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(ohpos==9){// Center
|
||||||
|
placeX=ox+ooffsetx-(owidth/2);
|
||||||
|
}
|
||||||
|
if(ohpos==8){// Right
|
||||||
|
placeX=ox+ooffsetx;
|
||||||
|
if((eval(placeX)+ eval(owidth))>(winoffset + iwidth)){
|
||||||
|
placeX=iwidth + winoffset - owidth;
|
||||||
|
if(placeX < 0)placeX=0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(ohpos==7){// Left
|
||||||
|
placeX=ox-ooffsetx-owidth;
|
||||||
|
if(placeX < winoffset)placeX=winoffset;
|
||||||
|
}
|
||||||
|
if(osnapx > 1){
|
||||||
|
var snapping=placeX % osnapx;
|
||||||
|
if(ohpos==7){
|
||||||
|
placeX=placeX -(osnapx + snapping);
|
||||||
|
}else{
|
||||||
|
placeX=placeX +(osnapx - snapping);
|
||||||
|
}
|
||||||
|
if(placeX < 0)placeX=0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(ofixy > -1){
|
||||||
|
placeY=ofixy;
|
||||||
|
}else{
|
||||||
|
if(ovauto==1){
|
||||||
|
if(ie4)iheight=oframe.document.body.clientHeight;
|
||||||
|
if(ns4)iheight=oframe.innerHeight;
|
||||||
|
if(ns6)iheight=oframe.outerHeight;
|
||||||
|
iheight=(eval(iheight))/ 2;
|
||||||
|
if(oy > iheight){
|
||||||
|
ovpos=35;
|
||||||
|
}else{
|
||||||
|
ovpos=36;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(oaboveheight > 0 && ovpos==35){
|
||||||
|
placeY=oy -(oaboveheight + ooffsety);
|
||||||
|
}else{
|
||||||
|
placeY=oy + ooffsety;
|
||||||
|
}
|
||||||
|
if(osnapy > 1){
|
||||||
|
var snapping=placeY % osnapy;
|
||||||
|
if(oaboveheight > 0 && ovpos==35){
|
||||||
|
placeY=placeY -(osnapy + snapping);
|
||||||
|
}else{
|
||||||
|
placeY=placeY +(osnapy - snapping);
|
||||||
|
}
|
||||||
|
if(placeY < 0)placeY=0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
repositionTo(over, placeX, placeY);
|
||||||
|
}
|
||||||
|
function mouseMove(e){
|
||||||
|
if((ns4)||(ns6)){ox=e.pageX;oy=e.pageY;}
|
||||||
|
if(ie4){ox=event.x;oy=event.y;}
|
||||||
|
if(ie5){ox=event.x+oframe.document.body.scrollLeft;oy=event.y+oframe.document.body.scrollTop;}
|
||||||
|
if(oallowmove==1){
|
||||||
|
placeLayer();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function cClick(){
|
||||||
|
hideObject(over);
|
||||||
|
oshowingsticky=0;
|
||||||
|
}
|
||||||
|
function compatibleframe(frameid){
|
||||||
|
if(ns4){
|
||||||
|
if(typeof frameid.document.overDiv=='undefined')return false;
|
||||||
|
}else if(ie4){
|
||||||
|
if(typeof frameid.document.all["overDiv"]=='undefined')return false;
|
||||||
|
}else if(ns6){
|
||||||
|
if(frameid.document.getElementById('overDiv')==null)return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
function layerWrite(txt){
|
||||||
|
txt +="\n";
|
||||||
|
if(ns4){
|
||||||
|
var lyr=oframe.document.overDiv.document
|
||||||
|
lyr.write(txt)
|
||||||
|
lyr.close()
|
||||||
|
}else if(ie4){
|
||||||
|
oframe.document.all["overDiv"].innerHTML=txt
|
||||||
|
}else if(ns6){
|
||||||
|
range=oframe.document.createRange();
|
||||||
|
range.setStartBefore(over);
|
||||||
|
domfrag=range.createContextualFragment(txt);
|
||||||
|
while(over.hasChildNodes()){
|
||||||
|
over.removeChild(over.lastChild);
|
||||||
|
}
|
||||||
|
over.appendChild(domfrag);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function showObject(obj){
|
||||||
|
if(ns4)obj.visibility="show";
|
||||||
|
else if(ie4)obj.visibility="visible";
|
||||||
|
else if(ns6)obj.style.visibility="visible";
|
||||||
|
}
|
||||||
|
function hideObject(obj){
|
||||||
|
if(ns4)obj.visibility="hide";
|
||||||
|
else if(ie4)obj.visibility="hidden";
|
||||||
|
else if(ns6)obj.style.visibility="hidden";
|
||||||
|
if(otimerid > 0)clearTimeout(otimerid);
|
||||||
|
if(odelayid > 0)clearTimeout(odelayid);
|
||||||
|
otimerid=0;
|
||||||
|
odelayid=0;
|
||||||
|
self.status="";
|
||||||
|
}
|
||||||
|
function repositionTo(obj,xL,yL){
|
||||||
|
if((ns4)||(ie4)){
|
||||||
|
obj.left=xL;
|
||||||
|
obj.top=yL;
|
||||||
|
}else if(ns6){
|
||||||
|
obj.style.left=xL + "px";
|
||||||
|
obj.style.top=yL+ "px";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function z1(id){
|
||||||
|
otext=ol_texts[id];
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z2(id){
|
||||||
|
ocap=ol_caps[id];
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z3(unused){
|
||||||
|
osticky=1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z4(file){
|
||||||
|
obackground=file;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z5(unused){
|
||||||
|
oclose="";
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z6(text){
|
||||||
|
ocap=text;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function zHPOS(pos){
|
||||||
|
ohpos=pos;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z10(offset){
|
||||||
|
ooffsetx=offset;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z11(offset){
|
||||||
|
ooffsety=offset;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z12(clr){
|
||||||
|
ofgcolor=clr;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z13(clr){
|
||||||
|
obgcolor=clr;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z14(clr){
|
||||||
|
otextcolor=clr;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z15(clr){
|
||||||
|
ocapcolor=clr;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z16(clr){
|
||||||
|
oclosecolor=clr;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z17(pixels){
|
||||||
|
owidth=pixels;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z18(pixels){
|
||||||
|
oborder=pixels;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z19(text){
|
||||||
|
ostatus=text;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z20(val){
|
||||||
|
oautostatus=1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z21(val){
|
||||||
|
oautostatus=2;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z22(pixels){
|
||||||
|
oheight=pixels;
|
||||||
|
oaboveheight=pixels;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z23(text){
|
||||||
|
oclose=text;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z24(pixels){
|
||||||
|
osnapx=pixels;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z25(pixels){
|
||||||
|
osnapy=pixels;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z26(pos){
|
||||||
|
ofixx=pos;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z27(pos){
|
||||||
|
ofixy=pos;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z28(picture){
|
||||||
|
ofgbackground=picture;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z29(picture){
|
||||||
|
obgbackground=picture;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z30(pixels){
|
||||||
|
opadxl=pixels;
|
||||||
|
return 32;
|
||||||
|
}
|
||||||
|
function z31(pixels){
|
||||||
|
opadyt=pixels;
|
||||||
|
return 33;
|
||||||
|
}
|
||||||
|
function z32(pixels){
|
||||||
|
opadxr=pixels;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z33(pixels){
|
||||||
|
opadyb=pixels;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z34(unused){
|
||||||
|
ofullhtml=1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function zVPOS(pos){
|
||||||
|
ovpos=pos;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z37(icon){
|
||||||
|
ocapicon=icon;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z38(fontname){
|
||||||
|
otextfont=fontname;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z39(fontname){
|
||||||
|
ocaptionfont=fontname;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z40(fontname){
|
||||||
|
oclosefont=fontname;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z41(fontsize){
|
||||||
|
otextsize=fontsize;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z42(fontsize){
|
||||||
|
ocaptionsize=fontsize;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z43(fontsize){
|
||||||
|
oclosesize=fontsize;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z44(frm){
|
||||||
|
oframe=compatibleframe(frm)? frm : ol_frame;
|
||||||
|
if((ns4)||(ie4 ||(ns6))){
|
||||||
|
if(ns4)over=oframe.document.overDiv;
|
||||||
|
if(ie4)over=oframe.overDiv.style;
|
||||||
|
if(ns6)over=oframe.document.getElementById("overDiv");
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z45(maxtime){
|
||||||
|
otimeout=maxtime;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z46(callme){
|
||||||
|
otext=callme()
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z47(waittime){
|
||||||
|
odelay=waittime;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z48(onoff){
|
||||||
|
if(ohauto==0){
|
||||||
|
ohauto=1;
|
||||||
|
}else{
|
||||||
|
ohauto=0;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
function z49(onoff){
|
||||||
|
if(ovauto==0){
|
||||||
|
ovauto=1;
|
||||||
|
}else{
|
||||||
|
ovauto=0;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// -->
|
||||||
|
|
||||||
|
</SCRIPT>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*======================================================================*\
|
||||||
|
Function: smarty_func_overlib
|
||||||
|
Purpose: make text pop up in windows via overlib
|
||||||
|
\*======================================================================*/
|
||||||
|
function smarty_func_overlib($args, &$smarty_obj) {
|
||||||
|
extract($args);
|
||||||
|
if (empty($text)) {
|
||||||
|
$smarty_obj->_trigger_error_msg("overlib: attribute 'text' required");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(empty($trigger)) { $trigger = "onMouseOver"; }
|
||||||
|
|
||||||
|
echo $trigger.'="return overlib(\''.str_replace("'","\'",$text).'\'';
|
||||||
|
if($sticky) { echo ",STICKY"; }
|
||||||
|
if(!empty($caption)) { echo ",CAPTION,'".str_replace("'","\'",$caption)."'"; }
|
||||||
|
if(!empty($fgcolor)) { echo ",FGCOLOR,'$fgcolor'"; }
|
||||||
|
if(!empty($bgcolor)) { echo ",BGCOLOR,'$bgcolor'"; }
|
||||||
|
if(!empty($textcolor)) { echo ",TEXTCOLOR,'$textcolor'"; }
|
||||||
|
if(!empty($capcolor)) { echo ",CAPCOLOR,'$capcolor'"; }
|
||||||
|
if(!empty($closecolor)) { echo ",CLOSECOLOR,'$closecolor'"; }
|
||||||
|
if(!empty($textfont)) { echo ",TEXTFONT,'$textfont'"; }
|
||||||
|
if(!empty($captionfont)) { echo ",CAPTIONFONT,'$captionfont'"; }
|
||||||
|
if(!empty($closefont)) { echo ",CLOSEFONT,'$closefont'"; }
|
||||||
|
if(!empty($textsize)) { echo ",TEXTSIZE,'$textsize'"; }
|
||||||
|
if(!empty($captionsize)) { echo ",CAPTIONSIZE,'$captionsize'"; }
|
||||||
|
if(!empty($closesize)) { echo ",CLOSESIZE,'$closesize'"; }
|
||||||
|
if(!empty($width)) { echo ",WIDTH,'$width'"; }
|
||||||
|
if(!empty($height)) { echo ",HEIGHT,'$height'"; }
|
||||||
|
if(!empty($left)) { echo ",LEFT"; }
|
||||||
|
if(!empty($right)) { echo ",RIGHT"; }
|
||||||
|
if(!empty($center)) { echo ",CENTER"; }
|
||||||
|
if(!empty($above)) { echo ",ABOVE"; }
|
||||||
|
if(!empty($below)) { echo ",BELOW"; }
|
||||||
|
if(!empty($border)) { echo ",BORDER,'$border'"; }
|
||||||
|
if(!empty($offsetx)) { echo ",OFFSETX,'$offsetx'"; }
|
||||||
|
if(!empty($offsety)) { echo ",OFFSETY,'$offsetxy'"; }
|
||||||
|
if(!empty($fgbackground)) { echo ",FGBACKGROUND,'$fgbackground'"; }
|
||||||
|
if(!empty($bgbackground)) { echo ",BGBACKGROUND,'$bgbackground'"; }
|
||||||
|
if(!empty($closetext)) { echo ",CLOSETEXT,'".str_replace("'","\'",$closetext)."'"; }
|
||||||
|
if(!empty($noclose)) { echo ",NOCLOSE"; }
|
||||||
|
if(!empty($status)) { echo ",STATUS,'".str_replace("'","\'",$status)."'"; }
|
||||||
|
if(!empty($autostatus)) { echo ",AUTOSTATUS"; }
|
||||||
|
if(!empty($autostatuscap)) { echo ",AUTOSTATUSCAP"; }
|
||||||
|
if(!empty($inarray)) { echo ",INARRAY,'$inarray'"; }
|
||||||
|
if(!empty($caparray)) { echo ",CAPARRAY,'$caparray'"; }
|
||||||
|
if(!empty($capicaon)) { echo ",CAPICON,'$capicon'"; }
|
||||||
|
if(!empty($snapx)) { echo ",SNAPX,'$snapx'"; }
|
||||||
|
if(!empty($snapy)) { echo ",SNAPY,'$snapy'"; }
|
||||||
|
if(!empty($fixy)) { echo ",FIXY,'$fixy'"; }
|
||||||
|
if(!empty($background)) { echo ",BACKGROUND,'$background'"; }
|
||||||
|
if(!empty($padx)) { echo ",PADX,'$padx'"; }
|
||||||
|
if(!empty($pady)) { echo ",PADY,'$pady'"; }
|
||||||
|
if(!empty($fullhtml)) { echo ",FULLHTML"; }
|
||||||
|
if(!empty($frame)) { echo ",FRAME,'$frame'"; }
|
||||||
|
if(!empty($timeout)) { echo ",TIMEOUT,'$timeout'"; }
|
||||||
|
if(!empty($function)) { echo ",FUNCTION,'$function'"; }
|
||||||
|
if(!empty($delay)) { echo ",DELAY,'$delay'"; }
|
||||||
|
if(!empty($hauto)) { echo ",HAUTO"; }
|
||||||
|
if(!empty($vauto)) { echo ",VAUTO"; }
|
||||||
|
echo ');" onMouseOut="nd();"';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* vim: set expandtab: */
|
/* vim: set expandtab: */
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@@ -62,7 +62,11 @@ class Smarty
|
|||||||
|
|
||||||
var $debugging = false; // enable debugging console true/false
|
var $debugging = false; // enable debugging console true/false
|
||||||
var $debug_tpl = 'file:debug.tpl'; // path to debug console template
|
var $debug_tpl = 'file:debug.tpl'; // path to debug console template
|
||||||
|
var $debugging_ctrl = 'NONE'; // Possible values:
|
||||||
|
// NONE - no debug control allowed
|
||||||
|
// URL - enable debugging when keyword
|
||||||
|
// SMARTY_DEBUG is found in $QUERY_STRING
|
||||||
|
|
||||||
var $global_assign = array( 'HTTP_SERVER_VARS' => array( 'SCRIPT_NAME' )
|
var $global_assign = array( 'HTTP_SERVER_VARS' => array( 'SCRIPT_NAME' )
|
||||||
); // variables from the GLOBALS array
|
); // variables from the GLOBALS array
|
||||||
// that are implicitly assigned
|
// that are implicitly assigned
|
||||||
@@ -128,6 +132,8 @@ class Smarty
|
|||||||
'fetch' => 'smarty_func_fetch',
|
'fetch' => 'smarty_func_fetch',
|
||||||
'counter' => 'smarty_func_counter',
|
'counter' => 'smarty_func_counter',
|
||||||
'assign' => 'smarty_func_assign',
|
'assign' => 'smarty_func_assign',
|
||||||
|
'overlib_init' => 'smarty_func_overlib_init',
|
||||||
|
'overlib' => 'smarty_func_overlib',
|
||||||
'assign_debug_info' => 'smarty_func_assign_debug_info'
|
'assign_debug_info' => 'smarty_func_assign_debug_info'
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -578,7 +584,7 @@ class Smarty
|
|||||||
|
|
||||||
if ($display) {
|
if ($display) {
|
||||||
if (isset($results)) { echo $results; }
|
if (isset($results)) { echo $results; }
|
||||||
if ($this->debugging) { echo $this->_generate_debug_output(); }
|
if ($this->debugging || ($this->debugging_ctrl == 'URL' && (!empty($QUERY_STRING) && strstr('SMARTY_DEBUG',$QUERY_STRING)))) { echo $this->_generate_debug_output(); }
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
if (isset($results)) { return $results; }
|
if (isset($results)) { return $results; }
|
||||||
|
@@ -5,6 +5,7 @@ require("Smarty.class.php");
|
|||||||
$smarty = new Smarty;
|
$smarty = new Smarty;
|
||||||
|
|
||||||
$smarty->compile_check = true;
|
$smarty->compile_check = true;
|
||||||
|
$smarty->debugging = true;
|
||||||
|
|
||||||
$smarty->assign("now", time());
|
$smarty->assign("now", time());
|
||||||
|
|
||||||
|
@@ -9,11 +9,21 @@
|
|||||||
_smarty_console.document.write("<tr bgcolor=#cccccc><th colspan=2>Smarty Debug Console</th></tr>");
|
_smarty_console.document.write("<tr bgcolor=#cccccc><th colspan=2>Smarty Debug Console</th></tr>");
|
||||||
_smarty_console.document.write("<tr bgcolor=#cccccc><td colspan=2><b>included templates:</b></td></tr>");
|
_smarty_console.document.write("<tr bgcolor=#cccccc><td colspan=2><b>included templates:</b></td></tr>");
|
||||||
{section name=templates loop=$_debug_tpls}
|
{section name=templates loop=$_debug_tpls}
|
||||||
_smarty_console.document.write("<tr bgcolor={if %templates.index% is even}#eeeeee{else}#fafafa{/if}><td colspan=2><tt>{section name=indent loop=$_debug_tpls[templates].depth} {/section}<font color=blue>{$_debug_tpls[templates].template}</font></tt></td></tr>");
|
_smarty_console.document.write("<tr bgcolor={if %templates.index% is even}#eeeeee{else}#fafafa{/if}><td colspan=2><tt>{section name=indent loop=$_debug_tpls[templates].depth} {/section}<font color=brown>{$_debug_tpls[templates].template}</font></tt></td></tr>");
|
||||||
|
{sectionelse}
|
||||||
|
_smarty_console.document.write("<tr bgcolor=#eeeeee><td colspan=2><tt><i>no templates included</i></tt></td></tr>");
|
||||||
{/section}
|
{/section}
|
||||||
_smarty_console.document.write("<tr bgcolor=#cccccc><td colspan=2><b>assigned template variables:</b></td></tr>");
|
_smarty_console.document.write("<tr bgcolor=#cccccc><td colspan=2><b>assigned template variables:</b></td></tr>");
|
||||||
{section name=vars loop=$_debug_keys}
|
{section name=vars loop=$_debug_keys}
|
||||||
_smarty_console.document.write("<tr bgcolor={if %vars.index% is even}#eeeeee{else}#fafafa{/if}><td><tt><font color=blue>{$_debug_keys[vars]}</font></td><td>{if is_array($_debug_vals[vars])}<font color=green>Array</font> ({$_debug_vals[vars]|@count}){elseif empty($_debug_vals[vars])}<i>no value</i>{else}<font color=red>{$_debug_vals[vars]|truncate:50|regex_replace:"![\r\t\n]!":" "|escape|default:"<i>empty</i>"}</font>{/if}</tt></td></tr>");
|
_smarty_console.document.write("<tr bgcolor={if %vars.index% is even}#eeeeee{else}#fafafa{/if}><td><tt><font color=blue>{ldelim}${$_debug_keys[vars]}{rdelim}</font></td><td>{if is_array($_debug_vals[vars])}<font color=green>Array</font> ({$_debug_vals[vars]|@count}){elseif empty($_debug_vals[vars])}<i>no value</i>{else}<font color=red>{$_debug_vals[vars]|truncate:50|regex_replace:"![\r\t\n]!":" "|escape|default:"<i>empty</i>"}</font>{/if}</tt></td></tr>");
|
||||||
|
{sectionelse}
|
||||||
|
_smarty_console.document.write("<tr bgcolor=#eeeeee><td colspan=2><tt><i>no template variables assigned</i></tt></td></tr>");
|
||||||
|
{/section}
|
||||||
|
_smarty_console.document.write("<tr bgcolor=#cccccc><td colspan=2><b>assigned config file variables (outter template scope):</b></td></tr>");
|
||||||
|
{section name=config_vars loop=$_debug_config_keys}
|
||||||
|
_smarty_console.document.write("<tr bgcolor={if %config_vars.index% is even}#eeeeee{else}#fafafa{/if}><td><tt><font color=maroon>{ldelim}#{$_debug_config_keys[config_vars]}#{rdelim}</font></td><td>{if is_array($_debug_config_vals[config_vars])}<font color=green>Array</font> ({$_debug_config_vals[config_vars]|@count}){elseif empty($_debug_config_vals[config_vars])}<i>no value</i>{else}<font color=red>{$_debug_config_vals[config_vars]|truncate:50|regex_replace:"![\r\t\n]!":" "|escape|default:"<i>empty</i>"}</font>{/if}</tt></td></tr>");
|
||||||
|
{sectionelse}
|
||||||
|
_smarty_console.document.write("<tr bgcolor=#eeeeee><td colspan=2><tt><i>no config vars assigned</i></tt></td></tr>");
|
||||||
{/section}
|
{/section}
|
||||||
_smarty_console.document.write("</table>");
|
_smarty_console.document.write("</table>");
|
||||||
_smarty_console.document.write("</BODY></HTML>");
|
_smarty_console.document.write("</BODY></HTML>");
|
||||||
|
@@ -1,3 +1,7 @@
|
|||||||
<HTML>
|
<HTML>
|
||||||
|
<HEAD>
|
||||||
|
{tooltip_init}
|
||||||
|
{tooltip_element id="help" width="200" text="This is an example of a tooltip. Tooltips are handy for context sensitive information."}
|
||||||
|
</HEAD>
|
||||||
<BODY bgcolor="#ffffff">
|
<BODY bgcolor="#ffffff">
|
||||||
<TITLE>{$title} - {$Name}</TITLE>
|
<TITLE>{$title} - {$Name}</TITLE>
|
||||||
|
@@ -9,6 +9,8 @@
|
|||||||
Title: {#title#|capitalize}
|
Title: {#title#|capitalize}
|
||||||
{if #bold#}</b>{/if}
|
{if #bold#}</b>{/if}
|
||||||
|
|
||||||
|
Tooltip example: Move your mouse over the <A HREF="" {tooltip id="help"} onclick="return false;">Help</A> link to see a tooltip pop-up.
|
||||||
|
|
||||||
the value of $SCRIPT_NAME is {$SCRIPT_NAME}
|
the value of $SCRIPT_NAME is {$SCRIPT_NAME}
|
||||||
|
|
||||||
{* A simple variable test. print $Name in uppercase *}
|
{* A simple variable test. print $Name in uppercase *}
|
||||||
|
34
docs.sgml
34
docs.sgml
@@ -309,6 +309,19 @@ chmod 700 cache
|
|||||||
NOTE: This was added to Smarty 1.4.3.
|
NOTE: This was added to Smarty 1.4.3.
|
||||||
</para>
|
</para>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
<sect2 id="setting.debugging.ctrl">
|
||||||
|
<title>$debugging_ctrl</title>
|
||||||
|
<para>
|
||||||
|
This allows alternate ways to enable debugging. NONE means no
|
||||||
|
alternate methods are allowed. URL means when the keyword
|
||||||
|
SMARTY_DEBUG is found in the QUERY_STRING, debugging is enabled
|
||||||
|
for that invocation of the script. If $debugging is true, this
|
||||||
|
value is ignored.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
NOTE: This was added to Smarty 1.4.4.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
<sect2 id="setting.global.assign">
|
<sect2 id="setting.global.assign">
|
||||||
<title>$global_assign</title>
|
<title>$global_assign</title>
|
||||||
<para>
|
<para>
|
||||||
@@ -3560,7 +3573,7 @@ OUTPUT:
|
|||||||
NOTE: if you apply a modifier to an array instead of a single value
|
NOTE: if you apply a modifier to an array instead of a single value
|
||||||
variable, the modifier will be applied to every value in that array. If
|
variable, the modifier will be applied to every value in that array. If
|
||||||
you really want the entire array passed to the modifier, you must
|
you really want the entire array passed to the modifier, you must
|
||||||
prepend it with an "@" sign like so: {$articleTitle} (this will
|
prepend it with an "@" sign like so: {$articleTitle|@count} (this will
|
||||||
print out the number of elements in the $articleTitle array.)
|
print out the number of elements in the $articleTitle array.)
|
||||||
</para>
|
</para>
|
||||||
<sect2>
|
<sect2>
|
||||||
@@ -4330,14 +4343,17 @@ s m o k e r s a r e p. . .
|
|||||||
<title>Debugging Console</title>
|
<title>Debugging Console</title>
|
||||||
<para>
|
<para>
|
||||||
There is a dubugging console included with Smarty. The console informs you
|
There is a dubugging console included with Smarty. The console informs you
|
||||||
of all the included templates and assigned variables for the current
|
of all the included templates, assigned variables and config file variables
|
||||||
invocation of the template. A template named "debug.tpl" is included with
|
for the current invocation of the template. A template named "debug.tpl" is
|
||||||
the distribution of Smarty which controls the formatting of the console. Set
|
included with the distribution of Smarty which controls the formatting of
|
||||||
$debugging to true in Smarty, and if needed set $debug_tpl to the template
|
the console. Set $debugging to true in Smarty, and if needed set $debug_tpl
|
||||||
resource path for debug.tpl (this is in $template_dir by default.) When you
|
to the template resource path for debug.tpl (this is in $template_dir by
|
||||||
load the page, a javascript console window should pop up and give you the
|
default.) When you load the page, a javascript console window should pop up
|
||||||
names of all the included templates and assigned variables for the current
|
and give you the names of all the included templates and assigned variables
|
||||||
page. To disable the debugging console, set $debugging to false.
|
for the current page. To disable the debugging console, set $debugging to
|
||||||
|
false. You can also temporarily turn on the debugging console by putting
|
||||||
|
SMARTY_DEBUG in the URL if you enable this option with <link
|
||||||
|
linkend="api.debugging.ctrl">$debugging_ctrl</link>.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
TECHNICAL NOTE: The debugging console does not work when you use the fetch()
|
TECHNICAL NOTE: The debugging console does not work when you use the fetch()
|
||||||
|
@@ -5,6 +5,7 @@ require("Smarty.class.php");
|
|||||||
$smarty = new Smarty;
|
$smarty = new Smarty;
|
||||||
|
|
||||||
$smarty->compile_check = true;
|
$smarty->compile_check = true;
|
||||||
|
$smarty->debugging = true;
|
||||||
|
|
||||||
$smarty->assign("now", time());
|
$smarty->assign("now", time());
|
||||||
|
|
||||||
|
@@ -62,7 +62,11 @@ class Smarty
|
|||||||
|
|
||||||
var $debugging = false; // enable debugging console true/false
|
var $debugging = false; // enable debugging console true/false
|
||||||
var $debug_tpl = 'file:debug.tpl'; // path to debug console template
|
var $debug_tpl = 'file:debug.tpl'; // path to debug console template
|
||||||
|
var $debugging_ctrl = 'NONE'; // Possible values:
|
||||||
|
// NONE - no debug control allowed
|
||||||
|
// URL - enable debugging when keyword
|
||||||
|
// SMARTY_DEBUG is found in $QUERY_STRING
|
||||||
|
|
||||||
var $global_assign = array( 'HTTP_SERVER_VARS' => array( 'SCRIPT_NAME' )
|
var $global_assign = array( 'HTTP_SERVER_VARS' => array( 'SCRIPT_NAME' )
|
||||||
); // variables from the GLOBALS array
|
); // variables from the GLOBALS array
|
||||||
// that are implicitly assigned
|
// that are implicitly assigned
|
||||||
@@ -128,6 +132,8 @@ class Smarty
|
|||||||
'fetch' => 'smarty_func_fetch',
|
'fetch' => 'smarty_func_fetch',
|
||||||
'counter' => 'smarty_func_counter',
|
'counter' => 'smarty_func_counter',
|
||||||
'assign' => 'smarty_func_assign',
|
'assign' => 'smarty_func_assign',
|
||||||
|
'overlib_init' => 'smarty_func_overlib_init',
|
||||||
|
'overlib' => 'smarty_func_overlib',
|
||||||
'assign_debug_info' => 'smarty_func_assign_debug_info'
|
'assign_debug_info' => 'smarty_func_assign_debug_info'
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -578,7 +584,7 @@ class Smarty
|
|||||||
|
|
||||||
if ($display) {
|
if ($display) {
|
||||||
if (isset($results)) { echo $results; }
|
if (isset($results)) { echo $results; }
|
||||||
if ($this->debugging) { echo $this->_generate_debug_output(); }
|
if ($this->debugging || ($this->debugging_ctrl == 'URL' && (!empty($QUERY_STRING) && strstr('SMARTY_DEBUG',$QUERY_STRING)))) { echo $this->_generate_debug_output(); }
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
if (isset($results)) { return $results; }
|
if (isset($results)) { return $results; }
|
||||||
|
@@ -9,11 +9,21 @@
|
|||||||
_smarty_console.document.write("<tr bgcolor=#cccccc><th colspan=2>Smarty Debug Console</th></tr>");
|
_smarty_console.document.write("<tr bgcolor=#cccccc><th colspan=2>Smarty Debug Console</th></tr>");
|
||||||
_smarty_console.document.write("<tr bgcolor=#cccccc><td colspan=2><b>included templates:</b></td></tr>");
|
_smarty_console.document.write("<tr bgcolor=#cccccc><td colspan=2><b>included templates:</b></td></tr>");
|
||||||
{section name=templates loop=$_debug_tpls}
|
{section name=templates loop=$_debug_tpls}
|
||||||
_smarty_console.document.write("<tr bgcolor={if %templates.index% is even}#eeeeee{else}#fafafa{/if}><td colspan=2><tt>{section name=indent loop=$_debug_tpls[templates].depth} {/section}<font color=blue>{$_debug_tpls[templates].template}</font></tt></td></tr>");
|
_smarty_console.document.write("<tr bgcolor={if %templates.index% is even}#eeeeee{else}#fafafa{/if}><td colspan=2><tt>{section name=indent loop=$_debug_tpls[templates].depth} {/section}<font color=brown>{$_debug_tpls[templates].template}</font></tt></td></tr>");
|
||||||
|
{sectionelse}
|
||||||
|
_smarty_console.document.write("<tr bgcolor=#eeeeee><td colspan=2><tt><i>no templates included</i></tt></td></tr>");
|
||||||
{/section}
|
{/section}
|
||||||
_smarty_console.document.write("<tr bgcolor=#cccccc><td colspan=2><b>assigned template variables:</b></td></tr>");
|
_smarty_console.document.write("<tr bgcolor=#cccccc><td colspan=2><b>assigned template variables:</b></td></tr>");
|
||||||
{section name=vars loop=$_debug_keys}
|
{section name=vars loop=$_debug_keys}
|
||||||
_smarty_console.document.write("<tr bgcolor={if %vars.index% is even}#eeeeee{else}#fafafa{/if}><td><tt><font color=blue>{$_debug_keys[vars]}</font></td><td>{if is_array($_debug_vals[vars])}<font color=green>Array</font> ({$_debug_vals[vars]|@count}){elseif empty($_debug_vals[vars])}<i>no value</i>{else}<font color=red>{$_debug_vals[vars]|truncate:50|regex_replace:"![\r\t\n]!":" "|escape|default:"<i>empty</i>"}</font>{/if}</tt></td></tr>");
|
_smarty_console.document.write("<tr bgcolor={if %vars.index% is even}#eeeeee{else}#fafafa{/if}><td><tt><font color=blue>{ldelim}${$_debug_keys[vars]}{rdelim}</font></td><td>{if is_array($_debug_vals[vars])}<font color=green>Array</font> ({$_debug_vals[vars]|@count}){elseif empty($_debug_vals[vars])}<i>no value</i>{else}<font color=red>{$_debug_vals[vars]|truncate:50|regex_replace:"![\r\t\n]!":" "|escape|default:"<i>empty</i>"}</font>{/if}</tt></td></tr>");
|
||||||
|
{sectionelse}
|
||||||
|
_smarty_console.document.write("<tr bgcolor=#eeeeee><td colspan=2><tt><i>no template variables assigned</i></tt></td></tr>");
|
||||||
|
{/section}
|
||||||
|
_smarty_console.document.write("<tr bgcolor=#cccccc><td colspan=2><b>assigned config file variables (outter template scope):</b></td></tr>");
|
||||||
|
{section name=config_vars loop=$_debug_config_keys}
|
||||||
|
_smarty_console.document.write("<tr bgcolor={if %config_vars.index% is even}#eeeeee{else}#fafafa{/if}><td><tt><font color=maroon>{ldelim}#{$_debug_config_keys[config_vars]}#{rdelim}</font></td><td>{if is_array($_debug_config_vals[config_vars])}<font color=green>Array</font> ({$_debug_config_vals[config_vars]|@count}){elseif empty($_debug_config_vals[config_vars])}<i>no value</i>{else}<font color=red>{$_debug_config_vals[config_vars]|truncate:50|regex_replace:"![\r\t\n]!":" "|escape|default:"<i>empty</i>"}</font>{/if}</tt></td></tr>");
|
||||||
|
{sectionelse}
|
||||||
|
_smarty_console.document.write("<tr bgcolor=#eeeeee><td colspan=2><tt><i>no config vars assigned</i></tt></td></tr>");
|
||||||
{/section}
|
{/section}
|
||||||
_smarty_console.document.write("</table>");
|
_smarty_console.document.write("</table>");
|
||||||
_smarty_console.document.write("</BODY></HTML>");
|
_smarty_console.document.write("</BODY></HTML>");
|
||||||
|
@@ -1,3 +1,7 @@
|
|||||||
<HTML>
|
<HTML>
|
||||||
|
<HEAD>
|
||||||
|
{tooltip_init}
|
||||||
|
{tooltip_element id="help" width="200" text="This is an example of a tooltip. Tooltips are handy for context sensitive information."}
|
||||||
|
</HEAD>
|
||||||
<BODY bgcolor="#ffffff">
|
<BODY bgcolor="#ffffff">
|
||||||
<TITLE>{$title} - {$Name}</TITLE>
|
<TITLE>{$title} - {$Name}</TITLE>
|
||||||
|
@@ -9,6 +9,8 @@
|
|||||||
Title: {#title#|capitalize}
|
Title: {#title#|capitalize}
|
||||||
{if #bold#}</b>{/if}
|
{if #bold#}</b>{/if}
|
||||||
|
|
||||||
|
Tooltip example: Move your mouse over the <A HREF="" {tooltip id="help"} onclick="return false;">Help</A> link to see a tooltip pop-up.
|
||||||
|
|
||||||
the value of $SCRIPT_NAME is {$SCRIPT_NAME}
|
the value of $SCRIPT_NAME is {$SCRIPT_NAME}
|
||||||
|
|
||||||
{* A simple variable test. print $Name in uppercase *}
|
{* A simple variable test. print $Name in uppercase *}
|
||||||
|
Reference in New Issue
Block a user