Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- add_hook('ShoppingCartConfigureProductAddonsOutput', 1, function($vars) {
- add_hook('ClientAreaFooterOutput', 1, function($vars) {
- return "
- <script>
- jQuery(document).ready(function() {
- jQuery.each([ 'inputRootpw', 'inputNs1prefix', 'inputNs2prefix' ], function(index, value) {
- jQuery('#' + value).parent().hide();
- });
- });
- </script>
- ";
- });
- });
- add_hook('ClientAreaPageCart', 1, function($vars) {
- if ($_GET['a'] === 'confproduct' AND (!empty($_GET['i']) || $_GET['i'] === '0')) {
- $chars = 'abcdefghijklmnopqrstuvwxyz0123456789';
- $count = mb_strlen($chars);
- for ($i = 0, $result = ''; $i < 14; $i++) {
- $index = rand(0, $count - 1);
- $rootpw .= mb_substr($chars, $index, 1);
- }
- return array ('server' => array ('rootpw' => $rootpw, 'ns1prefix' => 'ns1', 'ns2prefix' => 'ns2'));
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement