"; if ($style == "full") { $query = "SELECT * FROM software WHERE ($field LIKE '%$contains%') ORDER BY name"; $sth = $adb->prepare($query); if($sth) { $res = $sth->execute(); $numRows = $sth->rows(); for($i=0; $i < $goto; $i++) { $sth->fetchrow_hash(); } for($i = $goto; $i < $numRows; $i++) { $result = $sth->fetchrow_hash(); $ID = $result["ID"]; showSoftware($ID, 0); if (($numRows - $i) < 5) { break; } } } else { PRINT "Could not prepare query: ".$sth->errstr."
\n"; } $backgoto = $goto - 5; $forgoto = $goto + 5; PRINT "
"; if ($backgoto > -1) { PRINT "
"; } PRINT "
"; PRINT "
"; PRINT "
"; } elseif ($style == "list") { $query = "SELECT * FROM software WHERE ($field LIKE '%$contains%')"; $sth = $adb->prepare($query); if($sth) { $res = $sth->execute(); $numRows = $sth->rows(); PRINT ""; for($i=0; $i < $numRows; $i++) { $result = $sth->fetchrow_hash(); $ID = $result["ID"]; $name = $result["name"]; $platform = $result["platform"]; $license = $result["license"]; PRINT ""; PRINT ""; } } else { PRINT "Could not prepare query: ".$sth->errstr."
\n"; } PRINT "
NamePlatformLicenses
$name ($ID)$platform"; $installed = Count_installations($ID); $remaining = $license - $installed; PRINT "Installed: $installed Remaining: "; if ($remaining <= 0) { PRINT ""; } PRINT "$remaining Total: $license
"; } commonFooter(); ?>