'', 'added' => 'added', 'removed' => 'removed'); $actions = array('' => ''); $archs = array('all' => 'all'); $result = mysql_run_query( "SELECT DISTINCT `architectures`.`name` FROM `architectures`" . mysql_join_architectures_repositories() . " WHERE `repositories`.`is_on_master_mirror`" . " ORDER BY `name`" ); while ($row = $result -> fetch_assoc()) $archs[$row['name']] = $row['name']; $repos = array('' => ''); $result = mysql_run_query( "SELECT DISTINCT `repositories`.`name` FROM `repositories` WHERE `repositories`.`is_on_master_mirror` ORDER BY `name`" ); while ($row = $result -> fetch_assoc()) $repos[$row['name']] = $row['name']; if (count($uri_parts) > 0 && array_key_exists($uri_parts[0], $actions)) { $action = $uri_parts[0]; array_splice( $uri_parts, 0, 1 ); } else $action = ''; if (count($uri_parts) > 0) { if (!array_key_exists($uri_parts[0], $archs)) throw_http_error(501, "Not Implemented", implode('/',$uri_parts)); $arch = $uri_parts[0]; array_splice( $uri_parts, 0, 1 ); } else $arch = ''; if (count($uri_parts) > 0) { if (!array_key_exists($uri_parts[0], $repos)) throw_http_error(501, "Not Implemented", implode('/',$uri_parts)); $repo = $uri_parts[0]; array_splice( $uri_parts, 0, 1 ); } else $repo = ''; if (count($uri_parts) != 0) throw_http_error(501, "Not Implemented", implode('/',$uri_parts)); # $result = mysql_run_query( # TODO # ); print ""; print ""; print ""; print "Arch Linux 32: "; switch ($action) { case '': print "Recent package updates"; break; case 'added': print "Recent added packages"; break; case 'removes': print "Recent removed packages"; break; } if ($arch != '') print " (" . $arch; if ($repo != '') print " [" . $repo . "]"; if ($arch != '') print ")"; print ""; print ""; print "https://archlinux32.org" . $_SERVER['REQUEST_URI']; print ""; print ""; print ""; # TODO print ""; die(); } throw_http_error(501, "Not Implemented");