| @@ 548-573 (lines=26) @@ | ||
| 545 | * |
|
| 546 | * @param mixed $confirm |
|
| 547 | */ |
|
| 548 | public function doDrop($confirm) |
|
| 549 | { |
|
| 550 | $data = $this->misc->getDatabaseAccessor(); |
|
| 551 | ||
| 552 | if ($confirm) { |
|
| 553 | $this->printTrail('domain'); |
|
| 554 | $this->printTitle($this->lang['strdrop'], 'pg.domain.drop'); |
|
| 555 | ||
| 556 | echo '<p>', sprintf($this->lang['strconfdropdomain'], $this->misc->printVal($_REQUEST['domain'])), '</p>'.PHP_EOL; |
|
| 557 | echo '<form action="'.\SUBFOLDER.'/src/views/domains" method="post">'.PHP_EOL; |
|
| 558 | echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /><label for=\"cascade\">{$this->lang['strcascade']}</label></p>".PHP_EOL; |
|
| 559 | echo '<p><input type="hidden" name="action" value="drop" />'.PHP_EOL; |
|
| 560 | echo '<input type="hidden" name="domain" value="', htmlspecialchars($_REQUEST['domain']), '" />'.PHP_EOL; |
|
| 561 | echo $this->misc->form; |
|
| 562 | echo "<input type=\"submit\" name=\"drop\" value=\"{$this->lang['strdrop']}\" />".PHP_EOL; |
|
| 563 | echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>".PHP_EOL; |
|
| 564 | echo '</form>'.PHP_EOL; |
|
| 565 | } else { |
|
| 566 | $status = $data->dropDomain($_POST['domain'], isset($_POST['cascade'])); |
|
| 567 | if (0 == $status) { |
|
| 568 | $this->doDefault($this->lang['strdomaindropped']); |
|
| 569 | } else { |
|
| 570 | $this->doDefault($this->lang['strdomaindroppedbad']); |
|
| 571 | } |
|
| 572 | } |
|
| 573 | } |
|
| 574 | ||
| 575 | /** |
|
| 576 | * Displays a screen where they can enter a new domain. |
|
| @@ 335-361 (lines=27) @@ | ||
| 332 | * |
|
| 333 | * @param mixed $confirm |
|
| 334 | */ |
|
| 335 | public function doDrop($confirm) |
|
| 336 | { |
|
| 337 | $data = $this->misc->getDatabaseAccessor(); |
|
| 338 | ||
| 339 | if ($confirm) { |
|
| 340 | $this->printTrail('type'); |
|
| 341 | $this->printTitle($this->lang['strdrop'], 'pg.type.drop'); |
|
| 342 | ||
| 343 | echo '<p>', sprintf($this->lang['strconfdroptype'], $this->misc->printVal($_REQUEST['type'])), '</p>'.PHP_EOL; |
|
| 344 | ||
| 345 | echo '<form action="'.\SUBFOLDER.'/src/views/types" method="post">'.PHP_EOL; |
|
| 346 | echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /> <label for=\"cascade\">{$this->lang['strcascade']}</label></p>".PHP_EOL; |
|
| 347 | echo '<p><input type="hidden" name="action" value="drop" />'.PHP_EOL; |
|
| 348 | echo '<input type="hidden" name="type" value="', htmlspecialchars($_REQUEST['type']), '" />'.PHP_EOL; |
|
| 349 | echo $this->misc->form; |
|
| 350 | echo "<input type=\"submit\" name=\"drop\" value=\"{$this->lang['strdrop']}\" />".PHP_EOL; |
|
| 351 | echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>".PHP_EOL; |
|
| 352 | echo '</form>'.PHP_EOL; |
|
| 353 | } else { |
|
| 354 | $status = $data->dropType($_POST['type'], isset($_POST['cascade'])); |
|
| 355 | if (0 == $status) { |
|
| 356 | $this->doDefault($this->lang['strtypedropped']); |
|
| 357 | } else { |
|
| 358 | $this->doDefault($this->lang['strtypedroppedbad']); |
|
| 359 | } |
|
| 360 | } |
|
| 361 | } |
|
| 362 | ||
| 363 | /** |
|
| 364 | * Displays a screen where they can enter a new composite type. |
|