1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646
| var refreshRate = seconds*500;
var overlays = [];
var LatLine = [];
var LonLine = [];
/**
* clearOverlays
*/
/*function clearOverlays(){
while(overlays[0]){
overlays.pop().setMap(null);
}
totalBounds = new google.maps.LatLngBounds();
infoWindow.close();
}
*/
/************************************************************/
function LierMarqueurEtInfoWindow(iMarker, iInfoWindow)
{
google.maps.event.addListener(iMarker, "mouseover", function(){iInfoWindow.open(MYMAP.map, iMarker);});
google.maps.event.addListener(iMarker, "mouseout", function(){iInfoWindow.close();});
google.maps.event.addListener(iMarker, "mouseover", function(){MYMAP.map.panTo(iMarker.getPosition());});
}
function LierMarqueurEtInfoWindowarr(iMarkerarr, iInfoWindowarr)
{
google.maps.event.addListener(iMarkerarr, "mouseover", function(){iInfoWindowarr.open(MYMAP.map, iMarkerarr);});
google.maps.event.addListener(iMarkerarr, "mouseout", function(){iInfoWindowarr.close();});
google.maps.event.addListener(iMarkerarr, "mouseover", function(){MYMAP.map.panTo(iMarkerarr.getPosition());});
google.maps.event.addListener(iMarkerarr, "mouseout", function(){iInfoWindowarr.close();});
}
function readLatLon(sWert, sPlus) {
var nDegrees, nHours, nSign;
var sClean;
var nTemp;
sClean = sWert;
sClean = sClean.replace("°", "");
sClean = sClean.replace("°", "");
sClean = sClean.replace("°", "");
if (sClean.isEmpty) return 0;
if (sClean.substr(0,1) == sPlus) nSign=1; else nSign=-1;
sClean = sClean.substr(1, sClean.length-1);
nTemp = sClean.indexOf(" ");
if (nTemp>0) {
nDegrees = parseFloat(sClean.substr(0,nTemp));
nHours = parseFloat(sClean.substr(nTemp, sClean.length-nTemp));
return (nDegrees + (nHours / 60.0))*nSign;
} else return 0;
}
function clearMarkers() {
for(var i = 0; i < markers.length; i++) {
if (markers[i]) {
markers[i].setMap(null);
}
}
}
function stripChars(vars,start, num){
out = vars.substring(start,vars.length-num);
return out;
}
function timedRefresh(timeoutPeriod) {
setTimeout("location.reload(true);",timeoutPeriod);
}
var markers = new Array();
$(document).ready(function () {
$('#wc').css({
'font-variant':'small-caps',
'font-family':'impact, sans-serif',
'font-style':'italic',
'font-size':'48px'
}).fadeTo('slow','0.9');
$('textarea').addClass('ui-corner-all');
//$('#logo').wrap('<h6><div id="author"><a href="http://www.basisten.se/e107_pages/hoplist_creator/"><div class="rk">©Robert Andersson<br/>Make your own hoplists</h6></div></a></div>');
$('#author').css({
'position':'fixed',
'bottom':'8px',
'right':'8px',
'z-index':'2',
'float':'right'
});
$('#author').hover(
function(){
$(this).stop().animate({'bottom': '+=4px'}, 'slow');
},
function(){
$(this).stop().animate({'bottom': '8px'}, 'slow');
});
$('.left,.right').css({'padding':'6px','margin-bottom':'12px'}).addClass('ui-corner-all');
$('#author .rk').button({icons: {primary: 'ui-icon-heart',secondary: 'ui-icon-extlink'}}).fadeTo('3000','0.5');
$('button').button({icons: { primary: 'ui-icon-refresh'}});
$('.a').button({icons: { primary: 'ui-icon-notice'}});
$('.b').button({icons: { primary: 'ui-icon-clipboard'}});
$('.c').button({icons: { primary: 'ui-icon-help'}});
$('a[href^="http"]').attr('target','_blank');
$('.pilots').ajaxSuccess(function() {
var icons = {
header: "ui-icon-circle-plus",
headerSelected: "ui-icon-circle-arrow-s"
};
$("#accordion").accordion({
collapsible: true,
icons:icons,
active: 2,
animated: 'easeOutExpo',
clearStyle: true,
header: 'h4'
});
$('tbody tr, a').hover(
function(){
$(this).stop().animate({'opacity': '0.5'}, 'slow');
},
function(){
$(this).stop().animate({'opacity': '1'}, 'slow');
});
$('.pilots tr:odd, .FlightPlans tr:odd').addClass(' ui-state-highlight');
$('.pilots tr:even, .FlightPlans tr:odd').addClass(' ui-widget-content');
$('.pil thead, .flp thead').addClass('ui-widget-header');
$('.pil td, .flp td').addClass('lrborder');
//$('table').css('border', 'none');
$('.pil thead tr td, #accordion .flp thead tr td').addClass('ui-corner-top');
$('.pil tbody tr:last td, #accordion .flp tbody tr:last td').addClass('ui-corner-bottom');
$('thead tr').addClass('ui-corner-left');
});
var myLatLng = new google.maps.LatLng(43.6350000277162, 1.36777773499489);
MYMAP.init('#map', myLatLng, 2);
updateXml();
});
var theFinalCountdown;
function clearingTimer(){
clearTimeout(theFinalCountdown);
updateXml();
//clearOverlays();
}
function updateXml() {
$.ajax({
type: "GET",
url: url,
dataType: "xml",
cache: false,
success: xmlParser
});
//trajet.setMYMAP.map(null);
theFinalCountdown = setTimeout('updateXml()', refreshRate);
removem();
/* points.setMap(null);
points_1.setMap(null);
points_2.setMap(null);
trajet_2.setMap(null);*/
}
var MYMAP = {
map: null,
bounds: null
}
MYMAP.init = function(selector, latLng, zoom) {
var myOptions = {
zoom: 5,
// icon: image,
//latLng : (43.6350000277162, 1.36777773499489),
center: latLng,
navigationControl: false,
mapTypeControl: false,
streetViewControl: false,
scaleControl: true,
maxZoom: 50,
title: "Hub Toulouse-Blagnac",
mapTypeId: google.maps.MapTypeId.SATELLITE
}
this.map = new google.maps.Map($(selector)[0], myOptions);
this.bounds = new google.maps.LatLngBounds();
var flightPlanCoordinates = [new google.maps.LatLng(45.7255556434393, 5.08111104369164), new google.maps.LatLng(48.3537835255265, 11.7860859632492), new google.maps.LatLng(50.0333056971431, 8.57045531272888), new google.maps.LatLng(48.7233332544565, 2.37944439053535), new google.maps.LatLng(49.0097224339843, 2.54777759313583), new google.maps.LatLng(50.5633333325386, 3.08694452047348), new google.maps.LatLng(48.4472222998738, -4.42166671156883), new google.maps.LatLng(43.6350000277162, 1.36777773499489), new google.maps.LatLng(43.4366667643189, 5.2149997651577), new google.maps.LatLng(43.6652778089046, 7.21500009298325), new google.maps.LatLng(45.7255556434393, 5.08111104369164)];
var flightPath = new google.maps.Polyline(
{
path: flightPlanCoordinates,
strokeColor: '#C151C7',
strokeOpacity: 5.0,
strokeWeight: 1,
clickable: true,
geodesic: true,
zIndex: 2
});
var weatherLayer = new google.maps.weather.WeatherLayer({
temperatureUnits: google.maps.weather.TemperatureUnit.CELSIUS
});
weatherLayer.setMap(MYMAP.map);
var cloudLayer = new google.maps.weather.CloudLayer();
cloudLayer.setMap(MYMAP.map);
flightPath.setMap(MYMAP.map); //-> add it to the map
}
function xmlParser(xml) {
var counter = 0;
var ServerName = $(xml).find("ServerName").text();
var ServerURL = $(xml).find("ServerURL").text();
var Version = $(xml).find("Version").text();
var ServerRunTime = $(xml).find("ServerRunTime").text();
var CurrentTime = $(xml).find("CurrentTime").text();
var CurrentDate = $(xml).find("CurrentDate").text();
var IPAddress = $(xml).find("IPAddress").text();
var SessionName = $(xml).find("SessionName").text();
var SessionComments = $(xml).find("SessionComments").text();
var PasswordRequired = $(xml).find("PasswordRequired").text();
var DirectXVersionRequired = $(xml).find("DirectXVersionRequired").text();
var CurrentPilots = $(xml).find("CurrentPilots").text();
var MaxPilots = $(xml).find("MaxPilots").text();
var CurrentObservers = $(xml).find("CurrentObservers").text();
var MaxObservers = $(xml).find("MaxObservers").text();
var NumFlightPlans = $(xml).find("NumFlightPlans").text();
var WeatherDescription = $(xml).find("WeatherDescription").text();
var WeatherRequired = $(xml).find("WeatherRequired").text();
//SessionComments = SessionComments.replace(/\n/gi, "<br />");
$('.ServerName').html(ServerName);
$('.Version').html(Version);
$('.ServerRunTime').html(ServerRunTime);
$('.CurrentTime').html(CurrentTime);
$('.CurrentDate').html(CurrentDate);
$('.SessionName').html(SessionName);
$('.SessionComments').html(SessionComments);
$('.PasswordRequired').html(PasswordRequired);
$('.CurrentPilots').html(CurrentPilots);
$('.MaxPilots').html(MaxPilots);
$('.CurrentObservers').html(CurrentObservers);
$('.MaxObservers').html(MaxObservers);
$('.WeatherDescription').html(WeatherDescription);
$('.WeatherRequired').html(WeatherRequired);
$(".numberOfPilots").html(CurrentPilots);
if((CurrentPilots!=0)&&(CurrentPilots>1)){
theEss='s';
}else{
theEss='';
}
$(".lastEss").html(theEss);
/*************************************************/
clearMarkers();
var barName = new Array;
var barAlt = new Array;
$(".pilots").empty();
$(".radars").empty();
// [Min, Max]
var PilotName = new Array();
var PilotAltitude = new Array();
var PilotSpeed = new Array();
var PilotDataRate = new Array();
var indexNum = new Array();
var flightPlanCoordinates = [];
$(xml).find("Player").each(function players(idx) {
var Name = $(this).find("Name").text();
var LatencyText = $(this).find("LatencyText").text();
var GameVersion = $(this).find("GameVersion").text();
var Type = $(this).find("Type").text();
var Aircraft = $(this).find("Aircraft").text();
var ConnectTime = $(this).find("ConnectTime").text();
var NearAirport = $(this).find("NearAirport").text();
var NearDistance = $(this).find("NearDistance").text();
var Altitude = stripChars($(this).find("Altitude").text(),0,1);
var Heading = stripChars($(this).find("Heading").text(),0,1);
var Speed = stripChars($(this).find("Speed").text(),0,4);
var Hop = $(this).find("Hop").text();
var DataRate = $(this).find("DataRate").text();
var Status = $(this).find("Status").text();
var Latitude = $(this).find("Latitude").text();
var Longitude = $(this).find("Longitude").text();
var myLat = readLatLon(Latitude, "N");
var myLon = readLatLon(Longitude, "E");
var theTitle = "HUB Aéroport Toulouse-Blagnac";
var icon0 = "http://www.serveur-perso.net/fshost/images/POI_sol.png";
var point0 = new google.maps.LatLng(43.6350000277162,1.36777773499489);
var marker = new google.maps.Marker({position: point0,title: theTitle,flat:false,icon: icon0,map: MYMAP.map });
google.maps.event.addListener(marker, "click", function(){MYMAP.map.panTo(marker.getPosition());})
LatLine[idx] = myLat;
LonLine[idx] = myLon;
PilotName.push(Name);
PilotAltitude.push(Altitude);
PilotSpeed.push(Speed);
PilotDataRate.push(DataRate);
indexNum.push(idx);
function fnSetRotation(obj, deg)
{
rad = deg * deg2radians;
costheta = Math.cos(rad);
sintheta = Math.sin(rad);
a = parseFloat(costheta).toFixed(8);
c = parseFloat(-sintheta).toFixed(8);
b = parseFloat(sintheta).toFixed(8);
d = parseFloat(costheta).toFixed(8);
if (obj.filters) {
obj.filters.item(0).M11 = costheta;
obj.filters.item(0).M12 = -sintheta;
obj.filters.item(0).M21 = sintheta;
obj.filters.item(0).M22 = costheta;
} else {
obj.setAttribute("style", "position:absolute; -moz-transform: matrix(" + a + ", " + b + ", " + c + ", " + d + ", 0, 0); -webkit-transform: matrix(" + a + ", " + b + ", " + c + ", " + d + ", 0, 0); -o-transform: matrix(" + a + ", " + b + ", " + c + ", " + d + ", 0, 0);");
}
}
function roundNumber(num, dec) {
var result = Math.round(num*Math.pow(10,dec))/Math.pow(10,dec);
return result;
}
function clearMarkers() {
for (var i = 0; i < markers.length; i++) {
if (markers[i]) {
markers[i].setMap(null);
}
}
}
function IconPixels(deg) {
deg2rad = deg / (180 / Math.PI);
newP = Math.sin(deg2rad*2);
if ((deg >= '091' && deg <= '180') || (deg >= '271' && deg <= '360')) {
newP = newP * -1;
}
newPixelSize = Math.round(32 + (14 * newP));
return newPixelSize;
}
var marker = [];
function createMarker(latlng,title,icon) {
var marker = new google.maps.Marker({
position: point,
title: theTitle,
icon: theImage,
flat:true,
map: MYMAP.map
});
}
if((Type=='Pilot')&&(Heading !='')){
barName[counter] = Name;
barAlt[counter] = Altitude;
if(Status==="Flying"){icon = "http://www.serveur-perso.net/fshost/images/appareil_vol.png";}
else if ((Status==="Parked")&&(Speed>1)){icon = "http://www.serveur-perso.net/fshost/images/appareil_taxi.png";}
else if (Status==="Pause"){icon = "http://www.serveur-perso.net/fshost/images/appareil_pause.png";}
else {icon = "http://www.serveur-perso.net/fshost/images/appareil_resting.png";}
var theTitle = "Pilot: "+Name + " :: Speed: " +Speed+" kts :: Alt: "+Altitude+" ft.";
var theTitle = "Pilot: "+Name + "\nHop: " + Hop + "\nSpeed: " + Speed + " kts\nAlt: " + Altitude + " ft.";
var iconSize = parseFloat(IconPixels(Heading));
var theImage =
new google.maps.MarkerImage(icon, // icon
new google.maps.Size(iconSize, iconSize), // size
new google.maps.Point(0,0), // origin
new google.maps.Point(roundNumber(iconSize/2,0),roundNumber(iconSize/2,0)));
// anchor
var point = new google.maps.LatLng(parseFloat(myLat),parseFloat(myLon));
//alert(marker.getPosition());
// extend the bounds to include the new point
//MYMAP.bounds.extend(point);
var marker = new google.maps.Marker( {
position: point,
title: theTitle,
icon: theImage,
flat:true,
map: MYMAP.map
}
);
/*var markersArray = [];
function colorline() {
downloadUrl("xml", function(data) {
var markers = data.documentElement.getElementsByTagName("Players");
for (var j = 0; j < markers.length; j++) {
var point = new google.maps.LatLng(
parseFloat(markers[j].getAttribute("Latitude")),
parseFloat(markers[j].getAttribute("Longitude")));
var myLat = readLatLon(Latitude, "N");
var myLon = readLatLon(Longitude, "E");
var point = new google.maps.LatLng(
parseFloat(markers[j].myLat),
parseFloat(markers[j].myLon));
line.push(point);
alert(point);
}
//Draw Polyline following markers
var flightPatha = new google.maps.Polyline({
path: line,
strokeColor: "#0033FF",
strokeOpacity: 0.5,
strokeWeight: 10
});
var flightPath = new google.maps.Polyline({
path: line,
strokeColor: "#FF0000",
strokeOpacity: 0.75,
strokeWeight: 4
});
flightPatha.setMap(MYMAP.map);
flightPath.setMap(MYMAP.map);
});
};
<!---------------------------------------------------------------
<!--------------------------------------------------------------- */
function removem() {
if (trajet_) {
for (i in trajet_) {
trajet_[i].setMap(null);
}
trajet_.length = 0;
}
};
//
$(xml).find("FlightPlan").each(function(){
var lPlan = $.trim($(this).find('Plan').text());
if(lPlan != "")
{
var lElements = lPlan.split(" ");
for(var lI in lElements)
{
if(lElements[lI].indexOf("-") != -1)
{
var lDepart = lElements[lI].split("-")[0];
var lArrivee = lElements[lI].split("-")[1];
break;
}
}
//alert(lDepart);
//alert(lArrivee);
$.ajax({
url: "http://www.serveur-perso.net/fshost/scripts/getOaci.php",
crossDomain : true,
dataType: "xml",
type: "post",
data: {oaci1: lDepart, oaci2: lArrivee},
success: function(iXml){
$(iXml).find("flight").each(function(){
var points= [];
var points_1= [];
var points_2= [];
//Progresiion
LatLine[idx] = myLat;
LonLine[idx] = myLon;
var lPosition1 = new google.maps.LatLng(parseFloat($(this).attr("depart_lat")),parseFloat($(this).attr("depart_lon")));
var lPosition2 = new google.maps.LatLng(parseFloat($(this).attr("arrivee_lat")),parseFloat($(this).attr("arrivee_lon")));
var lPosition_ac = new google.maps.LatLng(myLat,myLon);
//alert(+lPosition_ac);
points.push(lPosition1, lPosition_ac);
points_1.push(lPosition_ac, lPosition2);
points_2.push(lPosition1, lPosition2);
//Progresiion
// création des markers
var lMarker = new google.maps.Marker({map: MYMAP.map, position: lPosition1, clickable: true, flat: true, zIndex: 30, icon:"http://www.serveur-perso.net/fshost/images/POI_DEP"});
var lInfoWindow = new google.maps.InfoWindow({content: "Aéroport de : <span style=\"color: #FF0000\">" +$(this).attr("depart_nom") +"</span><br />" +"ICAO :" +lDepart +"<br />"+ "Pays : " +$(this).attr("depart_pays") +"<br />"+ "Altitude : "+$(this).attr("depart_alt")+" pieds" , disableAutoPan: false});
LierMarqueurEtInfoWindow(lMarker, lInfoWindow);
var lMarkerarr = new google.maps.Marker({map: MYMAP.map, position: lPosition2, clickable: true, flat: true, zIndex: 30, icon:"http://www.serveur-perso.net/fshost/images/POI_ARR"});
var lInfoWindowarr = new google.maps.InfoWindow({content: "Aéroport de : <span style=\"color: #00AC00\">" +$(this).attr("arrivee_nom") +"</span><br />" +"ICAO :" +lArrivee +"<br />"+ "Pays : " +$(this).attr("arrivee_pays") +"<br />"+ "Altitude : "+$(this).attr("arrivee_alt")+" pieds" , disableAutoPan: false});
LierMarqueurEtInfoWindowarr(lMarkerarr, lInfoWindowarr);
//var trajet = [];
//var trajet_1 = [];
//var trajet = new google.maps.Polyline({map: MYMAP.map, path: points, strokeColor: "#FF0000", strokeOpacity: 2.0, strokeWeight: 1.5, geodesic: true, clickable: true, zIndex: 20});
//var trajet_1 = new google.maps.Polyline({map: MYMAP.map, path: points_1, strokeColor: "#00AC00", strokeOpacity: 2.0, strokeWeight: 1.5, geodesic: true, clickable: true, zIndex: 20});
var trajet_2 = new google.maps.Polyline({map: MYMAP.map, path: points_2, strokeColor: "#00AC00", strokeOpacity: 2.0, strokeWeight: 1.5, geodesic: true, clickable: true, zIndex: 20});
//trajet.setMap(MYMAP.map);
//trajet_1.setMap(MYMAP.map);
//trajet_2.setMap(MYMAP.map);
//update = setTimeout('updateXml()', refreshRate);
//setTimeout('location.reload()', 100000);
});
}
});
}
else
{
var lDepart = "";
var lArrivee = "";
//removem();
}
//colorline();
});
//
var infoWindow = new google.maps.InfoWindow();
var html='<table class="bubble ui-widget-content ui-corner-all" style="height:150px; width:320px">'
+'<thead><tr><th colspan="2" class="ui-widget-header ui-corner-top">'+Name+'</th></tr></thead>'
+'<tbody>'
+'<tr><td>Aircraft:</td><td>'+Aircraft+'</td></tr>'
+'<tr><td>Altitude:</td><td>'+Altitude+' ft.</td></tr>'
+'<tr><td>Heading:</td><td>'+Heading+'°</td></tr>'
+'<tr><td>Speed:</td><td>'+Speed+' kts.</td></tr>'
+'</tbody>'
+'</table>';
google.maps.event.addListener(marker, 'click', function() {
infoWindow.setContent(html);
infoWindow.open(MYMAP.map, marker);
MYMAP.map.panTo(iMarqueur.getPosition());
});
markers[counter] = marker;
counter++;
nearInfo = NearAirport+' '+NearDistance;
}
$(".pilots").append(
'<tr>'
+'<td>' + GameVersion + '</td>'
+'<td>' + Name + '</td>'
+'<td>' + Aircraft + '</td>'
+'<td>' + ConnectTime + '</td>'
+'<td>' + nearInfo +'</td>'
+'<td>' + Altitude + '</td>'
+'<td>' + Heading + '</td>'
+'<td>' + Speed + '</td>'
+'<td>' + Hop + '</td>'
+'<td>' + DataRate + '</td>'
+'<td>' + Status + '</td></tr>'
);
});
$(".FlightPlans").empty();
$(xml).find("FlightPlan").each(function () {
var StatusText = $(this).find("StatusText").text();
var PlayerName = $(this).find("PlayerName").text();
var TimeFiledText = $(this).find("TimeFiledText").text();
var TimeOpenedText = $(this).find("TimeOpenedText").text();
var TimeClosedText = $(this).find("TimeClosedText").text();
var TimeOpened = $(this).find("TimeOpened").text();
var TimeClosed = $(this).find("TimeClosed").text();
var OpenTimeText = $(this).find("OpenTimeText").text();
var FlightPlanStatus = $(this).find("FlightPlanStatus").text();
var Plan = $(this).find("Plan").text();
if(StatusText==="Closed"){
var strip1 = FlightPlanStatus.replace(/<img src="\/flight_plan_closed.gif" align=absmiddle width=14 height=14 title="/, "");
var strip2 = strip1.replace(/">/, "");
var titleText = strip2;
// clearOverlays();
}else{
var titleText = "Flight Plan: "+StatusText;
}
$(".FlightPlans").append(
'<tr class="ui-widget-content">'
+'<td class="center lrborder" rowspan="2"><img src="http://i586.photobucket.com/albums/ss305/robFSX/FSHost/'+StatusText+'.png" width="30px" height="30px" alt="'+StatusText+'" title="'+titleText+'" /></td>'
+'<td class="lrborder" rowspan="2">'+PlayerName+'</td>'
+'<td class="center lrborder"> '+TimeFiledText+' </td>'
+'<td class="center lrborder"> '+TimeOpenedText+' </td>'
+'<td class="center lrborder"> '+TimeClosedText+' </td>'
+'<td class="center lrborder"> '+OpenTimeText+' </td>'
+'</tr>'
+'<tr class="ui-widget-content">'
+'<td class="data lrborder" colspan=4><b>'+Plan+'</b></td>'
+'</tr>'
);
});
} |
Partager