</a> <h3 class="text-center">Email</h3> <p>Subscribe to weekly Shabbat candle lighting times and Torah portion by email. <br><a href="https://www.hebcal.com/email/">Sign up »</a></p> </div><!-- .col-sm-4 --> </div><!-- .row --> <div class="row" style="margin-top:40px"> <div class="col-sm-2"> <a class="icon-block" href="/home/developer-apis"> <span class="glyphicons glyphicons-embed-close icon-lg"></span> </a> </div><!-- .col-sm-2 --> <div class="col-sm-10"> <h3>Developer APIs</h3> <p>We're part of the Open Source Judaism movement. Embed Hebcal.com content directly onto your synagogue website with our JavaScript, JSON and RSS APIs, available under a Creative Commons Attribution 3.0 License. <a href="/home/developer-apis">Learn more »</a></p> </div><!-- .col-sm-10 --> </div><!-- .row --> <?php $js_typeahead_url = hebcal_js_typeahead_bundle_url(); $xtra_html = <<<EOD <script src="{$js_typeahead_url}"></script> EOD; echo html_footer_bootstrap3(false, $xtra_html); exit; ?>
function form($param, $message = "", $help = "") { echo_lead_text(); if ($message != "") { ?> <div class="alert alert-danger alert-dismissable"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button> <?php echo $message; echo $help; ?> </div><!-- .alert --> <?php } $action = $_SERVER["PHP_SELF"]; $pos = strpos($action, "index.php"); if ($pos !== false) { $action = substr($action, 0, $pos); } $geo = isset($param["geo"]) ? $param["geo"] : "geoname"; if ($geo == "geoname" && !isset($param["city-typeahead"]) && isset($param["geonameid"])) { list($name, $asciiname, $country, $admin1, $latitude, $longitude, $tzid) = hebcal_get_geoname($param["geonameid"]); $param["city-typeahead"] = geoname_city_descr($name, $admin1, $country); } elseif ($geo == "zip" && isset($param["zip"])) { list($city, $state, $tzid, $latitude, $longitude, $lat_deg, $lat_min, $long_deg, $long_min) = hebcal_get_zipcode_fields($param["zip"]); $param["city-typeahead"] = "{$city}, {$state} " . $param["zip"]; } ?> <div id="email-form"> <form id="f1" action="<?php echo $action; ?> " method="post"> <div class="form-group"> <label for="em">E-mail address</label> <input type="email" name="em" id="em" class="form-control" placeholder="*****@*****.**" value="<?php if (isset($param["em"])) { echo htmlspecialchars($param["em"]); } ?> "> </div> <div class="form-group"> <label for="city-typeahead">City</label> <input type="hidden" name="geo" id="geo" value="<?php echo $geo; ?> "> <input type="hidden" name="zip" id="zip" value="<?php if (isset($param["zip"])) { echo htmlspecialchars($param["zip"]); } ?> "> <input type="hidden" name="geonameid" id="geonameid" value="<?php if (isset($param["geonameid"])) { echo htmlspecialchars($param["geonameid"]); } ?> "> <div class="city-typeahead" style="margin-bottom:12px"> <input type="text" name="city-typeahead" id="city-typeahead" class="form-control" placeholder="Search for city or ZIP code" value="<?php if (isset($param["city-typeahead"])) { echo htmlentities($param["city-typeahead"]); } ?> "> </div> </div> <div class="form-group"> <label for="m">Havdalah minutes past sundown <a href="#" id="havdalahInfo" data-toggle="tooltip" data-placement="top" title="Use 42 min for three medium-sized stars, 50 min for three small stars, 72 min for Rabbeinu Tam, or 0 to suppress Havdalah times"><span class="glyphicon glyphicon-info-sign"></span></a> </label> <input type="text" name="m" id="m" class="form-control" pattern="\d*" value="<?php echo htmlspecialchars($param["m"]); ?> " maxlength="3"> </div> <input type="hidden" name="v" value="1"> <?php global $is_update, $default_unsubscribe; $modify_class = $default_unsubscribe ? "btn btn-default" : "btn btn-primary"; $unsub_class = $default_unsubscribe ? "btn btn-primary" : "btn btn-default"; if ($is_update) { ?> <input type="hidden" name="prev" value="<?php echo htmlspecialchars($param["em"]); ?> "> <?php } ?> <button type="submit" class="<?php echo $modify_class; ?> " name="modify" value="1"> <?php echo $is_update ? "Update Subscription" : "Subscribe"; ?> </button> <button type="submit" class="<?php echo $unsub_class; ?> " name="unsubscribe" value="1">Unsubscribe</button> </fieldset> </form> </div><!-- #email-form --> <hr> <p>You'll receive a maximum of one message per week, typically on Thursday morning.</p> <div id="privacy-policy"> <h3>Email Privacy Policy</h3> <p>We will never sell or give your email address to anyone. <br>We will never use your email address to send you unsolicited offers.</p> <p>To unsubscribe, send an email to <a href="mailto:shabbat-unsubscribe@hebcal.com">shabbat-unsubscribe@hebcal.com</a>.</p> </div><!-- #privacy-policy --> </div><!-- .col-sm-12 --> </div><!-- .row --> <?php $js_typeahead_url = hebcal_js_typeahead_bundle_url(); $js_hebcal_app_url = hebcal_js_app_url(); $xtra_html = <<<EOD <script src="{$js_typeahead_url}"></script> <script src="{$js_hebcal_app_url}"></script> <script type="text/javascript"> window['hebcal'].createCityTypeahead(false); \$('#havdalahInfo').click(function(e){ e.preventDefault(); }).tooltip(); </script> EOD; echo html_footer_bootstrap3(true, $xtra_html); exit; }