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

    Всего: 3

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

    +48

    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
    $title = get_the_title();
    if ( $title == "Portfolio")  $data['sl_portfolio_style'] = "2 Columns Portfolio";
    if ( $title == "3 Columns Portfolio")  $data['sl_portfolio_style'] = "3 Columns Portfolio";
    if ( $title == "4 Columns Portfolio")  $data['sl_portfolio_style'] = "4 Columns Portfolio";
    if ( $title == "6 Columns Portfolio")  $data['sl_portfolio_style'] = "6 Columns Portfolio";
    if ( $title == "Portfolio")  query_posts( '&post_type=portfolio-type&posts_per_page=4&paged=' . $paged );
    if ( $title == "4 Columns Portfolio")  query_posts( '&post_type=portfolio-type&posts_per_page=8&paged=' . $paged );
    if ( $title == "6 Columns Portfolio")  query_posts( '&post_type=portfolio-type&posts_per_page=12&paged=' . $paged );
    if ( $title == "3 Columns Portfolio")  query_posts( '&post_type=portfolio-type&posts_per_page=6&paged=' . $paged );
    if ( $title == "Portfolio Right Sidebar")  $data['sl_portfolio_style'] = "Portfolio with Sidebar";
    if ( $title == "Portfolio Right Sidebar")  $data['portfolio_sidebar_position'] = "Right Sidebar";
    if ( $title == "Portfolio Left Sidebar")  $data['sl_portfolio_style'] = "Portfolio with Sidebar";
    if ( $title == "Portfolio Left Sidebar")  $data['portfolio_sidebar_position'] = "Left Sidebar";
    
    if ( $title == "Portfolio Left Sidebar")  query_posts( '&post_type=portfolio-type&posts_per_page=12&paged=' . $paged );
    if ( $title == "Portfolio Right Sidebar")  query_posts( '&post_type=portfolio-type&posts_per_page=12&paged=' . $paged );

    "switch - case" - Не не слышал!
    И это в покупной теме для wordpress на тимфоресте.
    Стоимость темы - 45 уе...

    tsybulskyserg, 22 Января 2013

    Комментарии (8)
  3. PHP / Говнокод #12408

    +52

    1. 1
    2. 2
    3. 3
    4. 4
    $new_addresses = $_POST['friendE1']."\n".$_POST['friendE2']."\n".$_POST['friendE3']."\n".$_POST['friendE4']."\n".$_POST['friendE5']
        ."\n".$_POST['friendE6']."\n".$_POST['friendE7']."\n".$_POST['friendE8']."\n".$_POST['friendE9']."\n".$_POST['friendE10'];
    
    $list = explode( "\n", $new_addresses);

    Отакое счастье в очередном проекте :-)

    tsybulskyserg, 11 Января 2013

    Комментарии (8)
  4. PHP / Говнокод #8490

    +160

    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
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    <?php
    $lquery = mysql_query("SELECT * FROM language_settings ORDER BY language_id");
    $llquery = mysql_query("SELECT * FROM language_settings ORDER BY language_id");
    ?>
    
    <?php while($ldata = mysql_fetch_array($lquery)){ ?>
    <a><?=$ldata['language_name'];?></a>
    <?php } ?>
    
    <?php while($lldata = mysql_fetch_array($llquery)){  // Language Loop
    $lang_prefix = $lldata['language_prefix'];
    language($lang_prefix);
    $lang = strtolower($lldata['language_prefix']);
    ?>
            ....
    <?php
    $_lid = $lldata['language_id'];
    $_nid = $_REQUEST['nid'];
    if($_nid!=""){
    // newsid=$_nid AND
    $qry = "SELECT *
    	FROM tbl_products as pc JOIN tbl_products_content as pcc ON pc.product_id=pcc.product_id
    	WHERE  pcc.lang_prefix='".strtolower($lldata['language_prefix'])."' AND pc.product_id='{$_nid}' ORDER BY product_order,product_cat_id";
           $cquery = mysql_query($qry);
           $cdata = @mysql_fetch_array($cquery);
    }
               ...
    }?>

    Вот... попалось недавно такое произведение...

    tsybulskyserg, 11 Ноября 2011

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