index.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. if (cfr('NOTES')) {
  3. if (ubRouting::checkGet('username')) {
  4. $login = ubRouting::get('username', 'login');
  5. // change notes if need
  6. if (ubRouting::checkPost('newnotes', false)) {
  7. $notes = ubRouting::post('newnotes', 'safe');
  8. zb_UserDeleteNotes($login);
  9. zb_UserCreateNotes($login, $notes);
  10. rcms_redirect("?module=notesedit&username=" . $login);
  11. }
  12. $current_notes = zb_UserGetnotes($login);
  13. $useraddress = zb_UserGetFullAddress($login) . ' (' . $login . ')';
  14. // Edit form construct
  15. $fieldnames = array('fieldname1' => __('Current notes'), 'fieldname2' => __('New notes'));
  16. $fieldkey = 'newnotes';
  17. $form = web_EditorStringDataForm($fieldnames, $fieldkey, $useraddress, $current_notes);
  18. show_window(__('Edit notes'), $form);
  19. //additional notes
  20. $altCfg = $ubillingConfig->getAlter();
  21. if ($altCfg['ADCOMMENTS_ENABLED']) {
  22. $adcomments = new ADcomments('USERNOTES');
  23. show_window(__('Additional comments'), $adcomments->renderComments($login));
  24. }
  25. //user controls here
  26. show_window('', web_UserControls($login));
  27. }
  28. } else {
  29. show_error(__('You cant control this module'));
  30. }