RoleAction.class.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. *
  4. * Role(会员组管理)
  5. *
  6. */
  7. if(!defined("Ainaphp")) exit("Access Denied");
  8. class RoleAction extends AdminbaseAction {
  9. protected $dao;
  10. function _initialize()
  11. {
  12. parent::_initialize();
  13. }
  14. public function _before_insert()
  15. {
  16. $_POST['allowpost'] = $_POST['allowpost'] ? 1 : 0 ;
  17. $_POST['allowpostverify'] = $_POST['allowpostverify'] ? 1 : 0 ;
  18. $_POST['allowupgrade'] = $_POST['allowupgrade'] ? 1 : 0 ;
  19. $_POST['allowsendmessage'] = $_POST['allowsendmessage'] ? 1 : 0 ;
  20. $_POST['allowattachment'] = $_POST['allowattachment'] ? 1 : 0 ;
  21. $_POST['allowsearch'] = $_POST['allowsearch'] ? 1 : 0 ;
  22. }
  23. public function _before_update()
  24. {
  25. $_POST['allowpost'] = $_POST['allowpost'] ? 1 : 0 ;
  26. $_POST['allowpostverify'] = $_POST['allowpostverify'] ? 1 : 0 ;
  27. $_POST['allowupgrade'] = $_POST['allowupgrade'] ? 1 : 0 ;
  28. $_POST['allowsendmessage'] = $_POST['allowsendmessage'] ? 1 : 0 ;
  29. $_POST['allowattachment'] = $_POST['allowattachment'] ? 1 : 0 ;
  30. $_POST['allowsearch'] = $_POST['allowsearch'] ? 1 : 0 ;
  31. }
  32. }
  33. ?>