if ($strSubAction == '') { } else { if ($strSubAction == 'import') { $objBreadcrumbs->add('Import', 'index.php?action=admin&subaction=import'); $objAdmin->set('path', "../ospap"); print "Importing from OSPAP...<br>"; print "<form method='get' action='index.php'>"; print "<input type='hidden' name='action' value='admin'>"; print "<input type='hidden' name='subaction' value='import2'>"; print "Path to OSPAP " . $objAdmin->getTextField('path') . "<br>"; print $objAdmin->getSubmit('Go'); print "</form>"; } else { if ($strSubAction == 'import2') { $objBreadcrumbs->add('Import', 'index.php?action=admin&subaction=import'); $arrUserOptions = clsDB::getOptionsFromTable('user', 'username', 'id', "Don't import"); $objAdmin->getFromRequest(); require_once $objAdmin->get('path') . "/configuration.php"; print "<form method='get' action='index.php'>"; print "<input type='hidden' name='action' value='admin'>"; print "<input type='hidden' name='subaction' value='import3'>"; print "Path to OSPAP " . $objAdmin->getTextField('path') . "<br>"; $conDB = mysql_connect($db_host, $db_read_user, $db_read_pass); if (!mysql_select_db($db_name, $conDB)) { print "Error: couldn't connect to the ospap database: " . mysql_error($conDB); } else { $result = mysql_query("SELECT * FROM users JOIN categories ON users.user_id = categories.user_id ORDER BY users.username, categories.name"); if (!$result) { print "Query error: " . mysql_error($conDB); } else { print "<table>";