index.php 967 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. if (cfr('ALWAYSONLINE')) {
  3. if (isset ($_GET['username'])) {
  4. $login=vf($_GET['username']);
  5. // change alwaysonline if need
  6. if (isset ($_POST['newalwaysonline'])) {
  7. $alwaysonline=$_POST['newalwaysonline'];
  8. $billing->setao($login,$alwaysonline);
  9. log_register('CHANGE AlwaysOnline ('.$login.') ON '.$alwaysonline);
  10. rcms_redirect("?module=aoedit&username=".$login);
  11. }
  12. $current_alwaysonline=zb_UserGetStargazerData($login);
  13. $current_alwaysonline=$current_alwaysonline['AlwaysOnline'];
  14. $useraddress=zb_UserGetFullAddress($login).' ('.$login.')';
  15. // Edit form construct
  16. $fieldname=__('Current AlwaysOnline state');
  17. $fieldkey='newalwaysonline';
  18. $form=web_EditorTrigerDataForm($fieldname, $fieldkey, $useraddress, $current_alwaysonline);
  19. $form.=web_UserControls($login);
  20. // show form
  21. show_window(__('Edit AlwaysOnline'), $form);
  22. }
  23. } else {
  24. show_error(__('You cant control this module'));
  25. }
  26. ?>