示例#1
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;
 }
示例#2
0
#!/usr/bin/php -q
<?php 
require_once '/home/nulled/www/freeadplanet.com/secure/classes.inc';
require_once '/home/nulled/www/freeadplanet.com/secure/functions.inc';
require_once '/home/nulled/www/planetxmail.com/mle/mlpsecure/validationfunctions.php';
require_once '/home/nulled/www/planetxmail.com/mle/mlpsecure/datefunctions.inc';
$dayOfWeek = date('D');
$day = date('d');
$onehour = 3600;
$oneday = $onehour * 24;
$dayNum = $numericDays[$dayOfWeek];
$midnight = mktime(0, 0, -1, date('m'), date('d'), date('y'));
$midnight = timestamp_to_mysql_timestamp($midnight);
$headers = 'From: Free AD Planet <*****@*****.**>';
$subject = 'Free AD Planet - Renewal Notice';
$message = 'Hello [fname] [lname],

Your Free AD Planet subscription is due.

Simply login and goto Profile to renew your Pro account.

Username: [username]
Password: **********

http://freeadplanet.com/?c=memberlogin

Note: We use our own subscription system, seperate from that
of any merchant account you paid with. This means nothing is
auto-billed to credit cards because, you must click through
our paylink process.
示例#3
0
    $mo = strval(substr($dt, 4, 2));
    $da = strval(substr($dt, 6, 2));
    $hr = strval(substr($dt, 8, 2));
    $mi = strval(substr($dt, 10, 2));
    $se = strval(substr($dt, 12, 2));
    return date("Y-m-d H:i:s", mktime($hr, $mi, $se, $mo, $da, $yr));
}
$day = date('d');
$onehour = 3600;
$oneday = 86400;
$midnight = mktime(0, 0, -1, date('m'), date('d'), date('y'));
$midnight = timestamp_to_mysql_timestamp($midnight);
$db = new MySQL_Access('pxm');
if ($db->Query("SELECT lastmailed FROM system WHERE lastmailed < DATE_SUB(NOW(), INTERVAL 1 DAY)")) {
    $db->Query("UPDATE system SET lastmailed='{$midnight}' LIMIT 1");
    $currentdate = mysql_timestamp_to_humandatetime1(timestamp_to_mysql_timestamp(time()));
    list($cyear, $cmonth, $cday, $ctime) = preg_split('/[- ]/', $currentdate);
    $today = getdate();
    $senddate = $today['month'] . '/' . $today['mday'] . '/' . $today['year'] . ' ' . $today['hours'] . ':' . $today['minutes'] . ' - ' . $today['weekday'];
    // reset all to paid=no
    $db->Query("SELECT datesubmitted, id FROM orders WHERE verified='yes' AND paid != 'no' AND listname != 'bulklist' AND listownername != 'PlanetXMail'");
    $orders = $db->result;
    while (list($datelastbilled, $oid) = mysqli_fetch_row($orders)) {
        $months = DateDiff(mysql_datetime_to_timestamp($datelastbilled), time(), 'm');
        if ($months > 0) {
            $db->Query("UPDATE orders SET paid='no' WHERE id='{$oid}'");
        }
    }
    // Extended - reset all to paid=no
    $db->Query("SELECT datesubmitted, id FROM extended WHERE verified='yes' AND paid != '0' AND listname != 'bulklist' AND listownername != 'PlanetXMail'");
    $orders = $db->result;