- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
#!/usr/bin/perl
@zips = ();
while(<>){
@zips = m{([a-z]5[a-z])}igx;
for(my $j=0;$j<=$#zips;$j++){
$i = index($_,$zips[$j]);
print "$zips[$j] pos $i\n";
};
print "$zips\n";
}
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
−126
#!/usr/bin/perl
@zips = ();
while(<>){
@zips = m{([a-z]5[a-z])}igx;
for(my $j=0;$j<=$#zips;$j++){
$i = index($_,$zips[$j]);
print "$zips[$j] pos $i\n";
};
print "$zips\n";
}
Находит комбинацию буква 5 буква
+160
if ( (CheckDEADcall > 0) && (VD_live_customer_call==1) )
{
if (CheckDEADcallON < 1)
{
if( document.images ) { document.images['livecall'].src = image_livecall_DEAD.src;}
CheckDEADcallON=1;
}
}
Оттуда же.
+161
else
{
fronter = user;
LasTCID = MDnextResponse_array[0];
document.vicidial_form.lead_id.value = MDnextResponse_array[1];
LeaDPreVDispO = MDnextResponse_array[2];
document.vicidial_form.vendor_lead_code.value = MDnextResponse_array[4];
document.vicidial_form.list_id.value = MDnextResponse_array[5];
document.vicidial_form.gmt_offset_now.value = MDnextResponse_array[6];
document.vicidial_form.phone_code.value = MDnextResponse_array[7];
if ( (disable_alter_custphone=='Y') || (disable_alter_custphone=='HIDE') )
{
var tmp_pn = document.getElementById("phone_numberDISP");
if (disable_alter_custphone=='Y')
{
tmp_pn.innerHTML = MDnextResponse_array[8];
}
}
document.vicidial_form.phone_number.value = MDnextResponse_array[8];
document.vicidial_form.title.value= MDnextResponse_array[9];
document.vicidial_form.first_name.value = MDnextResponse_array[10];
document.vicidial_form.middle_initial.value = MDnextResponse_array[11];
document.vicidial_form.last_name.value = MDnextResponse_array[12];
document.vicidial_form.address1.value = MDnextResponse_array[13];
document.vicidial_form.address2.value = MDnextResponse_array[14];
document.vicidial_form.address3.value = MDnextResponse_array[15];
document.vicidial_form.city.value= MDnextResponse_array[16];
document.vicidial_form.state.value= MDnextResponse_array[17];
document.vicidial_form.province.value = MDnextResponse_array[18];
document.vicidial_form.postal_code.value = MDnextResponse_array[19];
document.vicidial_form.country_code.value = MDnextResponse_array[20];
document.vicidial_form.gender.value= MDnextResponse_array[21];
document.vicidial_form.date_of_birth.value = MDnextResponse_array[22];
document.vicidial_form.alt_phone.value = MDnextResponse_array[23];
document.vicidial_form.email.value= MDnextResponse_array[24];
document.vicidial_form.security_phrase.value = MDnextResponse_array[25];
var REGcommentsNL = new RegExp("!N","g");
MDnextResponse_array[26] = MDnextResponse_array[26].replace(REGcommentsNL, "\n");
document.vicidial_form.comments.value = MDnextResponse_array[26];
document.vicidial_form.called_count.value = MDnextResponse_array[27];
previous_called_count = MDnextResponse_array[27];
previous_dispo = MDnextResponse_array[2];
CBentry_time = MDnextResponse_array[28];
CBcallback_time = MDnextResponse_array[29];
CBuser = MDnextResponse_array[30];
CBcomments = MDnextResponse_array[31];
dialed_number = MDnextResponse_array[32];
dialed_label = MDnextResponse_array[33];
source_id = MDnextResponse_array[34];
document.vicidial_form.rank.value= MDnextResponse_array[35];
document.vicidial_form.owner.value= MDnextResponse_array[36];
// CalL_ScripT_id = MDnextResponse_array[37];
script_recording_delay = MDnextResponse_array[38];
CalL_XC_a_NuMber= MDnextResponse_array[39];
CalL_XC_b_NuMber= MDnextResponse_array[40];
CalL_XC_c_NuMber= MDnextResponse_array[41];
CalL_XC_d_NuMber= MDnextResponse_array[42];
CalL_XC_e_NuMber= MDnextResponse_array[43];
timer_action = campaign_timer_action;
timer_action_message = campaign_timer_action_message;
timer_action_seconds = campaign_timer_action_seconds;
lead_dial_number = document.vicidial_form.phone_number.value;
var dispnum = document.vicidial_form.phone_number.value;
var status_display_number = phone_number_format(dispnum);
+162
if (prepopulate_transfer_preset_enabled > 0)
{
if (prepopulate_transfer_preset == 'PRESET_1')
{document.vicidial_form.xfernumber.value = CalL_XC_a_NuMber;}
if (prepopulate_transfer_preset == 'PRESET_2')
{document.vicidial_form.xfernumber.value = CalL_XC_b_NuMber;}
if (prepopulate_transfer_preset == 'PRESET_3')
{document.vicidial_form.xfernumber.value = CalL_XC_c_NuMber;}
if (prepopulate_transfer_preset == 'PRESET_4')
{document.vicidial_form.xfernumber.value = CalL_XC_d_NuMber;}
if (prepopulate_transfer_preset == 'PRESET_5')
{document.vicidial_form.xfernumber.value = CalL_XC_e_NuMber;}
}
if ( (quick_transfer_button == 'PRESET_1') || (quick_transfer_button == 'PRESET_2') || (quick_transfer_button == 'PRESET_3') || (quick_transfer_button == 'PRESET_4') || (quick_transfer_button == 'PRESET_5') )
{
document.getElementById("QuickXfer").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRBLIND','" + lastcustchannel + "','" + lastcustserverip + "');return false;\"><IMG SRC=\"./images/vdc_LB_quickxfer.gif\" border=0 alt=\"QUICK TRANSFER\"></a>";
if (quick_transfer_button == 'PRESET_1')
{document.vicidial_form.xfernumber.value = CalL_XC_a_NuMber;}
if (quick_transfer_button == 'PRESET_2')
{document.vicidial_form.xfernumber.value = CalL_XC_b_NuMber;}
if (quick_transfer_button == 'PRESET_3')
{document.vicidial_form.xfernumber.value = CalL_XC_c_NuMber;}
if (quick_transfer_button == 'PRESET_4')
{document.vicidial_form.xfernumber.value = CalL_XC_d_NuMber;}
if (quick_transfer_button == 'PRESET_5')
{document.vicidial_form.xfernumber.value = CalL_XC_e_NuMber;}
}
+126
format MS COFF
public fuckHighLevel as '_fuckHighLevel@4'
fuckHighLevel:
pop ebx
pop eax
add eax, 1
jmp ebx
Вызываем ассемблерную процедуру из Си.
Вместо retn используем безусловыный переход на адрес возврата.
Но работает же!
+158
elseif( $action == "pingationmod" ) {
echoheader( "options", "pingationMod" );
echo <<<HTML
<form action="{$PHP_SELF}" method="post">
<div style="padding-top:5px;padding-bottom:2px;">
<table width="100%">
<tr>
<td width="4"><img src="engine/skins/images/tl_lo.gif" width="4" height="4" border="0"></td>
<td background="engine/skins/images/tl_oo.gif"><img src="engine/skins/images/tl_oo.gif" width="1" height="4" border="0"></td>
<td width="6"><img src="engine/skins/images/tl_ro.gif" width="6" height="4" border="0"></td>
</tr>
<tr>
<td background="engine/skins/images/tl_lb.gif"><img src="engine/skins/images/tl_lb.gif" width="4" height="1" border="0"></td>
<td style="padding:5px;" bgcolor="#FFFFFF">
<table width="100%">
<tr>
<td bgcolor="#EFEFEF" height="29" style="padding-left:10px;"><div class="navigation">Отправка уведомлений в пинг сервисы</div></td>
</tr>
</table>
<div class="unterline"></div>
<table width="100%">
<tr>
<td style="padding:2px;" height="100" align="center">
HTML;
echo "Вы действительно хотите отправить уведомления в пинг сервисы, на (<b>" . count( $selected_news ). "</b>) $lang[mass_confirm_1]<br><br>
<input class=bbcodes type=submit value=\" $lang[mass_yes] \"> <input type=button class=bbcodes value=\" $lang[mass_no] \" onclick=\"javascript:document.location='$PHP_SELF?mod=editnews&action=list'\">
<input type=hidden name=action value=\"do_mass_ping\">
<input type=hidden name=user_hash value=\"{$dle_login_hash}\">
<input type=hidden name=mod value=\"massactions\">";
foreach ( $selected_news as $newsid ) {
$newsid = intval($newsid);
echo "<input type=hidden name=selected_news[] value=\"$newsid\">";
}
echo <<<HTML
</tr>
</table>
</td>
<td background="engine/skins/images/tl_rb.gif"><img src="engine/skins/images/tl_rb.gif" width="6" height="1" border="0"></td>
</tr>
<tr>
<td><img src="engine/skins/images/tl_lu.gif" width="4" height="6" border="0"></td>
<td background="engine/skins/images/tl_ub.gif"><img src="engine/skins/images/tl_ub.gif" width="1" height="6" border="0"></td>
<td><img src="engine/skins/images/tl_ru.gif" width="6" height="6" border="0"></td>
</tr>
</table>
</div></form>
HTML;
echofooter();
exit();
}elseif( $action == "do_mass_ping" ) {
include ENGINE_DIR .'/inc/include/pingfunction.php';
include ENGINE_DIR .'/data/pingdata.php';
foreach ( $selected_news as $newsid ) {
$newsid = intval($newsid);
$sql_select = "SELECT id, title, date, category, alt_name, flag FROM ".PREFIX ."_post WHERE id=".$newsid;
$sql_result = $db->query( $sql_select );
while ( $row = $db->get_row( $sql_result ) ) {
$row['date'] = strtotime( $row['date'] );
$title = $row['title'];
if( $config['allow_alt_url'] == "yes") {
if( $row['flag'] and $config['seo_type'] ) {
if( $row['category'] and $config['seo_type'] == 2 ) {
$full_link = $config['http_home_url'] .get_url( $row['category'] ) ."/".$row['id'] ."-".$row['alt_name'] .".html";
}else {
$full_link = $config['http_home_url'] .$row['id'] ."-".$row['alt_name'] .".html";
}
}else {
$full_link = $config['http_home_url'] .date( 'Y/m/d/',$row['date'] ) .$row['alt_name'] .".html";
}
}else {
$full_link = $config['http_home_url'] ."index.php?newsid=".$row['id'];
}
}
pingationMod($title, $full_link, 0, $pingdata['service'], $pingdata['zaderjka']);
}
if($pingdata['allow_log']){
saveLog("Массовая отправка уведомлений в пинг сервисы");
}
clear_cache();
msg( "info", "Уведомления успешно отправлены", "Уведомления успешно отправлены в пинг сервисы", $_SESSION['admin_referrer'] );
}
+169
foreach ( $all_fields as $k => $one_field )
{
if ( $one_field['id'] == $field_id )
{
}
else
{
break;
}
}
дзен-foreach
+154
public function getCurrentDomain()
{
$host = 'http://' . $_SERVER['HTTP_HOST'];
$folder = strstr($_SERVER['SCRIPT_NAME'], 'index.php', true);
if ($folder)
{
if ($folder[1] != '/')
$folder = '/' . $folder;
$host.=$folder;
}
if ($host[strlen($host)] != '/')
$host.='/';
return $host
}
Решил определить домен+папку(если она есть) из откуда работает скрипт. Спать пора, да?
Как-то оно не так должно быть.
+161
var CURRENCY = {$company_info|@json_encode}.currency;
Вот такой код встретился в проекте в одном из Smarty шаблонов
$company_info - некий ассоциативный массив.
−860
SELECT i.id AS i__id, i.title AS i__title, i.description AS i__description, i.meta_title AS i__meta_title, i.meta_keywords AS i__meta_keywords, i.meta_description AS i__meta_description, i.lang AS i__lang FROM item_translation i WHERE (i.id IN ('8845'))
0.00s, "doctrine" connection
#
SELECT t.id AS t__id, t.source AS t__source, t.target AS t__target, t.lang AS t__lang FROM translation t WHERE (t.source = 'Акция' AND t.lang = 'ru') LIMIT 1
0.00s, "doctrine" connection
#
SELECT t.id AS t__id, t.source AS t__source, t.target AS t__target, t.lang AS t__lang FROM translation t WHERE (t.source = 'Акция' AND t.lang = 'ru') LIMIT 1
0.00s, "doctrine" connection
#
SELECT t.id AS t__id, t.source AS t__source, t.target AS t__target, t.lang AS t__lang FROM translation t WHERE (t.source = 'Розница' AND t.lang = 'ru') LIMIT 1
0.00s, "doctrine" connection
#
SELECT t.id AS t__id, t.source AS t__source, t.target AS t__target, t.lang AS t__lang FROM translation t WHERE (t.source = 'Оптом' AND t.lang = 'ru') LIMIT 1
0.00s, "doctrine" connection
#
SELECT t.id AS t__id, t.source AS t__source, t.target AS t__target, t.lang AS t__lang FROM translation t WHERE (t.source = 'Безнал' AND t.lang = 'ru') LIMIT 1
0.00s, "doctrine" connection
#
SELECT t.id AS t__id, t.source AS t__source, t.target AS t__target, t.lang AS t__lang FROM translation t WHERE (t.source = 'Дилер' AND t.lang = 'ru') LIMIT 1
0.00s, "doctrine" connection
#
SELECT t.id AS t__id, t.source AS t__source, t.target AS t__target, t.lang AS t__lang FROM translation t WHERE (t.source = 'Кредит' AND t.lang = 'ru') LIMIT 1
0.00s, "doctrine" connection
#
SELECT p.id AS p__id, p.item_id AS p__item_id, p.type AS p__type, p.currency AS p__currency, p.value AS p__value, p.date AS p__date FROM price p WHERE (p.item_id = '8845' AND p.type = 'A') ORDER BY p.date DESC LIMIT 1
0.00s, "doctrine" connection
#
SELECT t.id AS t__id, t.source AS t__source, t.target AS t__target, t.lang AS t__lang FROM translation t WHERE (t.source = 'В корзину' AND t.lang = 'ru') LIMIT 1
0.00s, "doctrine" connection
#
SELECT t.id AS t__id, t.source AS t__source, t.target AS t__target, t.lang AS t__lang FROM translation t WHERE (t.source = 'В корзину' AND t.lang = 'ru') LIMIT 1
0.00s, "doctrine" connection
Это часть запросов которые выполняются для генерации главной страницы для одного интернет магазина. И таких запросов: 360 :-)