Exemplo n.º 1
0
{
    ## Select all boxart rows for the requested game id
    $clResult = mysql_query(" SELECT filename, resolution FROM banners WHERE keyvalue = {$gameID} AND keytype = 'clearlogo' LIMIT 1 ");
    ## Process each boxart row incrementally
    while ($clRow = mysql_fetch_assoc($clResult)) {
        ## Construct file names
        $clOriginal = $clRow['filename'];
        $clResolution = $clRow['resolution'];
        $clResolution = explode("x", $clResolution, 2);
        ## Check to see if the original boxart file actually exists before attempting to process
        if (file_exists("../banners/{$clOriginal}")) {
            ## Output Boxart XML Branch
            echo "<clearlogo width=\"{$clResolution['0']}\" height=\"{$clResolution['1']}\">{$clOriginal}</clearlogo>";
        }
    }
}
###===============###
###MAIN XML OUTPUT###
###-----------------------------###
print "<Data>\n";
print "<baseImgUrl>http://thegamesdb.net/banners/</baseImgUrl>\n";
## Open Images XML Branch
print "<Images>\n";
processFanart($requestedID);
processBoxart($requestedID);
processBanner($requestedID);
processScreenshots($requestedID);
processClearLOGO($requestedID);
## Close Images XML Branch
print "</Images>\n";
print "</Data>";
Exemplo n.º 2
0
                    print "<{$key}>http://www.youtube.com/watch?v={$value}</{$key}>\n";
                    break;
                case 'Rating':
                    print "<Rating>" . (double) $value . "</Rating>";
                    break;
                case 'Players':
                    if ($value == 4) {
                        print "<{$key}>4+</{$key}>";
                    } else {
                        print "<{$key}>" . $value . "</{$key}>";
                    }
                    break;
                default:
                    print "<{$key}>{$value}</{$key}>\n";
            }
        }
    }
    ## Process Images
    print "<Images>\n";
    processFanart($obj->id);
    processBoxart($obj->id);
    processBanner($obj->id);
    processScreenshots($obj->id);
    processClearLOGO($obj->id);
    print "</Images>\n";
    ## End XML item
    print "</Game>\n";
}
?>
</Data>