mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-23 19:37:23 +08:00
modal show global
This commit is contained in:
@@ -116,3 +116,10 @@ function removeHitAndRun($params)
|
||||
$rep = new \App\Repositories\BonusRepository();
|
||||
return $rep->consumeToCancelHitAndRun($CURUSER['id'], $params['id']);
|
||||
}
|
||||
|
||||
function consumeBenefit($params)
|
||||
{
|
||||
global $CURUSER;
|
||||
$rep = new \App\Repositories\UserRepository();
|
||||
return $rep->consumeBenefit($CURUSER['id'], $params);
|
||||
}
|
||||
|
||||
+3
-3
@@ -37,7 +37,7 @@ if (!$row) {
|
||||
permissiondenied();
|
||||
} else {
|
||||
$row = apply_filter('torrent_detail', $row);
|
||||
$owner = \App\Models\User::query()->with(['wearing_medals'])->find($row['owner']);
|
||||
$owner = \App\Models\User::query()->find($row['owner']);
|
||||
if (!$owner) {
|
||||
$owner = \App\Models\User::defaultUser();
|
||||
}
|
||||
@@ -104,10 +104,10 @@ if (!$row) {
|
||||
if (get_user_class() < $viewanonymous_class)
|
||||
$uprow = "<i>".$lang_details['text_anonymous']."</i>";
|
||||
else
|
||||
$uprow = "<i>".$lang_details['text_anonymous']."</i> (" . build_medal_image($owner->wearing_medals, 20) . get_username($row['owner'], false, true, true, false, false, true) . ")";
|
||||
$uprow = "<i>".$lang_details['text_anonymous']."</i> (" . get_username($row['owner'], false, true, true, false, false, true) . ")";
|
||||
}
|
||||
else {
|
||||
$uprow = (isset($row['owner']) ? build_medal_image($owner->wearing_medals, 20) . get_username($row['owner'], false, true, true, false, false, true) : "<i>".$lang_details['text_unknown']."</i>");
|
||||
$uprow = (isset($row['owner']) ? get_username($row['owner'], false, true, true, false, false, true) : "<i>".$lang_details['text_unknown']."</i>");
|
||||
}
|
||||
|
||||
if ($CURUSER["id"] == $row["owner"])
|
||||
|
||||
+2
-2
@@ -667,7 +667,7 @@ if ($action == "viewtopic")
|
||||
$uidArr = array_keys($uidArr);
|
||||
unset($arr);
|
||||
$neededColumns = array('id', 'noad', 'class', 'enabled', 'privacy', 'avatar', 'signature', 'uploaded', 'downloaded', 'last_access', 'username', 'donor', 'leechwarn', 'warned', 'title');
|
||||
$userInfoArr = \App\Models\User::query()->with(['wearing_medals'])->find($uidArr, $neededColumns)->keyBy('id');
|
||||
$userInfoArr = \App\Models\User::query()->find($uidArr, $neededColumns)->keyBy('id');
|
||||
$pn = 0;
|
||||
$lpr = get_last_read_post_id($topicid);
|
||||
if ($Advertisement->enable_ad())
|
||||
@@ -708,7 +708,7 @@ if ($action == "viewtopic")
|
||||
$avatar = ($CURUSER["avatars"] == "yes" ? htmlspecialchars($arr2["avatar"]) : "");
|
||||
|
||||
$uclass = get_user_class_image($arr2["class"]);
|
||||
$by = build_medal_image($userInfo->wearing_medals, 20) . get_username($posterid,false,true,true,false,false,true);
|
||||
$by = get_username($posterid,false,true,true,false,false,true);
|
||||
|
||||
if (!$avatar)
|
||||
$avatar = "pic/default_avatar.png";
|
||||
|
||||
@@ -152,6 +152,11 @@ if ($showshoutbox_main == "yes") {
|
||||
print("</form></td></tr></table>");
|
||||
}
|
||||
// ------------- end: shoutbox ------------------//
|
||||
|
||||
$extraModules = [];
|
||||
$extraModules = apply_filter('nexus_home_module', $extraModules);
|
||||
print implode('', $extraModules);
|
||||
|
||||
// ------------- start: latest forum posts ------------------//
|
||||
|
||||
if ($showlastxforumposts_main == "yes" && $CURUSER)
|
||||
|
||||
Vendored
+205
@@ -0,0 +1,205 @@
|
||||
/*
|
||||
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
|
||||
*
|
||||
* Uses the built in easing capabilities added In jQuery 1.1
|
||||
* to offer multiple easing options
|
||||
*
|
||||
* TERMS OF USE - jQuery Easing
|
||||
*
|
||||
* Open source under the BSD License.
|
||||
*
|
||||
* Copyright © 2008 George McGinley Smith
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the author nor the names of contributors may be used to endorse
|
||||
* or promote products derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
// t: current time, b: begInnIng value, c: change In value, d: duration
|
||||
jQuery.easing['jswing'] = jQuery.easing['swing'];
|
||||
|
||||
jQuery.extend( jQuery.easing,
|
||||
{
|
||||
def: 'easeOutQuad',
|
||||
swing: function (x, t, b, c, d) {
|
||||
//alert(jQuery.easing.default);
|
||||
return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
|
||||
},
|
||||
easeInQuad: function (x, t, b, c, d) {
|
||||
return c*(t/=d)*t + b;
|
||||
},
|
||||
easeOutQuad: function (x, t, b, c, d) {
|
||||
return -c *(t/=d)*(t-2) + b;
|
||||
},
|
||||
easeInOutQuad: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) return c/2*t*t + b;
|
||||
return -c/2 * ((--t)*(t-2) - 1) + b;
|
||||
},
|
||||
easeInCubic: function (x, t, b, c, d) {
|
||||
return c*(t/=d)*t*t + b;
|
||||
},
|
||||
easeOutCubic: function (x, t, b, c, d) {
|
||||
return c*((t=t/d-1)*t*t + 1) + b;
|
||||
},
|
||||
easeInOutCubic: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) return c/2*t*t*t + b;
|
||||
return c/2*((t-=2)*t*t + 2) + b;
|
||||
},
|
||||
easeInQuart: function (x, t, b, c, d) {
|
||||
return c*(t/=d)*t*t*t + b;
|
||||
},
|
||||
easeOutQuart: function (x, t, b, c, d) {
|
||||
return -c * ((t=t/d-1)*t*t*t - 1) + b;
|
||||
},
|
||||
easeInOutQuart: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
|
||||
return -c/2 * ((t-=2)*t*t*t - 2) + b;
|
||||
},
|
||||
easeInQuint: function (x, t, b, c, d) {
|
||||
return c*(t/=d)*t*t*t*t + b;
|
||||
},
|
||||
easeOutQuint: function (x, t, b, c, d) {
|
||||
return c*((t=t/d-1)*t*t*t*t + 1) + b;
|
||||
},
|
||||
easeInOutQuint: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
|
||||
return c/2*((t-=2)*t*t*t*t + 2) + b;
|
||||
},
|
||||
easeInSine: function (x, t, b, c, d) {
|
||||
return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
|
||||
},
|
||||
easeOutSine: function (x, t, b, c, d) {
|
||||
return c * Math.sin(t/d * (Math.PI/2)) + b;
|
||||
},
|
||||
easeInOutSine: function (x, t, b, c, d) {
|
||||
return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
|
||||
},
|
||||
easeInExpo: function (x, t, b, c, d) {
|
||||
return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
|
||||
},
|
||||
easeOutExpo: function (x, t, b, c, d) {
|
||||
return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
|
||||
},
|
||||
easeInOutExpo: function (x, t, b, c, d) {
|
||||
if (t==0) return b;
|
||||
if (t==d) return b+c;
|
||||
if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
|
||||
return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
|
||||
},
|
||||
easeInCirc: function (x, t, b, c, d) {
|
||||
return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
|
||||
},
|
||||
easeOutCirc: function (x, t, b, c, d) {
|
||||
return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
|
||||
},
|
||||
easeInOutCirc: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
|
||||
return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
|
||||
},
|
||||
easeInElastic: function (x, t, b, c, d) {
|
||||
var s=1.70158;var p=0;var a=c;
|
||||
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
|
||||
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
||||
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
||||
return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
|
||||
},
|
||||
easeOutElastic: function (x, t, b, c, d) {
|
||||
var s=1.70158;var p=0;var a=c;
|
||||
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
|
||||
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
||||
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
||||
return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
|
||||
},
|
||||
easeInOutElastic: function (x, t, b, c, d) {
|
||||
var s=1.70158;var p=0;var a=c;
|
||||
if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
|
||||
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
||||
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
||||
if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
|
||||
return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
|
||||
},
|
||||
easeInBack: function (x, t, b, c, d, s) {
|
||||
if (s == undefined) s = 1.70158;
|
||||
return c*(t/=d)*t*((s+1)*t - s) + b;
|
||||
},
|
||||
easeOutBack: function (x, t, b, c, d, s) {
|
||||
if (s == undefined) s = 1.70158;
|
||||
return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
|
||||
},
|
||||
easeInOutBack: function (x, t, b, c, d, s) {
|
||||
if (s == undefined) s = 1.70158;
|
||||
if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
|
||||
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
|
||||
},
|
||||
easeInBounce: function (x, t, b, c, d) {
|
||||
return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
|
||||
},
|
||||
easeOutBounce: function (x, t, b, c, d) {
|
||||
if ((t/=d) < (1/2.75)) {
|
||||
return c*(7.5625*t*t) + b;
|
||||
} else if (t < (2/2.75)) {
|
||||
return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
|
||||
} else if (t < (2.5/2.75)) {
|
||||
return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
|
||||
} else {
|
||||
return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
|
||||
}
|
||||
},
|
||||
easeInOutBounce: function (x, t, b, c, d) {
|
||||
if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
|
||||
return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
|
||||
}
|
||||
});
|
||||
|
||||
/*
|
||||
*
|
||||
* TERMS OF USE - EASING EQUATIONS
|
||||
*
|
||||
* Open source under the BSD License.
|
||||
*
|
||||
* Copyright © 2001 Robert Penner
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the author nor the names of contributors may be used to endorse
|
||||
* or promote products derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
Vendored
+339
@@ -0,0 +1,339 @@
|
||||
// VERSION: 2.3 LAST UPDATE: 11.07.2013
|
||||
/*
|
||||
* Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
|
||||
*
|
||||
* Made by Wilq32, wilq32@gmail.com, Wroclaw, Poland, 01.2009
|
||||
* Website: http://jqueryrotate.com
|
||||
*/
|
||||
|
||||
(function($) {
|
||||
var supportedCSS,supportedCSSOrigin, styles=document.getElementsByTagName("head")[0].style,toCheck="transformProperty WebkitTransform OTransform msTransform MozTransform".split(" ");
|
||||
for (var a = 0; a < toCheck.length; a++) if (styles[toCheck[a]] !== undefined) { supportedCSS = toCheck[a]; }
|
||||
if (supportedCSS) {
|
||||
supportedCSSOrigin = supportedCSS.replace(/[tT]ransform/,"TransformOrigin");
|
||||
if (supportedCSSOrigin[0] == "T") supportedCSSOrigin[0] = "t";
|
||||
}
|
||||
|
||||
// Bad eval to preven google closure to remove it from code o_O
|
||||
eval('IE = "v"=="\v"');
|
||||
|
||||
jQuery.fn.extend({
|
||||
rotate:function(parameters)
|
||||
{
|
||||
if (this.length===0||typeof parameters=="undefined") return;
|
||||
if (typeof parameters=="number") parameters={angle:parameters};
|
||||
var returned=[];
|
||||
for (var i=0,i0=this.length;i<i0;i++)
|
||||
{
|
||||
var element=this.get(i);
|
||||
if (!element.Wilq32 || !element.Wilq32.PhotoEffect) {
|
||||
|
||||
var paramClone = $.extend(true, {}, parameters);
|
||||
var newRotObject = new Wilq32.PhotoEffect(element,paramClone)._rootObj;
|
||||
|
||||
returned.push($(newRotObject));
|
||||
}
|
||||
else {
|
||||
element.Wilq32.PhotoEffect._handleRotation(parameters);
|
||||
}
|
||||
}
|
||||
return returned;
|
||||
},
|
||||
getRotateAngle: function(){
|
||||
var ret = [0];
|
||||
for (var i=0,i0=this.length;i<i0;i++)
|
||||
{
|
||||
var element=this.get(i);
|
||||
if (element.Wilq32 && element.Wilq32.PhotoEffect) {
|
||||
ret[i] = element.Wilq32.PhotoEffect._angle;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
},
|
||||
stopRotate: function(){
|
||||
for (var i=0,i0=this.length;i<i0;i++)
|
||||
{
|
||||
var element=this.get(i);
|
||||
if (element.Wilq32 && element.Wilq32.PhotoEffect) {
|
||||
clearTimeout(element.Wilq32.PhotoEffect._timer);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Library agnostic interface
|
||||
|
||||
Wilq32=window.Wilq32||{};
|
||||
Wilq32.PhotoEffect=(function(){
|
||||
|
||||
if (supportedCSS) {
|
||||
return function(img,parameters){
|
||||
img.Wilq32 = {
|
||||
PhotoEffect: this
|
||||
};
|
||||
|
||||
this._img = this._rootObj = this._eventObj = img;
|
||||
this._handleRotation(parameters);
|
||||
}
|
||||
} else {
|
||||
return function(img,parameters) {
|
||||
this._img = img;
|
||||
this._onLoadDelegate = [parameters];
|
||||
|
||||
this._rootObj=document.createElement('span');
|
||||
this._rootObj.style.display="inline-block";
|
||||
this._rootObj.Wilq32 =
|
||||
{
|
||||
PhotoEffect: this
|
||||
};
|
||||
img.parentNode.insertBefore(this._rootObj,img);
|
||||
|
||||
if (img.complete) {
|
||||
this._Loader();
|
||||
} else {
|
||||
var self=this;
|
||||
// TODO: Remove jQuery dependency
|
||||
jQuery(this._img).bind("load", function(){ self._Loader(); });
|
||||
}
|
||||
}
|
||||
}
|
||||
})();
|
||||
|
||||
Wilq32.PhotoEffect.prototype = {
|
||||
_setupParameters : function (parameters){
|
||||
this._parameters = this._parameters || {};
|
||||
if (typeof this._angle !== "number") { this._angle = 0 ; }
|
||||
if (typeof parameters.angle==="number") { this._angle = parameters.angle; }
|
||||
this._parameters.animateTo = (typeof parameters.animateTo === "number") ? (parameters.animateTo) : (this._angle);
|
||||
|
||||
this._parameters.step = parameters.step || this._parameters.step || null;
|
||||
this._parameters.easing = parameters.easing || this._parameters.easing || this._defaultEasing;
|
||||
this._parameters.duration = 'duration' in parameters ? parameters.duration : parameters.duration || this._parameters.duration || 1000;
|
||||
this._parameters.callback = parameters.callback || this._parameters.callback || this._emptyFunction;
|
||||
this._parameters.center = parameters.center || this._parameters.center || ["50%","50%"];
|
||||
if (typeof this._parameters.center[0] == "string") {
|
||||
this._rotationCenterX = (parseInt(this._parameters.center[0],10) / 100) * this._imgWidth * this._aspectW;
|
||||
} else {
|
||||
this._rotationCenterX = this._parameters.center[0];
|
||||
}
|
||||
if (typeof this._parameters.center[1] == "string") {
|
||||
this._rotationCenterY = (parseInt(this._parameters.center[1],10) / 100) * this._imgHeight * this._aspectH;
|
||||
} else {
|
||||
this._rotationCenterY = this._parameters.center[1];
|
||||
}
|
||||
|
||||
if (parameters.bind && parameters.bind != this._parameters.bind) { this._BindEvents(parameters.bind); }
|
||||
},
|
||||
_emptyFunction: function(){},
|
||||
_defaultEasing: function (x, t, b, c, d) { return -c * ((t=t/d-1)*t*t*t - 1) + b },
|
||||
_handleRotation : function(parameters, dontcheck){
|
||||
if (!supportedCSS && !this._img.complete && !dontcheck) {
|
||||
this._onLoadDelegate.push(parameters);
|
||||
return;
|
||||
}
|
||||
this._setupParameters(parameters);
|
||||
if (this._angle==this._parameters.animateTo) {
|
||||
this._rotate(this._angle);
|
||||
}
|
||||
else {
|
||||
this._animateStart();
|
||||
}
|
||||
},
|
||||
|
||||
_BindEvents:function(events){
|
||||
if (events && this._eventObj)
|
||||
{
|
||||
// Unbinding previous Events
|
||||
if (this._parameters.bind){
|
||||
var oldEvents = this._parameters.bind;
|
||||
for (var a in oldEvents) if (oldEvents.hasOwnProperty(a))
|
||||
// TODO: Remove jQuery dependency
|
||||
jQuery(this._eventObj).unbind(a,oldEvents[a]);
|
||||
}
|
||||
|
||||
this._parameters.bind = events;
|
||||
for (var a in events) if (events.hasOwnProperty(a))
|
||||
// TODO: Remove jQuery dependency
|
||||
jQuery(this._eventObj).bind(a,events[a]);
|
||||
}
|
||||
},
|
||||
|
||||
_Loader:(function()
|
||||
{
|
||||
if (IE)
|
||||
return function() {
|
||||
var width=this._img.width;
|
||||
var height=this._img.height;
|
||||
this._imgWidth = width;
|
||||
this._imgHeight = height;
|
||||
this._img.parentNode.removeChild(this._img);
|
||||
|
||||
this._vimage = this.createVMLNode('image');
|
||||
this._vimage.src=this._img.src;
|
||||
this._vimage.style.height=height+"px";
|
||||
this._vimage.style.width=width+"px";
|
||||
this._vimage.style.position="absolute"; // FIXES IE PROBLEM - its only rendered if its on absolute position!
|
||||
this._vimage.style.top = "0px";
|
||||
this._vimage.style.left = "0px";
|
||||
this._aspectW = this._aspectH = 1;
|
||||
|
||||
/* Group minifying a small 1px precision problem when rotating object */
|
||||
this._container = this.createVMLNode('group');
|
||||
this._container.style.width=width;
|
||||
this._container.style.height=height;
|
||||
this._container.style.position="absolute";
|
||||
this._container.style.top="0px";
|
||||
this._container.style.left="0px";
|
||||
this._container.setAttribute('coordsize',width-1+','+(height-1)); // This -1, -1 trying to fix ugly problem with small displacement on IE
|
||||
this._container.appendChild(this._vimage);
|
||||
|
||||
this._rootObj.appendChild(this._container);
|
||||
this._rootObj.style.position="relative"; // FIXES IE PROBLEM
|
||||
this._rootObj.style.width=width+"px";
|
||||
this._rootObj.style.height=height+"px";
|
||||
this._rootObj.setAttribute('id',this._img.getAttribute('id'));
|
||||
this._rootObj.className=this._img.className;
|
||||
this._eventObj = this._rootObj;
|
||||
var parameters;
|
||||
while (parameters = this._onLoadDelegate.shift()) {
|
||||
this._handleRotation(parameters, true);
|
||||
}
|
||||
}
|
||||
else return function () {
|
||||
this._rootObj.setAttribute('id',this._img.getAttribute('id'));
|
||||
this._rootObj.className=this._img.className;
|
||||
|
||||
this._imgWidth=this._img.naturalWidth;
|
||||
this._imgHeight=this._img.naturalHeight;
|
||||
var _widthMax=Math.sqrt((this._imgHeight)*(this._imgHeight) + (this._imgWidth) * (this._imgWidth));
|
||||
this._width = _widthMax * 3;
|
||||
this._height = _widthMax * 3;
|
||||
|
||||
this._aspectW = this._img.offsetWidth/this._img.naturalWidth;
|
||||
this._aspectH = this._img.offsetHeight/this._img.naturalHeight;
|
||||
|
||||
this._img.parentNode.removeChild(this._img);
|
||||
|
||||
|
||||
this._canvas=document.createElement('canvas');
|
||||
this._canvas.setAttribute('width',this._width);
|
||||
this._canvas.style.position="relative";
|
||||
this._canvas.style.left = -this._img.height * this._aspectW + "px";
|
||||
this._canvas.style.top = -this._img.width * this._aspectH + "px";
|
||||
this._canvas.Wilq32 = this._rootObj.Wilq32;
|
||||
|
||||
this._rootObj.appendChild(this._canvas);
|
||||
this._rootObj.style.width=this._img.width*this._aspectW+"px";
|
||||
this._rootObj.style.height=this._img.height*this._aspectH+"px";
|
||||
this._eventObj = this._canvas;
|
||||
|
||||
this._cnv=this._canvas.getContext('2d');
|
||||
var parameters;
|
||||
while (parameters = this._onLoadDelegate.shift()) {
|
||||
this._handleRotation(parameters, true);
|
||||
}
|
||||
}
|
||||
})(),
|
||||
|
||||
_animateStart:function()
|
||||
{
|
||||
if (this._timer) {
|
||||
clearTimeout(this._timer);
|
||||
}
|
||||
this._animateStartTime = +new Date;
|
||||
this._animateStartAngle = this._angle;
|
||||
this._animate();
|
||||
},
|
||||
_animate:function()
|
||||
{
|
||||
var actualTime = +new Date;
|
||||
var checkEnd = actualTime - this._animateStartTime > this._parameters.duration;
|
||||
|
||||
// TODO: Bug for animatedGif for static rotation ? (to test)
|
||||
if (checkEnd && !this._parameters.animatedGif)
|
||||
{
|
||||
clearTimeout(this._timer);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this._canvas||this._vimage||this._img) {
|
||||
var angle = this._parameters.easing(0, actualTime - this._animateStartTime, this._animateStartAngle, this._parameters.animateTo - this._animateStartAngle, this._parameters.duration);
|
||||
this._rotate((~~(angle*10))/10);
|
||||
}
|
||||
if (this._parameters.step) {
|
||||
this._parameters.step(this._angle);
|
||||
}
|
||||
var self = this;
|
||||
this._timer = setTimeout(function()
|
||||
{
|
||||
self._animate.call(self);
|
||||
}, 10);
|
||||
}
|
||||
|
||||
// To fix Bug that prevents using recursive function in callback I moved this function to back
|
||||
if (this._parameters.callback && checkEnd){
|
||||
this._angle = this._parameters.animateTo;
|
||||
this._rotate(this._angle);
|
||||
this._parameters.callback.call(this._rootObj);
|
||||
}
|
||||
},
|
||||
|
||||
_rotate : (function()
|
||||
{
|
||||
var rad = Math.PI/180;
|
||||
if (IE)
|
||||
return function(angle)
|
||||
{
|
||||
this._angle = angle;
|
||||
this._container.style.rotation=(angle%360)+"deg";
|
||||
this._vimage.style.top = -(this._rotationCenterY - this._imgHeight/2) + "px";
|
||||
this._vimage.style.left = -(this._rotationCenterX - this._imgWidth/2) + "px";
|
||||
this._container.style.top = this._rotationCenterY - this._imgHeight/2 + "px";
|
||||
this._container.style.left = this._rotationCenterX - this._imgWidth/2 + "px";
|
||||
|
||||
}
|
||||
else if (supportedCSS)
|
||||
return function(angle){
|
||||
this._angle = angle;
|
||||
this._img.style[supportedCSS]="rotate("+(angle%360)+"deg)";
|
||||
this._img.style[supportedCSSOrigin]=this._parameters.center.join(" ");
|
||||
}
|
||||
else
|
||||
return function(angle)
|
||||
{
|
||||
this._angle = angle;
|
||||
angle=(angle%360)* rad;
|
||||
// clear canvas
|
||||
this._canvas.width = this._width;//+this._widthAdd;
|
||||
this._canvas.height = this._height;//+this._heightAdd;
|
||||
|
||||
// REMEMBER: all drawings are read from backwards.. so first function is translate, then rotate, then translate, translate..
|
||||
this._cnv.translate(this._imgWidth*this._aspectW,this._imgHeight*this._aspectH); // at least center image on screen
|
||||
this._cnv.translate(this._rotationCenterX,this._rotationCenterY); // we move image back to its orginal
|
||||
this._cnv.rotate(angle); // rotate image
|
||||
this._cnv.translate(-this._rotationCenterX,-this._rotationCenterY); // move image to its center, so we can rotate around its center
|
||||
this._cnv.scale(this._aspectW,this._aspectH); // SCALE - if needed ;)
|
||||
this._cnv.drawImage(this._img, 0, 0); // First - we draw image
|
||||
}
|
||||
|
||||
})()
|
||||
}
|
||||
|
||||
if (IE)
|
||||
{
|
||||
Wilq32.PhotoEffect.prototype.createVMLNode=(function(){
|
||||
document.createStyleSheet().addRule(".rvml", "behavior:url(#default#VML)");
|
||||
try {
|
||||
!document.namespaces.rvml && document.namespaces.add("rvml", "urn:schemas-microsoft-com:vml");
|
||||
return function (tagName) {
|
||||
return document.createElement('<rvml:' + tagName + ' class="rvml">');
|
||||
};
|
||||
} catch (e) {
|
||||
return function (tagName) {
|
||||
return document.createElement('<' + tagName + ' xmlns="urn:schemas-microsoft.com:vml" class="rvml">');
|
||||
};
|
||||
}
|
||||
})();
|
||||
}
|
||||
|
||||
})(jQuery);
|
||||
Vendored
+21
-9
@@ -1,10 +1,22 @@
|
||||
;
|
||||
jQuery('.spoiler-title').on('click', function () {
|
||||
let content = jQuery(this).parent().next();
|
||||
if (content.hasClass('collapse')) {
|
||||
content.height(content[0].scrollHeight).removeClass('collapse')
|
||||
} else {
|
||||
content.height(0).addClass('collapse')
|
||||
}
|
||||
});
|
||||
jQuery(document).ready(function () {
|
||||
jQuery('.spoiler-title').on('click', function () {
|
||||
let content = jQuery(this).parent().next();
|
||||
if (content.hasClass('collapse')) {
|
||||
content.height(content[0].scrollHeight).removeClass('collapse')
|
||||
} else {
|
||||
content.height(0).addClass('collapse')
|
||||
}
|
||||
})
|
||||
|
||||
var previewEle = jQuery('#nexus-preview')
|
||||
jQuery("body").on("mouseover", ".preview", function (e) {
|
||||
console.log(e)
|
||||
let src = jQuery(this).attr("src")
|
||||
if (src) {
|
||||
previewEle.attr("src", src).css({"display": "block", "left": e.pageX + 5, "top": e.pageY + 5})
|
||||
}
|
||||
});
|
||||
jQuery("body").on("mouseout", ".preview", function (e) {
|
||||
previewEle.hide()
|
||||
});
|
||||
})
|
||||
|
||||
+10
-73
@@ -5,6 +5,7 @@ loggedinorreturn();
|
||||
if (get_user_class() < UC_ADMINISTRATOR)
|
||||
stderr("Sorry", "Access denied.");
|
||||
stdhead("Mass PM", false);
|
||||
$classes = array_chunk(\App\Models\User::$classes, 4, true);
|
||||
?>
|
||||
<table class=main width=737 border=0 cellspacing=0 cellpadding=0><tr><td class=embedded>
|
||||
<div align=center>
|
||||
@@ -30,79 +31,15 @@ if ($_GET["sent"] == 1) {
|
||||
<tr>
|
||||
<td><b>Send to:</b><br />
|
||||
<table style="border: 0" width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td style="border: 0" width="20"><input type="checkbox" name="clases[]" value="0">
|
||||
</td>
|
||||
<td style="border: 0">Peasant</td>
|
||||
|
||||
<td style="border: 0" width="20"><input type="checkbox" name="clases[]" value="1">
|
||||
</td>
|
||||
<td style="border: 0">User</td>
|
||||
|
||||
<td style="border: 0" width="20"><input type="checkbox" name="clases[]" value="2">
|
||||
</td>
|
||||
<td style="border: 0">Power User</td>
|
||||
|
||||
<td style="border: 0" width="20"><input type="checkbox" name="clases[]" value="3">
|
||||
</td>
|
||||
<td style="border: 0">Elite User</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border: 0" width="20"><input type="checkbox" name="clases[]" value="4">
|
||||
</td>
|
||||
<td style="border: 0">Crazy User</td>
|
||||
|
||||
<td style="border: 0" width="20"><input type="checkbox" name="clases[]" value="5">
|
||||
</td>
|
||||
<td style="border: 0">Insane User</td>
|
||||
|
||||
<td style="border: 0" width="20"><input type="checkbox" name="clases[]" value="6">
|
||||
</td>
|
||||
<td style="border: 0">Veteran User</td>
|
||||
|
||||
<td style="border: 0" width="20"><input type="checkbox" name="clases[]" value="7">
|
||||
</td>
|
||||
<td style="border: 0">Extreme User</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="border: 0" width="20"><input type="checkbox" name="clases[]" value="8">
|
||||
</td>
|
||||
<td style="border: 0">Ultimate User</td>
|
||||
|
||||
<td style="border: 0" width="20"><input type="checkbox" name="clases[]" value="9">
|
||||
</td>
|
||||
<td style="border: 0">Nexus Master</td>
|
||||
|
||||
<td style="border: 0" width="20"><input type="checkbox" name="clases[]" value="10">
|
||||
</td>
|
||||
<td style="border: 0">VIP</td>
|
||||
|
||||
<td style="border: 0" width="20"><input type="checkbox" name="clases[]" value="11">
|
||||
</td>
|
||||
<td style="border: 0">Uploader</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="border: 0" width="20"><input type="checkbox" name="clases[]" value="12">
|
||||
</td>
|
||||
<td style="border: 0">Moderator</td>
|
||||
|
||||
<td style="border: 0" width="20"><input type="checkbox" name="clases[]" value="13">
|
||||
</td>
|
||||
<td style="border: 0">Administrator</td>
|
||||
|
||||
<td style="border: 0" width="20"><input type="checkbox" name="clases[]" value="14">
|
||||
</td>
|
||||
<td style="border: 0">SysOp</td>
|
||||
|
||||
<td style="border: 0" width="20"><input type="checkbox" name="clases[]" value="15">
|
||||
</td>
|
||||
<td style="border: 0">Staff Leader</td>
|
||||
|
||||
<td style="border: 0"> </td>
|
||||
<td style="border: 0"> </td>
|
||||
</tr>
|
||||
<?php
|
||||
foreach ($classes as $chunk) {
|
||||
printf('<tr>');
|
||||
foreach ($chunk as $class => $info) {
|
||||
printf('<td style="border: 0"><label><input type="checkbox" name="clases[]" value="%s" />%s</label></td>', $class, $info['text']);
|
||||
}
|
||||
printf('</tr>');
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Vendored
+32
@@ -498,3 +498,35 @@ img.hitandrun {
|
||||
.layui-layer {
|
||||
color: black;
|
||||
}
|
||||
.layer-form {
|
||||
padding: 10px 15px;
|
||||
}
|
||||
.layer-form .form-control-row input{
|
||||
padding: 4px;
|
||||
}
|
||||
.layer-form .form-control-row .label{
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.rainbow {
|
||||
text-align: center;
|
||||
text-decoration: underline;
|
||||
/*font-size: 32px;*/
|
||||
font-family: monospace;
|
||||
/*letter-spacing: 5px;*/
|
||||
background: linear-gradient(to right, #6666ff, #0099ff , #00ff00, #ff3399, #6666ff);
|
||||
-webkit-background-clip: text;
|
||||
background-clip: text;
|
||||
color: transparent;
|
||||
animation: rainbow_animation 6s ease-in-out infinite;
|
||||
background-size: 400% 100%;
|
||||
}
|
||||
|
||||
@keyframes rainbow_animation {
|
||||
0%,100% {
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
50% {
|
||||
background-position: 100% 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ require "../include/bittorrent.php";
|
||||
if ($_SERVER["REQUEST_METHOD"] != "POST")
|
||||
stderr("Error", "Permission denied!");
|
||||
dbconn();
|
||||
loggedinorreturn();
|
||||
loggedinorreturn();
|
||||
|
||||
if (get_user_class() < UC_ADMINISTRATOR)
|
||||
stderr("Sorry", "Permission denied.");
|
||||
@@ -25,10 +25,26 @@ if (is_array($updateset)) {
|
||||
stderr("Error","Invalid Class");
|
||||
}
|
||||
$subject = trim($_POST['subject']);
|
||||
$query = sql_query("SELECT id FROM users WHERE class IN (".implode(",", $updateset).")");
|
||||
while($dat=mysql_fetch_assoc($query))
|
||||
{
|
||||
sql_query("INSERT INTO messages (sender, receiver, added, subject, msg) VALUES ($sender_id, {$dat['id']}, $dt, " . sqlesc($subject) .", " . sqlesc($msg) .")") or sqlerr(__FILE__,__LINE__);
|
||||
$size = 10000;
|
||||
$page = 1;
|
||||
set_time_limit(300);
|
||||
$classStr = implode(",", $updateset);
|
||||
while (true) {
|
||||
$msgValues = $idArr = [];
|
||||
$offset = ($page - 1) * $size;
|
||||
$query = sql_query("SELECT id FROM users WHERE class IN (".implode(",", $updateset).") and `enabled` = 'yes' and `status` = 'confirmed'");
|
||||
while($dat=mysql_fetch_assoc($query))
|
||||
{
|
||||
$idArr[] = $dat['id'];
|
||||
$msgValues[] = sprintf('(%s, %s, %s, %s, %s)', $sender_id, $dat['id'], $dt, sqlesc($subject), sqlesc($msg));
|
||||
}
|
||||
if (empty($idArr)) {
|
||||
break;
|
||||
}
|
||||
$idStr = implode(', ', $idArr);
|
||||
$sql = "INSERT INTO messages (sender, receiver, added, subject, msg) VALUES " . implode(', ', $msgValues);
|
||||
sql_query($sql);
|
||||
$page++;
|
||||
}
|
||||
|
||||
header("Refresh: 0; url=staffmess.php?sent=1");
|
||||
|
||||
+59
-8
@@ -29,6 +29,7 @@ if ($user["status"] == "pending")
|
||||
stderr($lang_userdetails['std_sorry'], $lang_userdetails['std_user_not_confirmed']);
|
||||
|
||||
$userInfo = \App\Models\User::query()->with(['valid_medals'])->findOrFail($user['id']);
|
||||
$userRep = new \App\Repositories\UserRepository();
|
||||
|
||||
if ($user['added'] == "0000-00-00 00:00:00" || $user['added'] == null)
|
||||
$joindate = $lang_userdetails['text_not_available'];
|
||||
@@ -279,6 +280,14 @@ tr_small($lang_userdetails['row_donated'], "$".htmlspecialchars($user['donated']
|
||||
if ($user["avatar"])
|
||||
tr_small($lang_userdetails['row_avatar'], return_avatar_image(htmlspecialchars(trim($user["avatar"]))), 1);
|
||||
|
||||
$uclass = get_user_class_image($user["class"]);
|
||||
$utitle = get_user_class_name($user["class"],false,false,true);
|
||||
$uclassImg = "<img alt=\"".get_user_class_name($user["class"],false,false,true)."\" title=\"".get_user_class_name($user["class"],false,false,true)."\" src=\"".$uclass."\" /> ".($user['title']!=="" ? " ".htmlspecialchars(trim($user["title"]))."" : "");
|
||||
if ($user['class'] == UC_VIP && !empty($user['vip_until']) && strtotime($user['vip_until'])) {
|
||||
$uclassImg .= sprintf('%s: %s', $lang_userdetails['row_vip_until'], $user['vip_until']);
|
||||
}
|
||||
tr_small($lang_userdetails['row_class'], $uclassImg, 1);
|
||||
|
||||
if ($userInfo->valid_medals->isNotEmpty()) {
|
||||
tr_small($lang_userdetails['row_medal'], build_medal_image($userInfo->valid_medals, 200, $CURUSER['id'] == $user['id']), 1);
|
||||
$warnMedalJs = <<<JS
|
||||
@@ -289,21 +298,63 @@ jQuery('input[type="checkbox"][name="medal_wearing_status"]').on("change", funct
|
||||
console.log(response)
|
||||
if (response.ret != 0) {
|
||||
input.prop("checked", !checked)
|
||||
alert(response.msg)
|
||||
layer.alert(response.msg)
|
||||
}
|
||||
}, 'json')
|
||||
})
|
||||
JS;
|
||||
\Nexus\Nexus::js($warnMedalJs, 'footer', false);
|
||||
}
|
||||
|
||||
$uclass = get_user_class_image($user["class"]);
|
||||
$utitle = get_user_class_name($user["class"],false,false,true);
|
||||
$uclassImg = "<img alt=\"".get_user_class_name($user["class"],false,false,true)."\" title=\"".get_user_class_name($user["class"],false,false,true)."\" src=\"".$uclass."\" /> ".($user['title']!=="" ? " ".htmlspecialchars(trim($user["title"]))."" : "");
|
||||
if ($user['class'] == UC_VIP && !empty($user['vip_until']) && strtotime($user['vip_until'])) {
|
||||
$uclassImg .= sprintf('%s: %s', $lang_userdetails['row_vip_until'], $user['vip_until']);
|
||||
//User meta
|
||||
$metas = $userRep->listMetas($CURUSER['id']);
|
||||
$props = [];
|
||||
$metaKey = \App\Models\UserMeta::META_KEY_CHANGE_USERNAME;
|
||||
if ($metas->has($metaKey)) {
|
||||
$triggerId = "consume-$metaKey";
|
||||
$changeUsernameCards = $metas->get($metaKey);
|
||||
$cardName = $changeUsernameCards->first()->meta_key_text;
|
||||
$props[] = sprintf(
|
||||
'<div><strong>[%s]</strong>(%s)<input type="button" value="%s" id="%s"></div>',
|
||||
$cardName, $changeUsernameCards->count(), $lang_userdetails['consume'], $triggerId
|
||||
);
|
||||
$consumeChangeUsernameForm = <<<HTML
|
||||
<div class="layer-form">
|
||||
<form id="layer-form-$metaKey">
|
||||
<input type="hidden" name="params[meta_key]" value="$metaKey">
|
||||
<div class="form-control-row">
|
||||
<div class="label">{$lang_userdetails['meta_key_change_username_username']}</div>
|
||||
<div class="field"><input type="text" name="params[username]"></div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
HTML;
|
||||
$consumeChangeUsernameJs = <<<JS
|
||||
jQuery('#{$triggerId}').on("click", function () {
|
||||
layer.open({
|
||||
type: 1,
|
||||
title: "{$lang_userdetails['consume']} {$cardName}",
|
||||
content: `$consumeChangeUsernameForm`,
|
||||
btn: ['OK'],
|
||||
btnAlign: 'c',
|
||||
yes: function () {
|
||||
let params = jQuery('#layer-form-{$metaKey}').serialize()
|
||||
jQuery.post('ajax.php', params + "&action=consumeBenefit", function (response) {
|
||||
console.log(response)
|
||||
if (response.ret != 0) {
|
||||
layer.alert(response.msg)
|
||||
return
|
||||
}
|
||||
window.location.reload()
|
||||
}, 'json')
|
||||
}
|
||||
})
|
||||
})
|
||||
JS;
|
||||
\Nexus\Nexus::js($consumeChangeUsernameJs, 'footer', false);
|
||||
}
|
||||
if (!empty($props)) {
|
||||
tr_small($lang_userdetails['row_user_props'], sprintf('<div style="display: inline">%s</div>', implode(' | ', $props)), 1);
|
||||
}
|
||||
tr_small($lang_userdetails['row_class'], $uclassImg, 1);
|
||||
|
||||
tr_small($lang_userdetails['row_torrent_comment'], ($torrentcomments && ($user["id"] == $CURUSER["id"] || get_user_class() >= $viewhistory_class) ? "<a href=\"userhistory.php?action=viewcomments&id=".$id."\" title=\"".$lang_userdetails['link_view_comments']."\">".$torrentcomments."</a>" : $torrentcomments), 1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user