Jump to content

Vangelis

Members
  • Posts

    1076
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by Vangelis

  1. In cpanel https://www.netshop-isp.com.cy/v3/blog/2010/10/how-to-setup-cron-job-in-cpanel/ On curent cron jobs just click delete
  2. It should under cron jobs cron =auto
  3. Hello For the needs of my VA i created a Pilot badge with a modiefied version of signature function This is the code this is for users that do know a litle bit of php and because it is a litle complicated i will NOT provide any support on that the picture will be saved in the same folder as your signatures in the format id-PILOTID Below is a screenshot where i use it as a possible use for you and the code. The Name the rank and the date are coming dynamic from the database the picture above the name comes dynamic from the avatar that the user has selected if none is selected then the default will show the picture of the rank comes dynamic from the rank that you have as a pilot YOU MUST USE RELATIVE PATH in your admin section or else no pic will come on like with the signature you must have a template so that everything comes to place you have to put it in /lib/signatures/backround/ with the name id.png When you have done everything you need to call the function where ever you think for example whenever you send a pirep . Good luck modiefing it public function generateid($pilotid) { $pilot = PilotData::getPilotData($pilotid); $pilotcode = PilotData::getPilotCode($pilot->code, $pilot->pilotid); if(Config::Get('TRANSFER_HOURS_IN_RANKS') === true) { $totalhours = $pilot->totalhours + $pilot->transferhours; } else { $totalhours = $pilot->totalhours; } $mysqldate = date( 'Y-m-d ', $pilot->joindate ); # Configure what we want to show on each line $output = array(); $output[] = $pilot->firstname.' '.$pilot->lastname; $output[] = $pilotcode; $output[] = $pilot->rank; $output[] = $pilot->retired; $output[] = $mysqldate; if(Config::Get('SIGNATURE_SHOW_EARNINGS') == true) { $output[] = 'Total Earnings: ' . $pilot->totalpay; } # Load up our image # Get the background image the pilot selected if(empty($pilot->bgimage)) $bgimage = SITE_ROOT.'/lib/signatures/background/id.png'; else $bgimage = SITE_ROOT.'/lib/signatures/background/id.png'; if(!file_exists($bgimage)) { # Doesn't exist so use the default $bgimage = SITE_ROOT.'/lib/signatures/background/id.png'; if(!file_exists($bgimage)) { return false; } } $img = @imagecreatefrompng($bgimage); if(!$img) { $img = imagecreatetruecolor(300, 50); } $height = imagesy($img); $width = imagesx($img); $txtcolor = str_replace('#', '', Config::Get('SIGNATURE_TEXT_COLOR')); $color = sscanf($txtcolor, '%2x%2x%2x'); $textcolor = imagecolorallocate($img, $color[0], $color[1], $color[2]); $font = 3; // Set the font-size $xoffset = "150"; # How many pixels, from left, to start $yoffset = "200"; # How many pixels, from top, to start $font = Config::Get('SIGNATURE_FONT_PATH'); $font_size = Config::Get('SIGNATURE_FONT_SIZE'); if(function_exists('imageantialias')) { imageantialias($img, true); } /* Font stuff */ if(!function_exists('imagettftext')) { Config::Set('SIGNATURE_USE_CUSTOM_FONT', false); } # The line height of each item to fit nicely, dynamic if(Config::Get('SIGNATURE_USE_CUSTOM_FONT') == false) { $stepsize = imagefontheight($font); $fontwidth = imagefontwidth($font); } else { // get the font width and step size $bb = imagettfbbox ( $font_size, 0, $font, 'A'); $stepsize = $bb[3] - $bb[5] + Config::Get('SIGNATURE_FONT_PADDING'); $fontwidth = $bb[2] - $bb[0]; } $currline = $yoffset; $total = count($output); if(Config::Get('SIGNATURE_USE_CUSTOM_FONT') == false) { imagestring($img, $font, $xoffset, $currline, $output[$i], $textcolor); } else { // Use TTF $tmp = imagettftext($img, $font_size, 0, 30, 220, $textcolor, $font, $output[0]); $tmp = imagettftext($img, $font_size, 0, 265, 335, $textcolor, $font, $output[2]); $tmp = imagettftext($img, $font_size, 0, 215, 390, $textcolor, $font, $output[4]); if ($output[3]==1) { $tmp = imagettftext($img, $font_size, 0, 240, 230, $textcolor, $font, 'Pilot Retired'); $tmp = imagettftext($img, 40, 50, 130, 300, $textcolor, $font, 'INVALID ID'); } else { $tmp = imagettftext($img, $font_size, 0, 240, 230, $textcolor, $font,'Active Pilot'); } // Flag is placed at the end of of the first line, so have that bounding box there if($i==0) { $flag_bb = $tmp; } } $currline+=$stepsize; # Add the Avatar Picture, line it up with the first line, which is the # pilot code/name if(file_exists(SITE_ROOT.'/lib/avatars/'.$pilotcode.'.png')) { $avatarimg = imagecreatefrompng(SITE_ROOT.'/lib/avatars/'.$pilotcode.'.png'); if(Config::Get('SIGNATURE_USE_CUSTOM_FONT') == false) { $ret = imagecopy($img, $avatarimg, strlen($output[0])*$fontwidth, ($yoffset+($stepsize/2)-5.5), 0, 0, 50, 50); } else { # figure out where it would go $ret = imagecopy($img, $avatarimg, 70, 100, 0, 0, 50, 60); } } else $avatarimg = imagecreatefrompng(SITE_ROOT.'/lib/images/noavatar.png'); if(Config::Get('SIGNATURE_USE_CUSTOM_FONT') == false) { $ret = imagecopy($img, $avatarimg, strlen($output[0])*$fontwidth, ($yoffset+($stepsize/2)-5.5), 0, 0, 50, 50); } else { # figure out where it would go $ret = imagecopy($img, $avatarimg, 70, 100, 0, 0, 50, 50); } # Add the Rank image $ext = substr($pilot->rankimage, strlen($pilot->rankimage)-3, 3); # Get the rank image type, just jpg, gif or png if($ext == 'png') $rankimg = @imagecreatefrompng($pilot->rankimage); elseif($ext == 'gif') $rankimg = @imagecreatefromgif($pilot->rankimage); else $rankimg = @imagecreatefromjpg($pilot->rankimage); if(!$rankimg) { echo '';} else { $ret = imagecopy($img, $rankimg, 250, 260, 0, 0, 100, 60); // imagecopy($img, $rankimg, $width-$r_width-$xoffset, $yoffset, 0, 0, $r_width, $r_height); } if(Config::Get('SIGNATURE_SHOW_COPYRIGHT') == true) { # # DO NOT remove this, as per the phpVMS license $font = 1; $text = 'powered by phpvms, '. SITE_NAME.' '; imagestring($img, $font, $width-(strlen($text)*imagefontwidth($font)), $height-imagefontheight($font), $text, $textcolor); } imagepng($img, SITE_ROOT.SIGNATURE_PATH.'/id-'.$pilotcode.'.png', 1); imagedestroy($img); echo $pilot->retired; }
  4. I friendly observation just send him a pm rather than writing on paid services that you are going to do for free
  5. As it seems it should be ok Do you have any custom modules installed ? they might interfere aswell
  6. The central idea is that 1 site is the master for example VAcentral and the rest are the clients so you will achieve that all the pilots will be shown in the master. The second part is a litle tricky most probably you could just sync the master acars table to the rest of the clients. What are you trying to achieve ? so we can think something about it. a V.A Alicane ? and what Acars software do you use ?
  7. It is pretty easy just need to make an xml with the translations atm i am working on our va client so no time for it. If somebody else want to do it i can explain to him how to do it Happy flying
  8. If some airline use dispatchers you could also send them a movement - ldm - psm for each flight very nice what you have made
  9. 2day i have a shift at the airport that finishes at about 2100 utc after that i bilieve i will be avaiable so if you see me online you can call me
  10. My skype is sv5frv1 yust throw a wishle
  11. I am free to help you via teamviewer if you want tell me what time you are able to have a look at it
  12. Yes he will loose the translation when he updates . But i was thinking of making the program to able to be translated but it need's a lot of work
  13. Yes it is correct with your example you start the flight with 10000lbs -2000 lbs that you landed with pirep will be filled with 8000lbs burned
  14. The problem with the landing rate yes is corected Apvacars is not transalteable at the moment i could do that for you but it will be replaced in a followed version And if i understood you want to send the log via e-mail ?
  15. Touch down rate has been fixed since 1.0.0.1 current version is 1.0.0.4. At the moment comment can be added only by modiefiing the pirep in phpvms
  16. What do you mean with corrigita ? and also i could't understand your second question
  17. What kind of id do you pass ? For ex avs001 or 001?
  18. As it looks like a javascript problem cant you do the redirect via php ? <?php header( 'Location: http://www.yoursite.com/new_page.html' ) ; ?>
  19. To be honest i never liked yellow letters also when you switch to english the login box goes off also the tour table and the callendar i dont think that it is nice to be in the front page, if fleet table the corners are upside down, on http://www.virtualiroma.it/newvar/index.php/Airports the table is off to the right, i regolamento you ask for the user to accept the rules but in registration you dont , vatsim online would be nice to have map rather than the tables. Thats what i saw from my view op point wish you luck
  20. Try this code <?php include($_SERVER['DOCUMENT_ROOT'].'test/phpvms/core/codon.config.php'); ?> <html> <div class="column"> <div id="featured"> <h2>Newest Pilots</h2> </div> <div id="featured"> <h2>Recent Forum Posts</h2> <?php /*require_once('forum/config.php'); $link = mysql_connect($dbhost,$dbuser,$dbpasswd); mysql_select_db($dbname, $link); $result = mysql_query("SELECT * FROM `phpbb_posts` ORDER BY `post_id` DESC LIMIT 5", $link); while($r = mysql_fetch_array($result)) { echo "<a href=\"http://www.bluespiritva.co.uk/forum/viewtopic.php?f=7&t=76" . $r['post_id'] . "\">" . $r['post_subject'] . "</a><br />"; }*/ ?> </div> <div id="featured"> <h2>Pilots on Teamspeak</h2> <div id="ts3viewer_1020584" style="width:; background-color:;"> </div> <script type="text/javascript" src="http://static.tsviewer.com/short_expire/js/ts3viewer_loader.js"></script> <script type="text/javascript"> <!-- var ts3v_url_1 = "http://www.tsviewer.com/ts3viewer.php?ID=1020584&text=000000&text_size=12&text_family=1&js=1&text_s_weight=bold&text_s_style=normal&text_s_variant=normal&text_s_decoration=none&text_s_color_h=525284&text_s_weight_h=bold&text_s_style_h=normal&text_s_variant_h=normal&text_s_decoration_h=underline&text_i_weight=normal&text_i_style=normal&text_i_variant=normal&text_i_decoration=none&text_i_color_h=525284&text_i_weight_h=normal&text_i_style_h=normal&text_i_variant_h=normal&text_i_decoration_h=underline&text_c_weight=normal&text_c_style=normal&text_c_variant=normal&text_c_decoration=none&text_c_color_h=525284&text_c_weight_h=normal&text_c_style_h=normal&text_c_variant_h=normal&text_c_decoration_h=underline&text_u_weight=bold&text_u_style=normal&text_u_variant=normal&text_u_decoration=none&text_u_color_h=525284&text_u_weight_h=bold&text_u_style_h=normal&text_u_variant_h=normal&text_u_decoration_h=none"; ts3v_display.init(ts3v_url_1, 1020584, 100); --> </script> </div> <!--------------------------------------------------------> <div align="center"> <table class="qtable" width="200px" style="margin-left:-4px;"> <tbody> <tr> <td style="border-bottom:1px dashed #CDCDCD;"><div align="left"> <strong>Flights Today</strong> </div></td><br /> <td style="border-bottom:1px dashed #CDCDCD;"><div align="center"><span class="label"><?php echo StatsData::totalflightstoday(); ?></span></div></td> </tr> <tr> <td style="border-bottom:1px dashed #CDCDCD;"><div align="left"> <strong>Total Flights</strong> </div></td> <td style="border-bottom:1px dashed #CDCDCD;"><div align="center"><span class="label"><?php echo StatsData::TotalFlights(); ?></span></div></td> </tr> <tr> <td style="border-bottom:1px dashed #CDCDCD;"><div align="left"> <strong>Registrations Status</strong> </div></td> <td style="border-bottom:1px dashed #CDCDCD;"><div align="center"><span class="success label">OPEN</span></div></td> </tr> <tr> <td style="border-bottom:1px dashed #CDCDCD;"><div align="left"> <strong>Total Pilots</strong> </div></td> <td style="border-bottom:1px dashed #CDCDCD;"><div align="center"><span class="label">375</span></div></td> </tr> <tr> <td style="border-bottom:1px dashed #CDCDCD;"><div align="left"> <strong>Total Passengers Carried</strong> </div></td> <td style="border-bottom:1px dashed #CDCDCD;"><div align="left"><span class="label"><?php echo StatsData::TotalPaxCarried (); ?></span></div></td> </tr><tr> <td style="border-bottom:1px dashed #CDCDCD;"><div align="left"> <strong>Total Aircraft</strong> </div></td> <td style="border-bottom:1px dashed #CDCDCD;"><div align="left"><span class="label"><?php echo StatsData::TotalAircraftInFleet () ; ?></span></div></td> </tr> <tr> <td style="border-bottom:1px dashed #CDCDCD;"><div align="left"> <strong>Total Schedules</strong> </div></td> <td style="border-bottom:1px dashed #CDCDCD;"><div align="left"><span class="label"><?php echo StatsData::TotalSchedules (); ?></span></div></td> </tr> <tr> <td style="border-bottom:1px dashed #CDCDCD;"><div align="left"> <strong>Pending Applications</strong> </div></td> <td style="border-bottom:1px dashed #CDCDCD;"><div align="left"><span class="alert label"><?php echo count(PilotData::GetPendingPilots())?></span></div></td> </tr></tbody></table></div> -----------------------------------------------------------> <div class="holder"> <script type="text/javascript" src="http://jk.revolvermaps.com/r.js"></script><script type="text/javascript">rm_f1st('8','200','true','false','000000','afpo5r6m7b8','true','ff0000');</script><noscript><applet codebase="http://rk.revolvermaps.com/j" code="core.RE" width="260" height="260" align="absmiddle" archive="g.jar"><param name="cabbase" value="g.cab" /><param name="r" value="true" /><param name="n" value="false" /><param name="i" value="afpo5r6m7b8" /><param name="m" value="8" /><param name="s" value="200" /><param name="c" value="ff0000" /><param name="v" value="true" /><param name="b" value="000000" /><param name="rfc" value="true" /></applet></noscript> </div> </div> </html> On my setup this seems to be working i have a small doubt about the forum recent posts thats why i commented it out only edit the include($_SERVER['DOCUMENT_ROOT'].'test/phpvms/core/codon.config.php'); to match your setup.
  21. When i was writing the post after that geek squad came and slaped me in the face
  22. If it is localhost he wont be able to use the tool best ways is to go to cpanel or the admin panel of your domain - > phpmyadmin - > import -> load file -> go
  23. Ok my bad. This is the Pirepadmin module in admin section https://github.com/n.../PIREPAdmin.php in line 298 is function approve_pirep_post where if you put side by side the pirepdata.class you will be able to see what is happening For example protected function approve_pirep_post() { $pirepid = $this->post->id; if($pirepid == '') return; $pirep_details = PIREPData::GetReportDetails($pirepid); # See if it's already been accepted if(intval($pirep_details->accepted) == PIREP_ACCEPTED) return; # Update pilot stats SchedulesData::IncrementFlownCount($pirep_details->code, $pirep_details->flightnum); -------------------------------------------------------------------------------------------------------------------------------- public static function IncrementFlownCount($code, $flightnum) /located in schedulesData.class.php { $schedid = intval($schedid); $code = strtoupper($code); $flightnum = strtoupper($flightnum); $sql = 'UPDATE '.TABLE_PREFIX."schedules SET timesflown=timesflown+1 WHERE code='{$code}' AND flightnum='{$flightnum}'"; $res = DB::query($sql); if(DB::errno() != 0) return false; return true; } -------------------------------------------------------------------------------------------------------------------------------- PIREPData::ChangePIREPStatus($pirepid, PIREP_ACCEPTED); // 1 is accepted -------------------------------------------------------------------------------------------------------------------------------- public static function ChangePIREPStatus($pirepid, $status)// located in PIREPData.class.php { return self::editPIREPFields($pirepid, array('accepted' => $status)); } with public static function editPIREPFields($pirepid, $fields) { if(!is_array($fields)) { return false; } $sql = "UPDATE `".TABLE_PREFIX."pireps` SET "; $sql .= DB::build_update($fields); $sql .= ' WHERE `pirepid`='.$pirepid; $res = DB::query($sql); if(DB::errno() != 0) { return false; } return true; } ------------------------------------------------------------------------------------------------------------------------------------------------------------------- PilotData::UpdateFlightData($pirep_details->pilotid, $pirep_details->flighttime, 1); PilotData::UpdatePilotPay($pirep_details->pilotid, $pirep_details->flighttime); RanksData::CalculateUpdatePilotRank($pirep_details->pilotid); PilotData::GenerateSignature($pirep_details->pilotid); StatsData::UpdateTotalHours(); LogData::addLog(Auth::$userinfo->pilotid, 'Approved PIREP #'.$pirepid); # Call the event CodonEvent::Dispatch('pirep_accepted', 'PIREPAdmin', $pirep_details); } end etc In a summary when you click on accept pirep these functions are executed $pirep_details = PIREPData::GetReportDetails($pirepid); # Update pilot stats SchedulesData::IncrementFlownCount($pirep_details->code, $pirep_details->flightnum); PIREPData::ChangePIREPStatus($pirepid, PIREP_ACCEPTED); // 1 is accepted PilotData::UpdateFlightData($pirep_details->pilotid, $pirep_details->flighttime, 1); PilotData::UpdatePilotPay($pirep_details->pilotid, $pirep_details->flighttime); RanksData::CalculateUpdatePilotRank($pirep_details->pilotid); PilotData::GenerateSignature($pirep_details->pilotid); StatsData::UpdateTotalHours(); LogData::addLog(Auth::$userinfo->pilotid, 'Approved PIREP #'.$pirepid); # Call the event CodonEvent::Dispatch('pirep_accepted', 'PIREPAdmin', $pirep_details); I hope i have solved your questions if not here we are if you want tomorrow i can make a post with the sql queries only
  24. I dont know what you want to do but, when you or your acars software send a pirep then a function with the name filepirep is executed This function is located in PIREPData.class https://github.com/nshahzad/phpVMS/blob/master/core/common/PIREPData.class.php And starts from line 547 till line 837 the sql statement is located in line 748
  25. New Version is up Curent Version of APVacars is 1.0.0.4 Curent module version is 1.0.0.3 Admins do not forget to update the module asswell Source Code can be founded on GitHub https://github.com/vangelisb/APVacars PHPvms Module https://github.com/v...s_PHPvms_Module And APVacars client can be downloaded from http://www.baggelis.com/APVacars.zip Bug that let you get the bid without password authentication fixed Bug with progress bar gave an error when distance is 0 fixed Bug with flight status in acarsmap when you started a new flight fixed If you have any problem's or you find a bug please let me know Happy flying
×
×
  • Create New...