$content .= '<div class="border">'; $content .= '<table width="100%">'; $JUDULCAL = array(); $TMPpesan = array(); $awalbulandengannol = $t['mon'] >= 10 ? $t['mon'] : '0' . $t['mon']; $varwaktucalender = $t['year'] . '-' . $awalbulandengannol . '-' . $t['mday']; $awalbulandengannol2 = $u['mon'] >= 10 ? $u['mon'] : '0' . $u['mon']; $varwaktucalender2 = $u['year'] . '-' . $awalbulandengannol2 . '-' . $u['mday']; $cekdate = mysql_query("SELECT `judul`,`waktu_mulai`,`waktu_akhir`,`isi` FROM `tbl_kalender` WHERE `waktu_mulai` = '{$varwaktucalender}' OR `waktu_akhir` = '{$varwaktucalender2}' ORDER BY `waktu_mulai`"); while ($getdate = mysql_fetch_assoc($cekdate)) { // print_r($getdate); $WKTMULAI = $getdate['waktu_mulai']; $WKTAKHIR = $getdate['waktu_akhir']; $GTTGL = (int) substr($WKTMULAI, -2, 2); $TGLMULAI[$GTTGL] = $GTTGL; // $JUDULCAL[$GTTGL] = $getdate['judul']; $idssss = '<b>' . $getdate['judul'] . '</b><br><small>Periode Awal : ' . converttgl($WKTMULAI) . '<br>Periode Akhir : ' . converttgl($WKTAKHIR) . '</small> <br>' . limitTXT($getdate['isi'], 150) . ''; $content .= '<tr><td style="font-weight:bold;border-bottom:solid 1px #efefef">' . $getdate['judul'] . '</td></tr>'; $content .= '<tr><td style="color:orange">' . converttgl($WKTMULAI) . ' S/D ' . converttgl($WKTAKHIR) . '</td></tr>'; $content .= '<tr><td style="border-bottom:solid 1px #efefef">' . nl2br($getdate['isi']) . '</td></tr>'; $content .= '<tr><td> </td></tr>'; } $content .= '</table>'; $content .= '</div>'; } echo $content; ?>
if (!array_key_exists($i, $TMPpesan__)) { $TMPpesan__[$i] = '<b>' . $getdate['judul'] . '</b><br /><span style="color:orange;">' . converttgl($WKTMULAI) . ' S/D ' . converttgl($WKTAKHIR) . '</span> <br />' . limitTXT($getdate['isi'], 150) . ''; } else { $TMPpesan__[$i] = $TMPpesan__[$i] . '<br /><b>' . $getdate['judul'] . '</b><br /><span style="color:orange;">' . converttgl($WKTMULAI) . ' S/D ' . converttgl($WKTAKHIR) . '</span> <br />' . limitTXT($getdate['isi'], 150) . ''; } } } if (!array_key_exists($GTTGL, $JUDULCAL)) { $JUDULCAL[$GTTGL] = $getdate['judul']; $TMPpesan[$GTTGL] = '<b>' . $getdate['judul'] . '</b><br /><span style="color:orange;size:8px;">' . converttgl($WKTMULAI) . ' S/D ' . converttgl($WKTAKHIR) . '</span> <br />' . limitTXT($getdate['isi'], 150) . ''; } else { $JUDULCAL[$GTTGL] = $JUDULCAL[$GTTGL] . ', ' . $getdate['judul']; $TMPpesan[$GTTGL] = $TMPpesan[$GTTGL] . '<br /><b>' . $getdate['judul'] . '</b><br /><span style="color:orange;">' . converttgl($WKTMULAI) . ' S/D ' . converttgl($WKTAKHIR) . '</span> <br />' . limitTXT($getdate['isi'], 150) . ''; } } for ($i = $start_date; $day <= 42; $i += 86400, $day++) { $valitemselectedday = date('j', $i); $TGLMULAI[$valitemselectedday] = isset($TGLMULAI[$valitemselectedday]) ? $TGLMULAI[$valitemselectedday] : NULL; if ($day % 7 == 1) { $cals .= "<tr>\n"; $red[0] = '<span style="color:red">'; $red[1] = '</span>'; } else { $red[0] = ''; $red[1] = ''; } if ($t['mon'] == date('n', $i)) {