diff --git a/_unused-files/h.js b/_unused-files/h.js index 46bf1f3..8030e01 100644 --- a/_unused-files/h.js +++ b/_unused-files/h.js @@ -43,21 +43,21 @@ H.prototype.get = function(key, defaultValue){ H.prototype.setHP = function(id, curHP, maxHP){ curHP = curHP || 0; maxHP = maxHP || 0; - var hp = this.getMainBox().find('#hpKey_'+id); + const hp = this.getMainBox().find('#hpKey_' + id); if(hp.length < 1){ return false; } - var hpA = $('img:eq(1)', hp); - var hpB = $('img:eq(2)', hp); - var redHP = 0.33; // меньше 30% красный цвет - var yellowHP = 0.66; // меньше 60% желтый цвет, иначе зеленый + const hpA = $('img:eq(1)', hp); + const hpB = $('img:eq(2)', hp); + const redHP = 0.33; // меньше 30% красный цвет + const yellowHP = 0.66; // меньше 60% желтый цвет, иначе зеленый if(curHP > maxHP){ curHP = maxHP; } - var text = curHP + '/' + maxHP; - var lengthHP = 170 - (text.length - 1) * 8; - var sizeFirst = Math.round((lengthHP / maxHP) * curHP); - var sizeSecond = lengthHP - sizeFirst; + const text = curHP + '/' + maxHP; + const lengthHP = 170 - (text.length - 1) * 8; + const sizeFirst = Math.round((lengthHP / maxHP) * curHP); + const sizeSecond = lengthHP - sizeFirst; hpA.attr('width', sizeFirst); hpB.attr('width', sizeSecond); if(curHP / maxHP < redHP){ @@ -116,15 +116,19 @@ H.prototype.sdOptionsDefault = { H.prototype._sd = function(options){ options = $.extend({}, this.sdOptionsDefault, options); - var m = $('
').css('width',options.width); - var t = $('
').text(options.title); - var c = $('X') - .click(function(){return options.onClose.call($(this).closest('div.sd-container'))}); - var f = $('
') - .attr('method', options.formMethod) - .attr('action', options.formAction) - .submit(function(){return options.onSubmit.call($(this).closest('div.sd-container'))}); - for(var i in options.data){ + const m = $('
').css('width', options.width); + const t = $('
').text(options.title); + const c = $('X') + .click(function () { + return options.onClose.call($(this).closest('div.sd-container')) + }); + const f = $('
') + .attr('method', options.formMethod) + .attr('action', options.formAction) + .submit(function () { + return options.onSubmit.call($(this).closest('div.sd-container')) + }); + for(let i in options.data){ $('').attr('name',i).val(options.data[i]).appendTo(f); } if(options.formClass){ @@ -135,18 +139,18 @@ H.prototype._sd = function(options){ } H.prototype.sd = function(options){ - var tmp = this._sd(options); - return this.getMainBox().append(tmp); + const tmp = this._sd(options); + return this.getMainBox().append(tmp); } H.prototype.sdOneInput = function(options){ - var onSubmit2 = options.onSubmit; - options = $.extend({},this.sdOptionsDefault, {inputName: 'target', inputValue: '', grabber: null}, options); - var i = $('') - .css({'width': options.width - 45}) - .attr('name',options.inputName) - .val(options.inputValue); - if(options.grabber && this[options.grabber] instanceof Grabber){ + let onSubmit2 = options.onSubmit; + options = $.extend({},this.sdOptionsDefault, {inputName: 'target', inputValue: '', grabber: null}, options); + const i = $('') + .css({'width': options.width - 45}) + .attr('name', options.inputName) + .val(options.inputValue); + if(options.grabber && this[options.grabber] instanceof Grabber){ this[options.grabber].set(i); }else{ i.select(); @@ -155,8 +159,8 @@ H.prototype.sdOneInput = function(options){ .append(i) .append('')); options.onSubmit = function(){ - var v = i.val($.trim(i.val())).val(); - if(v.length <= 0){ + const v = i.val($.trim(i.val())).val(); + if(v.length <= 0){ alert('Не заполнено обязательное поле'); return false } @@ -216,7 +220,7 @@ H.prototype.msgPopup = function(type, text){ if(this._popupConfig[type] == undefined){ type = 'w'; } - var conf = this._popupConfig[type]; + const conf = this._popupConfig[type]; $.jGrowl(text,{ header: '<> ' + conf[1], glue: 'before', @@ -251,10 +255,10 @@ Grabber.prototype.isActive = function(){ } Grabber.prototype.set = function(input){ - var obj = this; - this.clear(); - var tmp = $(input); - if(tmp.length > 0){ + const obj = this; + this.clear(); + const tmp = $(input); + if(tmp.length > 0){ this.input = tmp.get(0); $(this.input) .addClass(this.options.inputClass) diff --git a/admin/admin.php b/admin/admin.php index 96bfd5a..6eff026 100644 --- a/admin/admin.php +++ b/admin/admin.php @@ -1043,17 +1043,17 @@ if ($_POST['login'] && $_POST['krest']) { ?> "; exit(); - + - +
@@ -557,28 +558,28 @@ hr { height: 1px; }
  @@ -267,22 +269,22 @@ if(isset($_POST['leaveZv'])) {
@@ -705,7 +705,7 @@ if(in_array($me_room, $ar_150)){ $me_150 = 1; } - if(!in_array($serch_room, $ar_all)){ } +// if(!in_array($serch_room, $ar_all)){ } echo '
  • "'.$locations_normal[$serch_room].'"
  • '; @@ -732,20 +732,20 @@ if(in_array($me_room, $ar_150)){ $me_150 = 1; } ?>