Esempio n. 1
0
         echo '<script>var url="/requestajax/request-note.php?from=home&filter=following&id_k_default=' . $id_k_default . '&filter_category=1";</script>';
         $jum_groups_array = mysql_fetch_array(mysql_query("SELECT COUNT(catatan.kode) AS jum FROM ikut RIGHT JOIN user ON ikut.mengikuti=user.kode_user INNER JOIN catatan ON user.kode_user=catatan.pembuat WHERE user.kode_user='******' or ikut.user='******'" . $q_kategori_default));
         $jum_groups = ceil($jum_groups_array['jum'] / 7);
     }
     if ($jum_groups_array['jum'] == 0) {
         echo '<div class="wrap-message-jum-0">';
         echo 'Tidak ada catatan yang dapat ditampilkan.';
         echo '</div>';
     } else {
         $catatan->tampil_catatan();
         $last_post = $catatan->get_last_post();
     }
 } else {
     $status = new status();
     if (isset($_GET['filter']) && $_GET['filter'] == 'all') {
         $status->set_req('home', 'all', null);
         echo '<script>var url="/requestajax/request-status.php?from=home&filter=all";</script>';
         $jum_groups_array = mysql_fetch_array(mysql_query("SELECT COUNT(id_status) as jum FROM status"));
         $jum_groups = ceil($jum_groups_array['jum'] / 7);
     } else {
         $status->set_req('home', 'following', null);
         echo '<script>var url="/requestajax/request-status.php?from=home&filter=following";</script>';
         $jum_groups_array = mysql_fetch_array(mysql_query("SELECT COUNT(status.id_status) AS jum FROM ikut RIGHT JOIN user ON ikut.mengikuti=user.kode_user INNER JOIN status ON user.kode_user=status.id_user WHERE ikut.user='******' OR user.kode_user='******'"));
         $jum_groups = ceil($jum_groups_array['jum'] / 7);
     }
     if ($jum_groups_array['jum'] == 0) {
         echo '<div class="wrap-message-jum-0">';
         echo 'Tidak ada status yang dapat ditampilkan.';
         echo '</div>';
     } else {
         $status->tampil_status();