mysql_connect("localhost", "root", "hunter2") or die(mysql_error()); mysql_select_db("min") or die(mysql_error()); mysql_set_charset('utf8'); $shulquery = mysql_query('SELECT * FROM `shuls` where ( `shul_id` = \'' . $shulid . '\' )'); $row = mysql_fetch_array($shulquery); $shacharitquery = mysql_query('SELECT * FROM `minyans` where ( `minyan_shulid` = \'' . $shulid . '\' and `minyan_whichprayer` = \'shacharit\' )'); $shacharittimes = ""; while ($minyanrow = mysql_fetch_array($shacharitquery)) { $shacharittimes = $shacharittimes . sanitizeMinyanTime($minyanrow['minyan_time']) . ', '; } $minchaquery = mysql_query('SELECT * FROM `minyans` where ( `minyan_shulid` = \'' . $shulid . '\' and `minyan_whichprayer` = \'mincha\' )'); $minchatimes = ""; while ($minyanrow = mysql_fetch_array($minchaquery)) { $minchatimes = $minchatimes . sanitizeMinyanTime($minyanrow['minyan_time']) . ', '; } $maarivquery = mysql_query('SELECT * FROM `minyans` where ( `minyan_shulid` = \'' . $shulid . '\' and `minyan_whichprayer` = \'maariv\' )'); $maarivtimes = ""; while ($minyanrow = mysql_fetch_array($maarivquery)) { $maarivtimes = $maarivtimes . sanitizeMinyanTime($minyanrow['minyan_time']) . ', '; } echo 'infowindow.setContent("<b>' . mysql_real_escape_string($row['shul_name']) . '</b><br><br><b>כתובת: </b>' . mysql_real_escape_string($row['shul_address']) . ', ' . $row['shul_neighborhood'] . ', ' . $row['shul_city'] . '<br>נוסח: ' . $row['shul_nusach'] . '<br>פרטי קשר: ' . $row['shul_contactinfo'] . '<br>'; if (strlen($shacharittimes) > 0) { echo '<br>שחרית בחול: ' . trim($shacharittimes, ", "); } if (strlen($minchatimes) > 0) { echo '<br>מנחה בחול: ' . trim($minchatimes, ", "); } if (strlen($maarivtimes) > 0) { echo '<br>מעריב בחול: ' . trim($maarivtimes, ", "); } echo ' ");';
echo 'markers=[];/*<br>*/'; // Read shuls in desired city, place markers $shulquery = mysql_query('SELECT * FROM `shuls` where ( `shul_city` = \'' . $city . '\' )'); $markercount = 0; $minyancount = 0; // can have several minyans per marker $legendarray = array(); while ($row = mysql_fetch_array($shulquery)) { // Get list of minyan times for this shul $minyanquery = mysql_query('SELECT * FROM `minyans` where ( `minyan_shul` = ' . $row['shul_id'] . ' and `minyan_whichprayer` = "' . $whichprayer . '" and minyan_day LIKE \'%' . $day . '%\' )'); $thisshulminyantimes = ""; while ($minyanrow = mysql_fetch_array($minyanquery)) { // Put minyantimes into array $legendarray[$minyancount] = array($minyanrow['minyan_time'], $row['shul_name']); $minyancount++; $thisshulminyantimes = $thisshulminyantimes . sanitizeMinyanTime($minyanrow['minyan_time']) . ', '; } $thisshulminyantimes = substr_replace($thisshulminyantimes, '', strlen($thisshulminyantimes) - 2, 2); //delete final comma mysql_free_result($minyanquery); if ($thisshulminyantimes != '') { // If this shul has minyan(s) for desired day and prayer // Add marker for this shul echo 'markers[' . $markercount . '] = new BigLabel({ position:new google.maps.LatLng(' . $row['shul_lat'] . ', ' . $row['shul_lon'] . '), map: map, text:"' . $thisshulminyantimes . '" },' . $row['shul_id'] . ', "' . addslashes($row['shul_name']) . '", this.infowindow); /*<br>*/'; if ($markercount == 0) { // Create new bounding box $maxlat = $row['shul_lat']; $minlat = $row['shul_lat']; $maxlon = $row['shul_lon']; $minlon = $row['shul_lon']; } else {