index.php 879 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. if (cfr('EMAIL')) {
  3. if (isset($_GET['username'])) {
  4. $login = vf($_GET['username']);
  5. // change mail if need
  6. if (isset($_POST['newmail'])) {
  7. $mail = $_POST['newmail'];
  8. zb_UserChangeEmail($login, $mail);
  9. rcms_redirect("?module=mailedit&username=" . $login);
  10. }
  11. $current_mail = zb_UserGetEmail($login);
  12. $useraddress = zb_UserGetFullAddress($login) . ' (' . $login . ')';
  13. // Edit form construct
  14. $fieldnames = array('fieldname1' => __('Current mail'), 'fieldname2' => __('New mail'));
  15. $fieldkey = 'newmail';
  16. $form = web_EditorStringDataForm($fieldnames, $fieldkey, $useraddress, $current_mail, 'email');
  17. $form.=web_UserControls($login);
  18. show_window(__('Edit mail'), $form);
  19. }
  20. } else {
  21. show_error(__('You cant control this module'));
  22. }
  23. ?>