HEX
Server: LiteSpeed
System: Linux Angkanet 5.15.0-94-generic #104-Ubuntu SMP Tue Jan 9 15:25:40 UTC 2024 x86_64
User: webpa4002 (1011)
PHP: 8.2.15
Disabled: NONE
Upload Files
File: /home/web.paitoan.com/public_html/data/paito_harian.php
<?php
add_shortcode( 'paito_harian', 'paito_harian' );
function paito_harian($atts){
    
    global $wpdb;
    include_once('fungsi.php');
    $atts = shortcode_atts(array('pasaran' => 'sydney'),$atts);
    ob_start();
    $npas=$linke=$urlke=$ppas=$pide=$thne=$marku='';
    $i = 0;
    $ase=$cope=$kple=$ekre =$hariini='';
    $resu=$harinya=array();
    $cok = array("chinapools","hongkong","japan","magnum cambodia","singapore","sydney","taiwan","sydney lotto","hongkong lotto");
    $pid= $atts['pasaran'];
    $hari = isset($_POST['hari']) ? $_POST['hari'] : '';
    $col = isset($_POST['col']) ? $_POST['col'] : 60;
    $url = 'https://jspaito.com/json?ljenis=lengkap&market='.$pid.'&limit='.$col.'&hari='.$hari;
$paitok = json_decode(resourceWeb($url), true);
     if (!$paitok) exit();
$cresult = count($paitok);
    $paito = $paitok[$cresult-1];
$paitoe = $paito['result'];    
	$hariini = $paito['date'];
	$marku = $paito['market'];
 $ase = substr($paitoe, 0, 1);
           $cope = substr($paitoe, 1, 1);
           $kple = substr($paitoe, 2, 1);
           $ekre = substr($paitoe, 3, 1);
?>
<?php echo '<h3 class="text-center mb-1">Result '.ucwords(markete($pid)).' '.wp_date('l, j M Y', strtotime($hariini)).'</h3><div class="text-center mb-2"><div class="bola DarkOrange">'.$ase.'</div><div class="bola DarkOrange">'.$cope.'</div><div class="bola DarkOrange">'.$kple.'</div><div class="bola DarkOrange">'.$ekre.'</div></div>'; ?>

<form method="POST" action="">
    <div class="row">
        <div class="col-12">
            <div class="row">
                <div class="col-md-3 mb-1"><select name="col" class="form-control form-control-sm" onchange="this.form.submit()">
                   <option <?php if($col == 10) {echo 'selected';}?> value="10">10 Kolom</option>
                   <option <?php if($col == 20) {echo 'selected';}?> value="20">20 Kolom</option>
                   <option <?php if($col == 30) {echo 'selected';}?> value="30">30 Kolom</option>
                   <option <?php if($col == 40) {echo 'selected';}?> value="40">40 Kolom</option>
                   <option <?php if($col == 50) {echo 'selected';}?> value="50">50 Kolom</option>
                   <option <?php if($col == 60) {echo 'selected';}?> value="60">60 Kolom</option>
                   <option <?php if($col == 70) {echo 'selected';}?> value="70">70 Kolom</option>
               </select></div>
               <div class="col-md-6 mb-1">
                <select id="paitopsr" class="form-control form-control-sm">
                    <?php 
                    foreach($cok as $mark){
                        $pasar = preg_replace('/\s+/', '-', $mark);
                        if($pid==$pasar){
                            echo '<option data-goto="'.get_site_url().'/paito-harian-'.$pasar.'" selected>'.ucwords(markete($pasar)).'</option>';
                        }else{
                            echo '<option data-goto="'.get_site_url().'/paito-harian-'.$pasar.'">'.ucwords(markete($pasar)).'</option>';
                        }
                    }
                    ?>
                </select>
            </div>
            <div class="col-md-3 mb-1">
                <select name="hari" id="hari" class="form-control form-control-sm" onchange="this.form.submit()">
                    <option <?php if($hari == '') {echo 'selected';}?> value="">Harian</option>
                    <option <?php if($hari == 'minggu') {echo 'selected';}?> value="minggu">Minggu</option>
                    <option <?php if($hari == 'senin') {echo 'selected';}?> value="senin">Senin</option>
                    <option <?php if($hari == 'selasa') {echo 'selected';}?> value="selasa">Selasa</option>
                    <option <?php if($hari == 'rabu') {echo 'selected';}?> value="rabu">Rabu</option>
                    <option <?php if($hari == 'kamis') {echo 'selected';}?> value="kamis">Kamis</option>
                    <option <?php if($hari == 'jumat') {echo 'selected';}?> value="jumat">Jumat</option>
                    <option <?php if($hari == 'sabtu') {echo 'selected';}?> value="sabtu">Sabtu</option>
                </select>
            </div>
        </div>
    </div>
</div>
</form>

<div class="menu2 mb-2" id="colormenu">			
			<fieldset id="color-selector">
			  <button id="btnSubmit">Hapus</button>
				<div class="color Red  selected" data-color="#fa3c3c"></div>
				<div class="color Pink  selected" data-color="#f50280"></div>
				<div class="color Green" data-color="#51e877"></div>
				<div class="color Violet" data-color="Violet"></div>
				<div class="color Teal" data-color="Teal"></div>
				<div class="color Blue" data-color="#288cd4"></div>
				<div class="color Grey" data-color="#b2b2b2"></div>
				<div class="color Orange" data-color="#f4b084"></div>
				<div class="color eraser" data-color="eraser"></div>
			</fieldset>		
	</div>
<div id="loading" class="text-center mx-auto">
 <p class="text-center">Tunggu Sejenak Sedang Mengambil Data Besar</p>
</div>    	
<div class="mt-1 table-responsive" id="tables" style="display:none">
<table id="drawing-table" width="100%">
<thead>
        <tr>
            <th class="text-center widget-title p-0 text-light text-center">Tanggal</th>
            <th class="text-center widget-title p-0 text-light text-center">Hari</th>
            <th class="text-center widget-title p-0 text-light text-center" colspan="4">Result</th>
            <th class="text-center widget-title p-0 text-light text-center">J</th>
            <th class="text-center widget-title p-0 text-light text-center" colspan="2">Ts1</th>
            <th class="bg-danger p-0 text-light text-center">J</th>
            <th class="text-center widget-title p-0 text-light text-center" colspan="2">Ts2</th>
            <th class="bg-danger p-0 text-light text-center">J</th>
            <th class="text-center widget-title p-0 text-light text-center" colspan="2">Ts3</th>
            <th class="bg-danger p-0 text-light text-center">J</th>
            <th class="text-center widget-title p-0 text-light text-center" colspan="2">Ts4</th>
            <th class="bg-danger p-0 text-light text-center">J</th>
        </tr>
 </thead>       
    <tbody>        
<?php
foreach ($paitok as $field => $value) {
$angka = $value['result'];    
if (strlen($angka) < 4) {continue;} 
$tglnya = date_i18n('d-m-y', strtotime($value['date']. '+0 day'));    
$harinya = ucwords($value['day']);
$a = substr($angka, 0, 1);
$c = substr($angka, 1, 1);
$k = substr($angka, 2, 1);
$e = substr($angka, 3, 1); 
$d = substr(tess(1, $k,$e), 0, 1);
$f = substr(tess(1, $k,$e), 1, 1);
$g = substr(tess(2, $k,$e), 0, 1);
$h = substr(tess(2, $k,$e), 1, 1);
$m = substr(tess(3, $k,$e), 0, 1);
$n = substr(tess(3, $k,$e), 1, 1);
$o = substr(tess(4, $k,$e), 0, 1);
$p = substr(tess(4, $k,$e), 1, 1);

echo ' <tr>';
echo '
<td class="align-middle p-0 text-center tgl">'.$tglnya.'</td>
<td class="align-middle p-0 text-center tgl">'.$harinya.'</td>
<td class="align-middle p-0 text-center">'.$a.'</td>
<td class="align-middle p-0 text-center">'.$c.'</td>
<td class="align-middle p-0 text-center">'.$k.'</td>
<td class="align-middle p-0 text-center">'.$e.'</td>
<td class="align-middle p-0 text-center jum">'.jml($k,$e).'</td>
<td class="align-middle p-0 text-center">'.$d.'</td>
<td class="align-middle p-0 text-center">'.$f.'</td>
<td class="align-middle p-0 text-center jum">'.jml($d,$f).'</td>
<td class="align-middle p-0 text-center">'.$g.'</td>
<td class="align-middle p-0 text-center">'.$h.'</td>
<td class="align-middle p-0 text-center jum">'.jml($g,$h).'</td>
<td class="align-middle p-0 text-center">'.$m.'</td>
<td class="align-middle p-0 text-center">'.$n.'</td>
<td class="align-middle p-0 text-center jum">'.jml($m,$n).'</td>
<td class="align-middle p-0 text-center">'.$o.'</td>
<td class="align-middle p-0 text-center">'.$p.'</td>
<td class="align-middle p-0 text-center jum">'.jml($o,$p).'</td>
';
echo ' </tr>';
}
?>
        <tr>
            <td class="align-middle p-0 text-center">x</td>
            <td class="align-middle p-0 text-center"></td>
            <td class="align-middle p-0 text-center"></td>
            <td class="align-middle p-0 text-center"></td>
            <td class="align-middle p-0 text-center"></td>
            <td class="align-middle p-0 text-center"></td>
            <td class="align-middle p-0 text-center"></td>
            <td class="align-middle p-0 text-center"></td>
            <td class="align-middle p-0 text-center"></td>
            <td class="align-middle p-0 text-center"></td>
            <td class="align-middle p-0 text-center"></td>
            <td class="align-middle p-0 text-center"></td>
            <td class="align-middle p-0 text-center"></td>
            <td class="align-middle p-0 text-center"></td>
            <td class="align-middle p-0 text-center"></td>
            <td class="align-middle p-0 text-center"></td>
            <td class="align-middle p-0 text-center"></td>
            <td class="align-middle p-0 text-center"></td>
            <td class="align-middle p-0 text-center"></td>
        </tr>
    </tbody>
</table>
</div>
<style>
#drawing-table td {
    font-weight: bold;
    padding:0px !important;
}
.jum {
    color: #d7d1d1 !important;
    font-weight: normal !important;
}  

