1. Список говнокодов пользователя SeniorShaurman

    Всего: 11

  2. PHP / Говнокод #21718

    −24

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    switch ($out['list']) {
      case 'sale': $out['d']=new CShotObjectFlats('ShotObjectFlats',$out['date'],$out['reference'],$out['list_level'],($out['DataIn']->http['TYPE_ID']==2)?0:1); $out['object_list']='flat'; break;
      case 'rent': $out['d']=new CShotObjectFlats('ShotObjectFlats',$out['date'],$out['reference'],$out['list_level'],($out['DataIn']->http['TYPE_ID']==2)?0:1); $out['object_list']='flat'; break;
      case 'exch': $out['d']=new CShotObjectFlats('ShotObjectFlats',$out['date_exch'],$out['reference'],$out['list_level'],($out['DataIn']->http['TYPE_ID']==2)?0:1); $out['object_list']='flat_exch'; break;
      case 'purchase': $out['d']=new CShotObjectFlatsZay('ShotObjectFlats',$out['date'],$out['reference'],$out['list_level'],($out['DataIn']->http['TYPE_ID']==2)?0:1); break;
      case 'rent_use': $out['d']=new CShotObjectFlatsZay('ShotObjectFlats',$out['date'],$out['reference'],$out['list_level'],($out['DataIn']->http['TYPE_ID']==2)?0:1); break;
    
      case 'sale_h': $out['d']=new CShotObjectHouses('ShotObjectHouses',$out['date'],$out['reference'],$out['list_level'],($out['DataIn']->http['TYPE_ID']==2)?0:1); $out['object_list']='house'; break;
      case 'rent_h': $out['d']=new CShotObjectHouses('ShotObjectHouses',$out['date'],$out['reference'],$out['list_level'],($out['DataIn']->http['TYPE_ID']==2)?0:1); $out['object_list']='house'; break;
      case 'exch_h': $out['d']=new CShotObjectHouses('ShotObjectHouses',$out['date_exch'],$out['reference'],$out['list_level'],($out['DataIn']->http['TYPE_ID']==2)?0:1); $out['object_list']='house_exch'; break;
      case 'purchase_h': $out['d']=new CShotObjectHousesZay('ShotObjectHouses',$out['date'],$out['reference'],$out['list_level'],($out['DataIn']->http['TYPE_ID']==2)?0:1); break;
      case 'rent_use_h': $out['d']=new CShotObjectHousesZay('ShotObjectHouses',$out['date'],$out['reference'],$out['list_level'],($out['DataIn']->http['TYPE_ID']==2)?0:1); break;
    
      case 'sale_g': $out['d']=new CShotObjectGarages('ShotObjectGarages',$out['date'],$out['reference'],$out['list_level'],($out['DataIn']->http['TYPE_ID']==2)?0:1); $out['object_list']='garage'; break;
      case 'rent_g': $out['d']=new CShotObjectGarages('ShotObjectGarages',$out['date'],$out['reference'],$out['list_level'],($out['DataIn']->http['TYPE_ID']==2)?0:1); $out['object_list']='garage'; break;
      case 'purchase_g': $out['d']=new CShotObjectGaragesZay('ShotObjectGarages',$out['date'],$out['reference'],$out['list_level'],($out['DataIn']->http['TYPE_ID']==2)?0:1); break;
      case 'rent_use_g': $out['d']=new CShotObjectGaragesZay('ShotObjectGarages',$out['date'],$out['reference'],$out['list_level'],($out['DataIn']->http['TYPE_ID']==2)?0:1); break;
    
      case 'sale_l': $out['d']=new CShotObjectLands('ShotObjectLands',$out['date'],$out['reference'],$out['list_level'],($out['DataIn']->http['TYPE_ID']==2)?0:1); $out['object_list']='land'; break;
      case 'rent_l': $out['d']=new CShotObjectLands('ShotObjectLands',$out['date'],$out['reference'],$out['list_level'],($out['DataIn']->http['TYPE_ID']==2)?0:1); $out['object_list']='land'; break;
      case 'purchase_l': $out['d']=new CShotObjectLandsZay('ShotObjectLands',$out['date'],$out['reference'],$out['list_level'],($out['DataIn']->http['TYPE_ID']==2)?0:1); break;
      case 'rent_use_l': $out['d']=new CShotObjectLandsZay('ShotObjectLands',$out['date'],$out['reference'],$out['list_level'],($out['DataIn']->http['TYPE_ID']==2)?0:1); break;
    }

    Отрисовка результата поиска в зависимости от контекста

    SeniorShaurman, 24 Ноября 2016

    Комментарии (11)