index.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. // Send main headers
  3. header('Last-Modified: ' . date('r'));
  4. header("Cache-Control: no-store, no-cache, must-revalidate");
  5. header("Pragma: no-cache");
  6. // Page gentime start
  7. $starttime = explode(' ', microtime());
  8. $starttime = $starttime[1] + $starttime[0];
  9. // Load libs
  10. include('modules/engine/api.mysql.php');
  11. include('modules/engine/api.lightastral.php');
  12. include('modules/engine/api.compat.php');
  13. include('modules/engine/api.signup.php');
  14. $signup = new SignupService($snConfig['confcache'],$snConfig['cachetimeout']);
  15. //show form by default
  16. if (!la_CheckPost(array('createrequest'))) {
  17. if (!la_CheckGet(array('success'))) {
  18. show_window('', $signup->renderForm());
  19. } else {
  20. show_window(__('Thank you'), __('Your inquiry will be dealt with in the shortest possible time, and you will be contacted by our representative for details of connection.'));
  21. }
  22. } else {
  23. //or create request
  24. $request = $signup->createRequest();
  25. if ($request) {
  26. rcms_redirect("?success=yeah");
  27. } else {
  28. show_window(__('Error'), __('All fields marked with an asterisk (*) are required') . '. ' . la_Link('index.php', __('Try again')));
  29. }
  30. }
  31. if ($snConfig['debug']) {
  32. // Page gentime end
  33. $mtime = explode(' ', microtime());
  34. $totaltime = $mtime[0] + $mtime[1] - $starttime;
  35. show_window(__('Debug'), 'GT: ' . round($totaltime, 4) . ' QC: ' . $query_counter);
  36. }
  37. sn_ShowTemplate(); // render data into template
  38. ?>