File: index.php

package info (click to toggle)
horde-sam 0.1-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,292 kB
  • ctags: 363
  • sloc: php: 1,449; xml: 646; makefile: 64; sql: 60; sh: 30
file content (29 lines) | stat: -rw-r--r-- 991 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
/*
 * $Horde: sam/index.php,v 1.13 2006/01/01 21:11:49 jan Exp $
 *
 * Copyright 2002-2006 Chris Bowlby <excalibur@hub.org>
 *
 * See the enclosed file COPYING for license information (GPL).  If you
 * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
 */

define('SAM_BASE', dirname(__FILE__));
$sam_configured = (@is_readable(SAM_BASE . '/config/conf.php') &&
                   @is_readable(SAM_BASE . '/config/attributes.php') &&
                   @is_readable(SAM_BASE . '/config/backends.php'));

if (!$sam_configured) {
    require SAM_BASE . '/../lib/Test.php';
    Horde_Test::configFilesMissing('SAM', SAM_BASE,
        array('conf.php', 'backends.php'),
        array('attributes.php' => 'This file lists all of the form options ' .
                                  'available to SAM.'));
}

require_once SAM_BASE . '/lib/base.php';
if ($conf['enable']['rules']) {
    require SAM_BASE . '/spam.php';
} else {
    require SAM_BASE . '/blacklist.php';
}