]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/guest/what-mediadata.php
www is out-dated
[mailer.git] / inc / modules / guest / what-mediadata.php
index 56f45824462202d7473e96282d66f444960ab16f..151a831b2170bbf89240a63c392b63f0fb0111a8 100644 (file)
  * -------------------------------------------------------------------- *
  * Kurzbeschreibung  : Mediendaten                                      *
  * -------------------------------------------------------------------- *
- *          mod_media - By Robert Niedziela                             *
- *          (c)2003 www.megacomputing.net                               *
- * -------------------------------------------------------------------- *
- *           Rewritten by Roland Haeder, 2003 - 2009                    *
- * -------------------------------------------------------------------- *
  * $Revision::                                                        $ *
  * $Date::                                                            $ *
  * $Tag:: 0.2.1-FINAL                                                 $ *
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
- * For more information visit: http://www.mxchange.org                  *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
+ * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
  * it under the terms of the GNU General Public License as published by *
@@ -46,12 +41,16 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // Add description as navigation point
-addMenuDescription('guest', __FILE__);
+addYouAreHereLink('guest', __FILE__);
 
+// Both ext-mediadata and ext-user must be there
 if ((!isExtensionActive('mediadata')) && (!isAdmin())) {
-       loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('mediadata'));
+       displayMessage('{%pipe,generateExtensionInactiveNotInstalledMessage=mediadata%}');
        return;
-} // END - if
+} elseif ((!isExtensionActive('user')) && (!isAdmin())) {
+       displayMessage('{%pipe,generateExtensionInactiveNotInstalledMessage=user%}');
+       return;
+}
 
 // Get total confirmed user ids...
 $content['user_confirmed']   = getTotalConfirmedUser();
@@ -73,7 +72,7 @@ if ($content['user_count'] > 0) {
 $TEST = makeTime(0, 0, 0, $PROJECTED);
 
 if ($TEST > time()) {
-       $content['projected'] = getMaskedMessage('USER_MT_PROJECTED', generateDateTime($PROJECTED, 3));
+       $content['projected'] = '{%message,USER_MT_PROJECTED=' . generateDateTime($PROJECTED, '3') . '%}';
 } else {
        $content['projected'] = getMaskedMessage('USER_MT_PROJECTED', '{--USER_PROJECTION_UNKNOWN--}');
 }
@@ -122,9 +121,11 @@ $content['sent']       = $sent;
 // All clicks
 $content['user_links'] = abs($sent - $clicks);
 
-$clr = '0.00000';
-if ($sent > 0) $clr = $clicks / $sent * 100;
-$content['_clr'] = $clr;
+// Click rate
+$content['click_rate'] = '0';
+if ($sent > 0) {
+       $content['click_rate'] = $clicks / $sent * 100;
+} // END - if
 
 // Load jackpot
 $jackpot = '0';
@@ -243,7 +244,7 @@ WHERE
 if (isExtensionActive('transfer')) {
        // Statistics for points transfers
        $result = SQL_QUERY("SELECT
-       COUNT(t.id) AS cnt, SUM(t.points) AS points
+       COUNT(t.id) AS cnt, SUM(t.points) AS `points`
 FROM
        `{?_MYSQL_PREFIX?}_user_transfers_in` AS t
 LEFT JOIN
@@ -299,9 +300,6 @@ $content['out_points']  = $OUT_POINTS;
 $content['out_user']    = $OUT_USER;
 $content['out_special'] = $OUT_SPECIAL;
 
-// Patch timespamp
-$content['patch_ctime'] = generateDateTime(getConfig('patch_ctime'), 2);
-
 // Load template
 loadTemplate('mediadata', false, $content);