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/.trash/data/paito_warna.php
<?php
add_shortcode( 'paito_warna', 'paito_warna' );
function paito_warna($atts){
    ob_start();
    global $wpdb;
    include_once('fungsi.php');
    $atts = shortcode_atts(array('pasaran' => 'sydney'),$atts);
    $table_paito = 'result';
    $npas=$linke=$urlke=$ppas=$pide=$thne=$marku='';
    $resu=$harinya=array();
    $cok = array("adelaide day","adelaide night","brisbane day","brisbane night","bullseye","busan day","busan night","chengdu day","chengdu night","chinapools","florida midday","georgia evening","georgia midday","georgia night","germany plus5","hongkong","illinois evening","illinois midday","indiana midday","japan","kentucky midday","magnum cambodia","maryland evening","michigan evening","missouri evening","missouri midday","morocco quatro 01","morocco quatro 04","morocco quatro 19","morocco quatro 22","new york evening","north carolina day","north carolina evening","oregon 04","oregon 07","oregon 10","oregon 13","salvador morning","salvador night","san juan morning","san juan night","singapore","sydney","taipei","taiwan","tennesse evening","tennesse midday","tennesse morning","texas day","texas evening","vegas evening","vegas midnight","virginia day","washington dc evening","washington dc midday");
    $pid= $atts['pasaran'];
    $hari = isset($_POST['hari']) ? $_POST['hari'] : '';
    $harine = (!empty($hari)) ? $hari : 'harian';
    $warn = isset($_POST['warna']) ? $_POST['warna'] : 'putih';
    if ($pid == 'singapore') {
        $col = 5;
        if (isset($_POST['col'])) {
            $col = $_POST['col'];
        } 
        if ($col == 5 && $hari == '') {
            $thne = '<thead><tr><th class="bg-danger p-0 text-light text-center" colspan="5">Senin</th><th class="bg-danger p-0 text-light text-center" colspan="5">Rabu</th><th class="bg-danger p-0 text-light text-center" colspan="5">Kamis</th><th class="bg-danger p-0 text-light text-center" colspan="5">Sabtu</th><th class="bg-danger p-0 text-light text-center" colspan="5">Minggu</th></tr></thead>'; 
        } else {
            $thne = '<thead>';
            for ($i=0; $i < $col; $i++) { 
                $thne .= '<th class="bg-danger p-0 text-light text-center text-capitalize" colspan="5">'.$harine.'</th>';
            }
            $thne .= '</thead>';
        }
    } else {
        $col = 7;
        if (isset($_POST['col'])) {
            $col = $_POST['col'];
        }
        if ($col == 7 && $hari == '') {
            $thne = '<thead><tr><th class="bg-danger p-0 text-light text-center" colspan="5">Senin</th><th class="bg-danger p-0 text-light text-center" colspan="5">Selasa</th><th class="bg-danger p-0 text-light text-center" colspan="5">Rabu</th><th class="bg-danger p-0 text-light text-center" colspan="5">Kamis</th><th class="bg-danger p-0 text-light text-center" colspan="5">Jumat</th><th class="bg-danger p-0 text-light text-center" colspan="5">Sabtu</th><th class="bg-danger p-0 text-light text-center" colspan="5">Minggu</th></tr></thead>'; 
        } else {
            $thne = '<thead>';
            for ($i=0; $i < $col; $i++) { 
                $thne .= '<th class="bg-danger p-0 text-light text-center text-capitalize" colspan="5">'.$harine.'</th>';
            }
            $thne .= '</thead>';
        }
    }

$url = 'https://buyutpaito.com/json/lengkap.php?digit=4&market='.$pid.'&hari='.$hari;
$paitok = json_decode(resourceWeb($url), true);
$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);
           
foreach ($paitok as $field => $value) {
$resu[] = $value['result'];            
}          

$kut = $col - ($cresult % $col); 

