- 1
- 2
$users_count = count($this->db->exe('select * from px_users'));
$users = $this->db->exe('select * from px_users order by name limit ' . $from . ',' . $perpage);
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+137
$users_count = count($this->db->exe('select * from px_users'));
$users = $this->db->exe('select * from px_users order by name limit ' . $from . ',' . $perpage);
−349
def MappingRights(i, s, u, d):
INS=i.split(":")
SEL=s.split(":")
UPD=u.split(":")
DEL=d.split(":")
id_group=INS[0];
right=str(int(bool(INS[1].capitalize()))) + \
str(int(bool(SEL[1].capitalize()))) + \
str(int(bool(UPD[1].capitalize()))) + \
str(int(bool(DEL[1].capitalize())))
return id_group, right;
Парсим массив с правами переданный из JavaScript.
нужно из "true" получить "1", соответственно из "false" "0"
−293.6
If (g_manager.isVehicleArrived) Then
....
g_data_layer.registerVehicle( new_vehicle )
Else
'Do Nothing
End If
'и Do Nothing еще в 20 блоках идущих подряд
Кусок кода из одной очень серьезной системы, стоящей >2500$. Изменения несущественны, но суть говнокода не изменилась.
+139
это твой щенок. теперь он твой навсегда.
и ты не хочешь, но считаешь его дни и года.
твоя любовь к нему огромна, с каждым днём она растёт.
она станет бесконечной,
когда он умрёт.
для виолет_салмон
+166.1
<script language='JavaScript' type='text/javascript'>
document.write( '<span style=\'display: none;\'>' );
</script>
Этот e-mail адрес защищен от спам-ботов, для его просмотра у Вас должен быть включен Javascript
<script language='JavaScript' type='text/javascript'>
document.write( '</' );
document.write( 'span>' );
</script>
+141.7
function GetRandomChance(startchance,endchance)
{
var randomvalue = new Array;
randomvalue[0]=(Math.random()*(startchance/endchance));
randomvalue[1]=(Math.random()*(endchance/startchance));
randomvalue[2]=(Math.random()*(48375427/54277435));
randomvalue[3]=(randomvalue[0]/randomvalue[1]);
randomvalue[4]=(randomvalue[3]/randomvalue[2]);
randomvalue[5]=(randomvalue[4]*(startchance/endchance));
randomvalue[6]=(randomvalue[5]*Math.random()*182473646646*134636463*randomvalue[0]*randomvalue[3]*randomvalue[5]);
return(randomvalue[6]);
}
function GetSSIODC(siteSpoiler)
{
BaseCutR=siteSpoiler.indexOf("["+defCut+"=");
StartCutR=(BaseCutR+("["+defCut+"=").length);
PreCutR=(siteSpoiler.slice(StartCutR).indexOf("]"));
EndCutR=(StartCutR+PreCutR);
CheckCutR=(EndCutR+siteSpoiler.slice(StartCutR).indexOf('['+defCut));
if(CheckCutR==EndCutR-1||EndCutR<CheckCutR){BoolCutR=true;}
if(BoolCutR==true){StringCutR=siteSpoiler.slice(StartCutR,EndCutR);}
}
function GetSSIODCNG(siteSpoiler)
{
BaseCut2R=siteSpoiler.indexOf("["+defCutNG+"=");
StartCut2R=(BaseCut2R+("["+defCutNG+"=").length);
PreCut2R=(siteSpoiler.slice(StartCut2R).indexOf("]"));
EndCut2R=(StartCut2R+PreCut2R);
CheckCut2R=(EndCut2R+siteSpoiler.slice(StartCut2R).indexOf('['+defCutNG));
if(CheckCut2R==EndCut2R-1||EndCut2R<CheckCut2R)
{
BoolCut2R=true;
}
if(BoolCut2R==true)
{
StringCut2R=siteSpoiler.slice(StartCut2R, EndCut2R);
}
}
function RetAHSFGSHS(siteSpoiler)
{
Random[1]=GetRandomChance(1000000000,100000);
Random[2]=GetRandomChance(1000000,100);
siteSpoiler=siteSpoiler.replace('['+defCutNG+']',f_defPreSPMsgTitle1a(""+Random[1]+i)+Random[1]+i+f_defPreSPMsgTitle1b+(x_imageSpoilerIcon_cl&&x_imageSpoilerIcon_op?(f_defPreSPMsgSPICON_x_imageSp()+Random[1]+i+f_defPostSPMsgSPICON_x_imageSp):"")+DefaultSpoilerText+f_defPostSPMsgTitle1a+Random[1]+i+f_defPostSPMsgTitle1b).replace('['+defCutNG+'=',f_defPreSPMsgTitle1a(""+Random[2]+i)+Random[2]+i+f_defPreSPMsgTitle1b+(x_imageSpoilerIcon_cl&&x_imageSpoilerIcon_op?(f_defPreSPMsgSPICON_x_imageSp()+Random[2]+i+f_defPostSPMsgSPICON_x_imageSp):"")+StringCut2R+f_defPostSPMsgTitle1a+Random[2]+i+f_defPostSPMsgTitle1b).replace((StringCut2R+']'),'');
return(siteSpoiler);
}
function RetAHSFGNOSHS(siteSpoiler)
{
siteSpoiler=siteSpoiler.replace('['+defCutNG+']',defPreHTWSPMsgTitle+DefaultHiddenTextWarning+defPostHTWSPMsgTitle).replace('['+defCutNG+'=',defPreHTW2SPMsgTitle+StringCut2R+defPostHTW2SPMsgTitle+DefaultHiddenTextWarning+defPost2HTW2SPMsgTitle).replace((StringCut2R+']'),'');
return(siteSpoiler);
}
function RetSTDAHSFG(siteSpoiler)
{
Random[3]=GetRandomChance(1000000000,100000);
Random[4]=GetRandomChance(1000000,100);
siteSpoiler=siteSpoiler.replace('['+defCut+']',f_defPreSPMsgTitle1a(""+Random[3]+i)+Random[3]+i+f_defPreSPMsgTitle1b+(x_imageSpoilerIcon_cl&&x_imageSpoilerIcon_op?(f_defPreSPMsgSPICON_x_imageSp()+Random[3]+i+f_defPostSPMsgSPICON_x_imageSp):"")+DefaultSpoilerText+f_defPostSPMsgTitle1a+Random[3]+i+f_defPostSPMsgTitle1b).replace('['+defCut+'=',f_defPreSPMsgTitle1a(""+Random[4]+i)+Random[4]+i+f_defPreSPMsgTitle1b+(x_imageSpoilerIcon_cl&&x_imageSpoilerIcon_op?(f_defPreSPMsgSPICON_x_imageSp()+Random[4]+i+f_defPostSPMsgSPICON_x_imageSp):"")+StringCutR+f_defPostSPMsgTitle1a+Random[4]+i+f_defPostSPMsgTitle1b).replace((StringCutR+']'), '');
return(siteSpoiler);
}
function RetNOAHSFGSHS(siteSpoiler)
{
Random[5]=GetRandomChance(1000000000,100000);
Random[6]=GetRandomChance(1000000,100);
Random[7]=GetRandomChance(1000000000000,100000);
Random[8]=GetRandomChance(1000000,100000);
siteSpoiler=siteSpoiler.replace('['+defCutNG+']',f_defPreSPMsgTitle1a(""+Random[5]+i)+Random[5]+i+f_defPreSPMsgTitle1b+(x_imageSpoilerIcon_cl&&x_imageSpoilerIcon_op?(f_defPreSPMsgSPICON_x_imageSp()+Random[5]+i+f_defPostSPMsgSPICON_x_imageSp):"")+DefaultSpoilerText+f_defPostSPMsgTitle1a+Random[5]+i+f_defPostSPMsgTitle1b).replace('['+defCutNG+'=',f_defPreSPMsgTitle1a(""+Random[6]+i)+Random[6]+i+f_defPreSPMsgTitle1b+(x_imageSpoilerIcon_cl&&x_imageSpoilerIcon_op?(f_defPreSPMsgSPICON_x_imageSp()+Random[6]+i+f_defPostSPMsgSPICON_x_imageSp):"")+StringCut2R+f_defPostSPMsgTitle1a+Random[6]+i+f_defPostSPMsgTitle1b).replace((StringCut2R+']'),'');
siteSpoiler=siteSpoiler.replace('['+defCut+']',f_defPreSPMsgTitle1a(""+Random[7]+i)+Random[7]+i+f_defPreSPMsgTitle1b+(x_imageSpoilerIcon_cl&&x_imageSpoilerIcon_op?(f_defPreSPMsgSPICON_x_imageSp()+Random[7]+i+f_defPostSPMsgSPICON_x_imageSp):"")+DefaultSpoilerText+f_defPostSPMsgTitle1a+Random[7]+i+f_defPostSPMsgTitle1b).replace('['+defCut+'=',f_defPreSPMsgTitle1a(""+Random[8]+i)+Random[8]+i+ f_defPreSPMsgTitle1b+(x_imageSpoilerIcon_cl&&x_imageSpoilerIcon_op?(f_defPreSPMsgSPICON_x_imageSp()+Random[8]+i+f_defPostSPMsgSPICON_x_imageSp):"")+StringCutR+f_defPostSPMsgTitle1a+Random[8]+i+f_defPostSPMsgTitle1b).replace((StringCutR+']'),'');
return(siteSpoiler);
}
function RetNOAHSFGNOSHS(siteSpoiler)
{
siteSpoiler=siteSpoiler.replace('['+defCutNG+']',defPreHTWSPMsgTitle+DefaultHiddenTextWarning+defPostHTWSPMsgTitle).replace('['+defCutNG +'=',defPreHTW2SPMsgTitle+StringCut2R+defPostHTW2SPMsgTitle+DefaultHiddenTextWarning+defPost2HTW2SPMsgTitle).replace((StringCut2R+']'),'');
siteSpoiler=siteSpoiler.replace('['+defCut+']',defPreHTWSPMsgTitle+DefaultHiddenTextWarning+defPostHTWSPMsgTitle).replace('['+defCut+'=',defPreHTW2SPMsgTitle+StringCutR+defPostHTW2SPMsgTitle+DefaultHiddenTextWarning+defPost2HTW2SPMsgTitle).replace((StringCutR+']'),'');
return(siteSpoiler);
}
+143
function lol ($lol)
{
echo $lol;
}
$lol = 'lol';
lol ($lol);
lol
+110.7
if (typ == 4) // Это ножницы
if (mirror == 0)
Size_N = " " + (beems[1].LenghtE - (int)dd[0]["value"]).ToString() + "0";
else
Size_N = " " + (mirror - (beems[1].LenghtE - (int)dd[0]["value"])).ToString() + "0";
else
{ // Это механизм
if (typ == 0 || typ == 2 || typ == 3)
{
if (mirror == 0)
Size_M = (((int)tRow["len"] / 2 + (beems[0].LenghtE / 2 - (int)dd[0]["value"]))).ToString() + "0";
else
Size_M = (mirror - ((int)tRow["len"] / 2 + (beems[0].LenghtE / 2 - (int)dd[0]["value"]))).ToString() + "0";
}
else
if (mirror == 0)
Size_M = (beems[0].LenghtE - (int)dd[0]["value"]).ToString() + "0";
else
Size_M = (mirror - (beems[0].LenghtE - (int)dd[0]["value"])).ToString() + "0";
if (typ == 0 || typ == 2 || typ == 3)
{
if (mirror == 0)
Size_M += " " + (beems[0].LenghtE - (int)dd[0]["value"] * 2).ToString() + "0";
else
Size_M += " " + (mirror - (beems[0].LenghtE - (int)dd[0]["value"] * 2)).ToString() + "0";
}
else
Size_M += " 0";
}
Формирование чего то для чего то..
+189.5
$r1=mt_rand(0,9);
$r2=mt_rand(0,9);
$r3=mt_rand(0,9);
$r4=mt_rand(0,9);
$r5=mt_rand(0,9);
$r6=mt_rand(0,9);
$r7=mt_rand(0,9);
$r8=mt_rand(0,9);
$r9=mt_rand(0,9);
$result=$id.$r1.$r2.$r3.$r4.$r5.$r6.$r7.$r8.$r9;
print $notvalid.$result;
$rest1=substr($result,0,-14);
$rest2=substr($result,2,-12);
$rest3=substr($result,4,-10);
$rest4=substr($result,6,-8);
$rest5=substr($result,8,-6);
$rest6=substr($result,10,-4);
$rest7=substr($result,12,-2);
$rest8=substr($result,-1);
$ddos1=substr($result,1,-13);
$ddos2=substr($result,3,-11);
$ddos3=substr($result,5,-9);
$ddos4=substr($result,7,-7);
$ddos5=substr($result,9,-5);
$ddos6=substr($result,11,-3);
$ddos7=substr($result,13,-1);
$dos1=$rest1*2;
$dos2=$rest2*2;
$dos3=$rest3*2;
$dos4=$rest4*2;
$dos5=$rest5*2;
$dos6=$rest6*2;
$dos7=$rest7*2;
$dos8=$rest8*2;
if ($dos1>=10) {
$doss1=$dos1-9;
} else {
$doss1=$dos1;
}
if ($dos2>=10) {
$doss2=$dos2-9;
} else {
$doss2=$dos2;
}
if ($dos3>=10) {
$doss3=$dos3-9;
} else {
$doss3=$dos3;
}
if ($dos4>=10) {
$doss4=$dos4-9;
} else {
$doss4=$dos4;
}
if ($dos5>=10) {
$doss5=$dos5-9;
} else {
$doss5=$dos5;
}
if ($dos6>=10) {
$doss6=$dos6-9;
} else {
$doss6=$dos6;
}
if ($dos7>=10) {
$doss7=$dos7-9;
} else {
$doss7=$dos7;
}
if ($dos8>=10) {
$doss8=$dos8-9;
} else {
$doss8=$doss8;
}
$res1=$doss1+$doss2+$doss3+$doss4+$doss5+$doss6+$doss7+$doss8;
$res2=$ddos1+$ddos2+$ddos3+$ddos4+$ddos5+$ddos6+$ddos7;
$rez=$res1+$res2;
print $magic.$rez.'<br>';
$d=$rez%10;
if ($d==0) {
print $valid.$result.$d;
} else {
$k1=$rez+1;
$k2=$rez+2;
$k3=$rez+3;
$k4=$rez+4;
$k5=$rez+5;
$k6=$rez+6;
$k7=$rez+7;
$k8=$rez+8;
$k9=$rez+9;
ааааа пиздец!!!11
+146
callable Malkovich() as Malkovich
def malkovich() as Malkovich:
print("Malkovich!")
return malkovich
malkovich()()()
из Boo manifest. Не говнокод конечно же.