Guest User

Untitled

a guest
Jul 3rd, 2020
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.26 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.1.0.0
  8. * @ Author : DeZender
  9. * @ Release on : 15.05.2020
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. function get_domain($url)
  15. {
  16. $pieces = parse_url($url);
  17. $domain = (isset($pieces['host']) ? $pieces['host'] : '');
  18.  
  19. if (preg_match('/(?P<domain>[a-z0-9][a-z0-9\\-]{1,63}\\.[a-z\\.]{2,6})$/i', $domain, $regs)) {
  20. return $regs['domain'];
  21. }
  22.  
  23. return false;
  24. }
  25.  
  26. function __gc()
  27. {
  28. $site = $_SERVER['SERVER_NAME'];
  29. $site = get_domain('http://' . $site);
  30. $key = 'safir.web.portal';
  31. $sfrLicenseCode = hash('sha1', $site . $key);
  32. $sfrLicenseCode = implode('-', str_split($sfrLicenseCode, 4));
  33. return $sfrLicenseCode;
  34. }
  35.  
  36. function add_nofollow_cat($text)
  37. {
  38. $text = str_replace('rel="category tag"', '', $text);
  39. return $text;
  40. }
  41.  
  42. function adminBarMenu()
  43. {
  44. global $wp_admin_bar;
  45. if (!is_super_admin() || !is_admin_bar_showing()) {
  46. return NULL;
  47. }
  48.  
  49. $wp_admin_bar->add_menu(['id' => 'safir_link', 'title' => __('Safir Panel - Tema Ayarları'), 'href' => __(get_bloginfo('url') . '/wp-admin/admin.php?page=safirpanel.php')]);
  50. }
  51.  
  52. function xoption($option)
  53. {
  54. $returnedValue = get_option('safir_' . SAFIR_THEME_SLUG . '_' . $option);
  55.  
  56. if (is_string($returnedValue)) {
  57. return stripslashes($returnedValue);
  58. }
  59. else {
  60. return $returnedValue;
  61. }
  62. }
  63.  
  64. function setxoption($option, $newvalue)
  65. {
  66. update_option('safir_' . SAFIR_THEME_SLUG . '_' . $option, $newvalue);
  67. }
  68.  
  69. function xoption2($option)
  70. {
  71. if ($x = get_option('sfr_' . $option)) {
  72. if (is_string($x)) {
  73. return stripslashes($x);
  74. }
  75. else {
  76. return $x;
  77. }
  78. }
  79. else {
  80. return false;
  81. }
  82. }
  83.  
  84. function safir_add_demo_importer()
  85. {
  86. add_theme_page('Safir Demo İçerik', 'Safir Demo İçerik', 'administrator', 'safir-demo-importer', 'safir_demo_importer_page');
  87. }
  88.  
  89. function safir_demo_importer_page()
  90. {
  91. global $safir_demo_importer_selfcheck;
  92. global $safir_demo_importer_success;
  93. echo '<div class="wrap">' . "\n\t" . '<h1>Safir Demo İçerik</h1>' . "\n\t";
  94.  
  95. if (empty($_POST['safir_importing'])) {
  96. echo '<p>Bu sayfada tek tuş ile demo içerik aktarımı yapabilirsiniz.<br /><br />' . "\n\t\t\t" . '<b>DİKKAT! Demo aktarım işlemi tüm yazı, sayfa ve ayarlarınızı siler!<br />' . "\n\t\t\t" . 'Bu işlemin sıfır bir wordpress kurulumu ile yapılması tavsiye edilir.</b></p>' . "\n\t\t\t" . '<p>&nbsp;</p>';
  97. echo "\t\t\t";
  98.  
  99. if (empty($safir_demo_importer_selfcheck)) {
  100. echo "\t\t\t\t" . '<p><input type="checkbox" name="safir-demo-import-accept" id="safir-demo-import-accept">' . "\n\t\t\t\t\t" . '<label for="safir-demo-import-accept">Yukarıdaki açıklamaları okudum ve tüm içeriklerimin silineceğini anladım.</label>' . "\n\t\t\t\t" . '</p>' . "\n\t\t\t\t" . '<form id="safir-demo-import-form" method="post">' . "\n\t\t\t\t\t" . '<input type="hidden" name="safir_importing" value="1" />' . "\n\t\t\t\t\t" . '<input type="submit" name="submit" id="safir-demo-import-submit" disabled class="button button-primary" value="Tüm Verileri Sil ve Demo İçerikleri Getir!" />' . "\n\t\t\t\t" . '</form>' . "\n\t\t\t\t" . '<div class="submitUyari" style="display:none; margin: 20px 0; font-size: 16px;">Bu işlem, sunucunuzun hızına göre birkaç dakika sürebilmektedir, lütfen sayfayı kapatmayın.</div>' . "\n\t\t\t\t";
  101. }
  102.  
  103. echo "\t\t\t" . '<script>' . "\n\t\t\t" . 'jQuery(function($) {' . "\n\t\t\t\t" . '$(\'#safir-demo-import-accept\').change(function() {' . "\n\t\t\t\t\t" . '$(\'#safir-demo-import-submit\').attr(\'disabled\', $(\'#safir-demo-import-accept:checked\').length == 0);' . "\n\t\t\t\t" . '});' . "\n\t\t\t\t" . '$("#safir-demo-import-form").submit(function() {' . "\n\t\t\t\t\t" . '$(\'#safir-demo-import-submit, #safir-demo-import-accept\').attr(\'disabled\', \'disabled\');' . "\n\t\t\t\t\t" . '$(".submitUyari").fadeIn();' . "\n\t\t\t\t" . '});' . "\n\t\t\t" . '});' . "\n\t\t\t" . '</script>' . "\n\t\t\t";
  104. }
  105. else if (!empty($safir_demo_importer_success)) {
  106. if (function_exists('safir_delete_cache')) {
  107. safir_delete_cache();
  108. }
  109.  
  110. flush_rewrite_rules();
  111. ..........................................................................
  112. ..................................................
  113. ..................
Add Comment
Please, Sign In to add comment