ciao mi da il seguente errore
codice:
Notice: Undefined variable: pag in C:\Programmi\Apache Software Foundation\Apache2.2\htdocs\supp\includes\function_staff.php on line 50
Fatal error: Call to a member function Link() on a non-object in C:\Programmi\Apache Software Foundation\Apache2.2\htdocs\supp\includes\function_staff.php on line 50
ho fatto cosi: 2 funzioni ....1)
Codice PHP:
/**
* view tech
*/
function GetStaff()
{
global $dbcore;
global $settings ;
$pag = new Paginazione("select t. * , gs. id_groups ,gs. nome_group from tech t left join grouptech gs on t. groupid = gs. id_groups order by t. staffid asc ", 30 , "pagina") or die(mysql_error());
$return = array();
if($record = $pag->Show())
{
foreach($record as $row)
{
$return[] = $row;
}
}
return $return;
}
2)
Codice PHP:
function TechPager(){
if($link = $pag->Link(3))
{
?>
[url="?pagina=<?=$link['first']?>"]«[/url] <?php
foreach($link['before'] as $bf)
{
?>[url="?pagina=<?=$bf?>"]<?=$bf?>[/url] <?php
}
?><?=$link['current']?> <?php
foreach($link['after'] as $at)
{
?>[url="?pagina=<?=$at?>"]<?=$at?>[/url] <?php
}
?>[url="?pagina=<?=$link['last']?>"]»[/url]
<?php
}
}