| @@ 700-715 (lines=16) @@ | ||
| 697 | ); |
|
| 698 | ||
| 699 | echo sprintf('</form>%s', PHP_EOL); |
|
| 700 | } else { |
|
| 701 | if ('' == trim($_POST['definition'])) { |
|
| 702 | $this->addCheck(true, $this->lang['strcheckneedsdefinition']); |
|
| 703 | } else { |
|
| 704 | $status = $data->addCheckConstraint( |
|
| 705 | $_POST['table'], |
|
| 706 | $_POST['definition'], |
|
| 707 | $_POST['name'] |
|
| 708 | ); |
|
| 709 | if (0 == $status) { |
|
| 710 | return $this->doDefault($this->lang['strcheckadded']); |
|
| 711 | } |
|
| 712 | ||
| 713 | return $this->addCheck(true, $this->lang['strcheckaddedbad']); |
|
| 714 | } |
|
| 715 | } |
|
| 716 | } |
|
| 717 | ||
| 718 | /** |
|
| @@ 355-370 (lines=16) @@ | ||
| 352 | echo "<input type=\"submit\" name=\"add\" value=\"{$this->lang['stradd']}\" />".PHP_EOL; |
|
| 353 | echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>".PHP_EOL; |
|
| 354 | echo '</form>'.PHP_EOL; |
|
| 355 | } else { |
|
| 356 | if ('' == trim($_POST['definition'])) { |
|
| 357 | $this->addCheck(true, $this->lang['strcheckneedsdefinition']); |
|
| 358 | } else { |
|
| 359 | $status = $data->addDomainCheckConstraint( |
|
| 360 | $_POST['domain'], |
|
| 361 | $_POST['definition'], |
|
| 362 | $_POST['name'] |
|
| 363 | ); |
|
| 364 | if (0 == $status) { |
|
| 365 | $this->doProperties($this->lang['strcheckadded']); |
|
| 366 | } else { |
|
| 367 | $this->addCheck(true, $this->lang['strcheckaddedbad']); |
|
| 368 | } |
|
| 369 | } |
|
| 370 | } |
|
| 371 | } |
|
| 372 | ||
| 373 | /** |
|