示例#1
0
            $checkOrderNum = $catOrderOrderNum + $addTo;
            if ($checkOrderNum != $downloadCatInfo['ordernum']) {
                $intNewOrderSpot = $downloadCatObj->makeRoom($_POST['beforeafter']);
            }
        }
    }
    if ($countErrors == 0) {
        $updateColumns = array("name", "accesstype");
        $updateValues = array($_POST['catname'], $_POST['accesstype']);
        if ($intNewOrderSpot != "") {
            $resortOrder = true;
            $updateColumns[] = "ordernum";
            $updateValues[] = $intNewOrderSpot;
        }
        $downloadCatObj->select($downloadCatInfo['downloadcategory_id']);
        if ($downloadCatObj->update($updateColumns, $updateValues)) {
            $result = $mysqli->query("DELETE FROM " . $mysqli->get_tablePrefix() . "download_extensions WHERE downloadcategory_id = '" . $downloadCatInfo['downloadcategory_id'] . "'");
            foreach ($arrExtensions as $strExtension) {
                $downloadExtensionObj->addNew(array("downloadcategory_id", "extension"), array($downloadCatInfo['downloadcategory_id'], trim($strExtension)));
            }
            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 Edited Download Category!\n\t\t\t\t</p>\n\t\t\t</div>\n\t\n\t\t\t<script type='text/javascript'>\n\t\t\t\tpopupDialog('Edit Download Category', '" . $MAIN_ROOT . "members/console.php?cID=" . $cID . "', 'successBox');\n\t\t\t</script>\n\t\t\t";
            if ($resortOrder) {
                $downloadCatObj->resortOrder();
            }
        }
    } else {
        $_POST = filterArray($_POST);
        $_POST['submit'] = false;
    }
}
if (!$_POST['submit']) {