diff --git a/getAllMonthlyTanggalKegiatan.php b/getAllMonthlyTanggalKegiatan.php index 92ba0c504b798479756e67e047ee82ce4d71c196..8c50f3945325d23e239ca11edbeaf5fe73405e92 100755 --- a/getAllMonthlyTanggalKegiatan.php +++ b/getAllMonthlyTanggalKegiatan.php @@ -12,7 +12,6 @@ require 'dbConnect.php'; -$requestedMonth = $_GET['month']; $requestedYear = $_GET['year']; $stmt = $conn->query( "SELECT DAY(`tanggal_kegiatan`) FROM `kegiatan` diff --git a/getAllTanggalHariBesarTigaTahun.php b/getAllTanggalHariBesarTigaTahun.php new file mode 100644 index 0000000000000000000000000000000000000000..bfed74250b04e4cb31828edfc2c779e73643020f --- /dev/null +++ b/getAllTanggalHariBesarTigaTahun.php @@ -0,0 +1,29 @@ +<?php + +/** + * PHP Version 7 + * Mengambil seluruh konten hari besar dari bulan tertentu. + * @category Kalender + * @package Komunitas-PMO + * @author Francisco Kenandi <13515140@std.stei.itb.ac.id> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @link http://pear.php.net/package/komunitas-pmo + */ + +require 'dbConnect.php'; + +$requestedMonth = $_GET["month"]; +$requestedYear = $_GET["year"]; +$stmt = $conn->query( + "SELECT `tgl` FROM `hari_besar` + WHERE ((YEAR(`tgl`) >= ".$requestedYear-1.") AND (YEAR(`tgl`)<=".$requestedYear+1."))" +); +$count = $stmt->num_rows; +$res = array(); +$fixed = array(); +while ($row = $stmt->fetch_assoc()) { + $res[] = $row; +} + +echo json_encode($res); +$conn->close(); \ No newline at end of file diff --git a/getAllTanggalKegiatanTigaTahun.php b/getAllTanggalKegiatanTigaTahun.php new file mode 100644 index 0000000000000000000000000000000000000000..77ed83d06d6c2fe31d9fae7d3afa6862552e58d0 --- /dev/null +++ b/getAllTanggalKegiatanTigaTahun.php @@ -0,0 +1,31 @@ +<?php + +/** + * PHP Version 7 + * Mengambil seluruh konten kegiatan pada tanggal dan bulan tertentu. + * @category Kegiatan + * @package Komunitas-PMO + * @author Francisco Kenandi <13515140@std.stei.itb.ac.id> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @link http://pear.php.net/package/komunitas-pmo + */ + +require 'dbConnect.php'; + +$requestedYear = $_GET['year']; +$stmt = $conn->query( + "SELECT `tanggal_kegiatan` FROM `kegiatan` + WHERE ((YEAR(`tanggal_kegiatan`)>=".$requestedYear-1.") AND (YEAR(`tanggal_kegiatan`)<=".$requestedYear+1."))" +); +$count = $stmt->num_rows; +$res = array(); +$fixed = array(); +while ($row = $stmt->fetch_assoc()) { + $res[] = $row; +} + +// tambahin manager yah + +echo json_encode($res); + +$conn->close(); \ No newline at end of file