]> git.mxchange.org Git - mailer.git/commitdiff
Surfbar extended
authorRoland Häder <roland@mxchange.org>
Fri, 26 Sep 2008 01:44:01 +0000 (01:44 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 26 Sep 2008 01:44:01 +0000 (01:44 +0000)
- Notification of users with low amount added
- Low-amount mails are sent in configurable intervals
- Automatically stopped URLs are notified to their respective bookers
- Some fixes

.gitattributes
inc/databases.php
inc/extensions/ext-surfbar.php
inc/language/surfbar_de.php
inc/libs/surfbar_functions.php
templates/de/emails/admin/admin_surfbar_url_depleted.tpl [new file with mode: 0644]
templates/de/emails/member/member_surfbar_low_points.tpl [new file with mode: 0644]
templates/de/emails/member/member_surfbar_url_depleted.tpl [new file with mode: 0644]

index d6bb1a1938f6d13fa3b15d664eabb57aa8d889d8..8782e9ada8cd750b39599a60f98b25137beffc92 100644 (file)
@@ -626,6 +626,7 @@ templates/de/emails/admin/admin_support-ordr.tpl -text
 templates/de/emails/admin/admin_support-reflink.tpl -text
 templates/de/emails/admin/admin_support-unconfirmed.tpl -text
 templates/de/emails/admin/admin_surfbar_url_confirmed.tpl -text
+templates/de/emails/admin/admin_surfbar_url_depleted.tpl -text
 templates/de/emails/admin/admin_surfbar_url_migrate.tpl -text
 templates/de/emails/admin/admin_surfbar_url_pending.tpl -text
 templates/de/emails/admin/admin_surfbar_url_reg.tpl -text
@@ -696,7 +697,9 @@ templates/de/emails/member/member_support-order.tpl -text
 templates/de/emails/member/member_support-ordr.tpl -text
 templates/de/emails/member/member_support-reflink.tpl -text
 templates/de/emails/member/member_support-unconfirmed.tpl -text
+templates/de/emails/member/member_surfbar_low_points.tpl -text
 templates/de/emails/member/member_surfbar_url_confirmed.tpl -text
+templates/de/emails/member/member_surfbar_url_depleted.tpl -text
 templates/de/emails/member/member_surfbar_url_migrate.tpl -text
 templates/de/emails/member/member_surfbar_url_pending.tpl -text
 templates/de/emails/member/member_surfbar_url_reg.tpl -text
index 2972c2299563d5829fa8b4000260edca84b6df92..790f3a75089757f713c1d4a75f74d2fc5bbc4c15 100644 (file)
@@ -113,7 +113,7 @@ define('USAGE_BASE', "usage");
 define('SERVER_URL', "http://www.mxchange.org");
 
 // This current patch level
-define('CURR_SVN_REVISION', "392");
+define('CURR_SVN_REVISION', "393");
 
 // Take a prime number which is long (if you know a longer one please try it out!)
 define('_PRIME', 591623);
index 91a96b47ec34edadcdaea7726703cb281cfd1b2d..14f942796d0d769f0bb12dbf9907533b0b5f137d 100644 (file)
@@ -60,13 +60,14 @@ case "register": // Do stuff when installtion is running (modules.php?module=adm
 `views_total` BIGINT(20) UNSIGNED  NOT NULL DEFAULT '0',
 `views_max` BIGINT(20) UNSIGNED  NOT NULL DEFAULT '0',
 `views_allowed` BIGINT(20) UNSIGNED  NOT NULL DEFAULT '0',
-`status` ENUM('PENDING','ACTIVE','LOCKED','STOPPED','REJECTED','DELETED','MIGRATED') NOT NULL DEFAULT 'PENDING',
+`status` ENUM('PENDING','ACTIVE','LOCKED','STOPPED','REJECTED','DELETED','MIGRATED','DEPLETED') NOT NULL DEFAULT 'PENDING',
 `registered` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
 `last_locked` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
 `lock_reason` VARCHAR(255) NOT NULL DEFAULT '',
 `reject_reason` VARCHAR(255) NOT NULL DEFAULT '',
 PRIMARY KEY(`id`),
 UNIQUE KEY `userid_url` (`userid`,`url`),
+INDEX `status_userid` (`status`,`userid`),
 INDEX (`payment_id`)
 ) TYPE=MyISAM COMMENT='Surfbar URLs'";
 
