$legendRight .= "<a href='javascript:flight_db_info({$flightID})'><img src='" . $moduleRelPath . "/img/icon_db.gif' title='DB record for the flight' border=0 align=bottom></a> "; } # martin jursa 24.06.2008: display scores info only if flight has not been optimized manually if (!$flight->autoScore) { $showScoreInfo = "<a href='javascript:flight_scores_info({$flightID})'><img src='" . $moduleRelPath . "/img/icon_olc_manual.gif' title='" . _Show_Optimization_details . "' border=0 align='absmiddle'>" . _Show_Optimization_details . " <img src='" . $moduleRelPath . "/img/icon_arrow_down.gif' title='" . _Show_Optimization_details . "' border=0 align=bottom></a> "; } else { $showScoreInfo = ''; } if ($flight->private & 0x1) { $legendRight .= " <img src='" . $moduleRelPath . "/img/icon_private.gif' align='bottom' width='13' height='13'>"; } if ($flight->private & 0x2) { $legendRight .= " <img src='" . $moduleRelPath . "/img/icon_disabled.gif' align='bottom' width='13' height='13'>"; } $legend = leoHtml::img("icon_cat_" . $flight->cat . ".png", 0, 0, 'absmiddle', '', 'icons1') . " " . _PILOT . ": <a href=\"javascript:pilotTip.newTip('inline', 60, 19, 'pilot_pos', 200, '" . $flight->userServerID . "_" . $flight->userID . "','" . addslashes(prepare_for_js($flight->userName)) . "' )\" onmouseout=\"pilotTip.hide()\">" . $flight->userName . "</a> " . _DATE_SORT . ": " . formatDate($flight->DATE); $Ltemplate->assign_vars(array('legend' => $legend, 'legendRight' => $legendRight)); if (!$flight->active && mktime() - datetime2UnixTimestamp($flight->dateAdded) > 5) { // 5 secs $flight->activateFlight(); } else { if (!$flight->active) { open_tr(); echo "<TD align=center>" . _FLIGHT_WILL_BE_ACTIVATED_SOON . "<a href=''>" . _TRY_AGAIN . "</a></td>"; close_tr(); close_inner_table(); return; } } if ($_REQUEST['updateMap']) { $flight->getMapFromServer(); }
</div>'; $tkStr .= ' </ul> </div>'; $sel_years = ""; for ($i = date("Y"); $i >= 2000; $i--) { if ($i == date("Y")) { $sel = " selected"; } else { $sel = ""; } $sel_years .= "<option value='{$i}' {$sel}>{$i}</option>\n"; } $sel_cat = ""; foreach ($CONF_glider_types as $gl_id => $gl_type) { if ($gl_id == $CONF_default_cat_view) { $is_type_sel = "selected"; } else { $is_type_sel = ""; } $sel_cat .= "<option {$is_type_sel} value={$gl_id}>" . $gliderCatList[$gl_id] . "</option>\n"; } if (!$CONF_use_htc_ie_hack) { $Ltemplate->assign_block_vars('ieHoverJS', array()); } if ($userID > 0) { $Ltemplate->assign_block_vars('myMenu', array('LINK_MY_FLIGHTS' => getLeonardoLink(array('op' => 'list_flights', 'pilotID' => $userID, 'takeoffID' => '0', 'country' => '0', 'year' => '0', 'month' => '0', 'season' => '0')), 'LINK_MY_PROFILE' => getLeonardoLink(array('op' => 'pilot_profile', 'pilotIDview' => $userID)), 'LINK_MY_STATS' => getLeonardoLink(array('op' => 'pilot_profile_stats', 'pilotIDview' => $userID)), 'LINK_MY_SETTINGS' => getLeonardoLink(array('op' => 'user_prefs')))); } $Ltemplate->assign_vars(array('lgStr' => $lgStr, 'ctStr' => $ctStr, 'tkStr' => $tkStr, 'YEARS_OPTION' => $sel_years, 'CATS_OPTION' => $sel_cat, 'LINK_SITES_GUIDE' => getLeonardoLink(array('op' => 'sites')), 'LINK_SHOW_LAST_ADDED' => getLeonardoLink(array('op' => 'list_flights', 'sortOrder' => 'dateAdded', 'year' => '0', 'month' => '0', 'season' => '0', 'country' => '0', 'takeoffID' => '0', 'pilotID' => '0')), 'LINK_SHOW_PILOTS' => getLeonardoLink(array('op' => 'list_pilots', 'comp' => '0')), 'LINK_SUBMIT_FLIGHT' => getLeonardoLink(array('op' => 'add_flight')), 'SHOW_LEAGUE_URL' => getLeonardoLink(array('op' => 'competition', 'country' => '%country%', 'year' => '%year%', 'month' => '0', 'cat' => '%cat%')), 'SHOW_FLIGHTS_URL' => getLeonardoLink(array('op' => 'list_flights', 'country' => '%country%', 'year' => '%year%', 'month' => '0', 'cat' => '%cat%', 'takeoffID' => '0', 'pilotID' => '0')), 'SHOW_TAKEOFFS_URL' => getLeonardoLink(array('op' => 'list_takeoffs', 'country' => '%country%', 'takeoffID' => '0', 'pilotID' => '0', 'year' => '0', 'month' => '0', 'cat' => '0')))); $Ltemplate->pparse('body'); $noFooterMenu = 1;
for ($k = 0; $k < count($countriesCodes); $k++) { $sel = $countriesCodes[$k] == $FILTER_country1_select ? "selected" : ""; $COUNTRIES_OPTION_LIST .= "<option value='" . $countriesCodes[$k] . "' {$sel}>" . $countriesNames[$k] . " (" . $countriesCodes[$k] . ")</option>\n"; } $TAKEOFF_OPTION_LIST = ""; for ($k = 0; $k < count($takeoffs); $k++) { $sel = $takeoffsID[$k] == $FILTER_takeoff1_select ? "selected" : ""; $TAKEOFF_OPTION_LIST .= "<option value='" . $takeoffsID[$k] . "' {$sel}>" . $takeoffs[$k] . "</option>\n"; } $countriesNum = count($countriesNames); require_once dirname(__FILE__) . "/FN_areas.php"; $i = 0; foreach ($countriesNames as $countryName) { $continentNum = $countries2continent[$countriesCodes[$i]]; // $tkStrings[$continentNum].="<li><a href='javascript:selCountry(\"".$countriesCodes[$i]."\") '>$countryName </a></li>\n"; $tkStrings[$continentNum] .= "<option value='" . $countriesCodes[$i] . "'>{$countryName}</option>\n"; $i++; } /* 1=>"Europe ", 2=>"South America ", 3=>"North & Central America ", 4=>"Africa ", 5=>"Asia ", 6=>"Oceania "*/ for ($continentNum = 1; $continentNum <= 6; $continentNum++) { $continentString = $tkStrings[$continentNum]; $Ltemplate->assign_vars(array('continent_' . $continentNum => "<select name='c_{$continentNum}' id='c_{$continentNum}' onchange='selCountryAction(\"c_{$continentNum}\");' >\n\t\t\t\t\t<option value=0><strong>Select Country: </strong></option>\n" . $continentString . "</select>\n")); } $Ltemplate->assign_vars(array('TAKEOFF_OPTION_LIST' => $TAKEOFF_OPTION_LIST, 'COUNTRIES_OPTION_LIST' => $COUNTRIES_OPTION_LIST, 'MODULE_REL_PATH' => $moduleRelPath, 'TEMPLATE_REL_PATH' => $moduleRelPath . "/templates/" . $PREFS->themeName, 'LANG' => $currentlang)); $Ltemplate->pparse('body');
$COUNTRIES_OPTION_LIST = ""; for ($k = 0; $k < count($countriesCodes); $k++) { $sel = $countriesCodes[$k] == $FILTER_country1_select ? "selected" : ""; $COUNTRIES_OPTION_LIST .= "<option value='" . $countriesCodes[$k] . "' {$sel}>" . $countriesNames[$k] . " (" . $countriesCodes[$k] . ")</option>\n"; } $TAKEOFF_OPTION_LIST = ""; for ($k = 0; $k < count($takeoffs); $k++) { $sel = $takeoffsID[$k] == $FILTER_takeoff1_select ? "selected" : ""; $TAKEOFF_OPTION_LIST .= "<option value='" . $takeoffsID[$k] . "' {$sel}>" . $takeoffs[$k] . "</option>\n"; } $countriesNum = count($countriesNames); require_once dirname(__FILE__) . "/FN_areas.php"; $i = 0; foreach ($countriesNames as $countryName) { $continentNum = $countries2continent[$countriesCodes[$i]]; $tkStrings[$continentNum] .= "<li><a href='javascript:selCountry(\"" . $countriesCodes[$i] . "\") '>{$countryName} </a></li>\n"; $i++; } /* 1=>"Europe ", 2=>"South America ", 3=>"North & Central America ", 4=>"Africa ", 5=>"Asia ", 6=>"Oceania "*/ for ($continentNum = 1; $continentNum <= 6; $continentNum++) { $continentString = $tkStrings[$continentNum]; $Ltemplate->assign_vars(array('continent_' . $continentNum => "<ul><li><a href='#'><strong>" . $continents[$continentNum] . "</strong></a></li>" . $continentString . "<ul>")); } $Ltemplate->assign_vars(array('TAKEOFF_OPTION_LIST' => $TAKEOFF_OPTION_LIST, 'COUNTRIES_OPTION_LIST' => $COUNTRIES_OPTION_LIST, 'MODULE_REL_PATH' => $moduleRelPath, 'TEMPLATE_REL_PATH' => $moduleRelPath . "/templates/" . $PREFS->themeName, 'LANG' => $currentlang)); $Ltemplate->pparse('body');
// $Ltemplate ->set_filenames(array( // 'body' => 'header.html') // ); $Ltemplate->set_filenames(array('overall_header' => 'tpl/overall_header.html')); if ($CONF_use_utf) { define('CONF_LANG_ENCODING_TYPE', 'utf8'); $CONF_ENCODING = 'utf-8'; } else { define('CONF_LANG_ENCODING_TYPE', 'iso'); $CONF_ENCODING = $langEncodings[$currentlang]; } if (!is_array($lang)) { $lang = array(); } $lang['ENCODING'] = $CONF_ENCODING; $Ltemplate->assign_vars(array('STYLE_LINK' => $moduleRelPath . "/templates/" . $PREFS->themeName . "/style.css", 'IMG_PATH' => $moduleRelPath . "/templates/" . $PREFS->themeName . "/img/")); if (!$userID) { $Ltemplate->assign_block_vars('SWITCH_ANON_USER', array()); } else { $Ltemplate->assign_block_vars('SWITCH_LOGIN_USER', array()); } if (L_auth::isAdmin($userID)) { $Ltemplate->assign_block_vars('SWITCH_ADMIN', array()); } // new code ---------------------------------- // // Generate logged in/logged out status // if ($userdata['session_logged_in']) { if (empty($leonardo_header)) { $u_login_logout = 'login.' . $phpEx . '?logout=true&sid=' . $userdata['session_id'];
} } else { $forward_page = ''; } $username = $userdata['user_id'] != ANONYMOUS ? $userdata['username'] : ''; if (!$CONF['bridge']['forgot_password_url']) { $sendPassUrl = append_sid("profile.php?mode=sendpassword"); } else { if (is_array($CONF['bridge']['forgot_password_url'])) { $sendPassUrl = getLeonardoLink($CONF['bridge']['forgot_password_url']); } else { $sendPassUrl = str_replace("%module_name%", $module_name, $CONF['bridge']['forgot_password_url']); } } $s_hidden_fields = '<input type="hidden" name="redirect" value="' . $forward_page . '" />'; $s_hidden_fields .= isset($HTTP_GET_VARS['admin']) ? '<input type="hidden" name="admin" value="1" />' : ''; // make_jumpbox('viewforum.'.$phpEx, $forum_id); $Ltemplate->assign_vars(array('USERNAME' => $username, 'adminMail' => $CONF_admin_email_support ? $CONF_admin_email_support : $CONF_admin_email, 'IMG_PATH' => $moduleRelPath . "/img/", 'L_ENTER_PASSWORD' => isset($HTTP_GET_VARS['admin']) ? $lang['Admin_reauthenticate'] : $lang['Enter_password'], 'L_SEND_PASSWORD' => _Forgotten_password, 'U_SEND_PASSWORD' => $sendPassUrl, 'S_HIDDEN_FIELDS' => $s_hidden_fields)); $Ltemplate->pparse('body'); // include($phpbb_root_path . 'includes/page_tail.'.$phpEx); } else { $url = getLeonardoLink(array('op' => $CONF_main_page)); ?> <script language="javascript">window.location="<?php echo $url; ?> "; </script> <?php } } closeMain();