Jump to content
Vangelis

Auto Accept/Reject Pirep

Recommended Posts

Yes, I will try the module again; it might help because I get logged off all the time when trying to approve pireps :D

Share this post


Link to post
Share on other sites

Hi Vangelis,

Thanks for your work ;)

Some issues: Bids are is always present and tour doesn't increment Pirep

Have you an idea for that ?

Regards Fred

Share this post


Link to post
Share on other sites

Hi Vangelis,

Thanks for your work ;)

Some issues: Bids are is always present and tour doesn't increment Pirep

Have you an idea for that ?

Regards Fred

AutoPirep has nothing to do with the bids so unfortunatly i have no idea what the problem might be.

Also,

I changed all tpl extension files to .php

I also edit pirepAutoAccept.php file find and replace all tpl to php.

Regards,

Kıvanç

Nice to hear that :)

Share this post


Link to post
Share on other sites

AutoPirep has nothing to do with the bids so unfortunatly i have no idea what the problem might be.

part of my PIREPData.class.php

# Update any pilot's information
$pilotinfo = PilotData::getPilotData($pirepdata['pilotid']);
$pilotcode = PilotData::getPilotCode($pilotinfo->code, $pilotinfo->pilotid);
PilotData::UpdateLastPIREPDate($pilotinfo->pilotid);
 PirepAcData::search($pirepid);
 if (Config::Get('EMAIL_SEND_PIREP') === true) {


# 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);

}
/* Add this into the activity feed */
 $message = Lang::get('activity.new.pirep');
 foreach($pirepdata as $key=>$value) {
	 $message = str_replace('$'.$key, $value, $message);
 }

 # Add it to the activity feed
 ActivityData::addActivity(array(
	 'pilotid' => $pirepdata['pilotid'],
	 'type' => ACTIVITY_NEW_PIREP,
	 'refid' => $pirepid,
	 'message' => htmlentities($message),
 ));
 /* Now send data to vaCentral */
//CentralData::send_pirep($pirepid);

// Reset this ID back
DB::$insert_id = $pirepid;
self::$pirepid = $pirepid;
return true;
}

Share this post


Link to post
Share on other sites

If you uncomment this line PirepAcData::search($pirepid) and you file a pirep what will happen ? will the bid deleted or not ?

if still the bid is there then i would sugest you open a new post as this will indicate that the fault is not of Autopirep

ps i am now looking how the delete bid is normaly working but havent find it yet

Share this post


Link to post
Share on other sites

If you uncomment this line PirepAcData::search($pirepid) and you file a pirep what will happen ? will the bid deleted or not ?

yes all working well the tour update and the bid is deleted

Share this post


Link to post
Share on other sites

Can anybody else please report if they are expirencing the same problem ?

also what version of phpvms are you using ?

Share this post


Link to post
Share on other sites

Hello Vangelis,

I experience the same bid problem. Bids are not deleted.

Also,

We are using customized kacars. When I put PirepAcData::search($pirepid) as well as yours and when I send my PIREP to the website, the PIREP is sended but we face this error. Do you have any idea? I use

Simpilotgroup Extended Version 1.3 .

Thanks

recordererror.jpg

Share this post


Link to post
Share on other sites

Somewhere while filing the pirep there is an error the only thats comes to my mind that you might paste it in the wrong line

Share this post


Link to post
Share on other sites

Hello here is my file

// Add the comment if its not blank
    if ($comment != '') {
	    self::addComment($pirepid, $pirepdata['pilotid'], $comment);
    }
    # Update the financial information for the PIREP, true to refresh fuel
    self::PopulatePIREPFinance($pirepid, true);
    # Do other assorted tasks that are along with a PIREP filing
    # Update the flown count for that route
    self::UpdatePIREPFeed();
    # Update any pilot's information
    $pilotinfo = PilotData::getPilotData($pirepdata['pilotid']);
    $pilotcode = PilotData::getPilotCode($pilotinfo->code, $pilotinfo->pilotid);
    PilotData::UpdateLastPIREPDate($pilotinfo->pilotid);
