]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/guest/what-welcome.php
Our convention says if(-else) blocks should not be put in one line
[mailer.git] / inc / modules / guest / what-welcome.php
index 58569f567307d8a5d362d15183f36027ef6b9d8a..91f3becd65379d918012b2fe31a75fb936cf6902 100644 (file)
 // Some security stuff...
 if (!defined('__SECURITY')) {
        die();
-}
+} // END - if
 
 // Add description as navigation point
 addMenuDescription('guest', __FILE__);
 
-// Count referal levels
-$result = SQL_QUERY("SELECT COUNT(`id`) FROM `{?_MYSQL_PREFIX?}_refdepths` WHERE `level` > 0", __FILE__, __LINE__);
-
-// Fetch rows
-list($cnt) = SQL_FETCHROW($result);
-
-// Free result
-SQL_FREERESULT($result);
-
 // Prepare content
-$content = array(
-       'register'   => translateComma(getConfig('points_register')),
-       'ref_levels' => $cnt,
-       'ref_points' => translateComma(getConfig('points_ref'))
-);
+$content['ref_levels'] = countSumTotalData('', 'refdepths', 'id', '', true, ' WHERE `level` > 0');
 
 // Load default template
-loadTemplate(substr(basename(__FILE__), 5, -4), false, $content);
+loadTemplate('welcome', false, $content);
 
 // [EOF]
 ?>