index.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. if (cfr('ROOT')) {
  3. //key deletion
  4. if (ubRouting::checkGet('licensedelete')) {
  5. $avarice = new Avarice();
  6. $avarice->deleteKey(ubRouting::get('licensedelete'));
  7. ubRouting::nav('?module=licensekeys');
  8. }
  9. //key installation
  10. if (ubRouting::checkPost('createlicense')) {
  11. $avarice = new Avarice();
  12. if ($avarice->createKey(ubRouting::post('createlicense'))) {
  13. ubRouting::nav('?module=licensekeys');
  14. } else {
  15. show_error(__('Unacceptable license key'));
  16. }
  17. }
  18. //key editing
  19. if (ubRouting::checkPost(array('editlicense', 'editdbkey'))) {
  20. $avarice = new Avarice();
  21. if ($avarice->updateKey(ubRouting::post('editdbkey'), ubRouting::post('editlicense'))) {
  22. ubRouting::nav('?module=licensekeys');
  23. } else {
  24. show_error(__('Unacceptable license key'));
  25. }
  26. }
  27. //displaying serial for license offering
  28. $hostid = wr_SerialGet();
  29. if (!empty($hostid)) {
  30. //render current Ubilling serial info
  31. show_info(__('Use this WolfRecorder serial for license keys purchase') . ': ' . wf_tag('b') . $hostid . wf_tag('b', true));
  32. //show available license keys
  33. wr_LicenseLister();
  34. }
  35. wr_Stats();
  36. } else {
  37. show_error(__('Access denied'));
  38. }