"PHP" / Говнокод #9 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
function htmlspecialcharsex($str)
{
	if (strlen($str)>0)
	{
		$str = str_replace("&", "&", $str);
		$str = str_replace("<", "&lt;", $str);
		$str = str_replace(">", "&gt;", $str);
		$str = str_replace(""", "&quot;", $str);
		$str = str_replace("<", "<", $str);
		$str = str_replace(">", ">", $str);
		$str = str_replace("\"", """, $str);
	}
	return $str;
}

битрикс sex

guest guest, (Updated )

Комментарии (18, +18)

"PHP" / Говнокод #7 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
$res["LIST_PAGE_URL"] = str_replace("//", "/", str_replace("#LANG#", $res["LANG_DIR"],
							str_replace("#SITE_DIR#", SITE_DIR,
								str_replace("#SERVER_NAME#", SITE_SERVER_NAME,
									str_replace("#IBLOCK_ID#", $res["IBLOCK_ID"], $res["LIST_PAGE_URL"])
								)
							)
						)
					);

битрикс

guest guest, (Updated )

Комментарии (36, +36)

"PHP" / Говнокод #6 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
/// Однажды придумал от скуки :) the1st.net.ru

if(!function_exists('function_exists')) {
 function function_exists($f) {
  return function_exists($f);
 }
}

Придумано от скуки на досуге. Довольно спонтанно вырвалась мысль и была сразу воплощена в жизнь :)

guest guest, (Updated )

Комментарии (64, +64)

ЙажаСценарий / Говнокод #3 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
  32. 32
  33. 33
  34. 34
  35. 35
  36. 36
  37. 37
  38. 38
  39. 39
  40. 40
  41. 41
  42. 42
  43. 43
  44. 44
  45. 45
  46. 46
  47. 47
  48. 48
  49. 49
  50. 50
  51. 51
  52. 52
  53. 53
  54. 54
  55. 55
  56. 56
  57. 57
  58. 58
  59. 59
  60. 60
  61. 61
  62. 62
  63. 63
  64. 64
  65. 65
  66. 66
  67. 67
  68. 68
  69. 69
  70. 70
  71. 71
  72. 72
  73. 73
  74. 74
  75. 75
  76. 76
  77. 77
<html>

<head>
  <title>В Контакте | Страницы юзера</title>
    <style type="text/css">
    	body{
    		background: black;
    		color: #D1D1D1;
    		font-family: "Trebuchet MS", Verdana, Geneva, Arial, Helvetica, sans-serif;
    		font-size: 1.2em;
    	}
    	div.body{
    		margin-left: auto;
    		margin-right: auto;
    		width: 520px;
    	}
    	a{color: #D1D1D1; text-decoration: none;}
    	a:hover{color: #3e9af2; text-decoration: underline;}
    	li{white-space: nowrap; list-style: none;}
    	input{
    		background: black;
    		color: #D1D1D1;
    		border:none;
    		border-bottom: 1px dotted #D1D1D1;
    		font-family: "Trebuchet MS", Verdana, Geneva, Arial, Helvetica, sans-serif;
    		font-size: 1.2em;
    		margin-bottom: -2px;
    	}
    </style>
	<script type="text/javascript">
	<!--//
	function set_id(){
		var user_id_1 = document.getElementById('user_id').value.replace(/[^\d]/g, "");
		var user_id_2 = user_id_1 + '&' + Math.round(Math.random() * 999999);

		var user_links = '';
		user_links += '<ul>';
		user_links += '	<li><a href="http://vkontakte.ru/id' + user_id_1 + '?' + Math.round(Math.random() * 999999) + '" target="_blank">Главная страница</a></li>';
		user_links += '	<li>';
		user_links += '		<a href="http://vkontakte.ru/wall.php?id=' + user_id_2 + '" target="_blank">Стена</a>';
		user_links += '		<ul>';
		user_links += '			<li><a href="http://vkontakte.ru/wall.php?act=write&id=' + user_id_2 + '" target="_blank">Оставить сообщение</a></li>';
		user_links += '			<li><a href="http://vkontakte.ru/graffiti.php?act=draw&to_id=' + user_id_2 + '" target="_blank">Оставить графити</a></li>';
		user_links += '			<li><a href="http://vkontakte.ru/photos.php?to_id=' + user_id_2 + '" target="_blank">Оставить фото</a></li>';
		user_links += '			<li><a href="http://vkontakte.ru/video.php?to_id=' + user_id_2 + '" target="_blank">Оставить видио</a></li>';
		user_links += '			<li><a href="http://vkontakte.ru/audio.php?to_id=' + user_id_2 + '" target="_blank">Оставить аудио</a></li>';
		user_links += '		</ul>';
		user_links += '	</li>';
		user_links += '	<li><a href="http://vkontakte.ru/mail.php?act=write&to=' + user_id_2 + '" target="_blank">Отправить сообщение</a></li>';
		user_links += '	<li><a href="http://vkontakte.ru/friend.php?id=' + user_id_2 + '" target="_blank">Друзья</a></li>';
		user_links += '	<li><a href="http://vkontakte.ru/photos.php?id=' + user_id_2 + '" target="_blank">Альбомы</a></li>';
		user_links += '	<li><a href="http://vkontakte.ru/photos.php?act=user&id=' + user_id_2 + '" target="_blank">Фото с юзером</a></li>';
		user_links += '	<li><a href="http://pda.vkontakte.ru/taggedphotos' + user_id_1 + '" target="_blank">Фото с юзером, если надо посмотреть скрытые фото</a></li>';
		user_links += '	<li><a href="http://vkontakte.ru/video.php?id=' + user_id_2 + '" target="_blank">Видeо</a></li>';
		user_links += '	<li><a href="http://vkontakte.ru/questions.php?mid=' + user_id_2 + '" target="_blank">Вопросы</a></li>';
		user_links += '	<li><a href="http://vkontakte.ru/notes.php?id=' + user_id_2 + '" target="_blank">Заметки</a></li>';
		user_links += '	<li><a href="http://vkontakte.ru/apps.php?mid=' + user_id_2 + '" target="_blank">Приложения</a></li>';
		user_links += '	<li><a href="http://vkontakte.ru/groups.php?mid=' + user_id_2 + '" target="_blank">Группы</a></li>';
		user_links += '</ul>';

        document.title = 'В Контакте | Страницы юзера id' + user_id_1;
        document.getElementById('user_id').value = user_id_1;
		document.getElementById('user_pages').innerHTML = user_links;
	}
	//-->
	</script>
</head>
<body onLoad="set_id()">
	<div class="body">
		Страницы юзера id<input name="user_id" id="user_id" type="text" value="1" onKeyUp="set_id()" onKeyPress="set_id()" onPaste="set_id()">
		<div id="user_pages"></div>
		<noscript><p align="center">Ипать))) ... ктож а таком старье сидит)....<br />Включи JavaScript!</p></noscript>
		<p align="center">by Dr.Freez</p>
	</div>
</body>

</html>

говницо)))

guest guest, (Updated )

Комментарии (163, +163)

"PHP" / Говнокод #1 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
$error = "Всё хорошо";
 
if (!$_POST['mail'] || !checkEmail($_POST['mail'])) {
    $error .= "Не верный E-mail";
}
 
...
 
if ($error == "Всё хорошо") {
    $db->query("INSERT...
} else {
 
...

guest guest, (Updated )

Комментарии (582, +582)