?>
<?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-2 mb-1"><select name="col" class="form-control form-control-sm" onchange="this.form.submit()">
                   <option <?php if($col == 1) {echo 'selected';}?> value="1">1 Kolom</option>
                   <option <?php if($col == 2) {echo 'selected';}?> value="2">2 Kolom</option>
                   <option <?php if($col == 3) {echo 'selected';}?> value="3">3 Kolom</option>
                   <option <?php if($col == 4) {echo 'selected';}?> value="4">4 Kolom</option>
                   <option <?php if($col ==5) {echo 'selected';}?> value="5">5 Kolom</option>
                   <option <?php if($col == 6) {echo 'selected';}?> value="6">6 Kolom</option>
                   <option <?php if($col == 7) {echo 'selected';}?> value="7">7 Kolom</option>
               </select></div>
               <div class="col-md-5 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-warna-'.$pasar.'" selected>'.ucwords(markete($pasar)).'</option>';
                        }else{
                            echo '<option data-goto="'.get_site_url().'/paito-warna-'.$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 class="col-md-2 mb-1">
                <select name="warna" class="form-control form-control-sm" onchange="this.form.submit()">
                    <option <?php if($warn == 'hitam') {echo 'selected';}?> value="hitam">Hitam</option>
                    <option <?php if($warn == 'putih') {echo 'selected';}?> value="putih">Putih</option>
                </select>
            </div>
        </div>
    </div>
</div>
</form>

<div class="menu2 mb-2" id="colormenu">
    <button id="btnSubmit">Hapus</button>
    <fieldset id="color-selector">
        <div class="color Aqua  selected" data-color="Aqua"></div>
        <div class="color Gold" data-color="Gold"></div>
        <div class="color LightGreen" data-color="LightGreen"></div>
        <div class="color DeepPink" data-color="DeepPink"></div>
        <div class="color violet" data-color="violet"></div>
        <div class="color Turquoise" data-color="Turquoise"></div>
        <div class="color Orange" data-color="Orange"></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" class="table-bordered text-center mx-auto">

        <?php
        echo $thne;
        ?>
        <tbody align="center">
            <tr><?php
            for ($i = 1; $i <= $cresult; $i++) {
                $angka = $resu[$i - 1];
            
                $a = substr($angka, 0, 1);
                $c = substr($angka, 1, 1);
                $k = substr($angka, 2, 1);
                $e = substr($angka, 3, 1);
                if ($i % $col) {
                    echo '<td class="asu">' .$a .'</td>';
                    echo '<td class="asu">'.$c.'</td>';
                    echo '<td class="asu">'.$k.'</td>';
                    echo '<td class="asu">'.$e.'</td>';
                    echo '<td class="asux">'.jml($k, $e).'</td>';
                } else {
                    echo '<td class="asu">' .$a .'</td>';
                    echo '<td class="asu">'.$c.'</td>';
                    echo '<td class="asu">'.$k.'</td>';
                    echo '<td class="asu">'.$e.'</td>';
                    echo '<td class="asux">'.jml($k, $e).'</td>';
                    echo '</tr>';
                    echo '<tr>';
                }

            }
            for ($i = 0; $i < $kut; $i++) {
                if ($i == $kut - 1) {
                    echo '<td class="asu">&nbsp;&nbsp;</td>';
                    echo '<td class="asu">&nbsp;&nbsp;</td>';
                    echo '<td class="asu">&nbsp;&nbsp;</td>';
                    echo '<td class="asu">&nbsp;&nbsp;</td>';
                    echo '<td class="asux">&nbsp;&nbsp;</td>';
                } else {
                    echo '<td class="asu">&nbsp;&nbsp;</td>';
                    echo '<td class="asu">&nbsp;&nbsp;</td>';
                    echo '<td class="asu">&nbsp;&nbsp;</td>';
                    echo '<td class="asu">&nbsp;&nbsp;</td>';
                    echo '<td class="asux">&nbsp;&nbsp;</td>';
                }
            }
            echo "</tr>";
            echo "<tr>";
            for ($i = 0; $i < $col; $i++) {
                if ($i == $col - 1) {
                    echo '<td class="asu">&nbsp;&nbsp;</td>';
                    echo '<td class="asu">&nbsp;&nbsp;</td>';
                    echo '<td class="asu">&nbsp;&nbsp;</td>';
                    echo '<td class="asu">&nbsp;&nbsp;</td>';
                    echo '<td class="asux">&nbsp;&nbsp;</td>';
                } else {
                 echo '<td class="asu">&nbsp;&nbsp;</td>';
                 echo '<td class="asu">&nbsp;&nbsp;</td>';
                 echo '<td class="asu">&nbsp;&nbsp;</td>';
                 echo '<td class="asu">&nbsp;&nbsp;</td>';
                 echo '<td class="asux">&nbsp;&nbsp;</td>';
             }
         }
         echo "</tr>";
         ?>
     </tbody>
 </table>
</div>
<div class="mt-2" align="center">
    <form id="myForm">
        <input maxlength="1" placeholder="as" class="cari" type="text" id="asc">
        <input maxlength="1" placeholder="kop" class="cari" type="text" id="kopc">
        <input maxlength="1" placeholder="kep" class="cari" type="text" id="kepalac">
        <input maxlength="1" placeholder="ekr" class="cari" type="text" id="ekorc">
        <input maxlength="1" placeholder="jml" class="cari" type="text" id="jmlc">
        <input id="rb" type="button" class="btn btn-sm btn-danger" value="Reset" onclick="myFunction()">
    </form>
</div>
<style>
    #drawing-table {
       width: 100%;
   }
   #drawing-table td {
    text-align: center;
    padding: 0;
}
.asu {
    font-weight: bold;
}
<?php if ($warn != 'hitam') {?>
    #drawing-table {
        background: #ffffff !important;
    }
    .asux {
        color: #d7d1d1 !important;
    }

    tbody tr:nth-last-child(5n+1) {
        background: none repeat scroll 0 0 #e8e4e7 !important;
    } 
    #drawing-table td {
       color: #000000;
   }
