} else { if ($_POST['beforeafter'] == "before" || $_POST['beforeafter'] == "after") { $intNewSortNum = $profileOptionObj->makeRoom($_POST['beforeafter']); } else { $countErrors++; $dispError .= " <b>·</b> You selected an invalid profile option order.<br>"; } } } if ($countErrors == 0) { if ($_POST['optiontype'] != "select") { $_POST['optiontype'] = "input"; } $arrColumnNames = array("profilecategory_id", "name", "optiontype", "sortnum"); $arrColumnValues = array($_POST['optioncategory'], $_POST['optionname'], $_POST['optiontype'], $intNewSortNum); if ($profileOptionObj->addNew($arrColumnNames, $arrColumnValues)) { if ($_POST['optiontype'] == "select") { $counter = 1; foreach ($_SESSION['btProfileCache'] as $selectValue) { $profileOptionObj->addNewSelectValue($selectValue, $counter); $counter++; } } $newProfileInfo = $profileOptionObj->get_info_filtered(); echo "\n\t\t\t<div style='display: none' id='successBox'>\n\t\t\t\t<p align='center'>\n\t\t\t\t\tSuccessfully Added New Profile Option: <b>" . $newProfileInfo['name'] . "</b>!\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\t\n\t\t\t<script type='text/javascript'>\n\t\t\tpopupDialog('Add New Profile Option', '" . $MAIN_ROOT . "members/console.php', 'successBox');\n\t\t\t</script>\n\t\t\t"; } else { $countErrors++; $dispError .= " <b>·</b> Unable to save information to the database! Please contact the website administrator.<br>"; } } if ($countErrors > 0) {