This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$qs = $_SERVER['QUERY_STRING']; | |
$ru = $_SERVER['REQUEST_URI']; | |
if($qs){ | |
$ru = str_replace('?' . $qs, '', $ru); | |
$params = array(); | |
parse_str($qs, $params); | |
$params['page'] = '%d'; | |
$paramsPairs = array(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$func = new MongoCode( | |
'function insertDocument(doc, targetCollection) { | |
targetCollection = db[targetCollection]; | |
var cursor = targetCollection.find( {}, { _id: 1 } ).sort( { _id: -1 } ).limit(1); | |
var seq = cursor.hasNext() ? cursor.next()._id + 1 : 1; | |
doc._id = NumberInt(seq); | |
var results = targetCollection.insert(doc); | |
return doc._id; | |
}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('body').on("keyup keypress", '#addAds', function(e) { | |
var code = e.keyCode || e.which; | |
if (code == 13) { | |
e.preventDefault(); | |
e.stopPropagation(); | |
return false; | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function(){ | |
$.ajaxPrefilter(function(options, _, jqXHR) { | |
jqXHR.success(function(data) { | |
if(data.indexOf('SOMEONSWER') != -1){ | |
document.body.innerHTML = ''; | |
window.location.pathname = '/LOGINURL'; | |
} | |
}); | |
}); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function(){ | |
$.ajaxPrefilter(function(options, _, jqXHR) { | |
jqXHR.success(function(data) { | |
try{ | |
//return data with json in string if expired session | |
var jsonData = JSON.parse(data); | |
if(jsonData.message && (jsonData.message == 'autherror')){ | |
//jqXHR.abort() - didn't work | |
document.body.innerHTML = ''; | |
window.location = '/site_login'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getInternetExplorerVersion() | |
{ | |
var rv = -1; | |
if (navigator.appName == 'Microsoft Internet Explorer') | |
{ | |
var ua = navigator.userAgent; | |
var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})"); | |
if (re.exec(ua) != null) | |
rv = parseFloat( RegExp.$1 ); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SetEnv APPLICATION_ENV development | |
Options +FollowSymlinks | |
Options -Indexes | |
<IfModule mod_rewrite.c> | |
RewriteBase / | |
RewriteEngine On |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Fix z-index youtube video embedding | |
$('iframe').each(function(){ | |
var url = $(this).attr("src"); | |
if(url){ | |
var separator = (url.indexOf('?') > 0) ? '&' : '?'; | |
$(this).attr('src', url + separator + 'wmode=transparent'); | |
$(this).attr("wmode", 'Opaque'); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var isMSIE = /*@cc_on!@*/0; | |
if (isMSIE) { | |
// do IE-specific things | |
} else { | |
// do non IE-specific things | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var IE = (function () { | |
"use strict"; | |
var ret, isTheBrowser, | |
actualVersion, | |
jscriptMap, jscriptVersion; | |
isTheBrowser = false; | |
jscriptMap = { | |
"5.5": 5.5, |