?> </a> <a class="btn btn-success" href="javascript:history.go(-1)"><?php _e('Cancel'); ?> </a> <?php } } elseif (!empty($_GET['action']) and ($_GET['action'] == "binding_now" or $_GET['action'] == 'unbinding')) { if ($_GET['action'] == 'unbinding') { $switch = false; } else { $switch = true; } $original_packages = DB::result_first("SELECT `Packages` FROM `" . DCRM_CON_PREFIX . "UDID` WHERE `UDID` = '" . $_GET['udid'] . "'"); $packages = string_handle($original_packages, $switch, $_GET['package'], ','); DB::update(DCRM_CON_PREFIX . 'UDID', array('Packages' => $packages), array('UDID' => $_GET['udid'])); if ($_SESSION['HTTP_REFERER'] == $_SERVER['HTTP_REFERER']) { header("Location: udid.php"); } else { header("Location: " . $_SESSION['HTTP_REFERER']); } exit; } endlabel: ?> </div> </div> </div> </div> <div class="modal inmodal" id="addUDIDModal" tabindex="-1" role="dialog" aria-hidden="true">
<br /> <div class="form-actions"> <div class="controls"> <button type="submit" class="btn btn-success"><?php _e('Save'); ?> </button> </div> </div> </fieldset> </form> <?php } elseif (!empty($_GET['action']) and $_GET['action'] == "set" and !empty($_GET['id'])) { $new_id = (int) $_GET['id']; $tag = DB::result_first("SELECT `Tag` FROM `" . DCRM_CON_PREFIX . "Packages` WHERE `ID` = '" . $new_id . "'"); $_POST['Tag'] = string_handle($tag, $_POST['Protection']); unset($_POST['Protection']); if (!empty($_POST['Minimum_System_Support'])) { $_POST['System_Support'] = serialize(array('Minimum' => $_POST['Minimum_System_Support'], 'Maxmum' => $_POST['Maxmum_System_Support'])); } else { $_POST['System_Support'] = null; } unset($_POST['Minimum_System_Support']); unset($_POST['Maxmum_System_Support']); DB::update(DCRM_CON_PREFIX . 'Packages', $_POST, array('ID' => $new_id)); echo '<h2>' . __('Update Database') . '</h2><br />'; echo '<h3 class="alert">' . __('The package information edited!') . '<br />' . __('After modify the fields with an asterisk, you must write into package then safely rebuild list.'); echo '<br /><a href="output.php?id=' . $new_id . '">' . __('Write Now') . '</a> <a href="javascript:history.go(-1);">' . __('Back') . '</a></h3>'; } elseif (!empty($_GET['action']) and $_GET['action'] == "advance" and !empty($_GET['id'])) { $edit_info = DB::fetch_first("SELECT * FROM `" . DCRM_CON_PREFIX . "Packages` WHERE `ID` = '" . $request_id . "'"); if (!$edit_info) {