Advertisement
Guest User

srtisrt doesn't work like this

a guest
Nov 28th, 2014
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. function activitycheck($userid, $threadid, $threadtitle){
  2. global $L, $sql, $threshold, $thresholdmain, $thresholdacs;
  3. $activity=$sql->resultq("SELECT COUNT(*) FROM posts WHERE user=$userid AND thread=$threadid AND date>".(ctime()-86400));
  4. if($activity>=(stristr($threadtitle,'KCS ')?$thresholdacs:$thresholdmain+1) && (!has_perm('bypass-acs-limit') || !has_perm('no-restrictions')) && $threshold ){ // deary me
  5. print "$L[TBL1]>$L[TR1]>$L[TD1] style='text-align:center'>You have posted enough in the KCS thread today. Come back later!</td></tr>$L[TBLend]";
  6. die(pagefooter());
  7. }
  8. if(($activity>=$thresholdmain) && (!has_perm('bypass-main-limit') || !has_perm('no-restrictions')) && $threshold ){
  9. print "$L[TBL1]>$L[TR1]>$L[TD1] style='text-align:center'>You have posted enough in this thread today. Come back later!</td></tr>$L[TBLend]";
  10. die(pagefooter());
  11. }
  12. $activity=$sql->resultq("SELECT COUNT(*) FROM posts WHERE user=$userid AND date>".(ctime()-300));
  13. if($activity && !has_perm('bypass-five-minutes')){
  14. print "$L[TBL1]>$L[TR1]>$L[TD1]>You can only post once every five minutes! Make it count!</td></tr>$L[TBLend]";
  15. die(pagefooter());
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement