Advertisement
Guest User

Untitled

a guest
Feb 7th, 2020
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.69 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.9.0
  8. * @ Author : DeZender
  9. * @ Release on : 08.08.2019
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. function lisans()
  15. {
  16. include 'lisans.php';
  17. $domain = $_SERVER['HTTP_HOST'];
  18. $domain = str_replace('www.', '', $domain);
  19. $random = '6UnxrU!_sBQQeAej';
  20. $h = '' . $random . '_' . $domain . '';
  21. $hash = md5($h);
  22.  
  23. if ($hash == $lisans) {
  24. }
  25. else if ($hash == $lisans2) {
  26. }
  27. else if ($hash == $lisans3) {
  28. }
  29. else if ($hash == $lisans4) {
  30. }
  31. else if ($hash == $lisans5) {
  32. }
  33. else {
  34. echo 'Bu Tema Lisanssızdır. Lisansını almak için [email protected] mail adresinden iletişime geçebilirsiniz.';
  35. exit();
  36. }
  37. }
  38.  
  39. function birtema_aktivasyon()
  40. {
  41. require_once ABSPATH . 'wp-admin/includes/upgrade.php';
  42. $sql = 'CREATE TABLE `bt_contact` (' . "\n" . ' `contact_id` int(11) NOT NULL,' . "\n" . ' `name` varchar(255) NOT NULL,' . "\n" . ' `email` varchar(255) NOT NULL,' . "\n" . ' `subject` varchar(255) NOT NULL,' . "\n" . ' `message` longtext NOT NULL,' . "\n" . ' `time` int(11) NOT NULL,' . "\n" . ' `status` int(11) NOT NULL' . "\n" . ') ENGINE=MyISAM DEFAULT CHARSET=utf8;';
  43. dbDelta($sql);
  44. dbDelta('ALTER TABLE `bt_contact` ADD PRIMARY KEY (`contact_id`);');
  45. dbDelta('ALTER TABLE `bt_contact` MODIFY `contact_id` int(11);');
  46. $sql2 = 'CREATE TABLE `bt_live_chat` (' . "\n" . ' `id` int(11) NOT NULL,' . "\n" . ' `page_id` int(11) NOT NULL,' . "\n" . ' `name` varchar(255) NOT NULL,' . "\n" . ' `text` mediumtext NOT NULL,' . "\n" . ' `status` int(11) NOT NULL,' . "\n" . ' `time` int(11) NOT NULL' . "\n" . ' ) ENGINE=MyISAM DEFAULT CHARSET=utf8;' . "\n" . ' ALTER TABLE `bt_live_chat`' . "\n" . ' ADD PRIMARY KEY (`id`);' . "\n" . ' ALTER TABLE `bt_live_chat`' . "\n" . ' MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;' . "\n" . ' COMMIT;';
  47. dbDelta($sql2);
  48. }
  49.  
  50. function bf_ust_menu_register()
  51. {
  52. register_nav_menus(['bfUstMenu' => __('Üst Menu', 'theme_prefix')]);
  53. register_nav_menus(['bfFooter1' => __('Footer Menü 1', 'theme_prefix'), 'bfFooter2' => __('Footer Menü 2', 'theme_prefix'), 'bfFooter3' => __('Footer Menü 3', 'theme_prefix'), 'bfFooter4' => __('Footer Menü 4', 'theme_prefix'), 'bfFooter5' => __('Footer Menü 5', 'theme_prefix'), 'bfFooter6' => __('Footer Menü 6', 'theme_prefix'), 'bfFooter7' => __('Footer Menü 7', 'theme_prefix')]);
  54. }
  55.  
  56. function bf_recent_post($limit)
  57. {
  58. $args = ['numberposts' => $limit, 'offset' => 0, 'orderby' => 'post_date', 'order' => 'DESC', 'include' => '', 'exclude' => '', 'meta_key' => '', 'meta_value' => '', 'post_type' => 'post', 'post_status' => 'publish', 'suppress_filters' => true];
  59. $recent_posts = wp_get_recent_posts($args, ARRAY_A);
  60. return $recent_posts;
  61. }
  62.  
  63. function getPostViews($postID)
  64. {
  65. $count_key = 'post_views_count';
  66. $count = get_post_meta($postID, $count_key, true);
  67.  
  68. if ($count == '') {
  69. delete_post_meta($postID, $count_key);
  70. add_post_meta($postID, $count_key, '0');
  71. return '0 View';
  72. }
  73.  
  74. return $count . ' Views';
  75. }
  76.  
  77. function setPostViews($postID)
  78. {
  79. $count_key = 'post_views_count';
  80. $count = get_post_meta($postID, $count_key, true);
  81.  
  82. if ($count == '') {
  83. $count = 0;
  84. delete_post_meta($postID, $count_key);
  85. add_post_meta($postID, $count_key, '0');
  86. }
  87. else {
  88. $count++;
  89. update_post_meta($postID, $count_key, $count);
  90. }
  91. }
  92.  
  93. function sunset_load_moreNews()
  94. {
  95. $paged = $_POST['page'] + 1;
  96. $prev = $_POST['prev'];
  97. $catID = $_POST['cat'];
  98. $count = $_POST['count'];
  99.  
  100. if ($count) {
  101. $count = $_POST['count'];
  102. }
  103. else {
  104. $count = 10;
  105. }
  106. if (($prev == 1) && ($_POST['page'] != 1)) {
  107. $paged = $_POST['page'] - 1;
  108. }
  109.  
  110. $query = new WP_Query(['post_status' => 'publish', 'paged' => $paged, 'category__in' => $catID, 'posts_per_page' => $count, 'ignore_sticky_posts' => '-1', 'order' => 'desc']);
  111.  
  112. if ($query->have_posts()) {
  113. while ($query->have_posts()) {
  114. $query->the_post();
  115. $current_id = get_the_ID();
  116. $category_ids = kategori_listele($current_id);
  117. echo '<div class="item" data-page="/page/' . $paged . '">';
  118. echo ' <div class="thumb"><a href="';
  119. the_permalink();
  120. echo '">';
  121. the_post_thumbnail('icerik_image', ['alt' => get_the_title()]);
  122. echo '</a></div>' . "\n" . ' ' . "\t\t\t\t\t\t\t\t" . '<div class="content-summary">' . "\n" . ' ' . "\t\t\t\t\t\t\t\t\t" . '<div class="title"><a href="';
  123. the_permalink();
  124. echo '">';
  125. the_title();
  126. echo '</a></div>' . "\n" . ' ' . "\t\t\t\t\t\t\t\t\t" . '<div class="summary">';
  127. echo get_snippet(get_the_content(), 30);
  128. echo '</div>' . "\n" . ' ' . "\t\t\t\t\t\t\t\t\t" . '<div class="categories">' . "\n" . ' <a href="';
  129. echo get_category_link($category_ids[1]);
  130. echo '">';
  131. echo get_cat_name($category_ids[1]);
  132. echo '</a>' . "\n" . ' ' . "\t\t\t\t\t\t\t\t\t\t";
  133.  
  134. if (@$category_ids[0]) {
  135. echo ' ' . "\t\t\t\t\t\t\t\t\t\t" . '<a href="';
  136. echo get_category_link($category_ids[0]);
  137. echo '">';
  138. echo get_cat_name($category_ids[0]);
  139. echo '</a>' . "\n" . ' ' . "\t\t\t\t\t\t\t\t\t\t";
  140. }
  141.  
  142. echo ' ' . "\t\t\t\t\t\t\t\t\t" . '</div>' . "\n" . ' ' . "\t\t\t\t\t\t\t\t" . '</div>' . "\n\t\t\t\t\t\t\t\t\t" . '</div>' . "\n\n\t";
  143. }
  144. }
  145. else {
  146. echo 0;
  147. }
  148.  
  149. wp_reset_postdata();
  150. exit();
  151. }
  152.  
  153. function sunset_check_pagedNews($num = NULL)
  154. {
  155. $output = '';
  156.  
  157. if (is_paged()) {
  158. $output = 'page/' . get_query_var('paged');
  159. .................................................................................
  160. ...........................................
  161. ............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement