File: /home/web.paitoan.com/.trash/data/rekap_angka4d.php
<?php
add_shortcode( 'rekap_angka4d', 'rekap_angka4d' );
function rekap_angka4d(){ob_start();
include('fungsi.php');
?>
<script type="text/javascript" src="//code.jquery.com/jquery-1.9.1.js"></script>
<script type="text/javascript" src="//code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
<link rel="stylesheet" type="text/css" href="//code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css">
<script type="text/javascript">
$(window).load(function() {
$('.week_none').click(function() {
$('input:checkbox[name*="4d"]').prop("checked", false);
});
$('.week_odd').click(function() {
$('input:checkbox[name*="4d"]').prop("checked", false);
$('input:checkbox[name*="4d"]:even').prop("checked", true);
});
$('.week_even').click(function() {
$('input:checkbox[name*="4d"]').prop("checked", false);
$('input:checkbox[name*="4d"]:odd').prop("checked", true);
});
});
</script>
<style type="text/css">
html {
font-size: 100%;
}
@media screen and (max-width:480px){
table.sum td {
padding: 0px !important;
}
table.sum label {
padding: 0px !important;
margin: 0px !important;
}
}
label {
display: inline-block;
text-align: center;
text-transform: uppercase;
width: 25px;
color: black;
font-weight: bold;
background-color: #fff;
margin: 5px 0px !important;
}
:checked + label {
}
table.sum td {
margin: 0;
padding: 0;
text-align: center;
width: auto;
}
.blog-view, .single-view, .author-info, .archive-info, .form-404 {
padding: 20px;
word-wrap: break-word;
}
textarea {
background: #fefbda none repeat scroll 0 0 !important;
border: 1px solid #000000 !important;
border-radius: 0 !important;
font-family: arial;
}
.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {
min-height: 1px;
padding-left: 1px;
padding-right: 1px;
position: relative;
}
select {
width: 49%;
}
.panel-info {
background-color: transparent;
border: 1px solid transparent;
border-radius: 0;
box-shadow: 0;
margin-bottom: 5px;
}
.panel-info > .panel-heading {
background-color: #0b7ebb;
border-color: #bce8f1;
color: #ffffff;
}
.panel-info {
border-color: none;
}
input, select {
background: #efefef none repeat scroll 0 0;
border: 1px solid #000000;
color: #000;
}
#textarea_feedback.panel-heading {
background: #000000 none repeat scroll 0 0;
color: white;
font-family: roboto condensed,arial;
text-align: center;
}
header.entry-header {
text-align: center;
}
.entry-title > a {
text-align: center;
}
.entry-byline.cf {
display: none;
}
.bg-danger {
background-color: #dc3545 !important;
}
.bg-success {
background-color: #28a745 !important;
}
.bg-warning {
background-color: #ffc107 !important;
}
</style>
<form class="lineCount" method="POST" action="">
<div class="row">
<div class="col-md-12">
<div class="card mb-2">
<div class="card-header text-center text-dark bg-warning p-1">SUM OFF 4D</div>
<div class="card-body p-0 m-0">
<table class="sum">
<tbody>
<tr>
<td><input type="checkbox" name="4d_0" value="0"<?php if (isset($_POST['4d_0'])) {if($_POST['4d_0']=='0' ) {echo 'checked' ;}}?>><label>0</label></td>
<td><input type="checkbox" name="4d_1" value="1"<?php if (isset($_POST['4d_1'])) {if($_POST['4d_1']=='1' ) {echo 'checked' ;}}?>><label>1</label></td>
<td><input type="checkbox" name="4d_2" value="2"<?php if (isset($_POST['4d_2'])) {if($_POST['4d_2']=='2' ) {echo 'checked' ;}}?>><label>2</label></td>
<td><input type="checkbox" name="4d_3" value="3"<?php if (isset($_POST['4d_3'])) {if($_POST['4d_3']=='3' ) {echo 'checked' ;}}?>><label>3</label></td>
<td><input type="checkbox" name="4d_4" value="4"<?php if (isset($_POST['4d_4'])) {if($_POST['4d_4']=='4' ) {echo 'checked' ;}}?>><label>4</label></td>
<td><input type="checkbox" name="4d_5" value="5"<?php if (isset($_POST['4d_5'])) {if($_POST['4d_5']=='5' ) {echo 'checked' ;}}?>><label>5</label></td>
<td><input type="checkbox" name="4d_6" value="6"<?php if (isset($_POST['4d_6'])) {if($_POST['4d_6']=='6' ) {echo 'checked' ;}}?>><label>6</label></td>
<td><input type="checkbox" name="4d_7" value="7"<?php if (isset($_POST['4d_7'])) {if($_POST['4d_7']=='7' ) {echo 'checked' ;}}?>><label>7</label></td>
<td><input type="checkbox" name="4d_8" value="8"<?php if (isset($_POST['4d_8'])) {if($_POST['4d_8']=='8' ) {echo 'checked' ;}}?>><label>8</label></td>
<td><input type="checkbox" name="4d_9" value="9"<?php if (isset($_POST['4d_9'])) {if($_POST['4d_9']=='9' ) {echo 'checked' ;}}?>><label>9</label></td>
<td style="text-align: center !important" rowspan="4"><input type="button" class="week_odd blue-pill btn-success mb-1" value="Genap">
<input type="button" class="week_even blue-pill btn-danger mb-1" value="Ganjil">
<input type="button" class="week_none blue-pill btn-primary mb-1" value="Clear"></td>
</tr>
<tr>
<td><input type="checkbox" name="4d_10" value="10"<?php if (isset($_POST['4d_10'])) {if($_POST['4d_10']=='10' ) {echo 'checked' ;}}?>><label>10</label></td>
<td><input type="checkbox" name="4d_11" value="11"<?php if (isset($_POST['4d_11'])) {if($_POST['4d_11']=='11' ) {echo 'checked' ;}}?>><label>11</label></td>
<td><input type="checkbox" name="4d_12" value="12"<?php if (isset($_POST['4d_12'])) {if($_POST['4d_12']=='12' ) {echo 'checked' ;}}?>><label>12</label></td>
<td><input type="checkbox" name="4d_13" value="13"<?php if (isset($_POST['4d_13'])) {if($_POST['4d_13']=='13' ) {echo 'checked' ;}}?>><label>13</label></td>
<td><input type="checkbox" name="4d_14" value="14"<?php if (isset($_POST['4d_14'])) {if($_POST['4d_14']=='14' ) {echo 'checked' ;}}?>><label>14</label></td>
<td><input type="checkbox" name="4d_15" value="15"<?php if (isset($_POST['4d_15'])) {if($_POST['4d_15']=='15' ) {echo 'checked' ;}}?>><label>15</label></td>
<td><input type="checkbox" name="4d_16" value="16"<?php if (isset($_POST['4d_16'])) {if($_POST['4d_16']=='16' ) {echo 'checked' ;}}?>><label>16</label></td>
<td><input type="checkbox" name="4d_17" value="17"<?php if (isset($_POST['4d_17'])) {if($_POST['4d_17']=='17' ) {echo 'checked' ;}}?>><label>17</label></td>
<td><input type="checkbox" name="4d_18" value="18"<?php if (isset($_POST['4d_18'])) {if($_POST['4d_18']=='18' ) {echo 'checked' ;}}?>><label>18</label></td>
<td><input type="checkbox" name="4d_19" value="19"<?php if (isset($_POST['4d_19'])) {if($_POST['4d_19']=='19' ) {echo 'checked' ;}}?>><label>19</label></td>
</tr>
<tr>
<td><input type="checkbox" name="4d_20" value="20"<?php if (isset($_POST['4d_20'])) {if($_POST['4d_20']=='20' ) {echo 'checked' ;}}?>><label>20</label></td>
<td><input type="checkbox" name="4d_21" value="21"<?php if (isset($_POST['4d_21'])) {if($_POST['4d_21']=='21' ) {echo 'checked' ;}}?>><label>21</label></td>
<td><input type="checkbox" name="4d_22" value="22"<?php if (isset($_POST['4d_22'])) {if($_POST['4d_22']=='22' ) {echo 'checked' ;}}?>><label>22</label></td>
<td><input type="checkbox" name="4d_23" value="23"<?php if (isset($_POST['4d_23'])) {if($_POST['4d_23']=='23' ) {echo 'checked' ;}}?>><label>23</label></td>
<td><input type="checkbox" name="4d_24" value="24"<?php if (isset($_POST['4d_24'])) {if($_POST['4d_24']=='24' ) {echo 'checked' ;}}?>><label>24</label></td>
<td><input type="checkbox" name="4d_25" value="25"<?php if (isset($_POST['4d_25'])) {if($_POST['4d_25']=='25' ) {echo 'checked' ;}}?>><label>25</label></td>
<td><input type="checkbox" name="4d_26" value="26"<?php if (isset($_POST['4d_26'])) {if($_POST['4d_26']=='26' ) {echo 'checked' ;}}?>><label>26</label></td>
<td><input type="checkbox" name="4d_27" value="27"<?php if (isset($_POST['4d_27'])) {if($_POST['4d_27']=='27' ) {echo 'checked' ;}}?>><label>27</label></td>
<td><input type="checkbox" name="4d_28" value="28"<?php if (isset($_POST['4d_28'])) {if($_POST['4d_28']=='28' ) {echo 'checked' ;}}?>><label>28</label></td>
<td><input type="checkbox" name="4d_29" value="29"<?php if (isset($_POST['4d_29'])) {if($_POST['4d_29']=='29' ) {echo 'checked' ;}}?>><label>29</label></td>
</tr>
<tr>
<td><input type="checkbox" name="4d_30" value="30"<?php if (isset($_POST['4d_30'])) {if($_POST['4d_30']=='30' ) {echo 'checked' ;}}?>><label>30</label></td>
<td><input type="checkbox" name="4d_31" value="31"<?php if (isset($_POST['4d_31'])) {if($_POST['4d_31']=='31' ) {echo 'checked' ;}}?>><label>31</label></td>
<td><input type="checkbox" name="4d_32" value="32"<?php if (isset($_POST['4d_32'])) {if($_POST['4d_32']=='32' ) {echo 'checked' ;}}?>><label>32</label></td>
<td><input type="checkbox" name="4d_33" value="33"<?php if (isset($_POST['4d_33'])) {if($_POST['4d_33']=='33' ) {echo 'checked' ;}}?>><label>33</label></td>
<td><input type="checkbox" name="4d_34" value="34"<?php if (isset($_POST['4d_34'])) {if($_POST['4d_34']=='34' ) {echo 'checked' ;}}?>><label>34</label></td>
<td><input type="checkbox" name="4d_35" value="35"<?php if (isset($_POST['4d_35'])) {if($_POST['4d_35']=='35' ) {echo 'checked' ;}}?>><label>35</label></td>
<td><input type="checkbox" name="4d_36" value="36"<?php if (isset($_POST['4d_36'])) {if($_POST['4d_36']=='36' ) {echo 'checked' ;}}?>><label>36</label></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card mb-2">
<div class="card-head text-center text-white bg-danger">2D depan On</div>
<div class="card-body p-0 m-0">
<textarea onkeyup="if (/[^0-9*]/g.test(this.value)) this.value = this.value.replace(/[^0-9*]/g, '')" placeholder="masukan 2D depan on pisahkan dengan * " name="ids3" class="form-control" rows="3"><?php if (isset($_POST['ids3'])) { echo $_POST['ids3'];}?></textarea>
</div>
</div>
<input onkeyup="if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')" style="width:49%;" class="form" id="kep" maxlength="20" placeholder="Kepala Off, misal 123" type="text" name="kepala3" value="<?php if (isset($_POST['kepala3'])) {echo $_POST['kepala3'];}?>">
<input onkeyup="if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')" style="width:49%;" class="form" id="eko" maxlength="20" placeholder="Ekor Off, , misal 123" type="text" name="ekor3" value="<?php if (isset($_POST['ekor3'])) {echo $_POST['ekor3'];}?>">
<input onkeyup="if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')" style="width:49%;" class="form" id="kep" maxlength="20" placeholder="Jarak Lemah Dari" type="text" name="jalem13" value="<?php if (isset($_POST['jalem13'])) {echo $_POST['jalem13'];}?>">
<input onkeyup="if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')" style="width:49%;" class="form" id="eko" maxlength="20" placeholder="Jarak Lemah Sampai, , misal 123" type="text" name="jalem23" value="<?php if (isset($_POST['jalem23'])) {echo $_POST['jalem23'];}?>">
<input style="width:99%;" onkeyup="if (/[^0-9,]/g.test(this.value)) this.value = this.value.replace(/[^0-9,]/g, '')" class="form" id="shio" maxlength="30" name="shio3" placeholder="Shio Off, pisah dgn koma, misal 11,12" value="<?php if (isset($_POST['shio3'])) {echo $_POST['shio3'];}?>">
<input onkeyup="if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')" style="width:99%;" class="form" id="jml" maxlength="20" placeholder="Jumlah Off, misal 123" type="text" name="jml3" value="<?php if (isset($_POST['jml3'])) {echo $_POST['jml3'];}?>">
<input onkeyup="if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')" style="width:99%;" class="form" id="sls" maxlength="20" placeholder="Selisih Off (0-9), misal 123" type="text" name="sls3" value="<?php if (isset($_POST['sls3'])) {echo $_POST['sls3'];}?>">
<select name="kbk3">
<option value="Normal">K Besar/Kecil</option>
<option <?php if (isset($_POST['kbk3'])) {if($_POST['kbk3']=='Besar' ) {echo 'selected' ;}}?> value="Besar">KBesar</option>
<option <?php if (isset($_POST['kbk3'])) {if($_POST['kbk3']=='Kecil' ) {echo 'selected' ;}}?> value="Kecil">KKecil</option>
</select>
<select name="ebk3">
<option value="Normal">E Besar/Kecil</option>
<option <?php if (isset($_POST['ebk3'])) {if($_POST['ebk3']=='Besar' ) {echo 'selected' ;}}?> value="Besar">EBesar</option>
<option <?php if (isset($_POST['ebk3'])) {if($_POST['ebk3']=='Kecil' ) {echo 'selected' ;}}?> value="Kecil">EKecil</option>
</select>
<select name="kgj3">
<option value="Normal">K Ganjil/Genap</option>
<option <?php if (isset($_POST['kgj3'])) {if($_POST['kgj3']=='Ganjil' ) {echo 'selected' ;}}?> value="Ganjil">Kganjil</option>
<option <?php if (isset($_POST['kgj3'])) {if($_POST['kgj3']=='Genap' ) {echo 'selected' ;}}?> value="Genap">Kgenap</option>
</select>
<select name="egj3">
<option value="Normal">E Ganjil/Genap</option>
<option <?php if (isset($_POST['egj3'])) {if($_POST['egj3']=='Ganjil' ) {echo 'selected' ;}}?> value="Ganjil">Eganjil</option>
<option <?php if (isset($_POST['egj3'])) {if($_POST['egj3']=='Genap' ) {echo 'selected' ;}}?> value="Genap">Egenap</option>
</select>
<select name="homsil3">
<option value="Normal">Silang/Home</option>
<option <?php if (isset($_POST['homsil3'])) {if($_POST['homsil3']=='Homo' ) {echo 'selected' ;}}?> value="Homo">Homo</option>
<option <?php if (isset($_POST['homsil3'])) {if($_POST['homsil3']=='Silang' ) {echo 'selected' ;}}?> value="Silang">Silang</option>
</select>
<select name="ttepi3">
<option value="Normal">Tengah/Tepi</option>
<option <?php if (isset($_POST['ttepi3'])) {if($_POST['ttepi3']=='Tengah' ) {echo 'selected' ;}}?> value="Tengah">Tengah</option>
<option <?php if (isset($_POST['ttepi3'])) {if($_POST['ttepi3']=='Tepi' ) {echo 'selected' ;}}?> value="Tepi">Tepi</option>
</select>
<select name="jbs3">
<option value="Normal">Jbesar/Jkecil</option>
<option <?php if (isset($_POST['jbs3'])) {if($_POST['jbs3']=='Jbesar' ) {echo 'selected' ;}}?> value="Jbesar">Jbesar</option>
<option <?php if (isset($_POST['jbs3'])) {if($_POST['jbs3']=='Jkecil' ) {echo 'selected' ;}}?> value="Jkecil">Jkecil</option>
</select>
<select name="jgj3">
<option value="Normal">Jgenap/Jgenap</option>
<option <?php if (isset($_POST['jgj3'])) {if($_POST['jgj3']=='Jganjil' ) {echo 'selected' ;}}?> value="Jganjil">Jganjil</option>
<option <?php if (isset($_POST['jgj3'])) {if($_POST['jgj3']=='Jgenap' ) {echo 'selected' ;}}?> value="Jgenap">Jgenap</option>
</select>
<select name="bangpi3">
<option value="Normal">Kembang/Kempis</option>
<option <?php if (isset($_POST['bangpi3'])) {if($_POST['bangpi3']=='Kembang' ) {echo 'selected' ;}}?> value="Kembang">Kembang</option>
<option <?php if (isset($_POST['bangpi3'])) {if($_POST['bangpi3']=='Kempis' ) {echo 'selected' ;}}?> value="Kempis">Kempis</option>
</select>
<select class="unik" name="unik3">
<option <?php if (isset($_POST['unik3'])) {if($_POST['unik3']=='Normal' ) {echo 'selected' ;}}?> value="Normal">Normal</option>
<option <?php if (isset($_POST['unik3'])) {if($_POST['unik3']=='Twin' ) {echo 'selected' ;}}?> value="Twin">Twin</option>
<option <?php if (isset($_POST['unik3'])) {if($_POST['unik3']=='Nontwin' ) {echo 'selected' ;}}?> value="Nontwin">Nontwin</option>
</select>
<div class="card mt-2">
<div class="card-head text-center text-white bg-danger">AI/CT 2D Depan</div>
<div class="card-body p-0 m-0">
<textarea placeholder="masukan [perbaris] max 100 ai/kontrol" id="countMe" onkeyup="if (/[^0-9\n]/g.test(this.value)) this.value = this.value.replace(/[^0-9\n]/g, '')" name="ctr3" class="form-control" rows="3"><?php if (isset($_POST['ctr3'])) { echo $_POST['ctr3'];}?></textarea>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card mb-2">
<div class="card-head text-center text-white bg-success">2D Tengah On</div>
<div class="card-body p-0 m-0">
<textarea onkeyup="if (/[^0-9*]/g.test(this.value)) this.value = this.value.replace(/[^0-9*]/g, '')" placeholder="masukan 2D Tengah on pisahkan dengan * " name="ids" class="form-control" rows="3"><?php if (isset($_POST['ids'])) { echo $_POST['ids'];}?></textarea>
</div>
</div>
<input onkeyup="if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')" style="width:49%;" class="form" id="kep" maxlength="20" placeholder="Kepala Off, misal 123" type="text" name="kepala" value="<?php if (isset($_POST['kepala'])) {echo $_POST['kepala'];}?>">
<input onkeyup="if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')" style="width:49%;" class="form" id="eko" maxlength="20" placeholder="Ekor Off, , misal 123" type="text" name="ekor" value="<?php if (isset($_POST['ekor'])) {echo $_POST['ekor'];}?>">
<input onkeyup="if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')" style="width:49%;" class="form" id="kep" maxlength="20" placeholder="Jarak Lemah Dari" type="text" name="jalem1" value="<?php if (isset($_POST['jalem1'])) {echo $_POST['jalem1'];}?>">
<input onkeyup="if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')" style="width:49%;" class="form" id="eko" maxlength="20" placeholder="Jarak Lemah Sampai, , misal 123" type="text" name="jalem2" value="<?php if (isset($_POST['jalem2'])) {echo $_POST['jalem2'];}?>">
<input style="width:99%;" onkeyup="if (/[^0-9,]/g.test(this.value)) this.value = this.value.replace(/[^0-9,]/g, '')" class="form" id="shio" maxlength="30" name="shio" placeholder="Shio Off, pisah dgn koma, misal 11,12" value="<?php if (isset($_POST['shio'])) {echo $_POST['shio'];}?>">
<input onkeyup="if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')" style="width:99%;" class="form" id="jml" maxlength="20" placeholder="Jumlah Off, misal 123" type="text" name="jml" value="<?php if (isset($_POST['jml'])) {echo $_POST['jml'];}?>">
<input onkeyup="if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')" style="width:99%;" class="form" id="sls" maxlength="20" placeholder="Selisih Off (0-9), misal 123" type="text" name="sls" value="<?php if (isset($_POST['sls'])) {echo $_POST['sls'];}?>">
<select name="kbk">
<option value="Normal">K Besar/Kecil</option>
<option <?php if (isset($_POST['kbk'])) {if($_POST['kbk']=='Besar' ) {echo 'selected' ;}}?> value="Besar">KBesar</option>
<option <?php if (isset($_POST['kbk'])) {if($_POST['kbk']=='Kecil' ) {echo 'selected' ;}}?> value="Kecil">KKecil</option>
</select>
<select name="ebk">
<option value="Normal">E Besar/Kecil</option>
<option <?php if (isset($_POST['ebk'])) {if($_POST['ebk']=='Besar' ) {echo 'selected' ;}}?> value="Besar">EBesar</option>
<option <?php if (isset($_POST['ebk'])) {if($_POST['ebk']=='Kecil' ) {echo 'selected' ;}}?> value="Kecil">EKecil</option>
</select>
<select name="kgj">
<option value="Normal">K Ganjil/Genap</option>
<option <?php if (isset($_POST['kgj'])) {if($_POST['kgj']=='Ganjil' ) {echo 'selected' ;}}?> value="Ganjil">Kganjil</option>
<option <?php if (isset($_POST['kgj'])) {if($_POST['kgj']=='Genap' ) {echo 'selected' ;}}?> value="Genap">Kgenap</option>
</select>
<select name="egj">
<option value="Normal">E Ganjil/Genap</option>
<option <?php if (isset($_POST['egj'])) {if($_POST['egj']=='Ganjil' ) {echo 'selected' ;}}?> value="Ganjil">Eganjil</option>
<option <?php if (isset($_POST['egj'])) {if($_POST['egj']=='Genap' ) {echo 'selected' ;}}?> value="Genap">Egenap</option>
</select>
<select name="homsil">
<option value="Normal">Silang/Home</option>
<option <?php if (isset($_POST['homsil'])) {if($_POST['homsil']=='Homo' ) {echo 'selected' ;}}?> value="Homo">Homo</option>
<option <?php if (isset($_POST['homsil'])) {if($_POST['homsil']=='Silang' ) {echo 'selected' ;}}?> value="Silang">Silang</option>
</select>
<select name="ttepi">
<option value="Normal">Tengah/Tepi</option>
<option <?php if (isset($_POST['ttepi'])) {if($_POST['ttepi']=='Tengah' ) {echo 'selected' ;}}?> value="Tengah">Tengah</option>
<option <?php if (isset($_POST['ttepi'])) {if($_POST['ttepi']=='Tepi' ) {echo 'selected' ;}}?> value="Tepi">Tepi</option>
</select>
<select name="jbs">
<option value="Normal">Jbesar/Jkecil</option>
<option <?php if (isset($_POST['jbs'])) {if($_POST['jbs']=='Jbesar' ) {echo 'selected' ;}}?> value="Jbesar">Jbesar</option>
<option <?php if (isset($_POST['jbs'])) {if($_POST['jbs']=='Jkecil' ) {echo 'selected' ;}}?> value="Jkecil">Jkecil</option>
</select>
<select name="jgj">
<option value="Normal">Jgenap/Jgenap</option>
<option <?php if (isset($_POST['jgj'])) {if($_POST['jgj']=='Jganjil' ) {echo 'selected' ;}}?> value="Jganjil">Jganjil</option>
<option <?php if (isset($_POST['jgj'])) {if($_POST['jgj']=='Jgenap' ) {echo 'selected' ;}}?> value="Jgenap">Jgenap</option>
</select>
<select name="bangpi">
<option value="Normal">Kembang/Kempis</option>
<option <?php if (isset($_POST['bangpi'])) {if($_POST['bangpi']=='Kembang' ) {echo 'selected' ;}}?> value="Kembang">Kembang</option>
<option <?php if (isset($_POST['bangpi'])) {if($_POST['bangpi']=='Kempis' ) {echo 'selected' ;}}?> value="Kempis">Kempis</option>
</select>
<select class="unik" name="unik">
<option <?php if (isset($_POST['unik'])) {if($_POST['unik']=='Normal' ) {echo 'selected' ;}}?> value="Normal">Normal</option>
<option <?php if (isset($_POST['unik'])) {if($_POST['unik']=='Twin' ) {echo 'selected' ;}}?> value="Twin">Twin</option>
<option <?php if (isset($_POST['unik'])) {if($_POST['unik']=='Nontwin' ) {echo 'selected' ;}}?> value="Nontwin">Nontwin</option>
</select>
<div class="card mt-2">
<div class="card-head text-center text-white bg-success">AI/CT 2D Tengah</div>
<div class="card-body p-0 m-0">
<textarea placeholder="masukan [perbaris] max 100 ai/kontrol" id="countMe" onkeyup="if (/[^0-9\n]/g.test(this.value)) this.value = this.value.replace(/[^0-9\n]/g, '')" name="ctr" class="form-control" rows="3"><?php if (isset($_POST['ctr'])) { echo $_POST['ctr'];}?></textarea>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card mb-2">
<div class="card-head text-center text-white bg-primary">2D belakang On</div>
<div class="card-body p-0 m-0">
<textarea onkeyup="if (/[^0-9*]/g.test(this.value)) this.value = this.value.replace(/[^0-9*]/g, '')" placeholder="masukan 2D Belakang on pisahkan dengan * " name="ids2" class="form-control" rows="3"><?php if (isset($_POST['ids2'])) { echo $_POST['ids2'];}?></textarea>
</div>
</div>
<input onkeyup="if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')" style="width:49%;" class="form" id="kep" maxlength="20" placeholder="Kepala Off, misal 123" type="text" name="kepala2" value="<?php if (isset($_POST['kepala2'])) {echo $_POST['kepala2'];}?>">
<input onkeyup="if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')" style="width:49%;" class="form" id="eko" maxlength="20" placeholder="Ekor Off, , misal 123" type="text" name="ekor2" value="<?php if (isset($_POST['ekor2'])) {echo $_POST['ekor2'];}?>">
<input onkeyup="if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')" style="width:49%;" class="form" id="kep" maxlength="20" placeholder="Jarak Lemah Dari" type="text" name="jalem12" value="<?php if (isset($_POST['jalem12'])) {echo $_POST['jalem12'];}?>">
<input onkeyup="if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')" style="width:49%;" class="form" id="eko" maxlength="20" placeholder="Jarak Lemah Sampai, , misal 123" type="text" name="jalem22" value="<?php if (isset($_POST['jalem22'])) {echo $_POST['jalem22'];}?>">
<input style="width:99%;" onkeyup="if (/[^0-9,]/g.test(this.value)) this.value = this.value.replace(/[^0-9,]/g, '')" class="form" id="shio" maxlength="30" name="shio2" placeholder="Shio Off, pisah dgn koma, misal 11,12" value="<?php if (isset($_POST['shio2'])) {echo $_POST['shio2'];}?>">
<input onkeyup="if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')" style="width:99%;" class="form" id="jml" maxlength="20" placeholder="Jumlah Off, misal 123" type="text" name="jml2" value="<?php if (isset($_POST['jml2'])) {echo $_POST['jml2'];}?>">
<input onkeyup="if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')" style="width:99%;" class="form" id="sls" maxlength="20" placeholder="Selisih Off (0-9), misal 123" type="text" name="sls2" value="<?php if (isset($_POST['sls2'])) {echo $_POST['sls2'];}?>">
<select name="kbk2">
<option value="Normal">K Besar/Kecil</option>
<option <?php if (isset($_POST['kbk2'])) {if($_POST['kbk2']=='Besar' ) {echo 'selected' ;}}?> value="Besar">KBesar</option>
<option <?php if (isset($_POST['kbk2'])) {if($_POST['kbk2']=='Kecil' ) {echo 'selected' ;}}?> value="Kecil">KKecil</option>
</select>
<select name="ebk2">
<option value="Normal">E Besar/Kecil</option>
<option <?php if (isset($_POST['ebk2'])) {if($_POST['ebk2']=='Besar' ) {echo 'selected' ;}}?> value="Besar">EBesar</option>
<option <?php if (isset($_POST['ebk2'])) {if($_POST['ebk2']=='Kecil' ) {echo 'selected' ;}}?> value="Kecil">EKecil</option>
</select>
<select name="kgj2">
<option value="Normal">K Ganjil/Genap</option>
<option <?php if (isset($_POST['kgj2'])) {if($_POST['kgj2']=='Ganjil' ) {echo 'selected' ;}}?> value="Ganjil">Kganjil</option>
<option <?php if (isset($_POST['kgj2'])) {if($_POST['kgj2']=='Genap' ) {echo 'selected' ;}}?> value="Genap">Kgenap</option>
</select>
<select name="egj2">
<option value="Normal">E Ganjil/Genap</option>
<option <?php if (isset($_POST['egj2'])) {if($_POST['egj2']=='Ganjil' ) {echo 'selected' ;}}?> value="Ganjil">Eganjil</option>
<option <?php if (isset($_POST['egj2'])) {if($_POST['egj2']=='Genap' ) {echo 'selected' ;}}?> value="Genap">Egenap</option>
</select>
<select name="homsil2">
<option value="Normal">Silang/Home</option>
<option <?php if (isset($_POST['homsil2'])) {if($_POST['homsil2']=='Homo' ) {echo 'selected' ;}}?> value="Homo">Homo</option>
<option <?php if (isset($_POST['homsil2'])) {if($_POST['homsil2']=='Silang' ) {echo 'selected' ;}}?> value="Silang">Silang</option>
</select>
<select name="ttepi2">
<option value="Normal">Tengah/Tepi</option>
<option <?php if (isset($_POST['ttepi2'])) {if($_POST['ttepi2']=='Tengah' ) {echo 'selected' ;}}?> value="Tengah">Tengah</option>
<option <?php if (isset($_POST['ttepi2'])) {if($_POST['ttepi2']=='Tepi' ) {echo 'selected' ;}}?> value="Tepi">Tepi</option>
</select>
<select name="jbs2">
<option value="Normal">Jbesar/Jkecil</option>
<option <?php if (isset($_POST['jbs2'])) {if($_POST['jbs2']=='Jbesar' ) {echo 'selected' ;}}?> value="Jbesar">Jbesar</option>
<option <?php if (isset($_POST['jbs2'])) {if($_POST['jbs2']=='Jkecil' ) {echo 'selected' ;}}?> value="Jkecil">Jkecil</option>
</select>
<select name="jgj2">
<option value="Normal">Jgenap/Jgenap</option>
<option <?php if (isset($_POST['jgj2'])) {if($_POST['jgj2']=='Jganjil' ) {echo 'selected' ;}}?> value="Jganjil">Jganjil</option>
<option <?php if (isset($_POST['jgj2'])) {if($_POST['jgj2']=='Jgenap' ) {echo 'selected' ;}}?> value="Jgenap">Jgenap</option>
</select>
<select name="bangpi2">
<option value="Normal">Kembang/Kempis</option>
<option <?php if (isset($_POST['bangpi2'])) {if($_POST['bangpi2']=='Kembang' ) {echo 'selected' ;}}?> value="Kembang">Kembang</option>
<option <?php if (isset($_POST['bangpi2'])) {if($_POST['bangpi2']=='Kempis' ) {echo 'selected' ;}}?> value="Kempis">Kempis</option>
</select>
<select class="unik" name="unik2">
<option <?php if (isset($_POST['unik2'])) {if($_POST['unik2']=='Normal' ) {echo 'selected' ;}}?> value="Normal">Normal</option>
<option <?php if (isset($_POST['unik2'])) {if($_POST['unik2']=='Twin' ) {echo 'selected' ;}}?> value="Twin">Twin</option>
<option <?php if (isset($_POST['unik2'])) {if($_POST['unik2']=='Nontwin' ) {echo 'selected' ;}}?> value="Nontwin">Nontwin</option>
</select>
<div class="card mt-2">
<div class="card-head text-center text-white bg-primary">AI/CT 2D Belakang</div>
<div class="card-body p-0 m-0">
<textarea placeholder="masukan [perbaris] max 100 ai/kontrol" id="countMe" onkeyup="if (/[^0-9\n]/g.test(this.value)) this.value = this.value.replace(/[^0-9\n]/g, '')" name="ctr2" class="form-control" rows="3"><?php if (isset($_POST['ctr2'])) { echo $_POST['ctr2'];}?></textarea>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card mt-2">
<div class="card-head text-center text-white bg-danger">AI/CT 4D</div>
<div class="card-body p-0 m-0">
<textarea onkeyup="if (/[^0-9\n]/g.test(this.value)) this.value = this.value.replace(/[^0-9\n]/g, '')" placeholder="masukan [perbaris] ai 4D" name="ai3d" class="form-control" rows="3"><?php if (isset($_POST['ai3d'])) { echo $_POST['ai3d'];}?></textarea>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card mt-2">
<div class="card-head text-center text-white bg-success">4D ON</div>
<div class="card-body p-0 m-0">
<textarea onkeyup="if (/[^0-9*]/g.test(this.value)) this.value = this.value.replace(/[^0-9*]/g, '')" placeholder="masukan 4D On pisahkan dengan * " name="on3d" class="form-control" rows="3"><?php if (isset($_POST['on3d'])) { echo $_POST['on3d'];}?></textarea>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card mt-2">
<div class="card-head text-center text-white bg-primary">4D OFF</div>
<div class="card-body p-0 m-0">
<textarea onkeyup="if (/[^0-9*]/g.test(this.value)) this.value = this.value.replace(/[^0-9*]/g, '')" placeholder="masukan 4D Off pisahkan dengan * " name="mati3d" class="form-control" rows="3"><?php if (isset($_POST['mati3d'])) { echo $_POST['mati3d'];}?></textarea>
</div>
</div>
</div>
<div class="col-md-12 my-3 text-center">
<button id="simpan" name="simpan" type="submit" value="Proses" class="btn btn-custom btn-primary btn-box btn-sm">Rekap</button>
<input type="button" class="btn btn-custom btn-success btn-box btn-sm" value="Reset" onclick="window.location.href=window.location.href">
</div>
</div>
</form>
<?php
$pisah = $asile=$olehe=$numbi3='';
$nilaiai=0;
$cvalxai3 = $cvalxi=$cvalxai='';
$asli = array();
for ($i=00; $i < 100; $i++) {
if (strlen($i) == 1) { $i='0'.$i;}
$asli[] = $i;
}
$aslia = ''; $cas = array();
for ($i=00; $i < 100; $i++) {
if (strlen($i) == 1) { $i='0'.$i;}
$aslia .= $i.'*';
}
$asli3 = array();
for ($i=000; $i < 1000; $i++) {
if (strlen($i) == 1) { $i='00'.$i;}
if (strlen($i) == 2) { $i='0'.$i;}
$asli3[] = $i;
}
$asli33 = array();
for ($i=000; $i < 1000; $i++) {
if (strlen($i) == 1) { $i='00'.$i;}
if (strlen($i) == 2) { $i='0'.$i;}
$asli33[] = $i.'*';
}
$asli4 = array();$asli44 = array();
for ($i=0000; $i < 10000; $i++) {
if (strlen($i) == 1) { $i='000'.$i;}
if (strlen($i) == 2) { $i='00'.$i;}
if (strlen($i) == 3) { $i='0'.$i;}
$asli4[] = $i;
$asli44[] = $i.'*';
}
$nomor = array("0","1","2","3","4","5","6","7","8","9");
$numb = ''; $numba = ''; $numbi = ''; $numbai = '';
$hln3d = $asli44;
if (isset($_POST['simpan'])) {
if (isset($_POST['ids']) && $_POST['ids'] != '') {
$ids2 = array_filter(explode("*", $_POST['ids']), 'strlen' );
$lon = array();
foreach ($ids2 as $key) {
if (strlen($key) == 2) {
$lon[] =$key;
}
}
asort($lon);
} else {$lon = $asli;}
if (isset($_POST['kepala']) && $_POST['kepala'] != '') {
$kpl = str_split($_POST['kepala']);
$multidimensionalk = array($kpl, $nomor);
$kepala = array();
$count = count($multidimensionalk);
for ($i = 0; $i < $count; $i++) {
$temp = array_map("permute",array($kepala),array($multidimensionalk[$i]));
$kepala = $temp[0];
}
asort($kepala);
} else {$kepala = array();}
if (isset($_POST['ekor']) && $_POST['ekor'] != '') {
$ekr = str_split($_POST['ekor']);
$multidimensionale = array($nomor, $ekr);
$ekor = array();
$count = count($multidimensionale);
for ($i = 0; $i < $count; $i++) {
$temp = array_map("permute",array($ekor),array($multidimensionale[$i]));
$ekor = $temp[0];
}
asort($ekor);
} else {$ekor = array();}
if (isset($_POST['jalem1']) && $_POST['jalem1'] != '' && isset($_POST['jalem2']) && $_POST['jalem2'] != '') {
$jdr = $_POST['jalem1']; $jsr = $_POST['jalem2']; $jarak = array(); $angka ='';
if ($jsr > $jdr && strlen($jdr) > 1 && strlen($jdr) < 3 && strlen($jsr) > 1 && strlen($jsr) < 3 ) {
for ($i=$jdr; $i < ($jsr+1); $i++) {
if (strlen($i) < 2) {$angka = '0'.$i;} else {$angka = $i;}
$jarak[] = $angka;}
}
} else {$jarak = array();}
if (isset($_POST['shio']) && $_POST['shio'] != '') {
$os = array_filter(explode(',', $_POST['shio']), 'strlen' );
if (in_array("1", $os)) { $shio1 = array("01","13","25","37","49","61","73","85","97"); }else{ $shio1 = array(); }
if (in_array("2", $os)) { $shio2 = array("02","14","26","38","50","62","74","86","98"); }else{ $shio2 = array(); }
if (in_array("3", $os)) { $shio3 = array("03","15","27","39","51","63","75","87","99"); }else{ $shio3 = array(); }
if (in_array("4", $os)) { $shio4 = array("04","16","28","40","52","64","76","88","00"); }else{ $shio4 = array(); }
if (in_array("5", $os)) { $shio5 = array("05","17","29","41","53","65","77","89"); }else{ $shio5 = array(); }
if (in_array("6", $os)) { $shio6 = array("06","18","30","42","54","66","78","90"); }else{ $shio6 = array(); }
if (in_array("7", $os)) { $shio7 = array("07","19","31","43","55","67","79","91"); }else{ $shio7 = array(); }
if (in_array("8", $os)) { $shio8 = array("08","20","32","44","56","68","80","92"); }else{ $shio8 = array(); }
if (in_array("9", $os)) { $shio9 = array("09","21","33","45","57","69","81","93"); }else{ $shio9 = array(); }
if (in_array("10", $os)) { $shio10 = array("10","22","34","46","58","70","82","94"); }else{ $shio10 = array(); }
if (in_array("11", $os)) { $shio11 = array("11","23","35","47","59","71","83","95"); }else{ $shio11 = array(); }
if (in_array("12", $os)) { $shio12 = array("12","24","36","48","60","72","84","96"); }else{ $shio12 = array(); }
$shio = array_merge($shio1,$shio2,$shio3,$shio4,$shio5,$shio6,$shio7,$shio7,$shio8,$shio9,$shio10,$shio11,$shio12);
asort($shio);
} else {$shio = array();}
if (isset($_POST['jml']) && $_POST['jml'] != '') {
$osh = str_split($_POST['jml']);
if (in_array("1", $osh)) { $jml1= array("01","10","19","28","37","46","55","64","73","82","91"); }else{ $jml1= array(); }
if (in_array("2", $osh)) { $jml2= array("02","11","20","29","38","47","56","65","74","83","92"); }else{ $jml2= array(); }
if (in_array("3", $osh)) { $jml3= array("03","12","21","30","39","48","57","66","75","84","93"); }else{ $jml3= array(); }
if (in_array("4", $osh)) { $jml4= array("04","13","22","31","40","49","58","67","76","85","94"); }else{ $jml4= array(); }
if (in_array("5", $osh)) { $jml5= array("05","14","23","32","41","50","59","68","77","86","95"); }else{ $jml5= array(); }
if (in_array("6", $osh)) { $jml6= array("06","15","24","33","42","51","60","69","78","87","96"); }else{ $jml6= array(); }
if (in_array("7", $osh)) { $jml7= array("07","16","25","34","43","52","61","70","79","88","97"); }else{ $jml7= array(); }
if (in_array("8", $osh)) { $jml8= array("08","17","26","35","44","53","62","71","80","89","98"); }else{ $jml8= array(); }
if (in_array("9", $osh)) { $jml9= array("09","18","27","36","45","54","63","72","81","90","99"); }else{ $jml9= array(); }
if (in_array("0", $osh)) { $jml0= array("00"); }else{ $jml0 = array(); }
$jml = array_merge($jml1,$jml2,$jml3,$jml4,$jml5,$jml6,$jml7,$jml7,$jml8,$jml9,$jml0);
asort($jml);
} else {$jml = array();}
if (isset($_POST['sls']) && $_POST['sls'] != '') {
$oshs = str_split($_POST['sls']);
if (in_array("1", $oshs)) { $sel1= array("01","10","12","21","23","32","34","43","45","54","56","65","67","76","78","87","89","98"); }else{ $sel1= array(); }
if (in_array("2", $oshs)) { $sel2= array("02","20","13","31","24","42","35","53","46","64","57","75","68","86","79","97"); }else{ $sel2= array(); }
if (in_array("3", $oshs)) { $sel3= array("03","30","14","41","25","52","36","63","47","74","58","85","69","96"); }else{ $sel3= array(); }
if (in_array("4", $oshs)) { $sel4= array("04","40","15","51","26","62","37","73","48","84","59","95"); }else{ $sel4= array(); }
if (in_array("5", $oshs)) { $sel5= array("05","50","16","61","27","72","38","83","49","94"); }else{ $sel5= array(); }
if (in_array("6", $oshs)) { $sel6= array("06","60","17","71","28","82","39","93"); }else{ $sel6= array(); }
if (in_array("7", $oshs)) { $sel7= array("07","70","18","81","29","92"); }else{ $sel7= array(); }
if (in_array("8", $oshs)) { $sel8= array("08","80","19","91"); }else{ $sel8= array(); }
if (in_array("9", $oshs)) { $sel9= array("09","90"); }else{ $sel9= array(); }
if (in_array("0", $oshs)) { $sel0= array("00","11","22","33","44","55","66","77","88","99"); }else{ $sel0 = array(); }
$sel = array_merge($sel1,$sel2,$sel3,$sel4,$sel5,$sel6,$sel7,$sel7,$sel8,$sel9,$sel0);
asort($sel);
} else {$sel = array();}
if (isset($_POST['kbk']) && !empty($_POST['kbk'])) {
$jkpl = $_POST['kbk'];
if ($jkpl == 'Kecil') {
$kpb = array(
"50","51","52","53","54","55","56","57","58","59","60","61","62","63","64","65","66","67","68","69","70","71","72","73","74","75","76","77","78","79","80","81","82","83","84","85","86","87","88","89","90","91","92","93","94","95","96","97","98","99");}
else if ($jkpl == 'Besar') {
$kpb = array(
"00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49");}
else {$kpb = array();}
} else {$kpb = array();}
if (isset($_POST['ebk']) && !empty($_POST['ebk'])) {
$jekr = $_POST['ebk'];
if ($jekr == 'Kecil') {
$ekb = array(
"05","06","07","08","09","15","16","17","18","19","25","26","27","28","29","35","36","37","38","39","45","46","47","48","49","55","56","57","58","59","65","66","67","68","69","75","76","77","78","79","85","86","87","88","89","95","96","97","98","99");}
else if ($jekr == 'Besar') {
$ekb = array(
"00","01","02","03","04","10","11","12","13","14","20","21","22","23","24","30","31","32","33","34","40","41","42","43","44","50","51","52","53","54","60","61","62","63","64","70","71","72","73","74","80","81","82","83","84","90","91","92","93","94");}
else {$ekb = array();}
} else {$ekb = array();}
if (isset($_POST['kgj']) && !empty($_POST['kgj'])) {
$gkpl = $_POST['kgj'];
if ($gkpl == 'Ganjil') {
$kpg = array(
"00","01","02","03","04","05","06","07","08","09","20","21","22","23","24","25","26","27","28","29","40","41","42","43","44","45","46","47","48","49","60","61","62","63","64","65","66","67","68","69","80","81","82","83","84","85","86","87","88","89");}
else if ($gkpl == 'Genap') {
$kpg = array(
"10","11","12","13","14","15","16","17","18","19","30","31","32","33","34","35","36","37","38","39","50","51","52","53","54","55","56","57","58","59","70","71","72","73","74","75","76","77","78","79","90","91","92","93","94","95","96","97","98","99");}
else {$kpg = array();}
} else {$kpg = array();}
if (isset($_POST['egj']) && !empty($_POST['egj'])) {
$gekr = $_POST['egj'];
if ($gekr == 'Ganjil') {
$ekg = array(
"00","02","04","06","08","10","12","14","16","18","20","22","24","26","28","30","32","34","36","38","40","42","44","46","48","50","52","54","56","58","60","62","64","66","68","70","72","74","76","78","80","82","84","86","88","90","92","94","96","98");}
else if ($gekr == 'Genap') {
$ekg = array(
"01","03","05","07","09","11","13","15","17","19","21","23","25","27","29","31","33","35","37","39","41","43","45","47","49","51","53","55","57","59","61","63","65","67","69","71","73","75","77","79","81","83","85","87","89","91","93","95","97","99");}
else {$ekg = array();}
} else {$ekg = array();}
if (isset($_POST['homsil']) && !empty($_POST['homsil'])) {
$hsr = $_POST['homsil'];
if ($hsr == 'Silang') {
$hs = array(
"00","02","04","06","08","11","13","15","17","19","20","22","24","26","28","31","33","35","37","39","40","42","44","46","48","51","53","55","57","59","60","62","64","66","68","71","73","75","77","79","80","82","84","86","88","91","93","95","97","99");}
else if ($hsr == 'Homo') {
$hs = array(
"01","03","05","07","09","10","12","14","16","18","21","23","25","27","29","30","32","34","36","38","41","43","45","47","49","50",
"52","54","56","58","61","63","65","67","69","70","72","74","76","78","81","83","85","87","89","90","92","94","96","98");}
else {$hs = array();}
} else {$hs = array();}
if (isset($_POST['ttepi']) && !empty($_POST['ttepi'])) {
$ttr = $_POST['ttepi'];
if ($ttr == 'Tengah') {
$tt = array(
"00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","75","76","77","78","79","80","81","82","83","84","85","86","87","88","89","90","91","92","93","94","95","96","97","98","99");}
else if ($ttr == 'Tepi') {
$tt = array(
"25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59","60","61","62","63","64","65","66","67","68","69","70","71","72","73","74",);}
else {$tt = array();}
} else {$tt = array();}
if (isset($_POST['jbs']) && !empty($_POST['jbs'])) {
$jmbr = $_POST['jbs'];
if ($jmbr == 'Jkecil') {
$jmb = array(
"05","06","07","08","09","14","15","16","17","18","23","24","25","26","27","32","33","34","35","36","41","42","43","44","45","50","51","52","53","54","59","60","61","62","63","68","69","70","71","72","77","78","79","80","81","86","87","88","89","90","95","96","97","98","99");}
else if ($jmbr == 'Jbesar') {
$jmb = array(
"00","01","02","03","04","10","11","12","13","19","20","21","22","28","29","30","31","37","38","39","40","46","47","48","49","55","56","57","58","64","65","66","67","73","74","75","76","82","83","84","85","91","92","93","94");}
else {$jmb = array();}
} else {$jmb = array();}
if (isset($_POST['jgj']) && !empty($_POST['jgj'])) {
$jmgr = $_POST['jgj'];
if ($jmgr == 'Jganjil') {
$jmg = array(
"00","02","04","06","08","11","13","15","17","20","22","24","26","29","31","33","35","38","40","42","44","47","49","51","53","56","58","60","62","65","67","69","71","74","76","78","80","83","85","87","89","92","94","96","98");}
else if ($jmgr == 'Jgenap') {
$jmg = array(
"01","03","05","07","09","10","12","14","16","18","19","21","23","25","27","28","30","32","34","36","37","39","41","43","45","46","48","50","52","54","55","57","59","61","63","64","66","68","70","72","73","75","77","79","81","82","84","86","88","90","91","93","95","97","99");}
else {$jmg = array();}
} else {$jmg = array();}
if (isset($_POST['bangpi']) && !empty($_POST['bangpi'])) {
$kkr = $_POST['bangpi'];
if ($kkr == 'Kembang') {
$kk = array(
"10","20","21","30","31","32","40","41","42","43","50","51","52","53","54","60","61","62","63","64","65","70","71","72","73","74","75","76","80","81","82","83","84","85","86","87","90","91","92","93","94","95","96","97","98");}
else if ($kkr == 'Kempis') {
$kk = array(
"01","02","03","04","05","06","07","08","09","12","13","14","15","16","17","18","19","23","24","25","26","27","28","29","34","35","36","37","38","39","45","46","47","48","49","56","57","58","59","67","68","69","78","79","89");}
else {$kk = array();}
} else {$kk = array();}
if (isset($_POST['idoff']) && $_POST['idoff'] != '') {
$lnof = array_map('trim',array_filter(explode('*',$_POST['idoff']))); $loff = array();
$loff = array();
foreach ($lnof as $key) {
if (strlen($key) == 2) {
$loff[] =$key;
}
}
} else {$loff = array();}
if (isset($_POST['ctr']) && $_POST['ctr'] != '') {
$idso = splitNewLine($_POST['ctr']);
$idseo = count($idso);
for ($i = 0; $i < $idseo; $i++) {
$kumateo[] = permutations(array_diff($nomor,str_split($idso[$i])),2);
}
$kumat = array();
foreach($kumateo as $arrcto) {
if(is_array($arrcto)) {$kumat = array_merge($kumat, $arrcto);}
}
} else {$kumat = array();}
if (isset($_POST['koma']) && !empty($_POST['koma'])) {
$sah = $_POST['koma'];
if ($sah == "*") {$pisah = "*";}
else if ($sah == "#") {$pisah = "#";}
else if ($sah == ",") {$pisah = ",";}
else if ($sah == ".") {$pisah = ".";}
else {$pisah = "*";}
} else {$pisah = "*";}
if (isset($_POST['unik']) && !empty($_POST['unik'])) {
if ($_POST['unik'] == 'Nontwin') {$twin = array("00","11","22","33","44","55","66","77","88","99");}
else {$twin = array();}
} else {$twin = array();}
$array10 = array();
$array10 = array_filter(array_merge($array10, $kepala, $ekor, $jarak, $shio, $jml, $sel, $kpb, $ekb, $kpg, $ekg, $hs, $tt, $jmb, $jmg, $kk, $loff, $kumat, $twin));
asort($array10);
$valx = array_diff($lon, $array10);
$cvalxi = count($valx);
if(is_array($valx)) {
foreach($valx as $nilai) {$numbi .= $nilai.$pisah;}
}
if (isset($_POST['ids2']) && $_POST['ids2'] != '') {
$ids2 = array_filter(explode("*", $_POST['ids2']), 'strlen' );
$lona = array();
foreach ($ids2 as $key) {
if (strlen($key) == 2) {
$lona[] =$key;
}
}
asort($lona);
} else {$lona = $asli;}
if (isset($_POST['kepala2']) && $_POST['kepala2'] != '') {
$kpl = str_split($_POST['kepala2']);
$multidimensionalk = array($kpl, $nomor);
$kepalaa = array();
$count = count($multidimensionalk);
for ($i = 0; $i < $count; $i++) {
$temp = array_map("permute",array($kepalaa),array($multidimensionalk[$i]));
$kepalaa = $temp[0];
}
asort($kepalaa);
} else {$kepalaa = array();}
if (isset($_POST['ekor2']) && $_POST['ekor2'] != '') {
$ekr = str_split($_POST['ekor2']);
$multidimensionale = array($nomor, $ekr);
$ekora = array();
$count = count($multidimensionale);
for ($i = 0; $i < $count; $i++) {
$temp = array_map("permute",array($ekora),array($multidimensionale[$i]));
$ekora = $temp[0];
}
asort($ekora);
} else {$ekora = array();}
if (isset($_POST['jalem12']) && $_POST['jalem12'] != '' && isset($_POST['jalem22']) && $_POST['jalem22'] != '') {
$jdr = $_POST['jalem12']; $jsr = $_POST['jalem22']; $jaraka = array(); $angka ='';
if ($jsr > $jdr && strlen($jdr) > 1 && strlen($jdr) < 3 && strlen($jsr) > 1 && strlen($jsr) < 3 ) {
for ($i=$jdr; $i < ($jsr+1); $i++) {
if (strlen($i) < 2) {$angka = '0'.$i;} else {$angka = $i;}
$jaraka[] = $angka;}
}
} else {$jaraka = array();}
if (isset($_POST['shio2']) && $_POST['shio2'] != '') {
$os = array_filter(explode(',', $_POST['shio2']), 'strlen' );
if (in_array("1", $os)) { $shio1 = array("01","13","25","37","49","61","73","85","97"); }else{ $shio1 = array(); }
if (in_array("2", $os)) { $shio2 = array("02","14","26","38","50","62","74","86","98"); }else{ $shio2 = array(); }
if (in_array("3", $os)) { $shio3 = array("03","15","27","39","51","63","75","87","99"); }else{ $shio3 = array(); }
if (in_array("4", $os)) { $shio4 = array("04","16","28","40","52","64","76","88","00"); }else{ $shio4 = array(); }
if (in_array("5", $os)) { $shio5 = array("05","17","29","41","53","65","77","89"); }else{ $shio5 = array(); }
if (in_array("6", $os)) { $shio6 = array("06","18","30","42","54","66","78","90"); }else{ $shio6 = array(); }
if (in_array("7", $os)) { $shio7 = array("07","19","31","43","55","67","79","91"); }else{ $shio7 = array(); }
if (in_array("8", $os)) { $shio8 = array("08","20","32","44","56","68","80","92"); }else{ $shio8 = array(); }
if (in_array("9", $os)) { $shio9 = array("09","21","33","45","57","69","81","93"); }else{ $shio9 = array(); }
if (in_array("10", $os)) { $shio10 = array("10","22","34","46","58","70","82","94"); }else{ $shio10 = array(); }
if (in_array("11", $os)) { $shio11 = array("11","23","35","47","59","71","83","95"); }else{ $shio11 = array(); }
if (in_array("12", $os)) { $shio12 = array("12","24","36","48","60","72","84","96"); }else{ $shio12 = array(); }
$shioa = array_merge($shio1,$shio2,$shio3,$shio4,$shio5,$shio6,$shio7,$shio7,$shio8,$shio9,$shio10,$shio11,$shio12);
asort($shioa);
} else {$shioa = array();}
if (isset($_POST['jml2']) && $_POST['jml2'] != '') {
$osh = str_split($_POST['jml2']);
if (in_array("1", $osh)) { $jml1= array("01","10","19","28","37","46","55","64","73","82","91"); }else{ $jml1= array(); }
if (in_array("2", $osh)) { $jml2= array("02","11","20","29","38","47","56","65","74","83","92"); }else{ $jml2= array(); }
if (in_array("3", $osh)) { $jml3= array("03","12","21","30","39","48","57","66","75","84","93"); }else{ $jml3= array(); }
if (in_array("4", $osh)) { $jml4= array("04","13","22","31","40","49","58","67","76","85","94"); }else{ $jml4= array(); }
if (in_array("5", $osh)) { $jml5= array("05","14","23","32","41","50","59","68","77","86","95"); }else{ $jml5= array(); }
if (in_array("6", $osh)) { $jml6= array("06","15","24","33","42","51","60","69","78","87","96"); }else{ $jml6= array(); }
if (in_array("7", $osh)) { $jml7= array("07","16","25","34","43","52","61","70","79","88","97"); }else{ $jml7= array(); }
if (in_array("8", $osh)) { $jml8= array("08","17","26","35","44","53","62","71","80","89","98"); }else{ $jml8= array(); }
if (in_array("9", $osh)) { $jml9= array("09","18","27","36","45","54","63","72","81","90","99"); }else{ $jml9= array(); }
if (in_array("0", $osh)) { $jml0= array("00"); }else{ $jml0 = array(); }
$jmla = array_merge($jml1,$jml2,$jml3,$jml4,$jml5,$jml6,$jml7,$jml7,$jml8,$jml9,$jml0);
asort($jmla);
} else {$jmla = array();}
if (isset($_POST['sls2']) && $_POST['sls2'] != '') {
$oshs = str_split($_POST['sls2']);
if (in_array("1", $oshs)) { $sel1= array("01","10","12","21","23","32","34","43","45","54","56","65","67","76","78","87","89","98"); }else{ $sel1= array(); }
if (in_array("2", $oshs)) { $sel2= array("02","20","13","31","24","42","35","53","46","64","57","75","68","86","79","97"); }else{ $sel2= array(); }
if (in_array("3", $oshs)) { $sel3= array("03","30","14","41","25","52","36","63","47","74","58","85","69","96"); }else{ $sel3= array(); }
if (in_array("4", $oshs)) { $sel4= array("04","40","15","51","26","62","37","73","48","84","59","95"); }else{ $sel4= array(); }
if (in_array("5", $oshs)) { $sel5= array("05","50","16","61","27","72","38","83","49","94"); }else{ $sel5= array(); }
if (in_array("6", $oshs)) { $sel6= array("06","60","17","71","28","82","39","93"); }else{ $sel6= array(); }
if (in_array("7", $oshs)) { $sel7= array("07","70","18","81","29","92"); }else{ $sel7= array(); }
if (in_array("8", $oshs)) { $sel8= array("08","80","19","91"); }else{ $sel8= array(); }
if (in_array("9", $oshs)) { $sel9= array("09","90"); }else{ $sel9= array(); }
if (in_array("0", $oshs)) { $sel0= array("00","11","22","33","44","55","66","77","88","99"); }else{ $sel0 = array(); }
$sela = array_merge($sel1,$sel2,$sel3,$sel4,$sel5,$sel6,$sel7,$sel7,$sel8,$sel9,$sel0);
asort($sela);
} else {$sela = array();}
if (isset($_POST['kbk2']) && !empty($_POST['kbk2'])) {
$jkpl = $_POST['kbk2'];
if ($jkpl == 'Kecil') {
$kpba = array(
"50","51","52","53","54","55","56","57","58","59","60","61","62","63","64","65","66","67","68","69","70","71","72","73","74","75","76","77","78","79","80","81","82","83","84","85","86","87","88","89","90","91","92","93","94","95","96","97","98","99");}
else if ($jkpl == 'Besar') {
$kpba = array(
"00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49");}
else {$kpba = array();}
} else {$kpba = array();}
if (isset($_POST['ebk2']) && !empty($_POST['ebk2'])) {
$jekr = $_POST['ebk2'];
if ($jekr == 'Kecil') {
$ekba = array(
"05","06","07","08","09","15","16","17","18","19","25","26","27","28","29","35","36","37","38","39","45","46","47","48","49","55","56","57","58","59","65","66","67","68","69","75","76","77","78","79","85","86","87","88","89","95","96","97","98","99");}
else if ($jekr == 'Besar') {
$ekba = array(
"00","01","02","03","04","10","11","12","13","14","20","21","22","23","24","30","31","32","33","34","40","41","42","43","44","50","51","52","53","54","60","61","62","63","64","70","71","72","73","74","80","81","82","83","84","90","91","92","93","94");}
else {$ekba = array();}
} else {$ekba = array();}
if (isset($_POST['kgj2']) && !empty($_POST['kgj2'])) {
$gkpl = $_POST['kgj2'];
if ($gkpl == 'Ganjil') {
$kpga = array(
"00","01","02","03","04","05","06","07","08","09","20","21","22","23","24","25","26","27","28","29","40","41","42","43","44","45","46","47","48","49","60","61","62","63","64","65","66","67","68","69","80","81","82","83","84","85","86","87","88","89");}
else if ($gkpl == 'Genap') {
$kpga = array(
"10","11","12","13","14","15","16","17","18","19","30","31","32","33","34","35","36","37","38","39","50","51","52","53","54","55","56","57","58","59","70","71","72","73","74","75","76","77","78","79","90","91","92","93","94","95","96","97","98","99");}
else {$kpga = array();}
} else {$kpga = array();}
if (isset($_POST['egj2']) && !empty($_POST['egj2'])) {
$gekr = $_POST['egj2'];
if ($gekr == 'Ganjil') {
$ekga = array(
"00","02","04","06","08","10","12","14","16","18","20","22","24","26","28","30","32","34","36","38","40","42","44","46","48","50","52","54","56","58","60","62","64","66","68","70","72","74","76","78","80","82","84","86","88","90","92","94","96","98");}
else if ($gekr == 'Genap') {
$ekga = array(
"01","03","05","07","09","11","13","15","17","19","21","23","25","27","29","31","33","35","37","39","41","43","45","47","49","51","53","55","57","59","61","63","65","67","69","71","73","75","77","79","81","83","85","87","89","91","93","95","97","99");}
else {$ekga = array();}
} else {$ekga = array();}
if (isset($_POST['homsil2']) && !empty($_POST['homsil2'])) {
$hsr = $_POST['homsil2'];
if ($hsr == 'Silang') {
$hsa = array(
"00","02","04","06","08","11","13","15","17","19","20","22","24","26","28","31","33","35","37","39","40","42","44","46","48","51","53","55","57","59","60","62","64","66","68","71","73","75","77","79","80","82","84","86","88","91","93","95","97","99");}
else if ($hsr == 'Homo') {
$hsa = array(
"01","03","05","07","09","10","12","14","16","18","21","23","25","27","29","30","32","34","36","38","41","43","45","47","49","50",
"52","54","56","58","61","63","65","67","69","70","72","74","76","78","81","83","85","87","89","90","92","94","96","98");}
else {$hsa = array();}
} else {$hsa = array();}
if (isset($_POST['ttepi2']) && !empty($_POST['ttepi2'])) {
$ttr = $_POST['ttepi2'];
if ($ttr == 'Tengah') {
$tta = array(
"00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","75","76","77","78","79","80","81","82","83","84","85","86","87","88","89","90","91","92","93","94","95","96","97","98","99");}
else if ($ttr == 'Tepi') {
$tta = array(
"25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59","60","61","62","63","64","65","66","67","68","69","70","71","72","73","74",);}
else {$tta = array();}
} else {$tta = array();}
if (isset($_POST['jbs2']) && !empty($_POST['jbs2'])) {
$jmbr = $_POST['jbs2'];
if ($jmbr == 'Jkecil') {
$jmba = array(
"05","06","07","08","09","14","15","16","17","18","23","24","25","26","27","32","33","34","35","36","41","42","43","44","45","50","51","52","53","54","59","60","61","62","63","68","69","70","71","72","77","78","79","80","81","86","87","88","89","90","95","96","97","98","99");}
else if ($jmbr == 'Jbesar') {
$jmba = array(
"00","01","02","03","04","10","11","12","13","19","20","21","22","28","29","30","31","37","38","39","40","46","47","48","49","55","56","57","58","64","65","66","67","73","74","75","76","82","83","84","85","91","92","93","94");}
else {$jmba = array();}
} else {$jmba = array();}
if (isset($_POST['jgj2']) && !empty($_POST['jgj2'])) {
$jmgr = $_POST['jgj2'];
if ($jmgr == 'Jganjil') {
$jmga = array(
"00","02","04","06","08","11","13","15","17","20","22","24","26","29","31","33","35","38","40","42","44","47","49","51","53","56","58","60","62","65","67","69","71","74","76","78","80","83","85","87","89","92","94","96","98");}
else if ($jmgr == 'Jgenap') {
$jmga = array(
"01","03","05","07","09","10","12","14","16","18","19","21","23","25","27","28","30","32","34","36","37","39","41","43","45","46","48","50","52","54","55","57","59","61","63","64","66","68","70","72","73","75","77","79","81","82","84","86","88","90","91","93","95","97","99");}
else {$jmga = array();}
} else {$jmga = array();}
if (isset($_POST['bangpi2']) && !empty($_POST['bangpi2'])) {
$kkr = $_POST['bangpi2'];
if ($kkr == 'Kembang') {
$kka = array(
"10","20","21","30","31","32","40","41","42","43","50","51","52","53","54","60","61","62","63","64","65","70","71","72","73","74","75","76","80","81","82","83","84","85","86","87","90","91","92","93","94","95","96","97","98");}
else if ($kkr == 'Kempis') {
$kka = array(
"01","02","03","04","05","06","07","08","09","12","13","14","15","16","17","18","19","23","24","25","26","27","28","29","34","35","36","37","38","39","45","46","47","48","49","56","57","58","59","67","68","69","78","79","89");}
else {$kka = array();}
} else {$kka = array();}
if (isset($_POST['idoff2']) && $_POST['idoff2'] != '') {
$lnof = array_map('trim',array_filter(explode('*',$_POST['idoff2']))); $loffa = array();
foreach ($lnof as $key) {
if (strlen($key) == 2) {
$loffa[] =$key;
}
}
} else {$loffa = array();}
if (isset($_POST['ctr2']) && $_POST['ctr2'] != '') {
$ids = splitNewLine($_POST['ctr2']);
$idse = count($ids);
for ($i = 0; $i < $idse; $i++) {
$kumate[] = permutations(array_diff($nomor,str_split($ids[$i])),2);
}
$kumata = array();
foreach($kumate as $arrct) {
if(is_array($arrct)) {$kumata = array_merge($kumata, $arrct);}
}
} else {$kumata = array();}
if (isset($_POST['unik2']) && !empty($_POST['unik2'])) {
if ($_POST['unik2'] == 'Nontwin') {$twina = array("00","11","22","33","44","55","66","77","88","99");}
else {$twina = array();}
} else {$twina = array();}
$array10a = array();
$array10a = array_filter(array_merge($array10a, $kepalaa, $ekora, $jaraka, $shioa, $jmla, $sela, $kpba, $ekba, $kpga, $ekga, $hsa, $tta, $jmba, $jmga, $kka, $loffa, $kumata, $twina));
asort($array10a);
$valxa = array_diff($lona, $array10a);
$cvalxai = count($valxa);
if(is_array($valxa)) {
foreach($valxa as $nilaai) {$nilaiai++; $numbai .= $nilaai.$pisah;}
}
if (isset($_POST['ids3']) && !empty($_POST['ids3'])) {
$ids3 = array_filter(explode("*", $_POST['ids3']), 'strlen' );
$lon3 = array();
foreach ($ids3 as $key) {
if (strlen($key) == 2) {
$lon3[] =$key;
}
}
asort($lon3);
} else {$lon3 = $asli;}
if (isset($_POST['kepala3']) && $_POST['kepala3'] != '') {
$kpl = str_split($_POST['kepala3']);
$multidimensionalk = array($kpl, $nomor);
$kepala3 = array();
$count = count($multidimensionalk);
for ($i = 0; $i < $count; $i++) {
$temp = array_map("permute",array($kepala3),array($multidimensionalk[$i]));
$kepala3 = $temp[0];
}
asort($kepala3);
} else {$kepala3 = array();}
if (isset($_POST['ekor3']) && $_POST['ekor3'] != '') {
$ekr = str_split($_POST['ekor3']);
$multidimensionale = array($nomor, $ekr);
$ekor3 = array();
$count = count($multidimensionale);
for ($i = 0; $i < $count; $i++) {
$temp = array_map("permute",array($ekor3),array($multidimensionale[$i]));
$ekor3 = $temp[0];
}
asort($ekor3);
} else {$ekor3 = array();}
if (isset($_POST['jalem13']) && $_POST['jalem13'] != '' && isset($_POST['jalem23']) && $_POST['jalem23'] != '') {
$jdr = $_POST['jalem13']; $jsr = $_POST['jalem23']; $jarak3 = array(); $angka ='';
if ($jsr > $jdr && strlen($jdr) > 1 && strlen($jdr) < 3 && strlen($jsr) > 1 && strlen($jsr) < 3 ) {
for ($i=$jdr; $i < ($jsr+1); $i++) {
if (strlen($i) < 2) {$angka = '0'.$i;} else {$angka = $i;}
$jarak3[] = $angka;}
}
} else {$jarak3 = array();}
if (isset($_POST['shio3']) && $_POST['shio3'] != '') {
$os = array_filter(explode(',', $_POST['shio3']), 'strlen' );
if (in_array("1", $os)) { $shio1 = array("01","13","25","37","49","61","73","85","97"); }else{ $shio1 = array(); }
if (in_array("2", $os)) { $shio2 = array("02","14","26","38","50","62","74","86","98"); }else{ $shio2 = array(); }
if (in_array("3", $os)) { $shio3 = array("03","15","27","39","51","63","75","87","99"); }else{ $shio3 = array(); }
if (in_array("4", $os)) { $shio4 = array("04","16","28","40","52","64","76","88","00"); }else{ $shio4 = array(); }
if (in_array("5", $os)) { $shio5 = array("05","17","29","41","53","65","77","89"); }else{ $shio5 = array(); }
if (in_array("6", $os)) { $shio6 = array("06","18","30","42","54","66","78","90"); }else{ $shio6 = array(); }
if (in_array("7", $os)) { $shio7 = array("07","19","31","43","55","67","79","91"); }else{ $shio7 = array(); }
if (in_array("8", $os)) { $shio8 = array("08","20","32","44","56","68","80","92"); }else{ $shio8 = array(); }
if (in_array("9", $os)) { $shio9 = array("09","21","33","45","57","69","81","93"); }else{ $shio9 = array(); }
if (in_array("10", $os)) { $shio10 = array("10","22","34","46","58","70","82","94"); }else{ $shio10 = array(); }
if (in_array("11", $os)) { $shio11 = array("11","23","35","47","59","71","83","95"); }else{ $shio11 = array(); }
if (in_array("12", $os)) { $shio12 = array("12","24","36","48","60","72","84","96"); }else{ $shio12 = array(); }
$shio33 = array_merge($shio1,$shio2,$shio3,$shio4,$shio5,$shio6,$shio7,$shio7,$shio8,$shio9,$shio10,$shio11,$shio12);
asort($shio33);
} else {$shio33 = array();}
if (isset($_POST['jml3']) && $_POST['jml3'] != '') {
$osh = str_split($_POST['jml3']);
if (in_array("1", $osh)) { $jml1= array("01","10","19","28","37","46","55","64","73","82","91"); }else{ $jml1= array(); }
if (in_array("2", $osh)) { $jml2= array("02","11","20","29","38","47","56","65","74","83","92"); }else{ $jml2= array(); }
if (in_array("3", $osh)) { $jml3= array("03","12","21","30","39","48","57","66","75","84","93"); }else{ $jml3= array(); }
if (in_array("4", $osh)) { $jml4= array("04","13","22","31","40","49","58","67","76","85","94"); }else{ $jml4= array(); }
if (in_array("5", $osh)) { $jml5= array("05","14","23","32","41","50","59","68","77","86","95"); }else{ $jml5= array(); }
if (in_array("6", $osh)) { $jml6= array("06","15","24","33","42","51","60","69","78","87","96"); }else{ $jml6= array(); }
if (in_array("7", $osh)) { $jml7= array("07","16","25","34","43","52","61","70","79","88","97"); }else{ $jml7= array(); }
if (in_array("8", $osh)) { $jml8= array("08","17","26","35","44","53","62","71","80","89","98"); }else{ $jml8= array(); }
if (in_array("9", $osh)) { $jml9= array("09","18","27","36","45","54","63","72","81","90","99"); }else{ $jml9= array(); }
if (in_array("0", $osh)) { $jml0= array("00"); }else{ $jml0 = array(); }
$jml33 = array_merge($jml1,$jml2,$jml3,$jml4,$jml5,$jml6,$jml7,$jml7,$jml8,$jml9,$jml0);
asort($jml33);
} else {$jml33 = array();}
if (isset($_POST['sls3']) && $_POST['sls3'] != '') {
$oshs = str_split($_POST['sls3']);
if (in_array("1", $oshs)) { $sel1= array("01","10","12","21","23","32","34","43","45","54","56","65","67","76","78","87","89","98"); }else{ $sel1= array(); }
if (in_array("2", $oshs)) { $sel2= array("02","20","13","31","24","42","35","53","46","64","57","75","68","86","79","97"); }else{ $sel2= array(); }
if (in_array("3", $oshs)) { $sel3= array("03","30","14","41","25","52","36","63","47","74","58","85","69","96"); }else{ $sel3= array(); }
if (in_array("4", $oshs)) { $sel4= array("04","40","15","51","26","62","37","73","48","84","59","95"); }else{ $sel4= array(); }
if (in_array("5", $oshs)) { $sel5= array("05","50","16","61","27","72","38","83","49","94"); }else{ $sel5= array(); }
if (in_array("6", $oshs)) { $sel6= array("06","60","17","71","28","82","39","93"); }else{ $sel6= array(); }
if (in_array("7", $oshs)) { $sel7= array("07","70","18","81","29","92"); }else{ $sel7= array(); }
if (in_array("8", $oshs)) { $sel8= array("08","80","19","91"); }else{ $sel8= array(); }
if (in_array("9", $oshs)) { $sel9= array("09","90"); }else{ $sel9= array(); }
if (in_array("0", $oshs)) { $sel0= array("00","11","22","33","44","55","66","77","88","99"); }else{ $sel0 = array(); }
$sel33 = array_merge($sel1,$sel2,$sel3,$sel4,$sel5,$sel6,$sel7,$sel7,$sel8,$sel9,$sel0);
asort($sel33);
} else {$sel33 = array();}
if (isset($_POST['kbk3']) && !empty($_POST['kbk3'])) {
$jkpl = $_POST['kbk3'];
if ($jkpl == 'Kecil') {
$kpb33 = array(
"50","51","52","53","54","55","56","57","58","59","60","61","62","63","64","65","66","67","68","69","70","71","72","73","74","75","76","77","78","79","80","81","82","83","84","85","86","87","88","89","90","91","92","93","94","95","96","97","98","99");}
else if ($jkpl == 'Besar') {
$kpb33 = array(
"00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49");}
else {$kpb33 = array();}
} else {$kpb33 = array();}
if (isset($_POST['ebk3']) && !empty($_POST['ebk3'])) {
$jekr = $_POST['ebk3'];
if ($jekr == 'Kecil') {
$ekb33 = array(
"05","06","07","08","09","15","16","17","18","19","25","26","27","28","29","35","36","37","38","39","45","46","47","48","49","55","56","57","58","59","65","66","67","68","69","75","76","77","78","79","85","86","87","88","89","95","96","97","98","99");}
else if ($jekr == 'Besar') {
$ekb33 = array(
"00","01","02","03","04","10","11","12","13","14","20","21","22","23","24","30","31","32","33","34","40","41","42","43","44","50","51","52","53","54","60","61","62","63","64","70","71","72","73","74","80","81","82","83","84","90","91","92","93","94");}
else {$ekb33 = array();}
} else {$ekb33 = array();}
if (isset($_POST['kgj3']) && !empty($_POST['kgj3'])) {
$gkpl = $_POST['kgj3'];
if ($gkpl == 'Ganjil') {
$kpg33 = array(
"00","01","02","03","04","05","06","07","08","09","20","21","22","23","24","25","26","27","28","29","40","41","42","43","44","45","46","47","48","49","60","61","62","63","64","65","66","67","68","69","80","81","82","83","84","85","86","87","88","89");}
else if ($gkpl == 'Genap') {
$kpg33 = array(
"10","11","12","13","14","15","16","17","18","19","30","31","32","33","34","35","36","37","38","39","50","51","52","53","54","55","56","57","58","59","70","71","72","73","74","75","76","77","78","79","90","91","92","93","94","95","96","97","98","99");}
else {$kpg33 = array();}
} else {$kpg33 = array();}
if (isset($_POST['egj3']) && !empty($_POST['egj3'])) {
$gekr = $_POST['egj3'];
if ($gekr == 'Ganjil') {
$ekg33 = array(
"00","02","04","06","08","10","12","14","16","18","20","22","24","26","28","30","32","34","36","38","40","42","44","46","48","50","52","54","56","58","60","62","64","66","68","70","72","74","76","78","80","82","84","86","88","90","92","94","96","98");}
else if ($gekr == 'Genap') {
$ekg33 = array(
"01","03","05","07","09","11","13","15","17","19","21","23","25","27","29","31","33","35","37","39","41","43","45","47","49","51","53","55","57","59","61","63","65","67","69","71","73","75","77","79","81","83","85","87","89","91","93","95","97","99");}
else {$ekg33 = array();}
} else {$ekg33 = array();}
if (isset($_POST['homsil3']) && !empty($_POST['homsil3'])) {
$hsr = $_POST['homsil3'];
if ($hsr == 'Silang') {
$hs33 = array(
"00","02","04","06","08","11","13","15","17","19","20","22","24","26","28","31","33","35","37","39","40","42","44","46","48","51","53","55","57","59","60","62","64","66","68","71","73","75","77","79","80","82","84","86","88","91","93","95","97","99");}
else if ($hsr == 'Homo') {
$hs33 = array(
"01","03","05","07","09","10","12","14","16","18","21","23","25","27","29","30","32","34","36","38","41","43","45","47","49","50",
"52","54","56","58","61","63","65","67","69","70","72","74","76","78","81","83","85","87","89","90","92","94","96","98");}
else {$hs33 = array();}
} else {$hs33 = array();}
if (isset($_POST['ttepi3']) && !empty($_POST['ttepi3'])) {
$ttr = $_POST['ttepi3'];
if ($ttr == 'Tengah') {
$tt33 = array(
"00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","75","76","77","78","79","80","81","82","83","84","85","86","87","88","89","90","91","92","93","94","95","96","97","98","99");}
else if ($ttr == 'Tepi') {
$tt33 = array(
"25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59","60","61","62","63","64","65","66","67","68","69","70","71","72","73","74",);}
else {$tt33 = array();}
} else {$tt33 = array();}
if (isset($_POST['jbs3']) && !empty($_POST['jbs3'])) {
$jmbr = $_POST['jbs3'];
if ($jmbr == 'Jkecil') {
$jmb33 = array(
"05","06","07","08","09","14","15","16","17","18","23","24","25","26","27","32","33","34","35","36","41","42","43","44","45","50","51","52","53","54","59","60","61","62","63","68","69","70","71","72","77","78","79","80","81","86","87","88","89","90","95","96","97","98","99");}
else if ($jmbr == 'Jbesar') {
$jmb33 = array(
"00","01","02","03","04","10","11","12","13","19","20","21","22","28","29","30","31","37","38","39","40","46","47","48","49","55","56","57","58","64","65","66","67","73","74","75","76","82","83","84","85","91","92","93","94");}
else {$jmb33 = array();}
} else {$jmb33 = array();}
if (isset($_POST['jgj3']) && !empty($_POST['jgj3'])) {
$jmgr = $_POST['jgj3'];
if ($jmgr == 'Jganjil') {
$jmg33 = array(
"00","02","04","06","08","11","13","15","17","20","22","24","26","29","31","33","35","38","40","42","44","47","49","51","53","56","58","60","62","65","67","69","71","74","76","78","80","83","85","87","89","92","94","96","98");}
else if ($jmgr == 'Jgenap') {
$jmg33 = array(
"01","03","05","07","09","10","12","14","16","18","19","21","23","25","27","28","30","32","34","36","37","39","41","43","45","46","48","50","52","54","55","57","59","61","63","64","66","68","70","72","73","75","77","79","81","82","84","86","88","90","91","93","95","97","99");}
else {$jmg33 = array();}
} else {$jmg33 = array();}
if (isset($_POST['bangpi3']) && !empty($_POST['bangpi3'])) {
$kkr = $_POST['bangpi3'];
if ($kkr == 'Kembang') {
$kk33 = array(
"10","20","21","30","31","32","40","41","42","43","50","51","52","53","54","60","61","62","63","64","65","70","71","72","73","74","75","76","80","81","82","83","84","85","86","87","90","91","92","93","94","95","96","97","98");}
else if ($kkr == 'Kempis') {
$kk33 = array(
"01","02","03","04","05","06","07","08","09","12","13","14","15","16","17","18","19","23","24","25","26","27","28","29","34","35","36","37","38","39","45","46","47","48","49","56","57","58","59","67","68","69","78","79","89");}
else {$kk33 = array();}
} else {$kk33 = array();}
if (isset($_POST['idoff3']) && $_POST['idoff3'] != '') {
$lnof = array_map('trim',array_filter(explode('*',$_POST['idoff3']))); $loff33 = array();
foreach ($lnof as $key) {
if (strlen($key) == 2) {
$loff33[] =$key;
}
}
} else {$loff33 = array();}
if (isset($_POST['ctr3']) && $_POST['ctr3'] != '') {
$idsok = splitNewLine($_POST['ctr3']);
$idseok = count($idsok);
for ($i = 0; $i < $idseok; $i++) {
$kumateok[] = permutations(array_diff($nomor,str_split($idsok[$i])),2);
}
$kumat33 = array();
foreach($kumateok as $arrctok) {
if(is_array($arrctok)) {$kumat33 = array_merge($kumat33, $arrctok);}
}
} else {$kumat33 = array();}
if (isset($_POST['unik3']) && !empty($_POST['unik3'])) {
if ($_POST['unik3'] == 'Nontwin') {$twin33 = array("00","11","22","33","44","55","66","77","88","99");}
else {$twin33 = array();}
} else {$twin33 = array();}
$array103 = array();
$array103 = array_filter(array_merge($array103, $kepala3, $ekor3, $jarak3, $shio33, $jml33, $sel33, $kpb33, $ekb33, $kpg33, $ekg33, $hs33, $tt33, $jmb33, $jmg33, $kk33, $loff33, $kumat33, $twin33));
asort($array103);
$valxa3 = array_diff($lon3, $array103);
$cvalxai3 = count($valxa3);
if(is_array($valxa3)) {
foreach($valxa3 as $nila3) {$numbi3 .= $nila3.$pisah;}
}
$hln3d = array();
if (isset($_POST['on3d'])) {
$ln3don = array_map('trim',array_filter(explode('*',$_POST['on3d'])));
$ln3d = array();
if(!empty($_POST['on3d'])) {
foreach ($ln3don as $keyd) {
if (strlen($keyd) == 4) {
$ln3d[] =$keyd;
}
}} else {$ln3d = $asli4;}
} else {$ln3d = $asli4;}
if (isset($_POST['mati3d']) && !empty($_POST['mati3d'])) {
$ln3doff = array_map('trim',array_filter(explode('*',$_POST['mati3d'])));
$ln3df = array();
foreach ($ln3doff as $keyd) {
if (strlen($keyd) == 4) {
$ln3df[] =$keyd;
}
}
} else {$ln3df = array();}
if (isset($_POST['ai3d']) && $_POST['ai3d'] != '') {
$idsd3 = splitNewLine($_POST['ai3d']);
$idsed3 = count($idsd3);
$arrayctt3 = array(); $kumatd3 = array();
for ($id3 = 0; $id3 < $idsed3; $id3++) {
$kumatd3[] = permutations(array_diff($nomor,str_split($idsd3[$id3])),4);
}
foreach($kumatd3 as $arrctt3) {
if(is_array($arrctt3)) {$arrayctt3 = array_merge($arrayctt3, $arrctt3);}
}
} else {$arrayctt3 = array();}
$offjum = array();
for($i=0;$i<37;$i++){
if(isset($_POST['4d_'.$i])) {
$offjum[] = $_POST['4d_'.$i];
}
}
$hoffjum = array();
if (!empty($offjum)) {
for ($i=0000; $i < 10000; $i++) {
if (strlen($i) == 1) { $i='000'.$i;}
if (strlen($i) == 2) { $i='00'.$i;}
if (strlen($i) == 3) { $i='0'.$i;}
$a = substr($i, 0, 1);
$c = substr($i, 1, 1);
$k = substr($i, 2, 1);
$e = substr($i, 3, 1);
$jj = $a+$c+$k+$e;
foreach ($offjum as $key) {
if ($key == $jj) {
$hoffjum[] = $i;
}
}
}
}
if(is_array($valx)) {
$dd = array();
foreach ($valxa3 as $i) {
$cek = kiri($i,1); $ceka = kanan($i,1);
foreach ($valx as $j) {
$cekb = kiri($j,1); $cekc = kanan($j,1);
foreach ($valxa as $k) {
$cekd = kiri($k,1); $ceke = kanan($k,1);
if($ceka == $cekb && $cekc == $cekd) {
$dd[] = $i.$k;
}
}
}
}
}
$tesh = array_filter($dd);
$end = array_values(array_diff($asli4, $tesh));
$arrayne = array();
$arrayne = array_merge($end, $ln3df, $arrayctt3 ,$hoffjum);
$hln3d = array_values(array_diff($ln3d, $arrayne));
//echo '<pre>';
//print_r($arrayne);
//echo '</pre>';
}
?>
<div class="row">
<div class="col-md-4 text-center">
<div class="card mt-2">
<div class="card-head text-center bg-warning">2D Depan <?php echo $cvalxai3;?> LN</div>
<div class="card-body p-0 m-0">
<textarea class="form-control" rows="6">
<?php echo $numbi3; ?>
</textarea>
</div>
</div>
</div>
<div class="col-md-4 text-center">
<div class="card mt-2">
<div class="card-head text-center bg-warning">2D Tengah <?php echo $cvalxi;?> LN</div>
<div class="card-body p-0 m-0">
<textarea class="form-control" rows="6">
<?php echo $numbi; ?>
</textarea>
</div>
</div>
</div>
<div class="col-md-4 text-center">
<div class="card mt-2">
<div class="card-head text-center bg-warning">2D Belakang <?php echo $cvalxai;?> LN</div>
<div class="card-body p-0 m-0">
<textarea class="form-control" rows="6">
<?php echo $numbai; ?>
</textarea>
</div>
</div>
</div>
<div class="col-md-12 text-center">
<div class="card mt-2">
<div class="card-head text-center bg-warning">4D <?php echo count($hln3d);?> LN</div>
<div class="card-body p-0 m-0">
<textarea class="form-control" rows="9">
<?php foreach($hln3d as $rowh){
echo $rowh.$pisah;
} ?>
</textarea>
</div>
</div>
</div>
</div>
<?php return ob_get_clean(); } ?>