Revision 1777
Added by Dietmar about 12 years ago
branches/2.8.x/CHANGELOG | ||
---|---|---|
13 | 13 |
|
14 | 14 |
|
15 | 15 |
|
16 |
01 Oct-2012 Build 1777 Dietmar Woellbrink (Luisehahne) |
|
17 |
+ add methode StripCodeFromText in class.wb to clean injection |
|
18 |
! rebranding the admin/settings and security fixes |
|
19 |
! a few new styling in backend wb_theme |
|
20 |
! beginning aa lot of account changes like correction of $_SESSION indexe, security fixes |
|
21 |
+ add head.load.min.js and head.min.js to /include/jquery/ to style HTML5 templates |
|
16 | 22 |
28 Sep-2012 Build 1776 Dietmar Woellbrink (Luisehahne) |
17 | 23 |
! wb theme styling |
18 | 24 |
28 Sep-2012 Build 1775 Dietmar Woellbrink (Luisehahne) |
branches/2.8.x/wb/include/jquery/head.min.js | ||
---|---|---|
1 |
/** |
|
2 |
Head JS The only script in your <HEAD> |
|
3 |
Copyright Tero Piirainen (tipiirai) |
|
4 |
License MIT / http://bit.ly/mit-license |
|
5 |
Version 0.96 |
|
6 |
|
|
7 |
http://headjs.com |
|
8 |
*/(function(a){function l(){var a=window.outerWidth||b.clientWidth;b.className=b.className.replace(/ (w|lt)-\d+/g,""),f("w-"+Math.round(a/100)*100),h(c.screens,function(b){a<=b&&f("lt-"+b)}),i.feature()}function h(a,b){for(var c=0,d=a.length;c<d;c++)b.call(a,a[c],c)}function g(a){var c=new RegExp("\\b"+a+"\\b");b.className=b.className.replace(c,"")}function f(a){d[d.length]=a}var b=a.documentElement,c={screens:[320,480,640,768,1024,1280,1440,1680,1920],section:"-section",page:"-page",head:"head"},d=[];if(window.head_conf)for(var e in head_conf)head_conf[e]!==undefined&&(c[e]=head_conf[e]);var i=window[c.head]=function(){i.ready.apply(null,arguments)};i.feature=function(a,c,e){if(!a)b.className+=" "+d.join(" "),d=[];else{Object.prototype.toString.call(c)=="[object Function]"&&(c=c.call()),f((c?"":"no-")+a),i[a]=!!c,e||(g("no-"+a),g(a),i.feature());return i}};var j=navigator.userAgent.toLowerCase();j=/(webkit)[ \/]([\w.]+)/.exec(j)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(j)||/(msie) ([\w.]+)/.exec(j)||!/compatible/.test(j)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(j)||[],j[1]=="msie"&&(j[1]="ie",j[2]=document.documentMode||j[2]),f(j[1]),i.browser={version:j[2]},i.browser[j[1]]=!0;if(i.browser.ie){f("ie"+parseFloat(j[2]));for(var k=3;k<11;k++)parseFloat(j[2])<k&&f("lt-ie"+k);h("abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video".split("|"),function(b){a.createElement(b)})}h(location.pathname.split("/"),function(a,d){if(this.length>2&&this[d+1]!==undefined)d&&f(this.slice(1,d+1).join("-")+c.section);else{var e=a||"index",g=e.indexOf(".");g>0&&(e=e.substring(0,g)),b.id=e+c.page,d||f("root"+c.section)}}),l(),window.onresize=l,i.feature("js",!0).feature()})(document),function(){function h(a){var b=a.charAt(0).toUpperCase()+a.substr(1),c=(a+" "+d.join(b+" ")+b).split(" ");return!!g(c)}function g(a){for(var c in a)if(b[a[c]]!==undefined)return!0}var a=document.createElement("i"),b=a.style,c=" -o- -moz- -ms- -webkit- -khtml- ".split(" "),d="Webkit Moz O ms Khtml".split(" "),e=window.head_conf&&head_conf.head||"head",f=window[e],i={gradient:function(){var a="background-image:",d="gradient(linear,left top,right bottom,from(#9f9),to(#fff));",e="linear-gradient(left top,#eee,#fff);";b.cssText=(a+c.join(d+a)+c.join(e+a)).slice(0,-a.length);return!!b.backgroundImage},rgba:function(){b.cssText="background-color:rgba(0,0,0,0.5)";return!!b.backgroundColor},opacity:function(){return a.style.opacity===""},textshadow:function(){return b.textShadow===""},multiplebgs:function(){b.cssText="background:url(//:),url(//:),red url(//:)";return(new RegExp("(url\\s*\\(.*?){3}")).test(b.background)},boxshadow:function(){return h("boxShadow")},borderimage:function(){return h("borderImage")},borderradius:function(){return h("borderRadius")},cssreflections:function(){return h("boxReflect")},csstransforms:function(){return h("transform")},csstransitions:function(){return h("transition")},fontface:function(){var a=navigator.userAgent,b;if(0)return!0;if(b=a.match(/Chrome\/(\d+\.\d+\.\d+\.\d+)/))return b[1]>="4.0.249.4"||1*b[1].split(".")[0]>5;if((b=a.match(/Safari\/(\d+\.\d+)/))&&!/iPhone/.test(a))return b[1]>="525.13";if(/Opera/.test({}.toString.call(window.opera)))return opera.version()>="10.00";if(b=a.match(/rv:(\d+\.\d+\.\d+)[^b].*Gecko\//))return b[1]>="1.9.1";return!1}};for(var j in i)i[j]&&f.feature(j,i[j].call(),!0);f.feature()}(),function(a){function z(){d||(d=!0,s(e,function(a){p(a)}))}function y(c,d){var e=a.createElement("script");e.type="text/"+(c.type||"javascript"),e.src=c.src||c,e.async=!1,e.onreadystatechange=e.onload=function(){var a=e.readyState;!d.done&&(!a||/loaded|complete/.test(a))&&(d.done=!0,d())},(a.body||b).appendChild(e)}function x(a,b){if(a.state==o)return b&&b();if(a.state==n)return k.ready(a.name,b);if(a.state==m)return a.onpreload.push(function(){x(a,b)});a.state=n,y(a.url,function(){a.state=o,b&&b(),s(g[a.name],function(a){p(a)}),u()&&d&&s(g.ALL,function(a){p(a)})})}function w(a,b){a.state===undefined&&(a.state=m,a.onpreload=[],y({src:a.url,type:"cache"},function(){v(a)}))}function v(a){a.state=l,s(a.onpreload,function(a){a.call()})}function u(a){a=a||h;var b;for(var c in a){if(a.hasOwnProperty(c)&&a[c].state!=o)return!1;b=!0}return b}function t(a){return Object.prototype.toString.call(a)=="[object Function]"}function s(a,b){if(!!a){typeof a=="object"&&(a=[].slice.call(a));for(var c=0;c<a.length;c++)b.call(a,a[c],c)}}function r(a){var b;if(typeof a=="object")for(var c in a)a[c]&&(b={name:c,url:a[c]});else b={name:q(a),url:a};var d=h[b.name];if(d&&d.url===b.url)return d;h[b.name]=b;return b}function q(a){var b=a.split("/"),c=b[b.length-1],d=c.indexOf("?");return d!=-1?c.substring(0,d):c}function p(a){a._done||(a(),a._done=1)}var b=a.documentElement,c,d,e=[],f=[],g={},h={},i=a.createElement("script").async===!0||"MozAppearance"in a.documentElement.style||window.opera,j=window.head_conf&&head_conf.head||"head",k=window[j]=window[j]||function(){k.ready.apply(null,arguments)},l=1,m=2,n=3,o=4;i?k.js=function(){var a=arguments,b=a[a.length-1],c={};t(b)||(b=null),s(a,function(d,e){d!=b&&(d=r(d),c[d.name]=d,x(d,b&&e==a.length-2?function(){u(c)&&p(b)}:null))});return k}:k.js=function(){var a=arguments,b=[].slice.call(a,1),d=b[0];if(!c){f.push(function(){k.js.apply(null,a)});return k}d?(s(b,function(a){t(a)||w(r(a))}),x(r(a[0]),t(d)?d:function(){k.js.apply(null,b)})):x(r(a[0]));return k},k.ready=function(b,c){if(b==a){d?p(c):e.push(c);return k}t(b)&&(c=b,b="ALL");if(typeof b!="string"||!t(c))return k;var f=h[b];if(f&&f.state==o||b=="ALL"&&u()&&d){p(c);return k}var i=g[b];i?i.push(c):i=g[b]=[c];return k},k.ready(a,function(){u()&&s(g.ALL,function(a){p(a)}),k.feature&&k.feature("domloaded",!0)});if(window.addEventListener)a.addEventListener("DOMContentLoaded",z,!1),window.addEventListener("load",z,!1);else if(window.attachEvent){a.attachEvent("onreadystatechange",function(){a.readyState==="complete"&&z()});var A=1;try{A=window.frameElement}catch(B){}!A&&b.doScroll&&function(){try{b.doScroll("left"),z()}catch(a){setTimeout(arguments.callee,1);return}}(),window.attachEvent("onload",z)}!a.readyState&&a.addEventListener&&(a.readyState="loading",a.addEventListener("DOMContentLoaded",handler=function(){a.removeEventListener("DOMContentLoaded",handler,!1),a.readyState="complete"},!1)),setTimeout(function(){c=!0,s(f,function(a){a()})},300)}(document) |
|
0 | 9 |
branches/2.8.x/wb/include/jquery/head.load.min.js | ||
---|---|---|
1 |
/** |
|
2 |
Head JS The only script in your <HEAD> |
|
3 |
Copyright Tero Piirainen (tipiirai) |
|
4 |
License MIT / http://bit.ly/mit-license |
|
5 |
Version 0.96 |
|
6 |
|
|
7 |
http://headjs.com |
|
8 |
*/(function(a){function z(){d||(d=!0,s(e,function(a){p(a)}))}function y(c,d){var e=a.createElement("script");e.type="text/"+(c.type||"javascript"),e.src=c.src||c,e.async=!1,e.onreadystatechange=e.onload=function(){var a=e.readyState;!d.done&&(!a||/loaded|complete/.test(a))&&(d.done=!0,d())},(a.body||b).appendChild(e)}function x(a,b){if(a.state==o)return b&&b();if(a.state==n)return k.ready(a.name,b);if(a.state==m)return a.onpreload.push(function(){x(a,b)});a.state=n,y(a.url,function(){a.state=o,b&&b(),s(g[a.name],function(a){p(a)}),u()&&d&&s(g.ALL,function(a){p(a)})})}function w(a,b){a.state===undefined&&(a.state=m,a.onpreload=[],y({src:a.url,type:"cache"},function(){v(a)}))}function v(a){a.state=l,s(a.onpreload,function(a){a.call()})}function u(a){a=a||h;var b;for(var c in a){if(a.hasOwnProperty(c)&&a[c].state!=o)return!1;b=!0}return b}function t(a){return Object.prototype.toString.call(a)=="[object Function]"}function s(a,b){if(!!a){typeof a=="object"&&(a=[].slice.call(a));for(var c=0;c<a.length;c++)b.call(a,a[c],c)}}function r(a){var b;if(typeof a=="object")for(var c in a)a[c]&&(b={name:c,url:a[c]});else b={name:q(a),url:a};var d=h[b.name];if(d&&d.url===b.url)return d;h[b.name]=b;return b}function q(a){var b=a.split("/"),c=b[b.length-1],d=c.indexOf("?");return d!=-1?c.substring(0,d):c}function p(a){a._done||(a(),a._done=1)}var b=a.documentElement,c,d,e=[],f=[],g={},h={},i=a.createElement("script").async===!0||"MozAppearance"in a.documentElement.style||window.opera,j=window.head_conf&&head_conf.head||"head",k=window[j]=window[j]||function(){k.ready.apply(null,arguments)},l=1,m=2,n=3,o=4;i?k.js=function(){var a=arguments,b=a[a.length-1],c={};t(b)||(b=null),s(a,function(d,e){d!=b&&(d=r(d),c[d.name]=d,x(d,b&&e==a.length-2?function(){u(c)&&p(b)}:null))});return k}:k.js=function(){var a=arguments,b=[].slice.call(a,1),d=b[0];if(!c){f.push(function(){k.js.apply(null,a)});return k}d?(s(b,function(a){t(a)||w(r(a))}),x(r(a[0]),t(d)?d:function(){k.js.apply(null,b)})):x(r(a[0]));return k},k.ready=function(b,c){if(b==a){d?p(c):e.push(c);return k}t(b)&&(c=b,b="ALL");if(typeof b!="string"||!t(c))return k;var f=h[b];if(f&&f.state==o||b=="ALL"&&u()&&d){p(c);return k}var i=g[b];i?i.push(c):i=g[b]=[c];return k},k.ready(a,function(){u()&&s(g.ALL,function(a){p(a)}),k.feature&&k.feature("domloaded",!0)});if(window.addEventListener)a.addEventListener("DOMContentLoaded",z,!1),window.addEventListener("load",z,!1);else if(window.attachEvent){a.attachEvent("onreadystatechange",function(){a.readyState==="complete"&&z()});var A=1;try{A=window.frameElement}catch(B){}!A&&b.doScroll&&function(){try{b.doScroll("left"),z()}catch(a){setTimeout(arguments.callee,1);return}}(),window.attachEvent("onload",z)}!a.readyState&&a.addEventListener&&(a.readyState="loading",a.addEventListener("DOMContentLoaded",handler=function(){a.removeEventListener("DOMContentLoaded",handler,!1),a.readyState="complete"},!1)),setTimeout(function(){c=!0,s(f,function(a){a()})},300)})(document) |
|
0 | 9 |
branches/2.8.x/wb/admin/start/index.php | ||
---|---|---|
128 | 128 |
'WELCOME_MESSAGE' => $MESSAGE['START_WELCOME_MESSAGE'], |
129 | 129 |
'CURRENT_USER' => $MESSAGE['START_CURRENT_USER'], |
130 | 130 |
'DISPLAY_NAME' => $admin->get_display_name(), |
131 |
'DISPLAY_WARNING' => '', |
|
131 | 132 |
'ADMIN_URL' => ADMIN_URL, |
132 | 133 |
'WB_URL' => WB_URL, |
133 | 134 |
'THEME_URL' => THEME_URL, |
branches/2.8.x/wb/admin/skel/themes/htt/message.htt | ||
---|---|---|
1 | 1 |
<!-- BEGIN main_block --> |
2 |
<div id="{ID}" class="mbox curved mbox-icon16{BOX_STATUS} warning rounded" style="background-image: url({THEME_URL}/icons/{STATUS}_16.png)">
|
|
2 |
<div id="{ID}" class="mbox mbox-icon16{BOX_STATUS} warning rounded " style="background-image: url({THEME_URL}/icons/{STATUS}_16.png)">
|
|
3 | 3 |
<div><!-- class="big"> --> |
4 | 4 |
{MESSAGE} |
5 | 5 |
</div> |
branches/2.8.x/wb/admin/skel/themes/htt/settings.htt | ||
---|---|---|
5 | 5 |
<input type="hidden" name="wbmailer_smtp_auth" value="true" /> |
6 | 6 |
{FTAN} |
7 | 7 |
|
8 |
<fieldset> |
|
8 |
<fieldset class="tab-generell"> |
|
9 |
<legend>{HEADING_GENERAL_SETTINGS}</legend> |
|
9 | 10 |
<div class="mbox sub-row"> |
10 | 11 |
<label class="setting_name"> </label> |
11 |
<div style="margin-top: 5px;">
|
|
12 |
<div style="margin-top: 2px;">
|
|
12 | 13 |
<button title="{MODE_SWITCH_WARNING}" onclick="window.location = '{ADVANCED_LINK}'; return false;" class="cright {DISPLAY_ADVANCED_BUTTON}">{ADVANCED_BUTTON}</button> |
13 | 14 |
</div> |
14 |
</div> |
|
15 |
<br /> |
|
16 |
</fieldset> |
|
17 |
|
|
18 |
<fieldset class="tab-generell"> |
|
19 |
<legend>{HEADING_GENERAL_SETTINGS}</legend> |
|
15 |
</div><br /> |
|
20 | 16 |
<div class="mbox sub-row"> |
21 | 17 |
<label class="setting_name">{TEXT_WEBSITE_TITLE}:</label> |
22 | 18 |
<input type="text" class="vert" name="website_title" value="{WEBSITE_TITLE}" /> |
... | ... | |
46 | 42 |
<textarea class="vert" name="website_signature" cols="50" rows="4">{WEBSITE_SIGNATURE}</textarea> |
47 | 43 |
</div> |
48 | 44 |
</fieldset> |
45 |
|
|
49 | 46 |
<fieldset> |
50 | 47 |
<!-- BEGIN show_page_level_limit_block --> |
51 | 48 |
<div class="mbox sub-row"> |
... | ... | |
56 | 53 |
<!-- END page_level_limit_list_block --> |
57 | 54 |
</select> |
58 | 55 |
</div> |
56 |
<!-- END show_page_level_limit_block --> |
|
59 | 57 |
|
60 |
<!-- END show_page_level_limit_block --> |
|
61 | 58 |
<div class="mbox sub-row"> |
62 | 59 |
<label class="setting_name">{TEXT_PAGE_TRASH}:</label> |
63 | 60 |
<span> |
... | ... | |
81 | 78 |
<label for="page_languages_false">{TEXT_DISABLED}</label> |
82 | 79 |
</span> |
83 | 80 |
</div> |
81 |
|
|
84 | 82 |
<div class="mbox sub-row"> |
85 | 83 |
<label class="setting_name">{TEXT_PAGE_EXTENDED}:</label> |
86 | 84 |
<span> |
... | ... | |
117 | 115 |
<label for="home_folders_false">{TEXT_DISABLED}</label> |
118 | 116 |
</span> |
119 | 117 |
</div> |
118 |
|
|
120 | 119 |
<!-- BEGIN show_checkbox_2_block --> |
121 |
|
|
122 | 120 |
<div class="mbox sub-row"> |
123 | 121 |
<label class="setting_name">{TEXT_MANAGE_SECTIONS}:</label> |
124 | 122 |
<span> |
... | ... | |
142 | 140 |
<label for="section_blocks_false">{TEXT_DISABLED}</label> |
143 | 141 |
</span> |
144 | 142 |
</div> |
143 |
<!-- END show_checkbox_2_block --> |
|
145 | 144 |
|
146 |
<!-- END show_checkbox_2_block --> |
|
147 | 145 |
<div class="mbox sub-row"> |
148 | 146 |
<label class="setting_name">{TEXT_INTRO_PAGE}:</label> |
149 | 147 |
<span> |
... | ... | |
155 | 153 |
<label for="intro_page_false">{TEXT_DISABLED}</label> |
156 | 154 |
</span> |
157 | 155 |
</div> |
156 |
|
|
158 | 157 |
<!-- BEGIN show_checkbox_3_block --> |
159 |
|
|
160 | 158 |
<div class="mbox sub-row"> |
161 | 159 |
<label class="setting_name">{TEXT_HOMEPAGE_REDIRECTION}:</label> |
162 | 160 |
<span> |
... | ... | |
180 | 178 |
<label for="smart_login_false">{TEXT_DISABLED}</label> |
181 | 179 |
</span> |
182 | 180 |
</div> |
181 |
<!-- END show_checkbox_3_block --> |
|
183 | 182 |
|
184 |
<!-- END show_checkbox_3_block --> |
|
185 | 183 |
<div class="mbox sub-row"> |
186 | 184 |
<label class="setting_name">{TEXT_LOGIN}:</label> |
187 | 185 |
<span> |
... | ... | |
231 | 229 |
<label class="setting_name">{TEXT_PHP_ERROR_LEVEL}:</label> |
232 | 230 |
<select name="er_level"> |
233 | 231 |
<option value="">{TEXT_PLEASE_SELECT}...</option> |
234 |
<!-- BEGIN error_reporting_list_block -->
|
|
232 |
<!-- BEGIN php_error_list_block -->
|
|
235 | 233 |
<option value="{VALUE}"{SELECTED}>{NAME}</option> |
236 |
<!-- END error_reporting_list_block -->
|
|
234 |
<!-- END php_error_list_block -->
|
|
237 | 235 |
</select> |
238 | 236 |
</div> |
239 | 237 |
<!-- END show_php_error_level_block --> |
... | ... | |
255 | 253 |
</div> |
256 | 254 |
</div> |
257 | 255 |
<!-- END show_wysiwyg_block --> |
256 |
|
|
258 | 257 |
<div class="mbox sub-row"> |
259 | 258 |
<label class="setting_name"> </label> |
260 | 259 |
<div style="margin-top: 5px;"> |
... | ... | |
291 | 290 |
</select> |
292 | 291 |
</div> |
293 | 292 |
</div> |
293 |
<!-- END show_charset_block --> |
|
294 | 294 |
|
295 |
<!-- END show_charset_block --> |
|
296 | 295 |
<div class="mbox sub-row"> |
297 | 296 |
<label class="setting_name">{TEXT_TIMEZONE}:</label> |
298 | 297 |
<div class="input" > |
... | ... | |
385 | 384 |
</select> |
386 | 385 |
</div> |
387 | 386 |
</div> |
387 |
|
|
388 | 388 |
<!-- BEGIN show_search_block --> |
389 |
|
|
390 | 389 |
<div class="mbox sub-row"> |
391 | 390 |
<label class="setting_name">{TEXT_HEADER}:</label> |
392 | 391 |
<div class="input" > |
... | ... | |
449 | 448 |
</div> |
450 | 449 |
</div> |
451 | 450 |
<!-- END show_search_block --> |
451 |
|
|
452 | 452 |
<div class="mbox sub-row"> |
453 | 453 |
<label class="setting_name"> </label> |
454 | 454 |
<div style="margin-top: 5px;"> |
... | ... | |
475 | 475 |
</span> |
476 | 476 |
</div> |
477 | 477 |
|
478 |
<div class="mbox sub-row"> |
|
479 |
<label class="setting_name none" id="{BASIC_FILE_PERMS_ID}1"> </label> |
|
480 |
<div class="input none" > |
|
481 |
<div id="{BASIC_FILE_PERMS_ID}2" style="margin: 0; padding: 0;"> |
|
482 |
<input type="checkbox" name="world_writeable" id="world_writeable" value="true"{WORLD_WRITEABLE_SELECTED} /> |
|
483 |
<label for="world_writeable"> |
|
484 |
{TEXT_WORLD_WRITEABLE_FILE_PERMISSIONS} (777) |
|
485 |
</label> |
|
486 |
<span class="warning">({WORLD_WRITEABLE_WARNING})</span> |
|
487 |
</div> |
|
488 |
<div id="{BASIC_FILE_PERMS_ID}3" style="margin: 0; padding: 0;"></div> |
|
489 |
</div> |
|
490 |
</div> |
|
491 | 478 |
<br class="clear none" /> |
492 | 479 |
<div class="mbox sub-row"> |
493 | 480 |
<label class="setting_name" id="{ADVANCED_FILE_PERMS_ID}1">{TEXT_FILESYSTEM_PERMISSIONS}:</label> |
branches/2.8.x/wb/admin/skel/themes/htt/users_form.htt | ||
---|---|---|
17 | 17 |
<table> |
18 | 18 |
<!-- BEGIN show_modify_loginname_block --> |
19 | 19 |
<tr> |
20 |
<td>{TEXT_USERNAME}:</td> |
|
20 |
<td class="right">{TEXT_USERNAME}:</td>
|
|
21 | 21 |
<td class="value_input"> |
22 | 22 |
<input type="hidden" name="{USERNAME_FIELDNAME}" value="{USERNAME}" /> |
23 | 23 |
<input class="button" type="button" value="{USERNAME}" disabled="disabled" readonly="readonly" /> |
... | ... | |
26 | 26 |
<!-- END show_modify_loginname_block --> |
27 | 27 |
<!-- BEGIN show_add_loginname_block --> |
28 | 28 |
<tr> |
29 |
<td>{TEXT_USERNAME}:</td> |
|
29 |
<td class="right">{TEXT_USERNAME}:</td>
|
|
30 | 30 |
<td class="value_input"> |
31 | 31 |
<input type="text" name="{USERNAME_FIELDNAME}" maxlength="30" value="{USERNAME}" /> |
32 | 32 |
</td> |
33 | 33 |
</tr> |
34 | 34 |
<!-- END show_add_loginname_block --> |
35 | 35 |
<tr> |
36 |
<td>{TEXT_PASSWORD}:</td> |
|
36 |
<td class="right">{TEXT_PASSWORD}:</td>
|
|
37 | 37 |
<td class="value_input"> |
38 | 38 |
<input type="password" name="password" maxlength="30" /> |
39 | 39 |
</td> |
40 | 40 |
</tr> |
41 | 41 |
<tr> |
42 |
<td>{TEXT_RETYPE_PASSWORD}:</td> |
|
42 |
<td class="right">{TEXT_RETYPE_PASSWORD}:</td>
|
|
43 | 43 |
<td class="value_input"> |
44 | 44 |
<input type="password" name="password2" maxlength="30" /> |
45 | 45 |
</td> |
46 | 46 |
</tr> |
47 | 47 |
<tr style="{DISPLAY_EXTRA}"> |
48 |
<td> </td> |
|
48 |
<td class="right"> </td>
|
|
49 | 49 |
<td style="font-size: 10px;"> |
50 | 50 |
{CHANGING_PASSWORD} |
51 | 51 |
</td> |
52 | 52 |
</tr> |
53 | 53 |
<tr> |
54 |
<td>{TEXT_DISPLAY_NAME}:</td> |
|
54 |
<td class="right">{TEXT_DISPLAY_NAME}:</td>
|
|
55 | 55 |
<td class="value_input"> |
56 | 56 |
<input type="text" name="display_name" maxlength="255" value="{DISPLAY_NAME}" /> |
57 | 57 |
</td> |
58 | 58 |
</tr> |
59 | 59 |
<tr> |
60 |
<td>{TEXT_EMAIL}:</td> |
|
60 |
<td class="right">{TEXT_EMAIL}:</td>
|
|
61 | 61 |
<td class="value_input"> |
62 | 62 |
<input type="text" name="email" maxlength="255" value="{EMAIL}" /> |
63 | 63 |
</td> |
64 | 64 |
</tr> |
65 | 65 |
<tr style="{DISPLAY_HOME_FOLDERS}"> |
66 |
<td>{TEXT_HOME_FOLDER}:</td> |
|
66 |
<td class="right">{TEXT_HOME_FOLDER}:</td>
|
|
67 | 67 |
<td class="value_input"> |
68 | 68 |
<select name="home_folder"> |
69 | 69 |
<option value="">{TEXT_NONE}</option> |
... | ... | |
74 | 74 |
</td> |
75 | 75 |
</tr> |
76 | 76 |
<tr> |
77 |
<td>{TEXT_GROUP}:</td> |
|
77 |
<td class="rightTop">{TEXT_GROUP}:</td>
|
|
78 | 78 |
<td class="value_input"> |
79 | 79 |
<select name="groups[]" multiple="multiple" size="5"> |
80 | 80 |
<!-- BEGIN group_list_block --> |
... | ... | |
84 | 84 |
</td> |
85 | 85 |
</tr> |
86 | 86 |
<tr> |
87 |
<td> </td> |
|
87 |
<td class="right"> </td>
|
|
88 | 88 |
<td> |
89 | 89 |
<input type="radio" name="active[]" id="active" value="1" {ACTIVE_CHECKED} /> |
90 | 90 |
<label for="active">{TEXT_ACTIVE}</label> |
branches/2.8.x/wb/admin/skel/themes/htt/start.htt | ||
---|---|---|
2 | 2 |
<div class="content_box"> |
3 | 3 |
<h4 class="center">{WELCOME_MESSAGE}. {CURRENT_USER} {DISPLAY_NAME}</h4> |
4 | 4 |
<!-- BEGIN show_install_block --> |
5 |
<h4 style="{DISPLAY_WARNING}" class="warning center">{WARNING}</h4> |
|
5 |
<h4 style="{DISPLAY_WARNING}" class="warning center rounded">{WARNING}</h4>
|
|
6 | 6 |
<!-- END show_install_block --> |
7 | 7 |
</div> |
8 | 8 |
<div class="content_box"> |
branches/2.8.x/wb/admin/skel/themes/htt/preferences.htt | ||
---|---|---|
1 | 1 |
<!-- BEGIN main_block --> |
2 | 2 |
<form name="{FORM_NAME}" class="settings_table" action="{ACTION_URL}" method="post"> |
3 | 3 |
{FTAN} |
4 |
<fieldset style="margin-bottom: 0; padding-bottom: 0;">
|
|
4 |
<fieldset> |
|
5 | 5 |
<legend>{HEADING_MY_SETTINGS}</legend> |
6 |
<div class="sub-row"> |
|
7 |
<label class="setting_name rBold">{TEXT_USERNAME}:</label> |
|
8 |
<input class="button" type="button" value="{USERNAME}" disabled="disabled" readonly="readonly" /> |
|
9 |
</div> |
|
6 |
<div> |
|
7 |
<div class="sub-row"> |
|
8 |
<label class="setting_name rBold">{TEXT_USERNAME}:</label> |
|
9 |
<input class="button" type="button" value="{USERNAME}" disabled="disabled" readonly="readonly" /> |
|
10 |
</div> |
|
10 | 11 |
|
11 |
<div class="sub-row">
|
|
12 |
<label class="setting_name rBold">{TEXT_DISPLAY_NAME}:</label>
|
|
13 |
<input type="text" id="display_name" name="display_name" value="{DISPLAY_NAME}" />
|
|
14 |
</div>
|
|
12 |
<div class="sub-row"> |
|
13 |
<label class="setting_name rBold">{TEXT_DISPLAY_NAME}:</label> |
|
14 |
<input type="text" id="display_name" name="display_name" value="{DISPLAY_NAME}" /> |
|
15 |
</div> |
|
15 | 16 |
|
16 |
<div class="sub-row"> |
|
17 |
<label class="setting_name rBold">{TEXT_LANGUAGE}:</label> |
|
18 |
<select name="language" id="language"> |
|
19 |
<!-- BEGIN language_list_block --> |
|
20 |
<option value="{CODE}"{SELECTED} style="background: url({FLAG}.png) no-repeat center left; padding-left: 20px;">{NAME} ({CODE})</option> |
|
21 |
<!-- END language_list_block --> |
|
22 |
</select> |
|
23 |
</div> |
|
24 |
<div class="sub-row"> |
|
25 |
<label class="setting_name rBold">{TEXT_TIMEZONE}:</label> |
|
26 |
<select name="timezone" id="timezone"> |
|
27 |
<!-- BEGIN timezone_list_block --> |
|
28 |
<option value="{VALUE}"{SELECTED}>{NAME}</option> |
|
29 |
<!-- END timezone_list_block --> |
|
30 |
</select> |
|
31 |
</div> |
|
32 |
<div class="sub-row"> |
|
33 |
<label class="setting_name rBold">{TEXT_DATE_FORMAT}:</label> |
|
34 |
<select name="date_format" id="date_format"> |
|
35 |
<!-- BEGIN date_format_list_block --> |
|
36 |
<option value="{VALUE}"{SELECTED}>{NAME}</option> |
|
37 |
<!-- END date_format_list_block --> |
|
38 |
</select> |
|
39 |
</div> |
|
40 |
<div class="sub-row"> |
|
41 |
<label class="setting_name rBold">{TEXT_TIME_FORMAT}:</label> |
|
42 |
<select name="time_format" id="time_format"> |
|
43 |
<!-- BEGIN time_format_list_block --> |
|
44 |
<option value="{VALUE}"{SELECTED}>{NAME}</option> |
|
45 |
<!-- END time_format_list_block --> |
|
46 |
</select> |
|
47 |
</div> |
|
48 |
<div class="sub-row"> |
|
49 |
<label class="setting_name rBold">{TEXT_EMAIL}:</label> |
|
50 |
<input type="text" id="email" name="email" value="{EMAIL}" /> |
|
51 |
</div> |
|
52 |
<div class="sub-row"> |
|
53 |
<label class="setting_name rBold">{TEXT_NEW_PASSWORD}:</label> |
|
54 |
<input type="password" id="new_password_1" name="new_password_1" value="{EMPTY_STRING}" /> |
|
55 |
</div> |
|
56 |
<div class="sub-row"> |
|
57 |
<label class="setting_name rBold">{TEXT_RETYPE_NEW_PASSWORD}:</label> |
|
58 |
<input type="password" id="new_password_2" name="new_password_2" value="{EMPTY_STRING}" /> |
|
59 |
</div> |
|
60 |
<hr /> |
|
61 |
<div class="sub-row"> |
|
62 |
<label class="setting_name rBold">{TEXT_NEED_CURRENT_PASSWORD}:</label> |
|
63 |
<input type="password" id="current_password" name="current_password" value="{EMPTY_STRING}" /> |
|
64 |
</div> |
|
65 |
<div class="sub-row"> |
|
66 |
<input type="submit" id="submit" name="submit" value="{TEXT_SAVE}" /> |
|
67 |
<input type="reset" id="reset" name="reset" value="{TEXT_RESET}" /> |
|
68 |
</div> |
|
17 |
<div class="sub-row"> |
|
18 |
<label class="setting_name rBold">{TEXT_LANGUAGE}:</label> |
|
19 |
<select name="language" id="language"> |
|
20 |
<!-- BEGIN language_list_block --> |
|
21 |
<option value="{CODE}"{SELECTED} style="background: url({FLAG}.png) no-repeat center left; padding-left: 20px;">{NAME} ({CODE})</option> |
|
22 |
<!-- END language_list_block --> |
|
23 |
</select> |
|
24 |
</div> |
|
25 |
<div class="sub-row"> |
|
26 |
<label class="setting_name rBold">{TEXT_TIMEZONE}:</label> |
|
27 |
<select name="timezone" id="timezone"> |
|
28 |
<!-- BEGIN timezone_list_block --> |
|
29 |
<option value="{VALUE}"{SELECTED}>{NAME}</option> |
|
30 |
<!-- END timezone_list_block --> |
|
31 |
</select> |
|
32 |
</div> |
|
33 |
<div class="sub-row"> |
|
34 |
<label class="setting_name rBold">{TEXT_DATE_FORMAT}:</label> |
|
35 |
<select name="date_format" id="date_format"> |
|
36 |
<!-- BEGIN date_format_list_block --> |
|
37 |
<option value="{VALUE}"{SELECTED}>{NAME}</option> |
|
38 |
<!-- END date_format_list_block --> |
|
39 |
</select> |
|
40 |
</div> |
|
41 |
<div class="sub-row"> |
|
42 |
<label class="setting_name rBold">{TEXT_TIME_FORMAT}:</label> |
|
43 |
<select name="time_format" id="time_format"> |
|
44 |
<!-- BEGIN time_format_list_block --> |
|
45 |
<option value="{VALUE}"{SELECTED}>{NAME}</option> |
|
46 |
<!-- END time_format_list_block --> |
|
47 |
</select> |
|
48 |
</div> |
|
49 |
<div class="sub-row"> |
|
50 |
<label class="setting_name rBold">{TEXT_EMAIL}:</label> |
|
51 |
<input type="text" id="email" name="email" value="{EMAIL}" /> |
|
52 |
</div> |
|
53 |
<div class="sub-row"> |
|
54 |
<label class="setting_name rBold">{TEXT_NEW_PASSWORD}:</label> |
|
55 |
<input type="password" id="new_password_1" name="new_password_1" value="{EMPTY_STRING}" /> |
|
56 |
</div> |
|
57 |
<div class="sub-row"> |
|
58 |
<label class="setting_name rBold">{TEXT_RETYPE_NEW_PASSWORD}:</label> |
|
59 |
<input type="password" id="new_password_2" name="new_password_2" value="{EMPTY_STRING}" /> |
|
60 |
</div> |
|
61 |
<hr /> |
|
62 |
<div class="sub-row"> |
|
63 |
<label class="setting_name rBold">{TEXT_NEED_CURRENT_PASSWORD}:</label> |
|
64 |
<input type="password" id="current_password" name="current_password" value="{EMPTY_STRING}" /> |
|
65 |
</div> |
|
66 |
|
|
67 |
<div class="sub-row"> |
|
68 |
<input type="submit" id="submit" name="submit" value="{TEXT_SAVE}" /> |
|
69 |
<input type="reset" id="reset" name="reset" value="{TEXT_RESET}" /> |
|
70 |
</div> |
|
71 |
</div> |
|
69 | 72 |
</fieldset> |
70 | 73 |
</form> |
71 | 74 |
<!-- END main_block --> |
branches/2.8.x/wb/admin/interface/version.php | ||
---|---|---|
51 | 51 |
|
52 | 52 |
// check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled) |
53 | 53 |
if(!defined('VERSION')) define('VERSION', '2.8.3'); |
54 |
if(!defined('REVISION')) define('REVISION', '1776');
|
|
54 |
if(!defined('REVISION')) define('REVISION', '1777');
|
|
55 | 55 |
if(!defined('SP')) define('SP', ''); |
branches/2.8.x/wb/admin/settings/save.php | ||
---|---|---|
58 | 58 |
} |
59 | 59 |
} |
60 | 60 |
|
61 |
if(isset($_POST['wbmailer_routine']) && ($_POST['wbmailer_routine']=='smtp')) {
|
|
61 |
if($admin->StripCodeFromText($admin->get_post('wbmailer_routine'))=='smtp') {
|
|
62 | 62 |
|
63 |
$checkSmtpHost = (isset($_POST['wbmailer_smtp_host']) && ($_POST['wbmailer_smtp_host']=='') ? false : true); |
|
64 |
$checkSmtpUser = (isset($_POST['wbmailer_smtp_username']) && ($_POST['wbmailer_smtp_username']=='') ? false : true); |
|
65 |
$checkSmtpPassword = (isset($_POST['wbmailer_smtp_password']) && ($_POST['wbmailer_smtp_password']=='') ? false : true); |
|
63 |
$checkSmtpHost = (($admin->StripCodeFromText($admin->get_post('wbmailer_smtp_host'))=='') ? false : true); |
|
64 |
// $checkSmtpHost = (isset($_POST['wbmailer_smtp_host']) && ($_POST['wbmailer_smtp_host']=='') ? false : true); |
|
65 |
$checkSmtpUser = (($admin->StripCodeFromText($admin->get_post('wbmailer_smtp_username'))=='') ? false : true); |
|
66 |
// $checkSmtpUser = (isset($_POST['wbmailer_smtp_username']) && ($_POST['wbmailer_smtp_username']=='') ? false : true); |
|
67 |
$checkSmtpPassword = (($admin->StripCodeFromText($admin->get_post('wbmailer_smtp_password'))=='') ? false : true); |
|
68 |
// $checkSmtpPassword = (isset($_POST['wbmailer_smtp_password']) && ($_POST['wbmailer_smtp_password']=='') ? false : true); |
|
69 |
|
|
66 | 70 |
if(!$checkSmtpHost || !$checkSmtpUser || !$checkSmtpPassword) { |
67 | 71 |
$admin->print_error($TEXT['REQUIRED'].' '.$TEXT['WBMAILER_SMTP_AUTH']. |
68 | 72 |
'<br /><strong>'.$MESSAGE['GENERIC_FILL_IN_ALL'].'</strong>', $js_back); |
... | ... | |
73 | 77 |
// Work-out file mode |
74 | 78 |
if($advanced == '') |
75 | 79 |
{ |
80 |
$file_mode = STRING_FILE_MODE; |
|
81 |
$dir_mode = STRING_DIR_MODE; |
|
76 | 82 |
// Check if should be set to 777 or left alone |
77 |
if(isset($_POST['world_writeable']) && $_POST['world_writeable'] == 'true') |
|
78 |
{ |
|
79 |
$file_mode = '0777'; |
|
80 |
$dir_mode = '0777'; |
|
81 |
} else { |
|
82 |
$file_mode = STRING_FILE_MODE; |
|
83 |
$dir_mode = STRING_DIR_MODE; |
|
84 |
} |
|
83 |
// if(isset($_POST['world_writeable']) && $_POST['world_writeable'] == 'true')
|
|
84 |
// {
|
|
85 |
// $file_mode = '0777';
|
|
86 |
// $dir_mode = '0777';
|
|
87 |
// } else {
|
|
88 |
// $file_mode = STRING_FILE_MODE;
|
|
89 |
// $dir_mode = STRING_DIR_MODE;
|
|
90 |
// }
|
|
85 | 91 |
} else { |
86 | 92 |
$file_mode = STRING_FILE_MODE; |
87 | 93 |
$dir_mode = STRING_DIR_MODE; |
... | ... | |
154 | 160 |
} |
155 | 161 |
} |
156 | 162 |
|
157 |
$allow_tags_in_fields = array('website_header', 'website_footer','website_signature'); |
|
158 |
$allow_empty_values = array('website_header','website_footer','pages_directory','page_spacer','website_signature,page_icon_dir','modules_upgrade_list'); |
|
159 |
$disallow_in_fields = array('pages_directory', 'media_directory','wb_version'); |
|
163 |
$allow_tags_in_fields = array( |
|
164 |
'website_header', |
|
165 |
'website_footer', |
|
166 |
'website_signature' |
|
167 |
); |
|
168 |
$allow_empty_values = array( |
|
169 |
'website_header', |
|
170 |
'website_footer', |
|
171 |
'website_signature', |
|
172 |
'wysiwyg_style', |
|
173 |
'pages_directory', |
|
174 |
'page_icon_dir', |
|
175 |
'rename_files_on_upload', |
|
176 |
'page_spacer', |
|
177 |
'website_signature', |
|
178 |
'page_icon_dir', |
|
179 |
'modules_upgrade_list' |
|
180 |
); |
|
181 |
$disallow_in_fields = array( |
|
182 |
'pages_directory', |
|
183 |
'media_directory', |
|
184 |
'wb_version' |
|
185 |
); |
|
186 |
$StripCodeFromInput = array( |
|
187 |
'website_title', |
|
188 |
'website_description', |
|
189 |
'website_keywords', |
|
190 |
'wysiwyg_style', |
|
191 |
'search_module_order', |
|
192 |
'search_max_excerpt', |
|
193 |
'search_time_limit', |
|
194 |
'pages_directory', |
|
195 |
'page_icon_dir', |
|
196 |
'media_directory', |
|
197 |
'page_extension', |
|
198 |
'rename_files_on_upload', |
|
199 |
'page_spacer', |
|
200 |
'page_icon_dir', |
|
201 |
'modules_upgrade_list' |
|
202 |
); |
|
160 | 203 |
|
161 | 204 |
$bRebuildAccessFiles = ( (isset( $_POST['rebuild_access_files']) && ( $_POST['rebuild_access_files'] == true )) ? true : false ) ; |
162 | 205 |
|
... | ... | |
189 | 232 |
$passed = true; |
190 | 233 |
break; |
191 | 234 |
case 'sec_anchor': |
235 |
$value = $admin->StripCodeFromText($value); |
|
192 | 236 |
$value=(($value=='') ? 'section_' : $value); |
193 | 237 |
$passed = true; |
194 | 238 |
break; |
195 | 239 |
case 'pages_directory': |
240 |
$value = $admin->StripCodeFromText($value); |
|
196 | 241 |
$bNewPageFile = ( ( $value!= $old_settings['pages_directory'] ) ? true : false ); |
197 | 242 |
$passed = $bNewPageFile; |
198 | 243 |
$sGetId = '&id='.$bNewPageFile; |
... | ... | |
208 | 253 |
$passed = true; |
209 | 254 |
break; |
210 | 255 |
default : |
211 |
$passed = in_array($setting_name, $allow_empty_values); |
|
256 |
$passed = in_array($setting_name, $allow_empty_values); |
|
257 |
if(in_array($setting_name, $StripCodeFromInput) ) { |
|
258 |
$value = $admin->StripCodeFromText($value); |
|
259 |
} |
|
212 | 260 |
break; |
213 | 261 |
} |
214 | 262 |
|
215 |
|
|
216 | 263 |
if (!in_array($setting_name, $allow_tags_in_fields)) |
217 | 264 |
{ |
218 | 265 |
$value = strip_tags($value); |
... | ... | |
222 | 269 |
{ |
223 | 270 |
$value = trim($admin->add_slashes($value)); |
224 | 271 |
$sql = 'UPDATE `'.TABLE_PREFIX.'settings` '; |
225 |
$sql .= 'SET `value` = \''.$value.'\' ';
|
|
272 |
$sql .= 'SET `value` = \''.($value).'\' '; // mysql_escape_string
|
|
226 | 273 |
$sql .= 'WHERE `name` != \'wb_version\' '; |
227 | 274 |
$sql .= 'AND `name` = \''.$setting_name.'\' '; |
228 | 275 |
if (!$database->query($sql)) |
... | ... | |
241 | 288 |
} |
242 | 289 |
|
243 | 290 |
} |
291 |
$StripCodeFromISearch = array( |
|
292 |
'search_module_order', |
|
293 |
'search_max_excerpt', |
|
294 |
'search_time_limit', |
|
295 |
); |
|
244 | 296 |
|
245 | 297 |
// Query current search settings in the db, then loop through them and update the db with the new value |
246 | 298 |
$sql = 'SELECT `name`, `value` FROM `'.TABLE_PREFIX.'search` '; |
... | ... | |
255 | 307 |
{ |
256 | 308 |
$old_value = $search_setting['value']; |
257 | 309 |
$setting_name = $search_setting['name']; |
258 |
$post_name = 'search_'.$search_setting['name'];
|
|
310 |
$post_name = 'search_'.$setting_name;
|
|
259 | 311 |
|
260 | 312 |
// hold old value if post is empty |
261 | 313 |
// check search template |
262 |
$value = ( ($admin->get_post($post_name) == '') && ($setting_name != 'template') ) ? $old_value : $admin->get_post($post_name); |
|
314 |
$value = ($admin->get_post($post_name)); |
|
315 |
if(in_array($post_name, $StripCodeFromISearch) ) { |
|
316 |
$value = $admin->StripCodeFromText($value); |
|
317 |
} |
|
318 |
$value = ( ($value == '') && ($setting_name != 'template') ) ? $old_value : $value; |
|
263 | 319 |
// $value = ( ($admin->get_post($post_name) == '') && ($setting_name == 'template') ) ? DEFAULT_TEMPLATE : $admin->get_post($post_name); |
264 | 320 |
if(isset($value)) |
265 | 321 |
{ |
branches/2.8.x/wb/admin/settings/index.php | ||
---|---|---|
36 | 36 |
require_once(WB_PATH.'/framework/functions.php'); |
37 | 37 |
require_once(WB_PATH.'/framework/functions-utf8.php'); |
38 | 38 |
|
39 |
$mLang = ModLanguage::getInstance(); |
|
40 |
$mLang->setLanguage(dirname(__FILE__).'/languages/', LANGUAGE, DEFAULT_LANGUAGE); |
|
39 |
if(!class_exists('Template', false)){ include(WB_PATH.'/include/phplib/ttemplate.inc'); } |
|
41 | 40 |
|
42 | 41 |
// Setup template object, parse vars to it, then parse it |
43 | 42 |
// Create new template object |
44 |
$template = new Template(dirname($admin->correct_theme_source('settings.htt')),'keep');
|
|
45 |
// $template->debug = true;
|
|
46 |
$template->set_file('page', 'settings.htt');
|
|
47 |
$template->set_block('page', 'main_block', 'main');
|
|
48 |
$template->set_var('FTAN', $admin->getFTAN());
|
|
43 |
$oTpl = new Template(dirname($admin->correct_theme_source('settings.htt')),'comment');
|
|
44 |
//$oTpl->debug = true;
|
|
45 |
//$oTpl->filename_comments = true;
|
|
46 |
//$oTpl->unknown_regexp = "strict";
|
|
47 |
//$oTpl->halt_on_error = "report" ;
|
|
49 | 48 |
|
50 |
$template->set_block('main_block', 'template_list_block', 'template_list'); |
|
51 |
$template->set_block('main_block', 'timezone_list_block', 'timezone_list'); |
|
52 |
$template->set_block('main_block', 'language_list_block', 'language_list'); |
|
53 |
$template->set_block('main_block', 'date_format_list_block', 'date_format_list'); |
|
54 |
$template->set_block('main_block', 'time_format_list_block', 'time_format_list'); |
|
55 |
$template->set_block('main_block', 'theme_list_block', 'theme_list'); |
|
56 |
$template->set_block('main_block', 'search_template_list_block', 'search_template_list'); |
|
57 |
$template->set_block('main_block', 'group_list_block', 'group_list'); |
|
58 |
$template->set_block('main_block', 'charset_list_block', 'charset_list'); |
|
59 |
$template->set_block('main_block', 'error_reporting_list_block', 'error_reporting_list'); |
|
60 |
$template->set_block('main_block', 'editor_list_block', 'editor_list'); |
|
61 |
$template->set_block('main_block', 'page_level_limit_list_block', 'page_level_limit_list'); |
|
49 |
$oTpl->set_file('page', 'settings.htt'); |
|
50 |
$oTpl->set_block('page', 'main_block', 'main'); |
|
62 | 51 |
|
63 |
$template->set_block('main_block', 'show_page_level_limit_block', 'show_page_level_limit'); |
|
64 |
$template->set_block('main_block', 'show_checkbox_1_block', 'show_checkbox_1'); |
|
65 |
$template->set_block('main_block', 'show_checkbox_2_block', 'show_checkbox_2'); |
|
66 |
$template->set_block('main_block', 'show_checkbox_3_block', 'show_checkbox_3'); |
|
67 |
$template->set_block('main_block', 'show_php_error_level_block', 'show_php_error_level'); |
|
68 |
$template->set_block('main_block', 'show_charset_block', 'show_charset'); |
|
69 |
$template->set_block('main_block', 'show_wysiwyg_block', 'show_wysiwyg'); |
|
70 |
$template->set_block('main_block', 'show_access_block', 'show_access'); |
|
71 |
$template->set_block('main_block', 'show_search_block', 'show_search'); |
|
72 |
$template->set_block('main_block', 'show_redirect_timer_block', 'show_redirect_timer'); |
|
52 |
$mLang = ModLanguage::getInstance(); |
|
53 |
$mLang->setLanguage(dirname(__FILE__).'/languages/', LANGUAGE, DEFAULT_LANGUAGE); |
|
54 |
|
|
55 |
$oTpl->set_var('FTAN', $admin->getFTAN()); |
|
73 | 56 |
/*-- insert all needed vars from language files ----------------------------------------*/ |
74 |
$template->set_var($mLang->getLangArray());
|
|
57 |
$oTpl->set_var($mLang->getLangArray());
|
|
75 | 58 |
|
76 | 59 |
// Query current settings in the db, then loop through them and print them |
77 |
$query = "SELECT * FROM ".TABLE_PREFIX."settings"; |
|
78 |
$results = $database->query($query); |
|
79 |
while($setting = $results->fetchRow()) |
|
80 |
{ |
|
81 |
$setting_name = $setting['name']; |
|
82 |
$setting_value = ( $setting_name != 'wbmailer_smtp_password' ) ? htmlspecialchars($setting['value']) : $setting['value']; |
|
83 |
$template->set_var(strtoupper($setting_name),$setting_value); |
|
60 |
$query = "SELECT * FROM `".TABLE_PREFIX."settings`"; |
|
61 |
if($results = $database->query($query)) { |
|
62 |
while($setting = $results->fetchRow(MYSQL_ASSOC)) { |
|
63 |
$setting_name = $setting['name']; |
|
64 |
$setting_value = ( $setting_name != 'wbmailer_smtp_password' ) ? htmlspecialchars($setting['value']) : htmlentities($setting['value'], ENT_COMPAT, 'UTF-8'); |
|
65 |
$oTpl->set_var(strtoupper($setting_name),($setting_value)); |
|
66 |
// $oTpl->parse('main', 'main_block', true); |
|
67 |
} |
|
84 | 68 |
} |
85 | 69 |
|
86 |
// Do the same for settings stored in config file as with ones in db |
|
87 |
$database_type = ''; |
|
88 | 70 |
$is_advanced = (isset($_GET['advanced']) && $_GET['advanced'] == 'yes'); |
89 | 71 |
// Tell the browser whether or not to show advanced options |
90 |
if($is_advanced) |
|
91 |
{ |
|
92 |
$template->set_var('DISPLAY_ADVANCED', '');
|
|
93 |
$template->set_var('ADVANCED_FILE_PERMS_ID', 'file_perms_box');
|
|
94 |
$template->set_var('BASIC_FILE_PERMS_ID', 'hide');
|
|
95 |
$template->set_var('ADVANCED', 'yes');
|
|
96 |
$template->set_var('ADVANCED_BUTTON', '<< '.$TEXT['HIDE_ADVANCED']);
|
|
97 |
$template->set_var('ADVANCED_LINK', 'index.php?advanced=no');
|
|
72 |
if($is_advanced)
|
|
73 |
{
|
|
74 |
$oTpl->set_var('DISPLAY_ADVANCED', '');
|
|
75 |
$oTpl->set_var('ADVANCED_FILE_PERMS_ID', 'file_perms_box');
|
|
76 |
$oTpl->set_var('BASIC_FILE_PERMS_ID', 'hide');
|
|
77 |
$oTpl->set_var('ADVANCED', 'yes');
|
|
78 |
$oTpl->set_var('ADVANCED_BUTTON', '<< '.$TEXT['HIDE_ADVANCED']);
|
|
79 |
$oTpl->set_var('ADVANCED_LINK', 'index.php?advanced=no');
|
|
98 | 80 |
|
99 |
} else { |
|
100 |
$template->set_var('DISPLAY_ADVANCED', ' style="display: none;"');
|
|
101 |
$template->set_var('BASIC_FILE_PERMS_ID', 'file_perms_box');
|
|
102 |
$template->set_var('ADVANCED_FILE_PERMS_ID', 'hide');
|
|
81 |
} else {
|
|
82 |
$oTpl->set_var('DISPLAY_ADVANCED', ' style="display: none;"');
|
|
83 |
$oTpl->set_var('BASIC_FILE_PERMS_ID', 'file_perms_box');
|
|
84 |
$oTpl->set_var('ADVANCED_FILE_PERMS_ID', 'hide');
|
|
103 | 85 |
|
104 |
$template->set_var('ADVANCED', 'no');
|
|
105 |
$template->set_var('ADVANCED_BUTTON', $TEXT['SHOW_ADVANCED'].' >>');
|
|
106 |
$template->set_var('ADVANCED_LINK', 'index.php?advanced=yes');
|
|
107 |
} |
|
86 |
$oTpl->set_var('ADVANCED', 'no');
|
|
87 |
$oTpl->set_var('ADVANCED_BUTTON', $TEXT['SHOW_ADVANCED'].' >>');
|
|
88 |
$oTpl->set_var('ADVANCED_LINK', 'index.php?advanced=yes');
|
|
89 |
}
|
|
108 | 90 |
|
109 |
$query = "SELECT * FROM ".TABLE_PREFIX."search WHERE extra = ''";
|
|
110 |
$results = $database->query($query);
|
|
91 |
$sSelected = ' selected="selected"';
|
|
92 |
$checked = ' checked="checked"';
|
|
111 | 93 |
|
112 |
// Query current settings in the db, then loop through them and print them |
|
113 |
while($setting = $results->fetchRow()) |
|
94 |
$oTpl->set_var(array( |
|
95 |
'WB_URL' => WB_URL, |
|
96 |
'THEME_URL' => THEME_URL, |
|
97 |
'ADMIN_URL' => ADMIN_URL, |
|
98 |
)); |
|
99 |
|
|
100 |
// Insert language headings |
|
101 |
$oTpl->set_var(array( |
|
102 |
'HEADING_GENERAL_SETTINGS' => $HEADING['GENERAL_SETTINGS'], |
|
103 |
'HEADING_DEFAULT_SETTINGS' => $HEADING['DEFAULT_SETTINGS'], |
|
104 |
'HEADING_SEARCH_SETTINGS' => $HEADING['SEARCH_SETTINGS'], |
|
105 |
'HEADING_SERVER_SETTINGS' => $HEADING['SERVER_SETTINGS'], |
|
106 |
'HEADING_WBMAILER_SETTINGS' => $HEADING['WBMAILER_SETTINGS'], |
|
107 |
'HEADING_ADMINISTRATION_TOOLS' => $HEADING['ADMINISTRATION_TOOLS'] |
|
108 |
) |
|
109 |
); |
|
110 |
|
|
111 |
// Insert language textarea label |
|
112 |
$oTpl->set_var(array( |
|
113 |
'TEXT_WEBSITE_TITLE' => $TEXT['WEBSITE_TITLE'], |
|
114 |
'TEXT_WEBSITE_DESCRIPTION' => $TEXT['WEBSITE_DESCRIPTION'], |
|
115 |
'TEXT_WEBSITE_KEYWORDS' => $TEXT['WEBSITE_KEYWORDS'], |
|
116 |
'TEXT_WEBSITE_HEADER' => $TEXT['WEBSITE_HEADER'], |
|
117 |
'TEXT_WEBSITE_FOOTER' => $TEXT['WEBSITE_FOOTER'], |
|
118 |
'TEXT_HEADER' => $TEXT['HEADER'], |
|
119 |
'TEXT_FOOTER' => $TEXT['FOOTER'], |
|
120 |
'TEXT_TEXT' => $TEXT['TEXT'], |
|
121 |
'TEXT_RESULTS_HEADER' => $TEXT['RESULTS_HEADER'], |
|
122 |
'TEXT_RESULTS_LOOP' => $TEXT['RESULTS_LOOP'], |
|
123 |
'TEXT_RESULTS_FOOTER' => $TEXT['RESULTS_FOOTER'], |
|
124 |
)); |
|
125 |
|
|
126 |
// Insert generell language |
|
127 |
$oTpl->set_var(array( |
|
128 |
'TEXT_SAVE' => $TEXT['SAVE'], |
|
129 |
'TEXT_RESET' => $TEXT['RESET'], |
|
130 |
'TEXT_ENABLED' => $TEXT['ENABLED'], |
|
131 |
'TEXT_DISABLED' => $TEXT['DISABLED'], |
|
132 |
'TEXT_DEFAULT' => $TEXT['DEFAULT'], |
|
133 |
'TEXT_NO_RESULTS' => $TEXT['NO_RESULTS'], |
|
134 |
'TEXT_PLEASE_SELECT' => $TEXT['PLEASE_SELECT'], |
|
135 |
)); |
|
136 |
|
|
137 |
// Insert language labels |
|
138 |
$oTpl->set_var(array( |
|
139 |
'TEXT_PAGE_TRASH' => $TEXT['PAGE_TRASH'], |
|
140 |
'TEXT_PAGE_LANGUAGES' => $TEXT['PAGE_LANGUAGES'], |
|
141 |
'TEXT_FRONTEND' => $TEXT['FRONTEND'], |
|
142 |
'TEXT_LOGIN' => $TEXT['LOGIN'], |
|
143 |
'TEXT_HOMEPAGE_REDIRECTION' => $TEXT['HOMEPAGE_REDIRECTION'], |
|
144 |
'TEXT_SECTION_BLOCKS' => $TEXT['SECTION_BLOCKS'], |
|
145 |
'TEXT_MANAGE' => $TEXT['MANAGE'], |
|
146 |
'TEXT_SMART_LOGIN' => $TEXT['SMART_LOGIN'], |
|
147 |
'TEXT_PHP_ERROR_LEVEL' => $TEXT['PHP_ERROR_LEVEL'], |
|
148 |
'TEXT_WYSIWYG_STYLE' => $TEXT['WYSIWYG_STYLE'], |
|
149 |
'TEXT_CHARSET' => $TEXT['CHARSET'], |
|
150 |
'TEXT_REDIRECT_AFTER' => $TEXT['REDIRECT_AFTER'], |
|
151 |
'TEXT_SIGNUP' => $TEXT['SIGNUP'].' '.$TEXT['GROUP'], |
|
152 |
'TEXT_MULTILINGUAL' => $TEXT['MULTILINGUAL'], |
|
153 |
'TEXT_HOME_FOLDERS' => $TEXT['HOME_FOLDERS'], |
|
154 |
'TEXT_MANAGE_SECTIONS' => $HEADING['MANAGE_SECTIONS'], |
|
155 |
'TEXT_MULTIPLE_MENUS' => $TEXT['MULTIPLE_MENUS'], |
|
156 |
'TEXT_INLINE' => $TEXT['INLINE'], |
|
157 |
'TEXT_SEPARATE' => $TEXT['SEPARATE'], |
|
158 |
'TEXT_LANGUAGE' => $TEXT['LANGUAGE'], |
|
159 |
'TEXT_TIMEZONE' => $TEXT['TIMEZONE'], |
|
160 |
'TEXT_DATE_FORMAT' => $TEXT['DATE_FORMAT'], |
|
161 |
'TEXT_TIME_FORMAT' => $TEXT['TIME_FORMAT'], |
|
162 |
'TEXT_TEMPLATE' => $TEXT['TEMPLATE'], |
|
163 |
'TEXT_THEME' => $TEXT['THEME'], |
|
164 |
'TEXT_WYSIWYG_EDITOR' => $TEXT['WYSIWYG_EDITOR'], |
|
165 |
'TEXT_PAGE_LEVEL_LIMIT' => $TEXT['PAGE_LEVEL_LIMIT'], |
|
166 |
'TEXT_INTRO_PAGE' => $TEXT['INTRO_PAGE'], |
|
167 |
)); |
|
168 |
|
|
169 |
// Insert permissions values |
|
170 |
if($admin->get_permission('settings_advanced') != true) |
|
114 | 171 |
{ |
115 |
$setting_name = $setting['name']; |
|
116 |
$setting_value = htmlspecialchars(($setting['value'])); |
|
117 |
switch($setting_name) { |
|
118 |
// Search header |
|
119 |
case 'header': |
|
120 |
$template->set_var('SEARCH_HEADER', $setting_value); |
|
121 |
break; |
|
122 |
// Search results header |
|
123 |
case 'results_header': |
|
124 |
$template->set_var('SEARCH_RESULTS_HEADER', $setting_value); |
|
125 |
break; |
|
126 |
// Search results loop |
|
127 |
case 'results_loop': |
|
128 |
$template->set_var('SEARCH_RESULTS_LOOP', $setting_value); |
|
129 |
break; |
|
130 |
// Search results footer |
|
131 |
case 'results_footer': |
|
132 |
$template->set_var('SEARCH_RESULTS_FOOTER', $setting_value); |
|
133 |
break; |
|
134 |
// Search no results |
|
135 |
case 'no_results': |
|
136 |
$template->set_var('SEARCH_NO_RESULTS', $setting_value); |
|
137 |
break; |
|
138 |
// Search footer |
|
139 |
case 'footer': |
|
140 |
$template->set_var('SEARCH_FOOTER', $setting_value); |
|
141 |
break; |
|
142 |
// Search module-order |
|
143 |
case 'module_order': |
|
144 |
$template->set_var('SEARCH_MODULE_ORDER', $setting_value); |
|
145 |
break; |
|
146 |
// Search max lines of excerpt |
|
147 |
case 'max_excerpt': |
|
148 |
$template->set_var('SEARCH_MAX_EXCERPT', $setting_value); |
|
149 |
break; |
|
150 |
// time-limit |
|
151 |
case 'time_limit': |
|
152 |
$template->set_var('SEARCH_TIME_LIMIT', $setting_value); |
|
153 |
break; |
|
154 |
// Search template |
|
155 |
case 'template': |
|
156 |
$search_template = $setting_value; |
|
157 |
break; |
|
172 |
$oTpl->set_var('DISPLAY_ADVANCED_BUTTON', 'hide'); |
|
173 |
} |
|
174 |
|
|
175 |
/** |
|
176 |
* <!-- BEGIN show_page_level_limit_block --> |
|
177 |
* Insert page level limits |
|
178 |
*/ |
|
179 |
$oTpl->set_block('main_block', 'show_page_level_limit_block', 'show_page_level_limit'); |
|
180 |
/** |
|
181 |
* <!-- BEGIN page_level_limit_list_block --> |
|
182 |
*/ |
|
183 |
$oTpl->set_block('show_page_level_limit_block', 'page_level_limit_list_block', 'page_level_limit_list'); |
|
184 |
for($i = 1; $i <= 10; $i++) |
|
185 |
{ |
|
186 |
$oTpl->set_var('NUMBER', $i); |
|
187 |
if(PAGE_LEVEL_LIMIT == $i) |
|
188 |
{ |
|
189 |
$oTpl->set_var('SELECTED', $sSelected); |
|
190 |
} else { |
|
191 |
$oTpl->set_var('SELECTED', ''); |
|
158 | 192 |
} |
193 |
$oTpl->parse('page_level_limit_list', 'page_level_limit_list_block', true); |
|
159 | 194 |
} |
160 | 195 |
|
161 |
$sSelected = ' selected="selected"'; |
|
162 |
$checked = ' checked="checked"'; |
|
196 |
/** |
|
197 |
* <!-- END page_level_limit_list_block --> |
|
198 |
* <!-- END show_page_level_limit_block --> |
|
199 |
*/ |
|
200 |
if($is_advanced) |
|
201 |
{ |
|
202 |
$oTpl->parse('show_page_level_limit', 'show_page_level_limit_block', false); |
|
203 |
} else { |
|
204 |
$oTpl->parse('show_page_level_limit', ''); |
|
205 |
} |
|
163 | 206 |
|
164 |
$template->set_var(array( |
|
165 |
'WB_URL' => WB_URL, |
|
166 |
'THEME_URL' => THEME_URL, |
|
167 |
'ADMIN_URL' => ADMIN_URL, |
|
168 |
)); |
|
207 |
/** |
|
208 |
* Work-out if page trash feature is disabled, in-line, or separate |
|
209 |
*/ |
|
210 |
if(PAGE_TRASH == 'disabled') |
|
211 |
{ |
|
212 |
$oTpl->set_var(array( |
|
213 |
'PAGE_TRASH_DISABLED' => $checked, |
|
214 |
'PAGE_TRASH_INLINE' => '', |
|
215 |
'DISPLAY_PAGE_TRASH_SEPARATE' => 'display: none;', |
|
216 |
)); |
|
217 |
} elseif(PAGE_TRASH == 'inline') |
|
218 |
{ |
|
219 |
$oTpl->set_var(array( |
|
220 |
'PAGE_TRASH_INLINE' => $checked, |
|
221 |
'PAGE_TRASH_DISABLED' => '', |
|
222 |
'DISPLAY_PAGE_TRASH_SEPARATE' => 'display: none;', |
|
223 |
)); |
|
224 |
} elseif(PAGE_TRASH == 'separate') |
|
225 |
{ |
|
226 |
$oTpl->set_var('PAGE_TRASH_SEPARATE', $checked); |
|
227 |
$oTpl->set_var('DISPLAY_PAGE_TRASH_SEPARATE', 'display: inline;'); |
|
228 |
} |
|
169 | 229 |
|
170 |
// Insert language values |
|
230 |
/** |
|
231 |
* <!-- BEGIN show_checkbox_1_block --> |
|
232 |
* advanced yes |
|
233 |
*/ |
|
234 |
$oTpl->set_block('main_block', 'show_checkbox_1_block', 'show_checkbox_1'); |
|
235 |
// Work-out if page languages feature is enabled |
|
236 |
if(defined('PAGE_LANGUAGES') && PAGE_LANGUAGES == true) |
|
237 |
{ |
|
238 |
$oTpl->set_var(array( |
|
239 |
'PAGE_LANGUAGES_ENABLED' => $checked, |
|
240 |
'PAGE_LANGUAGES_DISABLED' => '', |
|
241 |
)); |
|
242 |
} else { |
|
243 |
$oTpl->set_var(array( |
|
244 |
'PAGE_LANGUAGES_DISABLED' => $checked, |
|
245 |
'PAGE_LANGUAGES_ENABLED' => '', |
|
246 |
)); |
|
247 |
} |
|
248 |
|
|
249 |
// Work-out if page extended feature is enabled |
|
250 |
if(defined('PAGE_EXTENDED') && PAGE_EXTENDED == true) |
|
251 |
{ |
|
252 |
$oTpl->set_var(array( |
|
253 |
'PAGE_EXTENDED_ENABLED' => $checked, |
|
254 |
'PAGE_EXTENDED_DISABLED' => '', |
|
255 |
)); |
|
256 |
} else { |
|
257 |
$oTpl->set_var(array( |
|
258 |
'PAGE_EXTENDED_DISABLED' => $checked, |
|
259 |
'PAGE_EXTENDED_ENABLED' => '', |
|
260 |
)); |
|
261 |
} |
|
262 |
|
|
263 |
// Work-out if multiple menus feature is enabled |
|
264 |
if(defined('MULTIPLE_MENUS') && MULTIPLE_MENUS == true) |
|
265 |
{ |
|
266 |
$oTpl->set_var(array( |
|
267 |
'MULTIPLE_MENUS_ENABLED' => $checked, |
|
268 |
'MULTIPLE_MENUS_DISABLED' => '', |
|
269 |
)); |
|
270 |
} else { |
|
271 |
$oTpl->set_var(array( |
|
272 |
'MULTIPLE_MENUS_DISABLED' => $checked, |
|
273 |
'MULTIPLE_MENUS_ENABLED' => '', |
|
274 |
)); |
|
275 |
} |
|
276 |
|
|
277 |
/** |
|
278 |
* <!-- END show_checkbox_1_block --> |
|
279 |
* advanced yes |
|
280 |
*/ |
|
281 |
if($is_advanced) |
|
282 |
{ |
|
283 |
$oTpl->parse('show_checkbox_1', 'show_checkbox_1_block'); |
|
284 |
} else { |
|
285 |
$oTpl->parse('show_checkbox_1', ''); |
|
286 |
} |
|
287 |
|
|
288 |
// Work-out if media home folder feature is enabled |
|
289 |
$oTpl->set_var('TEXT_HOME_FOLDERS', $TEXT['HOME_FOLDERS']); |
|
290 |
if(HOME_FOLDERS) |
|
291 |
{ |
|
292 |
$oTpl->set_var(array( |
|
293 |
'HOME_FOLDERS_ENABLED' => $checked, |
|
294 |
'HOME_FOLDERS_DISABLED' => '', |
|
295 |
)); |
|
296 |
} else { |
|
297 |
$oTpl->set_var(array( |
|
298 |
'HOME_FOLDERS_DISABLED' => $checked, |
|
299 |
'HOME_FOLDERS_ENABLED' => '', |
|
300 |
)); |
|
301 |
} |
|
302 |
|
|
303 |
$oTpl->set_block('main_block', 'show_checkbox_2_block', 'show_checkbox_2'); |
|
304 |
// Work-out if manage sections feature is enabled |
|
305 |
if(MANAGE_SECTIONS) |
|
306 |
{ |
|
307 |
$oTpl->set_var(array( |
|
308 |
'MANAGE_SECTIONS_ENABLED' => $checked, |
|
309 |
'MANAGE_SECTIONS_DISABLED' => '', |
|
310 |
)); |
|
311 |
} else { |
|
312 |
$oTpl->set_var(array( |
|
313 |
'MANAGE_SECTIONS_DISABLED' => $checked, |
|
314 |
'MANAGE_SECTIONS_ENABLED' => '', |
|
315 |
)); |
|
316 |
} |
|
317 |
|
|
318 |
// Work-out if section blocks feature is enabled |
|
319 |
if(defined('SECTION_BLOCKS') && SECTION_BLOCKS == true) |
|
320 |
{ |
|
321 |
$oTpl->set_var(array( |
|
322 |
'SECTION_BLOCKS_ENABLED' => $checked, |
|
323 |
'SECTION_BLOCKS_DISABLED' => '', |
|
324 |
)); |
|
325 |
} else { |
|
326 |
$oTpl->set_var(array( |
|
327 |
'SECTION_BLOCKS_DISABLED' => $checked, |
|
328 |
'SECTION_BLOCKS_ENABLED' => '', |
|
329 |
)); |
|
330 |
} |
|
331 |
|
|
332 |
/** |
|
333 |
* |
|
334 |
*/ |
|
335 |
if($is_advanced) |
|
336 |
{ |
|
337 |
$oTpl->parse('show_checkbox_2', 'show_checkbox_2_block'); |
|
338 |
} else { |
|
339 |
$oTpl->parse('show_checkbox_2', ''); |
|
340 |
} |
|
341 |
|
|
342 |
// Work-out if intro feature is enabled |
|
343 |
if(INTRO_PAGE) |
|
344 |
{ |
|
345 |
$oTpl->set_var(array( |
|
346 |
'INTRO_PAGE_ENABLED' => $checked, |
|
347 |
'INTRO_PAGE_DISABLED' => '', |
|
348 |
)); |
|
349 |
} else { |
|
350 |
$oTpl->set_var(array( |
|
351 |
'INTRO_PAGE_DISABLED' => $checked, |
|
352 |
'INTRO_PAGE_ENABLED' => '', |
|
353 |
)); |
|
354 |
} |
|
355 |
/** |
|
356 |
* <!-- BEGIN show_checkbox_3_block --> |
|
357 |
*/ |
|
358 |
$oTpl->set_block('main_block', 'show_checkbox_3_block', 'show_checkbox_3'); |
|
359 |
// Work-out if homepage redirection feature is enabled |
|
360 |
if(defined('HOMEPAGE_REDIRECTION') && HOMEPAGE_REDIRECTION == true) |
|
361 |
{ |
|
362 |
$oTpl->set_var(array( |
|
363 |
'HOMEPAGE_REDIRECTION_ENABLED' => $checked, |
|
364 |
'HOMEPAGE_REDIRECTION_DISABLED' => '', |
|
365 |
)); |
|
366 |
} else { |
|
367 |
// $oTpl->set_var('HOMEPAGE_REDIRECTION_DISABLED', $checked); |
|
368 |
$oTpl->set_var(array( |
|
369 |
'HOMEPAGE_REDIRECTION_DISABLED' => $checked, |
|
370 |
'HOMEPAGE_REDIRECTION_ENABLED' => '', |
|
371 |
)); |
|
372 |
} |
|
373 |
// Work-out if smart login feature is enabled |
|
374 |
if(defined('SMART_LOGIN') && SMART_LOGIN == true) |
|
375 |
{ |
|
376 |
$oTpl->set_var('SMART_LOGIN_ENABLED', $checked); |
|
377 |
$oTpl->set_var(array( |
|
378 |
'SMART_LOGIN_ENABLED' => $checked, |
|
379 |
'SMART_LOGIN_DISABLED' => '', |
|
380 |
)); |
|
381 |
} else { |
|
382 |
$oTpl->set_var('SMART_LOGIN_DISABLED', $checked); |
|
383 |
$oTpl->set_var(array( |
|
384 |
'SMART_LOGIN_DISABLED' => $checked, |
|
385 |
'SMART_LOGIN_ENABLED' => '', |
|
386 |
)); |
|
387 |
} |
|
388 |
|
|
389 |
/** |
|
390 |
* <!-- END show_checkbox_3_block --> |
|
391 |
*/ |
|
392 |
if($is_advanced) |
|
393 |
{ |
|
394 |
$oTpl->parse('show_checkbox_3', 'show_checkbox_3_block'); |
|
395 |
} else { |
|
396 |
$oTpl->parse('show_checkbox_3', 'show_checkbox_3_block', ''); |
|
397 |
} |
|
398 |
|
|
399 |
// Work-out if frontend login feature is enabled |
|
400 |
if(FRONTEND_LOGIN) |
|
401 |
{ |
|
402 |
$oTpl->set_var(array( |
|
403 |
'PRIVATE_ENABLED' => $checked, |
|
404 |
'PRIVATE_DISABLED' => '', |
|
405 |
)); |
|
406 |
} else { |
|
407 |
$oTpl->set_var(array( |
|
408 |
'PRIVATE_DISABLED' => $checked, |
|
409 |
'INTRO_PAGE_ENABLED' => '', |
|
410 |
)); |
|
411 |
} |
|
412 |
|
|
413 |
if(CONFIRMED_REGISTRATION) |
|
414 |
{ |
|
415 |
$oTpl->set_var(array( |
|
416 |
'CONFIRMED_REGISTRATION_ENABLED' => $checked, |
|
417 |
'CONFIRMED_REGISTRATION_DISABLED' => '', |
|
418 |
)); |
|
419 |
} else { |
|
420 |
$oTpl->set_var(array( |
|
421 |
'CONFIRMED_REGISTRATION_DISABLED' => $checked, |
|
422 |
'CONFIRMED_REGISTRATION_ENABLED' => '', |
|
423 |
)); |
|
424 |
} |
|
425 |
|
|
426 |
// Insert groups into signup list |
|
427 |
$oTpl->set_block('main_block', 'group_list_block', 'group_list'); |
|
428 |
$sql = "SELECT `group_id`, `name` FROM `".TABLE_PREFIX."groups` WHERE `group_id` != '1'"; |
|
429 |
if($results = $database->query($sql)) { |
|
430 |
if($results->numRows() > 0) |
|
431 |
{ |
|
432 |
while($group = $results->fetchRow(MYSQL_ASSOC)) |
|
433 |
{ |
|
434 |
$oTpl->set_var('ID', $group['group_id']); |
|
435 |
$oTpl->set_var('NAME', $group['name']); |
|
436 |
if(FRONTEND_SIGNUP == $group['group_id']) |
|
437 |
{ |
|
438 |
$oTpl->set_var('SELECTED', $sSelected); |
|
439 |
} else { |
|
440 |
$oTpl->set_var('SELECTED', ''); |
|
441 |
} |
|
442 |
$oTpl->parse('group_list', 'group_list_block', true); |
|
443 |
} |
|
444 |
} else { |
|
445 |
$oTpl->set_var('ID', 'disabled'); |
|
446 |
$oTpl->set_var('NAME', $MESSAGE['GROUPS']['NO_GROUPS_FOUND']); |
|
447 |
$oTpl->parse('group_list', 'group_list_block', true); |
|
448 |
} |
|
449 |
} |
|
450 |
|
|
451 |
/** |
|
452 |
* <!-- BEGIN show_redirect_timer_block --> |
|
453 |
*/ |
|
454 |
$oTpl->set_block('main_block', 'show_redirect_timer_block', 'show_redirect_timer'); |
|
455 |
|
|
456 |
/** |
|
457 |
* <!-- END show_redirect_timer_block --> |
|
458 |
*/ |
|
459 |
if($is_advanced) |
|
460 |
{ |
|
461 |
$oTpl->parse('show_redirect_timer', 'show_redirect_timer_block'); |
|
462 |
} else { |
|
463 |
$oTpl->parse('show_redirect_timer', ''); |
|
464 |
} |
|
465 |
|
|
466 |
/** |
|
467 |
* <!-- BEGIN show_php_error_level_block --> |
|
468 |
*/ |
|
469 |
// Insert default error reporting values |
|
470 |
require(ADMIN_PATH.'/interface/er_levels.php'); |
|
471 |
$oTpl->set_block('main_block', 'show_php_error_level_block', 'show_php_error_level'); |
|
472 |
$oTpl->set_block('show_php_error_level_block', 'php_error_list_block', 'php_error_list'); |
|
473 |
foreach($ER_LEVELS AS $value => $title) |
|
474 |
{ |
|
475 |
$oTpl->set_var('VALUE', $value); |
|
476 |
$oTpl->set_var('NAME', $title); |
|
477 |
$selected = (ER_LEVEL == $value) ? $sSelected : ''; |
|
478 |
$oTpl->set_var('SELECTED', $selected); |
|
479 |
$oTpl->parse('php_error_list', 'php_error_list_block', true); |
|
480 |
} |
|
481 |
|
|
482 |
/** |
|
483 |
* <!-- END show_php_error_level_block --> |
|
484 |
*/ |
|
485 |
if($is_advanced) |
|
486 |
{ |
|
487 |
$oTpl->parse('show_php_error_level', 'show_php_error_level_block'); |
|
488 |
} else { |
|
489 |
$oTpl->parse('show_php_error_level', ''); |
|
490 |
} |
|
491 |
|
|
492 |
/** |
|
493 |
* <!-- BEGIN show_wysiwyg_block --> |
|
494 |
*/ |
|
495 |
// Insert WYSIWYG modules |
|
496 |
$oTpl->set_block('main_block', 'show_wysiwyg_block', 'show_wysiwyg'); |
|
497 |
$oTpl->set_block('show_wysiwyg_block', 'editor_list_block', 'editor_list'); |
|
498 |
$file='none'; |
|
499 |
$module_name=$TEXT['NONE']; |
|
500 |
$oTpl->set_var('FILE', $file); |
|
501 |
$oTpl->set_var('NAME', $module_name); |
|
502 |
$selected = (!defined('WYSIWYG_EDITOR') || $file == WYSIWYG_EDITOR) ? $sSelected : ''; |
|
503 |
$oTpl->set_var('SELECTED', $selected); |
|
504 |
$oTpl->parse('editor_list', 'editor_list_block', true); |
|
171 | 505 |
$sql = 'SELECT `name`, `directory` FROM `'.TABLE_PREFIX.'addons` '; |
506 |
$sql .= 'WHERE `type` = \'module\' '; |
|
507 |
$sql .= 'AND `function` = \'wysiwyg\' '; |
|
508 |
$sql .= 'ORDER BY `name`'; |
|
509 |
if( ($result = $database->query($sql)) && ($result->numRows() > 0) ) |
|
510 |
{ |
|
511 |
while($addon = $result->fetchRow(MYSQL_ASSOC)) |
|
512 |
{ |
|
513 |
if( $admin->get_permission($addon['directory'],'module' ) ) |
|
514 |
{ |
|
515 |
$oTpl->set_var('FILE', $addon['directory']); |
|
516 |
$oTpl->set_var('NAME', $addon['name']); |
|
517 |
$selected = (!defined('WYSIWYG_EDITOR') || $addon['directory'] == WYSIWYG_EDITOR) ? $sSelected : ''; |
|
518 |
$oTpl->set_var('SELECTED', $selected); |
|
519 |
$oTpl->parse('editor_list', 'editor_list_block', true); |
|
520 |
} |
|
521 |
} |
|
522 |
} |
|
523 |
|
|
524 |
/** |
|
525 |
* <!-- END show_wysiwyg_block --> |
|
526 |
*/ |
|
527 |
if($is_advanced) |
|
528 |
{ |
|
529 |
$oTpl->parse('show_wysiwyg','show_wysiwyg_block'); |
|
530 |
} else { |
|
531 |
$oTpl->parse('show_wysiwyg', ''); |
|
532 |
} |
|
533 |
|
|
534 |
// Insert language values |
|
535 |
$oTpl->set_block('main_block', 'language_list_block', 'language_list'); |
|
536 |
$sql = 'SELECT `name`, `directory` FROM `'.TABLE_PREFIX.'addons` '; |
|
172 | 537 |
$sql .= 'WHERE `type` = \'language\' '; |
173 | 538 |
$sql .= 'AND `function` != \'theme\' '; |
174 | 539 |
$sql .= 'ORDER BY `directory`'; |
175 |
|
|
176 | 540 |
if( ($result = $database->query($sql)) && ($result->numRows() > 0) ) |
177 |
// $result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'language' ORDER BY directory"); |
|
178 |
// if($result->numRows() > 0) |
|
179 | 541 |
{ |
180 |
while($addon = $result->fetchRow()) { |
|
542 |
while($addon = $result->fetchRow(MYSQL_ASSOC)) {
|
|
181 | 543 |
$langIcons = (empty($addon['directory'])) ? 'none' : strtolower($addon['directory']); |
182 | 544 |
|
183 |
$template->set_var('CODE', $addon['directory']);
|
|
184 |
$template->set_var('NAME', $addon['name']);
|
|
185 |
$template->set_var('FLAG', THEME_URL.'/images/flags/'.$langIcons);
|
|
186 |
$template->set_var('SELECTED', (DEFAULT_LANGUAGE == $addon['directory'] ? $sSelected : '') );
|
|
187 |
$template->parse('language_list', 'language_list_block', true);
|
|
545 |
$oTpl->set_var('CODE', $addon['directory']);
|
|
546 |
$oTpl->set_var('NAME', $addon['name']);
|
|
547 |
$oTpl->set_var('FLAG', THEME_URL.'/images/flags/'.$langIcons);
|
|
548 |
$oTpl->set_var('SELECTED', (DEFAULT_LANGUAGE == $addon['directory'] ? $sSelected : '') );
|
|
549 |
$oTpl->parse('language_list', 'language_list_block', true);
|
|
188 | 550 |
} |
189 | 551 |
} |
552 |
/** |
|
553 |
* <!-- BEGIN show_charset_block --> |
|
554 |
*/ |
|
555 |
// Insert default charset values |
|
556 |
$oTpl->set_block('main_block', 'show_charset_block', 'show_charset'); |
|
557 |
require(ADMIN_PATH.'/interface/charsets.php'); |
|
558 |
$oTpl->set_block('show_charset_block', 'charset_list_block', 'charset_list'); |
|
559 |
foreach($CHARSETS AS $code => $title) { |
|
560 |
$oTpl->set_var('VALUE', $code); |
|
561 |
$oTpl->set_var('NAME', $title); |
|
562 |
if(DEFAULT_CHARSET == $code) { |
|
563 |
$oTpl->set_var('SELECTED', $sSelected); |
|
564 |
} else { |
|
565 |
$oTpl->set_var('SELECTED', ''); |
|
566 |
} |
|
567 |
$oTpl->parse('charset_list', 'charset_list_block', true); |
|
568 |
} |
|
569 |
/** |
|
570 |
* <!-- END show_charset_block --> |
|
571 |
*/ |
|
572 |
if($is_advanced) |
|
573 |
{ |
|
574 |
$oTpl->parse('show_charset', 'show_charset_block'); |
|
575 |
} else { |
|
576 |
$oTpl->parse('show_charset', ''); |
|
577 |
} |
|
190 | 578 |
|
191 |
// Insert default timezone values
|
|
579 |
// nsert default timezone values
|
|
192 | 580 |
require(ADMIN_PATH.'/interface/timezones.php'); |
581 |
$oTpl->set_block('main_block', 'timezone_list_block','timezone_list'); |
|
193 | 582 |
foreach($TIMEZONES AS $hour_offset => $title) |
194 | 583 |
{ |
195 |
// Make sure we dont list "System Default" as we are setting this value!
|
|
584 |
// Make sure we dont list "System Default" as we are setting this value!
|
|
196 | 585 |
if($hour_offset != '-20') { |
197 |
$template->set_var('VALUE', $hour_offset);
|
|
198 |
$template->set_var('NAME', $title);
|
|
586 |
$oTpl->set_var('VALUE', $hour_offset);
|
|
587 |
$oTpl->set_var('NAME', $title);
|
|
199 | 588 |
if(DEFAULT_TIMEZONE == $hour_offset*60*60) { |
200 |
$template->set_var('SELECTED', $sSelected);
|
|
589 |
$oTpl->set_var('SELECTED', $sSelected);
|
|
201 | 590 |
} else { |
202 |
$template->set_var('SELECTED', '');
|
|
591 |
$oTpl->set_var('SELECTED', '');
|
|
203 | 592 |
} |
204 |
$template->parse('timezone_list', 'timezone_list_block', true);
|
|
593 |
$oTpl->parse('timezone_list', 'timezone_list_block', true);
|
|
205 | 594 |
} |
206 | 595 |
} |
207 | 596 |
|
208 |
// Insert default charset values |
|
209 |
require(ADMIN_PATH.'/interface/charsets.php'); |
|
210 |
foreach($CHARSETS AS $code => $title) { |
|
211 |
$template->set_var('VALUE', $code); |
|
212 |
$template->set_var('NAME', $title); |
|
213 |
if(DEFAULT_CHARSET == $code) { |
|
214 |
$template->set_var('SELECTED', $sSelected); |
|
215 |
} else { |
|
216 |
$template->set_var('SELECTED', ''); |
|
217 |
} |
|
218 |
$template->parse('charset_list', 'charset_list_block', true); |
|
219 |
} |
|
220 |
|
|
221 |
|
|
222 |
// Insert date format list |
|
597 |
// Insert date format list |
|
223 | 598 |
require(ADMIN_PATH.'/interface/date_formats.php'); |
599 |
$oTpl->set_block('main_block', 'date_format_list_block', 'date_format_list'); |
|
224 | 600 |
foreach($DATE_FORMATS AS $format => $title) { |
225 | 601 |
$format = str_replace('|', ' ', $format); // Add's white-spaces (not able to be stored in array key) |
226 | 602 |
if($format != 'system_default') { |
227 |
$template->set_var('VALUE', $format);
|
|
603 |
$oTpl->set_var('VALUE', $format);
|
|
228 | 604 |
} else { |
229 |
$template->set_var('VALUE', '');
|
|
605 |
$oTpl->set_var('VALUE', '');
|
|
230 | 606 |
} |
231 |
$template->set_var('NAME', $title);
|
|
607 |
$oTpl->set_var('NAME', $title);
|
|
232 | 608 |
if(DEFAULT_DATE_FORMAT == $format) { |
233 |
$template->set_var('SELECTED', $sSelected);
|
|
609 |
$oTpl->set_var('SELECTED', $sSelected);
|
|
234 | 610 |
} else { |
235 |
$template->set_var('SELECTED', '');
|
|
611 |
$oTpl->set_var('SELECTED', '');
|
|
236 | 612 |
} |
237 |
$template->parse('date_format_list', 'date_format_list_block', true);
|
|
613 |
$oTpl->parse('date_format_list', 'date_format_list_block', true);
|
|
238 | 614 |
} |
239 | 615 |
|
240 |
// Insert time format list
|
|
616 |
// Insert time format list
|
|
241 | 617 |
require(ADMIN_PATH.'/interface/time_formats.php'); |
618 |
$oTpl->set_block('main_block', 'time_format_list_block', 'time_format_list'); |
|
242 | 619 |
foreach($TIME_FORMATS AS $format => $title) { |
243 | 620 |
$format = str_replace('|', ' ', $format); // Add's white-spaces (not able to be stored in array key) |
244 | 621 |
if($format != 'system_default') { |
245 |
$template->set_var('VALUE', $format);
|
|
622 |
$oTpl->set_var('VALUE', $format);
|
|
246 | 623 |
} else { |
247 |
$template->set_var('VALUE', '');
|
|
624 |
$oTpl->set_var('VALUE', '');
|
|
248 | 625 |
} |
249 |
$template->set_var('NAME', $title);
|
|
626 |
$oTpl->set_var('NAME', $title);
|
|
250 | 627 |
if(DEFAULT_TIME_FORMAT == $format) { |
251 |
$template->set_var('SELECTED', $sSelected);
|
|
628 |
$oTpl->set_var('SELECTED', $sSelected);
|
|
252 | 629 |
} else { |
253 |
$template->set_var('SELECTED', '');
|
|
630 |
$oTpl->set_var('SELECTED', '');
|
|
254 | 631 |
} |
255 |
$template->parse('time_format_list', 'time_format_list_block', true);
|
|
632 |
$oTpl->parse('time_format_list', 'time_format_list_block', true);
|
|
256 | 633 |
} |
257 | 634 |
|
258 | 635 |
// Insert templates |
636 |
$oTpl->set_block('main_block', 'template_list_block', 'template_list'); |
|
259 | 637 |
$sql = 'SELECT `name`, `directory` FROM `'.TABLE_PREFIX.'addons` '; |
260 | 638 |
$sql .= 'WHERE `type` = \'template\' '; |
261 | 639 |
$sql .= 'AND `function` != \'theme\' '; |
262 | 640 |
$sql .= 'ORDER BY `name`'; |
263 | 641 |
if( ($result = $database->query($sql)) && ($result->numRows() > 0) ) |
264 | 642 |
{ |
265 |
// $result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'template' AND function != 'theme' ORDER BY name"); |
|
266 |
// if($result->numRows() > 0) { |
|
267 |
while($addon = $result->fetchRow()) |
|
643 |
while($addon = $result->fetchRow(MYSQL_ASSOC)) |
|
268 | 644 |
{ |
269 | 645 |
if( $admin->get_permission($addon['directory'],'template' ) ) |
270 | 646 |
{ |
271 |
$template->set_var('FILE', $addon['directory']);
|
|
272 |
$template->set_var('NAME', $addon['name']);
|
|
647 |
$oTpl->set_var('FILE', $addon['directory']);
|
|
648 |
$oTpl->set_var('NAME', $addon['name']);
|
|
273 | 649 |
$selected = (($addon['directory'] == DEFAULT_TEMPLATE) ? $sSelected : ''); |
274 |
$template->set_var('SELECTED', $selected);
|
|
275 |
$template->parse('template_list', 'template_list_block', true);
|
|
650 |
$oTpl->set_var('SELECTED', $selected);
|
|
651 |
$oTpl->parse('template_list', 'template_list_block', true);
|
|
276 | 652 |
} |
277 | 653 |
} |
278 | 654 |
} |
279 | 655 |
|
280 | 656 |
// Insert backend theme |
657 |
$oTpl->set_block('main_block', 'theme_list_block', 'theme_list'); |
|
281 | 658 |
$sql = 'SELECT `name`, `directory` FROM `'.TABLE_PREFIX.'addons` '; |
282 | 659 |
$sql .= 'WHERE `type` = \'template\' '; |
283 | 660 |
$sql .= 'AND `function` = \'theme\' '; |
284 | 661 |
$sql .= 'ORDER BY `name`'; |
285 | 662 |
|
286 |
|
|
287 | 663 |
if( ($result = $database->query($sql)) && ($result->numRows() > 0) ) |
288 | 664 |
{ |
289 |
// $result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'template' AND function = 'theme' ORDER BY name"); |
|
290 |
// if($result->numRows() > 0) { |
|
291 |
while($addon = $result->fetchRow()) |
|
665 |
while($addon = $result->fetchRow(MYSQL_ASSOC)) |
|
292 | 666 |
{ |
293 | 667 |
if( $admin->get_permission($addon['directory'],'template' ) ) |
294 | 668 |
{ |
295 |
$template->set_var('FILE', $addon['directory']);
|
|
296 |
$template->set_var('NAME', $addon['name']);
|
|
669 |
$oTpl->set_var('FILE', $addon['directory']);
|
|
670 |
$oTpl->set_var('NAME', $addon['name']);
|
|
297 | 671 |
$selected = (($addon['directory'] == DEFAULT_THEME) ? $sSelected : ''); |
298 |
$template->set_var('SELECTED', $selected);
|
|
299 |
$template->parse('theme_list', 'theme_list_block', true);
|
|
672 |
$oTpl->set_var('SELECTED', $selected);
|
|
673 |
$oTpl->parse('theme_list', 'theme_list_block', true);
|
|
300 | 674 |
} |
301 | 675 |
} |
302 | 676 |
} |
303 | 677 |
|
304 |
// Insert WYSIWYG modules |
|
305 |
$file='none'; |
|
306 |
$module_name=$TEXT['NONE']; |
|
307 |
$template->set_var('FILE', $file); |
|
308 |
$template->set_var('NAME', $module_name); |
|
309 |
$selected = (!defined('WYSIWYG_EDITOR') || $file == WYSIWYG_EDITOR) ? $sSelected : ''; |
|
310 |
$template->set_var('SELECTED', $selected); |
|
311 |
$template->parse('editor_list', 'editor_list_block', true); |
|
312 |
$sql = 'SELECT `name`, `directory` FROM `'.TABLE_PREFIX.'addons` '; |
|
313 |
$sql .= 'WHERE `type` = \'module\' '; |
|
314 |
$sql .= 'AND `function` = \'wysiwyg\' '; |
|
315 |
$sql .= 'ORDER BY `name`'; |
|
316 |
if( ($result = $database->query($sql)) && ($result->numRows() > 0) ) |
|
317 |
{ |
|
318 |
// $result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'module' AND function = 'wysiwyg' ORDER BY name"); |
|
319 |
// if($result->numRows() > 0) |
Also available in: Unified diff
+ add methode StripCodeFromText in class.wb to clean injection
! rebranding the admin/settings and security fixes
! a few new styling in backend wb_theme
! beginning aa lot of account changes like correction of $_SESSION indexe, security fixes
+ add head.load.min.js and head.min.js to /include/jquery/ to style HTML5 templates