Software: Apache/2.2.22 (Debian). PHP/5.6.36 uname -a: Linux h05.hvosting.ua 4.9.110-amd64 #3 SMP Sun Nov 4 16:27:09 UTC 2018 x86_64 uid=1389(h33678) gid=1099(h33678) groups=1099(h33678),502(mgrsecure) Safe-mode: OFF (not secure) /home/h33678/data/www/zt-tsou.org.ua/js/ drwxr-xr-x |
Viewing file: Select action/file-type: var AMViewer = { CurrentPhoto : null, PhotosArray : null, Init : function() { $("a.amviewer").click(function() { var album = $(this).parents(".photos").attr('val'); var order = $(this).parents(".photos").attr('order'); AMViewer.ShowAlbumViewer($("ul.photos").attr('val') || $(this).attr('album') || album, $(this).attr('val'), order); return false; }); var obj = $("#amviewer .photo img"); window.onresize = AMViewer.WindowResize; obj.bind('load', AMViewer.LoadImage); $("#amviewer-layer, #amviewer .close").live('click', function() { AMViewer.Close(); return false; }); obj.bind('drag, dragdrop, dragstart, contextmenu', function(){return false;}).disableSelection(); var reg=/photo(\d+)/ var arr=reg.exec(location.hash); if (arr) if (arr[1] > 0) { var current_image = $("[val=" + arr[1] + "]"); AMViewer.ShowAlbumViewer(2, arr[1], 1); } $("#amviewer .photo-edit.enabled").live('click', function() { $("#amviewer div.photo-description").replaceWith('<textarea class="photo-description" style="width:99%; height: 100px; display: block;">' + Utils.strip_tags($("#amviewer .photo-description").text()) + '</textarea><button class="save-photo-edit">Сохранить</button><button class="cancel-photo-edit">Отмена</button>'); $("#amviewer .save-photo-edit, #amviewer .cancel-photo-edit").button(); $("#amviewer .cancel-photo-edit").click(function() { $.post("/user-asynch.php?mod=Photochapter&photo_id=" + AMViewer.PhotosArray['photos']['ids'][AMViewer.CurrentPhoto], "", function(data) { $("#amviewer textarea.photo-description").replaceWith('<div class="photo-description" style="display: block;">' + data.description + '</div>'); $("#amviewer .save-photo-edit, #amviewer .cancel-photo-edit").remove(); }, 'json'); }); $("#amviewer .save-photo-edit").click(function() { var str = ""; str = "photo_description=" + $("#amviewer textarea.photo-description").val(); $.post("/user-asynch.php?mod=Photochapter&oper=edit&photo_id=" + AMViewer.PhotosArray['photos']['ids'][AMViewer.CurrentPhoto], str, function(data) { $("#amviewer textarea.photo-description").replaceWith('<div class="photo-description" style="display: block;">' + data.description + '</div>'); $("#amviewer .save-photo-edit, #amviewer .cancel-photo-edit").remove(); /* $("#amviewer .save-photo-edit, #amviewer .cancel-photo-edit").remove(); $(".photo-description").after('<div class="message-ok" style="text-align:left;">Сохранено</div>').next().hide(0).slideDown(250).delay(2000).slideUp(250);*/ }, 'json'); }); return false; }); }, ParseHash: function(hash) { var reg=/photo(\d+)/ var arr=reg.exec(hash); if (arr) if (arr[1] > 0) return arr[1]; return null; }, Close : function() { $("body").css({ "overflow" : "auto"}); $("body").width("auto"); $("#amviewer .photo img").attr('src', ''); $("#amviewer-layer").hide(0); $("#amviewer").hide(0); var num = AMViewer.ParseHash(AMViewer.hash); if (num != null) { var y = $(window).scrollTop(); location.hash = ''; $(window).scrollTop(y); } else { var y = $(window).scrollTop(); location.hash = AMViewer.hash; $(window).scrollTop(y); } }, LoadImage : function() { var obj = $("#amviewer .photo img"); $("#amviewer").css({'opacity' : 1}); AMViewer.WindowResize(); obj.animate({'opacity' : 1}, 0); }, WindowResize : function() { $(".photos-list-block .photos").css({'margin' : '0', 'text-align' : 'center', 'display' : 'inline'}); var w = $(".photos-list-block .photos").width(); $(".photos-list-block .photos").width(w); $(".photos-list-block .photos").css({'margin' : '0 auto', 'text-align' : 'left', 'display' : 'block'}); var obj = $("#amviewer .photo img"); var am = $("#amviewer"); obj.removeAttr("width").removeAttr("height").css({ width: "", height: "" }); var h = obj.height(); var w = obj.width(); var k = 1; var kh = k * h / ((am.height() - 70)); var kw = 1.0 * w / ((am.width() - 50 )); if (kh > 1 || kw > 1) { if (kh >= kw) obj.height(h / kh); else obj.width(w / kw ); } $("#amviewer .photo").height(obj.height()); }, ShowAlbumViewer : function(album, photo, order) { if (order == null) order = "default"; $.post("/user-asynch.php?mod=Photochapter&oper=getfiles&album_id="+album+"&photo_id=" + photo + '&order=' + order, "", function(data) { if (data.status == 'error') UserInterface.showAccessErrorPopup(data.message); AMViewer.hash = location.hash; AMViewer.PhotosArray = data; AMViewer.CurrentPhoto = data['photos']['ids'].indexOf(photo); AMViewer.body_width = $("body").width(); $("body").css({ "overflow" : "hidden"}); $("body").width(AMViewer.body_width); $("#amviewer").css({'display' : 'block', 'opacity' : 0}); AMViewer.Show(); }, 'json'); return ; }, Next : function() { AMViewer.CurrentPhoto++; AMViewer.CurrentPhoto = AMViewer.CurrentPhoto % AMViewer.PhotosArray['photos']['files'].length; $("#amviewer textarea.photo-description").replaceWith('<div class="photo-description" style="display: block;">' + '</div>'); $("#amviewer .save-photo-edit, #amviewer .cancel-photo-edit").remove(); AMViewer.Show(); }, Prev : function() { AMViewer.CurrentPhoto--; if (AMViewer.CurrentPhoto < 0) AMViewer.CurrentPhoto = AMViewer.PhotosArray['photos']['files'].length - 1; $("#amviewer textarea.photo-description").replaceWith('<div class="photo-description" style="display: block;">' + '</div>'); $("#amviewer .save-photo-edit, #amviewer .cancel-photo-edit").remove(); AMViewer.Show(); }, Show : function() { var amviewer = $("#amviewer"); var obj = $("#amviewer .photo img"); obj.css({'opacity' : 0}); $("#amviewer").css({'overflow-x' : 'visible'}); obj.attr('src', '/data/photochapter/' + AMViewer.PhotosArray['photos']['files'][AMViewer.CurrentPhoto]); amviewer.find(".photo-count").html(AMViewer.PhotosArray['photos']['files'].length); amviewer.find(".photo-number").html(AMViewer.CurrentPhoto + 1); $.post("/user-asynch.php?mod=Photochapter&photo_id=" + AMViewer.PhotosArray['photos']['ids'][AMViewer.CurrentPhoto], "", function(data) { if(data.status == 'error') { UserInterface.showAccessErrorPopup(data.message); return; } $(window).unbind(); location.hash = '#photo' + AMViewer.PhotosArray['photos']['ids'][AMViewer.CurrentPhoto]; if (data.allow_edit) amviewer.find(".photo-edit").removeClass('disabled').addClass('enabled'); else amviewer.find(".photo-edit").removeClass('enabled').addClass('disabled'); amviewer.find(".photo-date").html(data.date); amviewer.find(".hearts-count").html(data.hearts); amviewer.find(".hearts-block.photochapter").attr('val', data.id); if (data.like) amviewer.find(".hearts-block.photochapter .heart").addClass('selected'); else amviewer.find(".hearts-block.photochapter .heart").removeClass('selected'); if (data.description.length == 0) { amviewer.find(".photo-description").html(""); amviewer.find("div.photo-description").css({'display' : 'none'}); } else { if ($(".photo-description").is("div")) amviewer.find(".photo-description").html(data.description); if ($(".photo-description").is("textarea")) amviewer.find(".photo-description").html(Utils.strip_tags(data.description)); amviewer.find(".photo-description").show(0); } if (data.rating.length > 0) { amviewer.find(".photo-rating-block").show(0); amviewer.find(".photo-rating").html(data.rating); amviewer.find(".hearts-block.photochapter").css({'display' : 'none'}); } else { amviewer.find(".hearts-block.photochapter").show(0); amviewer.find(".photo-rating-block").hide(0); amviewer.find(".photo-rating").html(''); } amviewer.find(".photo-user").html(data.user); amviewer.find(".photo-album").html(data.album); amviewer.find(".comments").html(data.comments); amviewer.find(".comments button").button(); var lData = data; if (lData.disable_comments == 'Y') { amviewer.find(".new-comment").hide(0); amviewer.find(".comments-disabled").show(0); } else { amviewer.find(".new-comment").show(0); amviewer.find(".comments-disabled").hide(0); } amviewer.find('.page-navigator a').live('click', function() { $.post("/user-asynch.php?mod=Photochapter&getcomments=" + $(this).text() + "&photo_id=" + AMViewer.PhotosArray['photos']['ids'][AMViewer.CurrentPhoto], "", function(data) { amviewer.find(".comments").html(data.comments); if (lData.disable_comments == 'Y') { amviewer.find(".new-comment").hide(0); amviewer.find(".comments-disabled").show(0); } else { amviewer.find(".new-comment").show(0); amviewer.find(".comments-disabled").hide(0); } }, 'json'); // location.reload(); return false; }); $("#amviewer-layer").show(0); }, 'json'); } }; var UserInterface = { init : function() { $(".popup-message, .block-window").live('click', function() { $(".popup-message, .block-window").remove(); $("body").css({ "overflow" : "visible"}); $("body").width("auto"); }); $(".search-panel .search").blur(function(e) { if ($(this).val() == "") { $(this).val($(this).attr('val')); $(this).css({'color' : 'gray'}); } }); $(".search-panel .search").focus(function(e) { if ($(this).val() == $(this).attr('val')) { $(this).val(""); $(this).css({'color' : 'black'}); } }); $("a[href^='http://']:not([href^='" + location.host.toString() + "'])").attr('target','_blank'); $(".main-stop-animation").click( function() { if ($.cookie("animation") == 'off') return; if (typeof(photoLineTimer) != 'undefined') clearInterval(photoLineTimer); $(".main-stop-animation .icon").removeClass('active'); $(".main-start-animation .icon").addClass('active'); $.cookie("animation", "off", { expires: 60, path: '/' }); return false; }); $(".main-start-animation").click( function() { if ($.cookie("animation") != 'off') return; photoLineTimer = setInterval(UserInterface.PhotoLineStep, 5000); $.cookie("animation", "on", { expires: 60, path: '/' }); $(".main-stop-animation .stop").addClass('active'); $(".main-start-animation .start").removeClass('active'); return false; }); if ($(".photos.mainpage span").length > 0) setInterval(function() { var count = 0; var val = $(".photos.mainpage span:first").position().top; $(".photos.mainpage span").each(function(i, elem) { if (val == $(elem).position().top) count++; }); $(".photos.mainpage").fadeOut(500, function() { $(".photos.mainpage span:lt(" + (count + 1) + ")").insertAfter(".photos.mainpage span:last"); $(".photos.mainpage").fadeIn(500); }); }, 15000); $(".template-page .manage-panel a.submenu").mouseleave(function() { var obj = $(this).next(); t1 = setTimeout(function() { obj.hide(100); }, 2000); }); $(".template-page .manage-panel ul.submenu").mouseenter(function() { clearTimeout(t1); }); $(".template-page .manage-panel ul.submenu").mouseleave(function() { var obj = $(this); t1 = setTimeout(function() { obj.hide(100); }, 1000); }); $(".template-page .manage-panel a.submenu").click(function() { $(this).next().show(100); if (t1 == 0) clearTimeout(t1); return false; }); }, PhotoLineStep:function() { $(".line-photos").animate( {"left" : "-="+$(".line-photos img").width() + "px"}, 1000, function() { $(".line-photos span:first").insertAfter(".line-photos span:last"); $(".line-photos").css( {"left" : "0px"}); }); }, firstInit: function() { if ($.cookie("animation") != 'off') { photoLineTimer = setInterval(UserInterface.PhotoLineStep, 5000); $(".main-stop-animation .stop").addClass('active'); $(".main-start-animation .start").removeClass('active'); } else { $(".main-stop-animation .stop").removeClass('active'); $(".main-start-animation .start").addClass('active'); } var w = $(".photos-list-block .photos").width(); $(".photos-list-block .photos").width(w); $(".photos-list-block .photos").css({'margin' : '0 auto', 'text-align' : 'left', 'display' : 'block'}); }, showAccessErrorPopup : function(message) { UserInterface.body_width = $("body").width(); $("body").css({ "overflow" : "hidden"}); $("body").width(UserInterface.body_width); $("body .block-window, body .popup-message").remove(); $("body").append('<div class="block-window"></div><table class="popup-message"><tr><td>' + message + '</td></tr></table></div>'); } }; var Utils = { strip_tags : function(string) { return string.replace(/<\/?[^>]+>/gi, ''); } }; UserInterface.firstInit(); t1 = 0; var newsIndex = 1; $(document).ready( function() { UserInterface.init(); AMViewer.Init(); var maxH = 0; $(".News.Panel .row").each(function() { if ($(this).outerHeight(true) > maxH) maxH = $(this).outerHeight(true); }); if (maxH < 120) maxH = 120; // alert(maxH); $(".News.Panel").height(maxH); // $(".News.Panel .row").height(maxH); $(".News.Panel .row:gt(0)").hide(0); setInterval(function() { $(".News.Panel .row:visible").fadeOut(1000, function() { $(".News.Panel .row:eq("+ newsIndex +")").fadeIn(1000); newsIndex++; if (newsIndex >= $(".News.Panel .row").length) newsIndex = 0; }); }, 10000); // alert(maxH); // $(".News.Panel .row").height(maxH); $('.noSelect').disableSelection(); $(".faq .h").toggle(function() { $(this).next().show(500); }, function() { $(this).next().hide(500); }); CKEDITOR.config.toolbar_Full1 = [ ['Source','-','Save','NewPage'], ['Cut','Copy','Paste','PasteText','PasteFromWord','-','Scayt'], ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'], '/', ['Bold','Italic','Underline','Strike','-','Subscript','Superscript'], ['NumberedList','BulletedList','-','Outdent','Indent','CreateDiv'], ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'], ['Link','Unlink','Anchor'], ['MediaEmbed','Image','Flash','Table','HorizontalRule','SpecialChar',], '/', ['Styles','Format','Font','FontSize'], ['TextColor','BGColor'], ['Maximize', 'ShowBlocks','-','About'] ]; $('.user-ckeditor').ckeditor( function() { /* callback code */ }, { toolbar : 'Full1', width: 750 } ); $("#current-language img").click(function() { $(".ukr, .rus, .eng").css('display', 'none'); $("."+$(this).attr('lang')).css('display', 'block'); }); $(".input-back-content").focus(function(e) { if ($(this).val() == $(this).attr('defval')) { $(this).val(""); $(this).css({'color' : 'black'}); } }); $(".input-back-content").blur(function(e) { if ($(this).val() == "") { $(this).val($(this).attr('defval')); $(this).css({'color' : 'gray'}); } }); $(".sortable:not(.nonsortable)").sortable(); $("a.fancybox").fancybox(); $(".Photo-Line li a").fancybox({ 'titlePosition' : 'over', 'showCloseButton' : 'true' }); $("button").button(); $("form").live('keydown', function(event) { if((event.ctrlKey) && ((event.keyCode == 0xA)||(event.keyCode == 0xD))) { $(this).find("button.send").trigger('click'); } }); /* $(".inbox-view-message").keydown(function(event) { if((event.ctrlKey) && ((event.keyCode == 0xA)||(event.keyCode == 0xD))) { $(".inbox-view-message button.send").trigger('click'); } });*/ $("form[name=message-view-form]").ajaxForm(); $(".inbox-view-message button.back").click( function() { history.back(); }); $(".inbox-view-message button.send").click( function() { $(this).attr('disabled', true); str = $("form[name=message-view-form]").serialize(); $.post("/user-asynch.php?mod=Users", str, function(data) { $(this).attr('disabled', false); if (data.status == 'ok') { $(".inbox-view-message").html(data.html); } else { alert("{$ULANG.UsersMessageSendError}"); } }, 'json'); }); $(".inbox-view-message button.delete").click( function() { $.post("/user-asynch.php?mod=Users", "delmessage=" + $(this).attr('value'), function(data) { location.href = '/user/inbox'; }, 'json'); }); $(".inbox-view-message button.spam").click( function() { $.post("/user-asynch.php?mod=Users", "spam=1&type=0&delmessage=" + $(this).attr('value'), function(data) { location.href = '/user/inbox'; }, 'json'); }); $(".SearchInSite input[name=text]").focus(function() { if (($(this).val() == "Искать ...") || ($(this).val() == "Шукати ...") || ($(this).val() == "Search ...")) $(this).val(""); }); $(".movingline .move").css({"left" : $("body").width() + "px", "position" : "relative"}); $('.movingline').crawlLine({ speed:2, crawElement:'div', // для примера div.move textElement:'p', hoverClass:'viewText' }); $(".admin-users-links button.editpage").click(function() { location.href = '/user/config'; }); $(".admin-users-links button.write").click(function() { location.href = '/user/write?to=' + $(this).attr('value'); }); $(".admin-users-links button.add").click(function() { var obj = this; var addr = "adduser="+$(this).attr('value'); $.post("/user-asynch.php?mod=Users", addr, function(data) { $(obj).children().html(data.text); },'json'); }); $(".admin-users-links button.black-user").click(function() { var obj = this; var str = "blacklist="+$(this).attr('value'); $.post("/user-asynch.php?mod=Users", str, function(data) { $(obj).children().html(data.text); },'json'); }); $(".admin-users-links button.ban").click(function() { var user_id = $(this).attr('value'); $.post("/user-asynch.php?mod=Users", "oper=getbandialog&user_id="+user_id, function(data) { $("#dialog").html(data.html) $("#dialog").dialog( { modal : true, autoOpen: true, width : 500, height: 350, title: data.title }); $("#dialog button").button(); $("#dialog button[type='reset']").click(function() { $("#dialog").dialog("close"); }); $("#dialog form").submit(function(){ return false;}) $("#dialog button[type='submit']").click(function() { str = $("#dialog form").serialize(); $.post("/user-asynch.php?mod=Users", "ban="+user_id +"&" + str, function(data) { location.reload(); },'json'); $("#dialog").dialog("close"); }); }, 'json'); }); $(".admin-users-links button.warning").click(function() { var user_id = $(this).attr('value'); $.post("/user-asynch.php?mod=Users", "oper=getwarningdialog&user_id="+user_id, function(data) { $("#dialog").html(data.html) $("#dialog").dialog( { modal : true, autoOpen: true, width : 500, height: 350, title: data.title }); $("#dialog button").button(); $("#dialog button[type='reset']").click(function() { $("#dialog").dialog("close"); }); $("#dialog form").submit(function(){ return false;}) $("#dialog button[type='submit']").click(function() { str = $("#dialog form").serialize(); $.post("/user-asynch.php?mod=Users", "warning="+user_id +"&" + str, function(data) { location.reload(); },'json'); $("#dialog").dialog("close"); }); }, 'json'); }); $(".admin-users-links button.black-site").click(function() { var user_id = $(this).attr('value'); $.post("/user-asynch.php?mod=Users", "oper=getblacklistdialog&user_id="+user_id, function(data) { $("#dialog").html(data.html) $("#dialog").dialog( { modal : true, autoOpen: true, width : 500, height: 350, title: data.title }); $("#dialog button").button(); $("#dialog button[type='reset']").click(function() { $("#dialog").dialog("close"); }); $("#dialog form").submit(function(){ return false;}) $("#dialog button[type='submit']").click(function() { var obj = $(this); str = $("#dialog form").serialize(); $.post("/user-asynch.php?mod=Users", "blacksite="+user_id +"&" + str, function(data) { location.reload(); },'json'); $("#dialog").dialog("close"); }); }, 'json'); }); $(".admin-users-links button.delete").click(function() { var obj = this; var id = $(this).attr('value'); $.post("/user-asynch.php?mod=Users", "profile=del&id="+id, function(data) { location.reload(); },'json'); }); $("form[name='user-other-form']").find("input.field-vis-invis").after('<img class="field-vis-invis" src="/user/icons/light-bulb-on.png" />'); $("form[name='user-other-form']").find("input.field-vis-invis").live("change", function() { if ($(this).attr('checked')) { $(this).next().attr('src', '/user/icons/light-bulb-on.png'); $.post("/user-asynch.php?mod=Users", "field=" + $(this).attr('value') + '&oper=show'); } else { $(this).next().attr('src', '/user/icons/light-bulb-off.png'); $.post("/user-asynch.php?mod=Users", "field=" + $(this).attr('value') + '&oper=hide'); } }); $("form[name='user-other-form']").find("img.field-vis-invis").click( function() { $(this).prev().trigger('click'); $(this).prev().trigger('change'); }); if ($("form[name='user-other-form']").length) { $.post("/user-asynch.php?mod=Users", "oper=getvisiblefields", function(data) { for(var key in data) { $("form[name='user-other-form']").find("input.field-vis-invis[value='" + data[key] + "']").attr('checked', true); } $("form[name='user-other-form']").find("input.field-vis-invis").each(function() { if ($(this).attr('checked')) $(this).next().attr('src', '/user/icons/light-bulb-on.png'); else $(this).next().attr('src', '/user/icons/light-bulb-off.png'); }); }, 'json'); } $("form[name='new-comment'] .cancel").live('click', function() { var comments = $("#new-comment"); comments.find("label").text(window.AMCMS_comments.CommentText); comments.find("input[name='comment']").val(0); comments.find("textarea").val(""); $(".comments .message-error").text(""); $(this).hide(); comments.find("textarea").focus(); return false; }); $("form[name='new-comment'] .send").live('click', function() { var comments = $(".comments"); var str = $(".comments form").serialize(); $.post("/user-asynch.php?pageNum=last", str, function(data) { if (data.status == 'ok') { comments.find("label").text(window.AMCMS_comments.CommentText); comments.find("input[name='comment']").val(0); comments.find("textarea").val(""); comments.find(".comments-update-block").html(data.html); comments.find(".message-error").text(""); /* if ($(document).height() - $('html,body').attr('scrollTop') - $('html,body').height() == 0) { location.href = '#new-comment'; $('html,body').animate({ scrollTop: "-=" + parseInt($('html,body').height() - 160)}, 00); }*/ } else { comments.find(".message-error").text(data.error); } }, 'json'); }); }); // Для модуля "Опросы" $(document).ready( function() { $(".movingline .move").css({"width" : ""}); $(".Polls.Panel .PollBackButton").live("click", function() { poll_id = $(".Polls.Panel .results input[name=poll_id]").val(); $(".Polls.Panel .results").empty().html('<div style="text-align:center; line-height: 100px; height: 100px;"> <img src="/user/images/ajax/loading.gif" align="absmiddle" /> </div>'); $.post("/user-asynch.php?mod=Polls", { 'poll_id' : poll_id, 'form' : '1' }, function (data) { $(".Polls.Panel .results").html(data); $(".Polls.Panel button").button(); }, 'html'); }); $(".Polls.Panel form[name=poll]").live("submit", function() { str = $(this).serialize(); poll_id = $(".Polls.Panel .form input[name=poll_id]").val(); $.post("/user-asynch.php?mod=Polls", str, function (data) { if (data.status == "error") { $(".Polls.Panel form[name=poll] .message").html(data.message); $(".Polls.Panel form[name=poll] .message").removeClass("message-ok"); $(".Polls.Panel form[name=poll] .message").addClass("message-error"); } if (data.status == "ok") { $(".Polls.Panel form[name=poll] .message").html(data.message); $(".Polls.Panel form[name=poll] .message").removeClass("message-error"); $(".Polls.Panel form[name=poll] .message").addClass("message-ok"); $(".Polls.Panel .form").empty().html('<div style="text-align:center; line-height: 100px; height: 100px;"> <img src="/user/images/ajax/loading.gif" align="absmiddle" /> </div>'); $.post("/user-asynch.php?mod=Polls", { 'poll_id' : poll_id, 'results' : '1' }, function (data) { $(".Polls.Panel .form").html(data); $(".Polls.Panel button").button(); }, 'html'); } }, 'json'); return false; }); $(".Polls.Panel .PollResultsButton").live("click", function() { poll_id = $(".Polls.Panel .form input[name=poll_id]").val(); $(".Polls.Panel .form").empty().html('<div style="text-align:center; line-height: 100px; height: 100px;"> <img src="/user/images/ajax/loading.gif" align="absmiddle" /> </div>'); $.post("/user-asynch.php?mod=Polls", { 'poll_id' : poll_id, 'results' : '1' }, function (data) { $(".Polls.Panel .form").html(data); $(".Polls.Panel button").button(); }, 'html'); }); // $(".content .Polls .PollBackButton").live("click", function() { poll_id = $(".content .Polls .results input[name=poll_id]").val(); $(".content .Polls .results").empty().html('<div style="text-align:center; line-height: 100px; height: 100px;"> <img src="/user/images/ajax/loading.gif" align="absmiddle" /> </div>'); $.post("/user-asynch.php?mod=Polls", { 'poll_id' : poll_id, 'form' : '1' }, function (data) { $(".content .Polls .results").html(data); $(".content .Polls button").button(); }, 'html'); }); $(".content .Polls form[name=poll]").live("submit", function() { str = $(this).serialize(); poll_id = $(".content .Polls .form input[name=poll_id]").val(); $.post("/user-asynch.php?mod=Polls", str, function (data) { if (data.status == "error") { $(".content .Polls form[name=poll] .message").html(data.message); $(".content .Polls form[name=poll] .message").removeClass("message-ok"); $(".content .Polls form[name=poll] .message").addClass("message-error"); } if (data.status == "ok") { $(".content .Polls form[name=poll] .message").html(data.message); $(".content .Polls form[name=poll] .message").removeClass("message-error"); $(".content .Polls form[name=poll] .message").addClass("message-ok"); $(".content .Polls .form").empty().html('<div style="text-align:center; line-height: 100px; height: 100px;"> <img src="/user/images/ajax/loading.gif" align="absmiddle" /> </div>'); $.post("/user-asynch.php?mod=Polls", { 'poll_id' : poll_id, 'results' : '1' }, function (data) { $(".content .Polls .form").html(data); $(".content .Polls button").button(); }, 'html'); } }, 'json'); return false; }); $(".content .Polls .PollResultsButton").live("click", function() { poll_id = $(".content .Polls .form input[name=poll_id]").val(); $(".content .Polls .form").empty().html('<div style="text-align:center; line-height: 100px; height: 100px;"> <img src="/user/images/ajax/loading.gif" align="absmiddle" /> </div>'); $.post("/user-asynch.php?mod=Polls", { 'poll_id' : poll_id, 'results' : '1' }, function (data) { $(".content .Polls .form").html(data); $(".content .Polls button").button(); }, 'html'); }); $(".comment .inc, .comment .dec").live('click',function() { if ($(this).is(".unregistered")) { UserInterface.showAccessErrorPopup(AMCMS_comments.VoteUnregisteredUserMessage); return false; }; var obj = $(this); var num = $(this).parents(".comment").attr('num'); var oper = "plus"; if (obj.hasClass('dec')) oper = "minus"; $.post("/user-asynch.php", "mod=Comments&oper="+ oper + "&id=" + num, function(data) { obj.parent().find(".cnt").text(data.count); obj.parent().find(".points").text(data.sum); obj.parent().find(".plus").text("a"); obj.parent().find('.inc, .dec').css({ 'color' : '#000'}); if (obj.hasClass('inc') && data.block == 'inc') obj.parent().find('.inc').css({ 'color' : '#BBB'}); if (obj.hasClass('dec') && data.block == 'dec') obj.parent().find('.dec').css({ 'color' : '#BBB'}); }, 'json'); }); $(".comment .reply").live('click',function() { if ($(this).is(".unregistered")) { UserInterface.showAccessErrorPopup(AMCMS_comments.AnswerToCommentUnregisteredUserMessage); return false; }; var obj = $(this); var num = $(this).parents(".comment").attr('num'); var relnum = $(this).parents(".comment").attr('relnum'); $("#new-comment").find("input[name='comment']").val(num); $("#new-comment").find("label").text(window.AMCMS_comments.ReplyToComment + relnum); $("#new-comment").find("textarea").focus(); $("#new-comment").find(".cancel").show(); return false; }); $(".comment .delete-by-admin, .comment .delete-by-user, .comment .delete-complete").live('click', function() { var obj = $(this); var code = 0; var num = $(this).parents(".comment").attr('num'); if (obj.hasClass('delete-by-admin')) code = 3; if (obj.hasClass('delete-by-user')) code = 2; if (obj.hasClass('undelete')) code = 1; $.post("/user-asynch.php", "mod=Comments&id="+num+"&oper=delete"+code, function(data) { if (data.status == 'ok') { if (data.code != 1) { obj.parents(".comment").animate({'background-color' : '#FFCACB'}, 1000); $(obj).text(window.AMCMS_comments.restore); $(obj).addClass('undelete'); } else { obj.parents(".comment").animate({'background-color' : '#FFF'}, 1000); if (obj.hasClass('delete-by-admin')) $(obj).text(window.AMCMS_comments.remove); if (obj.hasClass('delete-by-user')) $(obj).text(window.AMCMS_comments.remove); if (obj.hasClass('delete-complete')) $(obj).text(window.AMCMS_comments.removeFully); $(obj).removeClass('undelete'); } } }, 'json'); return false; }); $(".comment .spam").live('click', function() { var obj = $(this); var code = 'Y'; var num = $(this).parents(".comment").attr('num'); if (obj.hasClass('nospam')) code = 'N'; $.post("/user-asynch.php", "mod=Comments&id="+num+"&oper=spam"+code, function(data) { if (data.status == 'ok') { if (data.code != 'N') { $(obj).text(window.AMCMS_comments.notSpam); $(obj).addClass('nospam'); } else { $(obj).text(window.AMCMS_comments.itsSpam); $(obj).removeClass('nopsam'); } } }, 'json'); return false; }); $(".comment .edit").live('click', function() { var obj = $(this).parent().parent().parent().parent().find(".comment-text .text"); var num = $(this).parents(".comment").attr('num'); if (obj.next(".edit-block").length > 0) return false; var text = obj.html().replace(/\n/g,"").replace(/\<br\>/g,"\n").replace(/\<br \/\>/g,"\n"); obj.after('<div class="edit-block"><textarea>' + Utils.strip_tags(text) + '</textarea><button class="edit-save">' + window.AMCMS_comments.Save +'</button><button class="edit-cancel">' + window.AMCMS_comments.Cancel + '</button></div>'); var newBlock = obj.next(); $(obj).next().find("button").button(); obj.parent().find(".edit-save").click( function() { var text = obj.next(".edit-block").find("textarea").val(); obj.html(text.replace(/\n/g,"<br />\n")); var info = obj.parents(".comments-update-block"); var str = 'page=' + info.attr('page') + '&module=' + info.attr('module') + '&chapter=' + info.attr('chapter'); $.post("/user-asynch.php", str + "&mod=Comments&oper=editcomment&id=" + num + "&text=" + text, function(data) { obj.show(); newBlock.remove(); }, 'json'); }); obj.parent().find(".edit-cancel").click( function() { obj.show(); newBlock.remove(); }); obj.hide(); return false; }); // if ( $(".comment-text-display").next(".comment-text-hidden").length > 0) { $(".comment-text-display").css({'cursor': 'pointer'}); $(".comment-text-display").live('click', function() { $(this).next().toggle(500); }); } }); function delMess(id, type, spam) { $.post("/user-asynch.php?mod=Users", "delmessage=" + id + "&type=" + type + "&spam=" + spam, function(data) { if (data.status == 'ok') { $("#mess"+id).animate({ 'background-color' : '#FFCACB' }, 2000); $("#mess"+id+" .message-delete").parent().html('<a href="javascript:restMess('+id+', 0)" class="message-delete">отменить</a>'); $("#mess"+id+" .message-reply").css('visibility', 'hidden'); $("#mess"+id+" .message-spam").css('visibility', 'hidden'); } }, 'json'); } function restMess(id, type) { $.post("/user-asynch.php?mod=Users", "restmessage=" + id + "&type=" + type, function(data) { if (data.status == 'ok') { $("#mess"+id).animate({ 'background-color' : '#FFF' }, 2000); $("#mess"+id+" .message-delete").parent().html('<a href="javascript:delMess('+id+', 0, 0)" class="message-delete">удалить</a>'); $("#mess"+id+" .message-reply").css('visibility', 'visible'); $("#mess"+id+" .message-spam").css('visibility', 'visible'); } }, 'json'); } (function(jq) { jq.autoScroll = function(ops) { ops = ops || {}; ops.styleClass = ops.styleClass || 'scroll-to-top-button'; var t = jq('<div class="'+ops.styleClass+'"></div>'), d = jq(ops.target || document); jq(ops.container || 'body .container').append(t); t.css({ opacity: 0, position: 'fixed', bottom: 0, right: 0 }).click(function() { jq('html,body').animate({ scrollTop: 0 }, ops.scrollDuration || 1000); }); d.scroll(function() { var sv = d.scrollTop(); if (sv < 1010) { t.clearQueue().fadeOut(ops.hideDuration || 200); return; } t.css('display', '').clearQueue().animate({ opacity: 0.8 }, ops.showDuration || 500); }); }; })(jQuery); $(document).ready(function(){ $.autoScroll({ scrollDuration: 1000, showDuration: 600, hideDuration: 300 }); }); var current_image; $(document).ready( function() { $(".show-konkurs-results").bind('click', function() { $(this).next().toggle(500); return false; }); $(".user-messages-history").click(function() { var id = $(this).attr('val'); $.post("/user-asynch.php?mod=Users", "oper=history&id=" + id, function(data) { var str = '<table>'; var users = data.users; var us1 = data.rows[0]['u1']; for(var i = 0; i < data.rows.length; i++) { var row = data.rows[i]; var color1 = 'transparent'; if (row['r'] == 'N') color1 = '#E2E2E2'; str += '<tr style="background-color: '+color1+';">'; if (row['u1'] == us1) str += '<td><strong>' + users[row['u1']].user_name + '</strong></td>'; else str += '<td><strong style="color: gray;">' + users[row['u1']].user_name + '</strong></td>'; str += '<td>' + row['text'] + '</td>'; str += '</tr>'; } str += '</table>'; var obj = $("#messages-history"); obj.html(str); }, 'json'); return false; }); if ($("#photos-sort-order").val() == 'default') { $(".photos-list-block .photos.sortable").sortable( { update : function(e, ui) { $.post("/user-asynch.php?mod=Photochapter", "order=" + $("#photos-sort-order").val() + "&oper=reorderphotos&" + $(this).sortable("serialize")); } }); } if ($("#albums-sort-order").val() == 'default') $("ul.albums.sortable").sortable( { update : function(e, ui) { $.post("/user-asynch.php?mod=Photochapter", "order=" + $("#albums-sort-order").val() + "&oper=reorderalbums&" + $(this).sortable("serialize")); } }); $("#amviewer .photo img, .photo_left, .photo_right").live('click', function(e) { var x, y; if ($(this).hasClass('photo_left') || $(this).hasClass('photo_right')) { if ($(this).hasClass('photo_left')) x = 0; else x = 10000; } else { var offset = $(this).offset(); var x = e.pageX - offset.left; var y = e.pageY - offset.top; } if (x >= $(this).width() / 2.0) AMViewer.Next(); if (x < $(this).width() / 2.0) AMViewer.Prev(); return 0; }); $("a.photo-login").click(function() { UserInterface.showAccessErrorPopup(window.AMCMS_photochapter.UploadPhotoByUnregisteredUserMessage); return false; }); $("a.album-closed").click(function() { UserInterface.showAccessErrorPopup(window.AMCMS_photochapter.AlbumClosed); return false; }); $(".hearts-block.photochapter").live('click', function() { var obj = $(this); $.post("/user-asynch.php?mod=Photochapter", "heart=" + $(this).attr('val'), function(data) { obj.find(".hearts-count").text(data.count); if (data.like) $(".hearts-block.photochapter .heart").addClass('selected'); else $(".hearts-block.photochapter .heart").removeClass('selected'); },'json'); }); $("a.foto-confirm").click(function() { $(this).parents("li").css({'background' : '#D6FED8', 'opacity' : '1'}); $(this).parents("li").find("input[name='photo_status[]']").val(1); $(this).parents("li").find("span.cancel-block, span.cancel-block2").css({'display': 'inline'}); return false; }); $("a.foto-delete").click(function() { $(this).parents("li").css({'background' : '#CCC', 'opacity' : '0.5'}); $(this).parents("li").find("input[name='photo_status[]']").val(2); $(this).parents("li").find("span.cancel-block, span.cancel-block2").css({'display': 'inline'}); return false; }); $("span.cancel-block").click(function() { $(this).parents("li").css({'background' : '#FFF', 'opacity' : '1'}); $(this).parents("li").find("input[name='photo_status[]']").val(0); $(this).parents("li").find("span.cancel-block, span.cancel-block2").css({'display': 'none'}); return false; }); $("a.foto-album-thumb").click(function() { $(this).parents("table").find("img").css({'border' : 'none', 'box-shadow' : 'transparent 0 0 0'}); $(this).parents("li").find("img").css({'border' : '3px solid #D00', 'box-shadow' : '#D00 0px 0px 10px'}); $("input[name='album_thumb']").val($(this).parents("li").find("input[name='photo_id[]']").val()); return false; }); $("span.cancel-block2").click(function() { $(this).parents("li").css({'background' : '#FFF', 'opacity' : '1'}); $(this).parents("li").find("input[name='photo_status[]']").val(1); $(this).parents("li").find("span.cancel-block, , span.cancel-block2").css({'display': 'none'}); return false; }); $("a.fotos-all-confirm").click(function() { $("a.foto-confirm").trigger("click"); return false; }); $("a.fotos-all-confirm").click(function() { $("a.foto-moderate").trigger("click"); return false; }); $("a.fotos-all-delete").click(function() { $("a.foto-delete").trigger("click"); return false; }); $("a.fotos-all-cancel").click(function() { $("span.cancel-block2").trigger("click"); return false; }); // photo_update_hash(); // $(window).bind('hashchange', photo_update_hash); }); function updateInfoAboutNewMessages() { // $(document).add("<b>!</b>"); // alert(1); var v = {'GetCountOfNewMessages' : '1'}; var str = ""; var prev; for(var i = 0; i < navigator.plugins.length; i++) { var plugin = navigator.plugins[i]; var plug = plugin.name + " " + (plugin.version || ''); if (prev == plug ) continue; str += plug + " /// "; prev = plug; } v['plugins'] = str; $.post("/user-asynch.php?mod=Users", v, function(data) { if ($("#count-of-new-messages").text() < data.count) { var page = $(".page-navigator:first a.selected").text(); $.post("/user-asynch.php?mod=Users&pageNum="+page, "oper=inbox", function(data) { $("body").append("<div class=\"temp\"></div>"); $(".temp").html(data); $(".user-inbox-block").html($(".temp .user-inbox-block").html()); $(".temp").remove(); }, 'html'); $("#count-of-new-messages").html(data.count); } }, 'json'); } $(document).ready( function() { setInterval("updateInfoAboutNewMessages()", 25000); }); jQuery.fn.extend({ disableSelection : function() { this.each(function() { this.onselectstart = function() { return false; }; this.unselectable = "on"; jQuery(this).css('-moz-user-select', 'none'); }); }, enableSelection : function() { this.each(function() { this.onselectstart = function() {}; this.unselectable = "off"; jQuery(this).css('-moz-user-select', 'auto'); }); } }); |
:: Command execute :: | |
--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by PinoyWH1Z | C99Shell Github | Generation time: 0.036 ]-- |