Source for file compatibility.php

Documentation is available at compatibility.php

  1. <?php
  2. ////////////////////////////////////////////////////////////////////////////////
  3. // Copyright (C) ReloadCMS Development Team //
  4. // http://reloadcms.sf.net //
  5. // //
  6. // This program is distributed in the hope that it will be useful, //
  7. // but WITHOUT ANY WARRANTY, without even the implied warranty of //
  8. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. //
  9. // //
  10. // This product released under GNU General Public License v2 //
  11. ////////////////////////////////////////////////////////////////////////////////
  12.  
  13.  
  14.  
  15. function user_check_right($username, $right){
  16. global $system;
  17. return $system->checkForRight($right, $username);
  18. }
  19.  
  20. function user_set_rights($username, $root, $rights){
  21. global $system;
  22. if($userdata = load_user_info($username)){
  23. return $system->setRightsForUser($username, $rights, $root, (int)@$userdata['accesslevel']);
  24. } else {
  25. return false;
  26. }
  27. }
  28.  
  29. function load_user_info($username){
  30. global $system;
  31. return $system->getUserData($username);
  32. }
  33.  
  34. function user_get_list($expr = '*'){
  35. global $system;
  36. return $system->getUserList($expr);
  37. }
  38.  
  39. function user_change_field($username, $field, $value){
  40. global $system;
  41. return $system->changeProfileField($username, $field, $value);
  42. }
  43.  
  44. function user_delete($username){
  45. global $system;
  46. return $system->deleteUser($username);
  47. }
  48.  
  49. function user_register_in_cache($username, $usernick, $email, &$cache){
  50. global $system;
  51. $cache = &$system->users_cache;
  52. return $cache->registerUser($username, $usernick, $email);
  53. }
  54.  
  55. function user_remove_from_cache($username, &$cache){
  56. global $system;
  57. $cache = &$system->users_cache;
  58. return $cache->removeUser($username);
  59. }
  60.  
  61. function user_check_nick_in_cache($username, $usernick, &$cache){
  62. global $system;
  63. $cache = &$system->users_cache;
  64. return $cache->checkField('nicks', $usernick);
  65. }
  66.  
  67. function user_check_email_in_cache($username, $email, &$cache){
  68. global $system;
  69. $cache = &$system->users_cache;
  70. return $cache->checkField('mails', $email);
  71. }
  72.  
  73. function user_create_link($user, $nick, $target = ''){
  74. global $system;
  75. return $system->createLink($user, $nick, $target = '');
  76. }
  77.  
  78. function show_window($title, $data, $align = 'left'){
  79. global $system;
  80. return $system->defineWindow($title, $data, $align);
  81. }
  82.  
  83. function show_error($data){
  84. return show_window('', $data, 'center');
  85. }
  86. ?>

Documentation generated on Fri, 08 Jun 2007 12:21:21 +0300 by phpDocumentor 1.3.0RC3