I have a field called AdCredits in my user table, which I use to store $$ for advertising on my site. It is also used to reward my editors.
I would like my editors to be able to see how many adcredits the have remaining on their Browser screen when they login (browser_info.html).
This being my very first global I have had a go at writing could someone help me out:
Global User_AdCredits
# Global to return the Editor's username, and number of adcredits remaining
# Example: Welcome John. You have a balance of 25 AdCredits.
sub {
my $adcredits = $DB->table('Users')->select( { 'AdCredits' => $USER->{Username} } );
return $adcredits;
}
I may be way off here, so sorry about that!
I would like my editors to be able to see how many adcredits the have remaining on their Browser screen when they login (browser_info.html).
This being my very first global I have had a go at writing could someone help me out:
Global User_AdCredits
# Global to return the Editor's username, and number of adcredits remaining
# Example: Welcome John. You have a balance of 25 AdCredits.
sub {
my $adcredits = $DB->table('Users')->select( { 'AdCredits' => $USER->{Username} } );
return $adcredits;
}
I may be way off here, so sorry about that!
