@@ -2960,7 +2960,7 @@

/* Ensure that the table data is fully initialised */
if ( ! settings.bInitialised ) {
setTimeout( function(){ _fnInitialise( settings ); }, 200 );
setTimeout( function() { _fnInitialise( settings ); }, 200 );
return;
}

@@ -4228,7 +4228,7 @@
/* Do the sort - here we want multi-column sorting based on a given data source (column)
* and sorting function (from oSort) in a certain direction. It's reasonably complex to
* follow on it's own, but this is what we want (example two column sorting):
* fnLocalSorting = function(a,b){
* fnLocalSorting = function(a,b) {
* var iTest;
* iTest = oSort['string-asc']('data11', 'data12');
* if (iTest !== 0)
@@ -4781,7 +4781,7 @@
n.blur(); // Remove focus outline for mouse users
fn(e);
} )
.bind( 'keypress.DT', oData, function (e){
.bind( 'keypress.DT', oData, function (e) {
if ( e.which === 13 ) {
fn(e);
} } )

Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -73,7 +73,7 @@ shadowSize and lineWidth are derived as well from the points series.
}
};

function processRawData(plot, series, data, datapoints){
function processRawData(plot, series, data, datapoints) {
if (!series.points.errorbars)
return;

@@ -104,7 +104,7 @@ shadowSize and lineWidth are derived as well from the points series.
datapoints.format = format;
}

function parseErrors(series, i){
function parseErrors(series, i) {

var points = series.datapoints.points;

@@ -123,7 +123,7 @@ shadowSize and lineWidth are derived as well from the points series.
exl = points[i + 2];
exu = points[i + 3];
if (eb == 'xy')
if (yerr.asymmetric){
if (yerr.asymmetric) {
eyl = points[i + 4];
eyu = points[i + 5];
} else eyl = points[i + 4];
@@ -148,18 +148,18 @@ shadowSize and lineWidth are derived as well from the points series.

var errRanges = [exl, exu, eyl, eyu];
// nullify if not showing
if (!xerr.show){
if (!xerr.show) {
errRanges[0] = null;
errRanges[1] = null;
}
if (!yerr.show){
if (!yerr.show) {
errRanges[2] = null;
errRanges[3] = null;
}
return errRanges;
}

function drawSeriesErrors(plot, ctx, s){
function drawSeriesErrors(plot, ctx, s) {

var points = s.datapoints.points,
ps = s.datapoints.pointsize,
@@ -190,12 +190,12 @@ shadowSize and lineWidth are derived as well from the points series.
var errRanges = parseErrors(s, i);

//cycle xerr & yerr
for (var e = 0; e < err.length; e++){
for (var e = 0; e < err.length; e++) {

var minmax = [ax[e].min, ax[e].max];

//draw this error?
if (errRanges[e * err.length]){
if (errRanges[e * err.length]) {

//data coordinates
var x = points[i],
@@ -272,15 +272,15 @@ shadowSize and lineWidth are derived as well from the points series.
}
}

function drawError(ctx,err,x,y,upper,lower,drawUpper,drawLower,radius,offset,minmax){
function drawError(ctx,err,x,y,upper,lower,drawUpper,drawLower,radius,offset,minmax) {

//shadow offset
y += offset;
upper += offset;
lower += offset;

// error bar - avoid plotting over circles
if (err.err == 'x'){
if (err.err == 'x') {
if (upper > x + radius) drawPath(ctx, [[upper,y],[Math.max(x + radius,minmax[0]),y]]);
else drawUpper = false;
if (lower < x - radius) drawPath(ctx, [[Math.min(x - radius,minmax[1]),y],[lower,y]] );
@@ -299,35 +299,35 @@ shadowSize and lineWidth are derived as well from the points series.

// upper cap
if (drawUpper) {
if (err.upperCap == '-'){
if (err.upperCap == '-') {
if (err.err=='x') drawPath(ctx, [[upper,y - radius],[upper,y + radius]] );
else drawPath(ctx, [[x - radius,upper],[x + radius,upper]] );
} else if ($.isFunction(err.upperCap)){
} else if ($.isFunction(err.upperCap)) {
if (err.err=='x') err.upperCap(ctx, upper, y, radius);
else err.upperCap(ctx, x, upper, radius);
}
}
// lower cap
if (drawLower) {
if (err.lowerCap == '-'){
if (err.lowerCap == '-') {
if (err.err=='x') drawPath(ctx, [[lower,y - radius],[lower,y + radius]] );
else drawPath(ctx, [[x - radius,lower],[x + radius,lower]] );
} else if ($.isFunction(err.lowerCap)){
} else if ($.isFunction(err.lowerCap)) {
if (err.err=='x') err.lowerCap(ctx, lower, y, radius);
else err.lowerCap(ctx, x, lower, radius);
}
}
}

function drawPath(ctx, pts){
function drawPath(ctx, pts) {
ctx.beginPath();
ctx.moveTo(pts[0][0], pts[0][1]);
for (var p=1; p < pts.length; p++)
ctx.lineTo(pts[p][0], pts[p][1]);
ctx.stroke();
}

function draw(plot, ctx){
function draw(plot, ctx) {
var plotOffset = plot.getPlotOffset();

ctx.save();
@@ -29,7 +29,7 @@ Licensed under the MIT license.
* V. 1.1: Fix error handling so e.g. parsing an empty string does
* produce a color rather than just crashing.
*/
(function($){$.color={};$.color.make=function(r,g,b,a){var o={};o.r=r||0;o.g=g||0;o.b=b||0;o.a=a!=null?a:1;o.add=function(c,d){for(var i=0;i<c.length;++i)o[c.charAt(i)]+=d;return o.normalize()};o.scale=function(c,f){for(var i=0;i<c.length;++i)o[c.charAt(i)]*=f;return o.normalize()};o.toString=function(){if(o.a>=1){return"rgb("+[o.r,o.g,o.b].join(",")+")"}else{return"rgba("+[o.r,o.g,o.b,o.a].join(",")+")"}};o.normalize=function(){function clamp(min,value,max){return value<min?min:value>max?max:value}o.r=clamp(0,parseInt(o.r),255);o.g=clamp(0,parseInt(o.g),255);o.b=clamp(0,parseInt(o.b),255);o.a=clamp(0,o.a,1);return o};o.clone=function(){return $.color.make(o.r,o.b,o.g,o.a)};return o.normalize()};$.color.extract=function(elem,css){var c;do{c=elem.css(css).toLowerCase();if(c!=""&&c!="transparent")break;elem=elem.parent()}while(elem.length&&!$.nodeName(elem.get(0),"body"));if(c=="rgba(0, 0, 0, 0)")c="transparent";return $.color.parse(c)};$.color.parse=function(str){var res,m=$.color.make;if(res=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(str))return m(parseInt(res[1],10),parseInt(res[2],10),parseInt(res[3],10));if(res=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))return m(parseInt(res[1],10),parseInt(res[2],10),parseInt(res[3],10),parseFloat(res[4]));if(res=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(str))return m(parseFloat(res[1])*2.55,parseFloat(res[2])*2.55,parseFloat(res[3])*2.55);if(res=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))return m(parseFloat(res[1])*2.55,parseFloat(res[2])*2.55,parseFloat(res[3])*2.55,parseFloat(res[4]));if(res=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(str))return m(parseInt(res[1],16),parseInt(res[2],16),parseInt(res[3],16));if(res=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(str))return m(parseInt(res[1]+res[1],16),parseInt(res[2]+res[2],16),parseInt(res[3]+res[3],16));var name=$.trim(str).toLowerCase();if(name=="transparent")return m(255,255,255,0);else{res=lookupColors[name]||[0,0,0];return m(res[0],res[1],res[2])}};var lookupColors={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);
(function($) {$.color={};$.color.make=function(r,g,b,a) {var o={};o.r=r||0;o.g=g||0;o.b=b||0;o.a=a!=null?a:1;o.add=function(c,d) {for(var i=0;i<c.length;++i)o[c.charAt(i)]+=d;return o.normalize()};o.scale=function(c,f) {for(var i=0;i<c.length;++i)o[c.charAt(i)]*=f;return o.normalize()};o.toString=function() {if (o.a>=1) {return"rgb("+[o.r,o.g,o.b].join(",")+")"} else {return"rgba("+[o.r,o.g,o.b,o.a].join(",")+")"}};o.normalize=function() {function clamp(min,value,max) {return value<min?min:value>max?max:value}o.r=clamp(0,parseInt(o.r),255);o.g=clamp(0,parseInt(o.g),255);o.b=clamp(0,parseInt(o.b),255);o.a=clamp(0,o.a,1);return o};o.clone=function() {return $.color.make(o.r,o.b,o.g,o.a)};return o.normalize()};$.color.extract=function(elem,css) {var c;do{c=elem.css(css).toLowerCase();if (c!=""&&c!="transparent")break;elem=elem.parent()}while(elem.length&&!$.nodeName(elem.get(0),"body"));if (c=="rgba(0, 0, 0, 0)")c="transparent";return $.color.parse(c)};$.color.parse=function(str) {var res,m=$.color.make;if (res=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(str))return m(parseInt(res[1],10),parseInt(res[2],10),parseInt(res[3],10));if (res=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))return m(parseInt(res[1],10),parseInt(res[2],10),parseInt(res[3],10),parseFloat(res[4]));if (res=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(str))return m(parseFloat(res[1])*2.55,parseFloat(res[2])*2.55,parseFloat(res[3])*2.55);if (res=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))return m(parseFloat(res[1])*2.55,parseFloat(res[2])*2.55,parseFloat(res[3])*2.55,parseFloat(res[4]));if (res=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(str))return m(parseInt(res[1],16),parseInt(res[2],16),parseInt(res[3],16));if (res=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(str))return m(parseInt(res[1]+res[1],16),parseInt(res[2]+res[2],16),parseInt(res[3]+res[3],16));var name=$.trim(str).toLowerCase();if (name=="transparent")return m(255,255,255,0);else{res=lookupColors[name]||[0,0,0];return m(res[0],res[1],res[2])}};var lookupColors={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);

