- 1
- 2
- 3
- 4
- 5
if ($type['my_event']) {
$select->where('1=1)))');
} else {
$select->where('1=1))');
}
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+79
if ($type['my_event']) {
$select->where('1=1)))');
} else {
$select->where('1=1))');
}
Индусы..
+97
namespace Interface.module1
{ class Sort_text
{ private string[] str;
public Sort_text(string[] astr)
{ if (astr.Length == 0)
{ str = new String[1];
str[0] = "";
}
else
{ str = new String[astr.Length];
str = astr; }
}
public string[] Str
{ get { return str; }
set { this.str = value; }
}
public void sort_poslovno_pryamoi()
{ string ss = "";
List<string> t = new List<string>();
for (int i = 0; i < Str.Count(); i++)
for (int j = 0; j < Str[i].Length; j++)
{ if (Str[i][j] == ' ')
{ if (ss == "")
continue;
t.Add(ss);
ss = "";
}
else
{ ss = ss + Str[i][j];
if (j + 1 == Str[i].Length && ss != "")
{ t.Add(ss);
ss = ""; }
}
}
t.Sort();
Str = t.ToArray();
}
public void sort_poslovno_obratnyi()
{ string ss = "";
List<string> t = new List<string>();
for (int i = 0; i < Str.Count(); i++)
for (int j = 0; j < Str[i].Length; j++)
{ if (Str[i][j] == ' ')
{ if (ss == "")
continue;
t.Add(ss);
ss = ""; }
else
{ ss = ss + Str[i][j];
if (j + 1 == Str[i].Length && ss != "")
{ t.Add(ss);
ss = ""; }
}
}
t.Sort();
t.Reverse();
Str = t.ToArray();
}
public void sort_postrochno_pryamoi()
{ string ss = "";
List<string> t = new List<string>();
for (int i = 0; i < Str.Count(); i++)
{ t.Add(Str[i]);
}
t.Sort();
Str = t.ToArray();
}
public void sort_postrochno_obratnyi()
{ string ss = "";
List<string> t = new List<string>();
for (int i = 0; i < Str.Count(); i++)
{ t.Add(Str[i]);
}
t.Sort();
t.Reverse();
Str = t.ToArray();
}
}
class Sort_bin
{ private byte[] b;
public Sort_bin(byte[] ab)
{ b = ab; }
public byte[] B
{ get { return b; }
set { this.b = value; }
}
public void sort_bin_pryamoi()
{ List<byte> t = new List<byte>(B.ToList());
t.Sort();
B = t.ToArray();
}
public void sort_bin_obratnyi()
{ List<byte> t = new List<byte>(B.ToList());
t.Sort();
t.Reverse();
B = t.ToArray(); }
}
}
+93
private void Form1_Load(object sender, EventArgs e)
{
this.пользователиTableAdapter.Fill(this.пользователиDataSet.Пользователи);
}
private void button1_Click(object sender, EventArgs e)
{
string a1 = textBox1.Text;
string a2 = a1 + ";" + textBox2.Text;
int d = dataGridView1.ColumnCount-1;
int d1 = dataGridView1.RowCount-1;
for (int i = 0; i < d1; i++)
{
for (int j = 0; j < d; j++)
{
if (a2 == ";")
{
MessageBox.Show("Введите логин и пароль");
d = 0;
d1 = 0;
break;
}
if (a2 == dataGridView1.Rows[i].Cells[0].Value.ToString())
{
int r1 = i;
int r2 = j;
string r11 = dataGridView1.Rows[r1].Cells[r2 + 1].Value.ToString() + dataGridView1.Rows[r1].Cells[r2 + 2].Value.ToString() + dataGridView1.Rows[r1].Cells[r2 + 3].Value.ToString() + dataGridView1.Rows[r1].Cells[r2 + 4].Value.ToString();
if (r11 == "++--")
{
Hide();
Form2 f2 = new Form2();
f2.ShowDialog();
d = 0;
d1 = 0;
this.Close();
break;
}
if (r11 == "--++")
{
Hide();
Form3 f3 = new Form3();
f3.ShowDialog();
d = 0;
d1 = 0;
this.Close();
break;
}
if (r11 == "--+-")
{
Hide();
Form4 f4 = new Form4();
f4.ShowDialog();
d = 0;
d1 = 0;
this.Close();
break;
}
}
int d11 = d1-1;
int dd = d-1;
if (j == dd && i == d11)
{
MessageBox.Show("Логин или пароль отсутствует в базе данных");
}
}
}
}
}
}
http://www.youtube.com/watch?v=MNQb-uxneYs
+108
userPerms = (Permissions)Session["permissions"];
if (userPerms.AllUserRights["rod_view"] == null && userPerms.AllUserRights["rod_view"] == null) {
throw new Exception("no rights");
}
Я по два раза по два раза не повторяю не повторяю.
+73
[production]
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
includePaths.library = APPLICATION_PATH "/../library"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
appnamespace = "Application"
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.frontController.params.displayExceptions = 0
resources.log.khuy.writerName = "Firebug"
resources.view.helperPath.Zend_View_Helper = APPLICATION_PATH "/../library/Zend/View/Helper"
resources.view.helperPath.My_View_Helper = APPLICATION_PATH "/views/helpers"
[staging : production]
[testing : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
[development : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
resources.frontController.params.displayExceptions = 1
+96
// expressions to parse
$input_pars = array(
's:2'=>'(sort(\d+)/?)?', //1-2
'id:2'=>'((\d+)/?)?', //3-4
'utkonos_id-shop_id:2-2'=>'(u(\d+)(s(\d+))?/)?', //5-6 7-8
'iid:1'=>'([0-9a-zA-Z_]+)/?', //9
'page:2'=>'(pg(\d+)/)?', //10-11
'chpsize:2'=>'(chp(\d+)/)?', //12-13
'chlist:2'=>'(chlist_(grid|list)/)?', //14-15
'p_other:1'=>'(.*)', //16
);
if(!$class)unset($input_pars['iid:1']);
$m = array();
$i=0;
if(isset($_REQUEST['p_'])&&preg_match('[^'.implode('',$input_pars).'$]',$_REQUEST['p_'],$m)) {
//vd($m);
foreach($input_pars as $key=>$line) {
list($par_name,$num) = explode(':', $key);
$par_name_arr = explode('-',$par_name);
$num_arr = explode('-',$num);
if(count($par_name_arr)>1) {
foreach($par_name_arr as $kluch => $par_name) {
$i += $num_arr[$kluch];
$_REQUEST[$par_name] = $m[$i];
}
}else{
$i += $num;
$_REQUEST[$par_name] = $m[$i];
}
}
$_REQUEST['id'] += 0;
if ($_REQUEST['s'] === '0') {
$_REQUEST['s'] = 0;
}
if ($_REQUEST['chpsize'] === '0') {
$_REQUEST['chpsize'] = 0;
}
vd($_REQUEST);
}else{
$_REQUEST['s'] = grv('s',-1); /// Сортировка
$_REQUEST['id'] = grv('id',0);
$_REQUEST['shop_id'] = grv('shop_id',0);
$_REQUEST['page'] = grv('page',0);
$_REQUEST['chpsize'] = (int)grv('chpsize',-1);
}
+95
<table style="width: 100%">
<tr>
<td rowspan="2" style="width: 39px"> </td>
<td height="22px" width="306px" background="/templates/images/all_for_your.jpg" style="background-repeat: no-repeat;"></td>
<td> </td>
</tr>
<tr>
<td width="306px">
<table class="style2" style="height: 147px;" >
<tr>
<!--<td height="22px" width="306px" background="/templates/images/all_for_your.jpg">
</td>-->
</tr>
<tr>
<td class="style14" style="height: 21px;"><a href="page13.html" <?php if ($_GET['id'] == 13) echo "style=\"color: red;\""; ?>> ччччч</td>
</tr>
<tr>
<td class="style14" style="height: 21px;"><a href="page12.html" <?php if ($_GET['id'] == 12) echo "style=\"color: red;\""; ?>> фвургия</td>
</tr>
<tr>
<td class="style14" style="height: 21px; ">
<a href="page8.html" <?php if ($_GET['id'] == 8) echo "style=\"color: red;\""; ?>> ывфыв</a> </td>
</tr>
<tr>
<td class="style14" style="height: 21px; ;"><a href="page9.html" <?php if ($_GET['id'] == 9) echo "style=\"color: red;\""; ?>> ыывсия</td>
</tr>
<tr>
<td class="style14" style="height: 21px; "><a href="page43.html" <?php if ($_GET['id'] == 43) echo "style=\"color: red;\""; ?>> Вмиика</td>
</tr>
<tr>
<td class="style14" style="height: 21px; "><a href="page10.html" <?php if ($_GET['id'] == 10) echo "style=\"color: red;\""; ?>>ние</td>
</tr>
<tr>
<td class="style14" style="height: 21px; "><a href="page14.html" <?php if ($_GET['id'] == 14) echo "style=\"color: red;\""; ?>>Одыа
</td>
</tr>
<tr>
<td class="style14" style="height: 21px; "><a href="page22.html" <?php if ($_GET['id'] == 22) echo "style=\"color: red;\""; ?>> Оысия</td>
</tr>
</table>
Один из старых сайтов нашел:)
+91
#include <amxmodx>
new g_MsgSync
new g_MsgSync2
new isConnected[33 char]
public plugin_init()
{
register_plugin("Damager", "1.0", "Prayer")
register_event("Damage", "EVENT_Damage", "b", "2!0", "3=0", "4!0")
g_MsgSync = CreateHudSyncObj()
g_MsgSync2 = CreateHudSyncObj()
}
public client_putinserver(id)
{
isConnected{id} = true
}
public client_disconnect(id)
{
isConnected{id} = false
}
public EVENT_Damage(id)
{
if(isConnected{id})
{
static damage, pid
damage = read_data(2)
set_hudmessage(255, 0, 0, 0.45, 0.50, 2, 0.1, 4.0, 0.1, 0.1, -1)
ShowSyncHudMsg(id, g_MsgSync2, "%d", damage)
pid = get_user_attacker(id)
if((pid > 0) && (pid < 33) && isConnected{pid})
{
set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, -1)
ShowSyncHudMsg(pid, g_MsgSync, "%d", damage)
}
}
}
Это павн переработанный вельвом. Кто писал плагины для CS тот поймёт всю соль.
+158
if($_SERVER['HTTP_X_REQUESTED_WITH'] != "XMLHttpRequest") die("Вот тебе и лол...");
неибическая защита от обычных запросов через урл в адресной строке)
+139
#include <iostream>
#include <conio.h>
#define true false // Wish you happy debug!
int main(int argc, char* argv[])
{
std::cout << (((1+1)==2) ? true : false);
getch();
return 0;
}
Wish you happy debug!