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

    Всего: 1

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

    +170

    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
    if($pnumber < $max)
              {
                if ($number > 5) $start="<a class='guest' href=goods.php?page=".$page."&n=1 title=Первая страница>1</a>&nbsp;";
                if ($number < $pages-4) $last="&nbsp;<a class='guest' href=goods.php?page=".$page."&n=".$pages." title=Последняя страница>".$pages."</a>";
                if ($number > 4) $pointleft="... ";
                if ($number <= $pages-4) $pointright=" ...";
                if ($number != 1) $prevpage="<a class='guest' href=goods.php?page=".$page."&n=".($number-1)." title=Назад>&lt;&lt;</a>&nbsp;&nbsp;";
                if ($number != $pages) $nextpage="&nbsp;&nbsp;<a class='guest' href=goods.php?page=".$page."&n=".($number+1)." title=Вперед>&gt;&gt;</a>";
                if ($number-3 > 0) $page3left="<a class='guest' href=goods.php?page=".$page."&n=".($number-3)." title=Страница&nbsp;".($number-3).">".($number-3)."</a> | ";
                if ($number-2 > 0) $page2left="<a class='guest' href=goods.php?page=".$page."&n=".($number-2)." title=Страница&nbsp;".($number-2).">".($number-2)."</a> | ";
                if ($number-1 > 0) $page1left="<a class='guest' href=goods.php?page=".$page."&n=".($number-1)." title=Страница&nbsp;".($number-1).">".($number-1)."</a> | ";
                if ($number+1 <= $pages) $page1right=" | <a class='guest' href=goods.php?page=".$page."&n=".($number+1)." title=Страница&nbsp;".($number+1).">".($number+1)."</a>";
                if ($number+2 <= $pages) $page2right=" | <a class='guest' href=goods.php?page=".$page."&n=".($number+2)." title=Страница&nbsp;".($number+2).">".($number+2)."</a>";
                if ($number+3 <= $pages) $page3right=" | <a class='guest' href=goods.php?page=".$page."&n=".($number+3)." title=Страница&nbsp;".($number+3).">".($number+3)."</a>";
                echo "<tr><td colspan='2'><p style='text-align:center;'><font class='guest'>".$prevpage.$start.$pointleft.$page3left.$page2left.$page1left.$number."/".$pages.$page1right.$page2right.$page3right.$pointright.$last.$nextpage."</font></p></td></tr>";
              }

    Пейджинг страниц

    RReverser, 19 Декабря 2010

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