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/data_pengeluaran.php
<?php
add_shortcode( 'data_pengeluaran', 'data_pengeluaran' );
function data_pengeluaran($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'] : '';
    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">Senin</th><th class="bg-danger p-0 text-light text-center">Rabu</th><th class="bg-danger p-0 text-light text-center">Kamis</th><th class="bg-danger p-0 text-light text-center">Sabtu</th><th class="bg-danger p-0 text-light text-center">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">'.$hari.'</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">Senin</th><th class="bg-danger p-0 text-light text-center">Selasa</th><th class="bg-danger p-0 text-light text-center">Rabu</th><th class="bg-danger p-0 text-light text-center">Kamis</th><th class="bg-danger p-0 text-light text-center">Jumat</th><th class="bg-danger p-0 text-light text-center">Sabtu</th><th class="bg-danger p-0 text-light text-center">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">'.$hari.'</th>';
            }
            $thne .= '</thead>';
        }
    }

    $i = $ase=$cope=$kple=$ekre =$hariini=0;

$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="" class="container-fluid">
            <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 == 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-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().'/data-pengeluaran-togel-'.$pasar.'" selected>'.ucwords(markete($pasar)).'</option>';
                        }else{
                            echo '<option data-goto="'.get_site_url().'/data-pengeluaran-togel-'.$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>
</form>

<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="p-0 text-center">' .$a .$c.$k.$e.'</td>';
                } else {
                    echo '<td class="p-0 text-center">' .$a .$c.$k.$e.'</td>';
                    echo '</tr>';
                    echo '<tr>';
                }
            }
            for ($i = 0; $i < $kut; $i++) {
                if ($i == $kut - 1) {
                    echo '<td class="p-0 text-center">&nbsp;&nbsp;</td>';
                } else {
                    echo '<td class="p-0 text-center">&nbsp;&nbsp;</td>';
                }
            }
            echo "</tr>";
         ?>
     </tbody>
 </table>
</div>
<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(); }?>