File: setup.php

package info (click to toggle)
postfixadmin 3.3.15%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 3,816 kB
  • sloc: php: 10,120; perl: 1,069; sh: 643; python: 169; xml: 62; sql: 3; makefile: 2
file content (63 lines) | stat: -rw-r--r-- 2,137 bytes parent folder | download | duplicates (2)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php

// vim:ts=4:sw=4:et
if (!defined('SM_PATH')) {
    die("Invalid internal state (don't access file directly)");
}
include_once(SM_PATH . 'functions/i18n.php');

function squirrelmail_plugin_init_postfixadmin() {
    include(dirname(__FILE__) . '/config.php');
    global $squirrelmail_plugin_hooks;

    $squirrelmail_plugin_hooks['optpage_register_block']['postfixadmin'] = 'postfixadmin_optpage_register_block';
}

function postfixadmin_version() {
    return '2.3.0';
}

function postfixadmin_optpage_register_block() {
    // Gets added to the user's OPTIONS page.
    global $optpage_blocks;
    global $AllowVacation;
    global $AllowChangePass;

    //  if ( !soupNazi() ) {

    bindtextdomain('postfixadmin', SM_PATH . 'plugins/postfixadmin/locale');
    textdomain('postfixadmin');
    $optpage_blocks[] = array(
        'name' => _("Forwarding"),
        'url'  => '../plugins/postfixadmin/postfixadmin_forward.php',
        'desc' => _("Here you can create and edit E-Mail forwards."),
        'js'   => false
    );
    bindtextdomain('squirrelmail', SM_PATH . 'locale');
    textdomain('squirrelmail');

    bindtextdomain('postfixadmin', SM_PATH . 'plugins/postfixadmin/locale');
    textdomain('postfixadmin');
    if ($AllowVacation) {
        $optpage_blocks[] = array(
            'name' => _("Auto Response"),
            'url'  => '../plugins/postfixadmin/postfixadmin_vacation.php',
            'desc' => _("Set an OUT OF OFFICE message or auto responder for your mail."),
            'js'   => false
        );
        bindtextdomain('squirrelmail', SM_PATH . 'locale');
        textdomain('squirrelmail');
    }
    bindtextdomain('postfixadmin', SM_PATH . 'plugins/postfixadmin/locale');
    textdomain('postfixadmin');
    if ($AllowChangePass) {
        $optpage_blocks[] = array(
            'name' => _("Change Password"),
            'url'  => '../plugins/postfixadmin/postfixadmin_changepass.php',
            'desc' => _("Change your mailbox password."),
            'js'   => false
        );
        bindtextdomain('squirrelmail', SM_PATH . 'locale');
        textdomain('squirrelmail');
    }
}