Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.00 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP7 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 4.0.8.9
  8. * @ Author : DeZender
  9. * @ Release on : 10.05.2019
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. if (!defined('WHMCS')) {
  15. exit('This file cannot be accessed directly');
  16. }
  17.  
  18. $output = "\r\n" . '<div class="appprovision-pkg-container" style="font-weight:bold;font-size:14px;">New WordPress Package Settings</div><br>' . "\r\n" . '<script type="text/javascript">' . "\r\n" . 'function submitproductform() {' . "\r\n" . ' var message = "";' . "\r\n" . ' if (document.getElementById("product_id").value == 0) {' . "\r\n" . ' message = message + "You must select a product.\\n";' . "\r\n" . ' }' . "\r\n\t" . 'if (document.getElementById("createsubdomain").checked == true) {' . "\r\n\t\t" . 'if (document.getElementById("installfolder").value == "") {' . "\r\n\t\t" . ' message = message + "You must enter an installation folder value in order to create a sub-domain.\\n";' . "\r\n\t\t" . '}' . "\r\n\t" . '}' . "\r\n" . ' if (document.getElementById("defaultblogname").value == "") {' . "\r\n" . ' message = message + "You must enter a default blog title.\\n";' . "\r\n" . ' }' . "\r\n" . ' if (document.getElementById("defaultblogdesc").value == "") {' . "\r\n" . ' message = message + "You must enter a default blog description.\\n";' . "\r\n" . ' }' . "\r\n" . ' if (document.getElementById("ftpport").value == "" || isNaN(document.getElementById("ftpport").value)) {' . "\r\n" . ' message = message + "You must enter a valid FTP port number.\\n";' . "\r\n" . ' }' . "\r\n" . ' if (document.getElementById("welcomeemail").checked == true) {' . "\r\n" . ' if (document.getElementById("emailtemplate").value == "") {' . "\r\n" . ' message = message + "You must specify an e-mail template to send welcome e-mails.\\n";' . "\r\n" . ' }' . "\r\n" . ' }' . "\r\n" . ' if (document.getElementById("customfile1").value != "") {' . "\r\n" . ' if (document.getElementById("customfile1path").value == "") {' . "\r\n" . ' message = message + "You must specify a file name for Custom File #1.\\n";' . "\r\n" . ' }' . "\r\n" . ' }' . "\r\n" . ' if (document.getElementById("customfile2").value != "") {' . "\r\n" . ' if (document.getElementById("customfile2path").value == "") {' . "\r\n" . ' message = message + "You must specify a file name for Custom File #2.\\n";' . "\r\n" . ' }' . "\r\n" . ' }' . "\r\n" . ' if (document.getElementById("customfile3").value != "") {' . "\r\n" . ' if (document.getElementById("customfile3path").value == "") {' . "\r\n" . ' message = message + "You must specify a file name for Custom File #3.\\n";' . "\r\n" . ' }' . "\r\n" . ' }' . "\r\n" . ' if (message != "") {' . "\r\n" . ' alert(message);' . "\r\n" . ' return false;' . "\r\n" . ' }' . "\r\n\r\n" . ' //Mod Security Base_64 Conversions' . "\r\n" . ' var encodeString = "";' . "\r\n" . ' encodeString = btoa(encodeURIComponent(document.getElementById("htaccess").value));' . "\r\n" . ' document.getElementById("htaccess").value = encodeString;' . "\r\n" . ' encodeString = btoa(encodeURIComponent(document.getElementById("regexval").value));' . "\r\n" . ' document.getElementById("regexval").value = encodeString;' . "\r\n" . ' encodeString = btoa(encodeURIComponent(document.getElementById("wpconfig").value));' . "\r\n" . ' document.getElementById("wpconfig").value = encodeString;' . "\r\n" . ' encodeString = btoa(encodeURIComponent(document.getElementById("customfile1").value));' . "\r\n" . ' document.getElementById("customfile1").value = encodeString;' . "\r\n" . ' encodeString = btoa(encodeURIComponent(document.getElementById("customfile2").value));' . "\r\n" . ' document.getElementById("customfile2").value = encodeString;' . "\r\n" . ' encodeString = btoa(encodeURIComponent(document.getElementById("customfile3").value));' . "\r\n" . ' document.getElementById("customfile3").value = encodeString;' . "\r\n" . '}' . "\r\n" . 'function backToList() {' . "\r\n" . ' location.href = "addonmodules.php?module=ibg_app_installer_wp";' . "\r\n" . '}' . "\r\n" . 'function disableFields(addon = false) {' . "\r\n" . ' document.getElementById("htaccess").style.display="none";' . "\r\n" . ' document.getElementById("regexval").style.display="none";' . "\r\n" . ' document.getElementById("wpconfig").style.display="none";' . "\r\n" . ' document.getElementById("customfile1").style.display="none";' . "\r\n" . ' document.getElementById("customfile2").style.display="none";' . "\r\n" . ' document.getElementById("customfile3").style.display="none";' . "\r\n\t" . 'if (document.getElementById("welcomeemail").checked == true) {' . "\r\n\t" . ' document.getElementById("emailtemplate").disabled = false;' . "\r\n\t" . '} else {' . "\r\n" . ' document.getElementById("emailtemplate").disabled = true;' . "\r\n" . ' document.getElementById("emailtemplate").value = "";' . "\r\n\t" . '}' . "\r\n" . '}' . "\r\n" . 'function openTab(evt, tabName) {' . "\r\n" . ' var i, x, tablinks;' . "\r\n" . ' x = document.getElementsByClassName("pkgtab");' . "\r\n" . ' for (i = 0; i < x.length; i++) {' . "\r\n" . ' x[i].style.display = "none";' . "\r\n" . ' }' . "\r\n" . ' tablinks = document.getElementsByClassName("tablink");' . "\r\n" . ' for (i = 0; i < x.length; i++) {' . "\r\n" . ' tablinks[i].className = tablinks[i].className.replace(" appprovision-navbar-gray", "");' . "\r\n" . ' }' . "\r\n" . ' document.getElementById(tabName).style.display = "block";' . "\r\n" . ' evt.currentTarget.className += " appprovision-navbar-gray";' . "\r\n" . '}';
  19. $wpconfigpart1 = '&lt;?php<br>';
  20. $wpconfigpart1 .= '/**<br>';
  21. $wpconfigpart1 .= ' * The base configurations of the WordPress.<br>';
  22. $wpconfigpart1 .= ' *<br>';
  23. $wpconfigpart1 .= ' * This file has the following configurations: MySQL settings, Table Prefix,<br>';
  24. $wpconfigpart1 .= ' * Secret Keys, WordPress Language, and ABSPATH. You can find more information<br>';
  25. $wpconfigpart1 .= ' * by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing<br>';
  26. $wpconfigpart1 .= ' * wp-config.php} Codex page. You can get the MySQL settings from your web host.<br>';
  27. $wpconfigpart1 .= ' *<br>';
  28. $wpconfigpart1 .= ' * @package WordPress<br>';
  29. $wpconfigpart1 .= ' */<br>';
  30. $wpconfigpart1 .= '<br>';
  31. $wpconfigpart1 .= '// ** MySQL settings - You can get this info from your web host ** //<br>';
  32. $wpconfigpart1 .= '/** The name of the database for WordPress */<br>';
  33. $wpconfigpart1 .= 'define(\'DB_NAME\', \'[database_name]\');<br>';
  34. $wpconfigpart1 .= '<br>';
  35. $wpconfigpart1 .= '/** MySQL database username */<br>';
  36. $wpconfigpart1 .= 'define(\'DB_USER\', \'[database_user]\');<br>';
  37. $wpconfigpart1 .= '<br>';
  38. $wpconfigpart1 .= '/** MySQL database password */<br>';
  39. $wpconfigpart1 .= 'define(\'DB_PASSWORD\', \'[database_password]\');<br>';
  40. $wpconfigpart1 .= '<br>';
  41. $wpconfigpart1 .= '/** MySQL hostname */<br>';
  42. $wpconfigpart1 .= 'define(\'DB_HOST\', \'localhost\');<br>';
  43. $wpconfigpart1 .= '<br>';
  44. $wpconfigpart1 .= '/**#@+<br>';
  45. $wpconfigpart1 .= ' * Authentication Unique Keys and Salts.<br>';
  46. $wpconfigpart1 .= ' *<br>';
  47. $wpconfigpart1 .= ' * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}<br>';
  48. $wpconfigpart1 .= ' * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.<br>';
  49. $wpconfigpart1 .= ' *<br>';
  50. $wpconfigpart1 .= ' * @since 2.6.0<br>';
  51. $wpconfigpart1 .= ' */<br>';
  52. $wpconfigpart1 .= '<br>';
  53. $wpconfigpart1 .= 'define(\'SECURE_AUTH_KEY\',&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\'%F|_6-]=Y4TJ05`7&}X<<-4>^Z:`tCW04T$:,R|4x.r$]+(8fQSJsrILQW?!B-4E\');<br>';
  54. $wpconfigpart1 .= 'define(\'LOGGED_IN_KEY\',&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\'2xupe!X>4vXa ^*.B)@_W`q(cj#Hdma+A]%M|4[lQ^a_i/h%x|$]@Xx/vZ+oSw-,\');<br>';
  55. $wpconfigpart1 .= 'define(\'NONCE_KEY\',&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\'g!ZB;Ys]+Vq e Y;jM[q*Z6u}>V[ fVNHzP0e=a>}WU[Kk<:cd4T-Po@;K~||CH&\');<br>';
  56. $wpconfigpart1 .= 'define(\'AUTH_SALT\',&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\'^IlPxg@muTHal2??VoJGf-H3|60Ix}[C>B_}+nH-7[Ei|=-`|vy8gQlYuqw6Y;38\');<br>';
  57. $wpconfigpart1 .= 'define(\'SECURE_AUTH_SALT\',&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\';|KYWV~#|pCz6^!q+Lf{3Q:|b-7!MS-U`cr$m:2Ir49Z%B4U,GqrD7,-cx(-[Az+\');<br>';
  58. $wpconfigpart1 .= 'define(\'LOGGED_IN_SALT\',&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\'U[:OSi=4F r#3;NKa|k<`xJY?IBN;YZ~~AUmkqlZ=:ZN;;ea W5|QhUX8KU^`N)-\');<br>';
  59. $wpconfigpart1 .= 'define(\'NONCE_SALT\',&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\'W>5P?FXR)5b-rw$n7*&,B6B[00]KL-N=>y)^gR?, =ws_ xEc0[%xT[-yRq8I4eS\');<br>';
  60. $wpconfigpart1 .= '<br>';
  61. $wpconfigpart1 .= '/**#@-*/<br>';
  62. $wpconfigpart1 .= '<br>';
  63. $wpconfigpart1 .= '/**<br>';
  64. $wpconfigpart1 .= ' * WordPress Database Table prefix.<br>';
  65. $wpconfigpart1 .= ' *<br>';
  66. $wpconfigpart1 .= ' */<br>';
  67. $wpconfigpart1 .= '\\$table_prefix = \'xwp_\';<br>';
  68. $wpconfigpart1 .= '<br>';
  69. $wpconfigpart1 .= '/* User defined variables. */<br>';
  70. $wpconfigpart1 .= '<br>';
  71. $wpconfigpart2 = '<br><br>';
  72. $wpconfigpart2 .= ' /* For developers: WordPress debugging mode.<br>';
  73. $wpconfigpart2 .= ' *<br>';
  74. $wpconfigpart2 .= ' * Change this to true to enable the display of notices during development.<br>';
  75. $wpconfigpart2 .= ' * It is strongly recommended that plugin and theme developers use WP_DEBUG<br>';
  76. $wpconfigpart2 .= ' * in their development environments.<br>';
  77. $wpconfigpart2 .= ' */<br>';
  78. $wpconfigpart2 .= 'define(\'WP_DEBUG\', false);<br>';
  79. $wpconfigpart2 .= '<br>';
  80. $wpconfigpart2 .= '/* That\'s all, stop editing! Happy blogging. */<br>';
  81. $wpconfigpart2 .= '<br>';
  82. $wpconfigpart2 .= '/** Absolute path to the WordPress directory. */<br>';
  83. $wpconfigpart2 .= 'if ( !defined(\'ABSPATH\') )<br>';
  84. $wpconfigpart2 .= "\t" . 'define(\'ABSPATH\', dirname(__FILE__) . \'/\');<br>';
  85. $wpconfigpart2 .= '<br>';
  86. $wpconfigpart2 .= '/** Sets up WordPress vars and included files. */<br>';
  87. $wpconfigpart2 .= 'require_once(ABSPATH . \'wp-settings.php\');';
  88. $output .= "\r\n" . 'function updateWpconfigSample() {' . "\r\n" . ' var wpconfigpart1 = "' . $wpconfigpart1 . '";' . "\r\n" . ' var wpconfigpart2 = "' . $wpconfigpart2 . '";' . "\r\n" . ' var wpconfigcustom = document.getElementById("wpconfig").value;' . "\r\n" . ' document.getElementById("wpconfig-sample").innerHTML = wpconfigpart1 + "<span style=\'font-weight:bold;color:yellow;\'>" + wpconfigcustom.replace(/(?:\\r\\n|\\r|\\n)/g, "<br>") + "</span>" + wpconfigpart2;' . "\r\n" . '}' . "\r\n" . '</script>' . "\r\n\r\n" . '<form name="productform" id="productform" method="post" action="addonmodules.php?module=ibg_app_installer_wp&action=new&' . rand() . '" onsubmit="return submitproductform();">' . "\r\n" . ' <div class="appprovision-pkg-container">Select an Associated WHMCS Product or Product Addon: ';
  89. $listcnt = 0;
  90. $list = '';
  91.  
  92. if ($result = $appprovisioning->getWHMCSDBLink()->query('SELECT * FROM (SELECT tblproducts.id AS product_id, 1 AS product_type, tblproducts.name AS name,tblproductgroups.name AS groupname FROM tblproducts INNER JOIN tblproductgroups ON tblproductgroups.id=tblproducts.gid UNION SELECT tbladdons.id AS product_id, 2 AS product_type, tbladdons.name AS name, \'Product Addon\' AS groupname FROM tbladdons) AS U WHERE CONCAT(U.product_id, \'-\', U.product_type) NOT IN (SELECT product_id FROM mod_ibg_app_installer_wp) ORDER BY U.product_type, U.name')) {
  93. while ($obj = $result->fetch_object()) {
  94. $list .= '<option value="' . $obj->product_id . '-' . $obj->product_type . '">' . $obj->groupname . ' - ' . $obj->name . '</option>';
  95. $listcnt++;
  96. }
  97.  
  98. $result->close();
  99. }
  100.  
  101. if (0 < $listcnt) {
  102. $output .= '<select name="product_id" id="product_id"><option value=""></option>' . $list . '</select>';
  103. }
  104. else {
  105. $output .= '&nbsp;<strong>There are no associated products to display.</strong>';
  106. }
  107.  
  108. $output .= "\r\n\t" . '</div><br>';
  109.  
  110. if (0 < $listcnt) {
  111. $output .= "\r\n\t\t" . '<script type="text/javascript">' . "\r\n\t\t" . '$(function () {' . "\r\n\t\t" . ' var $product = $(\'select[name=product_id]\');' . "\r\n\t\t" . ' var $fields = $(\'select[name=customfolder]\');' . "\r\n\t\t" . ' var $fieldList = $fields.find(\'option\').clone();' . "\r\n\t\t" . ' var productfieldlist = {' . "\r\n\t\t" . ' ';
  112. $listcnt1 = 0;
  113. $list1 = '';
  114. $listcnt2 = 0;
  115. $list2 = '';
  116.  
  117. if ($result1 = $appprovisioning->getWHMCSDBLink()->query('SELECT tblcustomfields.fieldname FROM tblcustomfields WHERE tblcustomfields.type = \'product\' AND (tblcustomfields.fieldtype = \'text\' OR tblcustomfields.fieldtype = \'dropdown\') GROUP BY tblcustomfields.fieldname ORDER BY tblcustomfields.fieldname')) {
  118. while ($obj1 = $result1->fetch_object()) {
  119. $list2 .= '"' . $obj1->fieldname . '",';
  120. ..............................................................................
  121. ...............................................
  122. ......................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement