Advertisement
Guest User

coba test malu

a guest
Dec 5th, 2019
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.32 KB | None | 0 0
  1. <?php require('sakacalendar.php') ?>
  2. <?php
  3.  
  4. function hitung_abc($tgl1, $tgl2='')
  5. {
  6.     $a = substr($tgl1, 8, 2);
  7.     $b = substr($tgl1, 5, 2);
  8.     $c = substr($tgl1, 0, 2);
  9.     $d = substr($tgl1, 2, 2);
  10.  
  11.     if(!empty($tgl2))
  12.     {
  13.         $aa = substr($tgl2, 8, 2);
  14.         $bb = substr($tgl2, 5, 2);
  15.         $cc = substr($tgl2, 0, 2);
  16.         $dd = substr($tgl2, 2, 2);
  17.  
  18.         $a = $a + ((int)$aa%9);
  19.         $b = $b + $bb;
  20.         $c = $c + $cc;
  21.         $d = $d + $dd;
  22.     }
  23.  
  24.     $a1 = substr($a,0,1);
  25.     $a2 = substr($a,1,1);
  26.     $b1 = substr($b,0,1);
  27.     $b2 = substr($b,1,1);
  28.     $c1 = substr($c,0,1);
  29.     $c2 = substr($c,1,1);
  30.     $d1 = substr($d,0,1);
  31.     $d2 = substr($d,1,1);
  32.  
  33.     $ax = $a1+$a2;
  34.     $ax1 = substr($ax,0,1);
  35.     $ax2 = substr($ax,1,1);
  36.     $ay = $ax1+$ax2;
  37.  
  38.     $bx = $b1+$b2;
  39.     $bx1 = substr($bx,0,1);
  40.     $bx2 = substr($bx,1,1);
  41.     $by = $bx1+$bx2;
  42.  
  43.     $cx = $c1+$c2;
  44.     $cx1 = substr($cx,0,1);
  45.     $cx2 = substr($cx,1,1);
  46.     $cy = $cx1+$cx2;
  47.  
  48.     $dx = $d1+$d2;
  49.     if($dx == 0) $dx = 5;
  50.     else $dx = $d1+$d2;
  51.     $dx1 = substr($dx,0,1);
  52.     $dx2 = substr($dx,1,1);
  53.     $dy = $dx1+$dx2;
  54.  
  55.     $e = $ay + $by;
  56.     $e1 = substr($e,0,1);
  57.     $e2 = substr($e,1,1);
  58.     $ex = $e1+$e2;
  59.  
  60.     $f = $cy + $dy;
  61.     $f1 = substr($f,0,1);
  62.     $f2 = substr($f,1,1);
  63.     $fx = $f1+$f2;
  64.  
  65.     $g = $ex + $fx;
  66.     $g1 = substr($g,0,1);
  67.     $g2 = substr($g,1,1);
  68.     $gx = $g1+$g2;
  69.  
  70.     $h = $fx + $gx;
  71.     $h1 = substr($h,0,1);
  72.     $h2 = substr($h,1,1);
  73.     $hx = $h1+$h2;
  74.  
  75.     $i = $ex + $gx;
  76.     $i1 = substr($i,0,1);
  77.     $i2 = substr($i,1,1);
  78.     $ix = $i1+$i2;
  79.  
  80.     $j = $hx + $ix;
  81.     $j1 = substr($j,0,1);
  82.     $j2 = substr($j,1,1);
  83.     $jx = $j1+$j2;
  84.  
  85.     $k = $ay + $ex;
  86.     $k1 = substr($k,0,1);
  87.     $k2 = substr($k,1,1);
  88.     $kx = $k1+$k2;
  89.  
  90.     $l = $by + $ex;
  91.     $l1 = substr($l,0,1);
  92.     $l2 = substr($l,1,1);
  93.     $lx = $l1+$l2;
  94.  
  95.     $m = $cy + $fx;
  96.     $m1 = substr($m,0,1);
  97.     $m2 = substr($m,1,1);
  98.     $mx = $m1+$m2;
  99.  
  100.     $n = $dy + $fx;
  101.     $n1 = substr($n,0,1);
  102.     $n2 = substr($n,1,1);
  103.     $nx = $n1+$n2;
  104.  
  105.     return array(
  106.         "A" => $ay,
  107.         "B" => $by,
  108.         "C" => $cy,
  109.         "D" => $dy,
  110.         "E" => $ex,
  111.         "F" => $fx,
  112.         "G" => $gx,
  113.         "H" => $hx,
  114.         "I" => $ix,
  115.         "J" => $jx,
  116.         "K" => $kx,
  117.         "L" => $lx,
  118.         "M" => $mx,
  119.         "N" => $nx
  120.     );
  121. }
  122.  
  123. ?>
  124.  
  125.  
  126.  
  127.  
  128. <!DOCTYPE html>
  129. <html lang="en">
  130.     <head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  131.         <title><?php echo $_SERVER['HTTP_HOST']; ?> - Ramalan Pasangan Suami Istri</title>
  132.         <meta name="keyword" content="tradisi tenung dan keyakinan di Bali">
  133.         <meta name="description" content="Ramalan perjodohan, ramalan pasangan suami dan istri, ramalan pasangan pacaran, tenung patemon, prembon jodoh">
  134.         <meta name="robot" content="noindex, nofollow">
  135.         <meta name="language" content="indonesia">
  136.         <meta name="resource-type" content="document" />
  137.        
  138.         <meta name="viewport" content="width=device-width, initial-scale=1.0">
  139.  
  140.     </head>
  141.         <body>
  142.                            
  143.             <div class="container">
  144.                 <a class="type1" href="#"><font face="Arial" size="2" color="black">masukan tanggal Lahir</font> <font face="Arial" size="2" color="blue"><b>(tahun-bulan-tanggal)</font></b></a>
  145.                         <?php
  146.                             $tgl1 = isset($_GET['tanggal1'])?$_GET['tanggal1']:date(' ');
  147.                             $tgl2 = isset($_GET['tanggal2'])?$_GET['tanggal2']:date(' ');
  148.  
  149.                             $abc = hitung_abc($tgl1, $tgl2);
  150.  
  151.                             $tanggal1 = new SakaCalendar($tgl1);
  152.                             $tanggal2 = new SakaCalendar($tgl2);
  153.                         ?>
  154.  
  155.                             <form action="" method="get">
  156.                                 Anda <input size="10" id="tanggal1" type="text" maxlength="10" name="tanggal1" value=""></br>
  157.                                 Pasangan Anda <input size="10" id="tanggal2" type="text" maxlength="10" name="tanggal2" value=""></br>
  158.                                 <button class="btn btn-xs btn-info">SUBMIT</button>
  159.                             </form>
  160.             </div> 
  161. </br>
  162.            
  163.                 <strong><?php echo date('d F Y', strtotime($tgl1)); ?></strong>
  164.             <div class="container">            
  165.                 <?php
  166.                     $abcd = hitung_abc($tgl1);
  167.                     $ay = $abc['A'];
  168.                     $by = $abc['B'];
  169.                     $cy = $abc['C'];
  170.                     $dy = $abc['D'];
  171.                     $ex = $abc['E'];
  172.                     $fx = $abc['F'];
  173.                     $gx = $abc['G'];
  174.                     $hx = $abc['H'];
  175.                     $ix = $abc['I'];
  176.                     $jx = $abc['J'];
  177.                     $kx = $abc['K'];
  178.                     $lx = $abc['L'];
  179.                     $mx = $abc['M'];
  180.                     $nx = $abc['N'];
  181.                 ?>
  182.                 <table border="0" style="width: 300px; text-align: center; font-size: 10pt;">
  183.                     <tr>
  184.                         <td>&nbsp;</td>
  185.                         <td><?php echo $abc["A"] ?></td>
  186.                         <td><?php echo $abc["B"] ?></td>
  187.                         <td><?php echo $abc["C"] ?></td>
  188.                         <td><?php echo $abc["D"] ?></td>
  189.                         <td>&nbsp;</td>
  190.                        
  191.                     </tr>
  192.                     <tr>
  193.                         <td></td>
  194.                         <td></td>
  195.                         <td><?php echo $abc["E"] ?></td>
  196.                         <td><?php echo $abc["F"] ?></td>
  197.                         <td></td>
  198.                         <td></td>
  199.                         <td>&nbsp;</td>
  200.                        
  201.                     </tr>
  202.                     <tr>
  203.                         <td><?php echo $abc["K"] ?></td>
  204.                         <td><?php echo $abc["L"] ?></td>
  205.                         <td colspan="2"><?php echo $abc["G"] ?></td>
  206.                         <td><?php echo $abc["M"] ?></td>
  207.                         <td><?php echo $abc["N"] ?></td>
  208.                         <td>&nbsp;</td>
  209.                        
  210.                     </tr>
  211.                     <tr>
  212.                         <td></td>
  213.                         <td></td>
  214.                         <td><?php echo $abc["H"] ?></td>
  215.                         <td><?php echo $abc["I"] ?></td>
  216.                         <td></td>
  217.                         <td></td>
  218.                         <td>&nbsp;</td>
  219.                        
  220.                     </tr>
  221.                     <tr>
  222.                         <td></td>
  223.                         <td></td>
  224.                         <td colspan="2"><?php echo $abc["J"] ?></td>
  225.                         <td></td>
  226.                         <td></td>
  227.                         <td>&nbsp;</td>
  228.                    
  229.                     </tr>
  230.                 </table>
  231.             </div>
  232.        
  233.         </br>
  234.        
  235.         <strong><?php echo date('d F Y', strtotime($tgl2)); ?></strong>
  236.     </body>
  237. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement