[imp] $conf['user']['alternate_login']

Tjeerd van der Zee Tjeerd.vdzee@chello.nl
Wed, 5 Jun 2002 22:20:16 +0200


Hi, this should do the trick with the alternate login page.

index.html

<html>
<form action="hp.php" method="post" name="implogin">
<input type="hidden" name="actionID" value="105" />
<input type="hidden" name="redirect_url" value="" />
<input type="hidden" name="mailbox" value="INBOX" />
<font color="#CEDDF4" face="tahoma,arial" size="2">Webmail:<b><br>
User
<input name=imapuser tabindex=1 size="10" value="">
Password
<input type="password" tabindex="2" name="pass" size="10">
Realm
<select
name=realm><option>xar.nl</option><option>aequitas.dhs.org</option></select>
<input type="submit" class="button" name="button" tabindex="4" value="Log
in">
</html>

hp.php

<?
$imapuser = $_POST['imapuser'];
$pass = $_POST['pass'];
$realm = $_POST['realm'];
$imapuser = "$imapuser@$realm";

print ("
<html>
<head>
</head>
<body Onload=\"javascript:document.redirect.submit()\" >
<form name=redirect
action=\"http://computersoncall.com/horde/imp/redirect.php" method=post>
<input type=hidden name=actionID value=\"105\" />
<input type=hidden name=redirect_url value=\"\" />
<input type=hidden name=mailbox value=\"INBOX\" />
<input type=hidden name=imapuser value=$imapuser>
<input type=hidden name=pass value=$pass>
</form>
</body>
</html>
");
?>

With kind regards,

Tjeerd van der Zee


----- Original Message -----
From: "Chuck Hagenbuch" <chuck@horde.org>
To: <imp@lists.horde.org>
Sent: Wednesday, June 05, 2002 8:42 PM
Subject: Fwd: Re: [imp] $conf['user']['alternate_login']


>
>
> ----- Forwarded message from igor@zigabyte.com -----
>     Date: Wed,  5 Jun 2002 11:21:19 -0700
>     From: igor@zigabyte.com
> Reply-To: igor@zigabyte.com
>  Subject: Re: [imp] $conf['user']['alternate_login']
>       To: chuck@horde.org
>
> Hi Chuck,
>
> I have the default Horde and IMP configuration working fine.
> I'm trying to create an alternate login screen to my IMP, but I'm finding
> some
> problems.
>
> My code was meant to do the following:
>
> http://computersoncall.com/indexz.htm should post the user, pass and
server
> into
> horde/imp/hp.php that would resubmit the information
> into /horde/imp/redirect.php
>
> If I manually edit the file hp.php and enter my username and password it
> will
> log in my account! (note that this login was OK without the modifications
> suggested by you)
>
> this is the file called hp.php
> <html>
> <head>
> </head>
> <body Onload="javascript:document.redirect.submit()" >
> <form name=redirect
> action="http://computersoncall.com/horde/imp/redirect.php"
> method=post>
> <input type="hidden" name="actionID" value="105" />
> <input type="hidden" name="redirect_url" value="" />
> <input type="hidden" name="mailbox" value="INBOX" />
> <input type="hidden" name="folders" value="mail/" />
> <input type=hidden name=imapuser value="">
> <input type=hidden name=pass value="">
> <input type=hidden name=server value="">
> </form>
> </body>
> </html>
>
>
> But it looks like I'm having problem on getting the values from indexz.htm
> to
> hp.php.
>
> Which files should I modify?
> Do you know any sites that use a alternate login screen, so I can take a
> look
> on their source codes in order to learn.
>
>
>
>
>
> Thank you
>
> --Igor Ramos
>
>
>
> Quoting Frederic Trudeau <ftrudeau@cam.org>:
>
> > I included this ;
> >
> > <?
> > include_once('horde/imp/lib/base.php');
> > Secret::setKey('imp');
> > ?>
> >
> > It worked one time, and one time only. Go figure.
> >
> > Is this working on your side Chuck ?
>
> This bare-bones script works for me:
>
> <?php
>
> define('IMP_BASE', './horde/imp');
>
> require_once IMP_BASE . '/lib/base.php';
>
> /* Initialize the password key. */
> Secret::setKey('imp');
>
> ?>
>
> <form action="<?= Horde::url('horde/imp/redirect.php') ?>" method="post"
> name="implogin">
> Username: <input type="text" name="imapuser" value="" /><br />
> Password: <input type="password" tabindex="2" name="pass" /><br />
> <input type="hidden" name="server" value="imap1">
> <input type="submit">
> </form>
>
>
> -chuck
>
> --
> Charles Hagenbuch, <chuck@horde.org>
> "What was and what may be, lie, like children whose faces we cannot see,
in
> the
> arms of silence. All we ever have is here, now." - Ursula K. Le Guin
>
> --
> IMP mailing list: http://horde.org/imp/
> Archive: http://marc.theaimsgroup.com/?l=imp&r=1&w=2
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: imp-unsubscribe@lists.horde.org
>
>
>
>
> -------------------------------------------------
> This mail sent through IMP: http://horde.org/imp/
> ----- End forwarded message -----
>
>
> -chuck
>
> --
> Charles Hagenbuch, <chuck@horde.org>
> "What was and what may be, lie, like children whose faces we cannot see,
in
> the arms of silence. All we ever have is here, now." - Ursula K. Le Guin
>
> --
> IMP mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: imp-unsubscribe@lists.horde.org
>