All pastes #771559 Raw Edit

Something

public text v1 · immutable
·published 2007-11-13 01:29 UTC
rendered paste body
sub getAct
{
   my($act)=@_; $act=~s/^UPSELL-//g; $act=~s/^xr//g;
   return int $act;
}

sub getProg
{
   my($act,$prog)=@_;
   if($act=~/^xr/) { $prog='xrated'; }
   else { $prog='cecash'; }
   return $prog;
}

sub getPtype
{
   my($ptype)=@_;
	if($ptype=~/(cc|jr|pb|pe|pm|pr)/i) { $ptype="CC"; }
	elsif($ptype=~/(wt|jt|el)/i) { $ptype="CK"; }
	else{ $ptype="OT"; }
	return $ptype;
}

sub isCross
{
   my($act,$pkg)=@_;
   my $result=0;
   if($pkg eq "999" || $act=~/^upsell/i) { $result=1; }
   return $result;
}