control.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /**
  3. * The control file of watermark module of XXB.
  4. *
  5. * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd., www.zentao.net)
  6. * @license ZOSL (https://zpl.pub/page/zoslv1.html)
  7. */
  8. ?>
  9. <?php
  10. class watermark extends control
  11. {
  12. /**
  13. * @var watermarkModel;
  14. */
  15. public $watermark;
  16. /**
  17. * index html.
  18. *
  19. * @param string $type
  20. * @access public
  21. * @return void
  22. */
  23. public function index($type = '')
  24. {
  25. if($_POST)
  26. {
  27. $this->watermark->setConfig();
  28. $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('index')));
  29. }
  30. $watermarkConfig = $this->watermark->getConfig();
  31. $this->view->title = $this->lang->watermark->common;
  32. $this->view->type = $type;
  33. $this->view->enabled = isset($watermarkConfig->enabled) ? $watermarkConfig->enabled : 0;
  34. $this->view->content = isset($watermarkConfig->content) ? $watermarkConfig->content : '';
  35. $this->view->displayName = $this->app->user->realname;
  36. $this->view->account = $this->app->user->account;
  37. $this->view->phone = $this->app->user->phone;
  38. $this->view->email = $this->app->user->email;
  39. $this->display();
  40. }
  41. }