<? endif ?> <? if (empty($USER->email)): ?> To use Auto-Alerts please <a href="<?php echo $MODULE->url('prefs'); ?> ">set up your email address</a> <? else: ?> Select the day of the week on which you wish to receive Auto Alerts: <? print "<select name=\"day\" "; // add AJAX call if ($CONF['submit_forms_with_script']) print "onchange=\"update_search_day(this.options[this.selectedIndex].value,'" . $MODULE->url('saved') . "')\" "; print ">\n";?> <?php echo html_options(get_days_of_the_week_values(), @$USER->prefs['saved_search_day'], 'Never', TRUE); ?> </select> <br />Results will be mailed to <?php echo $USER->email; ?> . <? endif // email check ?> <a href="<?php echo $MODULE->url('help', '/saved'); ?> " onClick="return popup_help(this)"><?php echo $STRINGS['save_search_help']; ?> »</a> <? endif // auto alerts ?>
function get_search_day_set_message($day) { global $STRINGS; if ($day < 1 || $day > 7) { return $STRINGS['search_day_disabled']; } $day_names = get_days_of_the_week_values(); return sprintf($STRINGS['search_day_set'], $day_names[$day]); }