Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > Template Shares
Reply
  #11  
Old 11th December 2014, 20:51
Marco Marco is offline
Senior Member
 
Join Date: Jun 2009
Seychelles
Posts: 327
Default
i believe is on cleanup :) but i never tried /never tested...
for a second thaught i am take a look on daily cleanup and found this part

it is for you if you can solve , i will give you a beer :D

PHP Code:
 mysql_query ('UPDATE users SET usergroup = \'' UC_POWER_USER '\', modcomment = CONCAT(\'' gmdate ('Y-m-d') . ' - Promoted to POWER USER by -AutoSystem.
\', modcomment) WHERE id IN (0,' 
implode (','$userids) . ')');
        ++
$CQueryCount;
        
savelog ('Following user(s) has been promoted to Power User Class: ' implode (', '$userids) . '. Reason: Automatic Promotion System!');
        ++
$CQueryCount;
        foreach (
$userids as $pid)
        {
          
send_pm ($pid$lang->cronjobs['promote_message'], $lang->cronjobs['promote_subject']);
          ++
$CQueryCount;
        }
      }

      unset (
$limit);
      unset (
$maxdt);
      unset (
$userids);
      unset (
$pid);
    }
  }

  
$query mysql_query ('SELECT DISTINCT id FROM users WHERE usergroup = \'' UC_POWER_USER . ('' '\' AND uploaded / downloaded < ' $demote_min_ratio ' AND enabled=\'yes\''));
  ++
$CQueryCount;
  if (
mysql_num_rows ($query))
  {
    
$userids = array ();
    while (
$arr mysql_fetch_assoc ($query))
    {
      
$userids[] = $arr['id'];
    }

    if (
count ($userids))
    {
      
mysql_query ('UPDATE users SET usergroup = \'' UC_USER '\', modcomment = CONCAT(\'' gmdate ('Y-m-d') . ' - Demoted to USER by -AutoSystem.
\', modcomment) WHERE id IN (0,' 
implode (','$userids) . ')');
      ++
$CQueryCount;
      
savelog ('Following user(s) has been demoted to User Class: ' implode (', '$userids) . '. Reason: Automatic Demotion System!');
      ++
$CQueryCount;
      foreach (
$userids as $did)
      {
        
send_pm ($didsprintf ($lang->cronjobs['demote_message'], $demote_min_ratio), $lang->cronjobs['demote_subject']);
        ++
$CQueryCount;
      }
    }

    unset (
$userids);
    unset (
$did);
  } 



and off cours this

PHP Code:
$limit $promote_gig_limit 1024 1024 1024;
$maxdt TIMENOW 86400 $promote_min_reg_days
Reply With Quote
Reply

Tags
classes , user

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 13:04. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.