IMP 2.3.x page boilerplate

Paul Juliano paul@edsamail.com.ph
Wed, 7 Mar 2001 11:49:11 +0800


Hi,

I'm trying to add some php pages that I've made to IMP 2.3.7-cvs.  I just add the following lines at the top of the php page:

<?php
define('IMP_BASE', dirname(__FILE__));
require_once IMP_BASE . '/lib/base.php';
require IMP_BASE . '/config/servers.php';

/* Retrieve authentication information from session. */
session_name($conf['session_name']);
@session_start();

if (!isset($HTTP_SESSION_VARS['imp']) || !is_array($HTTP_SESSION_VARS['imp'])) {
    header('Location: ' . Horde::applicationUrl('login.php?reason=logout', true));
    exit;
}
IMP::setupSession();
IMP::authenticate(OP_HALFOPEN);
?>

Should these lines be enough for a boilerplate of every page I add?

Thanks.

__________________________________
www.edsamail.com


>From chuck@horde.org Date: Tue,  6 Mar 2001 23:06:35 -0500
Return-Path: <chuck@horde.org>
Mailing-List: contact imp-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list imp@lists.horde.org
Received: (qmail 86134 invoked from network); 7 Mar 2001 04:07:36 -0000
Received: from 208-59-250-206.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com (HELO marina.horde.org) (208.59.250.206)
  by horde.org with SMTP; 7 Mar 2001 04:07:36 -0000
Received: by marina.horde.org (Postfix, from userid 33)
	id 633B03CA6; Tue,  6 Mar 2001 23:06:35 -0500 (EST)
Received: from 192.168.0.110 ( [192.168.0.110])
	as user chuck@localhost by marina.your.mom with HTTP;
	Tue,  6 Mar 2001 23:06:35 -0500
Message-ID: <983937995.3aa5b3cb1d649@marina.your.mom>
Date: Tue,  6 Mar 2001 23:06:35 -0500
From: Chuck Hagenbuch <chuck@horde.org>
To: imp@lists.horde.org
MIME-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 2.3.7-cvs
Subject: Re: [imp] IMP 2.3.x page boilerplate

Quoting Paul Juliano <paul@edsamail.com.ph>:

> Should these lines be enough for a boilerplate of every page I add?

Yes, though it might be more than you need depending on what you're doing.

-chuck

--
Charles Hagenbuch, <chuck@horde.org>
"Live, from Washington, where the doctors were telling us what they did, and
 did not, do with Vice President Cheney." -Dan Rather