| 548 | |
| 549 | {{{ |
| 550 | class MyDialog extends DialogForm { |
| 551 | |
| 552 | public function create() { |
| 553 | $this->file = new SimpleUploader($this->name.'file'); |
| 554 | $this->file->left = '10px'; |
| 555 | $this->file->top = '10px'; |
| 556 | $this->file->width = '300px'; |
| 557 | $this->file->height = '20px'; |
| 558 | |
| 559 | $this->add($this->file, 'file'); |
| 560 | } |
| 561 | |
| 562 | public function save() { |
| 563 | $data = $this->getData(); |
| 564 | |
| 565 | if (file_exists($data['file'])) { |
| 566 | $fileContent = file_get_content($data['file']); |
| 567 | } |
| 568 | } |
| 569 | } |
| 570 | }}} |
| 571 | |
| 572 | Zaawansowane uzycie: |