Ok...
i lied the unicode marker is still visibe in firefox? how can this be. I never had this problem before...
Im confused.. My script at http://theymix.com/test21.php?alp=a&page=1 seems to work fine...
However.. combinded with the layout the nav numbers move to the bottom of the results and have a weird  next to them.
http://theymix.com/search/by-letter/t/1/ -- See what I mean...
------------Code Snippet-----------
pagerclass.php
-------------------
i lied the unicode marker is still visibe in firefox? how can this be. I never had this problem before...
Im confused.. My script at http://theymix.com/test21.php?alp=a&page=1 seems to work fine...
However.. combinded with the layout the nav numbers move to the bottom of the results and have a weird  next to them.
http://theymix.com/search/by-letter/t/1/ -- See what I mean...
------------Code Snippet-----------
PHP:
$p = new Pager;
$start = $p->findStart($limit,$id4);
$count = mysql_num_rows(mysql_query("SELECT * FROM ---- WHERE LEFT(title,1) = '$alp'"));
$pages = $p->findPages($count, $limit);
$pagelist = $p->pageList($id4, $pages, $urlqry);
echo $pagelist;
$result = mysql_query("SELECT * FROM ---- WHERE LEFT(title,1)='$alp' ORDER BY title ASC LIMIT $start, $limit")
or die(mysql_error());
while($row = mysql_fetch_array( $result )) {
$word= $row['title'];
$id=$row['id'];
$data = explode(' recipe',$word);
echo ("<a href=\"http://theymix.com/drink/$id/\">" . $data[0] . "</a><br>");
pagerclass.php
-------------------
PHP:
<?php
class Pager
{
function findStart($limit,$id4)
{
if ((!isset($id4)) || ($id4 == "1"))
{
$start = 0;
$id4 = 1;
}
else
{
$start = ($id4-1) * $limit;
}
return $start;
}
function findPages($count, $limit)
{
$pages = (($count % $limit) == 0) ? $count / $limit : floor($count / $limit) + 1;
return $pages;
}
function pageList($curpage, $pages, $urlqry)
{
$page_list = "";
/* Print the first and previous page links if necessary */
if (($curpage != 1) && ($curpage))
{
$page_list .= "<a href=\"".$urlqry."1/\" title=\"First Page\">First</a> ";
}
if (($curpage-1) > 0)
{
$page_list .= "<a href=\"". $urlqry.($curpage-1)."/\" title=\"Previous Page\">Previous</a> ";
}
/* Print the numeric page list; make the current page unlinked and bold */
for ($i=1; $i<=$pages; $i++)
{
if ($i == $curpage)
{
$page_list .= "<b>".$i."</b>";
}
else
{
$page_list .= "<a href=\"". $urlqry.$i."/\" title=\"Page ".$i."\">".$i."</a>";
}
$page_list .= " ";
}
/* Print the Next and Last page links if necessary */
if (($curpage+1) <= $pages)
{
$page_list .= "<a href=\"". $urlqry.($curpage+1)."/\" title=\"Next Page\">Next</a> ";
}
if (($curpage != $pages) && ($pages != 0))
{
$page_list .= "<a href=\"". $urlqry.$pages."/\" title=\"Last Page\">Last</a> ";
}
$page_list .= "</td>\n";
return $page_list;
}
}
?>
Last edited:







