IP : 3.143.24.92Hostname : host45.registrar-servers.comKernel : Linux host45.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64Disable Function : None :) OS : Linux
PATH:
/
home/
jackpotjunglegam/
../
../
var/
softaculous/
./
modx/
../
zurmo/
../
cake/
../
mt/
mt.js/
/
// The cookie name to use for storing the blog-side comment session cookie. var mtCookieName = "mt_blog_user"; var mtCookieDomain = ".[[domhost]]"; var mtCookiePath = "/"; var mtCookieTimeout = 14400;
function mtHide(id) { var el = (typeof id == "string") ? document.getElementById(id) : id; if (el) el.style.display = 'none'; }
function mtShow(id) { var el = (typeof id == "string") ? document.getElementById(id) : id; if (el) el.style.display = 'block'; }
function mtAttachEvent(eventName,func) { var onEventName = 'on' + eventName; var old = window[onEventName]; if( typeof old != 'function' ) window[onEventName] = func; else { window[onEventName] = function( evt ) { old( evt ); return func( evt ); }; } }
function mtFireEvent(eventName,param) { var fn = window['on' + eventName]; if (typeof fn == 'function') return fn(param); return; }
log : function (level,msg) { if(_debug && window.console) { switch(level) { case 'warn': case 'debug': case 'info': case 'error': case 'log': console[level](msg); break;
function mtRelativeDate(ts, fds) { var now = new Date(); var ref = ts; var delta = Math.floor((now.getTime() - ref.getTime()) / 1000);
var str; if (delta < 60) { str = 'moments ago'; } else if (delta <= 86400) { // less than 1 day var hours = Math.floor(delta / 3600); var min = Math.floor((delta % 3600) / 60); if (hours == 1) str = '1 hour ago'; else if (hours > 1) str = '2 hours ago'.replace(/2/, hours); else if (min == 1) str = '1 minute ago'; else str = '2 minutes ago'.replace(/2/, min); } else if (delta <= 604800) { // less than 1 week var days = Math.floor(delta / 86400); var hours = Math.floor((delta % 86400) / 3600); if (days == 1) str = '1 day ago'; else if (days > 1) str = '2 days ago'.replace(/2/, days); else if (hours == 1) str = '1 hour ago'; else str = '2 hours ago'.replace(/2/, hours); } return str ? str : fds; }
function mtEditLink(entry_id, author_id) {
}
function mtCommentFormOnFocus() { // if CAPTCHA is enabled, this causes the captcha image to be // displayed if it hasn't been already. mtShowCaptcha(); }
var mtCaptchaVisible = false; function mtShowCaptcha() { var u = mtGetUser(); if ( u && u.is_authenticated ) return; if (mtCaptchaVisible) return; var div = document.getElementById('comments-open-captcha'); if (div) { div.innerHTML = ''; mtCaptchaVisible = true; } }
var is_preview; var user;
function mtSetUser(u) { if (u) { // persist this user = u; mtSaveUser(); // sync up user greeting mtFireEvent('usersignin'); } }
function mtEscapeJS(s) { s = s.replace(/'/g, "'"); return s; }
function mtUnescapeJS(s) { s = s.replace(/'/g, "'"); return s; }
var u = {}; var m; while (m = s.match(/^((name|url|email|is_authenticated|profile|userpic|sid|is_trusted|is_author|is_banned|can_post|can_comment):'([^']+?)';?)/)) { s = s.substring(m[1].length); if (m[2].match(/^(is|can)_/)) // boolean fields u[m[2]] = m[3] == '1' ? true : false; else u[m[2]] = mtUnescapeJS(m[3]); } if (u.is_authenticated) { u.is_anonymous = false; } else { u.is_anonymous = true; u.can_post = false; u.is_author = false; u.is_banned = false; u.is_trusted = false; } return u; }
function mtGetUser() { if (!user) { var cookie = mtGetCookie(mtCookieName); if (!cookie) return; user = mtUnbakeUserCookie(cookie); if (! user) { user = {}; user.is_anonymous = true; user.can_post = false; user.is_author = false; user.is_banned = false; user.is_trusted = false; } } return user; }
var mtFetchedUser = false;
function mtFetchUser(cb) { if (!cb) cb = 'mtSetUser'; if ( ( cb == 'mtSetUser' ) && mtGetUser() ) { var url = document.URL; url = url.replace(/#.+$/, ''); url += '#comments-open'; location.href = url; } else { // we aren't using AJAX for this, since we may have to request // from a different domain. JSONP to the rescue. mtFetchedUser = true; var u = mtGetUser(); var script = document.createElement('script'); var ts = new Date().getTime(); script.src = '[[softurl]]/mt-comments.cgi?__mode=userinfo&blog_id=1&jsonp=' + cb + '&ts=' + ts + '&sid=' + u.sid; (document.getElementsByTagName('head'))[0].appendChild(script); } }
function mtVerifySession(cb) { if (!cb) return; var script = document.createElement('script'); var ts = new Date().getTime(); var u = mtGetUser(); script.src = '[[softurl]]/mt-comments.cgi?__mode=verify_session&blog_id=1&jsonp=' + cb + '&ts=' + ts + '&sid=' + u.sid; (document.getElementsByTagName('head'))[0].appendChild(script); }
function mtRememberMeOnClick(b) { if (!b.checked) mtClearUser(b.form); return true; }
var mtRequestSubmitted = false; function mtCommentOnSubmit(f) { if (!mtRequestSubmitted) { mtRequestSubmitted = true;
if (f.armor) f.armor.value = 'b90d0e341ac551168ee25df3a7d1e8d0ece5cca5'; if (f.bakecookie && f.bakecookie.checked) mtSaveUser(f);
// disable submit buttons if (f.preview_button) f.preview_button.disabled = true; if (f.post) f.post.disabled = true;
var u = mtGetUser(); if ( !is_preview && ( u && u.is_authenticated ) ) { // validate session; then submit mtVerifySession('mtCommentSessionVerify'); return false; }
return true; } return false; }
function mtCommentSessionVerify(app_user) { var f = document['comments_form']; if ( app_user && app_user.verified ) { f.submit(); } else { alert('Your session has expired. Please sign in again to comment.'); mtClearUser(); mtFireEvent('usersignin');
// if the user is authenticated, hide the 'anonymous' fields // and any captcha input if already shown if ( document.getElementById('comments-form')) { if ( u && u.is_authenticated ) { mtShow('comments-form'); mtHide('comments-open-data'); if (mtCaptchaVisible) mtHide('comments-open-captcha'); } else {
mtHide('comments-form');
} if ( u && u.is_banned ) mtHide('comments-form');
// if we're previewing a comment, make sure the captcha // field is visible if (is_preview) mtShowCaptcha(); else mtShowGreeting();
// populate anonymous comment fields if user is cookied as anonymous var cf = document['comments_form']; if (cf) { if (u && u.is_anonymous) { if (u.email) cf.email.value = u.email; if (u.name) cf.author.value = u.name; if (u.url) cf.url.value = u.url; if (cf.bakecookie) cf.bakecookie.checked = u.name || u.email; } else { if (u && u.sid && cf.sid) cf.sid.value = u.sid; } if (cf.post && cf.post.disabled) cf.post.disabled = false; if (cf.preview_button && cf.preview_button.disabled) cf.preview_button.disabled = false; mtRequestSubmitted = false; } } }
function mtEntryOnLoad() { var cf = document['comments_form']; if (cf && cf.preview) cf.preview.value = '';
mtFireEvent('usersignin'); }
function mtEntryOnUnload() { if (mtRequestSubmitted) { var cf = document['comments_form']; if (cf) { if (cf.post && cf.post.disabled) cf.post.disabled = false; if (cf.preview_button && cf.preview_button.disabled) cf.preview_button.disabled = false; } mtRequestSubmitted = false; } return true; }
mtAttachEvent('usersignin', mtUserOnLoad);
function mtSignIn() { var doc_url = document.URL; doc_url = doc_url.replace(/#.+/, ''); var url = '[[softurl]]/mt-comments.cgi?__mode=login&blog_id=1'; if (is_preview) { if ( document['comments_form'] ) { var entry_id = document['comments_form'].entry_id.value; url += '&entry_id=' + entry_id; } else { url += '&return_url=[[raw_wwwurl]]'; } } else { url += '&return_url=' + encodeURIComponent(doc_url); } mtClearUser(); location.href = url; }
function mtSignInOnClick(sign_in_element) { var el; if (sign_in_element) { // display throbber el = document.getElementById(sign_in_element); if (!el) // legacy MT 4.x element id el = document.getElementById('comment-form-external-auth'); } if (el) el.innerHTML = 'Signing in... <span class="status-indicator"> </span>';
mtClearUser(); // clear any 'anonymous' user cookie to allow sign in mtSignIn(); return false; }
function mtSetUserOrLogin(u) { if (u && u.is_authenticated) { mtSetUser(u); } else { // user really isn't logged in; so let's do this! mtSignIn(); } }
function mtSignOut(entry_id) { mtClearUser(); var doc_url = document.URL; doc_url = doc_url.replace(/#.+/, ''); var url = '[[softurl]]/mt-comments.cgi?__mode=handle_sign_in&static=0&logout=1&blog_id=1'; if (is_preview) { if ( document['comments_form'] ) { var entry_id = document['comments_form'].entry_id.value; url += '&entry_id=' + entry_id; } else { url += '&return_url=[[raw_wwwurl]]'; } } else { url += '&return_url=' + encodeURIComponent(doc_url); } location.href = url; }
function mtSignOutOnClick() { mtSignOut(); return false; }
function mtShowGreeting() {
var reg_reqd = true;
var cf = document['comments_form']; if (!cf) return;
var el = document.getElementById('comment-greeting'); if (!el) // legacy MT 4.x element id el = document.getElementById('comment-form-external-auth'); if (!el) return;
var eid = cf.entry_id; var entry_id; if (eid) entry_id = eid.value;
var phrase; var u = mtGetUser();
if ( u && u.is_authenticated ) { if ( u.is_banned ) { phrase = 'You do not have permission to comment on this blog. (\<a href=\"javas\cript:void(0);\" onclick=\"return mtSignOutOnClick();\"\>sign out\<\/a\>)'; } else { var user_link; if ( u.is_author ) { user_link = '<a href="[[softurl]]/mt-comments.cgi?__mode=edit_profile&blog_id=1&return_url=' + encodeURIComponent( location.href ); user_link += '">' + u.name + '</a>'; } else { // registered user, but not a user with posting rights if (u.url) user_link = '<a href="' + u.url + '">' + u.name + '</a>'; else user_link = u.name; } // TBD: supplement phrase with userpic if one is available. phrase = 'Thanks for signing in, __NAME__. (\<a href=\"javas\cript:void(0)\" onclick=\"return mtSignOutOnClick();\"\>sign out\<\/a\>)'; phrase = phrase.replace(/__NAME__/, user_link); } } else { if (reg_reqd) { phrase = '\<a href=\"javas\cript:void(0)\" onclick=\"return mtSignInOnClick(\'comment-greeting\')\"\>Sign in\<\/a\> to comment.'; } else { phrase = '\<a href=\"javas\cript:void(0)\" onclick=\"return mtSignInOnClick(\'comment-greeting\')\"\>Sign in\<\/a\> to comment, or comment anonymously.'; } } el.innerHTML = phrase;
}
function mtReplyCommentOnClick(parent_id, author) { mtShow('comment-form-reply');
var checkbox = document.getElementById('comment-reply'); var label = document.getElementById('comment-reply-label'); var text = document.getElementById('comment-text');
// Populate label with new values var reply_text = 'Replying to \<a href=\"#comment-__PARENT__\" onclick=\"location.href=this.href; return false\"\>comment from __AUTHOR__\<\/a\>'; reply_text = reply_text.replace(/__PARENT__/, parent_id); reply_text = reply_text.replace(/__AUTHOR__/, author); label.innerHTML = reply_text;
checkbox.value = parent_id; checkbox.checked = true; try { // text field may be hidden text.focus(); } catch(e) { }
mtSetCommentParentID(); }
function mtSetCommentParentID() { var checkbox = document.getElementById('comment-reply'); var parent_id_field = document.getElementById('comment-parent-id'); if (!checkbox || !parent_id_field) return;
var pid = 0; if (checkbox.checked == true) pid = checkbox.value; parent_id_field.value = pid; }
function mtSaveUser(f) { // We can't reliably store the user cookie during a preview. if (is_preview) return;
var u = mtGetUser();
if (f && (!u || u.is_anonymous)) { if ( !u ) { u = {}; u.is_authenticated = false; u.can_comment = true; u.is_author = false; u.is_banned = false; u.is_anonymous = true; u.is_trusted = false; } if (f.author != undefined) u.name = f.author.value; if (f.email != undefined) u.email = f.email.value; if (f.url != undefined) u.url = f.url.value; }
if (!u) return;
var cache_period = mtCookieTimeout * 1000;
// cache anonymous user info for a long period if the // user has requested to be remembered if (u.is_anonymous && f && f.bakecookie && f.bakecookie.checked) cache_period = 365 * 24 * 60 * 60 * 1000;
var now = new Date(); mtFixDate(now); now.setTime(now.getTime() + cache_period);
function mtFixDate(date) { var skew = (new Date(0)).getTime(); if (skew > 0) date.setTime(date.getTime() - skew); }
function mtGetXmlHttp() { if ( !window.XMLHttpRequest ) { window.XMLHttpRequest = function() { var types = [ "Microsoft.XMLHTTP", "MSXML2.XMLHTTP.5.0", "MSXML2.XMLHTTP.4.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP" ];
for ( var i = 0; i < types.length; i++ ) { try { return new ActiveXObject( types[ i ] ); } catch( e ) {} }
return undefined; }; } if ( window.XMLHttpRequest ) return new XMLHttpRequest(); }
// BEGIN: fast browser onload init // Modifications by David Davis, DWD // Dean Edwards/Matthias Miller/John Resig // http://dean.edwards.name/weblog/2006/06/again/?full#comment5338
function mtInit() { // quit if this function has already been called if (arguments.callee.done) return;
// flag this function so we don't do the same thing twice arguments.callee.done = true;
// kill the timer // DWD - check against window if ( window._timer ) clearInterval(window._timer);
// DWD - fire the window onload now, and replace it if ( window.onload && ( window.onload !== window.mtInit ) ) { window.onload(); window.onload = function() {}; }
mtInitCommenter();
}
/* for Mozilla/Opera9 */ if (document.addEventListener) { document.addEventListener("DOMContentLoaded", mtInit, false); }
/* for Internet Explorer */ /*@cc_on @*/ /*@if (@_win32) if (!document.addEventListener){ document.write("<script id=__ie_onload defer src=//:><\/script>"); var script = document.getElementById("__ie_onload"); script.onreadystatechange = function() { if (this.readyState == "complete") { mtInit(); // call the onload handler } }; } /*@end @*/
/* for Safari */ if (/WebKit/i.test(navigator.userAgent)) { // sniff _timer = setInterval(function() { if (/loaded|complete/.test(document.readyState)) { mtInit(); // call the onload handler } }, 10); }
/* for other browsers */ window.onload = mtInit;
// END: fast browser onload init
function mtLoggedIn(ott) { var script = document.createElement('script'); var ts = new Date().getTime(); script.src = '[[softurl]]/mt-comments.cgi?__mode=userinfo&jsonp=mtSaveUserInfo&ott=' + ott; (document.getElementsByTagName('head'))[0].appendChild(script); }
function mtRefreshUserInfo(sid) { var script = document.createElement('script'); var ts = new Date().getTime(); script.src = '[[softurl]]/mt-comments.cgi?__mode=userinfo&jsonp=mtSaveUserInfo&sid=' + sid; (document.getElementsByTagName('head'))[0].appendChild(script); }
function mtSaveUserInfo (u) { if ( u.error ) { if ( !user ) { alert('The sign-in attempt was not successful; Please try again.'); } return; } user = null; var cmtcookie = mtBakeUserCookie(u); var now = new Date(); var cache_period = mtCookieTimeout * 1000;
// cache anonymous user info for a long period if the // user has requested to be remembered mtFixDate(now); now.setTime(now.getTime() + cache_period); mtSetCookie(mtCookieName, cmtcookie, now, mtCookiePath, mtCookieDomain, location.protocol == 'https:'); mtFireEvent('usersignin'); }
function mtInitCommenter () { /*** * If request contains a '#_login' or '#_logout' hash, use this to * also delete the blog-side user cookie, since we're coming back from * a login, logout or edit profile operation. */
var hash = ( window.location.hash ); hash.match( /^#_(.*)$/ ); var command = RegExp.$1 || ''; if ( command === 'refresh' ) { // Back from profile edit screen. // Reload userinfo with current session ID. var u = mtGetUser(); user = null; mtRefreshUserInfo(u.sid); } else if ( command === 'logout' ) { // clear any logged in state mtClearUser(); mtFireEvent('usersignin'); } else if ( command.match( /^login_(.*)$/ ) ) { var sid = RegExp.$1; mtLoggedIn(sid); } else { mtFireEvent('usersignin'); } }