Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function cekbulanini($waktu,$id)
- {
- $stmt = $this->db->prepare("SELECT * FROM bayar WHERE id = $id");
- $stmt->execute();
- if($stmt->rowCount()>0)
- {
- while($row=$stmt->fetch(PDO::FETCH_ASSOC))
- {
- ?>
- <?php
- if ($row[$waktu] == 'Y') {
- echo "<span class='label label-sm label-success'>Telah Dibayar </span>";
- } elseif ($row[$waktu] == 'N') {
- echo "BELUM";
- } else {
- echo "ERROR";
- }
- }
- ?>
- <?php
- }
- else
- {
- ?>
- <tr>
- <td>Nothing here...</td>
- </tr>
- <?php
- }
- }
- public function daftarsiswa()
- {
- $stmt = $this->db->prepare("SELECT * FROM siswa");
- $stmt->execute();
- if($stmt->rowCount()>0)
- {
- while($row=$stmt->fetch(PDO::FETCH_ASSOC))
- {
- $id = $row['id'];
- ?>
- <tr class="odd gradeX">
- <td>
- <input type="checkbox" class="checkboxes" value="1"/>
- </td>
- <td>
- <?php print $row['nama']; ?>
- </td>
- <td>
- <a href="mailto:[email protected]">
- [email protected] </a>
- </td>
- <td>
- <?php print $row['nomerinduk']; ?>
- </td>
- <td class="center">
- <?php print $row['kelas']; ?>
- </td>
- <td class="center">
- <?= cekbulanini($id,$waktu); ?>
- </td>
- </tr>
- <?php
- }
- }
- else
- {
- ?>
- <tr>
- <td>Nothing here...</td>
- </tr>
- <?php
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement