File: custom_login.php

package info (click to toggle)
imp4 4.1.3-4
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 14,988 kB
  • ctags: 3,720
  • sloc: xml: 17,038; php: 16,350; makefile: 64
file content (41 lines) | stat: -rw-r--r-- 1,479 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
30
31
32
33
34
35
36
37
38
39
40
41
<?php
// $Horde: imp/scripts/custom_login.php,v 1.6.10.2 2005/10/18 12:14:06 jan Exp $

// CUSTOMIZE THIS
define('IMP_BASE', '..');

define('AUTH_HANDLER', true);
$authentication = 'none';
require_once IMP_BASE . '/lib/base.php';
require_once IMP_BASE . '/config/servers.php';

/* Set up the password encryption token. */
Secret::setKey('imp');

/* Use the first server defined in servers.php. */
// CUSTOMIZE THIS

$server_key = 'localhost';

$server_value = $servers[$server_key]['server'];
$protocol_value = $servers[$server_key]['protocol'];
$port_value = $servers[$server_key]['port'];
$maildomain_value = $servers[$server_key]['maildomain'];
$realm_value = $servers[$server_key]['realm'];
$url = '/';
// $url = '/' . $registry->get('initial_page','horde');

?>

<!-- CUSTOMIZE THIS -->
<form action="<?php echo Horde::applicationUrl('redirect.php') ?>" method="post">
User: <input name="imapuser" type="text" size="20" /><br />
Pass: <input name="pass" type="password" size="20" /><br />
<input type="hidden" name="server" value="<?php echo $server_value ?>" />
<input type="hidden" name="protocol" value="<?php echo $protocol_value ?>" />
<input type="hidden" name="port" value="<?php echo $port_value ?>" />
<input type="hidden" name="maildomain" value="<?php echo $maildomain_value ?>" />
<input type="hidden" name="realm" value="<?php echo $realm_value ?>" />
<input type="hidden" name="url" value="<?php echo $url ?>" />
<input type="submit" value="Log in" />
</form>