index.php 892 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. if (cfr('PHONE')) {
  3. if (isset($_GET['username'])) {
  4. $login = vf($_GET['username']);
  5. // change phone routine
  6. if (isset($_POST['newphone'])) {
  7. $phone = $_POST['newphone'];
  8. zb_UserChangePhone($login, $phone);
  9. rcms_redirect("?module=phoneedit&username=" . $login);
  10. }
  11. $current_phone = zb_UserGetPhone($login);
  12. $user_address = zb_UserGetFullAddress($login) . ' (' . $login . ')';
  13. // Edit form construct
  14. $fieldnames = array('fieldname1' => __('Current phone'), 'fieldname2' => __('New Phone'));
  15. $fieldkey = 'newphone';
  16. $form = web_EditorStringDataForm($fieldnames, $fieldkey, $user_address, $current_phone);
  17. $form.=web_UserControls($login);
  18. show_window(__('Edit phone'), $form);
  19. }
  20. } else {
  21. show_error(__('You cant control this module'));
  22. }
  23. ?>