Guest Posted October 28, 2011 Report Posted October 28, 2011 this is HTML code for Free Pirep and i want use this code in my site can any one help me to change this code and how can i use it in my site <!doctype html public "-//w3c//dtd html 4.01 transitional//en"><HTML> <!-- saved from url=(0031)http://xxxxx/pirep.asp --> <!-- InstanceBegin template="/Templates/template.dwt" codeOutsideHTMLIsLocked="false" --> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta http-equiv="Content-Language" content="en-us"> <!-- Validated at 10/27/2011 10:10:38 PM --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><!-- InstanceBegin template="/Templates/template.dwt" codeOutsideHTMLIsLocked="false" --> <head> <!-- InstanceBeginEditable name="doctitle" --> <title></title> <script language="javascript" type="text/javascript" src="datetimepicker.js"> </script> <!-- InstanceEndEditable --> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="ivaosa.css" type="text/css" rel="stylesheet"> <script language="JavaScript" type="text/JavaScript"> <!-- function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } //--> </script> <style type="text/css"> #dropmenudiv{ position:absolute; border:1px solid #183A5E; border-bottom-width: 0; font:normal 11px Tahoma; line-height:18px; z-index:100; } #dropmenudiv a{ width: 100%; display: block; text-indent: 6px; border-bottom: 1px solid #183A5E; padding: 1px 0; text-decoration: none; font-weight: bold; color: #ffffff; } #dropmenudiv a:hover{ /*hover background color*/ background-color: white; color: #183A5E; } #dropmenudiv a{ /*hover background color*/ background-color: #70A3DA; } </style> <script type="text/javascript"> var ie4=document.all var ns6=document.getElementById&&!document.all if (ie4||ns6) document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>') function getposOffset(what, offsettype){ var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop; var parentEl=what.offsetParent; while (parentEl!=null){ totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop; parentEl=parentEl.offsetParent; } return totaloffset; } function showhide(obj, e, visible, hidden, menuwidth){ if (ie4||ns6) dropmenuobj.style.left=dropmenuobj.style.top="-500px" if (menuwidth!=""){ dropmenuobj.widthobj=dropmenuobj.style dropmenuobj.widthobj.width=menuwidth } if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover") obj.visibility=visible else if (e.type=="click") obj.visibility=hidden } function iecompattest(){ return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body } function clearbrowseredge(obj, whichedge){ var edgeoffset=0 if (whichedge=="rightedge"){ var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15 dropmenuobj.contentmeasure=dropmenuobj.offsetWidth if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure) edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth } else{ var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18 dropmenuobj.contentmeasure=dropmenuobj.offsetHeight if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up? edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either? edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge } } return edgeoffset } function populatemenu(what){ if (ie4||ns6) dropmenuobj.innerHTML=what.join("") } function dropdownmenu(obj, e, menucontents, menuwidth){ if (window.event) event.cancelBubble=true else if (e.stopPropagation) e.stopPropagation() clearhidemenu() dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv populatemenu(menucontents) if (ie4||ns6){ showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth) dropmenuobj.x=getposOffset(obj, "left") dropmenuobj.y=getposOffset(obj, "top") dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px" dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px" } return clickreturnvalue() } function clickreturnvalue(){ if (ie4||ns6) return false else return true } function contains_ns6(a, { while (b.parentNode) if ((b = b.parentNode) == a) return true; return false; } function dynamichide(e){ if (ie4&&!dropmenuobj.contains(e.toElement)) delayhidemenu() else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget)) delayhidemenu() } function hidemenu(e){ if (typeof dropmenuobj!="undefined"){ if (ie4||ns6) dropmenuobj.style.visibility="hidden" } } function delayhidemenu(){ if (ie4||ns6) delayhide=setTimeout("hidemenu()",disappeardelay) } function clearhidemenu(){ if (typeof delayhide!="undefined") clearTimeout(delayhide) } if (hidemenu_onclick=="yes") document.onclick=hidemenu function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } //--> </script> <!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable --> </head> <body leftmargin="0" topmargin="0" onLoad="MM_preloadImages('images/menu_ov_02.gif','images/menu_ov_03.gif','images/menu_ov_04.gif','images/menu_ov_05.gif','images/menu_ov_06.gif','images/menu_ov_07.gif','images/menu_ov_08.gif')"> <table width="826" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="826" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="80%" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><!-- InstanceBeginEditable name="EditRegion5" --> <!-- InstanceEndEditable --></td> </tr> <tr valign="top"> <td> <table width="645" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><div align="center"><!-- InstanceBeginEditable name="EditRegion4" --> <!-- InstanceEndEditable --></div></td> </tr> <tr> <td width="617"> <div align="center"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><!-- InstanceBeginEditable name="EditRegion1" --> <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="CEDCF2"> <tr> <td valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="92%" valign="top"> <script language="JavaScript" type="text/JavaScript"> function PIREP() { scallsign = document.pirep.callsign.value srules = document.pirep.rules.value saircraft = document.pirep.aircraft.value sdeparture = document.pirep.departure.value sdestination = document.pirep.destination.value sfl = document.pirep.fl.value sfdate = document.pirep.fdate.value sdistance = document.pirep.distance.value iscallsign = scallsign.length isrules = srules.length isaircraft = saircraft.length isdeparture= sdeparture.length isdestination = sdestination.length isfl = sfl.length isfdate= sfdate.length isdistance= sdistance.length if(iscallsign == 0) { alert("Please enter the call sign") document.pirep.callsign.focus() return false } if(document.pirep.rules.selectedIndex == 0) { alert("Please select the Rules") document.pirep.rules.focus() return false } if(isaircraft == 0) { alert("Please enter the aircraft name") document.pirep.aircraft.focus() return false } if(isdeparture == 0) { alert("Please enter the departure airport") document.pirep.departure.focus() return false } if(isdestination == 0) { alert("Please enter the destination airport") document.pirep.destination.focus() return false } if(isdistance == 0) { alert("Please enter the distance to take part in the competition, Pilot of the Month") document.pirep.distance.focus() return false } if(isfl == 0) { alert("Please enter the flight level") document.pirep.fl.focus() return false } if(isfdate == 0) { alert("Please enter the flight date") document.pirep.fdate.focus() return false } } </script> <form name="pirep" action="pirep.asp" method="post" onSubmit= "return PIREP();"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="4"><div align="center"><strong><font color="#990000" size="3" face="Tahoma"> Send PIREP Form</font></strong></div></td> </tr> <tr> <td colspan="4"><div align="right"><font color="#FF0000" size="1" face="Tahoma"><strong> Fields with an * are required! </strong></font></div></td> </tr> <tr> <td width="24%"><div align="right"><font color="#000066"><strong><font size="2" face="Tahoma"> IVAO ID:</font></strong></font></div></td> <td width="2%"> </td> <td width="27%"> </td> <td width="47%"> </td> </tr> <tr> <td><div align="right"><font color="#000066"><strong><font size="2" face="Tahoma"> Call Sign:<font color="#FF0000">*</font></font></strong></font></div></td> <td> </td> <td><input name="callsign" type="text" id="callsign"></td> <td><font color="#990000" size="1" face="Tahoma"><strong> (SVA)</strong></font></td> </tr> <tr> <td><div align="right"><font color="#000066"><strong><font size="2" face="Tahoma"> Rules:<font color="#FF0000">*</font></font></strong></font></div></td> <td> </td> <td><select name="rules" id="rules"> <option selected>:: Select ::</option> <option value="IFR"> IFR</option> <option value="VFR"> VFR</option> <option value="SVFR"> SVFR</option> </select></td> <td> </td> </tr> <tr> <td><div align="right"><font color="#000066"><strong><font size="2" face="Tahoma"> Aircraft:<font color="#FF0000">*</font></font></strong></font></div></td> <td> </td> <td><input name="aircraft" type="text" id="aircraft"></td> <td><font color="#990000" size="1" face="Tahoma"><strong> (Max 10 )</strong></font></td> </tr> <tr> <td><div align="right"><font color="#000066"><strong><font size="2" face="Tahoma"> Fuel:</font></strong></font></div></td> <td> </td> <td><input name="fuel" type="text" id="fuel"></td> <td><font color="#990000" size="1" face="Tahoma"><strong> (Used > 5)</strong></font></td> </tr> <tr> <td><div align="right"><font color="#000066"><strong><font size="2" face="Tahoma"> Fuel Unit:</font></strong></font></div></td> <td> </td> <td><input name="fu" type="text" id="fu"></td> <td><font color="#990000" size="1" face="Tahoma"><strong> (LB/KG)</strong></font></td> </tr> <tr> <td><div align="right"><font color="#000066"><strong><font size="2" face="Tahoma"> Departure:<font color="#FF0000">*</font></font></strong></font></div></td> <td> </td> <td><input name="departure" type="text" id="departure"></td> <td><font color="#990000" size="1" face="Tahoma"><strong> (ICAD)</strong></font></td> </tr> <tr> <td><div align="right"><font color="#000066"><strong><font size="2" face="Tahoma"> Alternative:</font></strong></font></div></td> <td> </td> <td><input name="alt" type="text" id="alt"></td> <td><font color="#990000" size="1" face="Tahoma"><strong> (ICAD)</strong></font></td> </tr> <tr> <td><div align="right"><font color="#000066"><strong><font size="2" face="Tahoma"> Destination:<font color="#FF0000">*</font></font></strong></font></div></td> <td> </td> <td><input name="destination" type="text" id="destination"></td> <td><font color="#990000" size="1" face="Tahoma"><strong> (ICAD)</strong></font></td> </tr> <tr> <td> <div align="right"><strong><font color="#000066" size="2" face="Tahoma"> Take Off:</font><font color="#FF0000" size="2" face="Tahoma">*</font></strong></div></td> <td> </td> <td> <select name="toHour" size="1" id="toHour"> <option value=0>00</option><option value=1> 01</option><option value=2> 02</option><option value=3> 03</option><option value=4> 04</option><option value=5> 05</option><option value=6> 06</option><option value=7> 07</option><option value=8> 08</option><option value=9> 09</option><option value=10> 10</option><option value=11> 11</option><option value=12> 12</option><option value=13> 13</option><option value=14> 14</option><option value=15> 15</option><option value=16> 16</option><option value=17> 17</option><option value=18> 18</option><option value=19> 19</option><option value=20> 20</option><option value=21> 21</option><option selected value=22> 22</option><option value=23> 23</option> </select> <font size="1" face="Tahoma"><strong> h</strong></font><strong>:</strong> <select name="toMin" size="1" id="toMin"> <option value=0>00</option><option value=1> 01</option><option value=2> 02</option><option value=3> 03</option><option value=4> 04</option><option value=5> 05</option><option value=6> 06</option><option value=7> 07</option><option value=8> 08</option><option value=9> 09</option><option selected value=10> 10</option><option value=11> 11</option><option value=12> 12</option><option value=13> 13</option><option value=14> 14</option><option value=15> 15</option><option value=16> 16</option><option value=17> 17</option><option value=18> 18</option><option value=19> 19</option><option value=20> 20</option><option value=21> 21</option><option value=22> 22</option><option value=23> 23</option><option value=24> 24</option><option value=25> 25</option><option value=26> 26</option><option value=27> 27</option><option value=28> 28</option><option value=29> 29</option><option value=30> 30</option><option value=31> 31</option><option value=32> 32</option><option value=33> 33</option><option value=34> 34</option><option value=35> 35</option><option value=36> 36</option><option value=37> 37</option><option value=38> 38</option><option value=39> 39</option><option value=40> 40</option><option value=41> 41</option><option value=42> 42</option><option value=43> 43</option><option value=44> 44</option><option value=45> 45</option><option value=46> 46</option><option value=47> 47</option><option value=48> 48</option><option value=49> 49</option><option value=50> 50</option><option value=51> 51</option><option value=52> 52</option><option value=53> 53</option><option value=54> 54</option><option value=55> 55</option><option value=56> 56</option><option value=57> 57</option><option value=58> 58</option><option value=59> 59</option> </select> <font size="1" face="Tahoma"><strong> m</strong></font></td> <td><strong><font color="#990000" size="1" face="Tahoma"> Use always UTC Timings</font></strong></td> </tr> <tr> <td> <div align="right"><strong><font color="#000066" size="2" face="Tahoma"> Land:</font><font color="#FF0000" size="2" face="Tahoma">*</font></strong></div></td> <td> </td> <td> <select name="lHour" size="1" id="lHour"> <option value=0>00</option><option value=1> 01</option><option value=2> 02</option><option value=3> 03</option><option value=4> 04</option><option value=5> 05</option><option value=6> 06</option><option value=7> 07</option><option value=8> 08</option><option value=9> 09</option><option value=10> 10</option><option value=11> 11</option><option value=12> 12</option><option value=13> 13</option><option value=14> 14</option><option value=15> 15</option><option value=16> 16</option><option value=17> 17</option><option value=18> 18</option><option value=19> 19</option><option value=20> 20</option><option value=21> 21</option><option selected value=22> 22</option><option value=23> 23</option> </select> <font size="1" face="Tahoma"><strong> h</strong></font><strong>:</strong> <select name="lMin" size="1" id="select2"> <option value=0>00</option><option value=1> 01</option><option value=2> 02</option><option value=3> 03</option><option value=4> 04</option><option value=5> 05</option><option value=6> 06</option><option value=7> 07</option><option value=8> 08</option><option value=9> 09</option><option selected value=10> 10</option><option value=11> 11</option><option value=12> 12</option><option value=13> 13</option><option value=14> 14</option><option value=15> 15</option><option value=16> 16</option><option value=17> 17</option><option value=18> 18</option><option value=19> 19</option><option value=20> 20</option><option value=21> 21</option><option value=22> 22</option><option value=23> 23</option><option value=24> 24</option><option value=25> 25</option><option value=26> 26</option><option value=27> 27</option><option value=28> 28</option><option value=29> 29</option><option value=30> 30</option><option value=31> 31</option><option value=32> 32</option><option value=33> 33</option><option value=34> 34</option><option value=35> 35</option><option value=36> 36</option><option value=37> 37</option><option value=38> 38</option><option value=39> 39</option><option value=40> 40</option><option value=41> 41</option><option value=42> 42</option><option value=43> 43</option><option value=44> 44</option><option value=45> 45</option><option value=46> 46</option><option value=47> 47</option><option value=48> 48</option><option value=49> 49</option><option value=50> 50</option><option value=51> 51</option><option value=52> 52</option><option value=53> 53</option><option value=54> 54</option><option value=55> 55</option><option value=56> 56</option><option value=57> 57</option><option value=58> 58</option><option value=59> 59</option> </select> <font size="1" face="Tahoma"><strong> m</strong></font></td> <td><strong><font color="#990000" size="1" face="Tahoma"> Use always UTC Timings</font></strong></td> </tr> <tr> <td><div align="right"><font color="#000066"><strong><font size="2" face="Tahoma"> Distance:<font color="#FF0000">*</font></font></strong></font></div></td> <td> </td> <td><input name="distance" type="text" id="distance"></td> <td><font color="#990000" size="1" face="Tahoma"><strong> (NM- Nautical Miles)</strong></font></td> </tr> <tr> <td><div align="right"><font color="#000066"><strong><font size="2" face="Tahoma"> TAS:</font></strong></font></div></td> <td> </td> <td><input name="tas" type="text" id="tas"></td> <td> </td> </tr> <tr> <td><div align="right"><font color="#000066"><strong><font size="2" face="Tahoma"> FL or ALT:<font color="#FF0000">*</font></font></strong></font></div></td> <td> </td> <td><input name="fl" type="text" id="fl"></td> <td> </td> </tr> <tr> <td> <div align="right"><strong><font color="#000066" size="2" face="Tahoma"> Date:</font><font color="#FF0000" size="2" face="Tahoma">*</font></strong></div></td> <td> </td> <td> <input id="demo1" name="fdate" type="text" size="10"> <a href="javascript:NewCal('demo1','MMddyyyy')"><img src="images/cal.gif" width="16" height="16" border="0" alt="Pick a date"></a> </td> <td><strong><font color="#990000" size="1" face="Tahoma"> Take Off Date MM/DD/YYYY & Month/Day/Year </font></strong></td> </tr> <tr> <td> <div align="right"><strong><font color="#000066" size="2" face="Tahoma"> Route/Comments:</font></strong></div></td> <td> </td> <td colspan="2"> <textarea name="comments" cols="45" rows="6" id="comments"></textarea> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td colspan="4"><div align="center"> <input type="submit" id="PIREP7895" name="PIREP7895" value="Submit"> <input type="reset" name="Submit2" value="Reset"> </div></td> </tr> </table> </form></td> </tr> </table> </td> </tr> </table> <!-- InstanceEndEditable --></td> </tr> </table> </div></td> </tr> </table></td> </tr> </table></td> </tr> </table></td> </tr> </table> </td> </tr> </table> </body> <!-- InstanceEnd --></html> Quote
Moderators mark1million Posted October 28, 2011 Moderators Report Posted October 28, 2011 Hi I dont really understand why you would want to use this, there is already a manual way of filing a pirep in to phpVMS. You could look at the current form and add validation using JavaScript if you wish, that would be easier than trying to implement that. Quote
Tom Posted October 28, 2011 Report Posted October 28, 2011 That may just be the messiest code I've ever had to scroll horizontally to read... 2 Quote
Strider Posted October 28, 2011 Report Posted October 28, 2011 That code is ugly, way too many nested tables. You shouldn't really use tables for layout of a page, just for small sections of it. DIV's and classes and ID's are what you should use. You can style the pirep form that comes with phpvms to your liking. Quote
Guest Posted October 28, 2011 Report Posted October 28, 2011 mark1million you say i have manual way of filing a pirep in to phpVMS i need priep for free flight report i want free box to enter the data like aircraft's full's dep airports des airports can any one help me Quote
P.I.A.S Virtual Posted October 30, 2011 Report Posted October 30, 2011 mark1million you say i have manual way of filing a pirep in to phpVMS i need priep for free flight report i want free box to enter the data like aircraft's full's dep airports des airports can any one help me What do you mean by free flight report? I really dont understand. And ur code is ugly Quote
Guest Posted October 31, 2011 Report Posted October 31, 2011 The report contains available only on flights that have been added already, but I want to report any flight by pilots I mean to be the following fields empty and the pilot can add to it the flight evidence Departure Airport Arrival Airport Aircraft Fuel Used t/o time Landing time and forget code i post it and this is not ugly code i will show u pic for this code Quote
Jeff Posted November 2, 2011 Report Posted November 2, 2011 Here is the default one that comes with phpVMS. Not sure what you are trying to accomplish here. **Type this after your website link (ex: www.yoursite.com/index.php) /pireps/filepirep Quote
Guest Posted November 2, 2011 Report Posted November 2, 2011 i will post pic for what i want if you see in my pic all i need is empty fields and member can add any aircraft,Departure Airport,Arrival Airport ..... But the existing report containing specific data such as airport takeoff and landing airport, these data come on the flight schedule that has been developed My question is if one has to travel from airport to airport does not have the flight schedule how can he send his report Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.