Source for file pnadmin.php
Documentation is available at pnadmin.php
* Zikula Application Framework
* @copyright (c) 2002, Zikula Development Team
* @link http://www.zikula.org
* @version $Id: pnadmin.php 24342 2008-06-06 12:03:14Z markwest $
* @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
* @package Zikula_System_Modules
* The main administration function
* This function is the default function, and is called whenever the
* module is initiated without defining arguments. As such it can
* be used for a number of things, but most commonly it either just
* shows the module menu and returns or calls whatever the module
* designer feels should be the default function (often this is the
* @author Mike Goldfinger <MikeGoldfinger@linuxmail.org>
* @link http://authldap.ch.vu
* @return string HTML ouptput
// Return the output that has been generated by this function
return $pnRender->fetch('authldap_admin_main.htm');
* This is a standard function to modify the configuration parameters of the
* @author Mike Goldfinger <MikeGoldfinger@linuxmail.org>
* @link http://authldap.ch.vu
* @return string HTML ouptput
* @todo change group list to dropdown
// Return the output that has been generated by this function
return $pnRender->fetch('authldap_admin_modifyconfig.htm');
* This is a standard function that is called with the results of the
* form supplied by template_admin_new() to create a new item
* @author Mike Goldfinger <MikeGoldfinger@linuxmail.org>
* @link http://authldap.ch.vu
* @param 'authldap_pnldap' the authentication type
* @param 'authldap_serveradr' the ip address of the ldap server
* @param 'basedn' base container in directory
* @param 'authldap_bindas' user to bind to directory as if required
* @param 'authldap_bindpass' password of user to bind as
* @param 'authldap_searchdn' search container
* @param 'authldap_searchattr' search the User using tis Attribute
* @return bool true if item created, false otherwise
// Confirm authorisation code.
// Update module variables.
pnModSetVar('AuthLDAP', 'authldap_pnldap', $authldap_pnldap);
pnModSetVar('AuthLDAP', 'authldap_serveradr', $authldap_serveradr);
pnModSetVar('AuthLDAP', 'authldap_basedn', $authldap_basedn);
pnModSetVar('AuthLDAP', 'authldap_bindas', $authldap_bindas);
pnModSetVar('AuthLDAP', 'authldap_bindpass', $authldap_bindpass);
pnModSetVar('AuthLDAP', 'authldap_searchdn', $authldap_searchdn);
pnModSetVar('AuthLDAP', 'authldap_searchattr', $authldap_searchattr);
// Let any other modules know that the modules configuration has been updated
pnModCallHooks('module','updateconfig', 'AuthLDAP', array('module' => 'AuthLDAP'));
// the module configuration has been updated successfuly
// This function generated no output, and so now it is complete we redirect
// the user to an appropriate page for them to carry on their work
|