- 1
($property['valid'] == 'ошибка') !== TRUEНашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+158
($property['valid'] == 'ошибка') !== TRUEвот и бери стажеров на работу
+158
if (Database::getDbType() == 'pgsql')
      $stmt = Database::getInstance()->dbh->prepare("SELECT COUNT(*) AS count FROM torrent WHERE tracker = :tracker AND torrent_id = :id");
else
      $stmt = Database::getInstance()->dbh->prepare("SELECT COUNT(*) AS `count` FROM `torrent` WHERE `tracker` = :tracker AND `torrent_id` = :id");https://github.com/ElizarovEugene/TorrentMonitor/blob/master/class/Database.class.php#L625 УПРЛС
+158
public static function checkWriteToTorrentPath($path)
{
	if (file_put_contents($path.'file.txt', ' '))
	{
		unlink($path.'file.txt');
		return TRUE;
	}
	else
		return FALSE;
}
            is_writable ? Не, не слышал!
https://github.com/ElizarovEugene/TorrentMonitor/blob/master/class/System.class.php#L48 Эпик!
        
+158
if (
    event.which == $.ui.keyCode.COMMA ||
    event.which == $.ui.keyCode.ENTER ||
    (
        event.which == $.ui.keyCode.TAB &&
        that._tagInput.val() !== ''
    ) ||
    (
        event.which == $.ui.keyCode.SPACE &&
        that.options.allowSpaces !== true &&
        (
            $.trim(that._tagInput.val()).replace( /^s*/, '' ).charAt(0) != '"' ||
            (
                $.trim(that._tagInput.val()).charAt(0) == '"' &&
                $.trim(that._tagInput.val()).charAt($.trim(that._tagInput.val()).length - 1) == '"' &&
                $.trim(that._tagInput.val()).length - 1 !== 0
            )
        )
    )
) {
    event.preventDefault();
    that.createTag(that._cleanedInput());
    // The autocomplete doesn't close automatically when TAB is pressed.
    // So let's ensure that it closes.
    that._tagInput.autocomplete('close');
}https://github.com/aehlke/tag-it/blob/master/js/tag-it.js#L183
+158
function hideHint() {
    $(".popup_hint").each(function() {
       if($(this).attr("class")=="popup_hint") $(this).hide(); 
    });
    $(".popup_hint_or").each(function() {
       if($(this).attr("class")=="popup_hint_or") $(this).hide(); 
    });
}Масло масляное.
+158
$(window).load(function() {
	if ($(window).height() < 587) {
		$('#inquiry').css({'position' : 'relative','margin-top' : -511,'top' : 0});
	}
	$(document).ready(function() {
		$(function() {
			if ($.browser.msie && $.browser.version >= 7) {
				$('.ask').click(function() {
					$('#inquiry').css({'display' : 'block'});
					$('#inquiry_pop').css({'display' : 'block'});
				});
				$('#close_iq').click(function() {
					$('#inquiry').hide();
					$('#inquiry_pop').hide();
				});
				$('.sub_fo').click(function() {
					$('#inquiry, #inquiry_pop').hide(0);
					$('#thank_you').delay(500).show(0);
					$('#thank_you').delay(3000).hide(0);
				});
			} else {
				$('.ask').click(function() {
					$('#inquiry, #inquiry_pop').fadeIn(1500);
				});
				$('#close_iq').click(function() {
					$('#inquiry, #inquiry_pop').fadeOut(1500);
				});
				$('.sub_fo').click(function() {
					$('#inquiry, #inquiry_pop').fadeOut(1500);
					$('#thank_you').delay(500).fadeIn(1500);
					$('#thank_you').delay(3000).fadeOut(1500);
				});
			}
		});
	});
});
+158
function check_email(_email)
{
  var letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_0123456789 ";
  var i = 0, j = 0;
  var match = false;
  if (_email.length == 0) {
    return false;
  }
  for (i = 0; i < _email.length; i++)
  {
    match = false;
    for (j = 0; j < letters.length; j++)
    {
      if (_email.charAt(i) == letters.charAt(j))
      {
        match = true;
        break;
      }
    }
    if (!match)
    {
      if (_email.charAt(i) == '.') {
        match = true;
      }
    }
    if(!match) {
      break;
    }
  }
 
  if (i >= _email.length) {
    return false;
  }
 
  if (_email.charAt(i++) != '@') {
    return false;
  }
  var dotpassed = false;
  while (i < _email.length)
  {
    var match = false;
    for (j = 0; j < letters.length; j++)
    {
      if (_email.charAt(i) == letters.charAt(j))
      {
        match = true;
        break;
      }
    }
 
  if (!match)
  {
    if (_email.charAt(i) == '.')
    {
      dotpassed = true;
      match = true;
    }
  }
  if (!match) return false;
  i++;
  }
 if (dotpassed) return true;
 return false;
}в недрах http://astro.smsonline.ru/
+158
<span class="header-search-icon" onclick="document.forms['search-form'].submit();"></span>
            Выдержка из стандартного шаблона компонента 1С-Битрикс.
и что помешало поставить <button type=submit>?
        
+158
ISQ.Http.detectBroswer=function(){
    var b=navigator.appVersion;
    var f=navigator.userAgent;
    var a=0;
    ISQ.Http.browser={};
    if(navigator.appVersion.indexOf("Android")!==-1){
	ISQ.Http.browser.app="android";
	var c=navigator.appVersion.indexOf("Version/")+8;
	var g=navigator.appVersion.substring(c,navigator.appVersion.indexOf(" ",c));
	ISQ.Http.browser.version=parseInt(g);
	ISQ.Http.browser.isMobile=true;
	ISQ.Http.browser.usesViewport=true;
	ISQ.Http.browser.isAndroid=true
    }
    else
    {
	if(navigator.appVersion.indexOf("iPhone")!==-1){
	    var g=navigator.appVersion.substring(0,navigator.appVersion.indexOf(" "));
	    ISQ.Http.browser.app="safari";
	    ISQ.Http.browser.version="iphone "+parseInt(g);
	    ISQ.Http.browser.isMobile=true;
	    ISQ.Http.browser.usesViewport=true;
	    ISQ.Http.browser.isIPhone=true
	}
	else
	{
	    if(navigator.appVersion.indexOf("iPad")!==-1){
		var g=navigator.appVersion.substring(0,navigator.appVersion.indexOf(" "));
		/* identical to iPhone */
	    }
	    else
	    {
		if((a=b.indexOf("MSIE "))!==-1){
		    ISQ.Http.browser.app="ie";
		    a+=5;
		    /* version check skipped */
		}
		else
		{
		    if(b.indexOf("Chrome")!==-1){
			ISQ.Http.browser.app="chrome";
			ISQ.Http.browser.version="0"
		    }
		    else
		    {
			if((a=b.indexOf("Safari"))!==-1){
			    /* version check skipped */
			}
			else
			{
			    if((a=f.indexOf("Firefox/"))!==-1){
				ISQ.Http.browser.app="ff";
				/* version check skipped */
			    }
			    else
			    {
				if(f.indexOf("Opera/")!==-1){
				    ISQ.Http.browser.app="opera";
				    var c=f.indexOf("Version/");
				    if(c===-1){
					var d=f.indexOf(" ",6);
					ISQ.Http.browser.version=f.substring(6,d)
				    }
				    else
				    {
					/* version check skipped */
				    }
				    ISQ.Http.browser.isOpera=true
				}
				else
				{
				    if(f.contains("Symbian")){
					ISQ.Http.browser.app="symbian";
					ISQ.Http.browser.version=1;
					ISQ.Http.browser.full=ISQ.Http.browser.app+
					    ISQ.Http.browser.version
				    }
				    else
				    {
					ISQ.Http.browser.app="ie";
					ISQ.Http.browser.version="7.0;";
					ISQ.Http.browser.isIE7=true
				    }
				}
			    }
			}
		    }
		}
	    }
	}
    }
    ISQ.Http.browser.full=ISQ.Http.browser.app+ISQ.Http.browser.version;
    f=null;
    b=null
}
            Неизвестный автор ISQ фреймворка определяет браузер.
Яваскрипт, Визуал Студио; Частное собрание сочинений.
        
+158
if($_SERVER['HTTP_X_REQUESTED_WITH'] != "XMLHttpRequest") die("Вот тебе и лол...");неибическая защита от обычных запросов через урл в адресной строке)