\r\nReply-To: $eaddress\r\nX-Mailer: PHP" . phpversion()); $result= "subject = ".$subject."
". $body."
". $payer_email."
". $sys_item_name."
". $eaddress; return $result; } $action = $_REQUEST['action']; $prodlist = "
  • UnSelect Product
  • "; foreach($products as $prod) { $prodlist .= "
  • "; $prodlist .= $prod['item_name']; $prodlist .= "
  • "; } $dir = "addons/"; $groups=array(); $addons=array(); // Open a known directory, and proceed to read its contents if (is_dir($dir)) { if ($dh = opendir($dir)) { while (($file = readdir($dh)) !== false) { if($file != "." && $file != ".." && filetype($dir . $file) == "dir") { $groups[]="addons/".$file."/"; } } closedir($dh); } foreach($groups as $group) { $dir = $group; if (is_dir($dir)) { if ($dh = opendir($dir)) { while (($file = readdir($dh)) !== false) { if($file != "." && $file != ".." && filetype($dir . $file) == "dir") { $installfile=$group.$file."/install.php"; $adminfile=$group.$file."/admin.php"; if(file_exists($installfile) && file_exists($adminfile)) { $addons[]=$group.$file."/"; } } } } } } foreach($addons as $addon) { $nodes = explode("/", $addon); $folder=$nodes[1]; $sub_folder=$nodes[2]; $sql="SELECT * FROM addons WHERE groupfolder='".$folder."' AND addonfolder='".$sub_folder."'"; $addres=@mysql_query($sql); if(mysql_num_rows($addres)) $installed=true; while($addrec=@mysql_fetch_assoc($addres)) { $addid=$addrec['id']; $adddesc=$addrec['description']; $addonlist .= "
  • "; $addonlist .= $addrec['title']; $addonlist .= "
  • "; } if($installed) $addonlist .="
  • "; } foreach($addons as $addon) { $nodes = explode("/", $addon); $folder=$nodes[1]; $sub_folder=$nodes[2]; $sql="SELECT * FROM addons WHERE groupfolder='".$folder."' AND addonfolder='".$sub_folder."'"; $addres=@mysql_query($sql); if(!mysql_num_rows($addres)) { $uninstalled=true; $addonlist .= "
  • "; $addonlist .= ""; $addonlist .= $sub_folder; $addonlist .= ""; $addonlist .= "
  • "; } } if($uninstalled) $addonlist .="
  • "; } # ________________________________ $pageheader = " RAP Admin Panel for: ".$sys_domain." _ _ _
    "; # ________________________________ $pagefooter = "
    Copyright ©2007 Rapid Action Profits. All Rights Reserved.
    scarlett hill spanking

    scarlett hill spanking

    dry big tits job

    big tits job

    most las vegas senior escorts

    las vegas senior escorts

    dear girl desribing her vagina

    girl desribing her vagina

    dictionary gay sucks

    gay sucks

    written fucked my sisters boyfriends

    fucked my sisters boyfriends

    people field report jakarta fuck

    field report jakarta fuck

    first chart for flute fingering

    chart for flute fingering

    ready our winter love purcell

    our winter love purcell

    cow mummification mistress

    mummification mistress

    pound am wf porn

    am wf porn

    death indian sex brothels

    indian sex brothels

    mind paul marchant sex video

    paul marchant sex video

    now berlin gay male escort

    berlin gay male escort

    saw dallas mavericks dancers nude

    dallas mavericks dancers nude

    buy singles show low arizona

    singles show low arizona

    hold abortion clinic webcam

    abortion clinic webcam

    stone oiled butts

    oiled butts

    strange caligula nude

    caligula nude

    their family soft core sex

    family soft core sex

    charge lesbian romance book

    lesbian romance book

    as natasha vale hardcore

    natasha vale hardcore

    history female orgasm frequency

    female orgasm frequency

    also foot genital fetish

    foot genital fetish

    these couples seduction sex pics

    couples seduction sex pics

    power britiany love

    britiany love

    whether fisting in newborn

    fisting in newborn

    first sapphric lesbians

    sapphric lesbians

    forward bdsm dominatrix mistress london

    bdsm dominatrix mistress london

    such eureka 7 hentai pics

    eureka 7 hentai pics

    coat hirsute vaginas pee

    hirsute vaginas pee

    afraid mother dauther fuck

    mother dauther fuck

    never swing rope transfers cfr

    swing rope transfers cfr

    money bondage cafe christina carter

    bondage cafe christina carter

    radio calves flexed fetish

    calves flexed fetish

    self jet love sweatshirt

    jet love sweatshirt

    who dove facial moisturizer

    dove facial moisturizer

    soft uk golden showers escort

    uk golden showers escort

    term tifany taylor nude

    tifany taylor nude

    success csm teen models dvd

    csm teen models dvd

    wire halle berry pussy shots

    halle berry pussy shots

    arrive mistress treasure muscle clips

    mistress treasure muscle clips

    sign driving classes for teens

    driving classes for teens

    middle girls next door porn

    girls next door porn

    tone brokeback mountain gay sex

    brokeback mountain gay sex

    floor abstract sexy nudes painting

    abstract sexy nudes painting

    run emperior penguin webcam

    emperior penguin webcam

    early naked naughty newbies dvd

    naked naughty newbies dvd

    bit i love michael todaro

    i love michael todaro

    consider vanessa hudjens naked

    vanessa hudjens naked

    suffix excel wetsuit care

    excel wetsuit care

    if damion counseling center

    damion counseling center

    hold rainbow party hot blonde

    rainbow party hot blonde

    night kelly madison anal mpg

    kelly madison anal mpg

    level older dicks younger chicks

    older dicks younger chicks

    dead fellatio teens cum shot

    fellatio teens cum shot

    spot goddess of love movie

    goddess of love movie

    man horney asian girl

    horney asian girl

    rub 365 sex penetration

    365 sex penetration

    play pussy bald pics

    pussy bald pics

    dictionary katey sagal hard nipples

    katey sagal hard nipples

    design xxx lust xxx

    xxx lust xxx

    cloud voyeur shower cam

    voyeur shower cam

    search sex magick poems

    sex magick poems

    about image amateur pics

    image amateur pics

    phrase clinical counseling forms

    clinical counseling forms

    oxygen nude little gay boys

    nude little gay boys

    water adelgazamiento facial

    adelgazamiento facial

    lie candid schoolgirls lesbians

    candid schoolgirls lesbians

    begin adult hentai games online

    adult hentai games online

    hair guatemalan gay sex

    guatemalan gay sex

    were anna young cock

    anna young cock

    million chicks in miniskirts

    chicks in miniskirts

    change kristin novak nude

    kristin novak nude

    pick jennifer lothrop naked

    jennifer lothrop naked

    supply girlfriend fellation

    girlfriend fellation

    charge prostate cancer sex

    prostate cancer sex

    raise gay asian fuck

    gay asian fuck

    form slepping beauty emoticons

    slepping beauty emoticons

    iron couples spa treatment toronto

    couples spa treatment toronto

    those nude body building

    nude body building

    gather young nude girls bbs

    young nude girls bbs

    bring ode to boobs

    ode to boobs

    wrote my wife is frigid

    my wife is frigid

    hunt public boobs

    public boobs

    forward small breasted wifes fucking

    small breasted wifes fucking

    surface john stossel gay

    john stossel gay

    same guidance counseling tn

    guidance counseling tn

    many breast feediing nut allergy

    breast feediing nut allergy

    fat seductive japanese babes

    seductive japanese babes

    forward sublimedirectory and president

    sublimedirectory and president

    spot lesbian poetry distance

    lesbian poetry distance

    wave dirty xxx babysitters

    dirty xxx babysitters

    paper faith belle pussy

    faith belle pussy

    could marine corps sucks

    marine corps sucks

    my anal older ladies porn

    anal older ladies porn

    practice lesbian novelists

    lesbian novelists

    depend forced blowjob husband

    forced blowjob husband

    fill catherine mcphee naked

    catherine mcphee naked

    whole couples in jamica

    couples in jamica

    who her sensual tattooing

    her sensual tattooing

    solve average time for ejaculation

    average time for ejaculation

    us girls sucking dick clips

    girls sucking dick clips

    except bigger ejaculations

    bigger ejaculations

    prepare gay venues in caterbury

    gay venues in caterbury

    continent decoys nude scene

    decoys nude scene

    nine eve myles topless

    eve myles topless

    every thong babe day

    thong babe day

    I escorts offering bbf

    escorts offering bbf

    thus learn east coast swing

    learn east coast swing

    enter red hot denise escort

    red hot denise escort

    soft hairy lesbian holes

    hairy lesbian holes

    my labia beauty

    labia beauty

    color transsexual sex videos

    transsexual sex videos

    complete zodiac sign and love

    zodiac sign and love

    face grandma sucks big dicks

    grandma sucks big dicks

    cry nipple slip wwe

    nipple slip wwe

    with bottoming in sex

    bottoming in sex

    child gay sauna munich

    gay sauna munich

    water replacements porn

    replacements porn

    through circle jerk album

    circle jerk album

    take ebony nymph

    ebony nymph

    simple vannesa hudgens nude oics

    vannesa hudgens nude oics

    out herpes dating

    herpes dating

    under girl drunk mpg

    girl drunk mpg

    numeral men swimming nude

    men swimming nude

    shoe famer john wetsuits

    famer john wetsuits

    develop roman colosseum violence sex

    roman colosseum violence sex

    clear homemade pornsites mature

    homemade pornsites mature

    particular celberity hotties

    celberity hotties

    women korean chick

    korean chick

    count better intimacy for couples

    better intimacy for couples

    chart marilyn manson virgin

    marilyn manson virgin

    chord nude rate site

    nude rate site

    take penis in boobs

    penis in boobs

    have gay clubs in providence

    gay clubs in providence

    live bikini thong pics

    bikini thong pics

    cost kim hee sun nude

    kim hee sun nude

    get xinh sex

    xinh sex

    molecule suppository sex gallerys

    suppository sex gallerys

    power madame butterfly masturbation machine

    madame butterfly masturbation machine

    four blow movie suck

    blow movie suck

    bring kids nude beaches

    kids nude beaches

    note evel dick donato t shirts

    evel dick donato t shirts

    motion ssbbw fucks skinny guy

    ssbbw fucks skinny guy

    girl secondary multi organ dysfunction

    secondary multi organ dysfunction

    shoulder love cures

    love cures

    seed cleveland escort chanel

    cleveland escort chanel

    stick big bro porn vids

    big bro porn vids

    why husband is a jerk

    husband is a jerk

    term ford escort workshop manual

    ford escort workshop manual

    lady simpsona cartoon porn stories

    simpsona cartoon porn stories

    choose milf mia

    milf mia

    study nashville christian counseling center

    nashville christian counseling center

    spend valentines day lesbian couple

    valentines day lesbian couple

    wall famous movie sex scene

    famous movie sex scene

    round boogie nudity

    boogie nudity

    class nipple pain leaking

    nipple pain leaking

    syllable xxx daily vid

    xxx daily vid

    small enjoying guilty pleasures

    enjoying guilty pleasures

    rose gay k hlungsborn

    gay k hlungsborn

    second sex free video granny

    sex free video granny

    tall crestor and erectile dysfunction

    crestor and erectile dysfunction

    has newsfilter erotic stories

    newsfilter erotic stories

    better romance and get away

    romance and get away

    nine love sms messages kiss

    love sms messages kiss

    opposite hidden cameras for porn

    hidden cameras for porn

    visit anal cleaning tube water

    anal cleaning tube water

    paint sex change tennis player

    sex change tennis player

    before lewd conduct 27 dvd

    lewd conduct 27 dvd

    fill diana and phone sex

    diana and phone sex

    region burnin love lyrics

    burnin love lyrics

    knew sissy spacek cousin

    sissy spacek cousin

    travel ogden utah strip club

    ogden utah strip club

    value naked scarlet johanson

    naked scarlet johanson

    star voluptuous sluts

    voluptuous sluts

    fear adrianne barbeau naked pics

    adrianne barbeau naked pics

    danger myrna loy nude photos

    myrna loy nude photos

    fear cincinnati strip club

    cincinnati strip club

    enemy erotic mastrubation stories

    erotic mastrubation stories

    ear captain bang bros

    captain bang bros

    most erotic hypnotic mistress

    erotic hypnotic mistress

    hand spanking slipper

    spanking slipper

    I lana loves katrina

    lana loves katrina

    match viera upskirt

    viera upskirt

    nature interracial wives free video

    interracial wives free video

    sail nude nursing women

    nude nursing women

    thing tranny moms

    tranny moms

    am not nude sexy

    not nude sexy

    ship punishing the sissy secretary

    punishing the sissy secretary

    sail candy samples blowjob

    candy samples blowjob

    soft piolo pascual sex video

    piolo pascual sex video

    want gay jocks gallery

    gay jocks gallery

    spread 1920s women housewife

    1920s women housewife

    spread men s underwear pouch swing

    men s underwear pouch swing

    short girls suckin dick

    girls suckin dick

    stone lds teens chat

    lds teens chat

    or shemale female

    shemale female

    mile velo love channel saddle

    velo love channel saddle

    populate super swing cecilia

    super swing cecilia

    wave forced sissy fiction

    forced sissy fiction

    supply oiled titfucks

    oiled titfucks

    ever lovely theresa

    lovely theresa

    sharp syvette nude

    syvette nude

    instrument russian teen boys

    russian teen boys

    pull pics of nude kids

    pics of nude kids

    these fingering a teen girl

    fingering a teen girl

    deep drawings of boys nude

    drawings of boys nude

    silver colorphast ph test strips

    colorphast ph test strips

    blood chuck connors gay porn

    chuck connors gay porn

    your pics of lesbians kissing

    pics of lesbians kissing

    was prodigy diabetic testing strips

    prodigy diabetic testing strips

    left love songs 1980s

    love songs 1980s

    is red haired pussie

    red haired pussie

    men piano fingering map

    piano fingering map

    same xxx costumes pirate

    xxx costumes pirate

    rock morning after sex botero

    morning after sex botero

    engine blessed hands beauty salon

    blessed hands beauty salon

    group kristin dunst nude

    kristin dunst nude

    order faith hill kiss

    faith hill kiss

    check sony cybershot dsc s40 webcam

    sony cybershot dsc s40 webcam

    neck rocket dildo

    rocket dildo

    question mckinney cheerleaders condoms

    mckinney cheerleaders condoms

    add sound beauty label

    sound beauty label

    dead natasha nice tits

    natasha nice tits

    sure shiina kinky nurse

    shiina kinky nurse

    again bukake ebony

    bukake ebony

    plant masterbation techniques men erotic

    masterbation techniques men erotic

    afraid scandal teens

    scandal teens

    clothe horny teacher masturbation videos

    horny teacher masturbation videos

    second huge breasted lesbians

    huge breasted lesbians

    similar handjobs 12

    handjobs 12

    stick xlgirls magazine

    xlgirls magazine

    thank big glans cock

    big glans cock

    continue foaming pussy

    foaming pussy

    pattern butt butt thong thong

    butt butt thong thong

    sail floatation device breast

    floatation device breast

    continent real mature sex

    real mature sex

    insect argentine escorts rojas

    argentine escorts rojas

    energy busty webcam strip videos

    busty webcam strip videos

    imagine busty blond

    busty blond

    hat andrea personals 31008

    andrea personals 31008

    difficult home facial natural ingredients

    home facial natural ingredients

    study canine sex fiction

    canine sex fiction

    carry gel sole booties

    gel sole booties

    place tantra for couples

    tantra for couples

    prove a topless britney spears

    a topless britney spears

    third bbw white bitches sex

    bbw white bitches sex

    reason international nude female wrestling

    international nude female wrestling

    rub namida no kiss mp3

    namida no kiss mp3

    learn teens sss

    teens sss

    energy backyard nudists

    backyard nudists

    pay isis porn movies

    isis porn movies

    ground harriet scott topless

    harriet scott topless

    we erotic fantasy art galleries

    erotic fantasy art galleries

    store xxx charity bayer

    xxx charity bayer

    rope redhead interracial bukkake galleries

    redhead interracial bukkake galleries

    back spycam peeping videos

    spycam peeping videos

    each swollen breast and menopause

    swollen breast and menopause

    thank lingerie teens pic

    lingerie teens pic

    control sleazy pinups

    sleazy pinups

    eight indians sex

    indians sex

    chief sportswomen tgp

    sportswomen tgp

    material extreme granny porn

    extreme granny porn

    fit doctor jerk porn

    doctor jerk porn

    dog naughty asian teen girls

    naughty asian teen girls

    chart extreme fetish video

    extreme fetish video

    pretty slut swallow

    slut swallow

    direct sexy girl naked webcam

    sexy girl naked webcam

    gather innocent high whitney

    innocent high whitney

    baby is sheryl swoops gay

    is sheryl swoops gay

    divide clinic test women condom

    clinic test women condom

    past fascial porn

    fascial porn

    round tulsa escorts badd girls

    tulsa escorts badd girls

    soldier stephanie macmahon breasts

    stephanie macmahon breasts

    pull youbet sucks

    youbet sucks

    man automobile sex story

    automobile sex story

    shore eros transexual escort

    eros transexual escort

    fruit gay fat sex

    gay fat sex

    spoke japanese topless beaches

    japanese topless beaches

    feel teens with ovarian cysts

    teens with ovarian cysts

    feel homemade impotence remedy

    homemade impotence remedy

    right lovely nails peach street

    lovely nails peach street

    parent sex games with girlfreind

    sex games with girlfreind

    instrument islam paradise wives

    islam paradise wives

    of remove color odor vagina

    remove color odor vagina

    copy sarah young porn

    sarah young porn

    well sexy female escorts edinburgh

    sexy female escorts edinburgh

    want tofu facial mask beauty

    tofu facial mask beauty

    spring coty love s baby soft

    coty love s baby soft

    morning cmos webcam driver

    cmos webcam driver

    round hungry mom porn

    hungry mom porn

    soldier xxx mom son website

    xxx mom son website

    shout orchiectomy orgasm trans

    orchiectomy orgasm trans

    got mario pornstar

    mario pornstar

    set kendra wilkinson nade nude

    kendra wilkinson nade nude

    reply needle biopsy breast

    needle biopsy breast

    main xxx valentine lingerie

    xxx valentine lingerie

    cool naked native geographic

    naked native geographic

    distant thick young cock

    thick young cock

    hear black forest cuckoo romance

    black forest cuckoo romance

    cross mary dick dentist

    mary dick dentist

    long topless dancers houston tx

    topless dancers houston tx

    design naughty classroom strategy

    naughty classroom strategy

    baby international male mens underwear

    international male mens underwear

    school grandad sex porn

    grandad sex porn

    list nude woman massachusetts

    nude woman massachusetts

    count grandmas pussy free

    grandmas pussy free

    children mary carey fucked

    mary carey fucked

    noon erotic fantasy art galleries

    erotic fantasy art galleries

    guess youtube grandmas kisses

    youtube grandmas kisses

    saw jade knobs

    jade knobs

    you nude strip public dared

    nude strip public dared

    gave sensual clit licking

    sensual clit licking

    cloud women naked tan

    women naked tan

    sat 1997 breast men

    1997 breast men

    grass pubescent lesbian lolicon

    pubescent lesbian lolicon

    his bang olofson

    bang olofson

    company orgasmic young sex vids

    orgasmic young sex vids

    except bondage nudes film

    bondage nudes film

    general little girl peeing

    little girl peeing

    figure khmer love songs

    khmer love songs

    arrive biggest juciest tits

    biggest juciest tits

    ten love s gone away

    love s gone away

    father mike vick gay

    mike vick gay

    there the kiss san antonio

    the kiss san antonio

    milk bangbros qwerty asdfgh 2007

    bangbros qwerty asdfgh 2007

    brother hentai video review

    hentai video review

    path lemon garlic chicken breast

    lemon garlic chicken breast

    big women s cute butts

    women s cute butts

    plural counseling development center incorporated

    counseling development center incorporated

    meet groove adventure hentai

    groove adventure hentai

    put janet acosta nude

    janet acosta nude

    pass guy sucks guy

    guy sucks guy

    receive nude beach lifeguard

    nude beach lifeguard

    ocean infant toddler outdoor swings

    infant toddler outdoor swings

    forest mistress alina ny

    mistress alina ny

    guess yoko matsugane naked video

    yoko matsugane naked video

    vowel american beauty on hbo

    american beauty on hbo

    student disability chatrooms

    disability chatrooms

    paint teen bikinis gallery

    teen bikinis gallery

    desert lesbian anal vid

    lesbian anal vid

    difficult squatting nudes

    squatting nudes

    child uk swinger personals

    uk swinger personals

    way deep throght xxx

    deep throght xxx

    show christian single sexuality

    christian single sexuality

    match jerk clite

    jerk clite

    sun porn chat online

    porn chat online

    round porn video chat rooms

    porn video chat rooms

    voice escort cumbia

    escort cumbia

    spot wife fetish stories

    wife fetish stories

    center senior citizen slut

    senior citizen slut

    stretch alabama jones busty crudade

    alabama jones busty crudade

    mother gay hornchurch england

    gay hornchurch england

    fat bdsm dominatrix mistress london

    bdsm dominatrix mistress london

    reply nude babes photo galleries

    nude babes photo galleries

    magnet leather coat mistress videos

    leather coat mistress videos

    fine nipple human milking machine

    nipple human milking machine

    invent naughty college cuties stories

    naughty college cuties stories

    appear lesbian zshare videos

    lesbian zshare videos

    cost nudist colony weston fl

    nudist colony weston fl

    neighbor teen easter baskets

    teen easter baskets

    eight amateur wifey movies

    amateur wifey movies

    check gangbang free trailers

    gangbang free trailers

    trouble didlo mistress

    didlo mistress

    south herbs increase breast size

    herbs increase breast size

    spring cocks cumming pics free

    cocks cumming pics free

    shine hiv aids teens

    hiv aids teens

    chick claudia black pussy

    claudia black pussy

    women grandpa fucks teen

    grandpa fucks teen

    low boy getting dick sucked

    boy getting dick sucked

    early tiny uderage pussy

    tiny uderage pussy

    if german virgins pics

    german virgins pics

    tube fatty patty porn

    fatty patty porn

    rise eurythmics love is astranger

    eurythmics love is astranger

    box doctorate christian counseling degrees

    doctorate christian counseling degrees

    order xmas uk escorts

    xmas uk escorts

    summer old broads big tits

    old broads big tits

    here hot orgasm pics

    hot orgasm pics

    ride girls love condoms

    girls love condoms

    note breast augmentaion recovery

    breast augmentaion recovery

    earth creature dildos

    creature dildos

    learn thai escort galleries

    thai escort galleries

    major visayan love quotes

    visayan love quotes

    spot nudist dutch galleries

    nudist dutch galleries

    tie fijian escorts

    fijian escorts

    carry craigslist women prague romance

    craigslist women prague romance

    total i fucked her sister

    i fucked her sister

    begin girls sleep and fucked

    girls sleep and fucked

    cell boobs lactacing

    boobs lactacing

    watch implications of counseling shamans

    implications of counseling shamans

    old rauchy sex

    rauchy sex

    woman utah sex laws

    utah sex laws

    trade mistress jesse

    mistress jesse

    ask bambi and tits

    bambi and tits

    camp men s sex slave costume

    men s sex slave costume

    fish az escort services

    az escort services

    fire tanned shaved pussy

    tanned shaved pussy

    sister shockwave dvd porn

    shockwave dvd porn

    sky blowjobs zshare

    blowjobs zshare

    interest nicollette sheridans tits

    nicollette sheridans tits

    led men spanking bad woman

    men spanking bad woman

    famous blowjob girl kelsey michaels

    blowjob girl kelsey michaels

    choose gay saunas belfast

    gay saunas belfast

    also contemporary gay poets

    contemporary gay poets

    speech granny free sex vids

    granny free sex vids

    divide tucson gay resort

    tucson gay resort

    bright brazilian shemale video

    brazilian shemale video

    major sarah michlle gellar naked

    sarah michlle gellar naked

    least pus filled vaginal bump

    pus filled vaginal bump

    plain definition of media whore

    definition of media whore

    divide myspace thong

    myspace thong

    step cheerleaders eating pussy

    cheerleaders eating pussy

    number twink gang bang

    twink gang bang

    by hardcore pics stoeies

    hardcore pics stoeies

    sharp hairbrush spanked wives

    hairbrush spanked wives

    middle tranny addict

    tranny addict

    oil teen journalists

    teen journalists

    solution newbie nudist

    newbie nudist

    brought layouts site dreamgirls

    layouts site dreamgirls

    far hardcore porno movies

    hardcore porno movies

    shoulder gray nude men

    gray nude men

    wonder buying cheap Viagra online in uk
    "; # ________________________________ if($action=="login") { # Verify admin username/password. if($_POST['username'] == $sys_adminuser && $_POST['password'] == $sys_adminpass) { $_SESSION['admin']=true; unset($_SESSION['errmsg']); header("Location: $_SERVER[PHP_SELF]"); exit; } else { $_SESSION['errmsg'] = "login error"; header("Location: $_SERVER[PHP_SELF]"); exit; } } if(!isset($_SESSION['admin'])) { # Login required for admin area. echo <<< END $pageheader
    Admin Login   END; if(isset($_SESSION['errmsg'])) echo "Invalid Username or Password - Retry"; echo <<< END   Username :  Password :   
    $pagefooter END; exit; } if(isset ($_REQUEST['product'])) $_SESSION['product']=$_REQUEST['product']; if($_SESSION['product']) { $productID = $_SESSION['product']; $byproduct = " WHERE id = ".$productID; } else { $productID = 0; $byproduct = ""; } switch ($action) { case "phpinfo": phpinfo(); exit; break; case "system": if($_POST['submit']){ $adminuser=trim($_POST['adminuser']); $adminpass=trim($_POST['adminpass']); $domain=trim($_POST['domain']); $support=trim($_POST['support']); $fraud=trim($_POST['fraud']); $paypal=trim($_POST['paypal']); $sandbox=trim($_POST['sandbox']); $admin_email=trim($_POST['admin_email']); if($_POST['glb_affiliates']){ $glb_affiliates=1; } else { $glb_affiliates=0; } $sql="UPDATE admin SET username='".$adminuser."',password='".$adminpass."', domain='".$domain."',support='".$support."',fraud='".$fraud."',paypal='".$paypal."', sandbox='".$sandbox."',admin_email='".$admin_email."',glb_affiliates='".$glb_affiliates."'"; $adm=@mysql_query($sql); if($_POST['disable']) { $sql="SELECT * FROM products"; $pres=@mysql_query($sql); while($prec=@mysql_fetch_assoc($pres)) { $update=@mysql_query("UPDATE products SET disabled=1"); } } header("Location: $_SERVER[PHP_SELF]"); exit; break; } $sql="select * from admin LIMIT 1"; $arec=@mysql_query($sql); $arow=@mysql_fetch_array($arec); $sys_adminuser = $arow['username']; $sys_adminpass = $arow['password']; $sys_support = $arow['support']; $sys_fraud = $arow['fraud']; $sys_paypal = $arow['paypal']; $sys_sandbox = $arow['sandbox']; $sys_adminmail = $arow['admin_email']; if($arow['glb_affiliates']==1){ $sys_glbaff=1; } else { $sys_glbaff=0; } echo <<< END $pageheader Global System Settings
     
    Admin Username :
    Admin Password :
    Disable Products?
    Shared Affiliates? END; if($sys_glbaff == 0) { echo ""; } else { echo ""; } echo <<< END
    Your Domain :
    Support Address :
    Fraud Address :
    Paypal Address :
    "Seller" Address for
    Paypal Sandbox :
    Administrator Email :

     

    Choose a Username for logging in to the Admin Area.
    Choose a Password for logging in to the Admin Area.
    USE WITH CARE. Checking this box will disable ALL products under control of this Admin Panel. There is no way to re-enable all products. Each product must be re-enabled one at a time from the Product Maintenance.
    Check this box if you want to allow resellers to benefit from cross-promotion of your products
    Enter your domain name. (i.e. yourdomain.com) DO NOT include the www.
    Enter your support email address or Contact Page URL.
    Enter an email address for notification of fraudulent purchases.
    Enter your Primary Paypal email address.
    Enter your Paypal Sandbox "seller" email address.
    Enter an email address for notification of sales, etc.
    $pagefooter END; exit; break; case "setup": unset ($_SESSION['product']); if(isset($_SESSION['product']) && $_SESSION['product'] != 0){ unset ($_SESSION['errmsg']); header("Location: $_SERVER[PHP_SELF]?action=setup"); exit; } case "maint": if($action=='setup' && (isset($_SESSION['product']) && $_SESSION['product'] != 0)){ unset ($_SESSION['errmsg']); unset ($_SESSION['product']); header("Location: $_SERVER[PHP_SELF]?action=setup"); exit; } if($action=='maint' && (!isset($_SESSION['product']) || $_SESSION['product'] == 0)){ $_SESSION['errmsg'] = "no product"; header("Location: $_SERVER[PHP_SELF]"); exit; } if($_POST['submit']){ unset ($_SESSION['errmsg']); if(trim($_POST['install_folder']) == "/"){ $install_folder="/"; } else { $install_folder="/".trim($_POST['install_folder'],"/")."/"; } if(isset($_POST['disabled'])){ $disabled=1; } else { $disabled=0; } if(isset($_POST['testmode'])){ $testmode=1; } else { $testmode=0; } if(isset($_POST['ipn_email_log'])){ $ipn_email_log=1; } else { $ipn_email_log=0; } if(isset($_POST['affcenter'])){ $affcenter=1; } else { $affcenter=0; } $tmpl_folder=trim($_POST['tmpl_folder'],"/")."/"; $item_currency=$_POST['currency']; $item_locale=$_POST['locale']; $item_name=trim($_POST['item_name']); $item_number=trim($_POST['item_number']); $item_price=0+(trim($_POST['item_price'])); $item_download=trim($_POST['item_download']); if(isset($_POST["bypass_squeeze"])){ $bypass_squeeze=1; } else { $bypass_squeeze=0; } if(isset($_POST["aw_flag"])){ $aw_flag=1; } else { $aw_flag=0; } $aw_meta_web_id=trim($_POST['aw_meta_web_id']); $aw_unit=trim($_POST['aw_unit']); $ar_form=str_replace(' name=\"optin\"','',trim($_POST['ar_form'])); $ar_form=str_replace(' id=\"optin\"','',$ar_form); $ar_form=str_replace(' target=\"iframe\" style=\"display:none\"','',$ar_form); $ar_form=str_replace('""){ $resizer=new thumbnailit; $result=$resizer->ResizeImg($old_name,$new_name,$maximum_size); } $sql="SELECT * FROM products WHERE install_folder = '".$install_folder."' AND id <> ".$productID; $pres=@mysql_query($sql); $rcount = @mysql_num_rows($pres); if ($rcount>0) $_SESSION['errmsg'] = "Install Folder Used by Another Product"; $sql="SELECT * FROM products WHERE item_number = '".$item_number."' AND id <> ".$productID; $pres=@mysql_query($sql); $rcount = @mysql_num_rows($pres); if ($rcount>0) $_SESSION['errmsg'] = "Item Number Used by Another Product"; if($oto_flag) { $sql="SELECT * FROM products WHERE (item_number = '".$oto_number."' OR oto_number = '".$oto_number."') AND id <> ".$productID; $pres=@mysql_query($sql); $rcount = @mysql_num_rows($pres); if ($rcount>0) $_SESSION['errmsg'] = "OTO Item Number Used by Another Product"; } if(!isset($_SESSION['errmsg'])) { if($action=="setup"){ $sql="INSERT INTO products (disabled,testmode,ipn_email_log,install_folder,tmpl_folder,item_name, item_number,currency,locale,item_price,item_download, bypass_squeeze,aw_flag,ar_form, affcenter, oto_flag,oto_name,oto_number,oto_price,oto_download, cancel_url,get_zips,expire,taf,max_sales,cust_only, otocust_only,giveaway,ipn_email,ipn_pending_email, item_desc,item_kw,item_imgfile,oto_desc,oto_kw,oto_imgfile, eq1_paypal,eq2_paypal,eq1_pct,eq2_pct) VALUES (".disabled.",".$testmode.",".$ipn_email_log.",'".$install_folder."','".$tmpl_folder."','".$item_name. "','".$item_number."','".$item_currency."','".$item_locale."','".$item_price."','".$item_download. "',".$bypass_squeeze.",".$aw_flag.",'".$ar_form."','".$affcenter. "',".$oto_flag.",'".$oto_name."','".$oto_number."','".$oto_price."','".$oto_download. "','".$cancel_url."',".$get_zips.",'".$expire."',".$taf.",'".$max_sales."',".$cust_only. ",".$otocust_only.",".$giveaway.",'".$ipn_email."','".$ipn_pending_email. "','".$item_desc."','".$item_kw."','".$item_imgfile. "','".$oto_desc."','".$oto_kw."','".$oto_imgfile. "','".$eq1_paypal."','".$eq2_paypal."','".$eq1_pct."','".$eq2_pct."')"; } else { $sql="UPDATE products SET disabled=$disabled,testmode=$testmode,ipn_email_log=$ipn_email_log, install_folder='".$install_folder."',tmpl_folder='".$tmpl_folder."',item_name='".$item_name."', item_number='".$item_number."',currency='".$item_currency."',locale='".$item_locale."', item_price=$item_price,item_download='".$item_download."',bypass_squeeze=$bypass_squeeze, aw_flag=$aw_flag,ar_form='".$ar_form."',oto_flag=$oto_flag,oto_name='".$oto_name."', oto_number='".$oto_number."',oto_price=$oto_price,oto_download='".$oto_download."', cancel_url='".$cancel_url."',get_zips=$get_zips,expire=$expire,taf=$taf,affcenter=$affcenter, max_sales=$max_sales,cust_only=$cust_only,otocust_only=$otocust_only,giveaway=$giveaway, ipn_email=$ipn_email,ipn_pending_email='".$ipn_pending_email."', item_desc='".$item_desc."',item_kw='".$item_kw."',item_imgfile='".$item_imgfile."', oto_desc='".$oto_desc."',oto_kw='".$oto_kw."',oto_imgfile='".$oto_imgfile."', eq1_paypal='".$eq1_paypal."',eq2_paypal='".$eq2_paypal."',eq1_pct=$eq1_pct,eq2_pct=$eq2_pct WHERE id=".$_SESSION['product']; } $prod=@mysql_query($sql); if($action=="setup"){ $productID=@mysql_insert_id(); # create default sales letter $sql="INSERT INTO salesletters (productID,template) VALUES (".$productID.",'salespage.html')"; $result=@mysql_query($sql); # create default system emails $subject = "%firstname%, Your purchase has been flagged for review."; $body = "%firstname%,\n\nIt appears that you are trying to purchase %itemname% from yourself. We apologize if this is not the case. This purchase has been flagged for manual review by the product owner, and you will be contacted directly from them with download instructions should this be a mistake.\n\nIf you did not purchase from yourself, contact the product owner immediately at:\n\n%contact%"; $sql = "INSERT INTO emails (productID,type,subject,body) VALUES (".$productID.",'fraud','".$subject."','".$body."')"; @mysql_query($sql); $subject = "%firstname%, Your download link for %itemname%"; $body = "%firstname%,\n\nThank you for your purchase of %itemname%.\nTo download your copy, click here:\n\n%download%\n\nYou have %expire% hours to download before the link expires.\nWe appreciate your business.\nFor support, visit our web site at:\n\n%contact%\n\nThanks again.\n"; $sql = "INSERT INTO emails (productID,type,subject,body) VALUES ($productID,'download','".$subject."','".$body."')"; @mysql_query($sql); $subject = "%firstname%, There was a problem with your purchase."; $body = "%firstname%,\n\nWe're sorry for the inconvenience, but there was a problem confirming your purchase.\n\nPlease contact our support staff for your download link at: \n\n%contact%\n\nPlease paste a copy of your PayPal receipt into your message for verification. \n\nNOTICE: If you paid with an eCheck or bank draft, the download link will automatically be emailed to you once your payment clears.\n\n"; $sql = "INSERT INTO emails (productID,type,subject,body) VALUES ($productID,'echeck','".$subject."','".$body."')"; @mysql_query($sql); $subject = "%sender% would like you to visit %domain%"; $body = "Hi there,\n\nA friend of yours, %sender%, asked that I tell you about\nsome quick, easy strategies for making money on the internet.\n\n%sender% would like you to click the link below for more information:\n\n%taflink%\n\nThanks!"; $sql = "INSERT INTO emails (productID,type,subject,body) VALUES ($productID,'taf','".$subject."','".$body."')"; @mysql_query($sql); } header("Location: $_SERVER[PHP_SELF]"); exit; } } echo <<< END $pageheader END; if(isset($_SESSION['errmsg'])){ $message=$_SESSION['errmsg']; echo "$message"; unset ($_SESSION['errmsg']); } else { echo "
    ".$sys_item_name."
    "; } echo <<< END
    Product Set Up
      Use this page to set up the parameters for a specific product.   END; # Get product from database if ($_SESSION['product'] && $_SESSION['product']!=0){ $sql="select * from products"; $sql.=" WHERE id =".$_SESSION['product']; $pres=@mysql_query($sql); $prow=@mysql_fetch_array($pres); if(isset($prow["disabled"])){ $disabled=1; } else { $disabled=0; } if(isset($prow["testmode"])){ $testmode=1; } else { $testmode=0; } if(isset($prow["ipn_email_log"])){ $ipn_email_log=1; } else { $ipn_email_log=0; } if(isset($prow["affcenter"])){ $affcenter=1; } else { $affcenter=0; } $install_folder=$prow['install_folder']; $tmpl_folder=$prow['tmpl_folder']; $item_name=$prow['item_name']; $item_number=$prow['item_number']; $item_desc=$prow['item_desc']; $item_kw=$prow['item_kw']; $item_imgfile=$prow['item_imgfile']; $item_currency=$prow['currency']; $item_locale=$prow['locale']; $item_price=$prow['item_price']; $item_download=$prow['item_download']; if(isset($prow["bypass_squeeze"])){ $bypass_squeeze=1; } else { $bypass_squeeze=0; } if(isset($prow["aw_flag"])){ $aw_flag=1; } else { $aw_flag=0; } $aw_meta_web_id=$prow['aw_meta_web_id']; $aw_unit=$prow['aw_unit']; $ar_form=$prow['ar_form']; if(isset($prow["oto_flag"])){ $oto_flag=1; } else { $oto_flag=0; } $oto_name=$prow['oto_name']; $oto_number=$prow['oto_number']; $oto_desc=$prow['oto_desc']; $oto_kw=$prow['oto_kw']; $oto_imgfile=$prow['oto_imgfile']; $oto_price=$prow['oto_price']; $oto_download=$prow['oto_download']; $cancel_url=$prow['cancel_url']; $taf_count=$prow['taf_count']; if(isset($prow["get_zips"])){ $get_zips=1; } else { $get_zips=0; } $expire=$prow['expire']; if(isset($prow["taf"])){ $taf=1; } else { $taf=0; } $max_sales=$prow['max_sales']; if(isset($prow["cust_only"])){ $cust_only=1; } else { $cust_only=0; } if(isset($prow["otocust_only"])){ $otocust_only=1; } else { $otocust_only=0; } if(isset($prow["giveaway"])){ $giveaway=1; } else { $giveaway=0; } if(isset($prow["ipn_email"])){ $ipn_email=1; } else { $ipn_email=0; } if(isset($prow["ipn_pending_email"])){ $ipn_pending_email=1; } else { $ipn_pending_email=0; } $eq1_paypal=$prow['eq1_paypal']; $eq2_paypal=$prow['eq2_paypal']; if(isset($prow["eq1_pct"])){ $eq1_pct=$prow['eq1_pct']; } else { $eq1_pct=0; } if(isset($prow["eq2_pct"])){ $eq2_pct=$prow['eq2_pct']; } else { $eq2_pct=0; } } else { # set defaults/hints $disabled=0; $testmode=0; $ipn_email_log=0; $affcenter=1; $install_folder="/"; $tmpl_folder="tmpl/"; $item_name="Your Product"; $item_number="Your-Product"; $item_desc=""; $item_kw=""; $item_imgfile=""; $item_currency="USD"; $item_locale="US"; $item_price=7.00; $item_download="dlds/download.zip"; $bypass_squeeze=false; $aw_flag=false; $aw_meta_web_id=""; $aw_unit=""; $ar_form=""; $oto_flag=true; $oto_name="Your One-Time Offer"; $oto_number="Your-OTO"; $oto_desc=""; $oto_kw=""; $oto_imgfile=""; $oto_price=47.00; $oto_download="dlds/OTOdownload.zip"; $cancel_url="http://YourDomain.com/cancel_url"; $get_zips=0; $expire=48; $taf=1; $max_sales=0; $cust_only=false; $otocust_only=fales; $giveaway=false; $ipn_email=true; $eq1_paypal=""; $eq2_paypal=""; $eq1_pct=0; $eq2_pct=0; } echo <<< END
    Check this box to disable this product for site maintenance
    Check this box to use your Paypal Sandbox Account for testing
    Check this box to have all Paypal IPN transactions emailed to you.
    Change this if you're installing the /product/ folder into a subfolder (i.e. if installing into yourdomain.com/ebook1/, set this value to /ebook1/)
    This is the folder where HTML templates are kept. It is relative to the Install Folder (above). Enter only the folder name, followed by a SLASH.
    The currency that should be used when the customer makes a purchase. The default is USD (US Dollars)
    The location to send visitors who cancel the transaction after being sent to Paypal
    Set this variable to a value greater than zero if you want to limit the sales to a fixed number of sales and then shut down the script
    Expire the download page after how many hours? MUST NOT BE ZERO
    Check this box if you want to gather Country/State(Province)/Zip info from customers.
    Check this box if you want to use the Tell-A-Friend script on the download page to let your customers promote the product to your friends immediately after they purchase.
    un-Check this box to prevent a download link automatically being emailed to the customer after a purchase
    Check this box if you don't want to show the squeeze page after a purchase. You will still be able to Broadcast Mail to your Customers via the Admin Panel.
    Check this box if you want to use the automatic opt-in feature. This will also bypass the Squeeze page as though you had selected the above option and requires that the next two parameters be supplied.
    This is the HTML opt-in form with all fields required by your auto-responder script or service.
    Modify the form with the following tokens to define where RAP should supply the name and email address:
    %fullname%
    %firstname%
    %lastname%
    %email%
    %affiliate%
    %redirect%
    For instance... value="%email%"
    Must be unique (used in payment transactions)
    Must be unique (used in payment transactions)
    The price you want to charge for your product.
    Check this box if you don't actually want to SELL your product, but want to give it away for the opt-ins and one-time-offer money.
    Note - There is no provision for automatic opt-ins with a Giveaway product, so you MUST use the squeeze page to capture opt-ins if you choose this option.
    Check this box if you only want customers to earn commissions from the sale of your product
    Location of Product download file.
    Check this box if you want to use the OTO feature.
    Must be unique (used in payment transactions).
    Must be unique (used in payment transactions).
    The price you want to charge for your One-Time Offer.
    Check this box if you only want customers who bought your One-Time Offer to earn commissions from the sale of your One-Time Offer.
    Location of One-Time Offer Product download file.
    Check this box to cause an email to be sent automatically informing a customer if their purchase is Pending for any reason
    Enter a brief description of your product for purposes of search engine optimization
    Enter a list of keyword phrases related to your product for purposes of search engine optimization. Separate each phrase with a comma.
    Enter the PRIMARY paypal address of an EQUITY PARTNER. When it is time to pay the merchant, your earnings will be shared with this partner (based on the percentage entered in the next field).
    Equity partner share is paid BEFORE the merchants share.
    Leave blank if there is no equity partner.
    The % of net payments (after sales commissions) that should be sent to this equity partner. This percentage is paid on both the front-end and the OTO product.
    (Do not enter the % sign).
    NOTE - The sum of the equity partner percentages must be less than 100 or you won't make any money
    Enter the PRIMARY paypal address of an EQUITY PARTNER. When it is time to pay the merchant, your earnings will be shared with this partner (based on the percentage entered in the next field).
    Equity partner share is paid BEFORE the merchants share.
    Leave blank if there is no equity partner.
    The % of net payments (after sales commissions) that should be sent to this equity partner. This percentage is paid on both the front-end and the OTO product.
    (Do not enter the % sign).
    NOTE - The sum of the equity partner percentages must be less than 100 or you won't make any money
    Select a locale that speaks the language that you want the Paypal login page to show. The default is US (Unitd States)
    Enter the file name for your product image. This file is optional, but must reside in the <products>/images/ folder.
    Enter a brief description of your product for purposes of search engine optimization
    Enter a list of keyword phrases related to your product for purposes of search engine optimization. Separate each phrase with a comma.
    Enter the file name for your product image. This file is optional, but must resde in the products/images/ folder.
    Check this box if you want to show this product to resellers in the Affiliate Center.
    $pagefooter END; exit; break; case "editmails": if(!isset($_SESSION['product']) || $_SESSION['product'] == 0){ $_SESSION['errmsg'] = "no product"; header("Location: $_SERVER[PHP_SELF]"); exit; } if($_POST['submit']){ $dld_subject=trim($_POST['dld_subject']); $dld_body=trim($_POST['dld_body']); $echk_subject=trim($_POST['echk_subject']); $echk_body=trim($_POST['echk_body']); $fraud_subject=trim($_POST['fraud_subject']); $fraud_body=trim($_POST['fraud_body']); $taf_subject=trim($_POST['taf_subject']); $taf_body=trim($_POST['taf_body']); if(!isset($_SESSION['errmsg'])) { $sql="UPDATE emails SET subject='".$taf_subject."',body='".$taf_body."' WHERE productID=".$_SESSION['product']." AND type='taf'"; @mysql_query($sql); $sql="UPDATE emails SET subject='".$echk_subject."',body='".$echk_body."' WHERE productID=".$_SESSION['product']." AND type='echeck'"; @mysql_query($sql); $sql="UPDATE emails SET subject='".$dld_subject."',body='".$dld_body."' WHERE productID=".$_SESSION['product']." AND type='download'"; @mysql_query($sql); $sql="UPDATE emails SET subject='".$fraud_subject."',body='".$fraud_body."' WHERE productID=".$_SESSION['product']." AND type='fraud'"; @mysql_query($sql); header("Location: $_SERVER[PHP_SELF]"); exit; } } echo <<< END $pageheader END; # Get emails from database if ($_SESSION['product'] && $_SESSION['product']!=0){ $sql="select * from emails"; $sql.=" WHERE productID =".$_SESSION['product']; $sql.=" AND type='taf'"; $eres=@mysql_query($sql); $erow=@mysql_fetch_array($eres); $taf_subject=$erow['subject']; $taf_body=$erow['body']; $sql="select * from emails"; $sql.=" WHERE productID =".$_SESSION['product']; $sql.=" AND type='echeck'"; $eres=@mysql_query($sql); $erow=@mysql_fetch_array($eres); $echk_subject=$erow['subject']; $echk_body=$erow['body']; $sql="select * from emails"; $sql.=" WHERE productID =".$_SESSION['product']; $sql.=" AND type='download'"; $eres=@mysql_query($sql); $erow=@mysql_fetch_array($eres); $dld_subject=$erow['subject']; $dld_body=$erow['body']; $sql="select * from emails"; $sql.=" WHERE productID =".$_SESSION['product']; $sql.=" AND type='fraud'"; $eres=@mysql_query($sql); $erow=@mysql_fetch_array($eres); $fraud_subject=$erow['subject']; $fraud_body=$erow['body']; } echo <<< END
    General Settings
    Site Offline? END; if($prow['disabled'] == 0) { echo ""; } else { echo ""; } echo <<< END
    Test Mode? END; if($prow['testmode'] == 0) { echo ""; } else { echo ""; } echo <<< END
    Email IPN Log? END; if($prow['ipn_email_log'] == 0) { echo ""; } else { echo ""; } echo <<< END
    Install Folder :
    Template Folder :
    Maximum # of Sales :
    Expiration Limit :
    Show in Affiliate Center? END; if($prow['affcenter'] == 0) { echo ""; } else { echo ""; } echo <<< END
    Get Physical Locations? END; if($prow['get_zips'] == 0) { echo ""; } else { echo ""; } echo <<< END
    Tell A Friend? END; if($prow['taf'] == 0) { echo ""; } else { echo ""; } echo <<< END
    Send Download Link via Email? END; if($prow['ipn_email'] == 0) { echo ""; } else { echo ""; } echo <<< END
    Send Pending Payment Email? END; if($prow['ipn_pending_email'] == 0) { echo ""; } else { echo ""; } echo <<< END

    Paypal Options
    Equity Partner 1 Paypal Address :
    Equity Partner 1 Percentage :
    Equity Partner 2 Paypal Address :
    Equity Partner 2 Percentage :
    Paypal Currency :
    Paypal Locale :
    Paypal Cancel URL :

    Squeeze Page Options
    Bypass Squeeze Page? END; if($prow['bypass_squeeze'] == 0) { echo ""; } else { echo ""; } echo <<< END
    Auto Opt-in for Customers? END; if($prow['aw_flag'] == 0) { echo ""; } else { echo ""; } echo <<< END
    Automatic Opt-in Form :

    Front End Product Settings
    Item Name :
    Item Number :
    Item Price :
    Product Description :
    Product Keywords :
    Product Image File :
    Give Away Product? END; if($prow['giveaway'] == 0) { echo ""; } else { echo ""; } echo <<< END
    Customers Only? END; if($prow['cust_only'] == 0) { echo ""; } else { echo ""; } echo <<< END
    Download Location :

    One Time Offer Settings
    One-Time Offer? END; if($prow['oto_flag'] == 0) { echo ""; } else { echo ""; } echo <<< END
    OTO Item Name :
    OTO Item Number :
    OTO Price :
    OTO Product Description :
    OTO Product Keywords :
    OTO Product Image File :
    OTO Customers Only? END; if($prow['otocust_only'] == 0) { echo ""; } else { echo ""; } echo <<< END
    OTO Download Location :
     
     
    END; if(isset($_SESSION['errmsg'])){ $message=$_SESSION['errmsg']; echo "$message"; unset ($_SESSION['errmsg']); } else { echo "
    ".$sys_item_name."
    "; } echo <<< END
    System Email Maintenance
     
    This is the email sent to customers with their Download Link.
    Modify the Subject and Message with the following tokens to define where RAP should supply replacemant values:
    %firstname%
    %lastname%
    %fullname%
    %itemname%
    %download%
    %expire%
    %contact%
    This is the email sent to customers whose payment is in PENDING status.>.
    Modify the Subject and Message with the following tokens to define where RAP should supply replacemant values:
    %firstname%
    %lastname%
    %fullname%
    %itemname%
    %contact%
    This is the Fraud Email sent to customers who attempt to purchase from themself.
    Modify the Subject and Message with the following tokens to define where RAP should supply replacemant values:
    %firstname%
    %lastname%
    %fullname%
    %itemname%
    %contact%
    This is the Tell a Friend email sent when a customers refers others to your site.
    Modify the Subject and Message with the following tokens to define where RAP should supply replacemant values:
    %sender%
    %domain%
    %taflink%
    $pagefooter END; exit; break; case "affsetup": unset ($_SESSION['errmsg']); if(!isset($_SESSION['product']) || $_SESSION['product'] == 0){ $_SESSION['errmsg'] = "no product"; header("Location: $_SERVER[PHP_SELF]"); exit; } if($_POST['submit']){ unset ($_SESSION['errmsg']); if(isset($_POST["two_tier"])){ $two_tier=1; } else { $two_tier=0; } $item_pct=0+(trim($_POST['item_pct'])); $item_pct2=0+(trim($_POST['item_pct2'])); $oto_pct=0+(trim($_POST['oto_pct'])); $oto_pct2=0+(trim($_POST['oto_pct2'])); $sql="SELECT * FROM products WHERE id = ".$productID; $pres=@mysql_query($sql); $rcount = @mysql_num_rows($pres); if(!isset($_SESSION['errmsg'])) { if($rcount>0) { $sql="UPDATE products SET two_tier=$two_tier,item_pct=$item_pct,item_pct2=$item_pct2, oto_pct=$oto_pct,oto_pct2=$oto_pct2 WHERE id=".$_SESSION['product']; } $prod=@mysql_query($sql); header("Location: $_SERVER[PHP_SELF]?action=$action"); exit; } } echo <<< END $pageheader END; # Get product from database if ($_SESSION['product'] && $_SESSION['product']!=0){ $sql="select * from products"; $sql.=" WHERE id =".$_SESSION['product']; $pres=@mysql_query($sql); $prow=@mysql_fetch_array($pres); if(isset($prow["two_tier"])){ $two_tier=1; } else { $two_tier=0; } $item_pct=$prow['item_pct']; $item_pct2=$prow['item_pct2']; $oto_pct=$prow['oto_pct']; $oto_pct2=$prow['oto_pct2']; } else { # set defaults/hints $two_tier=false; $item_pct=0; $item_pct2=0; $oto_pct=0; $oto_pct2=0; } echo <<< END
    Download Email
    Download Email Subject :
    Download Email Message :

    Pending Email
    Pending Email Subject :
    Pending Email Message :

    Fraud Email
    Fraud Email Subject :
    Fraud Email Message :

    Tell A Friend Email
    Tell A Friend Subject :
    Tell A Friend Message :

     
    END; if(isset($_SESSION['errmsg'])){ if($_SESSION['errmsg'] == 'no product') echo "
    Select a Product First
    "; if($_SESSION['errmsg'] == 'product selected') echo "
    Un-Select the Product First
    "; unset ($_SESSION['errmsg']); }else{ echo "
    ".$sys_item_name."
    "; } echo <<< END
    Reseller Program Setup
     
    Check this box to allow Two Tier reseller payments.
    The % of payments that should be sent to your resellers
    (Do not enter the % sign).
    The % of payments that should be sent to your resellers on sales made by other people referred by them.
    (Do not enter the % sign).
    The % of payments that should be sent to your resellers when they make a sale of your One-Time Offer
    (Do not enter the % sign).
    The % of payments that should be sent to your resellers on sales of your One-Time Offer made by other people referred by them.
    (Do not enter the % sign).
    $pagefooter END; exit; break; case "affoptin": unset ($_SESSION['errmsg']); if(!isset($_SESSION['product']) || $_SESSION['product'] == 0){ $_SESSION['errmsg'] = "no product"; header("Location: $_SERVER[PHP_SELF]"); exit; } if($_POST['submit']){ unset ($_SESSION['errmsg']); if(isset($_POST["aw_aff_flag"])){ $aw_aff_flag=1; } else { $aw_aff_flag=0; } $aff_ar_form=str_replace(' name=\"optin\"','',trim($_POST['aff_ar_form'])); $aff_ar_form=str_replace(' id=\"optin\"','',$aff_ar_form); $aff_ar_form=str_replace('0) { $sql="UPDATE products SET aw_aff_flag=$aw_aff_flag,aff_ar_form='".$aff_ar_form."' WHERE id=".$_SESSION['product']; } $prod=@mysql_query($sql); header("Location: $_SERVER[PHP_SELF]?action=$action"); exit; } } echo <<< END $pageheader END; # Get product from database if ($_SESSION['product'] && $_SESSION['product']!=0){ $sql="select * from products"; $sql.=" WHERE id =".$_SESSION['product']; $pres=@mysql_query($sql); $prow=@mysql_fetch_array($pres); if(isset($prow["aw_aff_flag"])){ $aw_aff_flag=1; } else { $aw_aff_flag=0; } $aff_ar_form=$prow['aff_ar_form']; } else { # set defaults/hints $aw_aff_flag=false; $aff_ar_form=""; } echo <<< END
    2-Tier Reseller Program? END; if($prow['two_tier'] == 0) { echo ""; } else { echo ""; } echo <<< END

    Item Percent :
    2nd-Tier Item Percent :

    OTO Percent :
    2nd-Tier OTO Percent :

     
    END; if(isset($_SESSION['errmsg'])){ if($_SESSION['errmsg'] == 'no product') echo "
    Select a Product First
    "; if($_SESSION['errmsg'] == 'product selected') echo "
    Un-Select the Product First
    "; unset ($_SESSION['errmsg']); }else{ echo "
    ".$sys_item_name."
    "; } echo <<< END
    Auto-Responder Setup for Resellers
     
    Check this box if you want to automatically add Resellers to an auto-responder list.
    This is the HTML opt-in form with all fields required by your auto-responder script or service.
    Modify the form with the following tokens to define where RAP should supply the name and email address:
    %fullname%
    %firstname%
    %lastname%
    %email%
    %redirect%
    For instance... value="%email%".
    $pagefooter END; exit; break; case "jvsetup": unset ($_SESSION['errmsg']); if(!isset($_SESSION['product']) || $_SESSION['product'] == 0){ $_SESSION['errmsg'] = "no product"; header("Location: $_SERVER[PHP_SELF]"); exit; } if($_POST['submit']){ unset ($_SESSION['errmsg']); $jvcode=trim($_POST['jvcode']); $jv_item_pct=0+(trim($_POST['jv_item_pct'])); $jv_item_pct2=0+(trim($_POST['jv_item_pct2'])); $jv_oto_pct=0+(trim($_POST['jv_oto_pct'])); $jv_oto_pct2=0+(trim($_POST['jv_oto_pct2'])); $sql="SELECT * FROM products WHERE id = ".$productID; $pres=@mysql_query($sql); $rcount = @mysql_num_rows($pres); if(!isset($_SESSION['errmsg'])) { if($rcount>0) { $sql="UPDATE products SET jvcode='".$jvcode."', jv_item_pct=$jv_item_pct,jv_item_pct2=$jv_item_pct2,jv_oto_pct=$jv_oto_pct,jv_oto_pct2=$jv_oto_pct2 WHERE id=".$_SESSION['product']; } $prod=@mysql_query($sql); header("Location: $_SERVER[PHP_SELF]?action=$action"); exit; } } echo <<< END $pageheader END; # Get product from database if ($_SESSION['product'] && $_SESSION['product']!=0){ $sql="select * from products"; $sql.=" WHERE id =".$_SESSION['product']; $pres=@mysql_query($sql); $prow=@mysql_fetch_array($pres); $jvcode=$prow['jvcode']; $jv_item_pct=$prow['jv_item_pct']; $jv_item_pct2=$prow['jv_item_pct2']; $jv_oto_pct=$prow['jv_oto_pct']; $jv_oto_pct2=$prow['jv_oto_pct2']; } else { # set defaults/hints $jvcode=""; $jv_item_pct=0; $jv_item_pct2=0; $jv_oto_pct=0; $jv_oto_pct2=0; } echo <<< END
    Auto Opt-in for Resellers? END; if($prow['aw_aff_flag'] == 0) { echo ""; } else { echo ""; } echo <<< END
    Automatic Opt-in Form :

     
    END; if(isset($_SESSION['errmsg'])){ if($_SESSION['errmsg'] == 'no product') echo "
    Select a Product First
    "; if($_SESSION['errmsg'] == 'product selected') echo "
    Un-Select the Product First
    "; unset ($_SESSION['errmsg']); }else{ echo "
    ".$sys_item_name."
    "; } echo <<< END
    JV Program Setup
     
    Secret Code to allow others to sign up as a JV Partner.
    The % of front-end payments that should be sent to your JV Partners. (Do not enter the % sign).
    The % of front-end payments that should be sent to your JV Partners on sales made by Resellers/Partners referred by them. (Do not enter the % sign).
    The % of OTO payments that should be sent to your JV Partners. (Do not enter the % sign).
    The % of OTO payments that should be sent to your JV Partners on sales made by other Resellers/Partners referred by them. (Do not enter the % sign).
    $pagefooter END; exit; break; case "jvoptin": unset ($_SESSION['errmsg']); if(!isset($_SESSION['product']) || $_SESSION['product'] == 0){ $_SESSION['errmsg'] = "no product"; header("Location: $_SERVER[PHP_SELF]"); exit; } if($_POST['submit']){ unset ($_SESSION['errmsg']); if(isset($_POST["aw_jv_flag"])){ $aw_jv_flag=1; } else { $aw_jv_flag=0; } $jv_ar_form=str_replace(' name=\"optin\"','',trim($_POST['jv_ar_form'])); $jv_ar_form=str_replace(' id=\"optin\"','',$jv_ar_form); $jv_ar_form=str_replace('0) { $sql="UPDATE products SET aw_jv_flag=$aw_jv_flag,jv_ar_form='".$jv_ar_form."' WHERE id=".$_SESSION['product']; } $prod=@mysql_query($sql); header("Location: $_SERVER[PHP_SELF]?action=$action"); exit; } } echo <<< END $pageheader END; # Get product from database if ($_SESSION['product'] && $_SESSION['product']!=0){ $sql="select * from products"; $sql.=" WHERE id =".$_SESSION['product']; $pres=@mysql_query($sql); $prow=@mysql_fetch_array($pres); if(isset($prow["aw_jv_flag"])){ $aw_jv_flag=1; } else { $aw_jv_flag=0; } $jv_ar_form=$prow['jv_ar_form']; } else { # set defaults/hints $aw_jv_flag=false; $jv_ar_form=""; } echo <<< END
    Joint Venture Code :

    JV Item Percent :
    JV 2nd Tier Item Percent :

    JV OTO Percent :
    JV 2nd Tier OTO Percent :

     
    END; if(isset($_SESSION['errmsg'])){ if($_SESSION['errmsg'] == 'no product') echo "
    Select a Product First
    "; if($_SESSION['errmsg'] == 'product selected') echo "
    Un-Select the Product First
    "; unset ($_SESSION['errmsg']); }else{ echo "
    ".$sys_item_name."
    "; } echo <<< END
    Auto-Responder Setup for JV Partners
     
    Check this box if you want to automatically add JV Partners to an auto-responder list.
    This is the HTML opt-in form with all fields required by your auto-responder script or service.
    Modify the form with the following tokens to define where RAP should supply the name and email address:
    %fullname%
    %firstname%
    %lastname%
    %email%
    %redirect%
    For instance... value="%email%".
    $pagefooter END; exit; break; case "logout": # Logout. unset($_SESSION['admin']); header("Location: $_SERVER[PHP_SELF]"); exit; break; case "sales": case "mysales": unset ($_SESSION['errmsg']); if(!isset($_SESSION['product']) || $_SESSION['product'] == 0){ $_SESSION['errmsg'] = "no product"; header("Location: $_SERVER[PHP_SELF]"); exit; } $count = $_REQUEST["count"]; if($count) $limit=" LIMIT ".$count; $sql="select * from sales WHERE productID=".$productID; if($_POST['frontend']) $sql.=" AND item_number ='".$sys_item_number."'"; if($_POST['oto']) $sql.=" AND item_number ='".$sys_oto_number."'"; if($action=="mysales") $sql.=" AND tier = 0"; $sql.=" ORDER BY purchased DESC"; $sql.=$limit; $sres=@mysql_query($sql); $rcount = @mysql_num_rows($sres); if($action=="mysales") { $selection = "only your direct sales"; } elseif($count){ $selection = "last $count"; } else { $selection = "all $rcount"; } echo $pageheader; ?> $pagefooter END; exit; break; case "delsale": if(isset($_GET['txn_id'])) { $txn_id=$_GET['txn_id']; $sql="DELETE FROM sales WHERE txn_id='".$txn_id."'"; $res=@mysql_query($sql); } header("Location: $_SERVER[PHP_SELF]"); exit; break; case "delslsltr": if(isset($_GET['tmpl'])) { $tmpl=$_GET['tmpl']; $sql="DELETE FROM salesletters WHERE productID=".$productID." AND template='".$tmpl."'"; $res=@mysql_query($sql); } header("Location: $_SERVER[PHP_SELF]?action=slsltrs"); exit; break; case "delprod": if(isset($_GET['prod'])) { $prod=$_GET['prod']; $sql="DELETE FROM products WHERE id=".$prod; $res=@mysql_query($sql); } header("Location: $_SERVER[PHP_SELF]?action=prodlist"); exit; break; case "refs": case "myrefs": unset ($_SESSION['errmsg']); if(!isset($_SESSION['product']) || $_SESSION['product'] == 0){ $_SESSION['errmsg'] = "no product"; header("Location: $_SERVER[PHP_SELF]"); exit; } $sql="select * from sales WHERE productID=".$productID; if($action=="myrefs") $sql.=" AND receiver_email ='".$sys_paypal."' OR '".$sys_sandbox."'"; $sres=@mysql_query($sql); $rcount = @mysql_num_rows($sres); $selection = "all $rcount"; if($action=="myrefs") $selection = "only your direct sales"; echo <<< END $pageheader $pagefooter END; exit; break; case "resend": if(substr($sys_support, 0, 7)=="http://"){ $eaddress = "noreply@$sys_domain"; } else { $eaddress = $sys_support; } $txn_id=$_GET['txn_id']; $sql="SELECT * FROM sales WHERE txn_id='".$txn_id."'"; $sres=@mysql_query($sql); while ($srec=@mysql_fetch_assoc($sres)) { $product = $srec['id']; $firstname = $srec['firstname']; $lastname = $srec['lastname']; $fullname=$srec['firstname']." ".$srec['lastname']; $item_name=$srec['item_name']; $payer_email=$srec['payer_email']; # Send download link to purchaser $sentdata=cust_email('download'); echo <<< END $pageheader;
    Auto Opt-in for JV Partners? END; if($prow['aw_jv_flag'] == 0) { echo ""; } else { echo ""; } echo <<< END
    Automatic Opt-in Form :

     

    Sales Report for
    $sys_item_name
    Click on the 'Expires' date of a sale to re-validate the customer's download link for another $sys_expire hours.
    $rcount total sales. Showing $selection. Your sales are highlighted
    END; $bgcolor = "#ffffff"; while($sales=@mysql_fetch_array($sres)) { $rcount--; if(!$count || $rcount<=$count){ if($sales['tier']==0) $bgcolor = "#ccffcc"; $url=$sys_install_folder."?action=download&rx=1&id=".$sales['txn_id']." target=_blank"; $id = $sales['id']; $txn_id=$sales['txn_id']; $refunded=$sales['refunded']; $item_number=$sales['item_number']; $receiver=$sales['receiver_email']; $payer=$sales['payer_email']; $firstname=$sales['firstname']; $lastname=$sales['lastname']; $business=$sales['business']; $amount=$sales['payment_amount']; $discount_code=$sales['discount_code']; $purchased=$sales['purchased']; $expires=$sales['expires']; $affiliate=$sales['affiliate']; $tier=$sales['tier']; echo <<< END END; if($bgcolor=="#ffffff"){ $bgcolor = "#eeeeee"; } else { $bgcolor = "#ffffff"; } } } echo <<< END
    Transaction ID Item Number Payee Email
    Tier / Reseller
    Customer Info Discount
    Code
    Amount Purchased Expires Delete?
    END; if($refunded) { echo $txn_id; } else { echo "$txn_id"; } echo <<< END $item_number $receiver
    $tier / $affiliate
    $firstname $lastname
    $payer
    $business
    $discount_code $amount $purchased END; if($refunded) { echo $expires; } else { echo"$expires"; } echo <<< END Delete Sale
     
     
    Referrer/Keywords Report for
    $sys_item_name
    $rcount total sales. Showing $selection.
    END; $bgcolor = "#ffffff"; $refs = array(); while($sales=@mysql_fetch_array($sres)) { $referrer=$sales['referrer']; if(isset($refs[$sales['referrer']])){ $refs[$sales['referrer']]++; } else{ $refs[$sales['referrer']]=1; } } arsort($refs); foreach($refs as $ref => $sales){ $parts = parse_url($ref); $host = str_replace("www.", "", $parts['host']); $keywords = ""; parse_str($parts['query'], $vars); $keywords = urldecode($vars['q']); // default - handles google and live.com if(strpos(' $host', 'yahoo')){ $keywords = urldecode($vars['p']); } elseif($vars['keywords']){ $keywords = urldecode($vars['keywords']); } elseif($vars['query']){ $keywords = urldecode($vars['query']); } else { } $referrer = $ref; if(strlen($ref)>100) $referrer = substr($ref, 0, 98) . ".."; echo <<< END END; if($bgcolor=="#ffffff"){ $bgcolor = "#eeeeee"; } else { $bgcolor = "#ffffff"; } } echo "
    Referrer Domain Keywords Sales
    $referrer $host $keywords $sales
    $pagefooter "; exit; break; case "refdomains": case "myrefdomains": unset ($_SESSION['errmsg']); if(!isset($_SESSION['product']) || $_SESSION['product'] == 0){ $_SESSION['errmsg'] = "no product"; header("Location: $_SERVER[PHP_SELF]"); exit; } $sql="select * from sales WHERE productID=".$productID; if($action=="myrefs") $sql.=" AND receiver_email ='".$sys_paypal."' OR '".$sys_sandbox."'"; $sres=@mysql_query($sql); $rcount = @mysql_num_rows($sres); $selection = "all $rcount"; if($action=="myrefs") $selection = "only your direct sales"; echo <<< END $pageheader
     
    Referrer Domain Report for
    $sys_item_name
    $rcount total sales. Showing $selection.
    END; $bgcolor = "#ffffff"; $refs = array(); while($sales=@mysql_fetch_array($sres)) { $referrer=$sales['referrer']; $parts = parse_url($referrer); $host = str_replace("www.", "", $parts["host"]); if(isset($refs[$host])){ $refs[$host]++; } else { $refs[$host]=1; } } arsort($refs); foreach($refs as $ref => $sales){ echo <<< END END; if($bgcolor=="#ffffff"){ $bgcolor = "#eeeeee"; } else { $bgcolor = "#ffffff"; } } echo "
    Domain Sales
    $ref $sales
    $pagefooter"; exit; break; case "bypayee": unset ($_SESSION['errmsg']); if(!isset($_SESSION['product']) || $_SESSION['product'] == 0){ $_SESSION['errmsg'] = "no product"; header("Location: $_SERVER[PHP_SELF]"); exit; } $sql="SELECT * FROM sales WHERE productID=".$productID; $sres=@mysql_query($sql); $rcount = @mysql_num_rows($sres); $selection = "all $rcount"; echo <<< END $pageheader
     
    Sales Report By Payee for
    $sys_item_name
    $rcount total sales records. Showing $selection.
    Your sales are highlighted.
    END; $bgcolor = "#ffffff"; $refs = array(); while($sales=@mysql_fetch_array($sres)) { $payee=$sales['receiver_email']; if(isset($refs[$payee])){ $refs[$payee]['count']++; $refs[$payee]['amount']+=$sales['payment_amount']; if($sales['refunded']) { $refs[$payee]['refunds']++; $refs[$payee]['refunded']+=$sales['payment_amount']; } } else { $refs[$payee]['count']=1; $refs[$payee]['amount']=0+$sales['payment_amount']; if($sales['refunded']) { $refs[$payee]['refunds']=1; $refs[$payee]['refunded']=0+$sales['payment_amount']; } } } $totsales=0; $totamt=0; $totrefunds=0; $totrefunded=0; arsort($refs); foreach($refs as $ref => $payee){ if(strtolower($ref)==strtolower($sys_paypal) || strtolower($ref)==strtolower($sys_sandbox)) $bgcolor = "#ccffcc"; $totsales+=$payee[count]; $totamt+=$payee[amount]; $totrefunds+=$payee[refunds]; $totrefunded+=$payee[refunded]; echo <<< END END; $netnet=$totamt-$totrefunded; if($bgcolor=="#ffffff"){ $bgcolor = "#eeeeee"; } else { $bgcolor = "#ffffff"; } } echo <<< END
    Payee Sales Amount Refunds Net Amt
    $ref $payee[count] $payee[amount] $payee[refunds] END; if($payee[refunds]) { $netamt=$payee[amount]-$payee[refunded]; echo $netamt; } echo <<< END
    Earnings Totals
    $totsales $totamt $totrefunds $netnet
    $pagefooter END; exit; break; case "byreferrer": unset ($_SESSION['errmsg']); if(!isset($_SESSION['product']) || $_SESSION['product'] == 0){ $_SESSION['errmsg'] = "no product"; header("Location: $_SERVER[PHP_SELF]"); exit; } $sql="SELECT * FROM sales WHERE productID=".$productID; $sres=@mysql_query($sql); $rcount = @mysql_num_rows($sres); $selection = "all $rcount"; echo <<< END $pageheader
     
    Sales Report By Referrer for
    $sys_item_name
    $rcount total sales records. Showing $selection.
    Your sales are highlighted.
    END; $bgcolor = "#ffffff"; $refs = array(); while($sales=@mysql_fetch_array($sres)) { $referrer=$sales['affiliate']; if(isset($refs[$referrer])){ $refs[$referrer]['count']++; $refs[$referrer]['amount']+=$sales['payment_amount']; if($sales['tier']==1) { $refs[$referrer]['t1count']++; $refs[$referrer]['t1amt']+=$sales['payment_amount']; } if($sales['tier']==2) { $refs[$referrer]['t2count']++; $refs[$referrer]['t2amt']+=$sales['payment_amount']; } if($sales['tier']==0) { $refs[$referrer]['t0count']++; $refs[$referrer]['t0amt']+=$sales['payment_amount']; } if($sales['refunded']) { $refs[$referrer]['refunds']++; $refs[$referrer]['refunded']+=$sales['payment_amount']; } } else { $refs[$referrer]['count']=1; $refs[$referrer]['amount']=0+$sales['payment_amount']; if($sales['tier']==1) { $refs[$referrer]['t1count']=1; $refs[$referrer]['t2count']=0; $refs[$referrer]['t0count']=0; $refs[$referrer]['t1amt']=0+$sales['payment_amount']; $refs[$referrer]['t2amt']=0; $refs[$referrer]['t0amt']=0; } if($sales['tier']==2) { $refs[$referrer]['t1count']=0; $refs[$referrer]['t2count']=1; $refs[$referrer]['t0count']=0; $refs[$referrer]['t1amt']=0; $refs[$referrer]['t2amt']=0+$sales['payment_amount']; $refs[$referrer]['t0amt']=0; } if($sales['tier']==0) { $refs[$referrer]['t1count']=0; $refs[$referrer]['t2count']=0; $refs[$referrer]['t0count']=1; $refs[$referrer]['t1amt']=0; $refs[$referrer]['t2amt']=0; $refs[$referrer]['t0amt']=0+$sales['payment_amount']; } if($sales['refunded']) { $refs[$referrer]['refunds']=1; $refs[$referrer]['refunded']=0+$sales['payment_amount']; } $sql="SELECT * FROM nicknames WHERE email='".$referrer."'"; $ares=@mysql_query($sql); if(@mysql_num_rows($ares)>0) { $arec=@mysql_fetch_assoc($ares); $refs[$referrer]['name']=$arec['firstname']." ".$arec['lastname']; } } } $totsales=0; $totamt=0; $tott1sales=0; $tott1amt=0; $tott2sales=0; $tott2amt=0; $tot0sales=0; $tott0amt=0; $totrefunds=0; $totrefunded=0; arsort($refs); foreach($refs as $ref => $referrer){ if(strtolower($ref)==strtolower($sys_paypal) || strtolower($ref)==strtolower($sys_sandbox)) $bgcolor = "#ccffcc"; $totsales+=$referrer[count]; $totamt+=$referrer[amount]; $tott1sales+=$referrer[t1count]; $tott1amt+=$referrer[t1amt]; $tott2sales+=$referrer[t2count]; $tott2amt+=$referrer[t2amt]; $tott0sales+=$referrer[t0count]; $tott0amt+=$referrer[t0amt]; $totrefunds+=$referrer[refunds]; $totrefunded+=$referrer[refunded]; echo <<< END END; $netnet=$totamt-$totrefunded; if($bgcolor=="#ffffff"){ $bgcolor = "#eeeeee"; } else { $bgcolor = "#ffffff"; } } echo <<< END
    Referrer Email Name Tier 1
    Sales
    Tier 1
    Amount
    Tier 2
    Sales
    Tier 2
    Amount
    Merchant
    Sales
    Merchant
    Amount
    Total
    Referrals
    Total
    Amount
    Refunds Net
    Amount
    $ref $referrer[name] $referrer[t1count] $referrer[t1amt] $referrer[t2count] $referrer[t2amt] $referrer[t0count] $referrer[t0amt] $referrer[count] $referrer[amount] $referrer[refunds] END; if($referrer[refunds]) { $netamt=$referrer[amount]-$referrer[refunded]; echo $netamt; } echo <<< END
    Earnings Totals
    $tott1sales $tott1amt $tott2sales $tott2amt $tott0sales $tott0amt $totsales $totamt $totrefunds $netnet
    $pagefooter END; exit; break; case "affiliates": unset ($_SESSION['errmsg']); if(!isset($_SESSION['product']) || $_SESSION['product'] == 0){ $_SESSION['errmsg'] = "no product"; header("Location: $_SERVER[PHP_SELF]"); exit; } echo <<< END $pageheader
     
    Reseller Listing for
    $sys_item_name
    END; $bgcolor = "#ffffff"; $affiliates=array(); $sql="SELECT * from nicknames WHERE productID=".$productID." AND type = 'std' ORDER BY lastname,firstname"; $ares=@mysql_query($sql); while($arow=@mysql_fetch_array($ares)) { $id=$arow['id']; $name=$arow['firstname']." ".$arow['lastname']; $email=$arow['email']; $nickname=$arow['nickname']; $sql="SELECT * FROM sales WHERE receiver_email='".$email."'"; $sres=@mysql_query($sql); $sales = 0; $referrals = 0; while($srow=@mysql_fetch_array($sres)) { $referrals++; if($email==$srow['receiver_email']) $sales++; } if($referrals==0) $referrals=""; if($sales==0) $sales=""; echo <<< END "; if($bgcolor=="#ffffff"){ $bgcolor = "#eeeeee"; } else { $bgcolor = "#ffffff"; } } echo "
    Reseller nickname Email Referrals Sales Delete?
    $name $nickname $email $referrals $sales END; if($referrals==0){ ?> Delete Affililate
    $pagefooter"; exit; break; case "partners": unset ($_SESSION['errmsg']); if(!isset($_SESSION['product']) || $_SESSION['product'] == 0){ $_SESSION['errmsg'] = "no product"; header("Location: $_SERVER[PHP_SELF]"); exit; } echo <<< END $pageheader
     
    JV Partner Listing for
    $sys_item_name
    END; $bgcolor = "#ffffff"; $partners=array(); $sql="SELECT * from nicknames WHERE productID=".$productID." AND type = 'jv' ORDER BY lastname,firstname"; $pres=@mysql_query($sql); while($prow=@mysql_fetch_array($pres)) { $id=$prow['id']; $name=$prow['firstname']." ".$prow['lastname']; $email=$prow['email']; $nickname=$prow['nickname']; $sql="SELECT * FROM sales WHERE affiliate='".$email."'"; $sres=@mysql_query($sql); $sales = 0; $referrals = 0; while($srow=@mysql_fetch_array($sres)) { $referrals++; if($email==$srow['receiver_email']) $sales++; } if($referrals==0) $referrals=""; if($sales==0) $sales=""; echo <<< END "; if($bgcolor=="#ffffff"){ $bgcolor = "#eeeeee"; } else { $bgcolor = "#ffffff"; } } echo "
    Partner nickname Email Referrals Sales Delete?
    $name $nickname $email $referrals $sales END; if($referrals==0){ ?> Delete JV Partner
    $pagefooter"; exit; break; case "addon": if (isset($_REQUEST['do'])) { $filename="addons/".$_REQUEST['module']."/install.php"; } else { # Show Addon admin page $addon_id = $_REQUEST["id"]; $sql="SELECT * FROM addons WHERE id =".$addon_id; $result=@mysql_query($sql); $addonrec=@mysql_fetch_assoc($result); $filename="addons/".$addonrec['groupfolder']."/".$addonrec['addonfolder']."/admin.php"; } echo $pageheader; @include $filename; echo $pagefooter; exit; break; case "extend": # Extend validity of download link $txn_id = $_REQUEST["id"]; $expires = date('Y-m-d H:i:s',(time() + (3600 * $sys_expire))); $sql="UPDATE sales SET expires='".$expires."' WHERE txn_id ='".$txn_id."'"; $result=@mysql_query($sql); $sql="SELECT * FROM sales WHERE txn_id ='".$txn_id."'"; $result=@mysql_query($sql); $sales=@mysql_fetch_assoc($result); $payer_email = $sales['payer_email']; $sql="SELECT * FROM products WHERE id=".$sales['productID']; $prow=@mysql_query($sql); $prec=@mysql_fetch_assoc($prow); $pfolder=$prec['install_folder']; echo <<< END $pageheader

    The Download link has been validated for another $sys_expire hours.

    Give your customer (at $payer_email) the following link to download:

    http://$sys_domain$pfolder?action=download&rx=1&id=$txn_id

     
    Re-Send Download Link
    $pagefooter END; } exit; break; case "emailcustomers": # Show mailer form. unset ($_SESSION['errmsg']); if(!isset($_SESSION['product']) || $_SESSION['product'] == 0){ $_SESSION['errmsg'] = "no product"; header("Location: $_SERVER[PHP_SELF]"); exit; } echo <<< END $pageheader
     
    Email Sent
    END; echo $sentdata; echo <<< END
    When writing an email to send to your customers, you can personalize the email by inserting the following tokens. These tokens will be replaced with the appropriate values in each email sent:

    %firstname% - the Reseller's First Name
    %lastname% - the Reseller's Last Name
    %fullname% - the Reseller's Full Name
    %email% - the Reseller's Email Address
    %itemname% - the name of your Front-End product
    %otoname% - the name of your OTO product
    $pagefooter END; exit; break; case "custbroadcast": # Send a broadcast mail to all customers # Read sales table to get list of customers. $customers = array(); $refs = array(); if($_POST['frontcust']){ $frontcust=1; } else { $frontcust=0; } if($_POST['otocust']){ $otocust=1; } else { $otocust=0; } # all customers $where="WHERE productID=".$productID." AND refunded != 1"; # select only front-end customers if(!$otocust) $where.=" AND item_number='".$sys_item_number."'"; # select only oto customers if(!$frontcust) $where.=" AND item_number='".$sys_oto_number."'"; $sql="select * from sales ".$where; $sres=@mysql_query($sql); while($srec=@mysql_fetch_assoc($sres)) { $email=$srec['payer_email']; if(!isset($customers[$email])) { $sql="SELECT * from cust_optouts WHERE email = '".$email."'"; $ores=@mysql_query($sql); $orow=@mysql_fetch_assoc($ores); if($orow['email']!=$email) { $customers[$email] = $srec; } } } if(substr($sys_support, 0, 7)=="http://"){ $eaddress = "noreply@$sys_domain"; } else { $eaddress = $sys_support; } $headers = "From: $sys_item_name<$eaddress>"; $subject = $_POST["subject"]; $body = stripslashes($_POST["body"]); $body .= "\n\n===\nTo stop receiving emails from $sys_item_name, click this link:\nhttp://$sys_domain" . $sys_install_folder . "?action=optout&email=%email%"; $totalmails=count($customers); echo <<< END $pageheader
     
    Broadcast Mail to
    $sys_item_name Customers
    Subject:
    Message:
    Mail Front-End Customers   Mail OTO Customers
    (Check one or the other - or both)

     
    Mailing $sys_item_name Customers
      Sending $totalmails emails END; foreach($customers as $cust){ $firstname = $cust['firstname']; $lastname = $cust ['lastname']; $fullname = $cust['firstname']." ".$cust['lastname']; $email = $cust['payer_email']; # Replace tokens. $a1=array('%firstname%','%lastname%','%fullname%','%email%','%itemname%','%otoname%'); $a2=array(_decode($firstname), _decode($lastname),_decode($fullname), _decode($email), _decode($sys_item_name), _decode($sys_oto_name)); $sendsubject=str_replace($a1, $a2, $subject); $sendbody=str_replace($a1, $a2, $body); # Send the mailer. @mail($email, $sendsubject, $sendbody, $headers); echo "
    1. $fullname - $email ..
    2. "; flush(); } echo <<< END
    Finished Sending Emails
    $pagefooter END; exit; break; case "emailaffiliates": # Show mailer form. unset ($_SESSION['errmsg']); if(!isset($_SESSION['product']) || $_SESSION['product'] == 0){ $_SESSION['errmsg'] = "no product"; header("Location: $_SERVER[PHP_SELF]"); exit; } echo <<< END $pageheader
    When writing an email to send to your resellers, you can personalize the email by inserting the following tokens. These tokens will be replaced with the appropriate values in each email sent:

    %firstname% - the Reseller's First Name
    %lastname% - the Reseller's Last Name
    %fullname% - the Reseller's Full Name
    %email% - the Reseller's Email Address
    %afflink% - the Reseller's Referal Link
    %itemname% - the name of your Front-End product
    %otoname% - the name of your OTO product
    $pagefooter END; exit; break; case "affbroadcast": # Send a broadcast mail to all resellers # Read affiliates table to get list of resellers. $affiliates = array(); if(!$sys_glbaff) $where=" AND productID=".$productID; $sql="SELECT * FROM nicknames WHERE type= 'std'".$where; $ares=@mysql_query($sql); while($arec=@mysql_fetch_assoc($ares)) { $email=$arec['email']; $affiliates[$email] = $arec; $affiliates[$email]['sales']=0; # Read IPN file to count sales $refs = array(); $sql="SELECT * FROM sales WHERE productID=".$productID." AND receiver_email='".$email."'"; $sres=@mysql_query($sql); while($sales=@mysql_fetch_array($sres)) { if(isset($affiliates[$email]['sales'])){ $affiliates[$email]['sales']++; } else { $affiliates[$email]['sales']=1; } } } if(substr($sys_eaddress, 0, 7)=="http://"){ $eaddress = "noreply@$sys_domain"; } else { $eaddress = $sys_eaddress; } $headers = "From: $sys_item_name<$eaddress>"; $subject = $_POST["subject"]; $body = stripslashes($_POST["body"]); $body .= "\n\n===\nTo stop receiving emails from $sys_item_name, click this link:\nhttp://$sys_domain" . $sys_install_folder . "?action=affoptout&email=%email%"; $body = wordwrap($body, 70); $refs = array(); foreach($affiliates as $affiliate){ if($affiliate['sales'] >= $_POST["minsales"]){ $refs[] = $affiliate; } } $totalmails=count($refs); echo <<< END $pageheader $pagefooter END; exit; break; case "emailpartners": # Show mailer form. unset ($_SESSION['errmsg']); if(!isset($_SESSION['product']) || $_SESSION['product'] == 0){ $_SESSION['errmsg'] = "no product"; header("Location: $_SERVER[PHP_SELF]"); exit; } echo <<< END $pageheader
     
    Broadcast Mail to
    $sys_item_name Resellers
    Subject:
    Message:
    Send this mail to Resellers who have made at least sales.
     
    Mailing Resellers
      Sending $totalmails emails END; foreach($refs as $affiliate){ $firstname = $affiliate['firstname']; $lastname = $affiliate ['lastname']; $fullname = $affiliate['firstname']." ".$affiliate['lastname']; $email = $affiliate['email']; $afflink = "http://".$sys_domain.$sys_install_folder."?e=".$affiliate['nickname']; # Replace tokens. $a1=array('%firstname%','%lastname%','%fullname%','%email%','%afflink%','%itemname%','%otoname%'); $a2=array(_decode($firstname), _decode($lastname),_decode($fullname), _decode($email), _decode($afflink), _decode($sys_item_name), _decode($sys_oto_name)); $sendsubject=str_replace($a1, $a2, $subject); $sendbody=str_replace($a1, $a2, $body); # Send the mailer. @mail($email, $sendsubject, $sendbody, $headers); echo "
    1. $fullname - $email ..
    2. "; flush(); } echo <<< END
    Finished Sending Emails
    When writing an email to send to your JV Partners, you can personalize the email by inserting the following tokens. These tokens will be replaced with the appropriate values in each email sent:

    %firstname% - the JV Partner's First Name
    %lastname% - the JV Partner's Last Name
    %fullname% - the JV Partner's Full Name
    %email% - the JV Partner's Email Address
    %afflink% - the JV Partner's referral Link
    %itemname% - the name of your Front-End product
    %otoname% - the name of your OTO product
    $pagefooter END; exit; break; case "partnerbroadcast": # Send a broadcast mail to all partners # Read partners table to get list of partners. $partners = array(); if(!$sys_glbaff) $where=" AND productID=".$productID; $sql="SELECT * FROM nicknames WHERE type = 'jv' ".$where; $pres=@mysql_query($sql); while($prec=@mysql_fetch_assoc($pres)) { $email=$prec['email']; $partners[$email] = $prec; $partners[$email]['sales']=0; # Read IPN file to count sales $refs = array(); $sql="select * from sales WHERE productID=".$productID." AND receiver_email='".$email."'"; $sres=@mysql_query($sql); while($sales=@mysql_fetch_array($sres)) { if(isset($partners[$email]['sales'])){ $partners[$email]['sales']++; } else { $partners[$email]['sales']=1; } } } if(substr($sys_eaddress, 0, 7)=="http://"){ $eaddress = "noreply@$sys_domain"; } else { $eaddress = $sys_eaddress; } $headers = "From: $sys_item_name<$eaddress>"; $subject = $_POST["subject"]; $body = stripslashes($_POST["body"]); $body .= "\n\n===\nTo stop receiving emails from $sys_item_name, click this link:\nhttp://$sys_domain" . $sys_install_folder . "?action=affoptout&email=%email%"; $refs = array(); foreach($partners as $partner){ if($partner['sales'] >= $_POST["minsales"]){ $refs[] = $partner; } } $totalmails=count($refs); echo <<< END $pageheader $pagefooter END; exit; break; // -------------------------------------------------------------------- case "emailall": # Show mailer form. echo <<< END $pageheader
     
    Broadcast Mail to
    $sys_item_name JV Partners
    Subject:
    Message:
    Send this mail to JV Partners who have made at least sales.
     
    Mailing Partners
      Sending $totalmails emails END; foreach($refs as $partner){ $firstname = $partner['firstname']; $lastname = $partner ['lastname']; $fullname = $partner['firstname']." ".$partner['lastname']; $email = $partner['email']; $afflink = "http://".$sys_domain.$sys_install_folder."?e=".$partner['nickname']; # replace tokens $a1=array('%firstname%','%lastname%','%fullname%','%email%','%afflink%','%itemname%','%otoname%'); $a2=array(_decode($firstname), _decode($lastname),_decode($fullname), _decode($email), _decode($afflink), _decode($sys_item_name), _decode($sys_oto_name)); $sendsubject=str_replace($a1, $a2, $subject); $sendbody=str_replace($a1, $a2, $body); # Send the mailer. @mail($email, $sendsubject, $sendbody, $headers); echo "
    1. $name - $email ..
    2. "; flush(); } echo <<< END
    Finished Sending Emails
    When writing an email to send to your resellers, you can personalize the email by inserting the following tokens. These tokens will be replaced with the appropriate values in each email sent:

    %firstname% - the Reseller's First Name
    %lastname% - the Reseller's Last Name
    %fullname% - the Reseller's Full Name
    %email% - the Reseller's Email Address
    %afflink% - the Reseller's Referal Link
    %itemname% - the name of your Front-End product
    %otoname% - the name of your OTO product
    $pagefooter END; exit; break; case "allbroadcast": echo <<< END $pageheader END; if( $_POST['emailallaff'] ) { // ----------------------------------------------------------------------- //email all resellers # Send a broadcast mail to all resellers # Read affiliates table to get list of resellers. $affiliates = array(); $sql="SELECT * FROM nicknames"; $ares=@mysql_query($sql); while($arec=@mysql_fetch_assoc($ares)) { $email=$arec['email']; $affiliates[$email] = $arec; $affiliates[$email]['sales']=0; } if(substr($sys_eaddress, 0, 7)=="http://"){ $eaddress = "noreply@$sys_domain"; } else { $eaddress = $sys_eaddress; } $headers = "From: $sys_item_name<$eaddress>"; $subject = $_POST["subject"]; $body = stripslashes($_POST["body"]); $body .= "\n\n===\nTo stop receiving emails from $sys_item_name, click this link:\nhttp://$sys_domain" . $sys_install_folder . "?action=affoptout&email=%email%"; $refs = array(); $refs = $affiliates; $totalmails=count($refs); echo <<< END END; // END EMAIL ALL AFFILIATES // ----------------------------------------------------------------------- } if( $_POST['emailallcustomers'] ) { // ----------------------------------------------------------------------- // EMAIL ALL CUSTOMERS // email all customers front end and oto # Send a broadcast mail to all customers # Read sales table to get list of customers. $customers = array(); $refs = array(); $frontcust = 1; $otocust = 1; # all customers $where="WHERE refunded != 1"; /* # select only front-end customers if(!$otocust) $where.=" AND item_number='".$sys_item_number."'"; # select only oto customers if(!$frontcust) $where.=" AND item_number='".$sys_oto_number."'"; */ $sql="select * from sales "; $sres=@mysql_query($sql); while($srec=@mysql_fetch_assoc($sres)) { $email=$srec['payer_email']; if(!isset($customers[$email])) { $sql="SELECT * from cust_optouts WHERE email = '".$email."'"; $ores=@mysql_query($sql); $orow=@mysql_fetch_assoc($ores); if($orow['email']!=$email) { $customers[$email] = $srec; } } } if(substr($sys_support, 0, 7)=="http://"){ $eaddress = "noreply@$sys_domain"; } else { $eaddress = $sys_support; } $headers = "From: $sys_item_name<$eaddress>"; $subject = $_POST["subject"]; $body = stripslashes($_POST["body"]); $body .= "\n\n===\nTo stop receiving emails from $sys_item_name, click this link:\nhttp://$sys_domain" . $sys_install_folder . "?action=optout&email=%email%"; $totalmails=count($customers); echo <<< END
     
    Broadcast Mail to
    ALL Resellers & All Customers
    Subject: -- All Affiliates - All Customers
    Message:
     
    Mailing Resellers
      Sending $totalmails emails END; foreach($refs as $affiliate){ $firstname = $affiliate['firstname']; $lastname = $affiliate ['lastname']; $fullname = $affiliate['firstname']." ".$affiliate['lastname']; $email = $affiliate['email']; $afflink = "http://".$sys_domain.$sys_install_folder."?e=".$affiliate['nickname']; # Replace tokens. $a1=array('%firstname%','%lastname%','%fullname%','%email%','%afflink%','%itemname%','%otoname%'); $a2=array(_decode($firstname), _decode($lastname),_decode($fullname), _decode($email), _decode($afflink), _decode($sys_item_name), _decode($sys_oto_name)); $sendsubject=str_replace($a1, $a2, $subject); $sendbody=str_replace($a1, $a2, $body); # Send the mailer. @mail($email, $sendsubject, $sendbody, $headers); echo "
    1. $fullname - $email ..
    2. "; flush(); } echo <<< END
    Finished Sending Emails
     
    Mailing All Customers
      Sending $totalmails emails END; foreach($customers as $cust){ $firstname = $cust['firstname']; $lastname = $cust ['lastname']; $fullname = $cust['firstname']." ".$cust['lastname']; $email = $cust['payer_email']; # Replace tokens. $a1=array('%firstname%','%lastname%','%fullname%','%email%','%itemname%','%otoname%'); $a2=array(_decode($firstname), _decode($lastname),_decode($fullname), _decode($email), _decode($sys_item_name), _decode($sys_oto_name)); $sendsubject=str_replace($a1, $a2, $subject); $sendbody=str_replace($a1, $a2, $body); # Send the mailer. @mail($email, $sendsubject, $sendbody, $headers); echo "
    1. $fullname - $email ..
    2. "; flush(); } echo <<< END
    Finished Sending Emails
    END; // END EMAIL ALL CUSTOMERS // ----------------------------------------------------------------------- } echo <<< END $pagefooter; END; exit; break; // ---------------------------------------------------------------- case "fraud": unset ($_SESSION['errmsg']); if(!isset($_SESSION['product']) || $_SESSION['product'] == 0){ $_SESSION['errmsg'] = "no product"; header("Location: $_SERVER[PHP_SELF]"); exit; } # Show all fraudulent transactions. $sql="SELECT * FROM fraud WHERE productID = ".$productID. " ORDER BY purchased DESC"; $fres=@mysql_query($sql); $rcount=@mysql_num_rows($fres); echo <<< END $pageheader   Fraud Report for
    $sys_item_name
    $rcount total fraudulent transactions. Fraudulent buyers do not receive the download. You can report fraudulent buyers to PayPal at 888-215-5506. END; $bgcolor = "#ffffff"; while($frec=@mysql_fetch_assoc($fres)) { $purchased = $frec['purchased']; $expires = $frec['expires']; $txn_id=$frec['txn_id']; $item_number=$frec['item_number']; $receiver_email=$frec['receiver_email']; $payer_email=$frec['payer_email']; $firstname=$frec['firstname']; $lastname=$frec['lastname']; $payment_amount=$frec['payment_amount']; echo <<< END END; if($bgcolor=="#ffffff"){ $bgcolor = "#eeeeee"; } else { $bgcolor = "#ffffff"; } } echo <<< END
    Transaction ID Item Number Payee Email Customer Email Customer Name Payment Date  
    $txn_id $item_number $receiver_email $payer_email $firstname $lastname $payment_amount $purchased approve
      $pagefooter END; exit; break; case "approve": # Add record into sales table, since it wasn't actually fraud. $txn_id = $_REQUEST["id"]; $sql="SELECT * FROM fraud WHERE txn_id ='".$txn_id."'"; $result=@mysql_query($sql); $frec=@mysql_fetch_assoc($result); $productID=$frec['productID']; $txn_id=$frec['txn_id']; $item_name=$frec['item_name']; $item_number=$frec['item_number']; $receiver_email=$frec['receiver_email']; $payer_email=$frec['payer_email']; $firstname=$frec['firstname']; $lastname=$frec['lastname']; $business=$frec['business']; $payment_amount=$frec['payment_amount']; $purchased = $frec['purchased']; $expires = date('Y-m-d H:i:s',(time() + (3600 * $sys_expire))); $referrer=$frec['referrer']; $affiliate=$frec['affiliate']; $ip_address=$frec['ip_address']; $country=$frec['country']; $state=$frec['state']; $zip=$frec['zip']; $salesletter=$frec['salesletter']; # Write info to IPN file # ______________________ $sql="INSERT INTO sales (productID,txn_id,item_name,item_number,receiver_email,payer_email,firstname,lastname,business,payment_amount,expires,purchased,referrer,affiliate,ip_address,country,state,zip,salesletter) VALUES('".$productID."','".$txn_id."','".$item_name."','".$item_number."','".$receiver_email."','".$payer_email."','".$firstname."','".$lastname."','".$business."',".$payment_amount.",'".$expires."','".$purchased."','".$referrer."','".$affiliate."','".$ip_address."','".$country."','".$state."','".$zip."','".$salesletter."')"; $result=@mysql_query($sql); if(substr($sys_support, 0, 7)=="http://"){ $eaddress = "noreply@$sys_domain"; $support = "For support, visit our web site at:\n\n$sys_support"; } else { $eaddress = $sys_support; $support = "If you have any questions or support needs you may simply reply to this email."; } $subject = "Your download link."; $body = "$firstname,\n\nThank you for your purchase.\nTo download your copy of $item_name, click here:\n\nhttp://$sys_domain" . $sys_install_folder . "?action=download&id=$txn_id\n\nYou have $sys_expire hours to download before the link expires.\nWe appreciate your business.\n$support\n\nThanks again.\n"; # Send download notification to purchaser. @mail($payer_email, $subject, $body, "From: $sys_item_name <$eaddress>\r\nReply-To: $eaddress\r\nX-Mailer: PHP" . phpversion()); echo <<< END $pageheader

    The customer has been emailed their download link.

    END; exit; break; case "import": # Import sales records, etc. from 7DS if(!isset($_SESSION['product']) || $_SESSION['product'] == 0){ $_SESSION['errmsg'] = "no product"; header("Location: $_SERVER[PHP_SELF]"); exit; } if (isset($_POST["import"])) { if(!isset($_POST['import_folder'])) { $_SESSION['errmsg'] = "Folder Location is Required"; header("Location: $_SERVER[PHP_SELF]?action=import"); exit; } $import_folder = trim($_POST['import_folder'],"/"); $import_folder = "../" . $import_folder . "/"; $ipnFilename = "ipn.txt"; $ipnFile = $import_folder . $ipnFilename; $fraudFilename = "fraud.txt"; $fraudFile = $import_folder . $fraudFilename; $unsubsFilename = "unsubs.txt"; $unsubsFile = $import_folder . $unsubsFilename; $tafFilename = "tellafriend.txt"; $tafFile = $import_folder . $tafFilename; // Make sure we can read the ipn file if (!is_readable($ipnFile)) { $_SESSION['errmsg'] = "$7 Script Sales File ($ipnFile) Not Found"; header("Location: $_SERVER[PHP_SELF]?action=import"); exit; } $sales = @file($ipnFile); foreach($sales as $sale){ $sale = explode("|", str_replace(array("\r", "\n"), "", $sale)); $expires = date('Y-m-d H:i:s',$sale[9]); $purchased = date('Y-m-d H:i:s',$sale[11]); $sql="INSERT INTO sales (productID,txn_id,item_name,item_number,receiver_email,payer_email,firstname,lastname,business,payment_amount,expires,purchased,referrer,affiliate,ip_address,country,state,zip,salesletter) VALUES('".$productID."','".$sale[0]."','".$sale[1]."','".$sale[2]."','".$sale[3]."','".$sale[4]."','".$sale[5]."','".$sale[6]."','".$sale[7]."',".$sale[8].",'".$expires."','".$purchased."','".$sale[12]."','".$sale[13]."','".$sale[14]."','".$sale[15]."','".$sale[16]."','".$sale[17]."','".$sale[18]."')"; $result=@mysql_query($sql); } if (is_readable($fraudFile)) { $frauds = @file($fraudFile); foreach($frauds as $fraud){ $fraud = explode("|", str_replace(array("\r", "\n"), "", $fraud)); $expires = date('Y-m-d H:i:s',$fraud[9]); $purchased = date('Y-m-d H:i:s',$fraud[11]); $sql="INSERT INTO fraud (productID,txn_id,item_name,item_number,receiver_email,payer_email,firstname,lastname,business,payment_amount,expires,purchased,referrer,affiliate,ip_address,country,state,zip,salesletter) VALUES('".$productID."','".$fraud[0]."','".$fraud[1]."','".$fraud[2]."','".$fraud[3]."','".$fraud[4]."','".$fraud[5]."','".$fraud[6]."','".$fraud[7]."',".$fraud[8].",'".$expires."','".$purchased."','".$fraud[12]."','".$fraud[13]."','".$fraud[14]."','".$fraud[15]."','".$fraud[16]."','".$fraud[17]."','".$fraud[18]."')"; $result=@mysql_query($sql); } } if (is_readable($unsubsFile)) { $unsubs = @file($unsubsFile); foreach($unsubs as $unsub){ $unsub = str_replace(array("\r", "\n"), "", $unsub); $sql="INSERT INTO aff_optouts (email) VALUES('".$unsub."')"; $result=@mysql_query($sql); } } $tafcount = @file_get_contents($tafFile); if($tafcount){ $sql="UPDATE products SET taf_count=".$tafcount." WHERE id=".$productID; $result=@mysql_query($sql); } $_SESSION['errmsg'] = $sys_item_name." Data Imported from $7 Script"; } echo <<< END $pageheader   Import $sys_item_name Data from
    7 Dollar Scripts
    END; if(isset($_SESSION['errmsg'])){ $message=$_SESSION['errmsg']; echo "$message"; unset ($_SESSION['errmsg']); } echo <<< END  
    END; # Get product $sql="select id,item_name from products WHERE productID =".$productID; $pres=@mysql_query($sql); $prow=@mysql_fetch_array($pres); echo <<< END Input Folder Name Where $7 Scripts Files are Located:

     
    $pagefooter END; exit; break; case "export": # Export sales records unset ($_SESSION['errmsg']); if(!isset($_SESSION['product']) || $_SESSION['product'] == 0){ $_SESSION['errmsg'] = "no product"; header("Location: $_SERVER[PHP_SELF]"); exit; } $first = true; header("Content-Type: application/octet-stream"); header("Content-Disposition: attachment; filename=export.csv"); header("Content-Transfer-Encoding: binary"); $sql="SELECT * FROM sales WHERE productID ='".$productID."'"; $result=@mysql_query($sql); while($sales = @mysql_fetch_array($result)){ if($first){ # Output headers. echo '"Transaction ID","Refunded","Item Name","Item Number","Reseller Email","Customer Email","First Name","Last Name","Company","Payment","Bought","Expires","Referrer","Reseller","IP","Country","State","Zipcode","Salesletter"' . "\r\n"; $first = false; } $productID=$sales['productID']; $txn_id=$sales['txn_id']; $refunded=$sales['refunded']; $item_name=$sales['item_name']; $item_number=$sales['item_number']; $receiver_email=$sales['receiver_email']; $payer_email=$sales['payer_email']; $firstname=$sales['firstname']; $lastname=$sales['lastname']; $business=$sales['business']; $payment_amount=$sales['payment_amount']; $purchased = $sales['purchased']; $expires = $sales['expires']; $referrer=$sales['referrer']; $affiliate=$sales['affiliate']; $ip_address=$sales['ip_address']; $country=$sales['country']; $state=$sales['state']; $zip=$sales['zip']; $salesletter=$sales['salesletter']; echo "\"$txn_id\",\"$refunded\",\"$item_name\",\"$item_number\",\"$receiver_email\",\"$payer_email\",\"$firstname\",\"$lastname\",\"$business\",\"$payment_amount\",\"$purchased\",\"$expires\",\"$referrer\",\"$affiliate\",\"$ip_address\",\"$country\",\"$state\",\"$zip\",\"$salesletter\"\r\n"; } exit; break; case "search": # Show sales search form. echo <<< END $pageheader $pagefooter END; exit; break; case "srchrslt": echo <<< END $pageheader
     
     
    Find Sales Records Where
    $pagefooter END; exit; break; case "slsltrs": unset ($_SESSION['errmsg']); if(!isset($_SESSION['product']) || $_SESSION['product'] == 0){ $_SESSION['errmsg'] = "no product"; header("Location: $_SERVER[PHP_SELF]"); exit; } if(isset($_POST['add'])){ $template = trim($_POST['template']); if($template==" " || $template=="") { $_SESSION['errmsg'] = "Sales Letter Empty"; } else { $sql="INSERT INTO salesletters (productID,template) VALUES ('".$productID."','".$template."')"; $result=@mysql_query($sql); } } if(isset($_GET['disable'])) { $template=$_GET['template']; $sql="UPDATE salesletters SET disabled=1 WHERE productID=".$productID." AND template='".$template."'"; $sres=@mysql_query($sql); } if(isset($_GET['enable'])) { $template=$_GET['template']; $sql="UPDATE salesletters SET disabled=0 WHERE productID=".$productID." AND template='".$template."'"; $sres=@mysql_query($sql); } echo <<< END $pageheader
     
    Matching Records:

    Click on the 'Expires' date of a sale to re-validate the customer's download link for another $sys_expire hours.

    END; $matches = 0; $field = strtolower($_POST['field']); switch ($srchtype){ case 1: $comparetype = "="; $query = strtolower($_POST['query']); break; default: $comparetype = " LIKE "; $query = "%".strtolower($_POST['query'])."%"; $break; } $sql="SELECT * FROM sales WHERE ".$field.$comparetype."'".$query."'"; $slsrslt=@mysql_query($sql); while($slsrec=@mysql_fetch_assoc($slsrslt)) { $matches++; $txn_id = $slsrec['txn_id']; $refunded = $slsrec['refunded']; $item_number = $slsrec['item_number']; $receiver_email = $slsrec['receiver_email']; $payer_email = $slsrec['payer_email']; $custname = $slsrec['firstname']." ".$slsrec['lastname']; $business = $slsrec['business']; $payment_amount = $slsrec['payment_amount']; $purchased = $slsrec['purchased']; $expires = $slsrec['expires']; $sql="SELECT * FROM products WHERE id=".$slsrec['productID']; $prow=@mysql_query($sql); $prec=@mysql_fetch_assoc($prow); $pfolder=$prec['install_folder']; echo <<< END END; } echo <<< END
    Transaction ID Item Number Payee Customer Email Customer Name/Business Payment Bought Expires
    END; if($refunded) { echo $txn_id; } else { echo "$txn_id"; } echo <<< END $item_number $receiver_email $payer_email $custname
    $business
    $payment_amount $purchased END; if($refunded) { echo $expires; } else { echo "$expires"; } echo <<< END

    $matches matching record(s) found.

    $pagefooter END; exit; break; case "bans": if(isset($_POST['add'])){ $email = strtolower($_POST['email']); $sql="INSERT INTO banned (email) VALUES ('".$email."')"; $result=@mysql_query($sql); } echo <<< END $pageheader
     
    Ban Resellers & Partners
    END; $bgcolor = "white"; $sql="SELECT * FROM banned ORDER BY email"; $result=@mysql_query($sql); while($record=@mysql_fetch_assoc($result)) { $email = $record['email']; echo <<< END END; if($bgcolor=="white"){ $bgcolor = "#ccffcc"; } else { $bgcolor = "white"; } } echo <<< END
    Banned Emails
    $email
     
     
    $pagefooter END; exit; break; case "coupons": unset ($_SESSION['errmsg']); if(!isset($_SESSION['product']) || $_SESSION['product'] == 0){ $_SESSION['errmsg'] = "no product"; header("Location: $_SERVER[PHP_SELF]"); exit; } if(isset($_POST['add'])){ $code = urlencode($_POST['code']); $price = $_POST['price']; $expires = date('Y-m-d H:i:s:',strtotime(trim($_POST['expiredate']))); if($code==" " || $code=="") { $_SESSION['errmsg'] = "Coupon Code Empty"; } elseif($price == " " || $price == "") { $_SESSION['errmsg'] = "Price Empty"; } else { $sql="INSERT INTO coupons (productID,code,price,expires) VALUES ('".$productID."','".$code."','".$price."','".$expires."')"; $result=@mysql_query($sql); } } echo <<< END $pageheader
    END; if(isset($_SESSION['errmsg'])){ echo "".$_SESSION['errmsg'].""; unset ($_SESSION['errmsg']); } echo <<< END
    Sales Letters for
    $sys_item_name
    END; $bgcolor = "white"; $sql="SELECT * FROM salesletters WHERE productID='".$productID."' ORDER BY template"; $result=@mysql_query($sql); while($srec=@mysql_fetch_assoc($result)) { $template = $srec['template']; $visits = $srec['hits']; $disabled=$srec['disabled']; $count=0; $sql="SELECT id FROM sales WHERE productID='".$productID."' AND salesletter = '".$template."' AND item_number = '".$sys_item_number."'"; $slsrslt=@mysql_query($sql); while($slsrec=@mysql_fetch_assoc($slsrslt)) { $count++; } echo <<< END "; if($bgcolor=="white"){ $bgcolor = "#ccffcc"; } else { $bgcolor = "white"; } } echo <<< END
    Sales letter Visitors # Sales Disable? Delete?
    $template $visits $count END; if($disabled){ echo "enable"; }else{ echo "disable"; } echo " "; if($count==0){ ?> Delete Sales Letter
     
    END; if(isset($_SESSION['errmsg'])){ echo "".$_SESSION['errmsg'].""; echo "
    ".$_POST['expiredate']; unset ($_SESSION['errmsg']); } echo <<< END
    END; ?>
    Discount Coupons for
    $sys_item_name
    Coupon Code Price Expires
    "> Pick a date
    $pagefooter END; exit; break; case "prodlist": unset ($_SESSION['errmsg']); echo <<< END $pageheader
    Coupon Code Price Expires Delete?
    Delete Discount Coupon
     
     
    $pagefooter END; exit; break; case "conversion": unset ($_SESSION['errmsg']); if(!isset($_SESSION['product']) || $_SESSION['product'] == 0){ $_SESSION['errmsg'] = "no product"; header("Location: $_SERVER[PHP_SELF]"); exit; } # Show conversion report. echo <<< END $pageheader $pagefooter END; exit; break; case "moreaddons": echo <<< END $pageheader
    END; if(isset($_SESSION['errmsg'])){ echo "".$_SESSION['errmsg'].""; unset ($_SESSION['errmsg']); } echo <<< END
    Product List for
    $sys_domain
    END; $bgcolor = "#ffffff"; $sql="SELECT * FROM products ORDER BY item_name"; $result=@mysql_query($sql); while($prec=@mysql_fetch_assoc($result)) { $product = $prec['item_name']; $id = $prec['id']; $folder=$prec['install_folder']; $count=0; $sql="SELECT id FROM sales WHERE productID='".$id."'"; $slsrslt=@mysql_query($sql); while($slsrec=@mysql_fetch_assoc($slsrslt)) { $count++; } echo <<< END "; if($bgcolor=="#ffffff"){ $bgcolor = "#eeeeee"; } else { $bgcolor = "#ffffff"; } } echo <<< END
    Item Name Install Folder # Sales Delete?
    $product $folder $count END; if($count==0){ ?> Delete Product
     
     
    Conversion Report for
    $sys_item_name
    END; $bgcolor = "white"; $sql="SELECT * FROM salesletters WHERE productID='".$productID."' ORDER BY template"; $result=@mysql_query($sql); while($srec=@mysql_fetch_assoc($result)) { $template = $srec['template']; $visits = $srec['hits']; $count=0; $sql="SELECT id FROM sales WHERE productID='".$productID."' AND salesletter = '".$template."' AND item_number = '".$sys_item_number."'"; $slsrslt=@mysql_query($sql); while($slsrec=@mysql_fetch_assoc($slsrslt)) { $count++; } if($visits>0){ $conversion = round(($count/$visits)*100, 2); } else { $conversion = "-"; } echo <<< END END; $count=0; if($bgcolor=="white"){ $bgcolor = "#ccffcc"; } else { $bgcolor = "white"; } } echo <<< END
    Sales Letter Sales Visits conversion rate
    $template $count $visits $conversion%
     
    END; if(isset($_SESSION['errmsg'])){ if($_SESSION['errmsg'] == 'no product') echo "Select a Product First"; if($_SESSION['errmsg'] == 'product selected') echo "Un-Select the Product First"; unset ($_SESSION['errmsg']); } echo <<< END
    END; //@include ("http://rapidactionprofits.com/AddOns.php"); $addon_contents=getremotecontents("http://rapidactionprofits.com/AddOns.php"); echo $addon_contents; echo <<
    $pagefooter END; exit; break; default: if(isset ($_POST['product'])) $_SESSION['product']=$_POST['product']; echo <<< END $pageheader
    END; if(isset($_SESSION['errmsg'])){ if($_SESSION['errmsg'] == 'no product') echo "Select a Product First"; if($_SESSION['errmsg'] == 'product selected') echo "Un-Select the Product First"; unset ($_SESSION['errmsg']); } echo <<< END
    END; //@include ("http://rapidactionprofits.com/dashboard.php"); $dash_contents=getremotecontents("http://rapidactionprofits.com/dashboard.php"); echo $dash_contents; echo <<
    $pagefooter END; exit; break; } ?>