<?php } else {?>
    .asux {
        color: #959595 !important;
    }
    tbody tr:nth-last-child(5n+1) {
        background: #524f4f none repeat scroll 0 0 !important;
    }
    #drawing-table td {
       color: #ffffff;
   }
   #drawing-table {
    background: #000000 !important;
}
<?php } ?>

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

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

#drawing-table {
    width: <?php if($col == 1) {echo '60%;';}
    else if($col == 2) {echo '50%;';}
    else if($col == 3) {echo '60%;';}
    else if($col == 4) {echo '70%;';}
    else if($col == 5) {echo '80%;';}
    else if($col == 6) {echo '90%;';}
    else {echo '100%;';}
    ?>

}


#controls {
    margin: 0 auto;
}
#controls fieldset {
    border: 0 solid #cccccc;
    margin: 0;
    padding: 0;
}
#controls legend {
    background: none repeat scroll 0 0 #ffffff;
    border: 1px solid #cccccc;
    padding: 2px 8px;
}
#gridSize {
    margin: 0 0 10px;
}
#clear {
    float: right;
}
#color-selector p {
    clear: both;
}
.color {
    float: left;
    height: 20px;
    position: relative;
    width: 12%;
}
@media (max-width:767px) {
    #drawing-table td {
        font-size: 12px !important;
        padding: 0px !important;
    }
    .color {
        width: 12%;
    }
    .reside,
    .residex,
    .residexx,
    .bg-warning,
    .entry-content td.reside,
    .entry-content td.residex,
    .entry-content td.residexx {
        font-size: 14px !important;
    }

    #btnSubmit {
        width: auto;
        padding: 0;
    }
}
.color.eraser {
    background: none repeat scroll 0 0 #ffffff;
    cursor: pointer;
    border: 1px solid black;
}
.red {
    background: none repeat scroll 0 0 #ff0000;
    cursor: pointer;
    border: 1px solid black;
}
.green {
    background: none repeat scroll 0 0 #008000;
    cursor: pointer;
    border: 1px solid black;
}
.blue {
    background: none repeat scroll 0 0 #0000ff;
    cursor: pointer;
    border: 1px solid black;
}
.color.Aqua {
    background: none repeat scroll 0 0 #00ffff;
    cursor: pointer;
    border: 1px solid black;
}
.color.Gold {
    background: none repeat scroll 0 0 #ffd700;
    cursor: pointer;
    border: 1px solid black;
}
.color.LightGreen {   
    background: none repeat scroll 0 0 #90ee90;
    cursor: pointer;
    border: 1px solid black;
}
.color.DeepPink {
    background: none repeat scroll 0 0 #ff1493;    cursor: pointer;
    border: 1px solid black;
}
.color.violet {
    background: none repeat scroll 0 0 #ee82ee;    cursor: pointer;
    border: 1px solid black;
}

.color.Turquoise {
    background: none repeat scroll 0 0 #46d6db;    cursor: pointer;
    border: 1px solid black;
}

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


.color input {
    border: 0 none;
    float: right;
    left: 220px;
    position: absolute;
}
.colorpicker_submit {
    color: #ffffff;
}
.colorpicker {
    z-index: 20;
}
.selected {
    border: 0 solid #000000;
}
#btnSubmit {
    float: left;
    margin-top: 0;
    width: 15%;
    cursor: pointer;
    font-size: 12px;
    line-height: 12px;
    height: 20px;
}

</style>

<style type="text/css">
    .e1, .e2, .e3, .e4, .e5, .e6, .e7, .e8, .e9, .e0 {
        background-color: #ff4d4d;
        border-radius: 0px;
        color: white !important;
    }
    .k1, .k2, .k3, .k4, .k5, .k6, .k7, .k8, .k9, .k0 {
        background-color: green;
        border-radius: 0px;
        color: white !important;
    }
    .c1, .c2, .c3, .c4, .c5, .c6, .c7, .c8, .c9, .c0 {
        background-color: blue;
        border-radius: 0px;
        color: white !important;
    }
    .a1, .a2, .a3, .a4, .a5, .a6, .a7, .a8, .a9, .a0 {
        background-color: orange;
        border-radius: 0px;
        color: white !important;
    }

    .j1, .j2, .j3, .j4, .j5, .j6, .j7, .j8, .j9, .j0 {
        background-color: #910303;
        border-radius: 0px;
        color: white !important;
    }


    .highlight {
        padding:1px 4px;
        margin:0 -4px;
    }
    input.cari {
        width: 15%;
        text-align: center;
        color: red;
        font-weight: bold;
        background: #f0f7f2;
        display: inline-block;
    }
    #rb {
        background: #f03a17;
    }
    .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(); }
add_shortcode( 'paito_warna6d', 'paito_warna6d' );
function paito_warna6d($atts){
    ob_start();
    global $wpdb;
    include_once('fungsi.php');
    $atts = shortcode_atts(array('pasaran' => 'sydney'),$atts);
    $table_paito = 'result';
    $npas=$linke=$urlke=$ppas=$pide=$thne=$marku='';
    $resu=$harinya=array();
     $cok = array("adelaide day","adelaide night","brisbane day","brisbane night","bullseye","busan day","busan night","chengdu day","chengdu night","chinapools","florida midday","georgia evening","georgia midday","georgia night","germany plus5","hongkong","illinois evening","illinois midday","indiana midday","japan","kentucky midday","magnum cambodia","maryland evening","michigan evening","missouri evening","missouri midday","morocco quatro 01","morocco quatro 04","morocco quatro 19","morocco quatro 22","new york evening","north carolina day","north carolina evening","oregon 04","oregon 07","oregon 10","oregon 13","salvador morning","salvador night","san juan morning","san juan night","singapore","sydney","taipei","taiwan","tennesse evening","tennesse midday","tennesse morning","texas day","texas evening","vegas evening","vegas midnight","virginia day","washington dc evening","washington dc midday");
    $pid= $atts['pasaran'];
    $hari = isset($_POST['hari']) ? $_POST['hari'] : '';
    $harine = (!empty($hari)) ? $hari : 'harian';
    $warn = isset($_POST['warna']) ? $_POST['warna'] : 'putih';

    if ($pid == 'singapore') {
        $col = 5;
        if (isset($_POST['col'])) {
            $col = $_POST['col'];
        } 
        if ($col == 5 && $hari == '') {
            $thne = '<thead><tr><th class="bg-danger p-0 text-light text-center" colspan="7">Senin</th><th class="bg-danger p-0 text-light text-center" colspan="7">Rabu</th><th class="bg-danger p-0 text-light text-center" colspan="7">Kamis</th><th class="bg-danger p-0 text-light text-center" colspan="7">Sabtu</th><th class="bg-danger p-0 text-light text-center" colspan="7">Minggu</th></tr></thead>'; 
        } else {
            $thne = '<thead>';
            for ($i=0; $i < $col; $i++) { 
                $thne .= '<th class="bg-danger p-0 text-light text-center text-capitalize" colspan="7">'.$harine.'</th>';
            }
            $thne .= '</thead>';
        }
    } else {
        $col = 7;
        if (isset($_POST['col'])) {
            $col = $_POST['col'];
        }
        if ($col == 7 && $hari == '') {
            $thne = '<thead><tr><th class="bg-danger p-0 text-light text-center" colspan="7">Senin</th><th class="bg-danger p-0 text-light text-center" colspan="7">Selasa</th><th class="bg-danger p-0 text-light text-center" colspan="7">Rabu</th><th class="bg-danger p-0 text-light text-center" colspan="7">Kamis</th><th class="bg-danger p-0 text-light text-center" colspan="7">Jumat</th><th class="bg-danger p-0 text-light text-center" colspan="7">Sabtu</th><th class="bg-danger p-0 text-light text-center" colspan="7">Minggu</th></tr></thead>'; 
        } else {
            $thne = '<thead>';
            //if ($pid == 'sydney' || $pid == 'hongkong') {}
            for ($i=0; $i < $col; $i++) { 
                $thne .= '<th class="bg-danger p-0 text-light text-center text-capitalize" colspan="7">'.$harine.'</th>';
            }
            $thne .= '</thead>';
        }
    }

//echo $col.' '.$hari.' '.$warn;
    $where = ($hari == '')?"":"AND day = '".$hari."'";
   
    $i = $ase=$cope=$kple=$ekre =$hariini=0;

   $url = 'https://buyutpaito.com/json/lengkap.php?digit=6&market='.$pid.'&hari='.$hari;
$paitok = json_decode(resourceWeb($url), true);
$cresult = count($paitok);
    $paito = $paitok[$cresult-1];
$paitoe = $paito['result'];    
	$hariini = $paito['date'];
	$marku = $paito['market'];
 $ase = substr($paitoe, 2, 1);
           $cope = substr($paitoe, 3, 1);
           $kple = substr($paitoe, 4, 1);
           $ekre = substr($paitoe, 5, 1);
           
foreach ($paitok as $field => $value) {
$resu[] = $value['result'];            
}          
$kut = $col - ($cresult % $col); 

?>
<?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"></div>
                <div class="col-md-3 mb-1"><select name="col" class="form-control form-control-sm" onchange="this.form.submit()">
                   <option <?php if($col == 1) {echo 'selected';}?> value="1">1 Kolom</option>
                   <option <?php if($col == 2) {echo 'selected';}?> value="2">2 Kolom</option>
                   <option <?php if($col == 3) {echo 'selected';}?> value="3">3 Kolom</option>
                   <option <?php if($col == 4) {echo 'selected';}?> value="4">4 Kolom</option>
                   <option <?php if($col == 5) {echo 'selected';}?> value="5">5 Kolom</option>
                   <option <?php if($col == 6) {echo 'selected';}?> value="6">6 Kolom</option>
                   <option <?php if($col == 7) {echo 'selected';}?> value="7">7 Kolom</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 class="col-md-3 mb-1"></div>
        </div>
    </div>
</div>
</form>

<div class="menu2">
				<button id="btnSubmit">Clear</button>
                        <fieldset id="color-selector">
                                <div class="color Aqua  selected" data-color="Aqua"></div>
                                <div class="color Gold" data-color="Gold"></div>
                                <div class="color LightGreen" data-color="LightGreen"></div>
                                <div class="color DeepPink" data-color="DeepPink"></div>
                                <div class="color violet" data-color="violet"></div>
                                <div class="color Turquoise" data-color="Turquoise"></div>
                                <div class="color Orange" data-color="Orange"></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">

        <?php
        echo $thne;
        ?>
        <tbody align="center">
            <tr><?php
            for ($i = 1; $i <= $cresult; $i++) {
                $angka = $resu[$i - 1];
                if (strlen($angka) > 5) {
                $a = substr($angka, 0, 1);
                $c = substr($angka, 1, 1);
                $k = substr($angka, 2, 1);
                $e = substr($angka, 3, 1);
                $f = substr($angka, 4, 1);
                $g = substr($angka, 5, 1);
                if ($i % $col) {
                    echo '<td class="asu">' .$a .'</td>';
                    echo '<td class="asu">'.$c.'</td>';
                    echo '<td class="asu">'.$k.'</td>';
                    echo '<td class="asu">'.$e.'</td>';
                    echo '<td class="asu">'.$f.'</td>';
                    echo '<td class="asu">'.$g.'</td>';
                    echo '<td class="asux">'.jml($f,$g).'</td>';
                } else {
                    echo '<td class="asu">' .$a .'</td>';
                    echo '<td class="asu">'.$c.'</td>';
                    echo '<td class="asu">'.$k.'</td>';
                    echo '<td class="asu">'.$e.'</td>';
                    echo '<td class="asu">'.$f.'</td>';
                    echo '<td class="asu">'.$g.'</td>';
                    echo '<td class="asux">'.jml($f,$g).'</td>';
                    echo '</tr>';
                    echo '<tr>';
                }
                }
         }
         echo "</tr>";
         ?>
     </tbody>
 </table>
</div>
<div class="mt-2" align="center">
<form id="myForm">
<input maxlength="1" placeholder="a6" class="cari" type="text" id="a6" />
<input maxlength="1" placeholder="a5" class="cari" type="text" id="a5" />
<input maxlength="1" placeholder="as" class="cari" type="text" id="asc" />
<input maxlength="1" placeholder="kop" class="cari" type="text" id="kopc" />
<input maxlength="1" placeholder="kep" class="cari" type="text" id="kepalac" />
<input maxlength="1" placeholder="ekr" class="cari" type="text" id="ekorc" />
<input maxlength="1" placeholder="jml" class="cari" type="text" id="jmlc" />
<input id="rb" type="button" class="btn btn-danger btn-sm" value="Reset" onclick="myFunction()"/>
</form>
</div>
<style>
#drawing-table {
    width: <?php if($col == 1) {echo '40%;';}
    else if($col == 2) {echo '50%;';}
    else if($col == 3) {echo '60%;';}
    else if($col == 4) {echo '70%;';}
    else if($col == 5) {echo '80%;';}
    else if($col == 6) {echo '90%;';}
    else {echo '100%;';}
    ?>

}
.single-view {
    background: #ffffff none repeat scroll 0 0;
}
.entry-content th, .entry-content td, .comment-content th, .comment-content td {
    padding: 0 !important;
}
textarea {
    width: 100%;
}
.asux {
    background: none repeat scroll 0 0 #ffffff;
    color: #d7d1d1;
    font-weight: normal;
}

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