.noselect {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

table {
    border-collapse: collapse;
}

table {
    margin: 0 !important;
    width: 100% !important;
}

table,
td,
th {
    border: 1px solid #ccc;
    cursor: default;
}

tr:nth-last-child(5n+1) {
    background: none repeat scroll 0 0 #e8e4e7 !important;
}

.residex {
    color: #d7d1d1;
    font-weight: normal
}

.top {
    background: none repeat scroll 0 0 #ffffff !important;
}

.reside {
    font-weight: bold;
}

.menu2 {
    background: #FFF;
    position: relative;
    width: 100%;
    z-index: 99999;
    padding: 5px;
}

#clear {
    float: right;
}

#color-selector p {
    clear: both;
}

.color {
    float: left;
    height: 20px;
    position: relative;
    width: 9.7%;
}

.color.eraser {
    background: none repeat scroll 0 0 white;
    cursor: pointer;
    border: 1px solid black;
}

.color.Red {
    background: none repeat scroll 0 0 #ff5050;
    cursor: pointer;
    border: 1px solid black;
}

.color.Pink {
    background: none repeat scroll 0 0 #ff99cc;
    cursor: pointer;
    border: 1px solid black;
}

.color.Green {
    background: none repeat scroll 0 0 #a9d08e;
    cursor: pointer;
    border: 1px solid black;
}

