| @@ 537-567 (lines=31) @@ | ||
| 534 | /** |
|
| 535 | * Show confirmation of drop and perform actual drop |
|
| 536 | */ |
|
| 537 | public function doDrop($confirm) |
|
| 538 | { |
|
| 539 | $conf = $this->conf; |
|
| 540 | $misc = $this->misc; |
|
| 541 | $lang = $this->lang; |
|
| 542 | $data = $misc->getDatabaseAccessor(); |
|
| 543 | ||
| 544 | if ($confirm) { |
|
| 545 | $this->printTrail('domain'); |
|
| 546 | $this->printTitle($lang['strdrop'], 'pg.domain.drop'); |
|
| 547 | ||
| 548 | echo '<p>', sprintf($lang['strconfdropdomain'], $misc->printVal($_REQUEST['domain'])), "</p>\n"; |
|
| 549 | echo '<form action="' . SUBFOLDER . "/src/views/domains.php\" method=\"post\">\n"; |
|
| 550 | echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /><label for=\"cascade\">{$lang['strcascade']}</label></p>\n"; |
|
| 551 | echo "<p><input type=\"hidden\" name=\"action\" value=\"drop\" />\n"; |
|
| 552 | echo '<input type="hidden" name="domain" value="', htmlspecialchars($_REQUEST['domain']), "\" />\n"; |
|
| 553 | echo $misc->form; |
|
| 554 | echo "<input type=\"submit\" name=\"drop\" value=\"{$lang['strdrop']}\" />\n"; |
|
| 555 | echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" /></p>\n"; |
|
| 556 | echo "</form>\n"; |
|
| 557 | } else { |
|
| 558 | $status = $data->dropDomain($_POST['domain'], isset($_POST['cascade'])); |
|
| 559 | if ($status == 0) { |
|
| 560 | $this->doDefault($lang['strdomaindropped']); |
|
| 561 | } else { |
|
| 562 | $this->doDefault($lang['strdomaindroppedbad']); |
|
| 563 | } |
|
| 564 | } |
|
| 565 | } |
|
| 566 | ||
| 567 | /** |
|
| 568 | * Displays a screen where they can enter a new domain |
|
| 569 | */ |
|
| 570 | public function doCreate($msg = '') |
|
| @@ 328-359 (lines=32) @@ | ||
| 325 | /** |
|
| 326 | * Show confirmation of drop and perform actual drop |
|
| 327 | */ |
|
| 328 | public function doDrop($confirm) |
|
| 329 | { |
|
| 330 | $conf = $this->conf; |
|
| 331 | $misc = $this->misc; |
|
| 332 | $lang = $this->lang; |
|
| 333 | $data = $misc->getDatabaseAccessor(); |
|
| 334 | ||
| 335 | if ($confirm) { |
|
| 336 | $this->printTrail('type'); |
|
| 337 | $this->printTitle($lang['strdrop'], 'pg.type.drop'); |
|
| 338 | ||
| 339 | echo '<p>', sprintf($lang['strconfdroptype'], $misc->printVal($_REQUEST['type'])), "</p>\n"; |
|
| 340 | ||
| 341 | echo '<form action="' . SUBFOLDER . "/src/views/types.php\" method=\"post\">\n"; |
|
| 342 | echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /> <label for=\"cascade\">{$lang['strcascade']}</label></p>\n"; |
|
| 343 | echo "<p><input type=\"hidden\" name=\"action\" value=\"drop\" />\n"; |
|
| 344 | echo '<input type="hidden" name="type" value="', htmlspecialchars($_REQUEST['type']), "\" />\n"; |
|
| 345 | echo $misc->form; |
|
| 346 | echo "<input type=\"submit\" name=\"drop\" value=\"{$lang['strdrop']}\" />\n"; |
|
| 347 | echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" /></p>\n"; |
|
| 348 | echo "</form>\n"; |
|
| 349 | } else { |
|
| 350 | $status = $data->dropType($_POST['type'], isset($_POST['cascade'])); |
|
| 351 | if ($status == 0) { |
|
| 352 | $this->doDefault($lang['strtypedropped']); |
|
| 353 | } else { |
|
| 354 | $this->doDefault($lang['strtypedroppedbad']); |
|
| 355 | } |
|
| 356 | } |
|
| 357 | } |
|
| 358 | ||
| 359 | /** |
|
| 360 | * Displays a screen where they can enter a new composite type |
|
| 361 | */ |
|
| 362 | public function doCreateComposite($msg = '') |
|