// the actual Flot code
(function($) {
@@ -1303,7 +1303,7 @@ Licensed under the MIT license.
// from a previous plot in this container that we'll try to re-use.

placeholder.css("padding", 0) // padding messes up the positioning
.children().filter(function(){
.children().filter(function() {
return !$(this).hasClass("flot-overlay") && !$(this).hasClass('flot-base');
}).remove();

@@ -1581,7 +1581,7 @@ Licensed under the MIT license.
// If the grid is visible, add its border width to the offset

for (var a in plotOffset) {
if(typeof(options.grid.borderWidth) == "object") {
if (typeof(options.grid.borderWidth) == "object") {
plotOffset[a] += showGrid ? options.grid.borderWidth[a] : 0;
}
else {
@@ -2125,7 +2125,7 @@ Licensed under the MIT license.
// If either borderWidth or borderColor is an object, then draw the border
// line by line instead of as one rectangle
bc = options.grid.borderColor;
if(typeof bw == "object" || typeof bc == "object") {
if (typeof bw == "object" || typeof bc == "object") {
if (typeof bw !== "object") {
bw = {top: bw, right: bw, bottom: bw, left: bw};
}
@@ -2530,7 +2530,7 @@ Licensed under the MIT license.
// Doing the conditional here allows the shadow setting to still be
// optional even with a lineWidth of 0.

if( lw == 0 )
if ( lw == 0 )
lw = 0.0001;

if (lw > 0 && sw > 0) {
@@ -87,7 +87,7 @@ can set the default in the options.
jquery.event.drag.js ~ v1.5 ~ Copyright (c) 2008, Three Dub Media (http://threedubmedia.com)
Licensed under the MIT License ~ http://threedubmedia.googlecode.com/files/MIT-LICENSE.txt
*/
(function(a){function e(h){var k,j=this,l=h.data||{};if(l.elem)j=h.dragTarget=l.elem,h.dragProxy=d.proxy||j,h.cursorOffsetX=l.pageX-l.left,h.cursorOffsetY=l.pageY-l.top,h.offsetX=h.pageX-h.cursorOffsetX,h.offsetY=h.pageY-h.cursorOffsetY;else if(d.dragging||l.which>0&&h.which!=l.which||a(h.target).is(l.not))return;switch(h.type){case"mousedown":return a.extend(l,a(j).offset(),{elem:j,target:h.target,pageX:h.pageX,pageY:h.pageY}),b.add(document,"mousemove mouseup",e,l),i(j,!1),d.dragging=null,!1;case!d.dragging&&"mousemove":if(g(h.pageX-l.pageX)+g(h.pageY-l.pageY)<l.distance)break;h.target=l.target,k=f(h,"dragstart",j),k!==!1&&(d.dragging=j,d.proxy=h.dragProxy=a(k||j)[0]);case"mousemove":if(d.dragging){if(k=f(h,"drag",j),c.drop&&(c.drop.allowed=k!==!1,c.drop.handler(h)),k!==!1)break;h.type="mouseup"}case"mouseup":b.remove(document,"mousemove mouseup",e),d.dragging&&(c.drop&&c.drop.handler(h),f(h,"dragend",j)),i(j,!0),d.dragging=d.proxy=l.elem=!1}return!0}function f(b,c,d){b.type=c;var e=a.event.dispatch.call(d,b);return e===!1?!1:e||b.result}function g(a){return Math.pow(a,2)}function h(){return d.dragging===!1}function i(a,b){a&&(a.unselectable=b?"off":"on",a.onselectstart=function(){return b},a.style&&(a.style.MozUserSelect=b?"":"none"))}a.fn.drag=function(a,b,c){return b&&this.bind("dragstart",a),c&&this.bind("dragend",c),a?this.bind("drag",b?b:a):this.trigger("drag")};var b=a.event,c=b.special,d=c.drag={not:":input",distance:0,which:1,dragging:!1,setup:function(c){c=a.extend({distance:d.distance,which:d.which,not:d.not},c||{}),c.distance=g(c.distance),b.add(this,"mousedown",e,c),this.attachEvent&&this.attachEvent("ondragstart",h)},teardown:function(){b.remove(this,"mousedown",e),this===d.dragging&&(d.dragging=d.proxy=!1),i(this,!0),this.detachEvent&&this.detachEvent("ondragstart",h)}};c.dragstart=c.dragend={setup:function(){},teardown:function(){}}})(jQuery);
(function(a) {function e(h) {var k,j=this,l=h.data||{};if (l.elem)j=h.dragTarget=l.elem,h.dragProxy=d.proxy||j,h.cursorOffsetX=l.pageX-l.left,h.cursorOffsetY=l.pageY-l.top,h.offsetX=h.pageX-h.cursorOffsetX,h.offsetY=h.pageY-h.cursorOffsetY;else if (d.dragging||l.which>0&&h.which!=l.which||a(h.target).is(l.not))return;switch(h.type) {case"mousedown":return a.extend(l,a(j).offset(),{elem:j,target:h.target,pageX:h.pageX,pageY:h.pageY}),b.add(document,"mousemove mouseup",e,l),i(j,!1),d.dragging=null,!1;case!d.dragging&&"mousemove":if (g(h.pageX-l.pageX)+g(h.pageY-l.pageY)<l.distance)break;h.target=l.target,k=f(h,"dragstart",j),k!==!1&&(d.dragging=j,d.proxy=h.dragProxy=a(k||j)[0]);case"mousemove":if (d.dragging) {if (k=f(h,"drag",j),c.drop&&(c.drop.allowed=k!==!1,c.drop.handler(h)),k!==!1)break;h.type="mouseup"}case"mouseup":b.remove(document,"mousemove mouseup",e),d.dragging&&(c.drop&&c.drop.handler(h),f(h,"dragend",j)),i(j,!0),d.dragging=d.proxy=l.elem=!1}return!0}function f(b,c,d) {b.type=c;var e=a.event.dispatch.call(d,b);return e===!1?!1:e||b.result}function g(a) {return Math.pow(a,2)}function h() {return d.dragging===!1}function i(a,b) {a&&(a.unselectable=b?"off":"on",a.onselectstart=function() {return b},a.style&&(a.style.MozUserSelect=b?"":"none"))}a.fn.drag=function(a,b,c) {return b&&this.bind("dragstart",a),c&&this.bind("dragend",c),a?this.bind("drag",b?b:a):this.trigger("drag")};var b=a.event,c=b.special,d=c.drag={not:":input",distance:0,which:1,dragging:!1,setup:function(c) {c=a.extend({distance:d.distance,which:d.which,not:d.not},c||{}),c.distance=g(c.distance),b.add(this,"mousedown",e,c),this.attachEvent&&this.attachEvent("ondragstart",h)},teardown:function() {b.remove(this,"mousedown",e),this===d.dragging&&(d.dragging=d.proxy=!1),i(this,!0),this.detachEvent&&this.detachEvent("ondragstart",h)}};c.dragstart=c.dragend={setup:function() {},teardown:function() {}}})(jQuery);

/* jquery.mousewheel.min.js
* Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net)
@@ -100,7 +100,7 @@ Licensed under the MIT License ~ http://threedubmedia.googlecode.com/files/MIT-L
*
* Requires: 1.2.2+
*/
(function(d){function e(a){var b=a||window.event,c=[].slice.call(arguments,1),f=0,e=0,g=0,a=d.event.fix(b);a.type="mousewheel";b.wheelDelta&&(f=b.wheelDelta/120);b.detail&&(f=-b.detail/3);g=f;void 0!==b.axis&&b.axis===b.HORIZONTAL_AXIS&&(g=0,e=-1*f);void 0!==b.wheelDeltaY&&(g=b.wheelDeltaY/120);void 0!==b.wheelDeltaX&&(e=-1*b.wheelDeltaX/120);c.unshift(a,f,e,g);return(d.event.dispatch||d.event.handle).apply(this,c)}var c=["DOMMouseScroll","mousewheel"];if(d.event.fixHooks)for(var h=c.length;h;)d.event.fixHooks[c[--h]]=d.event.mouseHooks;d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=c.length;a;)this.addEventListener(c[--a],e,!1);else this.onmousewheel=e},teardown:function(){if(this.removeEventListener)for(var a=c.length;a;)this.removeEventListener(c[--a],e,!1);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery);
(function(d) {function e(a) {var b=a||window.event,c=[].slice.call(arguments,1),f=0,e=0,g=0,a=d.event.fix(b);a.type="mousewheel";b.wheelDelta&&(f=b.wheelDelta/120);b.detail&&(f=-b.detail/3);g=f;void 0!==b.axis&&b.axis===b.HORIZONTAL_AXIS&&(g=0,e=-1*f);void 0!==b.wheelDeltaY&&(g=b.wheelDeltaY/120);void 0!==b.wheelDeltaX&&(e=-1*b.wheelDeltaX/120);c.unshift(a,f,e,g);return(d.event.dispatch||d.event.handle).apply(this,c)}var c=["DOMMouseScroll","mousewheel"];if (d.event.fixHooks)for(var h=c.length;h;)d.event.fixHooks[c[--h]]=d.event.mouseHooks;d.event.special.mousewheel={setup:function() {if (this.addEventListener)for(var a=c.length;a;)this.addEventListener(c[--a],e,!1);else this.onmousewheel=e},teardown:function() {if (this.removeEventListener)for(var a=c.length;a;)this.removeEventListener(c[--a],e,!1);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a) {return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a) {return this.unbind("mousewheel",a)}})})(jQuery);



@@ -19,7 +19,7 @@ can just fix the size of their placeholders.
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*/
(function($,e,t){"$:nomunge";var i=[],n=$.resize=$.extend($.resize,{}),a,r=false,s="setTimeout",u="resize",m=u+"-special-event",o="pendingDelay",l="activeDelay",f="throttleWindow";n[o]=200;n[l]=20;n[f]=true;$.event.special[u]={setup:function(){if(!n[f]&&this[s]){return false}var e=$(this);i.push(this);e.data(m,{w:e.width(),h:e.height()});if(i.length===1){a=t;h()}},teardown:function(){if(!n[f]&&this[s]){return false}var e=$(this);for(var t=i.length-1;t>=0;t--){if(i[t]==this){i.splice(t,1);break}}e.removeData(m);if(!i.length){if(r){cancelAnimationFrame(a)}else{clearTimeout(a)}a=null}},add:function(e){if(!n[f]&&this[s]){return false}var i;function a(e,n,a){var r=$(this),s=r.data(m)||{};s.w=n!==t?n:r.width();s.h=a!==t?a:r.height();i.apply(this,arguments)}if($.isFunction(e)){i=e;return a}else{i=e.handler;e.handler=a}}};function h(t){if(r===true){r=t||1}for(var s=i.length-1;s>=0;s--){var l=$(i[s]);if(l[0]==e||l.is(":visible")){var f=l.width(),c=l.height(),d=l.data(m);if(d&&(f!==d.w||c!==d.h)){l.trigger(u,[d.w=f,d.h=c]);r=t||true}}else{d=l.data(m);d.w=0;d.h=0}}if(a!==null){if(r&&(t==null||t-r<1e3)){a=e.requestAnimationFrame(h)}else{a=setTimeout(h,n[o]);r=false}}}if(!e.requestAnimationFrame){e.requestAnimationFrame=function(){return e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(t,i){return e.setTimeout(function(){t((new Date).getTime())},n[l])}}()}if(!e.cancelAnimationFrame){e.cancelAnimationFrame=function(){return e.webkitCancelRequestAnimationFrame||e.mozCancelRequestAnimationFrame||e.oCancelRequestAnimationFrame||e.msCancelRequestAnimationFrame||clearTimeout}()}})(jQuery,this);
(function($,e,t) {"$:nomunge";var i=[],n=$.resize=$.extend($.resize,{}),a,r=false,s="setTimeout",u="resize",m=u+"-special-event",o="pendingDelay",l="activeDelay",f="throttleWindow";n[o]=200;n[l]=20;n[f]=true;$.event.special[u]={setup:function() {if (!n[f]&&this[s]) {return false}var e=$(this);i.push(this);e.data(m,{w:e.width(),h:e.height()});if (i.length===1) {a=t;h()}},teardown:function() {if (!n[f]&&this[s]) {return false}var e=$(this);for(var t=i.length-1;t>=0;t--) {if (i[t]==this) {i.splice(t,1);break}}e.removeData(m);if (!i.length) {if (r) {cancelAnimationFrame(a)} else {clearTimeout(a)}a=null}},add:function(e) {if (!n[f]&&this[s]) {return false}var i;function a(e,n,a) {var r=$(this),s=r.data(m)||{};s.w=n!==t?n:r.width();s.h=a!==t?a:r.height();i.apply(this,arguments)}if ($.isFunction(e)) {i=e;return a} else {i=e.handler;e.handler=a}}};function h(t) {if (r===true) {r=t||1}for(var s=i.length-1;s>=0;s--) {var l=$(i[s]);if (l[0]==e||l.is(":visible")) {var f=l.width(),c=l.height(),d=l.data(m);if (d&&(f!==d.w||c!==d.h)) {l.trigger(u,[d.w=f,d.h=c]);r=t||true}} else {d=l.data(m);d.w=0;d.h=0}}if (a!==null) {if (r&&(t==null||t-r<1e3)) {a=e.requestAnimationFrame(h)} else {a=setTimeout(h,n[o]);r=false}}}if (!e.requestAnimationFrame) {e.requestAnimationFrame=function() {return e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(t,i) {return e.setTimeout(function() {t((new Date).getTime())},n[l])}}()}if (!e.cancelAnimationFrame) {e.cancelAnimationFrame=function() {return e.webkitCancelRequestAnimationFrame||e.mozCancelRequestAnimationFrame||e.oCancelRequestAnimationFrame||e.msCancelRequestAnimationFrame||clearTimeout}()}})(jQuery,this);

(function ($) {
var options = { }; // no options

Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -8,7 +8,7 @@ Licensed under the BSD-2-Clause License.
(function() {
var $, Morris, minutesSpecHelper, secondsSpecHelper,
__slice = [].slice,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
__bind = function(fn, me) { return function() { return fn.apply(me, arguments); }; },
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
@@ -1333,13 +1333,13 @@ Licensed under the BSD-2-Clause License.
if (this.options.behaveLikeLine) {
range = (function() {
_results = [];
for (var _i = 0, _ref = this.options.ykeys.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; 0 <= _ref ? _i++ : _i--){ _results.push(_i); }
for (var _i = 0, _ref = this.options.ykeys.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; 0 <= _ref ? _i++ : _i--) { _results.push(_i); }
return _results;
}).apply(this);
} else {
range = (function() {
_results1 = [];
for (var _j = _ref1 = this.options.ykeys.length - 1; _ref1 <= 0 ? _j <= 0 : _j >= 0; _ref1 <= 0 ? _j++ : _j--){ _results1.push(_j); }
for (var _j = _ref1 = this.options.ykeys.length - 1; _ref1 <= 0 ? _j <= 0 : _j >= 0; _ref1 <= 0 ? _j++ : _j--) { _results1.push(_j); }
return _results1;
}).apply(this);
}

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -25,7 +25,7 @@
*/
var createVideoNode = function (url) {
// video url patterns(youtube, instagram, vimeo, dailymotion, youku, mp4, ogg, webm)
var ytRegExp = /^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/;
var ytRegExp = /^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-) {11})(?:\S+)?$/;
var ytMatch = url.match(ytRegExp);

var igRegExp = /\/\/instagram.com\/p\/(.[a-zA-Z0-9]*)/;
@@ -6192,7 +6192,7 @@

this.createVideoNode = function (url) {
// video url patterns(youtube, instagram, vimeo, dailymotion, youku, mp4, ogg, webm)
var ytRegExp = /^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/;
var ytRegExp = /^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-) {11})(?:\S+)?$/;
var ytMatch = url.match(ytRegExp);

var igRegExp = /\/\/instagram.com\/p\/(.[a-zA-Z0-9_-]*)/;

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -9,7 +9,7 @@ function loadLib($class_name)
foreach($array_paths as $path)
{
$file = sprintf('%s/%s.class.php', $path, $class_name);
if(is_file($file))
if (is_file($file))
{
include_once $file;
}

This file was deleted.

@@ -2,7 +2,7 @@
"name": "genix/cms",
"type": "project",
"description": "Simple and Free Opensource CMS and Framework",
"version": "0.0.7",
"version": "1.0.0",
"homepage": "http://genixcms.org",
"keywords": ["genixcms", "genix", "cms", "metalgenix"],
"license": "MIT",
@@ -19,24 +19,23 @@
"require": {
"php": ">=5.5.9",
"phpmailer/phpmailer": "5.2.14",
"angelleye/paypal-php-library": "2.0.4",
"lsmonki/php-ixr": "1.7.6",
"kissifrot/php-ixr": "1.8.2",
"google/recaptcha": "~1.1",
"omnipay/common": "2.4.1",
"omnipay/paypal": "2.5.3",
"omnipay/stripe": "2.3.1",
"omnipay/common": "2.5.1",
"omnipay/paypal": "2.5.4",
"omnipay/stripe": "2.3.3",
"omnipay/2checkout": "2.1.1",
"omnipay/bitpay": "dev-master",
"studio-42/elfinder": "2.1.9",
"league/oauth2-client": "1.3.0",
"studio-42/elfinder": "2.1.14",
"league/oauth2-client": "1.4.2",
"league/oauth2-google": "1.0.1",
"symfony/dependency-injection": "v3.0.3",
"symfony/http-kernel": "v3.0.3",
"guzzlehttp/guzzle": "6.1.1",
"dropbox-php/dropbox-php": "1.0.0",
"pear/auth": "1.6.4",
"symfony/dependency-injection": "v3.1.3",
"symfony/http-kernel": "v3.1.3",
"guzzlehttp/guzzle": "6.2.1",
"dropbox/dropbox-sdk": "1.1.6",
"pear/pear": "dev-master",
"pear/http_request2": "v2.3.0",
"pear/net_url2": "v2.2.0",
"barryvdh/elfinder-flysystem-driver": "v0.1.4"
"pear/net_url2": "v2.2.1",
"barryvdh/elfinder-flysystem-driver": "v0.2.0"
}
}

Large diffs are not rendered by default.

@@ -1,147 +1,155 @@
<?php
/**
* GeniXCMS - Content Management System
*
* PHP Based Content Management System and Framework
*
* @package GeniXCMS
* @since 0.0.1 build date 20140928
* @version 0.0.8
* @link https://github.com/semplon/GeniXCMS
* @link http://genixcms.org
* @author Puguh Wijayanto (www.metalgenix.com)
* @copyright 2014-2016 Puguh Wijayanto
* @license http://www.opensource.org/licenses/mit-license.php MIT
*
*/

define('GX_PATH', realpath(__DIR__ . '/'));
define('GX_LIB', GX_PATH.'/inc/lib/');
define('GX_MOD', GX_PATH.'/inc/mod/');
define('GX_THEME', GX_PATH.'/inc/themes/');
define('GX_ASSET', GX_PATH.'/assets/');

require("autoload.php");


try {
new System();
} catch (Exception $e) {
echo $e->getMessage();
}


if(isset($_POST['forgotpass']))
{

// Check token first
if(isset($_POST['token']) && Token::isExist($_POST['token'])){
/*check if username is exist or not */
$username = Typo::cleanX(Typo::strip($_POST['username']));
$sql = sprintf("SELECT `userid`,`email`,`status`,`activation` FROM `user` WHERE `userid` = '%s'", $username);
$usr = Db::result($sql);
$c = Db::$num_rows;
//echo $c;
//print_r($usr);
if($c == "1"){
//$alertSuccess = "";
// check if user is active
if($usr[0]->status == '1') {
/* get user password */
$newpass = User::generatePass();
$id = User::id($username);
$pass = User::randpass($newpass);
$vars = array(
'id' => $id,
'user' => array(
'pass' => $pass
)
);
User::update($vars);
$date = Date::format(date("Y-m-d H:i:s"));
$msg = "
Hello {$usr[0]->userid},
You are requesting Password Reset at ".Site::$name." on {$date}.
Below are your new Password :
{$newpass}
Now you can login with your new Password at ".Site::$url."
Best Regards,
".Site::$name."
".Site::$email."
";
$vars = array(
'to' => $usr[0]->email,
'to_name' => $usr[0]->userid,
'message' => $msg,
'subject' => 'Password Reset at '.Site::$name,
'msgtype' => 'text'
);
//echo "<pre>".$msg."</pre>";
if(Mail::send($vars)){
$alertSuccess = PASSWORD_SENT_NOTIF;
}
}else{
if($usr[0]->activation != ''){
$alertDanger[] = ACOUNT_NOT_ACTIVE;
}else{
$alertDanger[] = ACOUNT_NOT_ACTIVE_BLOCK;
}
}
}elseif($c == "0"){
$alertDanger[] = NO_USER;
}

Token::remove($_POST['token']);
}else{
$alertDanger[] = TOKEN_NOT_EXIST;
}
}
Theme::theme('header');
if(isset($alertDanger)) {
echo "
<div class=\"alert alert-danger\">
";
foreach($alertDanger as $alert)
{
echo $alert;
}
echo"
</div>";
}
if(isset($alertSuccess)) {
echo "
<div class=\"alert alert-success\">
{$alertSuccess}
</div>";
}
if(!User::is_loggedin()){

?>
<div class="container">
<div style="max-width: 300px; margin-left: auto; margin-right: auto; margin-top: 30px; margin-bottom: 60px ">
<form action="" class="form-signin" role="form" method="post">
<h2 class="form-signin-heading"><?=FORGOT_PASS;?></h2>
<div class="form-group">
<label><?=FILLIN_USERNAME;?></label>
<input type="text" name="username" class="form-control" placeholder="<?=USERNAME;?>" required autofocus>
</div>
<input type="hidden" name="token" value="<?=TOKEN;?>">
<button class="btn btn-lg btn-success btn-block" name="forgotpass" type="submit"><?=REQUEST_PASS;?></button>
</form>
</div>
</div>
<?php
}else {
echo"<div class=\"alert alert-info\">You're already Logged In. <br /><a href=\"logout.php\">Logout</a></div>";
}

Theme::theme('footer');
System::Zipped();
<?php
/**
* GeniXCMS - Content Management System.
*
* PHP Based Content Management System and Framework
*
* @since 0.0.1 build date 20140928
*
* @version 1.0.0
*
* @link https://github.com/semplon/GeniXCMS
* @link http://genixcms.org
*
* @author Puguh Wijayanto <psw@metalgenix.com>
* @copyright 2014-2016 Puguh Wijayanto
* @license http://www.opensource.org/licenses/mit-license.php MIT
*/
define('GX_PATH', realpath(__DIR__.'/'));
define('GX_LIB', GX_PATH.'/inc/lib/');
define('GX_MOD', GX_PATH.'/inc/mod/');
define('GX_THEME', GX_PATH.'/inc/themes/');
define('GX_ASSET', GX_PATH.'/assets/');

require 'autoload.php';

try {
new System();
} catch (Exception $e) {
echo $e->getMessage();
}

if (isset($_POST['forgotpass'])) {
if (!isset($_POST['token']) || !Token::isExist($_POST['token'])) {
// VALIDATE ALL
$alertDanger[] = TOKEN_NOT_EXIST;
}
if (Xaptcha::isEnable()) {
if (!isset($_POST['g-recaptcha-response']) || $_POST['g-recaptcha-response'] == '') {
$alertDanger[] = 'Please insert the Captcha';
}
if (!Xaptcha::verify($_POST['g-recaptcha-response'])) {
$alertDanger[] = 'Your Captcha is not correct.';
}
}

// Check token first
if (!isset($alertDanger)) {
/*check if username is exist or not */
$username = Typo::cleanX(Typo::strip($_POST['username']));
$sql = sprintf("SELECT `userid`,`email`,`status`,`activation` FROM `user` WHERE `userid` = '%s'", $username);
$usr = Db::result($sql);
$c = Db::$num_rows;
//echo $c;
//print_r($usr);
if ($c == '1') {
//$alertSuccess = "";
// check if user is active
if ($usr[0]->status == '1') {
/* get user password */
$newpass = User::generatePass();
$id = User::id($username);
$pass = User::randpass($newpass);
$vars = array(
'id' => $id,
'user' => array(
'pass' => $pass,
),
);
User::update($vars);
$date = Date::format(date('Y-m-d H:i:s'));
$msg = "
Hello {$usr[0]->userid},
You are requesting Password Reset at ".Site::$name." on {$date}.
Below are your new Password :
{$newpass}
Now you can login with your new Password at ".Site::$url.'
Best Regards,
'.Site::$name.'
'.Site::$email.'
';
$vars = array(
'to' => $usr[0]->email,
'to_name' => $usr[0]->userid,
'message' => $msg,
'subject' => 'Password Reset at '.Site::$name,
'msgtype' => 'text',
);
//echo "<pre>".$msg."</pre>";
if (Mail::send($vars)) {
$alertSuccess = PASSWORD_SENT_NOTIF;
}
} else {
if ($usr[0]->activation != '') {
$alertDanger[] = ACOUNT_NOT_ACTIVE;
} else {
$alertDanger[] = ACOUNT_NOT_ACTIVE_BLOCK;
}
}
} elseif ($c == '0') {
$alertDanger[] = NO_USER;
}

Token::remove($_POST['token']);
} else {
$alertDanger[] = TOKEN_NOT_EXIST;
}
}
Theme::theme('header');
if (isset($alertDanger)) {
echo '
<div class="alert alert-danger">
';
foreach ($alertDanger as $alert) {
echo $alert;
}
echo'
</div>';
}
if (isset($alertSuccess)) {
echo "
<div class=\"alert alert-success\">
{$alertSuccess}
</div>";
}
if (!User::is_loggedin()) {
?>
<div class="container">
<div style="max-width: 300px; margin-left: auto; margin-right: auto; margin-top: 30px; margin-bottom: 60px ">
<form action="" class="form-signin" role="form" method="post">
<h2 class="form-signin-heading"><?=FORGOT_PASS; ?></h2>
<div class="form-group">
<label><?=FILLIN_USERNAME; ?></label>
<input type="text" name="username" class="form-control" placeholder="<?=USERNAME; ?>" required autofocus>
</div>
<?=Xaptcha::html(); ?>
<input type="hidden" name="token" value="<?=TOKEN; ?>">
<button class="btn btn-lg btn-success btn-block" name="forgotpass" type="submit"><?=REQUEST_PASS; ?></button>
</form>
</div>
</div>
<?php
} else {
echo"<div class=\"alert alert-info\">You're already Logged In. <br /><a href=\"logout.php\">Logout</a></div>";
}

Theme::theme('footer');
System::Zipped();
?>
@@ -1,153 +1,160 @@
<?php
/**
* GeniXCMS - Content Management System
*
* PHP Based Content Management System and Framework
*
* @package GeniXCMS
* @since 0.0.1 build date 20140928
* @version 0.0.8
* @link https://github.com/semplon/GeniXCMS
* @link http://genixcms.org
* @author Puguh Wijayanto (www.metalgenix.com)
* @copyright 2014-2016 Puguh Wijayanto
* @license http://www.opensource.org/licenses/mit-license.php MIT
*
*/

define('GX_PATH', realpath(__DIR__ . '/../'));
define('GX_LIB', GX_PATH.'/inc/lib/');
define('GX_MOD', GX_PATH.'/inc/mod/');
define('GX_THEME', GX_PATH.'/inc/themes/');
define('GX_ASSET', GX_PATH.'/assets/');

require("../autoload.php");


try {
new System();

} catch (Exception $e) {
echo $e->getMessage();
}


if(isset($_POST['forgotpass']))
{

// Check token first
if(isset($_POST['token']) && Token::isExist($_POST['token'])){
/*check if username is exist or not */
$username = Typo::cleanX(Typo::strip($_POST['username']));
$sql = sprintf("SELECT `userid`,`email`,`status`,`activation` FROM `user` WHERE `userid` = '%s'", $username);
$usr = Db::result($sql);
$c = Db::$num_rows;
//echo $c;
//print_r($usr);
if($c == "1"){
//$alertSuccess = "";
// check if user is active
if($usr[0]->status == '1') {
/* get user password */
$newpass = User::generatePass();
$id = User::id($username);
$pass = User::randpass($newpass);
$vars = array(
'id' => $id,
'user' => array(
'pass' => $pass
)
);
User::update($vars);
$date = Date::format(date("Y-m-d H:i:s"));
$msg = "
Hello {$usr[0]->userid},
You are requesting Password Reset at ".Site::$name." on {$date}.
Below are your new Password :
{$newpass}
Now you can login with your new Password at ".Site::$url."
Best Regards,
".Site::$name."
".Site::$email."
";
$vars = array(
'to' => $usr[0]->email,
'to_name' => $usr[0]->userid,
'message' => $msg,
'subject' => 'Password Reset at '.Site::$name,
'msgtype' => 'text'
);
//echo "<pre>".$msg."</pre>";
if(Mail::send($vars)){
$alertSuccess = PASSWORD_SENT_NOTIF;
}
}else{
if($usr[0]->activation != ''){
$alertDanger[] = ACOUNT_NOT_ACTIVE;
}else{
$alertDanger[] = ACOUNT_NOT_ACTIVE_BLOCK;
}
}
}elseif($c == "0"){
$alertDanger[] = NO_USER;
}

Token::remove($_POST['token']);
}else{
$alertDanger[] = TOKEN_NOT_EXIST;
}
}
Theme::admin('header');
if(isset($alertDanger)) {
echo "
<div class=\"alert alert-danger\">
";
foreach($alertDanger as $alert)
{
echo $alert;
}
echo"
</div>";
}
if(isset($alertSuccess)) {
echo "
<div class=\"alert alert-success\">
{$alertSuccess}
</div>";
}
if(!User::is_loggedin()){

?>
<div class="row">
<div style="max-width: 300px; margin-left: auto; margin-right: auto; margin-top: 30px; margin-bottom: 60px ">
<form action="" class="form-signin" role="form" method="post">
<h2 class="form-signin-heading"><?=FORGOT_PASS;?></h2>
<div class="form-group">
<label><?=FILLIN_USERNAME;?></label>
<input type="text" name="username" class="form-control" placeholder="<?=USERNAME;?>" required autofocus>
</div>
<input type="hidden" name="token" value="<?=TOKEN;?>">
<button class="btn btn-lg btn-success btn-block" name="forgotpass" type="submit"><?=REQUEST_PASS;?></button>
</form>
</div>
</div>
<style>
#page-wrapper {
margin-left: 0px!important;
}
</style>
<?php
}else {
echo"<div class=\"alert alert-info\">You're already Logged In. <br /><a href=\"logout.php\">Logout</a></div>";
}

Theme::admin('footer');
System::Zipped();
<?php
/**
* GeniXCMS - Content Management System.
*
* PHP Based Content Management System and Framework
*
* @since 0.0.1 build date 20140928
*
* @version 1.0.0
*
* @link https://github.com/semplon/GeniXCMS
* @link http://genixcms.org
*
* @author Puguh Wijayanto <psw@metalgenix.com>
* @copyright 2014-2016 Puguh Wijayanto
* @license http://www.opensource.org/licenses/mit-license.php MIT
*/
define('GX_PATH', realpath(__DIR__.'/../'));
define('GX_LIB', GX_PATH.'/inc/lib/');
define('GX_MOD', GX_PATH.'/inc/mod/');
define('GX_THEME', GX_PATH.'/inc/themes/');
define('GX_ASSET', GX_PATH.'/assets/');

require '../autoload.php';

try {
new System();
} catch (Exception $e) {
echo $e->getMessage();
}

if (isset($_POST['forgotpass'])) {
if (!isset($_POST['token']) || !Token::isExist($_POST['token'])) {
// VALIDATE ALL
$alertDanger[] = TOKEN_NOT_EXIST;
}
if (Xaptcha::isEnable()) {
if (!isset($_POST['g-recaptcha-response']) || $_POST['g-recaptcha-response'] == '') {
$alertDanger[] = 'Please insert the Captcha';
}
if (!Xaptcha::verify($_POST['g-recaptcha-response'])) {
$alertDanger[] = 'Your Captcha is not correct.';
}
}

// Check token first
if (!isset($alertDanger)) {
/*check if username is exist or not */
$username = Typo::cleanX(Typo::strip($_POST['username']));
$sql = sprintf("SELECT `userid`,`email`,`status`,`activation` FROM `user` WHERE `userid` = '%s'", $username);
$usr = Db::result($sql);
$c = Db::$num_rows;
//echo $c;
//print_r($usr);
if ($c == '1') {
//$alertSuccess = "";
// check if user is active
if ($usr[0]->status == '1') {
/* get user password */
$newpass = User::generatePass();
$id = User::id($username);
$pass = User::randpass($newpass);
$vars = array(
'id' => $id,
'user' => array(
'pass' => $pass,
),
);
User::update($vars);
$date = Date::format(date('Y-m-d H:i:s'));
$msg = "
Hello {$usr[0]->userid},
You are requesting Password Reset at ".Site::$name." on {$date}.
Below are your new Password :
{$newpass}
Now you can login with your new Password at ".Site::$url.'
Best Regards,
'.Site::$name.'
'.Site::$email.'
';
$vars = array(
'to' => $usr[0]->email,
'to_name' => $usr[0]->userid,
'message' => $msg,
'subject' => 'Password Reset at '.Site::$name,
'msgtype' => 'text',
);
//echo "<pre>".$msg."</pre>";
if (Mail::send($vars)) {
$alertSuccess = PASSWORD_SENT_NOTIF;
}
} else {
if ($usr[0]->activation != '') {
$alertDanger[] = ACOUNT_NOT_ACTIVE;
} else {
$alertDanger[] = ACOUNT_NOT_ACTIVE_BLOCK;
}
}
} elseif ($c == '0') {
$alertDanger[] = NO_USER;
}

Token::remove($_POST['token']);
} else {
$alertDanger[] = TOKEN_NOT_EXIST;
}
}
Theme::admin('header');
if (isset($alertDanger)) {
echo '
<div class="alert alert-danger">
';
foreach ($alertDanger as $alert) {
echo $alert;
}
echo'
</div>';
}
if (isset($alertSuccess)) {
echo "
<div class=\"alert alert-success\">
{$alertSuccess}
</div>";
}
if (!User::is_loggedin()) {
?>
<div class="row">
<div style="max-width: 300px; margin-left: auto; margin-right: auto; margin-top: 30px; margin-bottom: 60px ">
<form action="" class="form-signin" role="form" method="post">
<h2 class="form-signin-heading"><?=FORGOT_PASS; ?></h2>
<div class="form-group">
<label><?=FILLIN_USERNAME; ?></label>
<input type="text" name="username" class="form-control" placeholder="<?=USERNAME; ?>" required autofocus>
</div>
<?=Xaptcha::html(); ?>
<input type="hidden" name="token" value="<?=TOKEN; ?>">
<button class="btn btn-lg btn-success btn-block" name="forgotpass" type="submit"><?=REQUEST_PASS; ?></button>
</form>
</div>
</div>
<style>
#page-wrapper {
margin-left: 0px!important;
}
</style>
<?php
} else {
echo"<div class=\"alert alert-info\">You're already Logged In. <br /><a href=\"logout.php\">Logout</a></div>";
}

Theme::admin('footer');
System::Zipped();
?>
@@ -1,135 +1,137 @@
<?php
/**
* GeniXCMS - Content Management System
*
* PHP Based Content Management System and Framework
*
* @package GeniXCMS
* @since 0.0.1 build date 20150202
* @version 0.0.8
* @link https://github.com/semplon/GeniXCMS
* @link http://genixcms.org
* @author Puguh Wijayanto (www.metalgenix.com)
* @copyright 2014-2016 Puguh Wijayanto
* @license http://www.opensource.org/licenses/mit-license.php MIT
*
*/

?>
<div class="row">
<div class="col-md-12">
<?=Hooks::run('admin_page_notif_action', $data);?>
</div>
<div class="col-md-12">
<h1><i class="fa fa-cubes"></i> <?=CATEGORIES;?>
<button class="btn btn-success pull-right" data-toggle="modal" data-target="#myModal">
<span class="glyphicon glyphicon-plus"></span> <?=ADD_CATEGORY;?>
</button>
</h1>
<hr />
</div>

<div class="col-sm-12">
<div class="row">
<?php
if($data['num'] > 0) {
foreach ($data['cat'] as $c) {
# code...
// echo "<td>".$c->id."</td>";
// echo "<td>".$c->name."</td>";
// echo "<td>".$c->parent."</td>";
// echo "<td></td>";

if($c->parent == "" || $c->parent == 0){
echo "<div class=\"col-md-4 item\" >
<div class=\"panel panel-default\">
<div class=\"panel-heading\">
<form action=\"index.php?page=categories\" method=\"POST\" name=\"updatecat\">
<div class=\"input-group\">
<a href=\"?page=categories&act=del&id={$c->id}&token=".TOKEN."\" class=\"input-group-addon\"
onclick=\"return confirm('Are you sure you want to delete this item?');\"
><span class=\"glyphicon glyphicon-remove\"></span></a>
<input type=\"text\" name=\"cat\" class=\"form-control\" value=\"{$c->name}\">
<input type=\"hidden\" name=\"id\" value=\"{$c->id}\">
<input type=\"hidden\" name=\"token\" value=\"".TOKEN."\">
<span class=\"input-group-btn\">
<button class=\"btn btn-default\" type=\"submit\" name=\"updatecat\">Go!</button>
</span>
</div>
</form>
</div>
<div class=\"panel-body\">
<ul class=\"list-group\">";
foreach ($data['cat'] as $c2) {
if($c2->parent == $c->id){
echo "<li class=\"list-group-item\">
<form action=\"index.php?page=categories\" method=\"POST\" name=\"updatecat\">
<div class=\"input-group\">
<a href=\"?page=categories&act=del&id={$c2->id}&token=".TOKEN."\" class=\"input-group-addon\"
onclick=\"return confirm('Are you sure you want to delete this item?');\"
><span class=\"glyphicon glyphicon-remove\"></span></a>
<input type=\"text\" name=\"cat\" class=\"form-control\" value=\"{$c2->name}\">
<input type=\"hidden\" name=\"id\" value=\"{$c2->id}\">
<input type=\"hidden\" name=\"token\" value=\"".TOKEN."\">
<span class=\"input-group-btn\">
<button class=\"btn btn-default\" type=\"submit\" name=\"updatecat\">Go!</button>
</span>
</div>
</form>
</li>";
}
}
echo "</ul></div>";
echo "</div></div>";
}
}
}else{
echo "<div class=\"col-md-12\">No Categories Found</div>";
}
?>
</div>



</div>
</div>
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<form action="index.php?page=categories" method="post">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title" id="myModalLabel"><?=ADD_CATEGORY;?></h4>
</div>
<div class="modal-body">

<div class="form-group">
<label><?=PARENTS;?></label>
<?php
$vars = array(
'parent' => '0',
'name' => 'parent',
'sort' => 'ASC',
'order_by' => 'name',
'type' => 'post'
);
echo Categories::dropdown($vars);
?>
</div>
<div class="form-group">
<label><?=CATEGORY_NAME;?></label>
<input type="text" name="cat" class="form-control">
</div>

</div>
<div class="modal-footer">
<input type="hidden" name="token" value="<?=TOKEN;?>">
<button type="button" class="btn btn-default" data-dismiss="modal"><?=CLOSE;?></button>
<button type="submit" class="btn btn-success" name="addcat"><?=SUBMIT;?></button>
</div>
</form>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<?php
/**
* GeniXCMS - Content Management System.
*
* PHP Based Content Management System and Framework
*
* @since 0.0.1 build date 20150202
*
* @version 1.0.0
*
* @link https://github.com/semplon/GeniXCMS
* @link http://genixcms.org
*
* @author Puguh Wijayanto <psw@metalgenix.com>
* @copyright 2014-2016 Puguh Wijayanto
* @license http://www.opensource.org/licenses/mit-license.php MIT
*/
?>
<div class="row">
<div class="col-md-12">
<?=Hooks::run('admin_page_notif_action', $data);?>
</div>
<div class="col-md-12">
<h2><i class="fa fa-cubes"></i> <?=CATEGORIES;?>
<button class="btn btn-success pull-right" data-toggle="modal" data-target="#myModal">
<span class="glyphicon glyphicon-plus"></span>
<span class="hidden-xs hidden-sm"><?=ADD_CATEGORY;?></span>
</button>
</h2>
<hr />
</div>

<div class="col-sm-12">
<div class="row">
<?php
if ($data['num'] > 0) {
foreach ($data['cat'] as $c) {
# code...
// echo "<td>".$c->id."</td>";
// echo "<td>".$c->name."</td>";
// echo "<td>".$c->parent."</td>";
// echo "<td></td>";

if ($c->parent == '' || $c->parent == 0) {
echo "<div class=\"col-md-4 item\" >
<div class=\"panel panel-default\">
<div class=\"panel-heading\">
<form action=\"index.php?page=categories\" method=\"POST\" name=\"updatecat\">
<div class=\"input-group\">
<a href=\"?page=categories&act=del&id={$c->id}&token=".TOKEN."\" class=\"input-group-addon\"
onclick=\"return confirm('Are you sure you want to delete this item?');\"
><span class=\"glyphicon glyphicon-remove\"></span></a>
<input type=\"text\" name=\"cat\" class=\"form-control\" value=\"{$c->name}\">
<input type=\"hidden\" name=\"id\" value=\"{$c->id}\">
<input type=\"hidden\" name=\"token\" value=\"".TOKEN.'">
<span class="input-group-btn">
<button class="btn btn-default" type="submit" name="updatecat">Go!</button>
</span>
</div>
</form>
</div>
<div class="panel-body">
<ul class="list-group">';
foreach ($data['cat'] as $c2) {
if ($c2->parent == $c->id) {
echo "<li class=\"list-group-item\">
<form action=\"index.php?page=categories\" method=\"POST\" name=\"updatecat\">
<div class=\"input-group\">
<a href=\"?page=categories&act=del&id={$c2->id}&token=".TOKEN."\" class=\"input-group-addon\"
onclick=\"return confirm('Are you sure you want to delete this item?');\"
><span class=\"glyphicon glyphicon-remove\"></span></a>
<input type=\"text\" name=\"cat\" class=\"form-control\" value=\"{$c2->name}\">
<input type=\"hidden\" name=\"id\" value=\"{$c2->id}\">
<input type=\"hidden\" name=\"token\" value=\"".TOKEN.'">
<span class="input-group-btn">
<button class="btn btn-default" type="submit" name="updatecat">Go!</button>
</span>
</div>
</form>
</li>';
}
}
echo '</ul></div>';
echo '</div></div>';
}
}
} else {
echo '<div class="col-md-12">No Categories Found</div>';
}
?>
</div>



</div>
</div>
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<form action="index.php?page=categories" method="post">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title" id="myModalLabel"><?=ADD_CATEGORY;?></h4>
</div>
<div class="modal-body">

<div class="form-group">
<label><?=PARENTS;?></label>
<?php
$vars = array(
'parent' => '0',
'name' => 'parent',
'sort' => 'ASC',
'order_by' => 'name',
'type' => 'post',
);
echo Categories::dropdown($vars);
?>
</div>
<div class="form-group">
<label><?=CATEGORY_NAME;?></label>
<input type="text" name="cat" class="form-control">
</div>

</div>
<div class="modal-footer">
<input type="hidden" name="token" value="<?=TOKEN;?>">
<button type="button" class="btn btn-default" data-dismiss="modal"><?=CLOSE;?></button>
<button type="submit" class="btn btn-success" name="addcat"><?=SUBMIT;?></button>
</div>
</form>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->

@@ -1,83 +1,85 @@
<?php
/**
* GeniXCMS - Content Management System
*
* PHP Based Content Management System and Framework
*
* @package GeniXCMS
* @since 0.0.1 build date 20150202
* @version 0.0.8
* @link https://github.com/semplon/GeniXCMS
* @link http://genixcms.org
* @author Puguh Wijayanto (www.metalgenix.com)
* @copyright 2014-2016 Puguh Wijayanto
* @license http://www.opensource.org/licenses/mit-license.php MIT
*
*/?>
<div class="row">
<div class="col-md-12">
<?=Hooks::run('admin_page_notif_action', $data);?>
<?=Hooks::run('admin_page_top_action', $data);?>
</div>
<div class="col-md-12">
<h1><i class="fa fa-dashboard"></i> <?=DASHBOARD;?></h1>
<hr>
</div>
<div class="col-md-12">
<div class="row">
<?=Hooks::run('admin_page_dashboard_action', $data);?>
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-file-text-o"></i> <?=LATEST_POST;?></h3>
</div>
<div class="panel-body">
<ul class="list-group">
<?php
$post = Posts::recent(5, 'post');

//print_r($post);
if(isset($post['error'])){
echo "<li class=\"list-group-item\">{$post['error']}</li>";
}else{
foreach ($post as $p) {
# code...
echo "
<li class=\"list-group-item\">
<a href=\"".Url::post($p->id)."\" target=\"_blank\">
$p->title
</a>
<small class=\"badge\">$p->author</small>
</li>";
}
}

?>
</ul>
</div>
</div>
</div>
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-bar-chart"></i> <?=STATISTIC;?></h3>
</div>
<div class="panel-body">
<ul class="list-group">
<?php
echo "<li class=\"list-group-item\">".TOTAL_POST.": ".Stats::totalPost('post')."</li>"
."<li class=\"list-group-item\">".TOTAL_PAGE.": ".Stats::totalPost('page')."</li>"
."<li class=\"list-group-item\">".TOTAL_CAT.": ".Stats::totalCat('post')."</li>"
."<li class=\"list-group-item\">".TOTAL_USER.": ".Stats::totalUser()."</li>";
echo Hooks::run('admin_page_dashboard_statslist_action', $data);
?>
</ul>
</div>
</div>
</div>
</div>

</div>

</div>
<?php
/**
* GeniXCMS - Content Management System.
*
* PHP Based Content Management System and Framework
*
* @since 0.0.1 build date 20150202
*
* @version 1.0.0
*
* @link https://github.com/semplon/GeniXCMS
* @link http://genixcms.org
*
* @author Puguh Wijayanto <psw@metalgenix.com>
* @copyright 2014-2016 Puguh Wijayanto
* @license http://www.opensource.org/licenses/mit-license.php MIT
*/
?>
<div class="row">
<div class="col-md-12">
<?=Hooks::run('admin_page_notif_action', $data);?>
<?=Hooks::run('admin_page_top_action', $data);?>
</div>
<div class="col-md-12">
<h2><i class="fa fa-dashboard"></i> <?=DASHBOARD;?></h2>
<hr>
</div>
<div class="col-md-12">
<div class="row">
<?=Hooks::run('admin_page_dashboard_action', $data);?>
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-file-text-o"></i> <?=LATEST_POST;?></h3>
</div>
<div class="panel-body">
<ul class="list-group">
<?php
$vars = array('num' => 5, 'type' => 'post');
$post = Posts::recent($vars);

if (isset($post['error'])) {
echo "<li class=\"list-group-item\">{$post['error']}</li>";
} else {
foreach ($post as $p) {
# code...
echo '
<li class="list-group-item">
<a href="'.Url::post($p->id)."\" target=\"_blank\">
$p->title
</a>
<small class=\"badge\">$p->author</small>
</li>";
}
}

?>
</ul>
</div>
</div>
</div>
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-bar-chart"></i> <?=STATISTIC;?></h3>
</div>
<div class="panel-body">
<ul class="list-group">
<?php
echo '<li class="list-group-item">'.TOTAL_POST.': '.Stats::totalPost('post').'</li>'
.'<li class="list-group-item">'.TOTAL_PAGE.': '.Stats::totalPost('page').'</li>'
.'<li class="list-group-item">'.TOTAL_CAT.': '.Stats::totalCat('post').'</li>'
.'<li class="list-group-item">'.TOTAL_USER.': '.Stats::totalUser().'</li>';
echo Hooks::run('admin_page_dashboard_statslist_action', $data);
?>
</ul>
</div>
</div>
</div>
</div>

</div>

</div>
@@ -1,64 +1,64 @@
<?php
/**
* GeniXCMS - Content Management System
*
* PHP Based Content Management System and Framework
*
* @package GeniXCMS
* @since 0.0.1 build date 20150202
* @version 0.0.8
* @link https://github.com/semplon/GeniXCMS
* @link http://genixcms.org
* @author Puguh Wijayanto (www.metalgenix.com)
* @copyright 2014-2016 Puguh Wijayanto
* @license http://www.opensource.org/licenses/mit-license.php MIT
*
*/

if (isset($data['alertSuccess'])) {
# code...
echo "<div class=\"alert alert-success\" >
<button type=\"button\" class=\"close\" data-dismiss=\"alert\">
<span aria-hidden=\"true\">&times;</span>
<span class=\"sr-only\">".CLOSE."</span>
</button>";
foreach ($data['alertSuccess'] as $alert) {
# code...
echo "$alert\n";
}
echo "</div>";
}
if (isset($data['alertDanger'])) {
# code...
echo "<div class=\"alert alert-danger\" >
<button type=\"button\" class=\"close\" data-dismiss=\"alert\">
<span aria-hidden=\"true\">&times;</span>
<span class=\"sr-only\">".CLOSE."</span>
</button>";
foreach ($data['alertDanger'] as $alert) {
# code...
echo "$alert\n";
}
echo "</div>";
}
?>
<div class="row">
<div class="col-md-12">
<?=Hooks::run('admin_page_notif_action', $data);?>
</div>
<div class="col-md-12">
<h1><i class="fa fa-list-alt"></i> Media

</h1>
<hr />
</div>

<div class="col-sm-12">
<div class="row">
<div id="elfinder"></div>
</div>



</div>
</div>
<?php
/**
* GeniXCMS - Content Management System.
*
* PHP Based Content Management System and Framework
*
* @since 0.0.1 build date 20150202
*
* @version 1.0.0
*
* @link https://github.com/semplon/GeniXCMS
* @link http://genixcms.org
*
* @author Puguh Wijayanto <psw@metalgenix.com>
* @copyright 2014-2016 Puguh Wijayanto
* @license http://www.opensource.org/licenses/mit-license.php MIT
*/
if (isset($data['alertSuccess'])) {
# code...
echo '<div class="alert alert-success" >
<button type="button" class="close" data-dismiss="alert">
<span aria-hidden="true">&times;</span>
<span class="sr-only">'.CLOSE.'</span>
</button>';
foreach ($data['alertSuccess'] as $alert) {
# code...
echo "$alert\n";
}
echo '</div>';
}
if (isset($data['alertDanger'])) {
# code...
echo '<div class="alert alert-danger" >
<button type="button" class="close" data-dismiss="alert">
<span aria-hidden="true">&times;</span>
<span class="sr-only">'.CLOSE.'</span>
</button>';
foreach ($data['alertDanger'] as $alert) {
# code...
echo "$alert\n";
}
echo '</div>';
}
?>
<div class="row">
<div class="col-md-12">
<?=Hooks::run('admin_page_notif_action', $data);?>
</div>
<div class="col-md-12">
<h1><i class="fa fa-list-alt"></i> Media

</h1>
<hr />
</div>

<div class="col-sm-12">
<div class="row">
<div id="elfinder"></div>
</div>



</div>
</div>