<font class="title"><?php echo xlt('Office Notes'); ?> </font> <font class="more"><?php echo text($tmore); ?> </font></a> <br> <table border=0 width=100%> <?php //retrieve all active notes if ($result = getOnoteByDate("", 1, "date,body,user", "all", 0)) { $notes_count = 0; //number of notes so far displayed foreach ($result as $iter) { if ($notes_count >= $N) { //we have more active notes to print, but we've reached our display maximum (defined at top of this file) print "<tr><td colspan=3 align=center><a target=Main href='office_comments_full.php?active=1' class='alert' onclick='top.restoreSession()'>" . xlt("Some office notes were not displayed. Click here to view all.") . "</a></td></tr>\n"; break; } if (getdate() == strtotime($iter["date"])) { $date_string = "Today, " . date("D F dS", strtotime($iter["date"])); } else { $date_string = date("D F dS", strtotime($iter["date"])); } print "<tr><td width=20% valign=top><font class='bold'>" . text($date_string) . "</font> <font class='bold'>(" . text($iter["user"]) . ")</font><br>" . "<font class='text'>" . text($iter["body"]) . "</font></td></tr>\n"; $notes_count++;
"> <input type="hidden" name="active" value="<?php echo $active; ?> "> <br/> <a href="javascript:document.update_activity.submit();" class="link_submit">[<?php xl('Change Activity', 'e'); ?> ]</a> <table border="0" class="existingnotes"> <?php //display all of the notes for the day, as well as others that are active from previous dates, up to a certain number, $N //retrieve all notes if ($result = getOnoteByDate("", $active, "id,date,body,user,activity", $N, $offset)) { $result_count = 0; foreach ($result as $iter) { $result_count++; if (getdate() == strtotime($iter["date"])) { $date_string = "Today, " . date("D F dS", strtotime($iter["date"])); } else { $date_string = date("D F dS", strtotime($iter["date"])); } if ($iter["activity"]) { $checked = "checked"; } else { $checked = ""; } print "<tr><td><input type=hidden value='' name='act" . $iter["id"] . "' id='act" . $iter["id"] . "'>"; print "<input name='box" . $iter["id"] . "' id='box" . $iter["id"] . "' onClick='javascript:document.update_activity.act" . $iter["id"] . ".value=this.checked' type=checkbox {$checked}></td>";