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 '';
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:
}
}
}
?>
Games |
PC GAMES
Papa's Pizzeria Deluxe
Top, bake, and serve delicious pizzas in Papa's Pizzeria Deluxe! Craft pizzas for Papa Louie's loyal customers while earning tips, points, and Special Recipes. Unlock holiday ingredients for seasonal pies, and take a trip in the Food Truck to serve your own unique creations!
Steam (PC):
Papa's Freezeria Deluxe
Return to Calypso Island to serve seasonal sundae treats in Papa's Freezeria Deluxe! Craft sundaes for all your quirky customers while earning tips, points and Special Recipes. Take a trip in the Food Truck to concoct your own chilly creations!
Steam (PC):
FLIPLINE WEB GAMES
These web games require Flash Player to run, which has been discontinued in most browsers and is no longer available.