- 1
- 2
- 3
- 4
if (xmlHttp.status==200){
xmlResponse=xmlHttp.responseXML;
xmlDocumentElement=xmlResponse.documentElement; helloMessage=xmlDocumentElement.firstChild.data;
}
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+143
if (xmlHttp.status==200){
xmlResponse=xmlHttp.responseXML;
xmlDocumentElement=xmlResponse.documentElement; helloMessage=xmlDocumentElement.firstChild.data;
}
if (xmlHttp.status==200){
xmlResponse=xmlHttp.responseXML;
xmlDocumentElement=xmlResponse.documentE lement; helloMessage=xmlDocumentElement.firstChi ld.data;
}
+132.3
include "include/template.php";
stdhead(null,'Он-лайн табло');
echo '<table><tr><td>';
$firarray = mysql_query("SELECT * FROM online_firs GROUP BY fir ASC");
while ($fir = mysql_fetch_array($firarray)){ // пробегаемся по РЦентрам
$firnamearray = mysql_query("SELECT * FROM firdata WHERE fir='".$fir[fir]."'");
$firname = mysql_fetch_array($firnamearray); // получим название текущего РЦ
// вложенная таблица районного центра
echo '<table width=100%>';
echo '<tr><td background="images/airport_header.gif"> '.$fir[fir].' '.$firname[name].' FIR</td></tr><tr><td>';
//вложенная таблица диспетчерских пунктров
echo '<table>';
$atcarray = mysql_query("SELECT * FROM online WHERE atc_fir='".$fir[fir]."' and clienttype='ATC' ORDER BY atc_callsign ASC");
while ($atc = mysql_fetch_array($atcarray)){ // пробегаемся по позициям
// если позиция существует - то отображаем
$positionarray=explode("_",$atc[callsign]); // расхуячиваем код позывного на Икао и Позицию.
$positiontype=array_pop($positionarray); // выдёргиваем последний элемент, т.е. тип позиции (app twr gnd итд)
if (($positiontype=='GND') || ($positiontype=='TWR') || ($positiontype=='APP') || ($positiontype=='CTR') || ($positiontype=='FSS') || ($positiontype=='DEL') ){
// расхуячим АТИС построчно
$atis='';
$atisarray=explode("^§",$atc[atc_atis]); // разбираем общую строку на ВПП по разделителю %
foreach ($atisarray as $x => $atisdetalis){ // пробегаем по всем параметрам ВПП, поочерёдно для каждой
$atis=$atis.$atisdetalis.'; ';}
echo '<tr style="color: #ff0000">'. // задаётся цвет шрифта
'<td width="90">'.$atc[callsign]. '</td>'.
'<td width="200" title="'.$atis.'">'.$atc[atc_callsign]. '</td>'.
'<td width="90">'.$atc[atc_freq]. '</td>'.
'<td width="200" title="'.$atc[pid].' '.$atc[atc_rating].'"><a href="http://stats.vatsim.net/search_id.php?id='.$atc[pid].'">'.$atc[fio]. '</a></td></tr>';
}
}
echo '</table >'; //закрывающий таблицы диспетчерских пунктов
//вложенная таблица ВС
echo '<table >';
$portarray = mysql_query("SELECT * FROM online_firs WHERE fir='".$fir[fir]."' GROUP BY port ASC");
while ($port = mysql_fetch_array($portarray)){ // пробегаемся по портам
if ($port[port]){
// получим название аэродрома . И если есть такой АД в базе данных тогда добавим ссыль не его страницу
$airport = mysql_fetch_array(mysql_query("SELECT * FROM airportdata WHERE port='".$port[port]."' "));
$airportpage = mysql_fetch_array(mysql_query("SELECT * FROM airport WHERE ikao='".$port[port]."' "));
if ($airportpage[name]) $link='<a href="airport.php?icao='.$port[port].'"><img src="images/icon/info.png"></img> </a>';
echo '<tr><td colspan="8"> - '.$port[port].' '.$airport[name].' </td><td>'.$link.'</td></tr>'; $link='';
// получим прибытия и выведем нахуй
$arrivalarray = mysql_query("SELECT * FROM online WHERE fp_arrival_port='".$port[port]."' ORDER BY time_arr ASC");
while ($arrival = mysql_fetch_array($arrivalarray)){ // пробегаемся по прибытиям
echo '<tr style="color: #000000">'. // задаётся цвет шрифта прибывающих
'<td width="90" title="'.$arrival[fio].'"><a href="http://vataware.com/pilot.cfm?cid='.$arrival[pid].' ">'.$arrival[callsign].' </a></td>'.
'<td width="95">'.$arrival[fp_acfttype].'</td>';
// Если расстояние до АД прилёта более 10 км
if ($arrival[dist_from_ad_arr] > 10) echo '<td width="65" title="Время прибытия">'.$arrival[time_arr].'</td>';
else echo'<td style="color: #a0a0a0" width="65" >arrived</td>';
echo'<td width="110" title="'.$arrival[fp_route].'">'.$arrival[fp_departure_port].'-'.$arrival[fp_arrival_port].'</td>'.
'<td width="100" title="Текущий эшелон | Эшелон по плану">FL'.ceil($arrival[alt]/100).'|'.$arrival[fp_flevel].'</td>'.
'<td width="40" title="Скорость (км/ч) ">'.ceil($arrival[speed]).'</td>'.
'<td width="40">'.$arrival[fp_sq].'</td></tr>';
}
// получим отправления и выведем нахуй
$departurearray = mysql_query("SELECT * FROM online WHERE fp_departure_port='".$port[port]."' ORDER BY time_arr ASC");
while ($departure = mysql_fetch_array($departurearray)){ // пробегаемся по прибытиям
echo '<tr style="color: #a0a0a0">'. // задаётся цвет шрифта вылетающих
'<td width="90" title="'.$departure[fio].'"><a href="http://vataware.com/pilot.cfm?cid='.$departure[pid].' " target="_blank">'.$departure[callsign].' </a></td>'.
'<td width="95" >'.$departure[fp_acfttype].'</td>';
// Если расстояние от АД вылета менее 60ти километов
if ($departure[dist_from_ad_dep] < 60) echo'<td width="65" >departing</td>';
else echo'<td width="65" >in flight</td>';
echo'<td width="110" title="'.$departure[fp_route].'">'.$departure[fp_departure_port].'-'.$departure[fp_arrival_port].'</td>'.
'<td width="100" title="Текущий эшелон | Эшелон по плану">FL'.ceil($departure[alt]/100).'|'.$departure[fp_flevel].'</td>'.
'<td width="40" title="Скорость (км/ч) ">'.ceil($departure[speed]).'</td>'.
'<td width="40" >'.$departure[fp_sq].'</td></tr>';
}
}
}
echo '</table >'; // закрывающий таблицы ВС
echo '</td></tr></table >'; // закрывающий таблицы РЦ
}
echo '</td></tr></table >'; // закрывающий главной таблицы
stdfoot(null);
+151.1
if(!preg_match('/<table border="0" width="48%" cellspacing="0" cellpadding="5" class="modelProperties">(.+)<\/div>/isU', $tovar_page, $test)){
preg_match('/<table border="0" width="50%" cellspacing="0" cellpadding="5" class="modelProperties">(.+)<\/div>/isU', $tovar_page, $test);
}
парсер я.маркета
+154
<?php
$socket = stream_socket_server("tcp://127.0.0.1:8982", $errno, $errstr);
if (!$socket)
echo "$errstr ($errno)<br />\n";
while (TRUE){
$conn = stream_socket_accept($socket);
if(pcntl_fork() == -1) {
echo "Sorrr: fork failure!\n";
die();
}
if(pcntl_fork() == 0)
{
fwrite($conn, "Hello!\n");
$input=fread($conn,1024);
fwrite($conn,$input . "\n");
if ($input = "quit")
{
fwrite($conn,"Terminated");
fclose($conn);
fclose($socket);
sleep (5);
exit();
}else{
fwrite($conn,"Enter data:");
}
}
}
fclose($conn);
?>
+149
for($i=1; $i<=$count; $i++) {
$buf = ...
$result = preg_match($filter, $buf, $matches);
if ($result > 0) {
fwrite($handle,"ok\n");
fwrite($handle, $buf);
exit(0);
fclose($handle);
break;
}
}
+147
function getPayBackTime() {
//$time = $this->db->query("SELECT scn_id FROM sections WHERE scn_from_d<='".date("d")."' AND scn_to_d >='".date("d")."' AND scn_from_m='".date("m")."' AND scn_from_y='".date("Y")."'");
//return $time[0]['scn_id'];
return 12;
}
+143
$i = (True)?(True?True:False):False;
$i = !$i;
if (($i)?(!$i?$i:!$i):$i) die('Наговнокодить!');
die('Говнокод!');
что выведет скрипт? ))))
+174
if (!function_exists('function_exists')) die('o_O');
существует или нет, вот в чем вопрос
+153
<?php
/*
$Id: specials.php,v 1.1.1.1 2004/03/04 23:42:27 ccwjr Exp $
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2003 osCommerce
CRE Loaded , Open Source E-Commerce Solutions
http://www.creloaded.com
Chain Reaction Works, Inc
Portions: Copyright © 2005 - 2006 Chain Reaction Works, Inc.
Last Modified by $Author$
Last Modifed on : $Date$
Latest Revision : $Revision:$
Released under the GNU General Public License
*/
if(!tep_session_is_registered('sppc_customer_group_id')) {
$customer_group_id = 'G';
} else {
$customer_group_id = $sppc_customer_group_id;
}
$random_product25 = tep_db_query("select distinct
p.products_id,
pd.products_name,
IF(pg.customers_group_price IS NOT NULL,pg.customers_group_price, p.products_price) as products_price,
p.products_tax_class_id,
p.products_image,
s.specials_new_products_price
from " . TABLE_PRODUCTS . " p
left join " . TABLE_PRODUCTS_GROUPS . " pg on p.products_id = pg.products_id and pg.customers_group_id like '%" . $customer_group_id . "%',
" . TABLE_PRODUCTS_DESCRIPTION . " pd,
" . TABLE_SPECIALS . " s
where
p.products_status = '1'
and p.products_id = s.products_id
and pd.products_id = s.products_id
and pd.language_id = '" . (int)$languages_id . "'
and s.status = '1'
and p.products_group_access like '%". $customer_group_id."%'
order by rand(), s.specials_date_added desc limit " . MAX_RANDOM_SELECT_SPECIALS);
$random_product24_side_row = tep_db_num_rows($random_product25);
if ($random_product24_side_row > 0){
// EOF Separate Price per Customer
//Eversun mod end for sppc and qty price breaks
?>
<!-- d specials //-->
<tr>
<td>
<?php
while ($product_specials22 = tep_db_fetch_array($random_product25)){
$product_specials22_id = $product_specials22['products_id'];
$product_specials22_image = tep_get_products_image($product_specials22['products_id']);
$product_specials22_name = tep_get_products_name($product_specials22['products_id']);
$pf->loadProduct($product_specials22['products_id'],$languages_id);
$special_random_price = $pf->getPriceStringShort();
}
$info_box_contents = array();
$info_box_contents[] = array('text' => '<font color="' . $font_color . '">' . BOX_HEADING_SPECIALS . '</font>');
new infoBoxHeading($info_box_contents, tep_href_link(FILENAME_SPECIALS));
$info_box_contents = array();
$info_box_contents[] = array('align' => 'center',
'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $product_specials22_id) . '">' . tep_image(DIR_WS_IMAGES . $product_specials22_image, $product_specials22_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $product_specials22_id) . '">' . $product_specials22_name . '</a><br>' . $special_random_price);
new infoBox($info_box_contents);
if (TEMPLATE_INCLUDE_FOOTER =='true'){
$info_box_contents = array();
$info_box_contents[] = array('align' => 'left',
'text' => tep_draw_separator('pixel_trans.gif', '100%', '1')
);
new infoboxFooter($info_box_contents);
}
?>
</td>
</tr>
<!-- d specials_eof //-->
<?php
}
?>
Судя по всему, это говнокод с CRE Loaded. Это кусок дерьма, еще и продается за большие деньги!
+147
<?php
/***************************************************************************
* usercp_activate.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : [email protected]
*
* Id: usercp_activate.php,v 1.6.2.9 2005/09/14 18:14:30 acydburn Exp
*
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
***************************************************************************/
if ( !defined('IN_PHPBB') )
{
die('Hacking attempt');
exit;
}
Рихиты что ж тут еще скажешь...