\n"; echo "\n"; echo " ", date('Y-m-d H:i:s'), "\n"; echo " \n"; if (isset($_GET['category']) && isset($_GET['groups'])) { $sql2 = 'SELECT groupID, groupName, graphicID, published FROM invGroups WHERE categoryID = ' . ((int) $_GET['category']); if (isset($_GET['published'])) { $sql2 .= ' AND published = 1'; } $res2 = mysql_query($sql2); echo ' ', "\n"; while ($row2 = mysql_fetch_assoc($res2)) { echo ' $value) { echo ' ', $key, '="', htmlspecialchars($value), '"'; } echo '>', "\n"; $_GET['group'] = $row2['groupID']; doTypes(); echo ''; } echo ' ', "\n"; } else { doTypes(); } function doTypes() { $sql = 'SELECT typeID, groupID, typeName, invTypes.graphicID, published, raceID FROM invTypes WHERE '; if (isset($_GET['group'])) { $sql .= 'groupID = ' . ((int) $_GET['group']); } else if (isset($_GET['type'])) { $sql .= 'typeID = ' . ((int) $_GET['type']); } else if (isset($_GET['category'])) { $sql .= 'groupID IN (SELECT groupID from invGroups WHERE categoryID = ' . ((int) $_GET['category']) . ')'; } if (isset($_GET['published'])) { $sql .= ' AND published = 1'; } $res = mysql_query($sql) or print(mysql_error()); echo ' ', "\n"; while ($row = mysql_fetch_assoc($res)) { echo ' $value) { echo ' ', $key, '="', htmlspecialchars($value), '"'; } echo '>', "\n"; $sql2 = 'SELECT attributeID, valueInt, valueFloat, attributeName, published, highIsGood FROM dgmTypeAttributes NATURAL JOIN dgmAttributeTypes WHERE typeID = ' . $row['typeID']; if (isset($_GET['attributes'])) { $sql2 .= ' AND attributeName LIKE \'' . mysql_real_escape_string($_GET['attributes']) . '\''; } $res2 = mysql_query($sql2); echo ' ', "\n"; while ($row2 = mysql_fetch_assoc($res2)) { $row2['value'] = $row2['valueInt'] . $row2['valueFloat']; unset($row2['valueInt'], $row2['valueFloat']); echo ' $value) { echo ' ', $key, '="', htmlspecialchars($value), '"'; } echo '/>', "\n"; } echo " \n"; echo " \n"; } echo ' ', "\n"; } echo " \n"; echo " ", date('Y-m-d H:i:s', CACHEDUNTIL), "\n"; echo "\n"; ?>