tab.client.php 711 B

12345678910111213141516171819202122232425
  1. <?php
  2. global $_,$myUser;
  3. User::check_access('client','read');
  4. Plugin::need('client/Client');
  5. require_once(__DIR__.SLASH.'Element.class.php');
  6. $client = Client::getById($_['id']);
  7. $relativeDirectory = 'clients'.SLASH.$client->slug;
  8. $clientDirectory = Element::root().$relativeDirectory;
  9. if(!file_exists($clientDirectory)) mkdir($clientDirectory,0755,true);
  10. $element = Element::fromPath($clientDirectory);
  11. $element->author = $myUser->login;
  12. $element->save();
  13. ?>
  14. <div class="p-2">
  15. <div style="background-color: #ffffff;" data-type="library"
  16. data-root-label="C:"
  17. data-root="<?php echo $relativeDirectory;?>"
  18. data-tree-panel="false"
  19. data-search-panel="true"
  20. data-detail-panel="true"
  21. ></div>
  22. </div>