- 1
- 2
- 3
ibox.com.ua/
ibox.com.ua/index.php
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+121
ibox.com.ua/
ibox.com.ua/index.php
Решил тут найти почитать что можно пополнить через терминал ibox. Там флешка и закрыть ее я не нашел где... ну ради прикола на index.php ринулся.
На сервере установлен PHP версии 5.1.6, однако для WordPress 3.3.1 требуется хотя бы 5.2.4.
Ну вот скажите разве такая прибыльная компания не может себе нормальный сайт заказать?
+157
function numword() {
$args = func_get_args();
$num = $args[0] % 100;
if ($num > 19) {
$num = $num % 10;
}
switch ($num) {
case 1: { return $args[1]; }
case 2:
case 3:
case 4: { return $args[2]; }
default: { return $args[3]; }
}
}
Склонение слов по числам
+166
<?php
//...
echo date("d.", $Item->pubDate).date("m", $Item->pubDate).date(".Y H:i", $Item->pubDate);
//...
?>
Оригинальный вариант вывода даты в формате "23.11.2011 19:32".
+163
if (isset($_POST['password']) AND $_POST['password'] != '') {
if ($_POST['password'] == $_POST['password_repeat']) {
$sql = "UPDATE `users` SET password='$passwordinmd5' WHERE userId='$param1'";
$result = mysql_query($sql);
echo mysql_error() . "\n";
$message = "Вам был установлен новый пароль для доступа:";
$message .= "Ваш пароль:" . $_POST['password'] . " ";
$headers = 'From: ***.com.ua <noreply@***.com.ua>' . "\r\n";
mail($data[email], "Новый пароль", $message, $headers);
print '<center style=color:blue;>Пароль успешно обновлен</center>';
echo "<script>window.location = '/admin/paymasters/'</script>";
}
else {
print '<center style="color:#f00">Вы допустили ошибку при вводе нового пароля</center>';
}
}
else {
if($_POST['password']) {
print '<center style="color:#f00">Вы допустили ошибку при вводе нового пароля</center>';
echo "<script>window.location = '/admin/paymastersnewpassw/" . "$param1" . "'</script>";
}
}
Вот так вот изменяют пароль
+147
body {
background-image: url("linux.jpg");
background-color: yellow;
/*background-repeat: no-repeat;*/
background-position: 25% 25%;
background-attachment: fixed !important;
color: #FF0000;
font-family: Arial,"New Arial",fantasy;
font-style: normal;
}
p {
color: #000000;
font-family: Arial;
font-style: normal;
}
a {
color: #ff0000;
}
table, textarea:focus, input:focus {
outline-style: double;
outline-color: #17f400;
outline-size: 3px;
}
CSS from my site.
+165
<?php
$connect=odbc_connect($_POST['tablica'],"test","test");
$query = $_POST['sql_zapros'];
$result = odbc_exec($connect, $query) or die("Couldn't execute query!");
odbc_result_all($result, "BGCOLOR='#c0c0c0' border='1' ");
odbc_free_result($result);
odbc_close($connect);
?>
+168
$mes_for_mail=str_replace("[code]","",$mes_for_mail);
$mes_for_mail=str_replace("[/code]","",$mes_for_mail);
$mes_for_mail=str_replace("[b]","",$mes_for_mail);
$mes_for_mail=str_replace("[/b]","",$mes_for_mail);
$mes_for_mail=str_replace("[i]","",$mes_for_mail);
$mes_for_mail=str_replace("[/i]","",$mes_for_mail);
$mes_for_mail=str_replace("[u]","",$mes_for_mail);
$mes_for_mail=str_replace("[/u]","",$mes_for_mail);
$mes_for_mail=str_replace("[s]","",$mes_for_mail);
$mes_for_mail=str_replace("[/s]","",$mes_for_mail);
$mes_for_mail=str_replace("[tt]","",$mes_for_mail);
$mes_for_mail=str_replace("[/tt]","",$mes_for_mail);
$mes_for_mail=str_replace("[sup]","",$mes_for_mail);
$mes_for_mail=str_replace("[/sup]","",$mes_for_mail);
$mes_for_mail=str_replace("[sub]","",$mes_for_mail);
$mes_for_mail=str_replace("[/sub]","",$mes_for_mail);
$mes_for_mail=str_replace("[code]","",$mes_for_mail);
$mes_for_mail=str_replace("[/code]","",$mes_for_mail);
$mes_for_mail=str_replace("[font color=FF0000]","",$mes_for_mail);
$mes_for_mail=str_replace("[font color=0000FF]","",$mes_for_mail);
$mes_for_mail=str_replace("[font color=008080]","",$mes_for_mail);
$mes_for_mail=str_replace("[/font]","",$mes_for_mail);
я плакол)
+163
if(!($_POST[$_POST[parameter_value]])){$parameter_value=" ";}else{$parameter_value=$_POST[$_POST[parameter_value_cash]];}
+122
Controller.cs
public ActionResult SomeAction()
{
return View("My message");
}
SomeAction.cshtml
@{
Layout = null;
}
@Html.Raw(string.Format("{0}", Model.ToString()))
Да, это ASP.Net MVC
−86
def search_with_city(obj1, obj2, obj3):
print '------------Search by latitude, longitude and city------------'
list1 = []
list_new = []
while True:
line = file_airport.readline().lower()
if obj3 in line:
Str_file = ''.join(line)
List_file2 = Str_file.split(',')
if obj3 in List_file2[7]:
list1.append(List_file2)
for item in list1:
item.append(sqrt((float(item[11]) - float(obj1))**2 + (float(item[12]) - float(obj2))**2))
list_new = sorted(list1, key = lambda x: x[-1], reverse = False)
config = yaml.load(open('findairport.conf'))
outs = config['output']
for List_file in list_new:
if List_file2[3] != List_file[3]:
for out in outs:
out = out % dict(airportcode = str(List_file[0]).upper(), distance = List_file[-1],\
airportname = str(List_file[13]).title(), sa = str(List_file[8]).title(), street = str(List_file[10]).title(),\
city = str(List_file[7]).title(), state = str(List_file[5]).upper(), zip = List_file[3],\
country = str(List_file[2]).upper(), lat = str(List_file[11]), lon = str(List_file[12]+'\n'))
print out
if not line:
break
try:
if not obj1 in line and not obj2 in line and not obj3 in line:
print 'Nothing more is been found'
except:
pass
else:
pass
file_airport.seek(0)
PHP'шники наступают! :)