Advertisement
Guest User

Untitled

a guest
Aug 5th, 2021
1,033
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. <?php
  2.  
  3. add_hook('ShoppingCartConfigureProductAddonsOutput', 1, function($vars) {
  4. add_hook('ClientAreaFooterOutput', 1, function($vars) {
  5. return "
  6. <script>
  7. jQuery(document).ready(function() {
  8. jQuery.each([ 'inputRootpw', 'inputNs1prefix', 'inputNs2prefix' ], function(index, value) {
  9. jQuery('#' + value).parent().hide();
  10. });
  11. });
  12. </script>
  13. ";
  14. });
  15. });
  16.  
  17.  
  18. add_hook('ClientAreaPageCart', 1, function($vars) {
  19. if ($_GET['a'] === 'confproduct' AND (!empty($_GET['i']) || $_GET['i'] === '0')) {
  20. $chars = 'abcdefghijklmnopqrstuvwxyz0123456789';
  21. $count = mb_strlen($chars);
  22.  
  23. for ($i = 0, $result = ''; $i < 14; $i++) {
  24. $index = rand(0, $count - 1);
  25. $rootpw .= mb_substr($chars, $index, 1);
  26. }
  27.  
  28. return array ('server' => array ('rootpw' => $rootpw, 'ns1prefix' => 'ns1', 'ns2prefix' => 'ns2'));
  29. }
  30. });
  31.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement