= $increase){ // get the HTML for the previous link, set the variables and exchange it $prev=getHTML($HTML,'previous'); $prev=setVar($prev,'link',$PHP_SELF."?start=".($start-$increase)); $prev=setVar($prev,'amount',$increase); $HTML=replaceHTML($HTML,'previous',$prev); // or delete the HTML }else{$HTML=delHTML($HTML,'previous');} if ($end < sizeof($items)){ // get the HTML for the next link, set the variables and exchange it $next=getHTML($HTML,'next'); $next=setVar($next,'link',$PHP_SELF."?start=".($start+$increase)); $next=setVar($next,'amount',$increase); $HTML=replaceHTML($HTML,'next',$next); // or delete the HTML }else{$HTML=delHTML($HTML,'next');} $disp=array_slice($items,$start,$increase); // Loop through the items foreach ($disp as $k=>$i){ // if the counter $k is 0 get the colour from parameter colour1, else from colour2 $rowcolour=$k%2==0?getHTMLpara($HTML,'colour1'):getHTMLpara($HTML,'colour2'); // get the HTML for each row $display=getHTML($HTML,'row'); // replace the class variable with the real one, the item with the real one // and the counter with the item's number $row=setVar($display,'colour',$rowcolour); $row=setVar($row,'item',$i); $row=setVar($row,'counter',$k+$start+1); // add the row to the include HTML $include.=$row; } // replace the row HTML with the include $HTML=replaceHTML($HTML,'row',$include); // print out the template echo cleanup($HTML); ?>