[ Index ]
 

Code source de eGroupWare 1.2.106-2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/wiki/ -> index.php (source)

   1  <?php
   2  /**************************************************************************\
   3  * eGroupWare Wiki - UserInterface                                       *
   4  * http://www.egroupware.org                                                *
   5  * -------------------------------------------------                        *
   6  * Copyright (C) 2004 RalfBecker@outdoor-training.de                        *
   7  * --------------------------------------------                             *
   8  *  This program is free software; you can redistribute it and/or modify it *
   9  *  under the terms of the GNU General Public License as published by the   *
  10  *  Free Software Foundation; either version 2 of the License, or (at your  *
  11  *  option) any later version.                                              *
  12  \**************************************************************************/
  13  
  14  /* $Id: index.php 20988 2006-04-06 11:09:19Z ralfbecker $ */
  15  
  16  if (isset($_GET['action']))    // calling the old code
  17  {
  18      include ('lib/main.php');
  19      exit;    
  20  }
  21  else
  22  {
  23      /**
  24       * Check if we allow anon access and with which creditials
  25       * 
  26       * @param array &$anon_account anon account_info with keys 'login', 'passwd' and optional 'passwd_type'
  27       * @return boolean true if we allow anon access, false otherwise
  28       */
  29  	function wiki_check_anon_access(&$anon_account)
  30      {
  31          $c =& CreateObject('phpgwapi.config','wiki');
  32          $c->read_repository();
  33          $config =& $c->config_data;
  34          unset($c);
  35      
  36          if ($config['allow_anonymous'] && $config['anonymous_username'])
  37          {
  38              $anon_account = array(
  39                  'login'  => $config['anonymous_username'],
  40                  'passwd' => $config['anonymous_password'],
  41                  'passwd_type' => 'text',
  42              );
  43              return true;
  44          }
  45          return false;
  46      }
  47  }
  48  // uncomment the next line if wiki should use a eGW domain different from the first one defined in your header.inc.php
  49  // and of cause change the name accordingly ;-)
  50  // $GLOBALS['egw_info']['user']['domain'] = $GLOBALS['egw_info']['server']['default_domain'] = 'developers';
  51  
  52  $GLOBALS['egw_info']['flags'] = array(
  53      'disable_Template_class' => True,
  54      'noheader'  => True,
  55      'currentapp' => 'wiki',
  56      'autocreate_session_callback' => 'wiki_check_anon_access',
  57  );
  58  include('../header.inc.php');
  59  
  60  ExecMethod('wiki.uiwiki.view');
  61  
  62  // Expire old versions, etc.
  63  $GLOBALS['uiwiki']->maintain();


Généré le : Sun Feb 25 17:20:01 2007 par Balluche grâce à PHPXref 0.7