Fixes for absent ext-user and misleading data removed
[mailer.git] / inc / modules / guest / what-mediadata.php
index 7c402589f354dd2651f60112718cbfd7c270f1fd..c8c30db2a220b6639513f7cdd9c892fa7c38c005 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                    *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
  * For more information visit: http://www.mxchange.org                  *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -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(generateExtensionInactiveNotInstalledMessage('mediadata'));
        return;
-} // END - if
+} elseif ((!isExtensionActive('user')) && (!isAdmin())) {
+       displayMessage(generateExtensionInactiveNotInstalledMessage('user'));
+       return;
+}
 
 // Get total confirmed user ids...
 $content['user_confirmed']   = getTotalConfirmedUser();
@@ -131,7 +130,7 @@ $jackpot = '0';
 if (isExtensionActive('jackpot')) $jackpot = getJackpotPoints();
 
 if (empty($jackpot)) $jackpot = '0';
-$content['jackpot'] = translateComma($jackpot);
+$content['jackpot'] = $jackpot;
 
 // Total referal link clicks, total logins
 $result = SQL_QUERY('SELECT
@@ -243,7 +242,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