if ($_REQUEST["addTakeoffForm"]) { // form submitted $takeoffToAdd = $_POST['takeoff_select'] + 0; $query = "INSERT INTO {$areasTakeoffsTable}\t(areaID,takeoffID) VALUES ({$areaID},{$takeoffToAdd})"; // echo $query; $res = $db->sql_query($query); if ($res <= 0) { echo "Problem in inserting takeoff to area"; } else { echo "Takeoff added to area<br>"; } } else { // form not submitted // copy session variables (if any) to local variables } open_inner_table("Administer Area (group of takeoffs)", 700); echo "<tr><td>"; if ($_REQUEST["FILTER_dateType"]) { echo "<center><a href='" . CONF_MODULE_ARG . "&op=list_flights'>" . _RETURN_TO_FLIGHTS . "</a> :: </center><br><br>"; // echo "<a href='$filterUrl'>Bookmark Filter</a><br></center><br><br>"; } ?> <form name="formFilter" method="post" action=""> <br> <table class=main_text width="564" border="0" align="center" cellpadding="1" cellspacing="1"> <tr> <td width="205" bgcolor="#FF9966"><div align="right"><span class="whiteLetter"><strong><?php echo _SELECT_PILOT; ?> </strong></span></div></td>
/js/DHTML_functions.js"></script> </head> <?php $waypointIDview = makeSane($_GET['wID'], 1); $wpInfo = new waypoint($waypointIDview); $wpInfo->getFromDB(); // $wpName= getWaypointName($waypointIDview); $wpName = selectWaypointName($wpInfo->name, $wpInfo->intName, $wpInfo->countryCode); $wpLocation = selectWaypointLocation($wpInfo->location, $wpInfo->intLocation, $wpInfo->countryCode); if (L_auth::isAdmin($userID)) { $opString = "<a href='" . getLeonardoLink(array('op' => 'edit_waypoint', 'waypointIDedit' => $waypointIDview)) . "'><img src='" . $moduleRelPath . "/img/change_icon.png' border=0 align=bottom></a>"; } $titleString = _Waypoint_Name . " : " . $wpName . " (" . $countries[$wpInfo->countryCode] . ") "; //$opString="<a href='#' onclick=\"toggleVisible('takeoffID','takeoffPos',14,-20,0,0);return false;\"> //<img src='".$moduleRelPath."/templates/".$PREFS->themeName."/img/exit.png' border=0></a>"; open_inner_table("<table class=main_text width=100% cellpadding=0 cellspacing=0><tr><td>" . $titleString . "</td><td align=right width=50><div align=right>" . $opString . "</div></td></tr></table>", 705, "icon_pin.png"); open_tr(); echo "<td>"; ?> <style type="text/css"> <!-- .style1 {font-weight: bold} --> </style> <table width="100%" border="0" bgcolor="#EFEFEF" class=main_text> <tr> <td valign="middle"> <table class="Box" width="530" align="center">
function listTakeoffs($res, $legend, $query_str = "", $sortOrder = "CountryCode") { global $db, $Theme; global $takeoffRadious; global $userID; global $moduleRelPath; global $PREFS; global $page_num, $pagesNum, $startNum, $itemsNum; global $currentlang, $nativeLanguage, $opMode; global $countries; $legendRight = ""; $headerSelectedBgColor = "#F2BC66"; open_inner_table("<table class=main_text width=100%><tr><td>{$legend}</td><td width=300 align=right bgcolor=#eeeeee>{$legendRight}</td></tr></table>", 750); ?> <td width="25" bgcolor="<?php echo $Theme->color1; ?> "><div align=left><?php echo _NUM; ?> </div></td> <?php printHeaderTakeoffs(120, $headerSelectedBgColor, $Theme->color0, $sortOrder, "CountryCode", _COUNTRY, $query_str); printHeaderTakeoffs(0, $headerSelectedBgColor, $Theme->color2, $sortOrder, "clubName", _CLUB_NAME, $query_str); printHeaderTakeoffs(120, $headerSelectedBgColor, $Theme->color3, $sortOrder, "FlightsNum", _NUMBER_OF_FLIGHTS, $query_str); printHeaderTakeoffs(100, $headerSelectedBgColor, $Theme->color4, $sortOrder, "max_distance", _SITE_RECORD_OPEN_DISTANCE, $query_str); ?> </tr> <?php $currCountry = ""; $i = 1; while ($row = $db->sql_fetchrow($res)) { $takeoffName = $row["name"]; // $sortRowBgColor=($i%2)?"#CCCACA":"#E7E9ED"; $sortRowBgColor = "#E7E9ED"; $bgcolor = ""; if ($countries[$row["countryCode"]] != $currCountry || $sortOrder != 'CountryCode') { $currCountry = $countries[$row["countryCode"]]; $country_str = "<div align=left>" . "<a href='" . CONF_MODULE_ARG . "&op=list_clubs&country=" . $row["countryCode"] . "'>" . $currCountry . "</a>" . "</div>"; if ($sortOrder == 'CountryCode') { $bgcolor = "bgcolor=#DDDDDD"; } else { $bgcolor = $i % 2 ? "bgcolor=#DDDDDD" : ""; } } else { $country_str = ""; } $i++; echo "<TR {$bgcolor} align=right>"; echo "<TD {$first_col_back_color} ><div align=left>" . ($i - 1 + $startNum) . "</div></TD> "; echo "<TD valign=top>{$country_str}</TD>"; echo "<TD " . ($sortOrder == "takeoffID" ? "bgcolor=" . $sortRowBgColor : "") . ">" . "<div align=left>" . "<a href='" . CONF_MODULE_ARG . "&op=show_club&clubIDview=" . $row["ID"] . "'><img src='" . $moduleRelPath . "/img/icon_magnify_small.gif' border=0></a>" . " " . "<a href='" . CONF_MODULE_ARG . "&op=list_flights&clubID=" . $row["ID"] . "'>" . $takeoffName . "</a>" . "</div></TD>"; echo "<TD " . ($sortOrder == "LINEAR_DISTANCE" ? "bgcolor=" . $sortRowBgColor : "") . "><div align=right>" . $row["FlightsNum"] . " (<a href='" . CONF_MODULE_ARG . "&op=list_flights&clubID=" . $row["ID"] . "'>" . _SHOW_FLIGHTS . "</a>)</div></TD>\t"; echo "<TD " . ($sortOrder == "LINEAR_DISTANCE" ? "bgcolor=" . $sortRowBgColor : "") . "><div align=right>" . formatDistanceOpen($row["max_distance"]) . "</div></TD>\t"; close_tr(); } close_inner_table(); $db->sql_freeresult($res); }
open_inner_table(_CHANGE_FLIGHT_DATA, 650); echo "<center> <br><br>" . _THE_CHANGES_HAVE_BEEN_APPLIED . "<br><br><br>"; echo "<a href='" . getLeonardoLink(array('op' => 'show_flight', 'flightID' => $flightID)) . "'>" . _RETURN_TO_FLIGHT . "</a><br><br><br>"; echo "</center>"; close_inner_table(); } else { // show the form ?> <form action="" enctype="multipart/form-data" method="post"> <input type="hidden" name="changeFlight" value=1> <input type="hidden" name="flightID" value="<?php echo $flightID; ?> "> <?php open_inner_table("Review Validation Status", 650, "change_icon.png"); echo "<tr><td>"; ?> <table class=main_text width="100%" border="0" align="center" cellpadding="5" cellspacing="3" bgcolor="#FBFCEF" > <tr> <td width="170" valign="top"><div align="right" class="style2"><?php echo _PILOT_NAME; ?> </div></td> <td valign="top"> <table class=main_text width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="top"><b><?php echo $flight->userName; ?>
if (countryCode) cStr='&countryCode='+countryCode; if (intName) cStr+='&intName=1'; var linkStr='<?php echo getLeonardoLink(array('op' => 'admin_takeoff_resolve')); ?> &admin_op='+methodID+cStr; document.location=linkStr; }); }); </script> <?php $workTable = "temp_leonardo_gliders"; // $workTable=$flightsTable; open_inner_table("ADMIN AREA :: Resolve Duplicate takeoffs", 850); open_tr(); echo "<td align=left>"; if (!L_auth::isAdmin($userID)) { echo "<br><br>You dont have access to this page<BR>"; exitPage(); } $admin_op = makeSane($_GET['admin_op']); ?> <form><BR /> Method: <select name="compareMethod" id="compareMethod"> <option value="1">Same Name</option> <option value="2">Soundex Similarity</option> <option value="3">Location Proximity (very slow)</option> </select>
{ $current_dir = opendir($dir); while ($entryname = readdir($current_dir)) { if (is_dir("{$dir}/{$entryname}") and ($entryname != "." and $entryname != "..")) { // echo "${dir}/${entryname}#<br>"; chmod("{$dir}/{$entryname}", 0777); chmodDir("{$dir}/{$entryname}"); } elseif ($entryname != "." and $entryname != "..") { // echo "${dir}/${entryname}@<br>"; chmod("{$dir}/{$entryname}", 0777); } } chmod($dir, 0777); closedir($current_dir); } open_inner_table("ADMIN AREA", 650); open_tr(); echo "<td align=left>"; if (!L_auth::isAdmin($userID)) { echo "<br><br>You dont have access to this page<BR>"; exitPage(); } $query = "SELECT ID,active from {$flightsTable} "; $res = $db->sql_query($query); $prList = array("MaxPunkte" => array("L MaxPunkte", "LXMP MaxPunkte"), "CompeGPS" => array("LXCG", "LCOMPEGPSVERSION"), "GpsDump" => array("LXGD GpsDump", "LXXX GpsDump"), "FlyChart" => array("L FlyChart", ""), "Soaring pilot" => array("LXSPNSOARING"), "SeeYou" => array("LSEEYOU", "AXSY"), "G7ToWin" => array("L G7ToWin", "LXGW G7ToWin"), "Flymaster" => array("LXFM Flymaster", "AFMT000Flymaster"), "GPSBabel" => array("AXXXZZZGPSBabel"), "Garmin tools" => array("AGAR"), "MLR tools" => array("AMLR"), "Aircotec Topnavigator" => array("ATNA"), "Bräuniger Gallileo" => array("ABRA"), "Renschler" => array("AREN"), "log_it RUAG Data Logger " => array("ARUA")); /* LXMP MaxPunkte_4.4 L MaxPunkte_4.2
/js/extJS/adapter/ext/ext-base.js"></script> <script type="text/javascript" src="<?php echo $moduleRelPath; ?> /js/extJS/ext-all.js"></script> <script type="text/javascript" src="<?php echo $moduleRelPath; ?> /js/extJS/paging.js"></script> <script type="text/javascript" src="<?php echo $moduleRelPath; ?> /js/extJS/shared/examples.js"></script> <div id="topic-grid"></div> <?php return; ?> <?php open_inner_table("<table class=main_text width=100%><tr><td>{$legend}</td><td width=340 align=right bgcolor=#eeeeee>{$legendRight}</td></tr></table>", 720, "icon_profile.png"); open_tr(); echo "<td>"; ?> <div id="topic-grid"></div> <?php echo "</td></tr>"; close_inner_table();
function listFlights($res, $legend, $query_str = "", $sortOrder = "DATE") { global $Theme; global $module_name; global $takeoffRadious; global $userID; global $moduleRelPath; global $admin_users; global $PREFS; global $page_num, $pagesNum, $startNum, $itemsNum; global $currentlang, $nativeLanguage, $opMode; $legendRight = ""; if ($pagesNum > 1) { if ($page_num > 1) { $legendRight .= "<a href='?name={$module_name}&op=list_flights&sortOrder={$sortOrder}{$query_str}&page_num=" . ($page_num - 1) . "'><<</a> "; } else { $legendRight .= "<< "; } for ($k = 1; $k <= $pagesNum; $k++) { if ($k != $page_num) { $legendRight .= "<a href='?name={$module_name}&op=list_flights&sortOrder={$sortOrder}{$query_str}&page_num={$k}'>{$k}</a> "; } else { $legendRight .= "{$k} "; } } if ($page_num < $pagesNum) { $legendRight .= "<a href='?name={$module_name}&op=list_flights&sortOrder={$sortOrder}{$query_str}&page_num=" . ($page_num + 1) . "'>>></a> "; } else { $legendRight .= ">> "; } } $endNum = $startNum + $PREFS->itemsPerPage; if ($endNum > $itemsNum) { $endNum = $itemsNum; } $legendRight .= " [ " . ($startNum + 1) . "-" . $endNum . " " . _From . " " . $itemsNum . " ]"; if ($itemsNum == 0) { $legendRight = "[ 0 ]"; } $headerSelectedBgColor = "#F2BC66"; open_inner_table("<table class=main_text width=100%><tr><td>{$legend}</td><td valign=top width=400 align=right bgcolor=#eeeeee>{$legendRight}</td></tr></table>", 750, -1); ?> <td width="25" bgcolor="<?php echo $Theme->color1; ?> "><div align=left><?php echo _NUM; ?> </div></td> <?php printHeader(80, $headerSelectedBgColor, $Theme->color0, $sortOrder, "DATE", _DATE_SORT, $query_str); printHeader(160, $headerSelectedBgColor, $Theme->color0, $sortOrder, "pilotName", _PILOT, $query_str); printHeader(0, $headerSelectedBgColor, $Theme->color1, $sortOrder, "takeoffID", _TAKEOFF, $query_str); printHeader(40, $headerSelectedBgColor, $Theme->color2, $sortOrder, "DURATION", _DURATION_HOURS_MIN, $query_str); printHeader(65, $headerSelectedBgColor, $Theme->color3, $sortOrder, "LINEAR_DISTANCE", _LINEAR_DISTANCE, $query_str); printHeader(65, $headerSelectedBgColor, $Theme->color3, $sortOrder, "FLIGHT_KM", _OLC_KM, $query_str); printHeader(40, $headerSelectedBgColor, $Theme->color3, $sortOrder, "FLIGHT_POINTS", _OLC_SCORE, $query_str); ?> <td width="18" bgcolor="<?php echo $Theme->color4; ?> "> </td> <td width="72" bgcolor="<?php echo $Theme->color4; ?> "><div align=left><?php echo _SHOW; ?> </div></td></tr> <?php $i = 1; while ($row = mysql_fetch_assoc($res)) { $is_private = $row["private"]; $name = getPilotRealName($row["userID"], $row["serverID"]); $takeoffName = getWaypointName($row["takeoffID"]); $takeoffVinicity = $row["takeoffVinicity"]; $takeoffNameFrm = formatLocation($takeoffName, $takeoffVinicity, $takeoffRadious); $sortRowBgColor = $i % 2 ? "#CCCACA" : "#E7E9ED"; $i++; open_tr(); $days_from_submission = floor((mktime() - datetime2UnixTimestamp($row["dateAdded"])) / 86400); // 60*60*24 sec per day if ($is_private) { $first_col_back_color = " bgcolor=#33dd33 "; } else { $first_col_back_color = ""; } echo "<TD {$first_col_back_color} ><div align=left>" . ($i - 1 + $startNum) . "</div></TD> \n\t <TD " . ($sortOrder == "DATE" ? "bgcolor=" . $sortRowBgColor : "") . ">\n\t\t\t<div align=right>"; if ($days_from_submission <= 3) { echo "<img src='" . $moduleRelPath . "/img/icon_new.png' >"; } echo formatDate($row["DATE"]) . "</div></TD>" . "<TD width=300 colspan=2 valign=top " . ($sortOrder == "pilotName" || $sortOrder == "takeoffID" ? "bgcolor=" . $sortRowBgColor : "") . ">" . "<div align=left>" . "<a href='?name={$module_name}&op=pilot_profile&pilotIDview=" . $row["userID"] . "'><img src='" . $moduleRelPath . "/img/icon_magnify_small.gif' border=0></a>" . "<a href='?name={$module_name}&op=pilot_profile_stats&pilotIDview=" . $row["userID"] . "'><img src='" . $moduleRelPath . "/img/icon_stats.gif' border=0></a> " . "<a href='?name={$module_name}&op=list_flights&pilotID=" . $row["userID"] . "'>{$name}</a>" . "</div><div align=right>" . "<a href='?name={$module_name}&op=list_flights&takeoffID=" . $row["takeoffID"] . "'>{$takeoffNameFrm}</a> " . "<a href='?name={$module_name}&op=show_waypoint&waypointIDview=" . $row["takeoffID"] . "'><img src='" . $moduleRelPath . "/img/icon_magnify_small.gif' border=0></a>" . "<a href='" . $moduleRelPath . "/download.php?type=kml_wpt&wptID=" . $row["takeoffID"] . "'><img src='" . $moduleRelPath . "/img/gearth_icon.png' border=0></a>" . "</div></TD>" . "<TD " . ($sortOrder == "DURATION" ? "bgcolor=" . $sortRowBgColor : "") . "><div align=right>" . sec2Time($row['DURATION'], 1) . "</div></TD>\n\t <TD " . ($sortOrder == "LINEAR_DISTANCE" ? "bgcolor=" . $sortRowBgColor : "") . "><div align=right>" . formatDistanceOpen($row["LINEAR_DISTANCE"]) . "</div></TD>\t\n\t <TD " . ($sortOrder == "FLIGHT_KM" ? "bgcolor=" . $sortRowBgColor : "") . "><div align=right>" . formatDistanceOpen($row["FLIGHT_KM"]) . "</div></TD>\t\n\t <TD " . ($sortOrder == "FLIGHT_POINTS" ? "bgcolor=" . $sortRowBgColor : "") . "><div align=right>" . formatOLCScore($row["FLIGHT_POINTS"]) . "</div></TD>" . "<td><img src='" . $moduleRelPath . "/img/icon_cat_" . $row["cat"] . ".png' border=0></td>" . "<TD align=left><a href='?name={$module_name}&op=show_flight&flightID=" . $row["ID"] . "'><img src='" . $moduleRelPath . "/img/icon_magnify_small.gif' border=0></a>"; echo "<a href='" . $moduleRelPath . "/download.php?type=kml_trk&flightID=" . $row["ID"] . "'><img src='" . $moduleRelPath . "/img/gearth_icon.png' border=0></a>"; if ($row["photo1Filename"]) { echo "<img src='" . $moduleRelPath . "/img/photo_icon.jpg' width=16 height=16>"; } else { echo "<img src='" . $moduleRelPath . "/img/photo_icon_blank.gif' width=16 height=16>"; } if ($row["userID"] == $userID || in_array($userID, $admin_users)) { // admin IDS in $admin_users echo "<a href='?name={$module_name}&op=delete_flight&flightID=" . $row["ID"] . "'><img src='" . $moduleRelPath . "/img/x_icon.gif' width=16 height=16 border=0 align=bottom></a>"; echo "<a href='?name={$module_name}&op=edit_flight&flightID=" . $row["ID"] . "'><img src='" . $moduleRelPath . "/img/change_icon.png' width=16 height=16 border=0 align=bottom></a>"; } echo "</TD>"; close_tr(); } close_inner_table(); mysql_freeResult($res); }
// Copyright (c) 2004-2010 by Andreadakis Manolis // // This program is free software. You can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License. // // $Id: GUI_admin_brands.php,v 1.12 2010/03/14 20:56:11 manolis Exp $ // //************************************************************************ if (!L_auth::isAdmin($userID)) { echo "go away"; return; } $workTable = "temp_leonardo_gliders"; // $workTable=$flightsTable; open_inner_table("ADMIN AREA :: Glider Brands Managment", 650); open_tr(); echo "<td align=left>"; if (!L_auth::isAdmin($userID)) { echo "<br><br>You dont have access to this page<BR>"; exitPage(); } $admin_op = makeSane($_GET['admin_op']); echo "<br>"; echo "<ul>"; echo "<li><a href='" . CONF_MODULE_ARG . "&op=admin_brands&admin_op=init'>1. Init (make temp table and copy gliders)</a><BR></a>"; echo "<li><a href='" . CONF_MODULE_ARG . "&op=admin_brands&admin_op=glidersDetect'>2. Auto detect glider brands</a><BR></a>"; echo "<li><a href='" . CONF_MODULE_ARG . "&op=admin_brands&admin_op=normalize'>3. Normalize 'glider' -> 'gliderName</a><BR></a>"; echo "<li><a href='" . CONF_MODULE_ARG . "&op=admin_brands&admin_op=removeBrand'>4. Remove Brand from 'gliderName' Field</a><BR></a>"; echo "<li><a href='" . CONF_MODULE_ARG . "&op=admin_brands&admin_op=useKnown'>5. Use known glider names to find unknown</a><BR></a>"; echo "<HR>";
<?php //************************************************************************ // Leonardo XC Server, http://www.leonardoxc.net // // Copyright (c) 2004-2010 by Andreadakis Manolis // // This program is free software. You can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License. // // $Id: MENU_header.php,v 1.6 2010/03/14 20:56:11 manolis Exp $ // //************************************************************************ // NOT USED!!! exit; open_inner_table('', 750); echo '<tr><td>'; list($countriesCodes, $countriesNames, $countriesFlightsNum) = getCountriesList(); $countriesNum = count($countriesNames); $i = 0; foreach ($countriesNames as $countryName) { echo '<a href="' . CONF_MODULE_ARG . '&country=' . $countriesCodes[$i] . '">' . $countryName . '</a> :: '; ++$i; } echo '</td></tr>'; close_inner_table();
} else { echo "<H3> Error in inserting waypoint info query! </H3>\n"; } return; } $query = "SELECT countryCode from {$waypointsTable} WHERE ID=" . makeSane($_REQUEST['takeoffID'], 1); $res = $db->sql_query($query); if ($res <= 0) { echo "<H3>" . _NO_KNOWN_LOCATIONS . "</H3>\n"; exit; } $row = mysql_fetch_assoc($res); $nearestCountryCode = $row["countryCode"]; mysql_freeResult($res); echo "<br>"; open_inner_table(_ADD_WAYPOINT, 650, "icon_pin.png"); echo "<tr><td>"; // get info from leonardo server around the world !!! // $leonardoServers=array("www.paraglidingforum.com","www.sky.gr","www.vololibero.net","xc.parapente.com.ar","www.ypforum.com","parablog.com.ar","www.heidel.com.ar"); $leonardoServers = array(); foreach ($leonardoServers as $leonardoServer) { getWaypointInfo($leonardoServer, $waypointLat, $waypointLon); } function getWaypointInfo($leonardoServer, $lat, $lon) { global $moduleRelPath; echo "Trying server : {$leonardoServer}<br>"; $fp = @fsockopen($leonardoServer, 80, $errno, $errstr, 3); if (!$fp) { echo "SERVER {$leonardoServer} NOT ACTIVE"; return 0;
$FILTER_takeoff2_select_op = _IS_NOT; $FILTER_takeoff3_select_pretext = _AND; $FILTER_takeoff3_select_op = _IS_NOT; } if ($FILTER_country1_select_op == "=") { $FILTER_country2_select_pretext = _OR; $FILTER_country2_select_op = _IS; $FILTER_country3_select_pretext = _OR; $FILTER_country3_select_op = _IS; } else { $FILTER_country2_select_pretext = _AND; $FILTER_country2_select_op = _IS_NOT; $FILTER_country3_select_pretext = _AND; $FILTER_country3_select_op = _IS_NOT; } open_inner_table(_FILTER_PAGE_TITLE, 700); echo "<tr><td>"; if ($_REQUEST["FILTER_dateType"]) { echo "<center><a href='" . CONF_MODULE_ARG . "&op=list_flights'>" . _RETURN_TO_FLIGHTS . "</a> :: </center><br><br>"; // echo "<a href='$filterUrl'>Bookmark Filter</a><br></center><br><br>"; } if ($_SESSION["filter_clause"]) { echo "<center><img src='" . $moduleRelPath . "/img/icon_filter.png' border=0>" . _THE_FILTER_IS_ACTIVE . ""; echo " :: <a href='{$filterUrl}'>Bookmark Filter</a><br></center><br><br>"; } else { echo "<center><img src='" . $moduleRelPath . "/img/icon_p5.gif' border=0>" . _THE_FILTER_IS_INACTIVE . "</center>"; } $calLang = $lang2iso[$currentlang]; if ($_GET['fl_url']) { ?> <script language='javascript'>