Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Start SMF Trader System
- global $sourcedir;
- include_once $sourcedir . '/Trader2.php';
- GetTraderInformation($message['member']['id']);
- $context['neturalcount'] = 0;
- $context['pcount'] = 0;
- $context['ncount'] = 0;
- foreach($context['trader_mem_data'] as $row)
- {
- if ($row['salevalue'] == 0)
- {
- $context['pcount'] = $row['total'];
- }
- else if ($row['salevalue'] == 2)
- {
- $context['ncount'] = $row['total'];
- }
- else if ($row['salevalue'] == 1)
- {
- $context['neturalcount'] = $row['total'];
- }
- }
- $context['tradecount_nonetural'] = ($context['pcount'] + $context['ncount']);
- $tradeporcentaje = $context['tradecount_nonetural'] != 0 ? round(($context['pcount'] / $context['tradecount_nonetural']) * 100, 2) : 0;
- if ($modSettings['trader_use_pos_neg'])
- $tradecount = ($context['pcount'] - $context['ncount']);
- else
- $tradecount = $context['pcount'] + $context['ncount'] + $context['neturalcount'];
- // Show the trader info
- echo '<li>
- ' . $txt['smftrader_profile'] . '<br />
- <a href="' . $scripturl . '?action=trader&id=' . $message['member']['id'] . '">', $modSettings['trader_use_pos_neg'] ? ($tradecount > 0 ? '+' . $tradecount : $tradecount) : $tradecount , '</a> (', $tradeporcentaje ,'%)</li>';
- //END SMF Trader System
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement