1000){ $page = 1000; } $perpage = 40; //Number of games that are on the main "Games" page, so it skips those when populating the "More Games": $game_offset = 29; //22; if ($category != "more"){ $game_offset = 0; } $comingsoon_idx = 1; $comingsoon_max = 4; $didFillBack = FALSE; $games = array(); //include and connect to the database: include "/var/www/vhosts/flipline.com/httpdocs/dbinclude.php"; if ($dbConnected == false){ echo ""; exit; } //get the data: ---------------------------- $searchFlipline = TRUE; $searchOther = TRUE; $whereClause = ""; //first get and store how many games there are that match this category/query: ------------------------- $totalgames = 0; $fliplinetotal = 0; if ($searchOther == TRUE){ $querycount = "SELECT COUNT(*) AS TOTAL FROM othergames WHERE active = 1 AND flipline = 0 AND blog = 0 ".$whereClause; $resultcount = mysql_query($querycount); $rowcount = mysql_fetch_array($resultcount); $numrowscount = mysql_num_rows($resultcount); if ($numrowscount > 0){ $totalgames += $rowcount['TOTAL']; } } if ($searchFlipline == TRUE){ //$querycount = "SELECT COUNT(*) AS TOTAL FROM fliplinegames WHERE active = 1 AND comingsoon = 0 ".$whereClause; $querycount = "SELECT COUNT(*) AS TOTAL FROM fliplinegames WHERE active = 1 AND comingsoon = 0"; $resultcount = mysql_query($querycount); $rowcount = mysql_fetch_array($resultcount); $numrowscount = mysql_num_rows($resultcount); if ($numrowscount > 0){ $totalgames += $rowcount['TOTAL']; $fliplinetotal = $rowcount['TOTAL']; } } //get the actual data: ---------------------------- $hasData = FALSE; $hasFliplineData = FALSE; if ($searchFlipline == TRUE){ $query = "SELECT gameurl,gamename FROM fliplinegames WHERE active = 1 AND comingsoon = 0 ".$whereClause."ORDER BY sorting DESC LIMIT ".($game_offset + ($perpage*$page)).", ".$perpage; $result = mysql_query($query); $num_rows = mysql_num_rows($result); if ($num_rows > 0){ $hasFliplineData = TRUE; for ($i=0; $i<$num_rows; $i++){ $row = mysql_fetch_array($result); $newarray = array($row['gameurl'], $row['gamename'], FALSE); array_push($games, $newarray); } } else { //echo ""; //exit; } } if ($searchOther == TRUE){ //$useLimit = ($game_offset + ($perpage*$page)); $useLimit = max(0, (($game_offset + ($perpage*$page)) - $fliplinetotal)); $query = "SELECT gameurl,gamename FROM othergames WHERE active = 1 AND flipline = 1 AND blog = 0 ORDER BY sorting DESC LIMIT ".$useLimit.", ".$perpage; $result = mysql_query($query); $num_rows = mysql_num_rows($result); if ($num_rows > 0){ $hasData = TRUE; for ($i=0; $i<$num_rows; $i++){ $row = mysql_fetch_array($result); $newarray = array($row['gameurl'], $row['gamename'], TRUE); array_push($games, $newarray); } } else { //echo ""; //exit; } } //if it didn't find anything, go to the error page. if ($hasData == FALSE && $hasFliplineData == FALSE){ echo ""; exit; } //Functions to get data: function getGameLink($idx){ global $games; global $page; global $perpage; $useIndex = $idx; // + ($page*$perpage); if (count($games) > $useIndex){ if ($games[$useIndex][2] == TRUE){ echo "/othergames/".$games[$useIndex][0]."/index.html"; } else { echo "/games/".$games[$useIndex][0]."/index.html"; } } else { echo "#"; } } function getGameIcon($idx){ global $games; global $page; global $perpage; global $comingsoon_idx; global $comingsoon_max; $useIndex = $idx; // + ($page*$perpage); if (count($games) > $useIndex){ if ($games[$useIndex][2] == TRUE){ echo "https://i.flipline.com/othergamefiles/".$games[$useIndex][0]."/images/gameicon.jpg"; } else { echo "https://i.flipline.com/gamefiles/".$games[$useIndex][0]."/images/gameicon.jpg"; } } else { $comingsoon_idx ++; if ($comingsoon_idx > $comingsoon_max){ $comingsoon_idx = 1; } //echo "https://i.flipline.com/images/comingsoon_0".$comingsoon_idx.".jpg"; //echo "https://i.flipline.com/images/comingsoon_sm.jpg"; //echo "https://i.flipline.com/images/button_moregamesC.gif"; echo "https://i.flipline.com/images/gameicon_blank.gif"; } } function getGameTitle($idx){ global $games; global $page; global $perpage; $useIndex = $idx; // + ($page*$perpage); if (count($games) > $useIndex){ echo $games[$useIndex][1]; } else { //echo "Coming Soon..."; echo ""; } } function getGamePanel($idx, $canUseBack){ global $games; global $page; global $didFillBack; global $category; if (count($games) > $idx){ //echo ''.getGameTitle($idx).''; echo '';
        getGameTitle($idx);
        echo ''; } else { //no game to show here. if ($canUseBack === TRUE && $didFillBack == FALSE){ //back button: if ($page == 0){ echo ""; } else { echo ""; } echo ''; $didFillBack = TRUE; } else if ($didFillBack == FALSE){ //gray box: echo ''; } else if ($didFillBack == TRUE){ //nothing: } } } ?> <?php echo ucwords(str_replace("_", " ", $category)); ?> Games | <?php //PHP Title Tag, based on domain. $url = $_SERVER['HTTP_HOST']; if (strpos($url, "papalouie.com") !== FALSE || strpos($url, "papalouie.net") !== FALSE || strpos($url, "papasburgeria.com") !== FALSE){ echo "Papa Louie Arcade : "; } else { echo "Flipline Studios : "; } ?>
     PC GAMES
  Papa's Pizzeria Deluxe
  Papa's Freezeria Deluxe
     FLIPLINE WEB GAMES
These web games require Flash Player to run, which has been discontinued in most browsers and is no longer available.
= 15){ echo ''; } ?>
'.getGameTitle($f).''; echo ''; getGameTitle($f); echo ''; if ($f < $totalgames - 1){ echo ' | '; } } ?>

   Home  |   Games  |   Apps  |   About  |   Contact  |   Terms of Use  |   Privacy Policy  |   Blog  |   Forum  |   Shop  |   Flipdeck  |   Free Games for your Site  |   © Flipline IDS LLC