$OUT = '';
while ($content = SQL_FETCHARRAY($result)) {
// Prepare content for output
- $content['timestamp'] = generateDateTime($content['timestamp'], 2);
+ $content['timestamp'] = generateDateTime($content['timestamp'], '2');
// Load template
$OUT .= loadTemplate('member_pool_row', true, $content);
$OUT = '';
while ($content = SQL_FETCHARRAY($result)) {
// Prepare data for the template
- $content['timestamp_ordered'] = generateDateTime($content['timestamp_ordered'], 2);
- $content['timestamp_sent'] = generateDateTime($content['timestamp_send'], 2);
- $content['percents'] = ($content['clicks'] / $content['max_rec'] * 100);
+ $content['timestamp_ordered'] = generateDateTime($content['timestamp_ordered'], '2');
+ $content['timestamp_sent'] = generateDateTime($content['timestamp_send'], '2');
+
+ // Click rate
+ $content['click_rate'] = '0';
+
+ // Better protection against 'divison-by-zero'
+ if ($content['max_rec'] > 0) {
+ $content['click_rate'] = ($content['clicks'] / $content['max_rec'] * 100);
+ } // END - if
// Load row template and switch colors
$OUT .= loadTemplate('member_stats_row', true, $content);
Hier sehen Sie genau, in welcher Ebene Sie ihn geworben haben:
-----------------
-Referal-Ebene (translateComma=$content[percents]%}%): $content[level]
+Referal-Ebene ({%pipe,translateComma=$content[percents]%}%): $content[level]
{?POINTS?}: {%pipe,translateComma=$content[points]%}
ID des Mitgliedes: {%user,refid,bigintval=$userid%}
-----------------
</td>
<td align="center" class="{%template,ColorSwitch%} top">
{--MEMBER_CLICK_RATE--}:<br />
- <strong>{%pipe,translateComma=$content[percents]%}%</strong>
+ <strong>{%pipe,translateComma=$content[click_rate]%}%</strong>
</td>
</tr>