- 1
- 2
- 3
- 4
jQuery('#mask').height(jQuery(document).height());
jQuery(window).resize(function(){
jQuery('#mask').height(jQuery(document).height());
});
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
Всего: 9
+153
jQuery('#mask').height(jQuery(document).height());
jQuery(window).resize(function(){
jQuery('#mask').height(jQuery(document).height());
});
Да ебись оно все конем...
+154
<ul>
<script>
$(function(){
$(".catalog-menu ul li a[href='/newshop/cat_id:12']").parent().addClass("active");
});
</script>
<li class="active">...</li>
<li>...</li>
</ul>
Переделываю один магазин, выполненный на говноcms, в менюшечке увидел это.
+159
/* Я решил не выбирать какой-то определенный код, а просто запостить сцыл на гитхаб.
Ах да, свежие коммиты все же есть, так что, за говнокодом можно наблюдать "в прямом эфире"! */
да прибудет с вами "<?php die;"
https://github.com/mpak2/mpak.su/blob/master/include/mpfunc.php
+156
function mpeval($file_name, $arg = array(), $vr = 1){
global $conf;
foreach(explode(':', $conf['fs']['path'], 2) as $k=>$v)
if (file_exists($file = "$v/$file_name")) break;
if (!file_exists($file = "$v/$file_name")) return "<div style=\"margin-top:100px; text-align:center;\"><span style=color:red;>Ошибка доступа к файлу</span> $v/$file_name</div>";
ob_start();
eval('?>'. strtr(file_get_contents($file), array('<? die;'=>'<?', '<?php die;'=>'<?php')));
$content = ob_get_contents();
ob_end_clean();
return $content;
}
eval`им вовсю
+155
foreach(mpql(mpqw("SHOW TABLES WHERE Tables_in_{$conf['db']['name']} LIKE \"{$conf['db']['prefix']}{$arg['modpath']}\_%\"")) as $k=>$v){
$t = implode("_", array_slice(explode("_", $v["Tables_in_{$conf['db']['name']}"]), 2));
if(!array_key_exists($t, (array)$tpl)){
$tpl[ $t ] = mpqn(mpqw("SELECT * FROM {$conf['db']['prefix']}{$arg['modpath']}_{$t}"));
}
}// mpre($tpl);
Тотальный и беспросветный пиздец.
+46
// БреДскрамс и выделение текущих категорий
if($level==1){
$query = $conn->newStatement("SELECT * FROM item_level WHERE id=:parent_id:");
$query->setInteger('parent_id', $parent_id);
$data_1ur = $query->getFirstRecord();
$this->template->assign('data_1ur', $data_1ur);
}
if($level==2){
// первым делом досается сама категория
$query = $conn->newStatement("SELECT * FROM item_level WHERE id=:parent_id:");
$query->setInteger('parent_id', $parent_id);
$data_2ur = $query->getFirstRecord();
$this->template->assign('data_2ur', $data_2ur);
// ее родители
$query = $conn->newStatement("SELECT * FROM item_level WHERE id=:parent_id:");
$query->setInteger('parent_id', $data_2ur['parent_id']);
$data_1ur = $query->getFirstRecord();
$this->template->assign('data_1ur', $data_1ur);
}
if($level==3){
$query = $conn->newStatement("SELECT * FROM item_level WHERE id=:parent_id:");
$query->setInteger('parent_id', $parent_id);
$data_3ur = $query->getFirstRecord();
$this->template->assign('data_3ur', $data_3ur);
$query = $conn->newStatement("SELECT * FROM item_level WHERE id=:parent_id:");
$query->setInteger('parent_id', $data_3ur['parent_id']);
$data_2ur = $query->getFirstRecord();
$this->template->assign('data_2ur', $data_2ur);
$query = $conn->newStatement("SELECT * FROM item_level WHERE id=:parent_id:");
$query->setInteger('parent_id', $data_2ur['parent_id']);
$data_1ur = $query->getFirstRecord();
$this->template->assign('data_1ur', $data_1ur);
}
да, да, да...
+145
strpos(rtrim($_SERVER['HTTP_REFERER'], '/').'/', Router::GetPath('registration'))
Мои глаза кровоточат.
+158
$sCmd='$result=$this->'.$aEvent['method'].'();';
$this->Hook_Run("action_event_".strtolower($this->sCurrentAction)."_before",array('event'=>$this->sCurrentEvent,'params'=>$this->GetParams()));
eval($sCmd);
$this->Hook_Run("action_event_".strtolower($this->sCurrentAction)."_after",array('event'=>$this->sCurrentEvent,'params'=>$this->GetParams()));
return $result;
LiveStreet CMS... nuff said...
+167
$select = $db->select()
->from('advertisement AS a', $columns)
->joinLeft('resid_apt_secondary AS ras', 'ras.resid_apartment_residental_advertisement_id=a.id', array())
->joinLeft('resid_apt_newly_unready AS ranu', 'ranu.resid_apartment_residental_advertisement_id=a.id', array())
->joinLeft('resid_apt_newly_ready AS ranr', 'ranr.resid_apartment_residental_advertisement_id=a.id', array())
->joinLeft('resid_house_house AS rh', 'rh.resid_house_residental_advertisement_id=a.id', array())
->joinLeft('resid_house_cottage AS rc', 'rc.resid_house_residental_advertisement_id=a.id', array())
->joinLeft('resid_house_dacha AS rd', 'rd.resid_house_residental_advertisement_id=a.id', array())
->joinLeft('resid_garage AS rg', 'rg.residental_advertisement_id=a.id', array())
->joinLeft('sec_residental AS sr', 'sr.section_advertisement_id=a.id', array())
->joinLeft('bld_prod_common AS bpc', 'bpc.bld_production_commercial_advertisement_id=a.id', array())
->joinLeft('bld_prod_food AS bpf', 'bpf.bld_production_commercial_advertisement_id=a.id', array())
->joinLeft('bld_prod_restaurant AS bpr', 'bpr.bld_production_commercial_advertisement_id=a.id', array())
->joinLeft('bld_prod_warehouse AS bpw', 'bpw.bld_production_commercial_advertisement_id=a.id', array())
->joinLeft('bld_prod_garage AS bpg', 'bpg.bld_production_commercial_advertisement_id=a.id', array())
->joinLeft('bld_prod_service_station AS bpss', 'bpss.bld_production_commercial_advertisement_id=a.id', array())
->joinLeft('bld_prod_other AS bpo', 'bpo.bld_production_commercial_advertisement_id=a.id', array())
->joinLeft('bld_office_any AS boa', 'boa.bld_office_commercial_advertisement_id=a.id', array())
->joinLeft('bld_office_admin AS boad', 'boad.bld_office_commercial_advertisement_id=a.id', array())
->joinLeft('bld_office_sales AS bos', 'bos.bld_office_commercial_advertisement_id=a.id', array())
->joinLeft('bld_office_kiosk AS bok', 'bok.bld_office_commercial_advertisement_id=a.id', array())
->joinLeft('bld_farm_cowshed AS bfc', 'bfc.bld_farm_commercial_advertisement_id=a.id', array())
->joinLeft('bld_farm_workshop AS bfw', 'bfw.bld_farm_commercial_advertisement_id=a.id', array())
->joinLeft('bld_farm_chicken_house AS bfch', 'bfch.bld_farm_commercial_advertisement_id=a.id', array())
->joinLeft('bld_farm_other AS bfo', 'bfo.bld_farm_commercial_advertisement_id=a.id', array())
->joinLeft('gas_station AS gs', 'gs.commercial_advertisement_id=a.id', array())
->joinLeft('rm_prod_common AS rpc', 'rpc.room_production_commercial_advertisement_id=a.id', array())
->joinLeft('rm_prod_food AS rpf', 'rpf.room_production_commercial_advertisement_id=a.id', array())
->joinLeft('rm_prod_restaurant AS rpr', 'rpr.room_production_commercial_advertisement_id=a.id', array())
->joinLeft('rm_prod_warehouse AS rpw', 'rpw.room_production_commercial_advertisement_id=a.id', array())
->joinLeft('rm_prod_garage AS rpg', 'rpg.room_production_commercial_advertisement_id=a.id', array())
->joinLeft('rm_prod_service_station AS rpss', 'rpss.room_production_commercial_advertisement_id=a.id', array())
->joinLeft('rm_prod_other AS rpo', 'rpo.room_production_commercial_advertisement_id=a.id', array())
->joinLeft('rm_office_any AS roa', 'roa.rm_office_commercial_advertisement_id=a.id', array())
->joinLeft('rm_office_sales AS ros', 'ros.rm_office_commercial_advertisement_id=a.id', array())
->joinLeft('rm_office_off AS roo', 'roo.rm_office_commercial_advertisement_id=a.id', array())
->joinLeft('rm_office_admin AS road', 'road.rm_office_commercial_advertisement_id=a.id', array())
->joinLeft('rm_office_hall_rental AS roh', 'roh.rm_office_commercial_advertisement_id=a.id', array())
->where('is_recycled = ?', 'no')
->where('is_published = ?', 'yes')
->group(array('a.type', 'a.in_archive'));
Переделываем проект. В старой версии нашел следующие строчки.