* svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
return;
} // END - if
-// Get userid
-$userid = getMemberId();
-
-if (isExtensionActive('nickname')) {
- // Load nickname
- $data = 'nickname';
+// Prepare constants
+if ((isExtensionActive('nickname')) && (getUserData('nickname') != '')) {
+ // Get nickname
+ $content['userid'] = getUserData('nickname');
} else {
- // Load userid
- $data = 'userid';
+ // Get userid
+ $content['userid'] = getMemberId();
}
-// Run SQL command
-$result = SQL_QUERY_ESC("SELECT
- `".$data."`, `beg_clicks`
-FROM
- `{?_MYSQL_PREFIX?}_user_data`
-WHERE
- `userid`=%s
-LIMIT 1", array($userid), __FILE__, __LINE__);
-
-list($userid, $clicks) = SQL_FETCHROW($result);
-
-// Free result
-SQL_FREERESULT($result);
-
-// Set user id when no nickname was found
-$nickname = true;
-if (empty($userid)) { $userid = getMemberId(); $nickname = false; }
-
-// Prepare constants
-$content['userid'] = $userid;
-$content['clicks'] = $clicks;
-$content['points'] = translateComma(getConfig('beg_points'));
-$content['points_max'] = translateComma(getConfig('beg_points_max'));
-$content['timeout'] = createFancyTime(getConfig('beg_timeout'));
// @TODO No more needed? define('__BEG_UID_TIMEOUT', createFancyTime(getConfig('beg_userid_timeout')));
// Load template
-loadTemplate('member_' . substr(basename(__FILE__), 5, -4), false, $content);
+loadTemplate('member_beg', false, $content);
// [EOF]
?>