Advertisement
Guest User

Untitled

a guest
Sep 1st, 2014
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. $cache = new Cache();
  2. $ban = $cache->read('ban');
  3. // Se não houver frase no cache ou já tiver expirado
  4. if (!$ban) {
  5. // Cria uma nova frase e salva-a no cache por 30s
  6. $puxar = mysql_query("SELECT * FROM bans WHERE added_by = 'PierreAndreis'") or die(insLog('warning', 'MySQL deu erro', $_SESSION['usuarioLogin'], addslashes(mysql_error())));
  7. $row = mysql_fetch_object($puxar);
  8. $cache->save('ban', $ban, '1 seconds');
  9. }
  10. while($ban) {
  11. echo $row['reason'];
  12. }
  13.  
  14. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement