This topic is locked
[SOLVED]

 NO Pagination is needed

2/10/2010 4:01:58 AM
PHPRunner General questions
V
vlad1211 author

Hello dear friends!
I used forum`s search trying to find some valide solution but in vain..
Can someone tell me please how to delete (or disable) any pagination on the list page?
I want my list.php to show ALL entries with no pagination (no matter of its quantity).
Basically that list.php is going to be a scrolling DHTML table with fixed items row.
Thank you!!
Regards,
Vlad

N
nix386 2/10/2010



Hello dear friends!
I used forum`s search trying to find some valide solution but in vain..
Can someone tell me please how to delete (or disable) any pagination on the list page?
I want my list.php to show ALL entries with no pagination (no matter of its quantity).
Basically that list.php is going to be a scrolling DHTML table with fixed items row.
Thank you!!
Regards,
Vlad


Remove the Pagination from your template i.e. list.htm in the \PHPRunner5.1\templates\layouts\AATHEME ?

V
vlad1211 author 2/11/2010



Remove the Pagination from your template i.e. list.htm in the \PHPRunner5.1\templates\layouts\AATHEME ?


Sorry, I could`n find Pagination in the template files like list.htm..

There is something like Pagination in the final List.php but after deleting this section I got PHP-error message. Below is that section I can remove:

// Pagination:

if(!$numrows)

{

$rowsfound=false;

$message="Записей не найдено";

$message_block=array();

$message_block["begin"]="<span name=\"notfound_message".$id."\">";

$message_block["end"]="</span>";

$xt->assignbyref("message_block",$message_block);

$xt->assign("message",$message);

}

else

{

$rowsfound=true;

$maxRecords = $numrows;

$xt->assign("records_found",$numrows);

$maxpages=ceil($maxRecords/$PageSize);

if($mypage > $maxpages)

$mypage = $maxpages;

if($mypage<1)

$mypage=1;

$maxrecs=$PageSize;

$xt->assign("page",$mypage);

$xt->assign("maxpages",$maxpages);


// write pagination

if($maxpages>1)

{

$xt->assign("pagination_block",true);

if($mode==LIST_SIMPLE)

$jscode_end.="window.GotoPage = function(nPageNumber)

{

window.location='table1_list.php?goto='+nPageNumber;

};";

else

$jscode_end.="window.GotoPage".$id." = function (nPageNumber)

{

window.frames['flyframe".$id."'].location='table1_list.php?".$lookupparams."&goto='+nPageNumber;

};";



$pagination="<table rows='1' cols='1' align='center' width='auto' border='0'>";

$pagination.="<tr valign='center'><td align='center'>";

$counterstart = $mypage - 9;

if($mypage%10)

$counterstart = $mypage - ($mypage%10) + 1;

$counterend = $counterstart + 9;

if($counterend > $maxpages) $counterend = $maxpages;

if($counterstart != 1)

{

$pagination.="<a href='JavaScript:GotoPage".$id."(1);' style='TEXT-DECORATION: none;'>"."Первый"."</a>";

$pagination.="&nbsp;:&nbsp;";

$pagination.="<a href='JavaScript:GotoPage".$id."(".($counterstart-1).");' style='TEXT-DECORATION: none;'>"."Предыдущий"."</a>";

$pagination.="&nbsp;";

}

$pagination.="<b>[</b>";

for($counter = $counterstart;$counter<=$counterend;$counter++)

{

if ($counter != $mypage)

$pagination.="&nbsp;<a href='JavaScript:GotoPage".$id."(".$counter.");' class='pag_n' style='TEXT-DECORATION: none;'>".$counter."</a>";

else

$pagination.="&nbsp;<b>".$counter."</b>";

}

$pagination.="&nbsp;<b>]</b>";

if ($counterend != $maxpages)

{

$pagination.="&nbsp;<a href='JavaScript:GotoPage".$id."(".($counterend+1).");' style='TEXT-DECORATION: none;'>"."Следующий"."</a>";

$pagination.="&nbsp;:&nbsp;";

$pagination.="&nbsp;<a href='JavaScript:GotoPage".$id."(".($maxpages).");' style='TEXT-DECORATION: none;'>"."Последний"."</a>";

}

$pagination.="</td></tr></table>";

$xt->assign("pagination",$pagination);

}

}
if($maxpages>1)

{

$strSQL.=" limit ".(($mypage-1)*$PageSize).",".$PageSize;

}

$rs=db_query($strSQL,$conn);


But as I said I got an error message. Can you point me please at the right way?

Regards,

Vlad

J
Jane 2/15/2010

Vlad,
just increase number of records per page on the Miscellaneoustab and rebuild project.

V
vlad1211 author 3/6/2010



Vlad,
just increase number of records per page on the Miscellaneoustab and rebuild project.


Thank you, Jane!!