コード例 #1
0
ファイル: editstatus.php プロジェクト: nsystem1/clanscripts
            if ($diplomacyStatusObj->update($arrColumns, $arrValues)) {
                echo "\n\t\t\t\t\n\t\t\t\t\t<div style='display: none' id='successBox'>\n\t\t\t\t\t\t<p align='center'>\n\t\t\t\t\t\t\tSuccessfully edited the " . $diplomacyStatusObj->get_info_filtered("name") . " diplomacy status!\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\tpopupDialog('Edit Diplomacy Status', '" . $MAIN_ROOT . "members', 'successBox');\n\t\t\t\t\t</script>\n\t\t\t\t\n\t\t\t\t";
                $diplomacyStatusObj->resortOrder();
                $member->logAction("Edited the " . $_POST['statusname'] . " diplomacy status.");
            } else {
                $countErrors++;
                $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> Unable to save information to the database.  Please contact the website administrator.<br>";
            }
        }
    }
    if ($countErrors > 0) {
        $_POST['submit'] = false;
    }
}
if (!$_POST['submit']) {
    $arrBeforeAfter = $diplomacyStatusObj->findBeforeAfter();
    $afterSelected = "";
    if ($arrBeforeAfter[1] == "after") {
        $afterSelected = " selected";
    }
    $orderoptions = "";
    $result = $mysqli->query("SELECT * FROM " . $dbprefix . "diplomacy_status WHERE diplomacystatus_id != '" . $diplomacyStatusInfo['diplomacystatus_id'] . "' ORDER BY ordernum DESC");
    while ($row = $result->fetch_assoc()) {
        $dispSelected = "";
        if ($arrBeforeAfter[0] == $row['diplomacystatus_id']) {
            $dispSelected = " selected";
        }
        $orderoptions .= "<option value='" . $row['diplomacystatus_id'] . "'" . $dispSelected . ">" . filterText($row['name']) . "</option>";
    }
    if ($orderoptions == "") {
        $orderoptions = "<option value='first'>No other statuses</option>";