require_once("../inc/define.php"); require_once("../inc/mysql.php"); require_once("../inc/Pager/Pager.php"); $db = new Sql(); $db->connect(); $lingua="1"; $query = "select ".__NOME_CLIENTE__."_dati.id_new, ".__NOME_CLIENTE__."_dati.titolo, ".__NOME_CLIENTE__."_dati.descrizione_breve, ".__NOME_CLIENTE__."_dati.data_ins from ".__NOME_CLIENTE__."_news3, ".__NOME_CLIENTE__."_dati where id_padre=0 and ".__NOME_CLIENTE__."_dati.attiva = '1' and ".__NOME_CLIENTE__."_news3.id_new = ".__NOME_CLIENTE__."_dati.id_new and id_lingua='".$lingua."' order by ".__NOME_CLIENTE__."_news3.data_ins desc"; $db->query($query); $count=$db->num_rows(); while ($db->next_record()){ $record['id_new'][]=$db->f('id_new'); } // Pager start $params = array( 'itemData' => $record[id_new], 'perPage' => 3, 'delta' => 1, // for 'Jumping'-style a lower number is better 'append' => true, 'separator' => '-', 'spacesBeforeSeparator' => 1, 'spacesAfterSeparator' => 1, 'prevImg' => '<<', 'nextImg' => '>>', 'clearIfVoid' => true, 'urlVar' => 'page', //'mode' => 'Sliding', //try switching modes 'mode' => 'Sliding', 'curPageLinkClassName' => 'TxtNewT', 'linkClass' => 'TxtTestini' ); $pager = & Pager::factory($params); $page_data = $pager->getPageData(); $links = $pager->getLinks(); // Pager end if ($page_data){ $val="'"; while(list($k,$v)=each($page_data)) $val.=$v."','"; $val=substr($val,0,-2); } else $val="''"; ?>