[ Index ] |
|
Code source de IMP H3 (4.1.5) |
1 <?php 2 /** 3 * Maintenance module that presents a TOS Agreement page to user. 4 * If user does not accept terms, user is not allowed to login. 5 * 6 * $Horde: imp/lib/Maintenance/Task/tos_agreement.php,v 1.11.10.8 2007/01/02 13:55:01 jan Exp $ 7 * 8 * Copyright 2002-2007 Michael Slusarz <slusarz@bigworm.colorado.edu> 9 * 10 * See the enclosed file COPYING for license information (GPL). If you 11 * did not receive this file, see http://www.fsf.org/copyleft/gpl.html. 12 * 13 * @author Michael Slusarz <slusarz@bigworm.colorado.edu> 14 * @since IMP 4.0 15 * @package Horde_Maintenance 16 */ 17 class Maintenance_Task_tos_agreement extends Maintenance_Task { 18 19 /** 20 * The style of the maintenance page output. 21 * 22 * @var integer 23 */ 24 var $_display_type = MAINTENANCE_OUTPUT_AGREE; 25 26 /** 27 * Determine if user agreed with the terms or not. If the user does not 28 * agree, log him/her out immediately. 29 */ 30 function doMaintenance() 31 { 32 $result = Util::getFormData('not_agree'); 33 if (isset($result)) { 34 header('Location: ' . Auth::addLogoutParameters(IMP::logoutUrl(), AUTH_REASON_MESSAGE, _("You did not agree to the Terms of Service agreement, so you were not allowed to login."))); 35 exit; 36 } 37 } 38 39 /** 40 * Returns the TOS agreement for display on the maintenance page. 41 * 42 * @return string The terms of service agreement. 43 */ 44 function describeMaintenance() 45 { 46 global $conf; 47 48 if (empty($conf['tos']['file'])) { 49 Horde::fatal(PEAR::raiseError(sprintf(_("Terms of Service file not specified in conf.php"))), __FILE__, __LINE__); 50 } 51 52 return file_get_contents($conf['tos']['file']); 53 } 54 55 }
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Thu Nov 29 12:30:07 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |