MOON
Server: Apache
System: Linux server30c.hostingraja.org 5.14.0-611.49.2.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Apr 30 09:05:08 EDT 2026 x86_64
User: seoprovi (1222)
PHP: 5.6.40
Disabled: NONE
Upload Files
File: /home/seoprovi/safelogisticsmovers.com1/royalyantra.com/result-chart-select.php
<?php
include 'DBController.php';
$db_handle = new DBController();
$dateResult = $db_handle->runQuery("SELECT DISTINCT date FROM result ORDER BY date ASC");
?>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>
	RoyalYantra.com
	</title>
	<meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
	<link href="../Assets/css/result.css" rel="stylesheet" />
	</head>
<body>
    <style>
        .modal-lg {
            max-width: 99%;
        }
        .modal-body{
            height: 450px;
            overflow-y: auto;
        }
        .GridView {
            border-collapse: separate;
            padding: 3px;
            border-style:double;
            width: 100%;
            border: 1px solid #6d6d6d;
            background-color: #feeeb3;
            font-family: Calibri;
            font-weight: bold;
        }
        .GridView th {
            border: solid 1px #6d6d6d;
            text-align: center;
        }
        .GridView td {
            border: solid 1px #6d6d6d;
        }
        .GridViewHeader {
            text-align: center;
            background-color: #f6eeaf;
            font-size: 17px;
            font-weight: bold;
            color: #f40447;
            height: 30px;
        }
        .GridViewHeader th {
            border: 1px solid #6d6d6d;
        }
        .GridViewRowStyle {
            text-align: center;
            background-color: #d9cf94;
            font-size: 15px;
            color: #000000;
            height: 40px;
            font-weight: bold;
        }
        .GridViewAlternateRowStyle {
            text-align: center;
            background-color: #f6eeaf;
            font-size: 15px;
            color: #000000;
            height: 40px;
            font-weight: bold;
        }
    </style>
   
<table>
    <tr>
        <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
    </tr>
    <tr>
        <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
        <td>
            <a href="https://www.royalyantra.com/Web/BulkCoupons/default.php" onclick='window.close();' style='color:blue;font-weight:bold;'>
                Back To Royal Yantra
            </a>
        </td>
    </tr>
</table>
<form>
    <table >
        
        <tr>
            <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
            <td>
                <center>
                    <font size=2 color=yellow face=arial>
                        <b><h4>Select Date : &nbsp;</h4></b>
                    </font>
                </center>
            </td>
            <td>
                <?php
                    $build = array(
                        array('day', '1', '31', 'j'),
                        array('month', '1', '12', 'm'),
                        array('year', '2019', date('Y'), 'Y')
                    );
                    $doc = new DOMDocument();
                    foreach ($build as $item) {
                        $menu = $doc->createElement('select');
                        $menu->setAttribute('name', $item[0]);
                        for ($x=$item[1]; $x<=$item[2]; $x++) {
                            $b = $item[3];
                            $opt = $doc->createElement('option');
                            $opt->setAttribute('value', $x);
                            $opt->nodeValue = date($item[3], mktime(0,0,0,($b=='m'?$x:1),($b=='j'?$x:1),($b=='Y'?$x:1)));
                            $menu->appendChild($opt);
                        }
                        $doc->appendChild($menu);
                    }
                    echo $doc->saveHTML();
                ?>
            </td>
            <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
            <td>
                <input type="submit" value="Submit" id="Filter" style="color:red;" />
            </td>
        </tr>
    </table>
    <br>
</form>
<!-- Modal -->
  <div class="modal fade" id="myModal" role="dialog">
    <div class="modal-dialog modal-lg">
      <div class="modal-content" style="background-color: #f66e92;" >
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal">&times;</button>
          <h4 class="modal-title text-center" style="font-weight: bold;" > Date : <span id="dateId" style="color:yellow;"> </span></h4>
        </div>
        <div class="modal-body" id="loaddata">
          
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        </div>
      </div>
    </div>
  </div>
<script>
    $('form').on('submit', function (e) {
        e.preventDefault();
        var formdata = $('form').serializeArray();
        var fetchdate = formdata[0]['value']+'/'+formdata[1]['value']+'/'+formdata[2]['value'];
        // var date = new Date(fetchdate);
        // var newDate = date.toDateString('d/m/y');
        $.ajax({
            
            type: 'POST',
            url: 'result-chart-query.php',
            // data: "&day=" + day + "&month=" + month + "&year=" + year,
            data: $('form').serialize(),
            success: function(data) {
            var response = JSON.parse(data);
            var html = '';
            var dataHtml = '';
            if (response != null) {
                var i;
                for (i = 0; i < response.length; i++) {
                dataHtml += `<tr class="GridViewAlternateRowStyle">
                            <td >${response[i]['time']}</td>
                            <td >${response[i]['number1']}</td>
                            <td >${response[i]['number2']}</td>
                            <td >${response[i]['number3']}</td>
                            <td >${response[i]['number4']}</td>
                            
                        </tr>`;
                }
            }else{
                dataHtml += `<tr>
                                <td class="text-danger text-center" colspan="6">No records found</td>
                            </tr>`;
            };
            html =`<table class="GridView" width="100%" cellspacing="2" cellpadding="4" border="0">
                <tr class="GridViewHeader">
                    <th>ड्रा टाइम</th>
                    <th>Rajarani Yantra</th>
                    <th>Rajarani Bengal</th>
                    <th>Rajarani Bhootnath</th>
                    <th>Rajarani Dimond</th>
                </tr>
                ${dataHtml}
                <tr>
                    <td colspan="5" align="center" valign="middle" style="background-color: #1b6ff5; color: #ffffff; font-size: 14px; height: 50px;">
                        Orignal Mumbai Maharashtra Lottery Draw
                    </td>
                </tr>
            </table>`;
                $(".modal-body").html();
                $(".modal-title").html();
                $("#myModal").modal('show');
                $("#dateId").html(fetchdate);
                $(".modal-body").html(html);
            },
            error: function(e) {
                alert("Try again after some time! ");
            }
        });
    });
    
</script>
</body>
</html>