ffne common.php

suche:


  $sql = "SELECT commentary.*, 
	               accounts.name,
	               accounts.login


fge DAVOR hinzu:

$rmax=db_query("SELECT count(commentid) AS c FROM commentary WHERE section='".$section."'");
        $rmax=db_fetch_assoc($rmax);
        $rmax = ($rmax[c]) / ($limit);
        $rmax=floor($rmax);


suche:

if (db_num_rows($result)>=$limit){
        $req = preg_replace("'[&]?c(omscroll)?=([[:digit:]-])*'","",$REQUEST_URI)."&comscroll=".($com+1);
            //$req = substr($REQUEST_URI,0,strpos($REQUEST_URI,"c="))."&c=$_GET[c]"."&comscroll=".($com+1);
            $req = str_replace("?&","?",$req);
            if (!strpos($req,"?")) $req = str_replace("&","?",$req);
            //output("<a href=\"$req\">&lt;&lt; Previous</a>",true);
            output("<a href=\"$req\">&lt;&lt; Vorherige</a>",true);
            addnav("",$req);
        }


fge DAVOR hinzu:


            if ($com!=$rmax){
            $req = preg_replace("'[&]?c(omscroll)?=([[:digit:]]|-)*'","",$REQUEST_URI)."&comscroll=".$rmax;
            //$req = substr($REQUEST_URI,0,strpos($REQUEST_URI,"c="))."&c=$_GET[c]"."&comscroll=".($com-1);
            $req = str_replace("?&","?",$req);
            if (!strpos($req,"?")) $req = str_replace("&","?",$req);
            //output(" <a href=\"$req\">Next &gt;&gt;</a>",true);
            output(" <a href=\"$req\">&lt;&lt;&lt; Letzte </a>",true);
            addnav("",$req);
        }


suche:


        if ($com>0){
        $req = preg_replace("'[&]?c(omscroll)?=([[:digit:]]|-)*'","",$REQUEST_URI)."&comscroll=".($com-1);
            //$req = substr($REQUEST_URI,0,strpos($REQUEST_URI,"c="))."&c=$_GET[c]"."&comscroll=".($com-1);
            $req = str_replace("?&","?",$req);
            if (!strpos($req,"?")) $req = str_replace("&","?",$req);
            //output(" <a href=\"$req\">Next &gt;&gt;</a>",true);
            output(" <a href=\"$req\">Nchste &gt;&gt;</a>",true);
            addnav("",$req);
        }


fge DANACH hinzu:


if ($com!=0){
            $req = preg_replace("'[&]?c(omscroll)?=([[:digit:]]|-)*'","",$REQUEST_URI)."&comscroll=0";
            //$req = substr($REQUEST_URI,0,strpos($REQUEST_URI,"c="))."&c=$_GET[c]"."&comscroll=".($com-1);
            $req = str_replace("?&","?",$req);
            if (!strpos($req,"?")) $req = str_replace("&","?",$req);
            //output(" <a href=\"$req\">Next &gt;&gt;</a>",true);
            output(" <a href=\"$req\">Erste &gt;&gt;&gt;</a>",true);
            addnav("",$req);
        }


save & close