PirepAcData::search($pirepid);
    if (Config::Get('EMAIL_SEND_PIREP') === true) {

	    # 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"
		    ."Landing Rate: {$pirepdata['landingrate']}\n"."Filed using: {$pirepdata['source']}\n\n"
		    ."Comment: {$comment}\n\n"
		    ."Click to approve this pirep (admin must be signed in):\n"
		    .adminurl('/pirepadmin/approvepirep/'.$pirepid);
	    $email = Config::Get('EMAIL_NEW_PIREP');
	    if (empty($email)) {
		    $email = ADMIN_EMAIL;
	    }
	    Util::SendEmail($email, $sub, $message);
    }

    /* Add this into the activity feed */
    $message = Lang::get('activity.new.pirep');
    foreach($pirepdata as $key=>$value) {
	    $message = str_replace('$'.$key, $value, $message);
    }

    # Add it to the activity feed
    ActivityData::addActivity(array(
	    'pilotid' => $pirepdata['pilotid'],
	    'type' => ACTIVITY_NEW_PIREP,
	    'refid' => $pirepid,
	    'message' => htmlentities($message),
    ));
    /* Now send data to vaCentral */
    CentralData::send_pirep($pirepid);
    // Reset this ID back
    DB::$insert_id = $pirepid;
    self::$pirepid = $pirepid;
    return $pirepid;
   }

Share this post


Link to post
Share on other sites

I like this addon, but is it possible to disable auto pirep with a switch in the admin menu in the next versions? I need this for maintenance options when I dont want that pilots send their pireps.

Also it would be a nice feature if auto pirept could check the aircraft.bin fileinformationen with the scheduled aircraft, so if a C172 ist filed and the airfile in kacars reports a B737, the flight will be reejected.

Thank you for your work

Share this post


Link to post
Share on other sites

A new version is up and a switch in the admin interface is included in order to enable or disable the module.

You will find it at http://baggelis.com/index.php?option=com_jdownloads&Itemid=0&view=viewcategory&catid=4

I like this addon, but is it possible to disable auto pirep with a switch in the admin menu in the next versions? I need this for maintenance options when I dont want that pilots send their pireps.

Also it would be a nice feature if auto pirept could check the aircraft.bin fileinformationen with the scheduled aircraft, so if a C172 ist filed and the airfile in kacars reports a B737, the flight will be reejected.

Thank you for your work

This is not possible as it depends on the acars software that you are using the module just reads the filed pirep and the aircraft.bin gives not the same name in all airplanes.

Share this post


Link to post
Share on other sites

Can you please advise as to where you get the information for setting the criteria - I have searched high and low and cant find it anywhere?

Share this post


Link to post
Share on other sites

the criteria is created by copying thet text output of you acars

for example if acars says

1123 landing gear down and you want to decline the pirep based of that then you will make a new criteria with value gear down

Share this post


Link to post
Share on other sites

what am I doing wrong,

I have downloaded your V2 "I think it is..." and got every thing installed did it by hand not by the plugin manager. and also installed the sql file in the data base now.

I put in the link for the module in my admin tpl in the preps section.

I click on it. and it shows me the screen to Module Enabled, Admin code etc...... I would fill all that in and click save.

Now it will show that it has been saved but when i click again it will show the same showing the extra settings as if i haven't done it...

Then also I can click the add criteria and put in for sim rate and do all that and click add or save.... It will show that it did but when i click again it will still say no criteria have been added and check in the data base and nothing is there so nothing was saved at all. What and I doing wrong I have re-uploaded twice and nothing.....

Share this post


Link to post
Share on other sites

I just install this module, but the pirep still waiting for approval. Any sugestion?

I need change the value of auto acepted pirep in local config .php to true?

There is no need to edit anything in local.config.php

Just make sure that you have followed the information .

Share this post


Link to post
Share on other sites

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...