install 552 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. global $myUser;
  3. require_once(dirname(__FILE__).'/DoorAccess.class.php');
  4. require_once(dirname(__FILE__).'/DoorLog.class.php');
  5. $entity = new DoorLog();
  6. $entity->create();
  7. $entity = new DoorAccess();
  8. $entity->create();
  9. $s1 = New Section();
  10. $s1->setLabel('door');
  11. $s1->save();
  12. $r1 = New Right();
  13. $r1->setSection($s1->getId());
  14. $r1->setRead('1');
  15. $r1->setDelete('1');
  16. $r1->setCreate('1');
  17. $r1->setUpdate('1');
  18. $r1->setRank('1');
  19. $r1->save();
  20. $entity->user = $myUser->getId();
  21. $entity->code = str_pad(rand(0,1000),4, "0");
  22. $entity->save();
  23. ?>