[geeklog-cvs] geeklog-1.3/public_html/admin user.php,1.81,1.82

dhaun at iowaoutdoors.org dhaun at iowaoutdoors.org
Sun Aug 15 05:37:06 EDT 2004


Update of /var/cvs/geeklog-1.3/public_html/admin
In directory www:/tmp/cvs-serv12077

Modified Files:
	user.php 
Log Message:
Source code cosmetics ...


Index: user.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/admin/user.php,v
retrieving revision 1.81
retrieving revision 1.82
diff -C2 -d -r1.81 -r1.82
*** user.php	15 Aug 2004 08:46:49 -0000	1.81
--- user.php	15 Aug 2004 09:37:03 -0000	1.82
***************
*** 60,64 ****
  * Shows the user edit form
  *
! * @uid          int         User to edit
  *
  */
--- 60,66 ----
  * Shows the user edit form
  *
! * @param    int     $uid    User to edit
! * @param    int     $msg    Error message to display
! * @return   string          HTML for user edit form
  *
  */
***************
*** 218,238 ****
  * Changes a user's password
  *
! * @uid      int     ID of user to change password for
! * @passwd   int     New password
  *
  */
! function changepw($uid,$passwd) 
  {
!     global $_TABLES, $_CONF; 
  
      $retval = '';
  
!     if (!empty($passwd) && !empty($uid)) {
!         $passwd = md5($passwd);
!         $result = DB_change($_TABLES['users'],'passwd',"$passwd",'uid',$uid,$_CONF['site_admin_url'] . '/user.php?mode=none');    
      } else {
!         $retval .= COM_siteHeader('menu');
!         $retval .= COM_errorLog("CHANGEPW ERROR: There was nothing to do!",3);
!         $retval .= COM_siteFooter();
          echo $retval;
          exit;
--- 220,241 ----
  * Changes a user's password
  *
! * @param    int     $uid        ID of user to change password for
! * @param    string  $passwd     New password
  *
  */
! function changepw ($uid, $passwd)
  {
!     global $_CONF, $_TABLES;
  
      $retval = '';
  
!     if (!empty ($passwd) && !empty ($uid)) {
!         $passwd = md5 ($passwd);
!         $result = DB_change ($_TABLES['users'], 'passwd', "$passwd",
!                 'uid', $uid, $_CONF['site_admin_url'] . '/user.php?mode=none');
      } else {
!         $retval .= COM_siteHeader ('menu');
!         $retval .= COM_errorLog ('CHANGEPW ERROR: There was nothing to do!', 3);
!         $retval .= COM_siteFooter ();
          echo $retval;
          exit;
***************
*** 241,250 ****
  
  /**
! * Saves $uid to the database
  *
  */
! function saveusers($uid,$username,$fullname,$passwd,$email,$regdate,$homepage,$groups,$delete_photo = '') 
  {
      global $_CONF, $_TABLES, $_USER, $LANG28, $_USER_VERBOSE;
      $retval = '';
  
--- 244,264 ----
  
  /**
! * Saves user to the database
! *
! * @param    int     $uid            user id
! * @param    string  $usernmae       (short) user name
! * @param    string  $fullname       user's full name
! * @param    string  $email          user's email address
! * @param    string  $regdate        date the user registered with the site
! * @param    string  $homepage       user's homepage URL
! * @param    array   $groups         groups the user belongs to
! * @param    string  $delete_photo   delete user's photo if == 'on'
! * @return   string                  HTML redirect or error message
  *
  */
! function saveusers ($uid, $username, $fullname, $passwd, $email, $regdate, $homepage, $groups, $delete_photo = '') 
  {
      global $_CONF, $_TABLES, $_USER, $LANG28, $_USER_VERBOSE;
+ 
      $retval = '';
  
***************
*** 353,359 ****
              echo COM_refresh($_CONF['site_admin_url'] . '/user.php?msg=21');
          } else {
!             $retval .= COM_siteHeader('menu');
!             $retval .= COM_errorLog('Error in saveusers in ' . $_CONF['site_admin_url'] . '/user.php');
!             $retval .= COM_siteFooter();
              echo $retval;
              exit;
--- 367,374 ----
              echo COM_refresh($_CONF['site_admin_url'] . '/user.php?msg=21');
          } else {
!             $retval .= COM_siteHeader ('menu');
!             $retval .= COM_errorLog ('Error in saveusers in '
!                                      . $_CONF['site_admin_url'] . '/user.php');
!             $retval .= COM_siteFooter ();
              echo $retval;
              exit;
***************
*** 380,387 ****
  * Lists all users in the system
  *
  */
! function listusers($offset, $curpage, $query = '', $query_limit = 50) 
  {
!     global $_TABLES, $LANG28, $_CONF;
          
      $retval = '';
--- 395,408 ----
  * Lists all users in the system
  *
+ * @param    int     $offset         start of list
+ * @param    int     $curpage        current page
+ * @param    string  $query          query string for search
+ * @param    int     $query_limit    max. entries per page
+ * @return   string                  HTML for list of users
+ *
  */
! function listusers ($offset, $curpage, $query = '', $query_limit = 50) 
  {
!     global $_CONF, $_TABLES, $LANG28;
          
      $retval = '';
***************
*** 472,476 ****
  *
  */
! function importusers($file)
  {
      global $_CONF, $_TABLES, $LANG04, $LANG28, $HTTP_POST_FILES;
--- 493,497 ----
  *
  */
! function importusers ($file)
  {
      global $_CONF, $_TABLES, $LANG04, $LANG28, $HTTP_POST_FILES;
***************
*** 606,609 ****
--- 627,636 ----
  }
  
+ /**
+ * Send password to newly created user
+ *
+ * @param    string  $username   name of user
+ *
+ */
  function emailpassword ($username)
  {
***************
*** 614,630 ****
          USER_createAndSendPassword ($username, $email);
      }
- 
-     return $retval;
  }
  
  
! function display_form()
  {
      global $_CONF, $LANG28;
  
!     $retval = '<form action="' . $_CONF['site_admin_url'] . '/user.php" method="post" enctype="multipart/form-data">'
              . $LANG28[29] . ': <input type="file" name="importfile" size="40">'
              . '<input type="hidden" name="mode" value="import">'
!             . '<input type="submit" name="submit" value="' . $LANG28[30] . '"></form>';
  
      return $retval;
--- 641,663 ----
          USER_createAndSendPassword ($username, $email);
      }
  }
  
  
! /**
! * Display "batch add" (import) form
! *
! * @return   string      HTML for import form
! *
! */
! function display_form ()
  {
      global $_CONF, $LANG28;
  
!     $retval = '<form action="' . $_CONF['site_admin_url']
!             . '/user.php" method="post" enctype="multipart/form-data">'
              . $LANG28[29] . ': <input type="file" name="importfile" size="40">'
              . '<input type="hidden" name="mode" value="import">'
!             . '<input type="submit" name="submit" value="' . $LANG28[30]
!             . '"></form>';
  
      return $retval;
***************
*** 634,637 ****
--- 667,673 ----
  * Delete a user
  *
+ * @param    int     $uid    id of user to delete
+ * @return   string          HTML redirect
+ *
  */
  function deleteUser ($uid)
***************
*** 653,656 ****
--- 689,693 ----
      $mode = $HTTP_GET_VARS['mode'];
  }
+ 
  if (($mode == $LANG28[19]) && !empty ($LANG28[19])) { // delete
      $uid = COM_applyFilter ($HTTP_POST_VARS['uid'], true);
***************
*** 678,682 ****
                                 $HTTP_POST_VARS['passwd']);
  } else if ($mode == 'edit') {
!     $display .= COM_siteHeader('menu');
      $display .= edituser (COM_applyFilter ($HTTP_GET_VARS['uid']));
      $display .= COM_siteFooter();
--- 715,719 ----
                                 $HTTP_POST_VARS['passwd']);
  } else if ($mode == 'edit') {
!     $display .= COM_siteHeader('menu', $LANG28[1]);
      $display .= edituser (COM_applyFilter ($HTTP_GET_VARS['uid']));
      $display .= COM_siteFooter();
***************
*** 684,688 ****
      $display .= importusers ($HTTP_POST_VARS['file']);
  } else if ($mode == 'importform') {
!     $display .= COM_siteHeader('menu');
      $display .= COM_startBlock ($LANG28[24], '',
                          COM_getBlockTemplate ('_admin_block', 'header'));
--- 721,725 ----
      $display .= importusers ($HTTP_POST_VARS['file']);
  } else if ($mode == 'importform') {
!     $display .= COM_siteHeader('menu', $LANG28[24]);
      $display .= COM_startBlock ($LANG28[24], '',
                          COM_getBlockTemplate ('_admin_block', 'header'));
***************
*** 692,696 ****
      $display .= COM_siteFooter();
  } else { // 'cancel' or no mode at all
!     $display .= COM_siteHeader('menu');
      if (isset ($HTTP_POST_VARS['q']) || isset ($HTTP_POST_VARS['query_limit'])) {
          $VARS = $HTTP_POST_VARS;
--- 729,733 ----
      $display .= COM_siteFooter();
  } else { // 'cancel' or no mode at all
!     $display .= COM_siteHeader ('menu', $LANG28[11]);
      if (isset ($HTTP_POST_VARS['q']) || isset ($HTTP_POST_VARS['query_limit'])) {
          $VARS = $HTTP_POST_VARS;




More information about the geeklog-cvs mailing list