@@ -110,9 +111,9 @@ INDEX (`userid`,`url_id`)
        $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_actions`";
        $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_surfbar_actions` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
-`status` ENUM('PENDING','ACTIVE','LOCKED','STOPPED','REJECTED','DELETED','MIGRATED') NOT NULL DEFAULT 'PENDING',
+`status` ENUM('PENDING','ACTIVE','LOCKED','STOPPED','REJECTED','DELETED','MIGRATED','DEPLETED') NOT NULL DEFAULT 'PENDING',
 `action` ENUM('EDIT','DELETE','PAUSE','UNPAUSE','FRAMETEST','RETREAT','RESUBMIT','BOOKNOW') NULL DEFAULT NULL,
-`new_status` ENUM('PENDING','ACTIVE','LOCKED','STOPPED','REJECTED','DELETED','MIGRATED') NULL DEFAULT NULL,
+`new_status` ENUM('PENDING','ACTIVE','LOCKED','STOPPED','REJECTED','DELETED','MIGRATED','DEPLETED') NULL DEFAULT NULL,
 PRIMARY KEY (`id`),
 INDEX (`status`)
 ) TYPE=MyISAM COMMENT='Surfbar Member Actions'";
@@ -130,6 +131,8 @@ INDEX (`status`)
        $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES('STOPPED','EDIT','PENDING')";
        $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES('STOPPED','DELETE','DELETED')";
        $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES('STOPPED','UNPAUSE','PENDING')";
+       $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES('DEPLETED','EDIT','PENDING')";
+       $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES('DEPLETED','DELETE','DELETED')";
        $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES('REJECTED','EDIT','PENDING')";
        $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES('REJECTED','DELETE','DELETED')";
        $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES('REJECTED','FRAMETEST',NULL)";
