diff --git a/admin/assets/admin.css b/admin/assets/admin.css index 5bd6ad9..bde8e33 100755 --- a/admin/assets/admin.css +++ b/admin/assets/admin.css @@ -93,7 +93,7 @@ input[type=checkbox] + label i { width: 15px; height: 15px; margin: 0 10px 0 0; - vertical-align: middle; + vertical-align: bottom; transition: 0.2s ease; -webkit-transition: 0.2s ease; border-radius: 2px; @@ -626,7 +626,7 @@ header { right: 0; height: 35px; color: #727272; - z-index: 10; + z-index: 2; font-size: 30px; overflow: hidden; } @@ -736,7 +736,7 @@ nav { position: fixed; top: 0; bottom: 0; - z-index: 1; + z-index: 2; /*overflow-x: hidden; overflow-y: auto;*/ } @@ -780,7 +780,11 @@ nav ul li:hover a { color: #4CAF50; } -nav ul li a.now, nav ul li a.now:hover, nav ul li.active a, nav ul li.active a:hover, nav ul li.active ul li a.now { +nav ul li a.now, +nav ul li a.now:hover, +nav ul li.active a, +nav ul li.active a:hover, +nav ul li.active ul li.active a{ background: #4CAF50; color: #e8e8e8 !important; } @@ -806,6 +810,11 @@ nav ul li ul { color: #e8e8e8; } +nav.no-transition ul li ul, nav.no-transition ul li a{ + transition: 0s ease; + -webkit-transition: 0s ease; +} + nav ul li:hover ul li a { color: #e8e8e8; } @@ -907,6 +916,17 @@ input[type=checkbox]#show-menu:checked ~ .mobile-overlay { opacity: 1; } +.copy{ + width: calc(100% - 25px); + display: block; + padding: 13px 0 13px 25px; + color: #e8e8e8; + font-weight: 600; + position: absolute; + bottom: 0; + font-size: 14px; +} + /*main*/ .main { width: 1156px; @@ -1376,6 +1396,51 @@ img.zoomedin { cursor: default; } +/*toploading*/ +@-webkit-keyframes toploading-stripes{ + from{ + background-position:0 0 + } + to{ + background-position:40px 0 + } +} +@keyframes toploading-stripes{ + from{ + background-position:0 0 + } + to{ + background-position:40px 0 + } +} + +.toploading { + height: 0; + -webkit-animation:toploading-stripes 550ms linear infinite; + animation:toploading-stripes 350ms linear infinite; + background-image: -webkit-linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent); + background-image: linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent); + background-size: 40px 40px; + background-color: #4CAF50; + position: fixed; + top: 0; + left: 0; + right: 0; + z-index: 99; +} + +.loader-overlay{ + opacity: 0.6; + background: #fff; + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + z-index: 1; + display: none; +} + /*installer*/ .install-container{ width: 600px; diff --git a/admin/assets/js/jquery.form.min.js b/admin/assets/js/jquery.form.min.js new file mode 100644 index 0000000..7321a3b --- /dev/null +++ b/admin/assets/js/jquery.form.min.js @@ -0,0 +1,11 @@ +/*! + * jQuery Form Plugin + * version: 3.51.0-2014.06.20 + * Requires jQuery v1.5 or later + * Copyright (c) 2014 M. Alsup + * Examples and documentation at: http://malsup.com/jquery/form/ + * Project repository: https://github.com/malsup/form + * Dual licensed under the MIT and GPL licenses. + * https://github.com/malsup/form#copyright-and-license + */ +!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):e("undefined"!=typeof jQuery?jQuery:window.Zepto)}(function(e){"use strict";function t(t){var r=t.data;t.isDefaultPrevented()||(t.preventDefault(),e(t.target).ajaxSubmit(r))}function r(t){var r=t.target,a=e(r);if(!a.is("[type=submit],[type=image]")){var n=a.closest("[type=submit]");if(0===n.length)return;r=n[0]}var i=this;if(i.clk=r,"image"==r.type)if(void 0!==t.offsetX)i.clk_x=t.offsetX,i.clk_y=t.offsetY;else if("function"==typeof e.fn.offset){var o=a.offset();i.clk_x=t.pageX-o.left,i.clk_y=t.pageY-o.top}else i.clk_x=t.pageX-r.offsetLeft,i.clk_y=t.pageY-r.offsetTop;setTimeout(function(){i.clk=i.clk_x=i.clk_y=null},100)}function a(){if(e.fn.ajaxSubmit.debug){var t="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(t):window.opera&&window.opera.postError&&window.opera.postError(t)}}var n={};n.fileapi=void 0!==e("").get(0).files,n.formdata=void 0!==window.FormData;var i=!!e.fn.prop;e.fn.attr2=function(){if(!i)return this.attr.apply(this,arguments);var e=this.prop.apply(this,arguments);return e&&e.jquery||"string"==typeof e?e:this.attr.apply(this,arguments)},e.fn.ajaxSubmit=function(t){function r(r){var a,n,i=e.param(r,t.traditional).split("&"),o=i.length,s=[];for(a=0;o>a;a++)i[a]=i[a].replace(/\+/g," "),n=i[a].split("="),s.push([decodeURIComponent(n[0]),decodeURIComponent(n[1])]);return s}function o(a){for(var n=new FormData,i=0;i').val(m.extraData[d].value).appendTo(w)[0]:e('').val(m.extraData[d]).appendTo(w)[0]);m.iframeTarget||v.appendTo("body"),g.attachEvent?g.attachEvent("onload",s):g.addEventListener("load",s,!1),setTimeout(t,15);try{w.submit()}catch(h){var x=document.createElement("form").submit;x.apply(w)}}finally{w.setAttribute("action",i),w.setAttribute("enctype",c),r?w.setAttribute("target",r):f.removeAttr("target"),e(l).remove()}}function s(t){if(!x.aborted&&!F){if(M=n(g),M||(a("cannot access response document"),t=k),t===D&&x)return x.abort("timeout"),void S.reject(x,"timeout");if(t==k&&x)return x.abort("server abort"),void S.reject(x,"error","server abort");if(M&&M.location.href!=m.iframeSrc||T){g.detachEvent?g.detachEvent("onload",s):g.removeEventListener("load",s,!1);var r,i="success";try{if(T)throw"timeout";var o="xml"==m.dataType||M.XMLDocument||e.isXMLDoc(M);if(a("isXml="+o),!o&&window.opera&&(null===M.body||!M.body.innerHTML)&&--O)return a("requeing onLoad callback, DOM not available"),void setTimeout(s,250);var u=M.body?M.body:M.documentElement;x.responseText=u?u.innerHTML:null,x.responseXML=M.XMLDocument?M.XMLDocument:M,o&&(m.dataType="xml"),x.getResponseHeader=function(e){var t={"content-type":m.dataType};return t[e.toLowerCase()]},u&&(x.status=Number(u.getAttribute("status"))||x.status,x.statusText=u.getAttribute("statusText")||x.statusText);var c=(m.dataType||"").toLowerCase(),l=/(json|script|text)/.test(c);if(l||m.textarea){var f=M.getElementsByTagName("textarea")[0];if(f)x.responseText=f.value,x.status=Number(f.getAttribute("status"))||x.status,x.statusText=f.getAttribute("statusText")||x.statusText;else if(l){var p=M.getElementsByTagName("pre")[0],h=M.getElementsByTagName("body")[0];p?x.responseText=p.textContent?p.textContent:p.innerText:h&&(x.responseText=h.textContent?h.textContent:h.innerText)}}else"xml"==c&&!x.responseXML&&x.responseText&&(x.responseXML=X(x.responseText));try{E=_(x,c,m)}catch(y){i="parsererror",x.error=r=y||i}}catch(y){a("error caught: ",y),i="error",x.error=r=y||i}x.aborted&&(a("upload aborted"),i=null),x.status&&(i=x.status>=200&&x.status<300||304===x.status?"success":"error"),"success"===i?(m.success&&m.success.call(m.context,E,"success",x),S.resolve(x.responseText,"success",x),d&&e.event.trigger("ajaxSuccess",[x,m])):i&&(void 0===r&&(r=x.statusText),m.error&&m.error.call(m.context,x,i,r),S.reject(x,"error",r),d&&e.event.trigger("ajaxError",[x,m,r])),d&&e.event.trigger("ajaxComplete",[x,m]),d&&!--e.active&&e.event.trigger("ajaxStop"),m.complete&&m.complete.call(m.context,x,i),F=!0,m.timeout&&clearTimeout(j),setTimeout(function(){m.iframeTarget?v.attr("src",m.iframeSrc):v.remove(),x.responseXML=null},100)}}}var c,l,m,d,p,v,g,x,y,b,T,j,w=f[0],S=e.Deferred();if(S.abort=function(e){x.abort(e)},r)for(l=0;l'),v.css({position:"absolute",top:"-1000px",left:"-1000px"})),g=v[0],x={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(t){var r="timeout"===t?"timeout":"aborted";a("aborting upload... "+r),this.aborted=1;try{g.contentWindow.document.execCommand&&g.contentWindow.document.execCommand("Stop")}catch(n){}v.attr("src",m.iframeSrc),x.error=r,m.error&&m.error.call(m.context,x,r,t),d&&e.event.trigger("ajaxError",[x,m,r]),m.complete&&m.complete.call(m.context,x,r)}},d=m.global,d&&0===e.active++&&e.event.trigger("ajaxStart"),d&&e.event.trigger("ajaxSend",[x,m]),m.beforeSend&&m.beforeSend.call(m.context,x,m)===!1)return m.global&&e.active--,S.reject(),S;if(x.aborted)return S.reject(),S;y=w.clk,y&&(b=y.name,b&&!y.disabled&&(m.extraData=m.extraData||{},m.extraData[b]=y.value,"image"==y.type&&(m.extraData[b+".x"]=w.clk_x,m.extraData[b+".y"]=w.clk_y)));var D=1,k=2,A=e("meta[name=csrf-token]").attr("content"),L=e("meta[name=csrf-param]").attr("content");L&&A&&(m.extraData=m.extraData||{},m.extraData[L]=A),m.forceSync?o():setTimeout(o,10);var E,M,F,O=50,X=e.parseXML||function(e,t){return window.ActiveXObject?(t=new ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!=t.documentElement.nodeName?t:null},C=e.parseJSON||function(e){return window.eval("("+e+")")},_=function(t,r,a){var n=t.getResponseHeader("content-type")||"",i="xml"===r||!r&&n.indexOf("xml")>=0,o=i?t.responseXML:t.responseText;return i&&"parsererror"===o.documentElement.nodeName&&e.error&&e.error("parsererror"),a&&a.dataFilter&&(o=a.dataFilter(o,r)),"string"==typeof o&&("json"===r||!r&&n.indexOf("json")>=0?o=C(o):("script"===r||!r&&n.indexOf("javascript")>=0)&&e.globalEval(o)),o};return S}if(!this.length)return a("ajaxSubmit: skipping submit process - no element selected"),this;var u,c,l,f=this;"function"==typeof t?t={success:t}:void 0===t&&(t={}),u=t.type||this.attr2("method"),c=t.url||this.attr2("action"),l="string"==typeof c?e.trim(c):"",l=l||window.location.href||"",l&&(l=(l.match(/^([^#]+)/)||[])[1]),t=e.extend(!0,{url:l,success:e.ajaxSettings.success,type:u||e.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},t);var m={};if(this.trigger("form-pre-serialize",[this,t,m]),m.veto)return a("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(t.beforeSerialize&&t.beforeSerialize(this,t)===!1)return a("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var d=t.traditional;void 0===d&&(d=e.ajaxSettings.traditional);var p,h=[],v=this.formToArray(t.semantic,h);if(t.data&&(t.extraData=t.data,p=e.param(t.data,d)),t.beforeSubmit&&t.beforeSubmit(v,this,t)===!1)return a("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[v,this,t,m]),m.veto)return a("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var g=e.param(v,d);p&&(g=g?g+"&"+p:p),"GET"==t.type.toUpperCase()?(t.url+=(t.url.indexOf("?")>=0?"&":"?")+g,t.data=null):t.data=g;var x=[];if(t.resetForm&&x.push(function(){f.resetForm()}),t.clearForm&&x.push(function(){f.clearForm(t.includeHidden)}),!t.dataType&&t.target){var y=t.success||function(){};x.push(function(r){var a=t.replaceTarget?"replaceWith":"html";e(t.target)[a](r).each(y,arguments)})}else t.success&&x.push(t.success);if(t.success=function(e,r,a){for(var n=t.context||this,i=0,o=x.length;o>i;i++)x[i].apply(n,[e,r,a||f,f])},t.error){var b=t.error;t.error=function(e,r,a){var n=t.context||this;b.apply(n,[e,r,a,f])}}if(t.complete){var T=t.complete;t.complete=function(e,r){var a=t.context||this;T.apply(a,[e,r,f])}}var j=e("input[type=file]:enabled",this).filter(function(){return""!==e(this).val()}),w=j.length>0,S="multipart/form-data",D=f.attr("enctype")==S||f.attr("encoding")==S,k=n.fileapi&&n.formdata;a("fileAPI :"+k);var A,L=(w||D)&&!k;t.iframe!==!1&&(t.iframe||L)?t.closeKeepAlive?e.get(t.closeKeepAlive,function(){A=s(v)}):A=s(v):A=(w||D)&&k?o(v):e.ajax(t),f.removeData("jqxhr").data("jqxhr",A);for(var E=0;Ec;c++)if(d=u[c],f=d.name,f&&!d.disabled)if(t&&o.clk&&"image"==d.type)o.clk==d&&(a.push({name:f,value:e(d).val(),type:d.type}),a.push({name:f+".x",value:o.clk_x},{name:f+".y",value:o.clk_y}));else if(m=e.fieldValue(d,!0),m&&m.constructor==Array)for(r&&r.push(d),l=0,h=m.length;h>l;l++)a.push({name:f,value:m[l]});else if(n.fileapi&&"file"==d.type){r&&r.push(d);var v=d.files;if(v.length)for(l=0;li;i++)r.push({name:a,value:n[i]});else null!==n&&"undefined"!=typeof n&&r.push({name:this.name,value:n})}}),e.param(r)},e.fn.fieldValue=function(t){for(var r=[],a=0,n=this.length;n>a;a++){var i=this[a],o=e.fieldValue(i,t);null===o||"undefined"==typeof o||o.constructor==Array&&!o.length||(o.constructor==Array?e.merge(r,o):r.push(o))}return r},e.fieldValue=function(t,r){var a=t.name,n=t.type,i=t.tagName.toLowerCase();if(void 0===r&&(r=!0),r&&(!a||t.disabled||"reset"==n||"button"==n||("checkbox"==n||"radio"==n)&&!t.checked||("submit"==n||"image"==n)&&t.form&&t.form.clk!=t||"select"==i&&-1==t.selectedIndex))return null;if("select"==i){var o=t.selectedIndex;if(0>o)return null;for(var s=[],u=t.options,c="select-one"==n,l=c?o+1:u.length,f=c?o:0;l>f;f++){var m=u[f];if(m.selected){var d=m.value;if(d||(d=m.attributes&&m.attributes.value&&!m.attributes.value.specified?m.text:m.value),c)return d;s.push(d)}}return s}return e(t).val()},e.fn.clearForm=function(t){return this.each(function(){e("input,select,textarea",this).clearFields(t)})},e.fn.clearFields=e.fn.clearInputs=function(t){var r=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var a=this.type,n=this.tagName.toLowerCase();r.test(a)||"textarea"==n?this.value="":"checkbox"==a||"radio"==a?this.checked=!1:"select"==n?this.selectedIndex=-1:"file"==a?/MSIE/.test(navigator.userAgent)?e(this).replaceWith(e(this).clone(!0)):e(this).val(""):t&&(t===!0&&/hidden/.test(a)||"string"==typeof t&&e(this).is(t))&&(this.value="")})},e.fn.resetForm=function(){return this.each(function(){("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset()})},e.fn.enable=function(e){return void 0===e&&(e=!0),this.each(function(){this.disabled=!e})},e.fn.selected=function(t){return void 0===t&&(t=!0),this.each(function(){var r=this.type;if("checkbox"==r||"radio"==r)this.checked=t;else if("option"==this.tagName.toLowerCase()){var a=e(this).parent("select");t&&a[0]&&"select-one"==a[0].type&&a.find("option").selected(!1),this.selected=t}})},e.fn.ajaxSubmit.debug=!1}); \ No newline at end of file diff --git a/admin/assets/js/page.js b/admin/assets/js/page.js new file mode 100644 index 0000000..ac8db8d --- /dev/null +++ b/admin/assets/js/page.js @@ -0,0 +1 @@ +!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;"undefined"!=typeof window?b=window:"undefined"!=typeof global?b=global:"undefined"!=typeof self&&(b=self),b.page=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g-1)&&!b.target&&u(b.href)){var e=b.pathname+b.search+(b.hash||"");"undefined"!=typeof c&&e.match(/^\/[a-zA-Z]:\//)&&(e=e.replace(/^\/[a-zA-Z]:\//,"/"));var g=e;0===e.indexOf(i)&&(e=e.substr(i.length)),k&&(e=e.replace("#!","")),i&&g===e||(a.preventDefault(),m.show(g))}}}}function t(a){return a=a||window.event,null===a.which?a.button:a.which}function u(a){var b=f.protocol+"//"+f.hostname;return f.port&&(b+=":"+f.port),a&&0===a.indexOf(b)}var d=a("path-to-regexp");b.exports=m;var j,l,e="undefined"!=typeof document&&document.ontouchstart?"touchstart":"click",f="undefined"!=typeof window&&(window.history.location||window.location),g=!0,h=!0,i="",k=!1;m.callbacks=[],m.exits=[],m.current="",m.len=0,m.base=function(a){return 0===arguments.length?i:void(i=a)},m.start=function(a){if(a=a||{},!j&&(j=!0,!1===a.dispatch&&(g=!1),!1===a.decodeURLComponents&&(h=!1),!1!==a.popstate&&window.addEventListener("popstate",r,!1),!1!==a.click&&document.addEventListener(e,s,!1),!0===a.hashbang&&(k=!0),g)){var b=k&&~f.hash.indexOf("#!")?f.hash.substr(2)+f.search:f.pathname+f.search+f.hash;m.replace(b,null,!0,g)}},m.stop=function(){j&&(m.current="",m.len=0,j=!1,document.removeEventListener(e,s,!1),window.removeEventListener("popstate",r,!1))},m.show=function(a,b,c,d){var e=new p(a,b);return m.current=e.path,!1!==c&&m.dispatch(e),!1!==e.handled&&!1!==d&&e.pushState(),e},m.back=function(a,b){m.len>0?(history.back(),m.len--):a?setTimeout(function(){m.show(a,b)}):setTimeout(function(){m.show(i,b)})},m.redirect=function(a,b){"string"==typeof a&&"string"==typeof b&&m(a,function(a){setTimeout(function(){m.replace(b)},0)}),"string"==typeof a&&"undefined"==typeof b&&setTimeout(function(){m.replace(a)},0)},m.replace=function(a,b,c,d){var e=new p(a,b);return m.current=e.path,e.init=c,e.save(),!1!==d&&m.dispatch(e),e},m.dispatch=function(a){function e(){var a=m.exits[d++];return a?void a(b,e):f()}function f(){var b=m.callbacks[c++];return a.path!==m.current?void(a.handled=!1):b?void b(a,f):n(a)}var b=l,c=0,d=0;l=a,b?e():f()},m.exit=function(a,b){if("function"==typeof a)return m.exit("*",a);for(var c=new q(a),d=1;d0)){var c=d.shift();c()}},!0),function(b){d.push(b),window.postMessage("process-tick","*")}):function(b){setTimeout(b,0)}}(),d.title="browser",d.browser=!0,d.env={},d.argv=[],d.on=e,d.addListener=e,d.once=e,d.off=e,d.removeListener=e,d.removeAllListeners=e,d.emit=e,d.binding=function(a){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(a){throw new Error("process.chdir is not supported")}},{}],3:[function(a,b,c){function f(a){for(var g,b=[],c=0,d=0,f="";null!=(g=e.exec(a));){var h=g[0],i=g[1],k=g.index;if(f+=a.slice(d,k),d=k+h.length,i)f+=i[1];else{f&&(b.push(f),f="");var l=g[2],m=g[3],n=g[4],o=g[5],p=g[6],q=g[7],r="+"===p||"*"===p,s="?"===p||"*"===p,t=l||"/",u=n||o||(q?".*":"[^"+t+"]+?");b.push({name:m||c++,prefix:l||"",delimiter:t,optional:s,repeat:r,pattern:j(u)})}}return d

get('general_database');?>

- get('general_create_backup');?> + get('general_create_backup');?> - + '; diff --git a/admin/index.php b/admin/index.php index 4b05191..cc41b05 100755 --- a/admin/index.php +++ b/admin/index.php @@ -7,7 +7,7 @@ if (file_exists('install.php')) { if (unlink('install.php')) { - echo $lang->get('delete_config_success'); + echo msg('info', $lang->get('delete_config_success')); } } @@ -21,12 +21,12 @@ if (hasPerm('view_dashboard')) ?>
get('general_config');?>
-
get('logfiles');?>
+
get('logfiles');?>

setLangFolder('lang/'); - ?> - Installation - - + Installation + + @@ -47,63 +45,54 @@ if(isset($_POST['submit'])) $_POST['admin_pw2'] !=='' ) { - $CONFIG = []; + $CONFIG = []; $CONFIG['General']['web_uri'] = $_POST['general_webUrl']; $CONFIG['General']['home_uri'] = $_POST['general_home_url']; $CONFIG['General']['phpmyadmin'] = $_POST['general_pma']; $CONFIG['General']['title'] = 'inc/System/page_title.txt'; $CONFIG['General']['tinymce_css'] = $_POST['general_editor_css']; - $CONFIG['Database']['db_type'] = 'mysql'; $CONFIG['Database']['db_host'] = $_POST['db_host']; $CONFIG['Database']['db_name'] = $_POST['db_name']; $CONFIG['Database']['db_usr'] = $_POST['db_user']; $CONFIG['Database']['db_pw'] = $_POST['db_pw1']; $CONFIG['Database']['db_prefix'] = $_POST['db_prefix']; - $CONFIG['Templating']['template'] = $_POST['general_template']; $CONFIG['Templating']['tpl_title'] = 'title'; $CONFIG['Templating']['tpl_content'] = 'content'; $CONFIG['Templating']['tpl_webUri'] = 'website_uri'; - $CONFIG['Versioning']['version'] = '0.6 Beta'; $CONFIG['Versioning']['version_num'] = 1; $CONFIG['Versioning']['update_uri'] = 'http://cdn.kola-entertainments.de/cms/'; - - //Test Passwords - if($_POST['db_pw1']!==$_POST['db_pw2']) - { - echo msg('fail', 'Mysqlpasswords don\'t match.'); - exit; - } - if($_POST['admin_pw1']!==$_POST['admin_pw2']) - { - echo msg('fail', 'Adminpasswords don\'t match'); + //Test Passwords + if($_POST['db_pw1']!==$_POST['db_pw2']) + { + echo msg('fail', 'Mysqlpasswords don\'t match.'); exit; - } - - //Database - $db = new db($_POST['db_host'], $_POST['db_name'], $_POST['db_user'], $_POST['db_pw1'], $_POST['db_prefix']); - - //Create Tables + } + if($_POST['admin_pw1']!==$_POST['admin_pw2']) + { + echo msg('fail', 'Adminpasswords don\'t match'); + exit; + } + + //Database + $db = new db($_POST['db_host'], $_POST['db_name'], $_POST['db_user'], $_POST['db_pw1'], $_POST['db_prefix']); + + //Create Tables if($db->query('SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; - - CREATE TABLE `'.$_POST['db_prefix'].'meta_meta` ( `name` text NOT NULL, `content` text NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; - CREATE TABLE `'.$_POST['db_prefix'].'sidebar_sidebar` ( `active` tinyint(1) NOT NULL, `content` text NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; - INSERT INTO `'.$_POST['db_prefix'].'sidebar_sidebar` (`active`, `content`) VALUES (0, \'\'); - CREATE TABLE `'.$_POST['db_prefix'].'simplePages_pages` ( `id` int(11) NOT NULL, `title` text CHARACTER SET utf8 NOT NULL, @@ -116,7 +105,6 @@ CREATE TABLE `'.$_POST['db_prefix'].'simplePages_pages` ( `created` int(11) NOT NULL, `lastedit` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; - CREATE TABLE `'.$_POST['db_prefix'].'simplePages_pages_confirm` ( `id` int(11) NOT NULL, `page_id` int(11) NOT NULL, @@ -130,14 +118,12 @@ CREATE TABLE `'.$_POST['db_prefix'].'simplePages_pages_confirm` ( `created` int(11) NOT NULL, `lastedit` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; - CREATE TABLE `'.$_POST['db_prefix'].'simplePages_permissions` ( `id` int(11) NOT NULL, `page` int(11) NOT NULL, `user` int(11) NOT NULL, `lastedit` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - CREATE TABLE `'.$_POST['db_prefix'].'system_admins` ( `id` int(11) NOT NULL, `username` text NOT NULL, @@ -146,7 +132,6 @@ CREATE TABLE `'.$_POST['db_prefix'].'system_admins` ( `mail` text NOT NULL, `secret` text NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; - CREATE TABLE `'.$_POST['db_prefix'].'system_loggedin` ( `id` int(11) NOT NULL, `user` int(11) NOT NULL, @@ -155,46 +140,35 @@ CREATE TABLE `'.$_POST['db_prefix'].'system_loggedin` ( `time` int(11) NOT NULL, `token` text NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; - CREATE TABLE `'.$_POST['db_prefix'].'system_roles` ( `id` int(11) NOT NULL, `name` text COLLATE utf8_unicode_ci NOT NULL, `permissions` longtext COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - ALTER TABLE `'.$_POST['db_prefix'].'simplePages_pages` ADD PRIMARY KEY (`id`); - ALTER TABLE `'.$_POST['db_prefix'].'simplePages_pages_confirm` ADD PRIMARY KEY (`id`); - ALTER TABLE `'.$_POST['db_prefix'].'simplePages_permissions` ADD PRIMARY KEY (`id`); - ALTER TABLE `'.$_POST['db_prefix'].'system_admins` ADD PRIMARY KEY (`id`); - ALTER TABLE `'.$_POST['db_prefix'].'system_loggedin` ADD PRIMARY KEY (`id`); ALTER TABLE `'.$_POST['db_prefix'].'system_roles` ADD PRIMARY KEY (`id`); - ALTER TABLE `'.$_POST['db_prefix'].'simplePages_pages` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1; - ALTER TABLE `'.$_POST['db_prefix'].'simplePages_pages_confirm` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; - ALTER TABLE `'.$_POST['db_prefix'].'simplePages_permissions` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1; ALTER TABLE `'.$_POST['db_prefix'].'system_admins` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1; - ALTER TABLE `'.$_POST['db_prefix'].'system_loggedin` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1; - ALTER TABLE `'.$_POST['db_prefix'].'system_roles` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1; ')) @@ -206,7 +180,6 @@ ALTER TABLE `'.$_POST['db_prefix'].'system_roles` echo msg('fail', 'Failed Creating Tables'); exit; } - //Admin group $db->setCol('system_roles'); $db->data['name'] = 'Admins'; @@ -219,7 +192,6 @@ ALTER TABLE `'.$_POST['db_prefix'].'system_roles` echo msg('fail', 'Error creating admin group.'); exit; } - //Admin User $db->setCol('system_admins'); $db->data['username'] = $_POST['admin_name']; @@ -235,21 +207,19 @@ ALTER TABLE `'.$_POST['db_prefix'].'system_roles` echo msg('fail', 'Error creating admin user.'); exit; } - - //Page title - if(file_put_contents('../inc/System/page_title.txt', $_POST['general_page_title'])) - { - echo msg('succes', 'Page Title was successfully set.
'); - } - else - { - echo msg('fail', 'Error setting page title.'); - exit; - } - - //htacces - $htacces = 'ErrorDocument 404 '.$_POST['general_home_url'].'index.php + //Page title + if(file_put_contents('../inc/System/page_title.txt', $_POST['general_page_title'])) + { + echo msg('succes', 'Page Title was successfully set.
'); + } + else + { + echo msg('fail', 'Error setting page title.'); + exit; + } + //htacces + $htacces = 'ErrorDocument 404 '.$_POST['general_home_url'].'index.php SetEnv gp_rewrite U9sL2S2 @@ -266,16 +236,15 @@ RewriteRule /?(.*) "'.$_POST['general_home_url'].'index.php?$1" [qsa,L] RewriteRule . "'.$_POST['general_home_url'].'index.php" [L] '; - if(file_put_contents('../.htaccess', $htacces)) - { - echo msg('succes', '.htaccess was successfully set.
'); - } - else - { - echo msg('fail', 'Error setting up .htaccess.
'); - exit; - } - + if(file_put_contents('../.htaccess', $htacces)) + { + echo msg('succes', '.htaccess was successfully set.
'); + } + else + { + echo msg('fail', 'Error setting up .htaccess.
'); + exit; + } //Apps $modulurl = '../apps/'; if ($handle = opendir($modulurl)) @@ -293,7 +262,6 @@ RewriteRule . "'.$_POST['general_home_url'].'index.php" [L] } closedir($handle); } - //Write Config $configfile = Yaml::dump($CONFIG); if(file_put_contents('../inc/config.yml', $configfile)) @@ -305,77 +273,76 @@ RewriteRule . "'.$_POST['general_home_url'].'index.php" [L] echo msg('fail', 'Error creating configfile.'); exit; } - echo msg('info', 'Installation successfully completed. Login'); - } - else - { - echo msg('info', 'Please fill in all fields!'); - } + } + else + { + echo msg('info', 'Please fill in all fields!'); + } } else { -?> - -
-
-

Language

- Select your language: -

-

Mysql

- Host
- Database
- Username
- Password
- Confirm Password
- Table prefix

- -

Website

- Website Url
- Home Url
- Phpmyadmin Url
- Page Title
- Editor CSS
- Template
- -

First Adminuser

- Name
- Email-Adress
- Password
- Confirm Password
- + +

Language

+ Select your language: +

-
+ ?> +

-
-Mysql + Host
+ Database
+ Username
+ Password
+ Confirm Password
+ Table prefix

+ +

Website

+ Website Url
+ Home Url
+ Phpmyadmin Url
+ Page Title
+ Editor CSS
+ Template
+ +

First Adminuser

+ Name
+ Email-Adress
+ Password
+ Confirm Password
+ +

+ + + + diff --git a/admin/lang/lang.de.php b/admin/lang/lang.de.php index f006afa..8d4a132 100755 --- a/admin/lang/lang.de.php +++ b/admin/lang/lang.de.php @@ -20,6 +20,7 @@ $lang['all_fields'] = 'Bitte alle Felder ausfüllen.'; $lang['error_2fa'] = 'Fehler bei der Anmeldung in zwei Schritten.'; $lang['wrong_username_or_pass'] = 'Benutzername oder Passwort falsch.'; $lang['wrong_pass'] = 'Falsches Passwort'; +$lang['404_not_found'] = 'Die Seite wurde nicht gefunden.'; //Dashboard $lang['delete_config_success'] = 'Die installationsdatei wurde erfolgreich gelöscht.'; diff --git a/admin/lang/lang.en.php b/admin/lang/lang.en.php index 108dc09..6df8383 100755 --- a/admin/lang/lang.en.php +++ b/admin/lang/lang.en.php @@ -20,6 +20,7 @@ $lang['all_fields'] = 'Please fill in all fields'; $lang['error_2fa'] = 'Error with 2-Step Verification authentication'; $lang['wrong_username_or_pass'] = 'Wrong username or password.'; $lang['wrong_pass'] = 'Wrong password'; +$lang['404_not_found'] = 'The page you requested was not found.'; //Dashboard $lang['delete_config_success'] = 'The Install-file was deleted successfully'; diff --git a/apps/Files/index.php b/apps/Files/index.php index 145f333..38c52e1 100755 --- a/apps/Files/index.php +++ b/apps/Files/index.php @@ -405,7 +405,7 @@ if (isset($_SESSION['user'])) $('#content').html('
'); $('#text').load(url); } - $('#content').append('

get('files_url'); ?>:

get('files_download'); ?> get('files_delete'); ?>

'); + $('#content').append('

get('files_url'); ?>:

get('files_download'); ?> get('files_delete'); ?>

'); //uuund einbelnden $(".overlay").fadeIn(250); diff --git a/apps/sidebar/genConf.php b/apps/sidebar/genConf.php index 98cdb96..ed3efaf 100755 --- a/apps/sidebar/genConf.php +++ b/apps/sidebar/genConf.php @@ -4,7 +4,7 @@ if (isset($_POST['sidebarconf'])) $sidebar_inhalt = 'text'; $text = $_POST['sidebar_inhalt']; $active = false; - if($_POST['aktiv'] == 'true') + if(isset($_POST['active']) && $_POST['active'] == 'true') { $active = true; } @@ -13,7 +13,7 @@ if (isset($_POST['sidebarconf'])) $db->data = ['active' => $active, 'content' => $text]; if ($db->update()) { - echo msg('succes', 'Die Änderungen der Sidebar wurden erfolgreich gespeichert.'); + echo msg('success', 'Die Änderungen der Sidebar wurden erfolgreich gespeichert.'); } else { @@ -30,11 +30,9 @@ else $active = ''; if(!$db->data[0]['active']) $active = ' selected'; ?> -

Sidebar anzeigen: - +

+ +

@@ -44,14 +42,15 @@ else
+ - - \ No newline at end of file + function closeMsg() { + $('#showMsg').html(''); + } + + //Show Loader + function showTopLoader() { + $('.loader-overlay').fadeIn(150); + $('.toploading').animate({height: "8px"}, 150); + } + + function hideTopLoader() { + $('.loader-overlay').fadeOut(150); + $('.toploading').animate({height: "0"}, 150); + } + + $(document).ready(function() { + //Form + // pre-submit callback + function showLoader(formData, jqForm, options) { + showTopLoader(); + console.log('Form'); + return true; + } + + // post-submit callback + function showResponse(responseText, statusText, xhr, $form) { + //return false; + hideTopLoader(); + console.log(statusText); + } + + //Error + function showError(e) { + console.log(e); + } + + var options = { + target: '#loader', + beforeSubmit: showLoader, + success: showResponse, + error: showError, + resetForm: false, + data: {direct: ''} + }; + $('form').ajaxForm(options); + + //Router + $('#topnav').addClass('no-transition'); + + page.base(''); + page('*', findPage); + page(); + + function findPage(ctx, next) { + //console.log(ctx); + if(!ctx.init) { + //if('' + ctx.canonicalPath != window.location.href) { + + showTopLoader(); + //Load Title + var title = ''; + var query = ''; + if (ctx.querystring != '') { + query += '&' + ctx.querystring; + } + $.get(ctx.pathname + '?title' + query, function (data) { + title = data; + }).fail(function (e) { + if(e.status == 404){ + showMsg('get('404_not_found');?> (' + e.statusText + ')'); + } else { + showMsg('Error.'); + } + }); + + //Load Content + $.get(ctx.pathname + '?direct' + query, function (data) { + hideTopLoader(); + if (data == 'Login First.') { + location.reload(); + } else { + $("#loader").html(data); + + //Set Title + $("#title").html(title); + document.title = title + ' | get('admin_title') . ' | ' . $MCONF['title']?>'; + + //Update Menu + $('li').each(function (index) { + $(this).removeClass('active'); + }); + + //Find Class & Parent for menu + var menuitem = 'mw-menu-' + ctx.path.replace(/\//g, '-').replace('.php', '').replace('?', '').replace('&', '').replace('=', ''); + //console.log(menuitem); + $('#' + menuitem).addClass('active'); + + //Find Top item + var topitems = menuitem.split('-'); + //console.log(topitems); + $('#' + 'mw-menu-' + topitems[2] + '-' + topitems[3] + '-top').addClass('active'); + if (topitems[3] == 'roles' || topitems[3] == 'users' || topitems[3] == 'permissions' || topitems[3] == 'new_user') { + $('#' + 'mw-menu-admin-users-top').addClass('active'); + } + } + }).fail(function (e) { + if(e.status == 404){ + showMsg('get('404_not_found');?> (' + e.statusText + ')'); + } else { + showMsg('Error.'); + } + }); + // } + } + } + }); + + + + Zurück', $msg); if ($typ == 'succes' || $typ == 'success') { if (!isset($msg)) $msg = 'Die Operation wurde erfolgreich durchgeführt.'; + $out['type'] = 'success'; + $out['msg'] = $msg; + return '
' . $msg . '
'; - } elseif ($typ == 'fail') + } + elseif ($typ == 'fail') { if (!isset($msg)) $msg = 'Fehler. ' . $GLOBALS['texte'][2]; + + $out['type'] = 'fail'; + $out['msg'] = $msg; return '
' . $msg . '
'; - } else + } + else { + $out['type'] = 'info'; + $out['msg'] = $msg; return '
' . $msg . '
'; } -} -//datum rückwärts -function datum_ruck($timestamp) -{ - $diff = time() - $timestamp; - if ($diff < 30) + if(isset($_GET['json'])) { - return 'vor kurzem'; - } - if ($diff < 60) - { - return 'vor weniger als einer Minute'; - } - if ($diff < 3600) - { - return 'vor ' . round(($diff / 60)) . ' Minuten'; - } - if ($diff < 86400) - { - return 'vor ' . round((($diff / 60) / 60)) . ' Stunden'; - } - if ($diff < 2592000) - { - return 'vor ' . round(((($diff / 60) / 60) / 24)) . ' Tagen'; - } - if ($diff < 31104000) - { - return 'vor ' . round((((($diff / 60) / 60) / 24) / 12)) . ' Monaten'; - } - if ($diff > 30693600) - { - return 'vor ' . round(($diff / 31536000)) . ' Jahren'; - } + header('Content-Type: application/json'); + return json_encode($out); - return $diff; + } + else + { + return '
' . $out['msg'] . '
'; + } } //nichtleeren ordner löschen @@ -75,121 +61,15 @@ function rrmdir($dir) } } -//Simple Image -class SimpleImage -{ - - var $image; - var $image_type; - - function load($filename) - { - - $image_info = getimagesize($filename); - $this->image_type = $image_info[2]; - if ($this->image_type == IMAGETYPE_JPEG) - { - - $this->image = imagecreatefromjpeg($filename); - } elseif ($this->image_type == IMAGETYPE_GIF) - { - - $this->image = imagecreatefromgif($filename); - } elseif ($this->image_type == IMAGETYPE_PNG) - { - - $this->image = imagecreatefrompng($filename); - } - } - - function save($filename, $image_type = IMAGETYPE_JPEG, $compression = 95, $permissions = null) - { - - if ($image_type == IMAGETYPE_JPEG) - { - imagejpeg($this->image, $filename, $compression); - } elseif ($image_type == IMAGETYPE_GIF) - { - - imagegif($this->image, $filename); - } elseif ($image_type == IMAGETYPE_PNG) - { - - imagepng($this->image, $filename); - } - if ($permissions != null) - { - - chmod($filename, $permissions); - } - } - - function output($image_type = IMAGETYPE_JPEG) - { - - if ($image_type == IMAGETYPE_JPEG) - { - imagejpeg($this->image); - } elseif ($image_type == IMAGETYPE_GIF) - { - - imagegif($this->image); - } elseif ($image_type == IMAGETYPE_PNG) - { - - imagepng($this->image); - } - } - - function getWidth() - { - - return imagesx($this->image); - } - - function getHeight() - { - - return imagesy($this->image); - } - - function resizeToHeight($height) - { - - $ratio = $height / $this->getHeight(); - $width = $this->getWidth() * $ratio; - $this->resize($width, $height); - } - - function resizeToWidth($width) - { - $ratio = $width / $this->getWidth(); - $height = $this->getheight() * $ratio; - $this->resize($width, $height); - } - - function scale($scale) - { - $width = $this->getWidth() * $scale / 100; - $height = $this->getheight() * $scale / 100; - $this->resize($width, $height); - } - - function resize($width, $height) - { - $new_image = imagecreatetruecolor($width, $height); - imagecopyresampled($new_image, $this->image, 0, 0, 0, 0, $width, $height, $this->getWidth(), $this->getHeight()); - $this->image = $new_image; - } -} - //Tinymce function tinymce($css = '../../css/tinymce.css', $edit_area = '#editor') { - echo ' + if(!isset($_GET['json'])) + { + echo ' '; + } } -function random($lange) +function random($size) { $zahlen_und_buchstaben = array('a', 'A', 'b', 'B', 'c', 'C', 'd', 'D', 'e', 'E', 'f', 'F', 'G', 'g', 'h', 'H', 'i', 'I', 'j', 'J', 'k', 'K', 'l', 'L', 'm', 'M', 'n', 'N', 'o', 'O', 'p', 'P', 'q', 'Q', 'r', 'R', 's', 'S', 't', 'T', 'u', 'U', 'v', 'V', 'w', 'W', 'x', 'X', 'y', 'Y', 'z', 'Z', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0'); - for ($i = 0, $random = ''; $i < $lange; $i++) + for ($i = 0, $random = ''; $i < $size; $i++) { $random .= $zahlen_und_buchstaben[array_rand($zahlen_und_buchstaben)]; } @@ -269,7 +150,6 @@ function is_loggedin() { $GLOBALS['db']->setCol('system_loggedin'); $GLOBALS['db']->data['token'] = $_SESSION['token']; - $GLOBALS['db']->data['user'] = $_SESSION['userid']; $GLOBALS['db']->delete(); // last request was more than 30 minutes ago @@ -313,193 +193,229 @@ function printHeader($title) $title = $GLOBALS['lang']->get('login'); } - // - echo ' + if(isset($_REQUEST['direct'])) + { + if(!is_loggedin()) + { + header("Content-Type: text/plain"); + echo 'Login First.'; + exit; + } + } + elseif (isset($_GET['title'])) + { + if(!is_loggedin()) + { + header("Content-Type: text/plain"); + echo 'Login First.'; + exit; + } + else + { + header("Content-Type: text/plain"); + echo $title; + exit; + } + } + else + { + // + echo ' - ' . $title . ' | '.$GLOBALS['lang']->get('admin_title').' | ' . $GLOBALS['MCONF']['title'] . ' + ' . $title . ' | ' . $GLOBALS['lang']->get('admin_title') . ' | ' . $GLOBALS['MCONF']['title'] . ' + '; - if (is_loggedin()) - { - echo '
- ' . $title . ' + if (is_loggedin()) + { + echo '
+ ' . $title . '
-