\n"); print("\n"); if ($new_cat_mod && ($new_cat_mod_name == "")) { print("
Create New Category
Error: if the category is to be moderated, the moderator needs to be specified.
\n"); include $inc_dir . "footer.php3"; exit; } if (($new_cat_name == "") || ($new_cat_desc == "")) { print("Error: category name, group, and description must be specified.\n"); include $inc_dir . "footer.php3"; exit; } if ($use_category_groups && ($new_cat_group == "")) { print("Error: category group must be specified.\n"); include $inc_dir . "footer.php3"; exit; } // connect to the server $db_link = SQL_connect(); if ($use_category_groups) { // form the select statement $statement = "INSERT INTO categories (name, moderated, moderator, description, created, password, catgroup) VALUES ('$new_cat_name', $new_cat_mod, '$new_cat_mod_name', '$new_cat_desc', NOW(), '$new_cat_pass', '$new_cat_group')"; } else { // form the select statement $statement = "INSERT INTO categories (name, moderated, moderator, description, created, password, catgroup) VALUES ('$new_cat_name', $new_cat_mod, '$new_cat_mod_name', '$new_cat_desc', NOW(), '$new_cat_pass', 'General')"; } // output it... helpful for debugging purposes... //print("

SQL Statement: $statement

"); // do it, damn it =) $db_result = SQL_query($statement, $db_link); // find out how many results there were... $aff_rows = SQL_get_aff_rows($db_link, $db_result); //print("
There are currently $aff_rows categories.

\n"); //if ($aff_rows == 0) { //print("

Error: category should have been but was not created.\n"); //SQL_close($db_link); //include $inc_dir . "footer.php3"; //exit; //} print("Name$new_cat_name\n"); print("ModeratedNo Yes\n"); print("Moderator Name$new_cat_mod_name\n"); print("Category Description$new_cat_desc\n"); print("Password$new_cat_pass\n"); print("\n"); include $inc_dir . "footer.php3"; ?>