// Geocashing // ----------- $geo_link = ''; $geo_link_plain = ''; $geo_editicon = $auth->acl_get('a_meetings') || $user->data['user_id'] == $meeting_by_id || $coorg_allow_edit == 1 ? $meeting_check_time < time() ? $icon_edit_clear : '' : ''; // Get geo for meeting get_geo_meeting_new($id); //return $data if (count($data) > 0) { $geo_attributes = $attributes . '<img src="' . $phpbb_root_path . 'images/atributes/025.gif" title=""/> '; } // Output geo for meeting for ($k = 0; $k < count($data); $k++) { //$data[$k]['meeting_geo'] = $row['geo_id']; //$data[$k]['meeting_geocheck'] = $row['geo_chk']; get_geo_meeting($id, $data[$k]['meeting_geo']); $g_save_1 = $georow['geo_save']; $g_save_ok = $meeting_check_time < time() ? $data[$k]['meeting_geocheck'] == 1 ? '_ok' : '_no' : ''; $title = $georow['geo_name']; $title .= $meeting_check_time < time() ? $data[$k]['meeting_geocheck'] == 1 ? ' (' . $user->lang['G_SAVE'] . ')' : ' (' . $user->lang['G_NO_SAVE'] . ')' : ''; if ($auth->acl_get('a_meetings') || $user->data['user_id'] == $meeting_by_id || $coorg_allow_edit == 1) { $geo_edit = '<span style="float:right; margin-top:-3px; cursor:pointer;"><a onclick="return hs.htmlExpand(this, { contentId: \'highslide-html-geoedit' . ($k + 1) . '\'})" title="' . $user->lang['EDIT_TXT'] . '">' . $geo_editicon . '</a></span>'; } $geocash_1 = $geo_edit . '<img id="geoimg' . ($k + 1) . '" src="' . $phpbb_root_path . 'images/geocashing' . $g_save_ok . '.gif" title="' . $title . '" align="absmiddle" /> <a id="geotxt' . ($k + 1) . '" href="' . $georow['geo_link'] . '" title="' . $title . '" target=_blank>' . sprintf($user->lang['geocash_num'], $k + 1) . '</a><br /><br />'; $geocash_1_plain = ' <a href="' . $georow['geo_link'] . '" title="' . $title . '" target=_blank>[' . $georow['geo_name'] . ']</a>'; $geo_link .= $geocash_1; $geo_link_plain .= $geocash_1_plain; $postrow = array('GEO_NAME' => $georow['geo_name'], 'GEO_ID' => $data[$k]['meeting_geo'], 'ROW_ID' => $k + 1); $template->assign_block_vars('postrow', $postrow); //$template->assign_vars(array( // 'S_GEO_'.$k => TRUE,
function get_geo_marshrut($id, $geo_id, $meeting_id) { global $db, $georow; $georow = array(); $sql = 'SELECT g.*, t.* FROM ' . GEO_DATA_TABLE . ' g LEFT JOIN ' . GEO_TABLE . ' AS t ON g.geo_id = t.geo_id WHERE g.geo_id = ' . $geo_id . ' AND g.geo_meeting_id =' . $id; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { $georow = $row; } $db->sql_freeresult($result); if (!$georow) { get_geo_meeting($meeting_id, $geo_id); } return $georow; }