.color.Violet {
    background: none repeat scroll 0 0 #9966ff;
    cursor: pointer;
    border: 1px solid black;
}

.color.Teal {
    background: none repeat scroll 0 0 #66ffcc;
    cursor: pointer;
    border: 1px solid black;
}

.color.Blue {
    background: none repeat scroll 0 0 #9bc2e6;
    cursor: pointer;
    border: 1px solid black;
}

.color.Grey {
    background: none repeat scroll 0 0 #b2b2b2;
    cursor: pointer;
    border: 1px solid black;
}

.color.Orange {
    background: none repeat scroll 0 0 #f4b084;
    cursor: pointer;
    border: 1px solid black;
}

.color input {
    background: rgba(0, 0, 0, 0);
    border: 0 none;
    float: right;
    left: 220px;
    position: absolute;
}

.colorpicker_submit {
    color: #ffffff;
}

.colorpicker {
    z-index: 20;
}

.selected {
    border: 1px solid white;
}

#btnSubmit {
    float: left;
    margin-top: 0;
    width: 10%;
    cursor: pointer;
    font-size: 12px;
    line-height: 12px;
    height: 20px;
}

.reside,
.residex,
.residexx,
.entry-content td.reside,
.entry-content td.residex,
.entry-content td.residexx {
    padding: 2px;
    font-size: 14px !important;
}

@media (max-width:767px) {
    #drawing-table td {
        font-size: 14px;
        padding: revert;
    }

    .reside,
    .residex,
    .residexx,
    .entry-content td.reside,
    .entry-content td.residex,
    .entry-content td.residexx {
        font-size: 14px !important;
    }

    #btnSubmit {
        width: auto;
        padding: 0;
    }
}

