7.) Example Scripts
The below script is located at /xflow_data/scripts/database/create.pl, and is executed every time a new member is created. The script saves the member's username, e-mail address and password to a text file, if the member is active

#!/usr/bin/perl

## Make sure member is active
exit(0) unless $EXTRA{'status'} == 1;

## Gather needed information
$newline = join "::", $PROFILE{'username'}, $PROFILE{'email'}, $PROFILE{'password'};

## Append information to text file
open FILE, ">>results.txt";
print FILE "$newline\n";
close FILE;

## Exit
exit(0);

## Add a 1 to ensure no errors
1;




The below script is located at /xflow_data/scripts/transaction/113.pl and is automatically executed every time the transaction ID# 113 is added to the database. The script adds the transaction ID#, amount, and member username, to a text file, only if the transaction is approved.

#!/usr/bin/perl

## Make sure member is active
exit(0) unless $TRANS{'status'} == 1;

## Gather needed information
$newline = join "::", $TRANS{'id'}, $TRANS{'amount'}, $PROFILE{'username'};

## Append information to text file
open FILE, ">>results.txt";
print FILE "$newline\n";
close FILE;

## Exit
exit(0);

## Add a 1 to ensure no errors
1;