+ $drivers = array();
+ $handle = opendir("./inc/db");
+ if (!$handle) {
+ par_error_and_leave (trans ('Could not list <code>inc/db</code> directory'));
+ }
+ while (false !== ($file = readdir($handle))) {
+ if ($file == "." or $file == "..") {
+ continue;
+ }
+ $driver_name = substr($file,0,strrpos($file,'.'));
+ if ($driver_name == "anydb") {
+ continue;
+ }
+ array_push ($drivers, $driver_name);
+ }
+ closedir($handle);
+
+
+ print '<div><label for="db_type" title="' .
+ trans ("You can specify a database backend. Mysql is the most available for standard web hosting services.") .
+ '">' . trans ("database backend:") . '</label>' . "\n" .
+ '<select id="db_type" name="db_type">'. "\n";
+ foreach ($drivers as $driver) {
+ if ($driver == $type) {
+ print '<option name="' . $driver . '" selected="true">' . $driver . '</option>' . "\n";
+ } else {
+ print '<option name="' . $driver . '">' . $driver . '</option>' . "\n";
+ }
+ }
+ print "</select>" . "\n";
+