</td></tr> <tr><td><label for="purge_all"> <?php etranslate('Check box to delete ALL events for a user'); ?> :</label></td> <td valign="bottom"> <input type="checkbox" name="purge_all" value="Y" id="purge_all" onclick="toggle_datefields( 'dateArea', this );" /> </td></tr> <tr id="dateArea"><td><label> <?php etranslate('Delete all events before'); ?> :</label></td><td> <?php echo date_selection('end_', date('Ymd')); ?> </td></tr> <tr><td><label for="purge_deleted"> <?php etranslate('Purge deleted only'); ?> :</label></td> <td valign="bottom"> <input type="checkbox" name="purge_deleted" value="Y" /> </td></tr> <tr><td><label for="preview"> <?php etranslate('Preview delete'); ?> :</label></td>
<td> <input type="checkbox" name="use_all_dates" id="exportall" ' . 'value="y" onclick="toggle_datefields( \'dateArea\', this );" /> <label for="exportall">' . translate('Export all dates') . '</label> </td> </tr> <tr> <td colspan="2"> <table id="dateArea"> <tr> <td><label>' . translate('Start date') . ':</label></td> <td>' . date_selection('from', $dateYmd) . '</td> </tr> <tr> <td><label>' . translate('End date') . ':</label></td> <td>' . date_selection('end', $dateYmd) . '</td> </tr> <tr> <td><label>' . translate('Modified since') . ':</label></td> <td>' . date_selection('mod', mktime(0, 0, 0, $datem, date('d') - 7, $dateY)) . '</td> </tr> </table> </td> </tr> <tr> <td colspan="2"><input type="submit" value="' . translate('Export') . '" /></td> </tr> </table> </form> '; ob_end_flush(); echo print_trailer();
<td> <select name="date_filter" id="date_filter" onchange="toggleDateRange()"> <option value="0"' . $selected . '>' . translate('All Dates') . '</option> <option value="1">' . translate('Past') . '</option> <option value="2">' . translate('Upcoming') . '</option> <option value="3">' . translate('Range') . '</option> </select> </td> </tr> <tr id="startDate" style="visibility:hidden"> <td> <label>' . translate('Start date') . ':</label></td> <td>' . date_selection('from_', $dateYmd) . '</td> </tr> <tr id="endDate" style="visibility:hidden"> <td> <label>' . translate('End date') . ':</label></td> <td>' . date_selection('until_', $dateYmd) . '</td> </tr>'; } if ($show_others) { $users = get_my_users('', 'view'); // Get non-user calendars (if enabled) if (!empty($NONUSER_ENABLED) && $NONUSER_ENABLED == 'Y') { $nonusers = get_my_nonusers($login, true, 'view'); $users = !empty($NONUSER_AT_TOP) && $NONUSER_AT_TOP == 'Y' ? array_merge($nonusers, $users) : array_merge($users, $nonusers); } $cnt = count($users); if ($cnt > 50) { $size = 15; } elseif ($cnt > 10) { $size = 10; } else {
function dbtable_to_html($tablear, $valuesar, $action = '', $formname = '', $actionlabel = '', $hidden = '') { global $CELLBG; $checked = ' checked="checked"'; $noStr = translate('No'); $yesStr = translate('Yes'); if (!is_array($tablear)) { return 'Error: dbtable_to_html parameter 1 is not an array!<br />' . "\n"; } $ret = ' <table> <tr> <td style="background-color:#000000;"> <table style="border:0; width:100%;" cellspacing="1" cellpadding="2"> <tr> <td style="width:100%; background-color:' . $CELLBG . ';"> <table style="border:0; width:100%;">'; if (!empty($action)) { $ret .= ' <form action="' . $action . '" method="post"' . (empty($formname) ? '' : ' name="' . $formname . '"') . '>'; if (is_array($hidden)) { for ($i = 0, $cnt = count($hidden); $i < $cnt; $i += 2) { $ret .= ' <input type="hidden" name="' . $hidden[$i] . '" value="' . $hidden[$i + 1] . '" />'; } } } for ($i = 0, $cnt = count($tablear); $i < $cnt; $i++) { if (!empty($tablear[$i]['hide'])) { continue; } if (!empty($action) && !empty($tablear[$i]['calculated'])) { continue; } if ($tablear[$i]['type'] == 'dbdate') { // '2006-12-31' $y = substr($valuesar[$i], 0, 4); $m = substr($valuesar[$i], 5, 2); $d = substr($valuesar[$i], 8, 2); } $ret .= ' <tr> <td style="vertical-align:top;">' . (empty($tablear[$i]['prompt']) ? ' ' : '<b' . (empty($tablear[$i]['tooltip']) ? '' : ' class="tooltip" title="' . $tablear[$i]['tooltip'] . '"') . '>' . $tablear[$i]['prompt'] . ':</b>') . '</td> <td style="vertical-align:top;">'; if (empty($tablear[$i]['noneditable']) && !empty($action)) { if (in_array($tablear[$i]['type'], array('float', 'int', 'text'))) { $ret .= ' <input type="text" name="' . $tablear[$i]['name'] . '"' . (empty($tablear[$i]['maxlength']) ? '' : ' maxlength="' . $tablear[$i]['maxlength'] . '"') . (empty($tablear[$i]['length']) ? '' : ' size="' . $tablear[$i]['length'] . '"') . (empty($valuesar[$i]) ? '' : ' value="' . htmlspecialchars($valuesar[$i]) . '"') . ' />'; } elseif ($tablear[$i]['type'] == 'boolean') { $ret .= ' <input type="radio" value="Y" name="' . $tablear[$i]['name'] . '"' . ($valuesar[$i] == 'Y' ? $checked : '') . '>' . $yesStr . ' <input type="radio" value="N" name="' . $tablear[$i]['name'] . '"' . ($valuesar[$i] != 'Y' ? $checked : '') . '>' . $noStr; } elseif ($tablear[$i]['type'] == 'date') { $ret .= date_selection($tablear[$i]['name'], $valuesar[$i]); } elseif ($tablear[$i]['type'] == 'dbdate') { $ret .= date_selection($tablear[$i]['name'], sprintf("%04d%02d%02d", $y, $m, $d)); } else { $ret .= '(type ' . $tablear[$i]['type'] . ' not supported)'; } } else { if (!empty($valuesar[$i])) { if (in_array($tablear[$i]['type'], array('float', 'int', 'text'))) { $ret .= htmlentities($valuesar[$i]); } elseif ($tablear[$i]['type'] == 'boolean') { $ret .= empty($valuesar[$i]) || $valuesar[$i] == 'Y' ? $yesStr : $noStr; } elseif ($tablear[$i]['type'] == 'date') { $ret .= date_to_str($valuesar[$i]); } elseif ($tablear[$i]['type'] == 'dbdate') { $ret .= date_to_str(sprintf("%04d%02d%02d", $y, $m, $d)); } else { $ret .= '(type ' . $tablear[$i]['type'] . ' not supported)'; } } } $ret .= ' </td> </tr>'; } return $ret . (empty($actionlabel) ? '' : ' <tr> <td colspan="2" style="text-align:center;"><input ' . 'type="submit" value="' . htmlspecialchars($actionlabel) . '" /></td> </tr> </form>') . ' </table> </td> </tr> </table> </td> </tr> </table>'; }
<tr> <td class="tooltip"><label>' . translate('Send Reminder') . ':</label></td> <td colspan="3"> <input type="hidden" name="rem_action" value="' . (empty($reminder['action']) ? 'EMAIL' : $reminder['action']) . '" /> <input type="hidden" name="rem_last_sent" value="' . (empty($reminder['last_sent']) ? 0 : $reminder['last_sent']) . '" /> <input type="hidden" name="rem_times_sent" value="' . (empty($reminder['times_sent']) ? 0 : $reminder['times_sent']) . '" /> <label><input type="radio" name="reminder" ' . 'id="reminderYes" value="1"' . ($rem_status ? $checked : '') . ' onclick="toggle_reminders()" />' . translate('Yes') . '</label> <label><input type="radio" name="reminder" ' . 'id="reminderNo" value="0"' . ($rem_status ? '' : $checked) . ' onclick="toggle_reminders()" />' . translate('No') . '</label> </td> </tr> </thead> <tbody id="reminder_when"> <tr> <td class="tooltip" rowspan="6"><label>' . translate('When') . ':</label></td> <td class="boxtop boxleft" width="20%"><label><input type="radio" ' . 'name="rem_when" id="rem_when_date" value="Y" ' . ($rem_use_date ? $checked : '') . ' onclick="toggle_rem_when()" />' . translate('Use Date/Time') . ' </label></td> <td class="boxtop boxright" nowrap="nowrap" colspan="2">' . date_selection('reminder_', empty($reminder['date']) ? $cal_date : $reminder['date']) . '</td> </tr> <tr> <td class="boxleft"> </td> <td class="boxright" colspan="2" nowrap="nowrap">' . time_selection('reminder_', empty($reminder['time']) ? $cal_time : $reminder['time']) . '</td> </tr> <tr> <td class="boxright boxleft" height="20px" colspan="3"> </td> </tr> <tr> <td class="boxleft"><label><input type="radio" name="rem_when" ' . 'id="rem_when_offset" value="N" ' . ($rem_use_date ? '' : $checked) . ' onclick="toggle_rem_when()" />' . translate('Use Offset') . ' </label></td> <td class="boxright" nowrap="nowrap" colspan="2"> <label><input type="text" size="2" name="rem_days" value="' . $rem_days . '" />' . $daysStr . '</label> <label><input type="text" size="2" name="rem_hours" ' . 'value="' . $rem_hours . '" />' . $hoursStr . '</label> <label><input type="text" size="2" name="rem_minutes" value="' . $rem_minutes . '" />' . $minutStr . '</label> </td>