/*
* gCards - a web-based eCard application
* Copyright (C) 2003 Greg Neustaetter
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
session_start();
include_once('inc/UIfunctions.php');
include_once('config.php');
$page = new pagebuilder;
include_once('inc/setLang.php');
if (isset($_GET['imageid'])) $_SESSION['imageid'] = (int)$_GET['imageid'];
if (isset($_SESSION['reply'])) $_SESSION['to_email'] = $_SESSION['reply'];
createLocalFromSession('imageid');
createLocalFromSession('from_name');
createLocalFromSession('from_email');
createLocalFromSession('to_email');
createLocalFromSession('cardtext');
createLocalFromSession('sendOnPickup');
if (!$imageid)
{
$page->showHeader();
echo $compose02;
$page->showFooter();
exit;
}
else
{
include_once('inc/FCKeditor/fckeditor.php');
$page->showHeader();
include_once('inc/adodb/adodb.inc.php');
include_once('config.php');
$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
$conn = &ADONewConnection('mysql');
$conn->Connect($dbhost,$dbuser,$dbpass,$dbdatabase);
$sqlstmt = "select imageid, cardname, imagepath from ".$tablePrefix."cardinfo where imageid='$imageid'";
$recordSet = &$conn->Execute($sqlstmt);
if (!$recordSet)
print $conn->ErrorMsg();
else
{
$imageid = $recordSet->fields['imageid'];
$cardname = $recordSet->fields['cardname'];
$imagepath = $recordSet->fields['imagepath'];
echo $compose02;
?>