Jump to content

Vangelis

Members
  • Posts

    1076
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by Vangelis

  1. Is there any change that we can see some part of the coding ?
  2. Unfortunatly the module only scans the log for keywords and if found it reject the pirep for that reason it cannot be done
  3. No idea when I get home I will have look but on my site it is working if you want you can login using the demo passwords www. Baggelis.com/phpvms
  4. add this function in core/common/Dashboard.php public function getpireps() { $data = PIREPData::getIntervalDataByDays(array(), 30); header("Content-type: application/json"); echo json_encode($data); } in admin/templates.tpl at the end add this code <script type="text/javascript"> var json = (function () { var json = null; $.ajax({ 'async': false, 'global': false, 'url': "<?php echo adminaction('/dashboard/getpireps');?>", 'dataType': "json", 'success': function (data) { json = data; } }); return json; }) (); new Morris.Line({ // ID of the element in which to draw the chart. element: 'myfirstchart', // Chart data records -- each entry in this array corresponds to a point on // the chart. data: json, // The name of the data record attribute that contains x-values. xkey: 'ym', // A list of names of data record attributes that contain y-values. ykeys: ['total'], // Labels for the ykeys -- will be displayed when you hover over the // chart. labels: ['Flights'] }); </script> and now where ever in the template you want to call the morris chart add <div id="myfirstchart" style="height: 250px;"></div>
  5. all this code could be replaced with $allPireps=PIREPData::findPIREPS($params=""); echo json_encode($allPireps); But this makes all the pireps in 1 json string and if you have to many pireps you will get Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 29413988 bytes) in like i did
  6. Have a look at this https://jsfiddle.net/vangelisb/a2hvgbo3/ With an ajax request you will be able to get the data you want
  7. web541 is right the data is being converted to json format with public function pirepcounts() { function if you run it with http://www.yoursite.com/admin/action.php/dashboard/pirepcounts You will get this result { "elements": [ { "type": "line", "values": [ 1 ], "dot-style": { "type": "solid-dot", "dot-size": 3, "halo-size": 1, "colour": "#3D5C56" }, "width": 2, "text": "", "font-size": 10, "colour": "#3D5C56" } ], "title": { "text": "Past 30 days PIREPS" }, "y_axis": { "min": -1, "max": 2, "steps": 1 }, "x_axis": { "labels": { "labels": [ "2015-11-04" ], "rotate": 270 } }, "bg_colour": "#FFFFFF" } But this is for ofCharts if you are using another charting code you might need to adjust it or make a new function
  8. You have no schedules in your va http://www.flysimple.co.uk/pilotarea/index.php/schedules You need to add them before using simbrief When have inserted 1 you will go to the briefing page and there you will find the simbrief button
  9. 1 more try replace var api_dir = 'www.pilotcenter.liftair.eu/core/modules/SimBrief/'; //Ex. "some/directory/"; in /lib/js/simbrief.apiv1.js with var api_dir = 'http://pilotcenter.liftair.eu/core/modules/SimBrief/'; //Ex. "some/directory/";
  10. in schedule_briefing replace http://www.pilotcenter.liftair.eu/index.php/SimBrief with http://pilotcenter.liftair.eu/index.php/SimBrief
  11. for start take this line <script type="text/javascript" src="http://pilotcenter.liftair.eu/lib/js/simbrief.apiv1.js"></script> and put it under <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.0/jquery-ui.min.js"></script> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script> <script type="text/javascript" src="http://pilotcenter.liftair.eu/lib/js/jquery.form.js"></script> <script type="text/javascript" src="http://pilotcenter.liftair.eu/lib/js/phpvms.js"></script> and the button @ http://pilotcenter.liftair.eu/index.php/schedules/brief/165 for example is not working most propably of the above
  12. please your website link as i dont think it is www.mywebpage.com
  13. you need to place the js file in /lib/js/ folder and change <script type="text/javascript" src="[url="http://www.flyelite.org/phpvms/lib/skins/ocean_blue/js/simbrief.apiv1.js"]http://www.flyelite.org/phpvms/lib/skins/ocean_blue/js/simbrief.apiv1.js[/url]"></script>[font=monospace] to <script type="text/javascript" src="<?php echo fileurl('lib/js/simbrief.apiv1.js');?>"></script> also make sure you have inserted an api key
  14. You need to post the PIREPData.class file in order to see if the function calculatePIREPPayment is there
  15. i havent seen your email have you read the instructions ? what is your website ?
  16. sure why not
  17. how do you edit the file ? maybe the encoding changed ?
  18. What seems to be the problem ?
  19. I do not know if you are aware of it but there is a simbrief module already have a look at this address http://baggelis.com/index.php/phpvms-templates/simbrief-briefing
  20. You payed for it so you have to ask tfdi for that
  21. are you sure you havent changed anything ? can you attach schedule_briefing.tpl ?
  22. Edit schedule_briefing.tpl and at about line 187 add <input type="hidden" name="units" value="lbs">
  23. Yes sorry i forgot to add it In with class do you add this ?
  24. Try this $pilotbonus = "50"; $userinfo = PilotData::getPilotData($pirep_details->pilotid); $FindIvao = strpos($pirep_details->log,IVAO) if($FindIvao === true) { $totalpay = $pilotbonus + $userinfo->totalpay ; $bonus = $pilotbonus +$userinfo->bonus; $fields = array ( 'totalpay' => $totalpay, 'bonus' => $bonus, ); PilotData::updateProfile($userinfo->pilotid, $fields); }
  25. How did you created a download page ? Just paste this code between every download if(Auth::$userinfo->totalflights >= 10) { //place here the download link } else { echo 'You have to fly at least 10 flights to download.';}
×
×
  • Create New...