0 OR s_id = '.$sm['edit']['id'].' and credits > 0','time desc','limit 0,500');
$creditsActivity = getArray('users_credits','where uid = '.$sm['edit']['id'].' AND type = "spend"','time desc','limit 0,500');
$creditsActivityAdded = getArray('users_credits','where uid = '.$sm['edit']['id'].' AND type = "added"','time desc','limit 0,500');
$creditsPurchased = getArray('sales','where u_id = '.$sm['edit']['id'].' ','time desc','limit 0,500');
$creditsActivityAll = array_merge($creditsActivity, $creditsActivityChat);
$creditsActivityAll = array_merge($creditsActivityAll, $creditsPurchased);
$creditsActivityAll = array_merge($creditsActivityAll, $creditsActivityAdded);
$sort = array();
foreach ($creditsActivityAll as $key => $part) {
$sort[$key] = $part['time'];
}
array_multisort($sort, SORT_DESC, $creditsActivityAll);
if(empty($creditsActivityAll)){ ?>
No credits movements recorded
monetization_on
= time_elapsed_string($value['time']); ?>
money_off
= time_elapsed_string($value['time']); ?>
monetization_on
= time_elapsed_string($value['time']); ?>
monetization_on
0) {
$reason = 'Purchase a story for '.$value['credits'].' credits';
}
if($value['gift'] > 0) {
$reason = 'Sent a gift for '.$value['credits'].' credits';
}
if($value['s_id'] == $sm['edit']['id']){ ?>
= time_elapsed_string($value['time']); ?>
money_off
= time_elapsed_string($value['time']); ?>
monetization_on