<script src="https://code.jquery.com/jquery-3.6.0.js" integrity="sha256-H+K7U5CnXl1h5ywQfKtSj8PCmoN9aaq30gDh27Xc0jk=" crossorigin="anonymous"></script>
<script type="text/javascript">
 var d=0;
                    a = new Array();
                      
                    
                    // ========================================================
                    
                    
                    function GeneratePermutations4() {
                      var inputstring =window.document.interfaceform.inputstring.value;
                      inputstring =removeSpaces(inputstring);
                      if (inputstring=="") return;
                    
                      var maxoutput=window.document.interfaceform.maxoutput.value;
                      maxoutput=removeSpaces(maxoutput);
                    
                      //var display_list=window.document.interfaceform'.$form3++.'.chkbx_display.checked;
                      var allow_adjacent_equals=window.document.interfaceform.chkbx_allow.checked;
                      var wrap_output=window.document.interfaceform.chkbx_wrap.checked;
                      var circular_only=window.document.interfaceform.chkbx_circular.checked;
                      var derange_only=window.document.interfaceform.chkbx_derange.checked;
                      var shuffle=window.document.interfaceform.chkbx_shuffle.checked;
                    
                      var maxwidth=window.document.interfaceform.maxwidth4.value;
                      maxwidth=removeSpaces(maxwidth);
                    
                      var comma_separated=window.document.interfaceform.chkbx_comma.checked;
                    
                    // Show status.
                    //      This does not work, since Javascript has no way to flush the output during function execution.
                    //      If you find a SIMPLE way, please let me know?  Thanks - DVdm
                    //
                    window.document.interfaceform.permlist4.value = "";
                    
                    // if (display_list) {
                    //     window.document.interfaceform.feedback.value = "Generating..."
                    //   } else {
                    //     window.document.interfaceform.feedback.value = "Counting..."
                    //   }
                    
                    // Get time
                    //
                      var currentDate = new Date();
                      var seconds = currentDate.valueOf()
                      
                    // Automatic comma separation check (maybe later)
                    //
                      if ( inputstring.indexOf(',') >-1 ) {
                          comma_separated=true;
                          window.document.interfaceform.chkbx_comma.checked=true;
                      } else {
                          comma_separated=false;
                          window.document.interfaceform.chkbx_comma.checked=false;
                      }
                    
                      var delimiter = "";
                      if (wrap_output) {
                          if (comma_separated)
                              delimiter = "  ";
                          else
                              delimiter = "*";
                          } else {
                              delimiter = "\n";
                      }
                      var delimwidth = delimiter.length;
                    
                      var chars = new Array();
                      var charray = new Array();
                      var frequency = new Array();
                      var inputchar, ii, jj, cc, ccc, numchars, nn=0;
                    
                      if (comma_separated) {
                          chars = inputstring.split(",");
                          numchars = chars.length;
                        } else {
                        numchars = inputstring.length;
                        for (ii=0; ii<numchars; ii++) chars[ii] = inputstring.charAt(ii);
                      }
                    
                      for (ii=0; ii<numchars; ii++) {
                        inputchar = chars[ii];
                        cc = -1;
                        for (ccc=0; ccc<charray.length; ccc++) { if (inputchar == charray[ccc]) cc = ccc; }
                        if (cc<0) {
                          charray[charray.length] = inputchar;
                          frequency[frequency.length] = 1;
                        } else {
                          frequency[cc]++;
                        }
                      }
                    
                      d = 0;
                      for (ii=0; ii<frequency.length; ii++) {
                        cc = frequency[ii];
                        for (jj=0; jj<cc; jj++) {
                          a[d] = nn;
                          d++;
                        }
                        nn++;
                      }
                    
                      var perms = 0;
                      var output_text = delimiter;
                      var new_perm = "";
                      var circular = false;
                      var test_perm = "";
                      var okay = true;
                      var firstcomma = -1;
                      var busy = true
                      var ellipsis = "";
                      var atleast = "";
                      var insertat = 0;
                      var dmax=d;
                      if (maxwidth > 0) {
                        if (maxwidth <= d) {
                          dmax = maxwidth;
                        } 
                      }
                    
                      do {
                        if ( (allow_adjacent_equals) || (! Adjacent_equals()) ) {
                        
                          okay = true;
                          new_perm = "";
                          
                          if (comma_separated) {
                    
                            for (ii=0; ii<dmax; ii++) {
                              new_perm = new_perm + charray[a[ii]];
                              if (ii<dmax-1) new_perm = new_perm+",";
                            }
                            if (maxwidth > 0) {
                              if ( output_text.indexOf(new_perm+delimiter) >-1 ) okay = false;    // yes, this is dirty
                            }
                            if (circular_only) {
                              test_perm = new_perm;
                              test_perm_len = test_perm.length;
                              for (ii=0; ii<dmax-1; ii++) {
                                firstcomma = test_perm.indexOf(",");
                                test_perm = test_perm.substring(firstcomma+1,test_perm_len) + "," + test_perm.substring(0,firstcomma);
                                if ( output_text.indexOf(test_perm) >-1 ) {
                                  okay = false;
                                  break;
                                }
                              }
                            }
                            if (derange_only) {
                              for (ii=0; ii<dmax; ii++) {
                                if ( charray[a[ii]] == chars[ii]) {
                                  okay = false;
                                  break;
                                }
                              }
                            }
                    
                          } else {
                    
                            for (ii=0; ii<dmax; ii++) {
                              new_perm = new_perm + charray[a[ii]];
                            }
                            if (maxwidth > 0) {
                              if ( output_text.indexOf(new_perm+delimiter) >-1 ) okay = false;    // yes yes, dirty
                            }
                            if (circular_only) {
                              test_perm = new_perm;
                              for (ii=0; ii<dmax-1; ii++) {
                                test_perm = test_perm.substring(1,dmax) + test_perm.substring(0,1);
                                if ( output_text.indexOf(test_perm) >-1 ) okay = false;
                              }
                            }
                            if (derange_only) {
                              for (ii=0; ii<dmax; ii++) {
                                if ( charray[a[ii]] == chars[ii]) {
                                  okay = false;
                                  break;
                                }
                              }
                            }
                    
                          }
                    
                          if (okay) {
                            perms++;
                      if (shuffle) {
                          insertat = (new_perm.length+delimwidth) * Math.round( ((output_text.length-1)*Math.random())/(new_perm.length+delimwidth) );
                          insertat = (output_text).indexOf(delimiter,insertat)+delimwidth;
                          if (insertat < delimwidth) insertat = delimwidth;
                          output_text = output_text.substring(0,insertat) + new_perm + delimiter + output_text.substring(insertat,output_text.length);
                      } else {
                          output_text = output_text + new_perm + delimiter;   // even if display_list = false !!!
                      }
                    
                      if (!(maxoutput == "") && (perms >= maxoutput) ) {
                          busy = false;
                          ellipsis = "..."
                          atleast = "at least "
                      }
                          }
                        }
                      } while(nextperm() && busy);
                    
                      currentDate = new Date();
                      seconds = Math.round( ( currentDate.valueOf() - seconds ) / 100 ) / 10;      // round to 1/10 of a second
                      // window.document.interfaceform.feedback.value = "Jumlah: " + atleast + perms + "   -   Waktu: " + seconds + " detik"
                    //   if (display_list) {
                        window.document.interfaceform.permlist4.value = output_text.substring(delimiter.length) + ellipsis;
                    
                    //   } else {
                    //     window.document.interfaceform.permlist.value = "";
                    //   }
                    }
                    
                    
                    //================================================================
                    // TIGADBBFS
                    function GeneratePermutations3() {
                      var inputstring =window.document.interfaceform.inputstring.value;
                      inputstring=removeSpaces(inputstring);
                      if (inputstring=="") return;
                    
                      var maxoutput=window.document.interfaceform.maxoutput.value;
                      maxoutput=removeSpaces(maxoutput);
                    
                      //var display_list=window.document.interfaceform'.$form17++.'.chkbx_display.checked;
                      var allow_adjacent_equals=window.document.interfaceform.chkbx_allow.checked;
                      var wrap_output=window.document.interfaceform.chkbx_wrap.checked;
                      var circular_only=window.document.interfaceform.chkbx_circular.checked;
                      var derange_only=window.document.interfaceform.chkbx_derange.checked;
                      var shuffle=window.document.interfaceform.chkbx_shuffle.checked;
                    
                      var maxwidth=window.document.interfaceform.maxwidth3.value;
                      maxwidth=removeSpaces(maxwidth);
                    
                      var comma_separated=window.document.interfaceform.chkbx_comma.checked;
                    
                    // Show status.
                    //      This does not work, since Javascript has no way to flush the output during function execution.
                    //      If you find a SIMPLE way, please let me know?  Thanks - DVdm
                    //
                    window.document.interfaceform.permlist3.value = "";
                    
                    // if (display_list) {
                    //     window.document.interfaceform.feedback.value = "Generating..."
                    //   } else {
                    //     window.document.interfaceform.feedback.value = "Counting..."
                    //   }
                    
                    // Get time
                    //
                      var currentDate = new Date();
                      var seconds = currentDate.valueOf()
                      
                    // Automatic comma separation check (maybe later)
                    //
                      if ( inputstring.indexOf(',') >-1 ) {
                          comma_separated=true;
                          window.document.interfaceform.chkbx_comma.checked=true;
                      } else {
                          comma_separated=false;
                          window.document.interfaceform.chkbx_comma.checked=false;
                      }
                    
                      var delimiter = "";
                      if (wrap_output) {
                          if (comma_separated)
                              delimiter = "  ";
                          else
                              delimiter = "*";
                          } else {
                              delimiter = "\n";
                      }
                      var delimwidth = delimiter.length;
                    
                      var chars = new Array();
                      var charray = new Array();
                      var frequency = new Array();
                      var inputchar, ii, jj, cc, ccc, numchars, nn=0;
                    
                      if (comma_separated) {
                          chars = inputstring.split(",");
                          numchars = chars.length;
                        } else {
                        numchars = inputstring.length;
                        for (ii=0; ii<numchars; ii++) chars[ii] = inputstring.charAt(ii);
                      }
                    
                      for (ii=0; ii<numchars; ii++) {
                        inputchar = chars[ii];
                        cc = -1;
                        for (ccc=0; ccc<charray.length; ccc++) { if (inputchar == charray[ccc]) cc = ccc; }
                        if (cc<0) {
                          charray[charray.length] = inputchar;
                          frequency[frequency.length] = 1;
                        } else {
                          frequency[cc]++;
                        }
                      }
                    
                      d = 0;
                      for (ii=0; ii<frequency.length; ii++) {
                        cc = frequency[ii];
                        for (jj=0; jj<cc; jj++) {
                          a[d] = nn;
                          d++;
                        }
                        nn++;
                      }
                    
                      var perms = 0;
                      var output_text = delimiter;
                      var new_perm = "";
                      var circular = false;
                      var test_perm = "";
                      var okay = true;
                      var firstcomma = -1;
                      var busy = true
                      var ellipsis = "";
                      var atleast = "";
                      var insertat = 0;
                      var dmax=d;
                      if (maxwidth > 0) {
                        if (maxwidth <= d) {
                          dmax = maxwidth;
                        } 
                      }
                    
                      do {
                        if ( (allow_adjacent_equals) || (! Adjacent_equals()) ) {
                        
                          okay = true;
                          new_perm = "";
                          
                          if (comma_separated) {
                    
                            for (ii=0; ii<dmax; ii++) {
                              new_perm = new_perm + charray[a[ii]];
                              if (ii<dmax-1) new_perm = new_perm+",";
                            }
                            if (maxwidth > 0) {
                              if ( output_text.indexOf(new_perm+delimiter) >-1 ) okay = false;    // yes, this is dirty
                            }
                            if (circular_only) {
                              test_perm = new_perm;
                              test_perm_len = test_perm.length;
                              for (ii=0; ii<dmax-1; ii++) {
                                firstcomma = test_perm.indexOf(",");
                                test_perm = test_perm.substring(firstcomma+1,test_perm_len) + "," + test_perm.substring(0,firstcomma);
                                if ( output_text.indexOf(test_perm) >-1 ) {
                                  okay = false;
                                  break;
                                }
                              }
                            }
                            if (derange_only) {
                              for (ii=0; ii<dmax; ii++) {
                                if ( charray[a[ii]] == chars[ii]) {
                                  okay = false;
                                  break;
                                }
                              }
                            }
                    
                          } else {
                    
                            for (ii=0; ii<dmax; ii++) {
                              new_perm = new_perm + charray[a[ii]];
                            }
                            if (maxwidth > 0) {
                              if ( output_text.indexOf(new_perm+delimiter) >-1 ) okay = false;    // yes yes, dirty
                            }
                            if (circular_only) {
                              test_perm = new_perm;
                              for (ii=0; ii<dmax-1; ii++) {
                                test_perm = test_perm.substring(1,dmax) + test_perm.substring(0,1);
                                if ( output_text.indexOf(test_perm) >-1 ) okay = false;
                              }
                            }
                            if (derange_only) {
                              for (ii=0; ii<dmax; ii++) {
                                if ( charray[a[ii]] == chars[ii]) {
                                  okay = false;
                                  break;
                                }
                              }
                            }
                    
                          }
                    
                          if (okay) {
                            perms++;
                      if (shuffle) {
                          insertat = (new_perm.length+delimwidth) * Math.round( ((output_text.length-1)*Math.random())/(new_perm.length+delimwidth) );
                          insertat = (output_text).indexOf(delimiter,insertat)+delimwidth;
                          if (insertat < delimwidth) insertat = delimwidth;
                          output_text = output_text.substring(0,insertat) + new_perm + delimiter + output_text.substring(insertat,output_text.length);
                      } else {
                          output_text = output_text + new_perm + delimiter;   // even if display_list = false !!!
                      }
                    
                      if (!(maxoutput == "") && (perms >= maxoutput) ) {
                          busy = false;
                          ellipsis = "..."
                          atleast = "at least "
                      }
                          }
                        }
                      } while(nextperm() && busy);
                    
                      currentDate = new Date();
                      seconds = Math.round( ( currentDate.valueOf() - seconds ) / 100 ) / 10;      // round to 1/10 of a second
                      // window.document.interfaceform.feedback.value = "Jumlah: " + atleast + perms + "   -   Waktu: " + seconds + " detik"
                    //   if (display_list) {
                        window.document.interfaceform.permlist3.value = output_text.substring(delimiter.length) + ellipsis;
                    
                    //   } else {
                    //     window.document.interfaceform.permlist.value = "";
                    //   }
                    }
                    
                    //==================================================
                    
                    //DUAD BBFS
                    
                    function GeneratePermutations() {
                      var inputstring=window.document.interfaceform.inputstring.value;
                      inputstring=removeSpaces(inputstring);
                      if (inputstring=="") return;
                    
                      var maxoutput=window.document.interfaceform.maxoutput.value;
                      maxoutput=removeSpaces(maxoutput);
                    
                      //var display_list=window.document.interfaceform'.$form31++.'.chkbx_display.checked;
                      var allow_adjacent_equals=window.document.interfaceform.chkbx_allow.checked;
                      var wrap_output=window.document.interfaceform.chkbx_wrap.checked;
                      var circular_only=window.document.interfaceform.chkbx_circular.checked;
                      var derange_only=window.document.interfaceform.chkbx_derange.checked;
                      var shuffle=window.document.interfaceform.chkbx_shuffle.checked;
                    
                      var maxwidth=window.document.interfaceform.maxwidth.value;
                      maxwidth=removeSpaces(maxwidth);
                    
                      var comma_separated=window.document.interfaceform.chkbx_comma.checked;
                    
                    // Show status.
                    //      This does not work, since Javascript has no way to flush the output during function execution.
                    //      If you find a SIMPLE way, please let me know?  Thanks - DVdm
                    //
                    window.document.interfaceform.permlist.value = "";
                    
                    // if (display_list) {
                    //     window.document.interfaceform.feedback.value = "Generating..."
                    //   } else {
                    //     window.document.interfaceform.feedback.value = "Counting..."
                    //   }
                    
                    // Get time
                    //
                      var currentDate = new Date();
                      var seconds = currentDate.valueOf()
                      
                    // Automatic comma separation check (maybe later)
                    //
                      if ( inputstring.indexOf(',') >-1 ) {
                          comma_separated=true;
                          window.document.interfaceform.chkbx_comma.checked=true;
                      } else {
                          comma_separated=false;
                          window.document.interfaceform.chkbx_comma.checked=false;
                      }
                    
                      var delimiter = "";
                      if (wrap_output) {
                          if (comma_separated)
                              delimiter = "  ";
                          else
                              delimiter = "*";
                          } else {
                              delimiter = "\n";
                      }
                      var delimwidth = delimiter.length;
                    
                      var chars = new Array();
                      var charray = new Array();
                      var frequency = new Array();
                      var inputchar, ii, jj, cc, ccc, numchars, nn=0;
                    
                      if (comma_separated) {
                          chars = inputstring.split(",");
                          numchars = chars.length;
                        } else {
                        numchars = inputstring.length;
                        for (ii=0; ii<numchars; ii++) chars[ii] = inputstring.charAt(ii);
                      }
                    
                      for (ii=0; ii<numchars; ii++) {
                        inputchar = chars[ii];
                        cc = -1;
                        for (ccc=0; ccc<charray.length; ccc++) { if (inputchar == charray[ccc]) cc = ccc; }
                        if (cc<0) {
                          charray[charray.length] = inputchar;
                          frequency[frequency.length] = 1;
                        } else {
                          frequency[cc]++;
                        }
                      }
                    
                      d = 0;
                      for (ii=0; ii<frequency.length; ii++) {
                        cc = frequency[ii];
                        for (jj=0; jj<cc; jj++) {
                          a[d] = nn;
                          d++;
                        }
                        nn++;
                      }
                    
                      var perms = 0;
                      var output_text = delimiter;
                      var new_perm = "";
                      var circular = false;
                      var test_perm = "";
                      var okay = true;
                      var firstcomma = -1;
                      var busy = true
                      var ellipsis = "";
                      var atleast = "";
                      var insertat = 0;
                      var dmax=d;
                      if (maxwidth > 0) {
                        if (maxwidth <= d) {
                          dmax = maxwidth;
                        } 
                      }
                    
                      do {
                        if ( (allow_adjacent_equals) || (! Adjacent_equals()) ) {
                        
                          okay = true;
                          new_perm = "";
                          
                          if (comma_separated) {
                    
                            for (ii=0; ii<dmax; ii++) {
                              new_perm = new_perm + charray[a[ii]];
                              if (ii<dmax-1) new_perm = new_perm+",";
                            }
                            if (maxwidth > 0) {
                              if ( output_text.indexOf(new_perm+delimiter) >-1 ) okay = false;    // yes, this is dirty
                            }
                            if (circular_only) {
                              test_perm = new_perm;
                              test_perm_len = test_perm.length;
                              for (ii=0; ii<dmax-1; ii++) {
                                firstcomma = test_perm.indexOf(",");
                                test_perm = test_perm.substring(firstcomma+1,test_perm_len) + "," + test_perm.substring(0,firstcomma);
                                if ( output_text.indexOf(test_perm) >-1 ) {
                                  okay = false;
                                  break;
                                }
                              }
                            }
                            if (derange_only) {
                              for (ii=0; ii<dmax; ii++) {
                                if ( charray[a[ii]] == chars[ii]) {
                                  okay = false;
                                  break;
                                }
                              }
                            }
                    
                          } else {
                    
                            for (ii=0; ii<dmax; ii++) {
                              new_perm = new_perm + charray[a[ii]];
                            }
                            if (maxwidth > 0) {
                              if ( output_text.indexOf(new_perm+delimiter) >-1 ) okay = false;    // yes yes, dirty
                            }
                            if (circular_only) {
                              test_perm = new_perm;
                              for (ii=0; ii<dmax-1; ii++) {
                                test_perm = test_perm.substring(1,dmax) + test_perm.substring(0,1);
                                if ( output_text.indexOf(test_perm) >-1 ) okay = false;
                              }
                            }
                            if (derange_only) {
                              for (ii=0; ii<dmax; ii++) {
                                if ( charray[a[ii]] == chars[ii]) {
                                  okay = false;
                                  break;
                                }
                              }
                            }
                    
                          }
                    
                          if (okay) {
                            perms++;
                      if (shuffle) {
                          insertat = (new_perm.length+delimwidth) * Math.round( ((output_text.length-1)*Math.random())/(new_perm.length+delimwidth) );
                          insertat = (output_text).indexOf(delimiter,insertat)+delimwidth;
                          if (insertat < delimwidth) insertat = delimwidth;
                          output_text = output_text.substring(0,insertat) + new_perm + delimiter + output_text.substring(insertat,output_text.length);
                      } else {
                          output_text = output_text + new_perm + delimiter;   // even if display_list = false !!!
                      }
                    
                      if (!(maxoutput == "") && (perms >= maxoutput) ) {
                          busy = false;
                          ellipsis = "..."
                          atleast = "at least "
                      }
                          }
                        }
                      } while(nextperm() && busy);
                    
                      currentDate = new Date();
                      seconds = Math.round( ( currentDate.valueOf() - seconds ) / 100 ) / 10;      // round to 1/10 of a second
                      // window.document.interfaceform.feedback.value = "Jumlah: " + atleast + perms + "   -   Waktu: " + seconds + " detik"
                    //   if (display_list) {
                        window.document.interfaceform.permlist.value = output_text.substring(delimiter.length) + ellipsis;
                    
                    //   } else {
                    //     window.document.interfaceform.permlist.value = "";
                    //   }
                    }
                    
                    $(document).ready(function(){
                        GeneratePermutations();
                        GeneratePermutations3();
                        GeneratePermutations4();
                    });
                    
                    // ========================================================
                    function removeSpaces(string) {
                      var tstring = "";
                      var i;
                      string = '' + string;
                      splitstring = string.split(" ");
                      for(i = 0; i < splitstring.length; i++)
                      tstring += splitstring[i];
                      return tstring;
                    }
                    
                    // ========================================================
                    function Adjacent_equals() {
                      var ii;
                      for (ii=0; ii<d-1; ii++) {
                        if (a[ii] == a[ii+1]) return(true);
                      }
                      return(false);
                    }
                    
                    // ========================================================
                    function nextperm() {
                      var i, j, k, swap, s, si;
                    
                      for (k=d-2; k>=0; k--) {
                        if (a[k] < a[k+1]) {
                          s  = a[k+1];
                          si = k+1;
                          for (i=k+2; i<d; i++) {
                            if ((a[i]>a[k])&&(a[i]<s)) {
                              s = a[i];
                              si = i;
                            }
                          }
                          swap  = a[si];
                          a[si] = a[k];
                          a[k]  = swap;
                          for (i=k+1; i<d-1; i++) {
                            for (j=i+1; j<d; j++) {
                              if (a[i]>a[j]) {
                                swap = a[i];
                                a[i] = a[j];
                                a[j] = swap;
                              }
                            }
                          }
                          return(true);
                        }
                      }
                      return(false);
                    }
</script>

<?php 
require '../assets/config-data.php';

$pas = mysqli_real_escape_string($data, $_REQUEST['prepasaran']);
$angkamain = rand(12345, 99999);
$ashio = rand(0, 11);

$spre = "SELECT * FROM prediksi_togel WHERE pasaran_prediksi = '$pas' AND DATE(tanggal_prediksi) = '$todaydate'";
$qpre = mysqli_query($data, $spre);

if(mysqli_num_rows($qpre) > 0) {
    echo '<script>
                alert("Prediksi Pasaran '.$pas.' sudah ditambahkan sebelumnya. Gagal tambah prediksi.");
                window.location.href = "../dashboard.php?hal=prediksi";
    </script>';
} else {

$iprediksi = "INSERT INTO prediksi_togel(pasaran_prediksi, angka_main, tanggal_prediksi) VALUES('$pas', '$angkamain', '$today')";
$qprediksi = mysqli_query($data, $iprediksi);

if($qprediksi) {
    $shio = ['Harimau', 'Kerbau', 'Tikus', 'Babi', 'Anjing', 'Ayam', 'Monyet', 'Kambing', 'Kuda', 'Ular', 'Naga', 'Kelinci',];
    $colokb = substr($angkamain, 1, 1) . " / " . substr($angkamain, 4, 1);
    $colokdua = substr($angkamain, 2, 2) . " / " . substr($angkamain, 1, 2);
    $colokshio = $shio[$ashio];

    $upredik = "UPDATE prediksi_togel SET colok_bebas = '$colokb', colok_duad = '$colokdua', colok_shio = '$colokshio' WHERE pasaran_prediksi = '$pas' AND DATE(tanggal_prediksi) = '$todaydate' ";
    $qpredik = mysqli_query($data, $upredik);

    echo '
    
    <div style="display: none;">
                  <form name="interfaceform" method="POST">
                
                  <div>
                  <input name="maxoutput" size="10" type="hidden" />
                  <input checked="checked" name="chkbx_allow" type="hidden" value="ON" />
                  <input name="chkbx_circular" type="hidden" value="ON" />
                  <input name="chkbx_derange" type="hidden" value="ON" />
                  <input checked="checked" name="chkbx_wrap" type="hidden" value="ON" />
                  <input name="chkbx_shuffle" type="hidden" value="ON" />
                  </div>
                  <input type="hidden" id="pasarans" value="'.$pas.'">
                  <input disabled="disabled" name="chkbx_comma" type="hidden" value="ON" />
                  
                  <input id="tarung" name="inputstring" size="20" value="'.$angkamain.'" />
                  <input type="hidden" name="maxwidth" size="10" value="2" />
                  <input type="text" id="permjadi" name="permlist" style="font-size: 16px; width: 655px;" wrap="virtual">

                  <input type="hidden" name="maxwidth3" size="10" value="3" />
                  <input type="text" id="permjadi3" name="permlist3" style="font-size: 16px; width: 655px;" wrap="virtual">

                  <input type="hidden" name="maxwidth4" size="10" value="4" />
                  <input type="text" id="permjadi4" name="permlist4" style="font-size: 16px; width: 655px;" wrap="virtual">

                  </form>
</div>
    
    
    <script>
                          
    $(document).ready(function(){
      var duadbb = document.getElementById("permjadi").value;
      var tigadbb = document.getElementById("permjadi3").value;
      var empatdbb = document.getElementById("permjadi4").value;
      var pasaran = document.getElementById("pasarans").value;
      $.ajax({
        url: "processprediksi.php",
        type: "POST",
        data: {\'duadbb\': duadbb, \'tigadbb\': tigadbb, \'empatdbb\': empatdbb, \'pasaranbb\' : pasaran },
        success: function (datas) {
                alert(datas);
                window.location.href = "../dashboard.php?hal=prediksi";
        },
      });
  });

</script>';

    // echo '
    // <script>
    //     alert("Image Banner add Successfully!!");
    //     window.location.href = "../dashboard.php";
    // </script>
    // ';

}

}

?>
