示例#1
0
                                 $db->Query("DELETE FROM ad_exits WHERE id='{$id_ad}' AND affid='{$affid}' LIMIT 1");
                             }
                         }
                     }
                 }
             }
         }
         $db->Query("DELETE FROM ad_purchased WHERE id='{$id}' AND affid='{$affid}' LIMIT 1");
         echo "affid={$affid} deleted purchased ad id={$id} type={$type}\n";
     }
 }
 // delete unverified signups after 3 days
 $db->Query("SELECT affid, username, pass, fname, lname, email, datesignedup FROM users WHERE verified='0'");
 $result = $db->result;
 while (list($affid, $username, $pass, $fname, $lname, $email, $datesignedup) = mysqli_fetch_row($result)) {
     $num_days = DateDiff(mysql_datetime_to_timestamp($datesignedup), time(), 'd');
     $num_days = round($num_days);
     if ($num_days > 3) {
         $db->Query("DELETE FROM users WHERE affid='{$affid}' LIMIT 1");
     } else {
         $hash = substr(md5(strrev(sha1($affid))), 0, 5);
         $val_url = "http://freeadplanet.com/?c=validatesignup&affid={$affid}&h={$hash}";
         @mail($email, 'Free AD Planet - Validate Account Notice', "Hello {$fname} {$lname},\n\nVisit the URL below to Validate your Account.\n\n{$val_url}\n\nUsername: {$username}\nPassword: {$pass}\n\nRegards,\nhttp://freeadplanet.com Staff", $headers);
         //@mail('*****@*****.**', 'Free AD Planet - Validate Account Notice', "Hello $fname $lname,\n\nVisit the URL below to Validate your Account.\n\n$val_url\n\nUsername: $username\nPassword: $pass\n\nRegards,\nhttp://freeadplanet.com Staff", $headers);
     }
 }
 // calculate new Quota Week
 if ($dayOfWeek == 'Mon') {
     echo "\n** dayOfWeek={$dayOfWeek} which is new quota week\n";
     $db->Query("SELECT affid, status, weekadcount, weekadmissed FROM users WHERE verified != '0' ORDER BY affid");
     $result = $db->result;
示例#2
0
     @mail('*****@*****.**', 'WARNING: List payment over due: ' . $today, $late_bill_message, $headers);
 }
 /////////////////////////////////////////
 // handle billing for safelist members //
 /////////////////////////////////////////
 $db->SelectDB('mle');
 // loop each list check for do billing check
 $db->Query("SELECT paylinkparams, listownerID, listname FROM listmanager WHERE created='1'");
 $lists = $db->result;
 while (list($params, $id, $list) = mysqli_fetch_row($lists)) {
     $parts = explode('|', $params);
     if ($parts[10]) {
         $db->Query("SELECT userID, datelastbilled FROM users WHERE verified='yes' AND status != 'mem' AND memberpaid='1' AND listname='{$list}' AND listownerID='{$id}'");
         $users = $db->result;
         while (list($uID, $datelastbilled) = mysqli_fetch_row($users)) {
             $months = DateDiff(mysql_datetime_to_timestamp($datelastbilled), time(), 'm');
             switch ($parts[11]) {
                 case 0:
                     if ($months > 0) {
                         $db->Query("UPDATE users SET memberpaid='0', datelastbilled=NOW() WHERE userID='{$uID}' LIMIT 1");
                         $maildata .= "list: {$list} User: {$uID} paid reset to 0 - monthly\n";
                     }
                     break;
                 case 1:
                     if ($months > 1) {
                         $db->Query("UPDATE users SET memberpaid='0', datelastbilled=NOW() WHERE userID='{$uID}' LIMIT 1");
                         $maildata .= "list: {$list} User: {$uID} paid reset to 0 - bi monthly\n";
                     }
                     break;
                 case 2:
                     if ($months > 2) {
示例#3
0
 function send_signup_mail($list, $id, $resending, $pass1, $email, $username, $uID, $fname, $lname, $email1, $status = "", $where = "not set", $refer = "")
 {
     global $db, $email_wordwrap_length, $defaultstatus;
     $db->Query("SELECT fromname, adminemail, paylinkparams FROM listmanager WHERE listname='{$list}' AND listownerID='{$id}'");
     list($fromname, $adminemail, $paylinkparams) = $db->FetchRow();
     // extract check billing
     $parts = explode('|', $paylinkparams);
     $checkbilling = $parts[10];
     $db->Query("SELECT listhash FROM listurls WHERE listname='{$list}' AND listownerID='{$id}' LIMIT 1");
     list($listhash) = $db->FetchRow();
     $emailenc = urlencode($email);
     $validator = substr(sha1($uID . $email), 0, 5);
     $subscribelink = "http://planetxmail.com/mle/au.php?u={$uID}&e={$emailenc}&v={$validator}";
     $subject = !$resending ? "{$list} - New user Confirmation Notice" : "{$list} - Resending New user Confirmation Notice";
     $db->Query("SELECT subconfirm FROM listmanager WHERE listname='{$list}' AND listownerID='{$id}' LIMIT 1");
     list($message) = $db->FetchRow();
     $message = wordwrap($message, $email_wordwrap_length);
     $validator = strrev(substr(md5($uID), 0, 5));
     $usr = strrev($uID);
     $unsublink = "http://planetxmail.com/mle/rl.php?u={$usr}&v={$validator}";
     if (!$status) {
         $status = $defaultstatus;
     }
     if ($status == 'pro') {
         $readablestatus = 'a Professional';
     } else {
         if ($status == 'exe') {
             $readablestatus = 'an Executive';
         }
     }
     $validator_paylinks = strrev(substr(sha1(md5($uID)), 0, 5));
     // if check billing and member is pro or exec then replace subscribe link with a paylink
     if ($checkbilling and $status != 'mem') {
         $subscribelink = "Use the Link below to pay the subscribe fee since this is a {$readablestatus} account. This will also verify your email address:\nhttp://planetxmail.com/mle/signuppaylinks.php?u={$usr}&v={$validator_paylinks}";
     }
     $message = str_replace(array('[subscribe_link]', '[unsubscribe_link]', '[list_name]', '[program_name]', '[admin_email_address]', '[user_name]', '[first_name]', '[last_name]', '[password]'), array($subscribelink, $unsublink, $list, $program_name, $adminemail, $username, $fname, $lname, $pass1), $message);
     $message = stripslashes($message);
     //mail('*****@*****.**', $subject.$email, $message);
     @mail($email, $subject, $message, "From: {$fromname} <*****@*****.**>");
     if (!$resending) {
         // get when list was last cleaned and apply to new user
         $db->Query("SELECT lastcleaned FROM system WHERE listname='{$list}' AND listownerID='{$id}' LIMIT 1");
         list($lastcleaned) = $db->FetchRow();
         $lastcleaned = timestamp_to_mysql_timestamp(mysql_datetime_to_timestamp($lastcleaned));
         $db->Query("SELECT freestartcredits, prostartcredits, exestartcredits, freeearnedcredits, proearnedcredits, exeearnedcredits FROM listconfig WHERE listname='{$list}' AND listownerID='{$id}' LIMIT 1");
         list($freestartcredits, $prostartcredits, $exestartcredits, $freeearnedcredits, $proearnedcredits, $exeearnedcredits) = $db->FetchRow();
         /*
         // award creds to referal if any
         $parts  = explode("|", $refer);
             	$ref_userID = strrev(trim($parts[0]));
             	$ref_listhash = trim($parts[1]);
             	exit("ref_userID=$ref_userID ref_listhash=$ref_listhash refer=$refer");
             	if ($db->Query("SELECT status FROM users WHERE userID='$ref_userID'"))
             	{
             	  list($ref_status) = $db->FetchRow();
             	  if ($ref_status == 'mem')      $earned_credits = $freeearnedcredits;
           else if ($ref_status == 'pro') $earned_credits = $proearnedcredits;
           else if ($ref_status == 'exe') $earned_credits = $exeearnedcredits;
         
           if (is_numeric($earned_credits) && $earned_credits > 0)
             $db->Query("UPDATE users SET credits=credits+$earned_credits WHERE userID='$ref_userID'");
             	}
         */
         // get starting credits
         if ($status == 'mem') {
             $startcredits = $freestartcredits;
         } else {
             if ($status == 'pro') {
                 $startcredits = $prostartcredits;
             } else {
                 if ($status == 'exe') {
                     $startcredits = $exestartcredits;
                 }
             }
         }
         if (!is_numeric($startcredits) or $startcredits < 1) {
             $startcredits = 0;
         }
         $db->Query("INSERT INTO users\n             (userID, fname,  lname,    email,    status,   username,  password,    datesignedup,listname,lastloggedin,lastmailweek,listownerID,referer,datelastbilled,credits)\n      VALUES ('{$uID}','{$fname}','{$lname}','{$email1}','{$status}','{$username}',MD5('{$pass1}'),NOW(),     '{$list}',  NOW(),      {$lastcleaned},'{$id}',      '{$refer}',NOW(),'{$startcredits}')");
     }
     header("Location: emailsentmessage.php?email={$email}&list={$list}&id={$id}");
     exit;
 }
示例#4
0
        // skip owners that have more than 1 list, for now
        $db->SelectDB("pxm");
        if ($db->Query("SELECT listname FROM extended WHERE listownername='{$listownername}'")) {
            continue;
        }
        // get listownerID
        $db->SelectDB("mle");
        if ($db->Query("SELECT listownerID FROM listowner WHERE username='******'")) {
            list($listownerID) = $db->FetchRow();
        } else {
            $notValid .= "<br />\nlistownerID not found for listowner={$listownername}";
            continue;
        }
        $db->Query("SELECT COUNT(*) FROM users WHERE verified='yes' AND listname='{$listname}' AND listownerID='{$listownerID}'");
        list($totalmem) = $db->FetchRow();
        $days_bill_late = intval(DateDiff(mysql_datetime_to_timestamp($datesubmitted), time(), "d"));
        if (1 == 1) {
            $ids[] = $id;
            $listnames[] = $listname;
            $listownerIDs[] = $listownerID;
            $listownernames[] = $listownername;
            $dayslate[] = $days_bill_late;
            $totalmembers[] = $totalmem;
        }
    }
} else {
    exit("No lists found to be convertable.");
}
?>

<html>