Jump to content

t3od0r

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Posts posted by t3od0r

  1. i have a problem with my jokesite and i couldnt find help nowhere else

    at the bottom of the page there is << 1 2 3 >> number for other pages

    but the link on those numbers are "/jokes_category.php?from=y&" y is where the numbers of jokes on the page and follow on but it should be like "/jokes_category.php?from=y&cat_id=x" X is where the number of category

    for example when i have 15 jokes in category number 2 and its showing ten on one page and 15 on other so the link for the next page shud be like this "/jokes_category.php?from=10&cat_id=2" BUT it makes the link like this "/jokes_category.php?from=10&" where "cat_id=2 is missing...

    The code is [url=http://www.uploading.com/files/F6H4OT7J/php.txt.html]here[/url] and the php code for this i think start's from the line 727.

    where could be the problem...

    thankx for any kind of help

    sorry for my bad english  ;D


    [code]// Next prevoius using numbers
    /****************************************************/
    function make_next_previous_with_number($from, $SQL, $filename, $vars, $display_nr)
    {

    $count = bx_db_num_rows(bx_db_query($SQL));
    @$active = ($from+$display_nr) / $display_nr;
    @$total_pages =  ceil($count/$display_nr);

    if ($active <= $display_nr)
    {
    if ($active>1)
    {
    echo "<a href='".$filename."?from=0&".$vars."'><img src=\"".DIR_IMAGES."first.gif\" border=\"0\"></a>&nbsp;&nbsp;<a href='".$filename."?from=".($active*$display_nr-2*$display_nr)."&".$vars."'><img src=\"".DIR_IMAGES."previous.gif\" border=\"0\"></a>&nbsp;&nbsp;";
    }

    for ( $i = 1 ; $i <($active + $display_nr) && $total_pages >=$i ; $i++ )
    {
    if ($active == $i)
    {
    if ($count > $display_nr)
    echo "<b>".$i."</b> ";
    }
    else
    echo "<a href='".$filename."?from=".($i*$display_nr-$display_nr)."&".$vars."'>".$i."</a> ";
    }
    if ($count > $active && $count > $active*$display_nr)
    {
    echo "&nbsp;&nbsp;<a href='".$filename."?from=".($active*$display_nr)."&".$vars."'><img src=\"".DIR_IMAGES."next.gif\" border=\"0\"></a>";
    echo "&nbsp;&nbsp;<a href='".$filename."?from=".(ceil($count/$display_nr)*$display_nr-$display_nr)."&".$vars."'><img src=\"".DIR_IMAGES."last.gif\" border=\"0\"></a>";
    }
    }
    else
    {

    if ($active>1)
    {
    echo "<a href='".$filename."?from=0&".$vars."'><img src=\"".DIR_IMAGES."first.gif\" border=\"0\"></a>&nbsp;&nbsp;<a href='".$filename."?from=".($active*$display_nr-2*$display_nr)."&".$vars."'><img src=\"".DIR_IMAGES."previous.gif\" border=\"0\"></a> ";
    }

    for ( $i = $active - $display_nr ; $i < ($active + $display_nr) && $total_pages >= $i ; $i++ )
    {
    if ($active == $i)
    echo "<b>".$i."</b> ";
    else
    echo "<a href='".$filename."?from=".($i*$display_nr-$display_nr)."&".$vars."'>".$i."</a> ";
    }

    if ($count > $active * $display_nr)
    {
    echo "<a href='".$filename."?from=".($active*$display_nr)."&".$vars."'><img src=\"".DIR_IMAGES."next.gif\" border=\"0\"></a>";
    echo "&nbsp;&nbsp;<a href='".$filename."?from=".(ceil($count/$display_nr)*$display_nr-$display_nr)."&".$vars."'><img src=\"".DIR_IMAGES."last.gif\" border=\"0\"></a>";
    }
    }

    }[/code]
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.