{ ## 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>";
case 'controller': $controller = $value; case 'Youtube': print "\t<{$key}>http://www.youtube.com/watch?v={$value}</{$key}>\n"; break; case 'Rating': print "\t<Rating>" . (double) $value . "</Rating>\n"; break; default: print "\t<{$key}>{$value}</{$key}>\n"; } } } ## Process Images print "\t<Images>\n"; processFanart($obj->id); processBoxart($obj->id); processBanner($obj->id); if (!empty($console)) { print "\t\t<consoleart>platform/consoleart/{$console}</consoleart>\n"; } if (!empty($controller)) { print "\t\t<controllerart>platform/controllerart/{$controller}</controllerart>\n"; } print "\t</Images>\n"; ## End XML item print "</Platform>\n"; } ?> </Data>