Jump to content

php help


James142

Recommended Posts

sorry forgot all about this, you should be able to use this function

Not tested though. using the existing api this should give you the total miles

<?php echo $route->distance . Config::Get('UNITS');?>

When I add the code nothing shows up...

Im guessing I need to add something into the ACARSDate.class.php file?

Maybe something like:

public static function getSchedulesByDistance($distance, $type, $onlyenabled=true, $start='', $limit='')
{
	if($type == '')
		$type = '>';

	$params = array('s.distance' => trim($type).' '.$distance);
	if($onlyenabled)
		$params['s.enabled'] = '1';

	return self::findSchedules($params, $limit, $start);
}

But when I add that it gives me an error on the site and kACARS gives me about 10 error messages saying it lost connection to the site.. ..so im not gonna mess around with it myself unless no one is flying :P

Thanks,

James

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...