Unsupported scripts and control panel web app for a hosting company
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

tickets.php 1.0KB

123456789101112131415161718192021222324252627282930313233
  1. #!/usr/local/php-stable/bin/php -q
  2. <?PHP
  3. require('/home/utd/common/ticketmail.php');
  4. mysql_connect('', '', '');
  5. mysql_select_db('');
  6. $sql = 'SELECT ticket_id, user_id FROM tickets WHERE ticket_status = \'new\'';
  7. $sql .= ' AND ticket_time <= '.(time()-60*60*24*3).' AND ticket_time > ';
  8. $sql .= (time()-60*60*24*2);
  9. $res = mysql_query($sql);
  10. while ($row = mysql_fetch_array($res)) {
  11. $sql = 'UPDATE billing SET bill_due = bill_due + 5356800 WHERE user_id = ';
  12. $sql .= $row['user_id'].' AND bill_paid < 2';
  13. mysql_query($sql);
  14. $sql = 'INSERT INTO tickets (user_id, ticket_status, ticket_thread, ';
  15. $sql .= ' ticket_title, ticket_body, ticket_time) VALUES (5, \'reply\',';
  16. $sql .= ' '.$row['ticket_id'].', \'Apologies.\', \'This ticket has been ';
  17. $sql .= 'unaddressed for over 48 hours. Your account has been automatically';
  18. $sql .= ' credited with an extra two months hosting.'."\r\n\r\n".' We apologise';
  19. $sql .= ' for the inconvenience.\', '.time();
  20. $sql .= ')';
  21. mysql_query($sql);
  22. ticketmail(mysql_insert_id());
  23. }
  24. ?>