.menu2 {
  background:none 0 0 repeat scroll #FCFEFF;
  border:1px solid black;
  border-bottom:2px solid black;
  position:fixed;
  top:1px;
  width:500px;
  z-index:99999;
}

.fixed2 {
    position:fixed;
    top:0;
}

.intro td {
    background: none repeat scroll 0 0 #ffffff !important;
}
table {
    background: white none repeat scroll 0 0;

}
#drawing-table {
    border-collapse: collapse;
margin: auto auto;
}
#drawing-table td {
    border: 1px solid #d9d9d9;
    text-align: center;
    padding: 0;
}

#controls {
    margin: 0 auto;
}
#controls fieldset {
    border: 0 solid #cccccc;
    margin: 0;
    padding: 0;
}
#controls legend {
    background: none repeat scroll 0 0 #ffffff;
    border: 1px solid #cccccc;
    padding: 2px 8px;
}
#gridSize {
    margin: 0 0 10px;
}
#clear {
    float: right;
}
#color-selector p {
    clear: both;
}
.color {
    float: left;
    height: 20px;
    position: relative;
    width: 50px;
}
.color.eraser {
    background: none repeat scroll 0 0 #ffffff;
}
.red {
    background: none repeat scroll 0 0 #ff0000;
}
.green {
    background: none repeat scroll 0 0 #008000;
}
.blue {
    background: none repeat scroll 0 0 #0000ff;
}
.color.Aqua {
    background: none repeat scroll 0 0 #00ffff;
}
.color.Gold {
    background: none repeat scroll 0 0 #ffd700;
}
.color.LightGreen {
    background: none repeat scroll 0 0 #90ee90;
}
.color.DeepPink {
    background: none repeat scroll 0 0 #ff1493;
    color: #ffffff;
}
.color.violet {
    background: none repeat scroll 0 0 #ee82ee;
}
 
.color.Turquoise {
    background: none repeat scroll 0 0 #46d6db;
}
 
.color.Orange{
    background: none repeat scroll 0 0 #ffb878;
}
.color input {
    border: 0 none;
    float: right;
    left: 220px;
    position: absolute;
}
.colorpicker_submit {
    color: #ffffff;
}
.colorpicker {
    z-index: 20;
}
.selected {
    border: 0 solid #000000;
}
#table-wrap {
    font-weight: bold;
    position: relative;
}
#table-wrap table {
    position: relative;
    z-index: 10;
}
#toggle-tracing-mode {
    display: none;
}
#html-wrap textarea {
    height: 50px;
    margin: 0 0 10px;
    overflow: auto;
    width: 100%;
}
#btnSubmit {
    float: left;
    margin-top: 0;
}

#drawing-table th {
    background: #eaeaea;
    width: 20px;
    text-align: center;
}
table#drawing-table {
    background: #fff;
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>

<script>
$(document).ready(function(){
 $("#btnSubmit").click(function(){
        $(".asu").css("background", ""); //passing value as null.
        $(".asux").css("background", ""); //passing value as null.
    }); 
});
</script>

<style type="text/css">
.asu {
    font-weight: bold;
}
.e1, .e2, .e3, .e4, .e5, .e6, .e7, .e8, .e9, .e0 {
    background-color: #ff4d4d;
    border-radius: 0px;
    color: white;
}
.k1, .k2, .k3, .k4, .k5, .k6, .k7, .k8, .k9, .k0 {
    background-color: green;
    border-radius: 0px;
    color: white;
}
.c1, .c2, .c3, .c4, .c5, .c6, .c7, .c8, .c9, .c0 {
    background-color: blue;
    border-radius: 0px;
    color: white;
}
.a1, .a2, .a3, .a4, .a5, .a6, .a7, .a8, .a9, .a0 {
    background-color: orange;
    border-radius: 0px;
    color: white;
}

.j1, .j2, .j3, .j4, .j5, .j6, .j7, .j8, .j9, .j0 {
    background-color: #d510ad;
    border-radius: 0px;
    color: white;
}

.a51, .a52, .a53, .a54, .a55, .a56, .a57, .a58, .a59, .a50 {
    background-color: #dfdd38;
    border-radius: 0px;
    color: white;
}
.a61, .a62, .a63, .a64, .a65, .a66, .a67, .a68, .a69, .a60 {
    background-color: #910303;
    border-radius: 0px;
    color: white;
}

.highlight {
    padding:1px 4px;
    margin:0 -4px;
}
input.cari {
    width: 30px;
    text-align: center;
    color: #736e6e;
    font-weight: normal;
    background: #f0f7f2;
    border: 2px solid #f03a17;
}
#rb {
    background: #f03a17;
}
.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();
}

$(function () {
	


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

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

$('#ekorc').keyup(function () {
$('.asu:nth-child(7n+6)').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(7n+5)').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(7n+4)').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(7n+3)').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());
		}
    
});
});


$('#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());
		}
    
});
});

});
</script>



<script>
$(document).ready(function(){
  $("#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 a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 j0 j1 j2 j3 j4 j5 j6 j7 j8 j9 j0 a61 a62 a63 a64 a65 a66 a67 a68 a69 a60 a51 a52 a53 a54 a55 a55 a57 a58 a59 a50');
 
  });
});
</script>
<script>
    $(document).ready(function() {
        $("#loading").css("display", "none");
        $("#tables").css("display", "block");

        $("#paitopsr").change(function(){
         var newgoto = $(this).find("option:selected").attr('data-goto');
         if(newgoto!=''){ window.location.href = newgoto; }
     });
    });
</script>
<?php return ob_get_clean(); }
add_shortcode( 'paito_haria6d', 'paito_haria6d' );
function paito_haria6d($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();
    $table_paito = 'result';
    $pid= $atts['pasaran'];
    $hari = isset($_POST['hari']) ? $_POST['hari'] : '';
    $col = isset($_POST['col']) ? $_POST['col'] : 10;
    $where = ($hari == '')?"":"AND day = '".$hari."'";
    $url = 'https://buyutpaito.com/json/lengkap.php?digit=6&market='.$pid.'&hari='.$hari.'&limit='.$col;
    $paitok = json_decode(resourceWeb($url), true);
    $cresult = count($paitok);
    $paito = $paitok[$cresult-1];
$paitoe = $paito['result'];    
	$hariini = $paito['date'];
	$marku = $paito['market'];
 $ase = substr($paitoe, 2, 1);
           $cope = substr($paitoe, 3, 1);
           $kple = substr($paitoe, 4, 1);
           $ekre = substr($paitoe, 5, 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"></div>
                <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>
                   <option <?php if($col == 80) {echo 'selected';}?> value="80">80 Kolom</option>
                   <option <?php if($col == 90) {echo 'selected';}?> value="90">60 Kolom</option>
                   <option <?php if($col == 100) {echo 'selected';}?> value="100">100 Kolom</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 class="col-md-3"></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="bg-danger p-0 text-light text-center">Tanggal</th>
            <th class="bg-danger p-0 text-light text-center">Hari</th>
            <th class="bg-danger p-0 text-light text-center" colspan="7">Result</th>
        </tr>
 </thead>       
    <tbody>        
<?php
foreach ($paitok as $field => $value) {
$angka = $value['result'];  
if (strlen($angka) > 5) {
$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($angka, 4, 1);
$f = substr($angka, 5, 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">'.$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>
';
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>
        </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(); }