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.

tac.php 982B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?PHP
  2. define('NOTACREF', True);
  3. require_once('lib/account.php');
  4. require_once('lib/common.php');
  5. if (isset($_POST['version']) && isset($_POST['agree'])) {
  6. if ($_POST['agree'] == 'I AGREE') {
  7. $fh = fopen('/home/admin/common/tac.txt','r');
  8. $version = trim(fgets($fh));
  9. fclose($fh);
  10. if ((int)$_POST['version'] != (int)$version) {
  11. define('MESSAGE', 'Oops. The T&amp;C appears to have been updated again!');
  12. } else {
  13. $sql = 'UPDATE users SET user_tac = '.$version.' WHERE user_id = '.UID;
  14. mysql_query($sql) or mf(__FILE__, __LINE__, $sql);
  15. l('Accepted Terms and Conditions version '.str_pad($version,4,'0',STR_PAD_LEFT));
  16. header('Location: '.CP_PATH);
  17. }
  18. } else {
  19. define('MESSAGE', 'You must type \'I AGREE\' if you accept the T&amp;C.');
  20. }
  21. }
  22. require_once('lib/dashboard.php');
  23. define('TITLE', 'Terms and Conditions');
  24. require_once('lib/header.php');
  25. require_once('pages/tac.php');
  26. require_once('lib/footer.php');
  27. ?>