echo "\n\n" . $moduleRelPath . '/' . $CONF['pdf']['tmpPathRel'] . '/' . $pdfFile; } else { echo "ERROR: PDF creation failed"; } exit; } // Add the limit $query .= "LIMIT {$startNum}," . $PREFS->itemsPerPage; // now the real query $res = $db->sql_query($query); if ($res <= 0) { echo "<H3> Error in query! </H3>\n"; exit; } $legend .= " :: " . _SORTED_BY . " " . replace_spaces($sortDesc); $legendRight = generate_flights_pagination(getLeonardoLink(array('op' => 'list_flights', 'sortOrder' => $sortOrder) + $queryExtraArray), $itemsNum, $PREFS->itemsPerPage, $page_num * $PREFS->itemsPerPage - 1, TRUE); $endNum = $startNum + $PREFS->itemsPerPage; if ($endNum > $itemsNum) { $endNum = $itemsNum; } $legendRight .= " [ " . ($startNum + 1) . "-" . $endNum . " " . _From . " " . $itemsNum . " ]"; if ($itemsNum == 0) { $legendRight = "[ 0 ]"; } if (0) { echo "<div class='tableTitle'>\n\t<div class='titleDiv'>{$legend}</div>\n\t<div class='pagesDiv' style='white-space:nowrap'>{$legendRight}</div>\n\t</div>"; } if (INLINE_VIEW != 1) { require_once dirname(__FILE__) . "/MENU_second_menu.php"; echo "<div class='list_header'>\n\t\t\t\t<div class='list_header_r'></div>\n\t\t\t\t<div class='list_header_l'></div>\n\t\t\t\t<h1>{$legend}</h1>\n\t\t\t\t<div class='pagesDiv'>{$legendRight}</div>\n\t\t\t</div>"; }
$clubID = 0; /* $page_num=makeSane($_REQUEST["page_num"],1); if ($page_num==0) $page_num=1; $startNum=($page_num-1)*$CONF_compItemsPerPage; $pagesNum=ceil ($itemsNum/$CONF_compItemsPerPage); */ $page_num = $_REQUEST["page_num"] + 0; if ($page_num == 0) { $page_num = 1; } $itemsNum = count($pilots); $startNum = ($page_num - 1) * $CONF_compItemsPerPage; $pagesNum = ceil($itemsNum / $CONF_compItemsPerPage); $endNum = $startNum + $CONF_compItemsPerPage; $legendRight = generate_flights_pagination(getLeonardoLink(array('op' => 'comp', 'rank' => $rank, 'subrank' => $subrank)), $itemsNum, $CONF_compItemsPerPage, $page_num * $CONF_compItemsPerPage - 1, TRUE); if ($endNum > $itemsNum) { $endNum = $itemsNum; } $legendRight .= " [ " . ($startNum + 1) . "-" . $endNum . " " . _From . " " . $itemsNum . " ]"; if ($itemsNum == 0) { $legendRight = "[ 0 ]"; } echo "<div class='tableTitle shadowBox'><div class='titleDiv'>{$legend}</div>"; if (!$listClubs) { echo "<div class='pagesDivSimple'>{$legendRight}</div>"; } echo "</div>"; //echo "<div class='tableTitle shadowBox'><div class='titleDiv'>$legend</div></div>" ; require_once dirname(__FILE__) . "/MENU_second_menu.php"; // show the general discription of the ranking
if ($i==$countHowMany && $countHowMany!=0) break; } ${$arrayName}[$pilotID]["SUM"]=$best3; //echo "$".$best3; } uasort(${$arrayName}, "cmp"); } $itemsNum=count(${$leagueCategories[$leagueCategory]['arrayName']}); $startNum=($page_num-1)*$CONF_compItemsPerPage; $pagesNum=ceil ($itemsNum/$CONF_compItemsPerPage); $endNum=$startNum+$CONF_compItemsPerPage; $legendRight=generate_flights_pagination( getLeonardoLink(array('op'=>'competition')+$queryExtraArray), $itemsNum,$CONF_compItemsPerPage,$page_num*$CONF_compItemsPerPage-1, TRUE); if ($endNum>$itemsNum) $endNum=$itemsNum; $legendRight.=" [ ".($startNum+1)."-".$endNum." "._From." ".$itemsNum ." ]"; if ($itemsNum==0) $legendRight="[ 0 ]"; // echo "<div class='tableTitle shadowBox'><div class='titleDiv'>$legend</div><div class='pagesDiv'>$legendRight</div></div>" ; require_once dirname(__FILE__)."/MENU_second_menu.php"; if ( $clubID && $clubsList[$clubID]['flightsInLeague'] ){ $countHowMany= $clubsList[$clubID]['flightsInLeague'] ; } else { $countHowMany= $CONF_countHowManyFlightsInComp;
$res = $db->sql_query($query); if ($res <= 0) { echo "<H3> Error in count items query! {$query}</H3>\n"; exit; } $row = $db->sql_fetchrow($res); $itemsNum = $row["itemNum"]; $page_num = $_REQUEST["page_num"] + 0; if ($page_num == 0) { $page_num = 1; } $startNum = ($page_num - 1) * $PREFS->itemsPerPage; $pagesNum = ceil($itemsNum / $PREFS->itemsPerPage); //----------------------------------------------------------------------------------------------------------- $legend = "Log entries"; $legendRight = generate_flights_pagination(getLeonardoLink(array('op' => 'admin_logs', 'sortOrder' => $sortOrder)), $itemsNum, $PREFS->itemsPerPage, $page_num * $PREFS->itemsPerPage - 1, TRUE, 3, 3); $endNum = $startNum + $PREFS->itemsPerPage; if ($endNum > $itemsNum) { $endNum = $itemsNum; } $legendRight .= " [ " . ($startNum + 1) . "-" . $endNum . " " . _From . " " . $itemsNum . " ]"; if ($itemsNum == 0) { $legendRight = "[ 0 ]"; } echo "<div class='tableTitle shadowBox'>\n\t<div class='titleDiv'>{$legend}</div>\n\t<div class='pagesDivSimple' style='white-space:nowrap'>{$legendRight}</div>\n\t</div>"; $query = "SELECT * FROM " . $logTable . " ORDER BY {$sortOrder} DESC LIMIT {$startNum}," . $PREFS->itemsPerPage; // echo $query; $res = $db->sql_query($query); if ($res <= 0) { echo "no log entries found<br>"; return;