num_rows > 0) {
$count = 0;
while ($row = $result->fetch_assoc()) {
if (strstr(
file_get_contents(
"https://www.archlinux.org/packages/search/json/?q=" .
$row["pkgname"]
),
"\"pkgname\": \"".$row["pkgname"]."\""
) === FALSE)
$color = "#00FF00";
else
$color = "#FF0000";
$rows[$count] =
"" .
$row["repo"] . "/" .
$row["pkgname"] . "-";
if ($row["epoch"] != "0")
$rows[$count] =
$rows[$count] .
$row["epoch"] . ":";
$rows[$count] =
$rows[$count] .
$row["pkgver"] . "-" .
$row["pkgrel"] . "." .
$row["sub_pkgrel"] . "-" .
$row["arch"] . ".pkg.tar.xz";
$count++;
}
sort($rows);
foreach ($rows as $row) {
print $row."
\n";
}
} else {
print "No packages are to be deleted.\n";
}
?>