Zikula_System_Modules
[ class tree: Zikula_System_Modules ] [ index: Zikula_System_Modules ] [ all elements ]

Source for file pnadmin.php

Documentation is available at pnadmin.php

  1. <?php
  2. /**
  3.  * Zikula Application Framework
  4.  * @copyright (c) 2001, Zikula Development Team
  5.  * @link http://www.zikula.org
  6.  * @version $Id: pnadmin.php 24342 2008-06-06 12:03:14Z markwest $
  7.  * @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
  8.  * @package      Zikula_System_Modules
  9.  * @subpackage   AuthPN
  10.  * @author       Mark West
  11.  */
  12.  
  13. /**
  14.  * the main administration function
  15.  *
  16.  * This function is the default function, and is called whenever the
  17.  * module is called without defining arguments.
  18.  * As such it can be used for a number of things, but most commonly
  19.  * it either just shows the module menu and returns or calls whatever
  20.  * the module designer feels should be the default function (often this
  21.  * is the view() function)
  22.  *
  23.  * @author       The Zikula Development Team
  24.  * @return       output       The main module admin page.
  25.  */
  26. function AuthPN_admin_main()
  27. {
  28.     // Security check
  29.     if (!SecurityUtil::checkPermission('AuthPN::''::'ACCESS_EDIT)) {
  30.         return LogUtil::registerPermissionError();
  31.     }
  32.  
  33.     // create an output object
  34.     $pnRender pnRender::getInstance('AuthPN'false);
  35.  
  36.     // Return the output that has been generated by this function
  37.     return $pnRender->fetch('authpn_admin_main.htm');
  38. }
  39.  
  40. /**
  41.  * Modify configuration
  42.  *
  43.  * This is a standard function to modify the configuration parameters of the
  44.  * module
  45.  *
  46.  * @author       The Zikula Development Team
  47.  * @return       output       The configuration page
  48.  */
  49. {
  50.     // Security check
  51.     if (!SecurityUtil::checkPermission('AuthPN::''::'ACCESS_ADMIN)) {
  52.         return LogUtil::registerPermissionError();
  53.     }
  54.  
  55.     // Create output object
  56.     $pnRender pnRender::getInstance('AuthPN'false);
  57.  
  58.     // Assign all module variables
  59.     $pnRender->assign(pnModGetVar('AuthPN'));
  60.  
  61.     // Return the output that has been generated by this function
  62.     return $pnRender->fetch('authpn_admin_modifyconfig.htm');
  63. }
  64.  
  65. /**
  66.  * Update the configuration
  67.  *
  68.  * This is a standard function to update the configuration parameters of the
  69.  * module given the information passed back by the modification form
  70.  * Modify configuration
  71.  *
  72.  * @author       The Zikula Development Team
  73.  * @param        bold           print items in bold
  74.  * @param        itemsperpage   number of items per page
  75.  */
  76. {
  77.     // Security check
  78.     if (!SecurityUtil::checkPermission('AuthPN::''::'ACCESS_EDIT)) {
  79.         return LogUtil::registerPermissionError();
  80.     }
  81.  
  82.     // confirm the forms auth key
  83.     if (!SecurityUtil::confirmAuthKey()) {
  84.         return LogUtil::registerAuthidError (pnModURL('AuthPN''admin''main'));
  85.     }
  86.  
  87.     $authmodules FormUtil::getPassedValue('authmodules''AuthPN''POST');
  88.     pnModSetVar('AuthPN''authmodules'$authmodules);
  89.  
  90.     // Let any other modules know that the modules configuration has been updated
  91.     pnModCallHooks('module','updateconfig''AuthPN'array('module' => 'AuthPN'));
  92.  
  93.     // the module configuration has been updated successfuly
  94.  
  95.     return pnRedirect(pnModURL('AuthPN''admin''main'));
  96. }

Documentation generated on Fri, 18 Jul 2008 21:51:32 +0200 by phpDocumentor 1.4.1