This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| require_once 'config/db_config.php'; | |
| $sql = "SELECT *, DATE_FORMAT(timestamp, '%Y-%c-%e') selector FROM events WHERE DATE_FORMAT(timestamp, '%Y-%c') = '".$_POST['d']."' ORDER BY timestamp, id ASC"; | |
| $query = mysqli_query($link, $sql); | |
| if (mysqli_num_rows($query) > 0){ | |
| $data = array(); | |
| while ($recset = mysqli_fetch_array($query)){ | |
| if(!array_key_exists($recset["selector"], $data)){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(function() { | |
| tbody = $("tbody"); | |
| $.ajax({ | |
| dataType: "json", | |
| type: "POST", | |
| data: { action: "select" }, | |
| url: "./php/events_table.php", | |
| beforeSend: function() { tbody.html("<td colspan=\"4\" style=\"text-align: center; padding: 50px 0px;\">Loading events...</td>"); }, | |
| success: function(data) { | |
| getEventsTable(data); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(function() { | |
| tbody = $("tbody"); | |
| $.ajax({ | |
| dataType: "json", | |
| type: "POST", | |
| data: { action: "select" }, | |
| url: "./php/events_table.php", | |
| beforeSend: function() { tbody.html("<td colspan=\"4\" style=\"text-align: center; padding: 50px 0px;\">Loading events...</td>"); }, | |
| success: function(data) { | |
| getEventsTable(data); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $("form#search>input:text").on("keyup", function (event) { | |
| event.preventDefault(); | |
| var search_q = $(this).serializeArray(); | |
| search_q[search_q.length] = { | |
| "name": "action", | |
| "value": "select" | |
| }; | |
| $.ajax({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var d = new Date(); | |
| var day = d.getDate(), | |
| month = d.getMonth() + 1, | |
| year = d.getFullYear(), | |
| days_number = daysInMonth(month, year), | |
| actual_d = d.getDate(), | |
| actual_m = d.getMonth() + 1, | |
| actual_y = d.getFullYear(); | |
| function firstDay(month, year) { | |
| return new Date(year, (month - 1), 1).getDay(); // Sunday is 0, Monday is 1... |
OlderNewer