index c9a6b65beb11fd8fa145f6584911e5578e6348cb..680bbe590819e0d5fa9c272defc0682dfe5385ee 100644 (file)
@@ -131,6 +131,7 @@ define('ADMIN_SURFBAR_NOTIFY_URL_ACTIVE_SUBJECT', "[Surfbar:] Freigabe einer URL
 define('ADMIN_SURFBAR_NOTIFY_URL_DELETED_SUBJECT', "[Surfbar:] URL gel&ouml;scht");
 define('ADMIN_SURFBAR_NOTIFY_URL_REJECTED_SUBJECT', "[Surfbar:] URL abgelehnt");
 define('ADMIN_SURFBAR_NOTIFY_URL_PENDING_SUBJECT', "[Surfbar:] URL-Buchung zugestimmt");
+define('ADMIN_SURFBAR_NOTIFY_URL_DEPLETED_SUBJECT', "[Surfbar:] URL automatisch angehalten");
 define('ADMIN_SURFBAR_NOTIFY_DEFAULT_SUBJECT', "Problem in Surfbar-Betreff");
 
 // Auto-generated admin subject lines
@@ -147,7 +148,9 @@ define('MEMBER_SURFBAR_NOTIFY_URL_ACTIVE_SUBJECT', "Ihre URL wurde f&uuml;r die
 define('MEMBER_SURFBAR_NOTIFY_URL_DELETED_SUBJECT', "L&ouml;schung Ihrer URL aus der Surfbar");
 define('MEMBER_SURFBAR_NOTIFY_URL_REJECTED_SUBJECT', "Ihre URL wurde f&uuml;r die Surfbar abgelehnt!");
 define('MEMBER_SURFBAR_NOTIFY_URL_PENDING_SUBJECT', "Zustimmung zur URL-Buchung in Surfbar erhalten");
+define('MEMBER_SURFBAR_NOTIFY_URL_DEPLETED_SUBJECT', "Ihre URL wurde automatisch angehalten");
 define('MEMBER_SURFBAR_NOTIFY_DEFAULT_SUBJECT', "[Fehler:] Bitte leiten Sie diese Mail an uns weiter!");
+define('MEMBER_SURFBAR_NOTIFY_LOW_POINTS_SUBJECT', "Ihr {!POINTS!}-Stand ist sehr niedrig!");
 
 // Auto-generated member subject lines
 define('MEMBER_DEL_SURFBAR_URLS_SUBJECT', "Ihre URL wurde aus der Surfbar entfernt");
@@ -160,6 +163,7 @@ define('SURFBAR_URL_STATUS_ACTIVE', "Freigegeben");
 define('SURFBAR_URL_STATUS_LOCKED', "Gesperrt");
 define('SURFBAR_URL_STATUS_PENDING', "Wartend");
 define('SURFBAR_URL_STATUS_STOPPED', "Angehalten");
+define('SURFBAR_URL_STATUS_DEPLETED', "Views ersch&ouml;pft");
 define('SURFBAR_URL_STATUS_REJECTED', "Abgelehnt");
 define('SURFBAR_URL_STATUS_DELETED', "Gel&ouml;scht");
 define('SURFBAR_URL_STATUS_MIGRATED', "Migriert");
index da1f944f503b10dea2f7ce8b4218828f0e4dbd86..4cf38f0d2aa32962d4717fffec7264b0abf1b302 100644 (file)
@@ -295,19 +295,81 @@ function SURFBAR_MEMBER_BOOKNOW_ACTION ($urlData) {
 }
 //
 // -----------------------------------------------------------------------------
+//                           Self-maintenance functions
+// -----------------------------------------------------------------------------
+//
+// Main function
+function SURFBAR_HANDLE_SELF_MAINTENANCE () {
+       // Handle URLs which limit has depleted so we can stop them
+       SURFBAR_HANDLE_DEPLETED_VIEWS();
+
+       // Handle low-points amounts
+       SURFBAR_HANDLE_LOW_POINTS();
+}
+// Handle URLs which limit has depleted
+function SURFBAR_HANDLE_DEPLETED_VIEWS () {
+       // Get all URLs
+       $urlArray = SURFBAR_GET_URL_DATA("0", "views_max", "id", "ASC", "id", " AND views_allowed>0 AND status='ACTIVE'");
+
+       // Do we have some entries?
+       if (count($urlArray) > 0) {
+               // Then handle all!
+               foreach ($urlArray as $id => $urlData) {
+                       // Backup data
+                       $data = $urlData;
+
+                       // Rewrite array for next call
+                       $urlData[$id] = $data;
+
+                       // Handle the status
+                       SURFBAR_CHANGE_STATUS($id, "ACTIVE", "DEPLETED", $urlData);
+               } // END - foreach
+       } // END - if
+}
+// Alert users which have URLs booked and are low on points amount
+function SURFBAR_HANDLE_LOW_POINTS () {
+       global $_CONFIG;
+
+       // Get all userids
+       $UIDs = SURFBAR_DETERMINE_DEPLETED_USERIDS($_CONFIG['surfbar_warn_low_points']);
+
+       // "Walk" through all URLs
+       foreach ($UIDs['uid'] as $uid => $dummy) {
+               // Is the last notification far enougth away to notify again?
+               if ((time() - $UIDs['notified'][$uid]) >= $_CONFIG['surfbar_low_interval']) {
+                       // Prepare content
+                       $content = array(
+                               'uid'      => $uid,
+                               'low'      => TRANSLATE_COMMA($_CONFIG['surfbar_warn_low_points']),
+                               'points'   => TRANSLATE_COMMA($UIDs['points'][$uid]),
+                               'notified' => MAKE_DATETIME($UIDs['notified'][$uid]),
+                               'interval' => CREATE_FANCY_TIME($_CONFIG['surfbar_low_interval'])
+                       );
+
+                       // Notify this user
+                       SURFBAR_NOTIFY_USER("low_points", $content);
+
+                       // Update last notified
+                       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET surfbar_low_notified=NOW() WHERE userid=%s LIMIT 1",
+                               array($uid), __FILE__, __LINE__);
+               } // END - if
+       } // END - foreach
+}
+//
+// -----------------------------------------------------------------------------
 //                               Generic functions
 // -----------------------------------------------------------------------------
 //
 // Looks up by an URL
-function SURFBAR_LOOKUP_BY_URL ($url) {
+function SURFBAR_LOOKUP_BY_URL ($url, $uid) {
        // Now lookup that given URL by itself
-       $urlArray = SURFBAR_GET_URL_DATA($url, "url");
+       $urlArray = SURFBAR_GET_URL_DATA($url, "url", "id", "ASC", "id", sprintf(" AND userid=%s", bigintval($uid)));
 
        // Was it found?
        return (count($urlArray) > 0);
 }
 // Load URL data by given search term and column
-function SURFBAR_GET_URL_DATA ($searchTerm, $column="id", $order="id", $sort="ASC", $group="id") {
+function SURFBAR_GET_URL_DATA ($searchTerm, $column="id", $order="id", $sort="ASC", $group="id", $add="") {
        global $lastUrlData;
 
        // By default nothing is found
@@ -326,9 +388,9 @@ function SURFBAR_GET_URL_DATA ($searchTerm, $column="id", $order="id", $sort="AS
        } // END - if
 
        // Look up the record
-       $result = SQL_QUERY_ESC("SELECT id, userid, url, views_total, status, registered, last_locked, lock_reason
+       $result = SQL_QUERY_ESC("SELECT id, userid, url, views_total, status, registered, last_locked, lock_reason, views_max, views_allowed
 FROM "._MYSQL_PREFIX."_surfbar_urls
-WHERE %s='%s'
+WHERE %s='%s'".$add."
 ORDER BY %s %s
 %s",
                array($column, $searchTerm, $order, $sort, $limit), __FILE__, __LINE__);
@@ -603,20 +665,20 @@ LIMIT 1",
        return $isFull;
 }
 // Get total amount of URLs of given status for current user or of ACTIVE URLs by default
-function SURFBAR_GET_TOTAL_URLS ($status="ACTIVE", $excludeUserId="") {
+function SURFBAR_GET_TOTAL_URLS ($status="ACTIVE", $excludeUserId=0) {
        // Determine depleted user account
        $UIDs = SURFBAR_DETERMINE_DEPLETED_USERIDS();
 
        // Is the exlude userid set?
-       if ($excludeUserId !== "") {
+       if ($excludeUserId > 0) {
                // Then add it
-               $UIDs[] = $excludeUserId;
+               $UIDs['uid'][$excludeUserId] = $excludeUserId;
        } // END - if
 
        // Get amount from database
        $result = SQL_QUERY_ESC("SELECT COUNT(id) AS cnt
 FROM "._MYSQL_PREFIX."_surfbar_urls
-WHERE userid NOT IN (".implode(",", $UIDs).") AND status='%s'",
+WHERE userid NOT IN (".implode(",", $UIDs['uid']).") AND status='%s'",
                array($status), __FILE__, __LINE__
        );
 
@@ -851,40 +913,50 @@ LIMIT 1",
        return ($cnt == 1);
 }
 // Determine which user hash no more points left
-function SURFBAR_DETERMINE_DEPLETED_USERIDS() {
+function SURFBAR_DETERMINE_DEPLETED_USERIDS ($limit=0) {
        // Init array
        $UIDs = array();
 
        // Do we have a current user id?
-       if (IS_MEMBER()) {
+       if ((IS_MEMBER()) && ($limit == 0)) {
                // Then add this as well
-               $UIDs[] = $GLOBALS['userid'];
+               $UIDs['uid'][$GLOBALS['userid']]      = $GLOBALS['userid'];
+               $UIDs['points'][$GLOBALS['userid']]   = GET_TOTAL_DATA($GLOBALS['userid'], "user_points", "points") - GET_TOTAL_DATA($GLOBALS['userid'], "user_data", "used_points");
+               $UIDs['notified'][$GLOBALS['userid']] = 0;
 
                // Get all userid except logged in one
-               $result = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_surfbar_urls
-WHERE userid NOT IN (%s,0) AND status='ACTIVE'
-GROUP BY userid
-ORDER BY userid ASC",
+               $result = SQL_QUERY_ESC("SELECT u.userid, UNIX_TIMESTAMP(d.surfbar_low_notified) AS notified
+FROM "._MYSQL_PREFIX."_surfbar_urls AS u
+INNER JOIN "._MYSQL_PREFIX."_user_data AS d
+ON u.userid=d.userid
+WHERE u.userid NOT IN (%s,0) AND u.status='ACTIVE'
+GROUP BY u.userid
+ORDER BY u.userid ASC",
                        array($GLOBALS['userid']), __FILE__, __LINE__);
        } else {
                // Get all userid
-               $result = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_surfbar_urls
-WHERE status='ACTIVE'
-GROUP BY userid
-ORDER BY userid ASC", __FILE__, __LINE__);
+               $result = SQL_QUERY("SELECT u.userid, UNIX_TIMESTAMP(d.surfbar_low_notified) AS notified
+FROM "._MYSQL_PREFIX."_surfbar_urls AS u
+INNER JOIN "._MYSQL_PREFIX."_user_data AS d
+ON u.userid=d.userid
+WHERE u.status='ACTIVE'
+GROUP BY u.userid
+ORDER BY u.userid ASC", __FILE__, __LINE__);
        }
 
        // Load all userid
-       while (list($uid) = SQL_FETCHROW($result)) {
+       while (list($uid, $notified) = SQL_FETCHROW($result)) {
                // Get total points
                $points = GET_TOTAL_DATA($uid, "user_points", "points") - GET_TOTAL_DATA($uid, "user_data", "used_points");
                //DEBUG_LOG(__FUNCTION__.":uid={$uid},points={$points}");
 
                // Shall we add this to ignore?
-               if ($points <= 0) {
+               if ($points <= $limit) {
                        // Ignore this one!
                        //DEBUG_LOG(__FUNCTION__.":uid={$uid} has depleted points amount!");
-                       $UIDs[] = $uid;
+                       $UIDs['uid'][$uid] = $uid;
+                       $UIDs['points'][$uid] = $points;
+                       $UIDs['notified'][$uid] = $notified;
                } // END - if
        } // END - while
 
@@ -1232,7 +1304,7 @@ function SURFBAR_DETERMINE_NEXT_ID ($urlId = 0) {
                $UIDs = SURFBAR_DETERMINE_DEPLETED_USERIDS();
 
                // Get maximum randomness factor
-               $maxRand = SURFBAR_GET_MAX_RANDOM($UIDs, $ADD);
+               $maxRand = SURFBAR_GET_MAX_RANDOM($UIDs['uid'], $ADD);
 
                // If more than one URL can be called generate the random number!
                if ($maxRand > 1) {
@@ -1242,13 +1314,13 @@ function SURFBAR_DETERMINE_NEXT_ID ($urlId = 0) {
 
                // And query the database
                //DEBUG_LOG(__FUNCTION__.":randNum={$randNum},maxRand={$maxRand},surfLock=".SURFBAR_GET_DATA('surf_lock')."");
-               $result = SQL_QUERY_ESC("SELECT sbu.id, sbu.userid, sbu.url, sbs.last_salt, sbu.reward, sbu.costs, sbu.views_total, sbu.views_max, sbu.views_allowed, UNIX_TIMESTAMP(l.last_surfed) AS last_surfed
+               $result = SQL_QUERY_ESC("SELECT sbu.id, sbu.userid, sbu.url, sbs.last_salt, sbu.views_total, sbu.views_max, sbu.views_allowed, UNIX_TIMESTAMP(l.last_surfed) AS last_surfed
 FROM "._MYSQL_PREFIX."_surfbar_urls AS sbu
 LEFT JOIN "._MYSQL_PREFIX."_surfbar_salts AS sbs
 ON sbu.id=sbs.url_id
 LEFT JOIN "._MYSQL_PREFIX."_surfbar_locks AS l
 ON sbu.id=l.url_id
-WHERE sbu.userid NOT IN (".implode(",", $UIDs).") AND sbu.status='ACTIVE' AND (sbu.views_allowed=0 OR (sbu.views_allowed > 0 AND sbu.views_max > 0))".$ADD."
+WHERE sbu.userid NOT IN (".implode(",", $UIDs['uid']).") AND sbu.status='ACTIVE' AND (sbu.views_allowed=0 OR (sbu.views_allowed > 0 AND sbu.views_max > 0))".$ADD."
 GROUP BY sbu.id
 ORDER BY l.last_surfed ASC, sbu.id ASC
 LIMIT %s,1",
@@ -1256,7 +1328,7 @@ LIMIT %s,1",
                );
        } else {
                // Get data from specified id number
-               $result = SQL_QUERY_ESC("SELECT sbu.id, sbu.userid, sbu.url, sbs.last_salt, sbu.reward, sbu.costs, sbu.views_total, sbu.views_max, sbu.views_allowed, UNIX_TIMESTAMP(l.last_surfed) AS last_surfed
+               $result = SQL_QUERY_ESC("SELECT sbu.id, sbu.userid, sbu.url, sbs.last_salt, sbu.views_total, sbu.views_max, sbu.views_allowed, UNIX_TIMESTAMP(l.last_surfed) AS last_surfed
 FROM "._MYSQL_PREFIX."_surfbar_urls AS sbu
 LEFT JOIN "._MYSQL_PREFIX."_surfbar_salts AS sbs
 ON sbu.id=sbs.url_id
diff --git a/templates/de/emails/admin/admin_surfbar_url_depleted.tpl b/templates/de/emails/admin/admin_surfbar_url_depleted.tpl
new file mode 100644 (file)
index 0000000..ad83067
--- /dev/null
@@ -0,0 +1,34 @@
+{--HELLO_ADMIN--},
+
+eine URL wurde soeben automatisch angehalten, da die maximalen Views verbraucht sind.
+
+Hier sind alle dazu:
+------------------------------------------
+Gebuchte URL: $content[url]
+------------------------------------------
+Email: $content[email]
+------------------------------------------
+Framekiller-Test:
+$content[frametester]
+------------------------------------------
+User-ID: $content[uid]
+------------------------------------------
+URL angemeldet: $content[registered]
+------------------------------------------
+Gesamteinblendungen: $content[views_total]
+------------------------------------------
+Maximale Einblendungen: $content[views_allowed]
+------------------------------------------
+Davon &uuml;brig: $content[views_max]
+------------------------------------------
+Verg&uuml;tung/Aufruf: $content[reward] {!POINTS!}
+------------------------------------------
+Kosten/Aufruf: $content[costs] {!POINTS!}
+------------------------------------------
+ID in der Surfbar: $content[id]
+------------------------------------------
+
+{--ADMIN_THANX--}
+  {--YOUR--} {!MAIN_TITLE!} {--SCRIPT--}
+
+{!URL!}/admin.php
diff --git a/templates/de/emails/member/member_surfbar_low_points.tpl b/templates/de/emails/member/member_surfbar_low_points.tpl
new file mode 100644 (file)
index 0000000..0c3ca4b
--- /dev/null
@@ -0,0 +1,21 @@
+Hallo $content[gender] $content[surname] $content[family],
+
+Sie haben in unserer Surfbar mindestens eine URL gebucht. Ihr {!POINTS!}-Stand ist unter dem Limit von $content[low] {!POINTS!} gefallen. Ihre gebuchte(n) URL(s) wird/werden bei einem Guthaben von 0 {!POINTS!} nicht mehr aufgerufen.
+
+Hier sind alle Daten:
+------------------------------------------
+Ihre User-ID: $content[uid]
+------------------------------------------
+Ihr aktuelles Guthaben: $content[points] {!POINTS!}
+------------------------------------------
+Warnung wird versendet ab: $content[low] {!POINTS!} und niedriger
+------------------------------------------
+Zuletzt wegen niedrigem Kontostand gewarnt: $content[notified]
+------------------------------------------
+Mindestversendeinterval dieser Mail: $content[interval]
+------------------------------------------
+
+Mit freundlichem Gruss,
+  Ihr {!MAIN_TITLE!} Team
+
+{!URL!}/login.php ({!WEBMASTER!})
diff --git a/templates/de/emails/member/member_surfbar_url_depleted.tpl b/templates/de/emails/member/member_surfbar_url_depleted.tpl
new file mode 100644 (file)
index 0000000..e3cf5ea
--- /dev/null
@@ -0,0 +1,31 @@
+Hallo $content[gender] $content[surname] $content[family],
+
+Ihre gebuchte URL wurde soeben angehalten, da die maximalen Einblendungen verbraucht sind.
+
+Hier sind alle Daten:
+------------------------------------------
+Gebuchte URL: $content[url]
+------------------------------------------
+Ihre User-ID: $content[uid]
+------------------------------------------
+Status: $content[status]
+------------------------------------------
+Datum der Buchung: $content[registered]
+------------------------------------------
+Gesamteinblendungen: $content[views_total] 
+------------------------------------------ 
+Maximale Einblendungen: $content[views_allowed] 
+------------------------------------------ 
+Davon &uuml;brig: $content[views_max] 
+------------------------------------------ 
+Kosten/Aufruf: $content[costs] {!POINTS!}
+------------------------------------------
+ID in der Surfbar: $content[id]
+------------------------------------------
+
+Wenn Sie die URL dennoch weiterlaufen wollen, so loggen Sie sich bitte im Mitgliedsbereich ein und stellen Sie erneut Einblendungen oder auf unendlich ein.
+
+Mit freundlichem Gruss,
+  Ihr {!MAIN_TITLE!} Team
+
+{!URL!}/login.php ({!WEBMASTER!})