gunnar: server/php-kolab/Kolab_Webadmin/Webadmin auth.class.php, NONE, 1.1 authenticate.php, NONE, 1.1 debug.php, NONE, 1.1 form.class.php, NONE, 1.1 headers.php, NONE, 1.1 ldap.class.php, NONE, 1.1 locale.php, NONE, 1.1 menu.php, NONE, 1.1 passwd.php, NONE, 1.1 sieveutils.class.php, NONE, 1.1

cvs at kolab.org cvs at kolab.org
Thu Aug 16 14:16:53 CEST 2007


Author: gunnar

Update of /kolabrepository/server/php-kolab/Kolab_Webadmin/Webadmin
In directory doto:/tmp/cvs-serv6190/Kolab_Webadmin/Webadmin

Added Files:
	auth.class.php authenticate.php debug.php form.class.php 
	headers.php ldap.class.php locale.php menu.php passwd.php 
	sieveutils.class.php 
Log Message:
Add the draft for the webadmin pear library. Add AUTHORS files to the pear packages.

--- NEW FILE: auth.class.php ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: authenticate.php ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: debug.php ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: form.class.php ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: headers.php ---
<?php
/*
 *  Copyright (c) 2004 Klaralvdalens Datakonsult AB
 *
 *    Writen by Steffen Hansen <steffen at klaralvdalens-datakonsult.se>
 *
 *  This  program is free  software; you can redistribute  it and/or
 *  modify it  under the terms of the GNU  General Public License as
 *  published by the  Free Software Foundation; either version 2, or
 *  (at your option) any later version.
 *
 *  This program is  distributed in the hope that it will be useful,
 *  but WITHOUT  ANY WARRANTY; without even the  implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 *  General Public License for more details.
 *
 *  You can view the  GNU General Public License, online, at the GNU
 *  Project's homepage; see <http://www.gnu.org/licenses/gpl.html>.
 */

header("Content-Type: text/html; charset=UTF-8");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");

// This is provided by config.php (at least I hope so)
//$topdir = '@webserver_web_prefix@/admin';
/*
  Local variables:
  mode: php
  indent-tabs-mode: t
  tab-width: 4
  buffer-file-coding-system: utf-8
  End:
  vim:encoding=utf-8:
 */
?>

--- NEW FILE: ldap.class.php ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: locale.php ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: menu.php ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: passwd.php ---
<?php
/* -------------------------------------------------------------------
   Copyright (c) 2004 Klaraelvdalens Datakonsult AB
   Copyright (C) 2007 by Intevation GmbH
   Author(s):
   Sascha Wilde <wilde at intevation.de>
   Steffen Hansen <steffen at klaralvdalens-datakonsult.se>

   This program is free software under the GNU GPL (>=v2)
   Read the file COPYING coming with the software for details.
   ------------------------------------------------------------------- */

// Generate OpenLDAP style SSHA password strings
function ssha($string, $salt)
{
  return "{SSHA}" . base64_encode(pack("H*", sha1($string . $salt)) . $salt);
}

// return 4 random bytes
function gensalt()
{
  $salt = '';
  while (strlen($salt) < 4)
    $salt = $salt . chr(mt_rand(0,255));
  return $salt;
}

// Check that passwords from form input match
function checkpw( $form, $key, $value ) {
  global $action;
  if( $action == 'firstsave' ) {
    if( $key == 'password_0' ) {
      if( $value == '' ) return _('Password is empty');
    } else if( $key == 'password_1' ) {
      if( $value != $_POST['password_0'] ) {
        return _('Passwords dont match');
      }
    }
  } else {
    if( $value != $_POST['password_0'] ) {
      return _('Passwords dont match');
    }
  }
  return '';
}

?>
--- NEW FILE: sieveutils.class.php ---
(This appears to be a binary file; contents omitted.)





More information about the commits mailing list