Jump to content

Vangelis

Members
  • Posts

    1076
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by Vangelis

  1. No problem happy that i helped you
  2. Copy and paste this over your's in /templates/profile_issued_awards.tpl <?php if(!$allawardtpes) { echo 'There is no awards available!'; return; } foreach($allawardtpes as $type) { ?> <h3><?php echo $type->typ_name;?></h3> <?php $allissuedawards = vAwardsData::GetAllIssuedAward($pilotid, $type->typ_id); if(!$allissuedawards) { echo 'Nessuna Spilla Assegnata'; $allissuedawards = array(); } echo "<table>"; echo "<tr>" ; $i = 0; foreach($allissuedawards as $award) { if ($i % 3 === 0) { echo '</tr><tr>'; } echo "<td><img src=".$award->awd_image." alt=".$award->descrip." /> <br /><strong>Award Name:</strong>".$award->awd_name."<br /></td>"; $i++; } echo "</tr>" ; echo "</table> "; } ?> This is tested with the version that i downloaded 2day from Kyle's github
  3. Copy and paste this over your code and see if it works My code didnt worked for you because i didnt saw that you are not using $allawards but $allissuedawards = vAwardsData::GetAllIssuedAward($pilotid, $type->typ_id); If the code below is not working please tell me in witch page or template do you want to show it and if you are using a custom awards module because the build in module for awards does not require you to do $allissuedawards = vAwardsData::GetAllIssuedAward($pilotid, $type->typ_id); in the template in order to show the pilot awards <?php $allissuedawards = vAwardsData::GetAllIssuedAward($pilotid, $type->typ_id); if(!$allissuedawards) echo 'Nessuna Spilla Assegnata'; else{ echo "<table>"; echo "<tr>" ; $i = 0; foreach ($allissuedawards as $award) { if ($i % 3 === 0) { echo '</tr><tr>'; } echo "<td><img src=".$award->image." alt=".$award->descrip." /> </td>"; $i++; } echo "</tr>" ; echo "</table> "; }
  4. Voila echo "<table>"; echo "<tr>" ; $i = 0; foreach ($allawards as $award) { if ($i % 3 === 0) { echo '</tr><tr>'; } echo "<td><img src=".$award->image." alt=".$award->descrip." /> </td>"; $i++; } echo "</tr>" ; echo "</table> "; Try this it is fixed for 3 rows but if you want more or less change the number 3 to your choise at if ($i % 3 === 0)
  5. Yes and it might be an embarashing idea I changed it for a va and i think i have sended you a diferent version can you please try this one and tell me if it is ok ? PirepAcData.class.php Thanks
  6. somebody send's a zero to this variable and as you know from school 0 cannot be devided you should insert a check control for exaple if zero return false else do the calculation also what i do not understand is why you have 2 variables with the same name doing the same thing
  7. That is doable but this is something else why the module was created for. You could make the schedules show only flights from the airport where the pilot is located. But if you wish drop me a pm and we can discuss it further more if you wish something custom build for you best regards
  8. If you want just send me the files by mail and i will see what i can do
  9. Problem solved that sometimes pirep where accepted even they had to be rejected Please replace this PirepAcData.class.php with yours and this PirepAcData.class.php is for the members that have the beta version of phpvms for example Txmmy83 Download has also updated Sorry for the trouble and if you have any problem just post it Best regards
  10. Nice There is a known problem by accepting a flight when the criteria that is met is not a last one and i am working on that
  11. Thanks can you please try with this one if it is ok ? PirepAcData.class.php
  12. There is no such option in phpvms as far as i know
  13. What exactly do you mean ? Can you give an example ?
  14. can you attach and the pilotdata.class and the pirepacdata.class that you have ?
  15. I am glad to hear that
  16. Could be as in yours it is in total different line try with this one PIREPData.class.php This file is ONLY for Txmmy83 or members that are using the beta build for the rest it wont work or it might destroy your setup
  17. as the screen shot says you have altered the PilotData and not The PirepData look at the preview post that i made and make sure that you have put PilotData::UpdateLastPIREPDate($pilotinfo->pilotid); in the corect place if you are unable to do that send me your PIREPData.class.php
  18. What is your mysql version ?
  19. Doesn't matter the only requirement for the auto comment to work is that you inserted your full username beware that this is the name that will be shown in the comments
  20. You placed it in the wrong function it should in PirepData.class (That is correct) under filereport function at some point in this function put it between # Update any pilot's information $pilotinfo = PilotData::getPilotData($pirepdata['pilotid']); $pilotcode = PilotData::getPilotCode($pilotinfo->code, $pilotinfo->pilotid); PilotData::UpdateLastPIREPDate($pilotinfo->pilotid); and # Send an email to the admin that a PIREP was submitted $sub = "A PIREP has been submitted by {$pilotcode} ({$pirepdata['depicao']} - {$pirepdata['arricao']})"; $message="A PIREP has been submitted by {$pilotcode} ({$pilotinfo->firstname} {$pilotinfo->lastname})\n\n" ."{$pirepdata['code']}{$pirepdata['flightnum']}: {$pirepdata['depicao']} to {$pirepdata['arricao']}\n" ."Aircraft: {$pirepdata['aircraft']}\n" ."Flight Time: {$pirepdata['flighttime']}\n" ."Filed using: {$pirepdata['source']}\n\n" ."Comment: {$pirepdata['comment']}"; $email = Config::Get('EMAIL_NEW_PIREP'); if(empty($email)) { $email = ADMIN_EMAIL; } Util::SendEmail($email, $sub, $message); CentralData::send_pirep($pirepid); // Reset this ID back DB::$insert_id = $pirepid; self::$pirepid = $pirepid; return true; } so it should be something like this # Update any pilot's information $pilotinfo = PilotData::getPilotData($pirepdata['pilotid']); $pilotcode = PilotData::getPilotCode($pilotinfo->code, $pilotinfo->pilotid); PilotData::UpdateLastPIREPDate($pilotinfo->pilotid); FacebookPost::FacebookPostFlight($pirepid); PirepAcData::search($pirepid); # Send an email to the admin that a PIREP was submitted $sub = "A PIREP has been submitted by {$pilotcode} ({$pirepdata['depicao']} - {$pirepdata['arricao']})"; $message="A PIREP has been submitted by {$pilotcode} ({$pilotinfo->firstname} {$pilotinfo->lastname})\n\n" ."{$pirepdata['code']}{$pirepdata['flightnum']}: {$pirepdata['depicao']} to {$pirepdata['arricao']}\n" ."Aircraft: {$pirepdata['aircraft']}\n" ."Flight Time: {$pirepdata['flighttime']}\n" ."Filed using: {$pirepdata['source']}\n\n" ."Comment: {$pirepdata['comment']}"; $email = Config::Get('EMAIL_NEW_PIREP'); if(empty($email)) { $email = ADMIN_EMAIL; } Util::SendEmail($email, $sub, $message); CentralData::send_pirep($pirepid); // Reset this ID back DB::$insert_id = $pirepid; self::$pirepid = $pirepid; return true; } That is why it doesnt work
  21. Agree and done thx Joeri for the feedback there is still work to do on the phpvms side but i am almost there. P.S i like that you remembered my dutch name
  22. Make sure you have added a valid pilot id in format VBA004 and replace your PirepAcData.class.php with this one PirepAcData.class.php i didnt thought of using it without a criteria so didnt saw that there was a problem when there was none with this one you should be ok if not tell me I have also updated the donwload Best regards and sorry for the trouble
  23. No problem i will update the installation ass well as it seems it isn't working in all mysql versions
  24. Here we go again 1 more to try AutoPirep.zip
  25. This one should work i changed the mysql version AutoPirep.zip
×
×
  • Create New...