]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/user_functions.php
Renamed functions to make it more clear, ext-coupon continued:
[mailer.git] / inc / libs / user_functions.php
index fa1dbf233623e934d7bca76d7f95dff60c2dcdec..838c8db00f5cd1fd4f62f09b2c4eebb63373706d 100644 (file)
@@ -475,7 +475,7 @@ function doNewUserPassword ($email, $userid) {
 }
 
 // Get timestamp for given stats type and data
-function getTimestampFromUserStats ($statsType, $statsData, $userid = '0') {
+function getEpocheTimeFromUserStats ($statsType, $statsData, $userid = '0') {
        // Default timestamp is zero
        $data['inserted'] = '0';
 
@@ -528,7 +528,7 @@ function insertUserStatsRecord ($userid, $statsType, $statsData) {
        } // END - if
 
        // Does it exist?
-       if ((!getTimestampFromUserStats($statsType, $statsData, $userid)) && (!is_array($statsData))) {
+       if ((!getEpocheTimeFromUserStats($statsType, $statsData, $userid)) && (!is_array($statsData))) {
                // Then insert it!
                SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_stats_data` (`userid`,`stats_type`,`stats_data`) VALUES (%s,'%s','%s')",
                        array(
@@ -742,5 +742,23 @@ function doExpressionUser ($data) {
        return $code;
 }
 
+// Template call-back function for list_user admin function
+function doTemplateAdminListUserTitle ($template, $dummy = false) {
+       // Init title with "all accounts"
+       $code = '{--ADMIN_LIST_ALL_ACCOUNTS--}';
+
+       // Do we have a 'status' or 'mode' set?
+       if (isGetRequestParameterSet('status')) {
+               // Set title according to the 'status'
+               $code = sprintf("{--ADMIN_LIST_STATUS_%s_ACCOUNTS--}", strtoupper(getRequestParameter('status')));
+       } elseif (isGetRequestParameterSet('mode')) {
+               // Set title according to the "mode"
+               $code = sprintf("{--ADMIN_LIST_MODE_%s_ACCOUNTS--}", strtoupper(getRequestParameter('mode')));
+       }
+
+       // Return the code
+       return $code;
+}
+
 // [EOF]
 ?>