#colormenu.fixed {
    position: fixed;
    top: 0;
    left: 0;
}

body.admin-bar #colormenu.fixed {
    top: 32px;
}

.entry-content a {
    text-decoration: none;
}

.reside.tgl {
    padding-right: 2px !important;
    border-right: 4px solid #eee;
}

.list-group-item,
.list-group-item a {
    padding: 0;
    padding-left: 0px;
    text-decoration: none;
    font-weight: bold;
    padding-left: 10px;
}
</style>
<script src="<?=home_url()?>/data/warna.js"></script>
<script src='<?=home_url()?>/data/table.js'></script>
<script>
    function myFunction() {
        document.getElementById("myForm").reset();
    }
    $(document).ready(function() {
        $("#loading").css("display", "none");
        $("#tables").css("display", "block");
        $('#jmlc').keyup(function() {
            $('.asux').each(function() {
                if ($.trim($('#jmlc').val()).length) {
                    var r = $(this).text();
                    var t = $("#jmlc").val();
                    if (r == t) {
                        $(this).addClass("j" + $(this).text());
                    }
                } else {
                    $(this).removeClass("j" + $(this).text());
                }

            });
        });


        $('#ekorc').keyup(function() {
            $('.asu:nth-child(5n+4)').each(function() {
                if ($.trim($('#ekorc').val()).length) {
                    var r = $(this).text();
                    var t = $("#ekorc").val();
                    if (r == t) {
                        $(this).addClass("e" + $(this).text());
                    }
                } else {
                    $(this).removeClass("e" + $(this).text());
                }

            });
        });

        $('#kepalac').keyup(function() {
            $('.asu:nth-child(5n+3)').each(function() {
                if ($.trim($('#kepalac').val()).length) {
                    var r = $(this).text();
                    var t = $("#kepalac").val();
                    if (r == t) {
                        $(this).addClass("k" + $(this).text());
                    }
                } else {
                    $(this).removeClass("k" + $(this).text());
                }

            });
        });

        $('#kopc').keyup(function() {
            $('.asu:nth-child(5n+2)').each(function() {
                if ($.trim($('#kopc').val()).length) {
                    var r = $(this).text();
                    var t = $("#kopc").val();
                    if (r == t) {
                        $(this).addClass("c" + $(this).text());
                    }
                } else {
                    $(this).removeClass("c" + $(this).text());
                }
            });
        });

        $('#asc').keyup(function() {
            $('.asu:nth-child(5n+1)').each(function() {
                if ($.trim($('#asc').val()).length) {
                    var r = $(this).text();
                    var t = $("#asc").val();
                    if (r == t) {
                        $(this).addClass("a" + $(this).text());
                    }
                } else {
                    $(this).removeClass("a" + $(this).text());
                }

            });
        });

        $("#rb").click(function() {
            $("span").removeClass("highlight");
            $('td').removeClass('e1 e2 e3 e4 e5 e6 e7 e8 e9 e0 k1 k2 k3 k4 k5 k6 k7 k8 k9 k0 c1 c2 c3 c4 c5 c6 c7 c8 c9 c0 a1 a2 a3 a4 a5 a6 a7 a8 a9 j0 j1 j2 j3 j4 j5 j6 j7 j8 j9 j0');

        });

        $("#btnSubmit").click(function() {
            $(".asu").css("background", ""); 
            $(".asux").css("background", ""); 
            $("td").css("background", "");
        });
        var mcolpos = $("#colormenu").position().top; var mcolposlef = $("#colormenu").position().left;
        var mcolpos = $("#colormenu").position().top; var mcolposlef = $("#colormenu").position().left;
        if ($(this).scrollTop() >= mcolpos) {
            $("#colormenu").addClass('fixed').css({'left':0});
        }else{
            $("#colormenu").removeClass('fixed').css({'left':'unset'});
        }
        $(window).scroll(function() {
         if ($(this).scrollTop() >= mcolpos) {
            $("#colormenu").addClass('fixed').css({'left':0});
        }else{
            $("#colormenu").removeClass('fixed').css({'left':'unset'});
        }
    });

        $("#paitopsr").change(function(){
         var newgoto = $(this).find("option:selected").attr('data-goto');
         if(newgoto!=''){ window.location.href = newgoto; }
     });
    });
</script>
<?php return ob_get_clean(); }


?>