Advertisement
Guest User

Untitled

a guest
Dec 4th, 2012
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. function tid($bruger_id) {
  2. GLOBAL $iws_db;
  3. $hentettidVar = $iws_db->query("SELECT tid FROM iws_customers WHERE id = '".$bruger_id."'");
  4. $unixTid = strtotime($hentettidVar); //er krævet for at kunne sammenligne tiden med en anden tid.
  5. $unixTidNow = strtotime(date("Y-m-d")); //igen, er krævet for at kunne sammenligne.
  6.  
  7. if(($hentettidVar == "0000-00-00") || ($unixTid < $unixTidNow)) {
  8. $iws_db->query("UPDATE iws_customers SET premium=0 WHERE id = '".$bruger_id."'");
  9. }
  10. else {
  11. die;
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement