Example #1
0
 while ($row = $check->fetch_array(MYSQLI_ASSOC)) {
     switch ($row['source']) {
         case 'mochi':
             $installed = yasDB_select("SELECT `id` FROM `games` WHERE `source` = 'MOCHI' AND `sourceid` = " . $row['sourceid']);
             if ($installed->num_rows > 0) {
                 $success = true;
             } else {
                 $success = install_mochigame($row['sourceid']);
             }
             break;
         case 'fgd':
             $installed = yasDB_select("SELECT `id` FROM `games` WHERE `source` = 'FGD' AND `sourceid` = " . $row['sourceid']);
             if ($installed->num_rows > 0) {
                 $success = true;
             } else {
                 $success = install_fgdgame($row['sourceid']);
             }
             break;
         case 'fog':
             $installed = yasDB_select("SELECT `id` FROM `games` WHERE `source` = 'FOG' AND `sourceid` = " . $row['sourceid']);
             if ($installed->num_rows > 0) {
                 $success = true;
             } else {
                 $success = install_foggame($row['sourceid']);
             }
             break;
         case 'playtomic':
             $installed = yasDB_select("SELECT `id` FROM `games` WHERE `source` = 'PLAYTOMIC' AND `sourceid` = " . $row['sourceid']);
             if ($installed->num_rows > 0) {
                 $success = true;
             } else {
Example #2
0
    echo ' <a href="index.php?act=managefgdfeed&page=1&category=' . $category . '&rating=' . $rating . '&description=' . $description . '&keywords=' . $keywords . '&filter=Filter games">FIRST</a>';
    $prevpage = $pageno - 1;
    echo ' <a href="index.php?act=managefgdfeed&page=' . $prevpage . '&category=' . $category . '&rating=' . $rating . '&description=' . $description . '&keywords=' . $keywords . '&filter=Filter games">PREV</a>';
}
echo ' ( Page ' . $pageno . ' of ' . $lastpage . ' ) ';
if ($pageno == $lastpage) {
    echo ' NEXT LAST ';
} else {
    $nextpage = $pageno + 1;
    echo ' <a href="index.php?act=managefgdfeed&page=' . $nextpage . '&category=' . $category . '&rating=' . $rating . '&description=' . $description . '&keywords=' . $keywords . '&filter=Filter games">NEXT</a>';
    echo ' <a href="index.php?act=managefgdfeed&page=' . $lastpage . '&category=' . $category . '&rating=' . $rating . '&description=' . $description . '&keywords=' . $keywords . '&filter=Filter games">LAST</a>';
}
echo '</div>';
if (isset($_GET['install'])) {
    if ($_GET['install'] == 'Install') {
        install_fgdgame($_GET['gameid']) or die("Game did not install successfully");
        echo '<script>alert("Game sucessfully installed.");</script>';
        if (isset($_GET['page'])) {
            $pageno = $_GET['page'];
        } else {
            $pageno = 1;
        }
        if (isset($_GET['category'])) {
            $category = $_GET['category'];
        } else {
            $category = 'all';
        }
        if (isset($_GET['rating'])) {
            $rating = $_GET['rating'];
        } else {
            $rating = 'all';