Esempio n. 1
0
     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>";
             print "<th>Original Owner</td>";
             print "<th>Category Name</td>";
             print "<th>Give To</td>";
             while ($arrResult = mysql_fetch_assoc($result)) {
                 print "<tr>";
                 print "<td>" . $arrResult['username'] . "</td>";
                 print "<td>" . $arrResult['name'] . "</td>";
                 print "<td>" . $objAdmin->getCombo('category' . $arrResult['category_id'], $arrUserOptions) . "</td>";
                 print "</tr>";
             }
             print "</table>";
         }
     }
     print $objAdmin->getSubmit('Go');
     print "</form>";
 } else {
     if ($strSubAction == 'import3') {
         $objBreadcrumbs->add('Import', 'index.php?action=admin&subaction=import');
         $objAdmin->getFromRequest();
         require_once $objAdmin->get('path') . "/configuration.php";
         $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);