hallo,
ik heb gisteren een ecards systeem gedownload en geinstalleerd.
Nu, als ik een card naar me zelf stuur komt hij wel netjes aan krijg ook een link te zien waar ik de card kan bekijken, dan klik op de url om het te bekijken maar geeft dan het plaatje niet weer.
Als ik dan de url van het plaatje bekijk staat er images/.jpg. Dus tijdens het kiezen van het plaatje ziet hij niet volgens mij welke card ik kies wat kan de fout zijn?
Met dank
Alain.
functions.php
<?php
/***************************************************************************
* functions.php script-name: phpECard *
* --------------------------------------------------------------------- *
* version : 2.1.4 *
* script suport page : http://quick-xs.net/phpecard *
* author email : [email protected] *
* *
***************************************************************************
* *
* The complete functionality of the script is defined in this file. *
* ANYTHING YOU EDIT HERE CAN STOP THE SCRIPT FROM WORKING CORRECT! *
* *
***************************************************************************/
// First lets perform some required actions:
// Include configuration file (phpECard/config.php)
include($_GET['include_path'].'config.php');
// Include default language file
include($_GET['include_path'].'lang_'.$default_language.'.php');
global $lang;
// Function to make links in gallery
function makelink($image_name) {
return $_SERVER['PHP_SELF'].'?'.$_GET['preset_vars'].'card='.$image_name;
}
// Make sure that $action always is "compose" if not "send"
if ($_POST['action'] != 'send')
{
$action = 'compose';
}
// function to test email-syntax, used later on
function IsEmail($mail)
{
return ereg("[A-Za-z0-9_-]+([\.]{1}[A-Za-z0-9_-]+)*@[A-Za-z0-9-]+([\.]{1}[A-Za-z0-9-]+)+", $mail);
}
$_GET['index_url'] = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].'?'.$preset_vars;
$_GET['preview_link'] = $_SERVER['PHP_SELF'].'?'.$preset_vars.'id=preview_'.$default_language;
$_GET['include_path'] = $include_path;
$_GET['preset_vars'] = $preset_vars;
// check to see weither an id is defined
if ((IsSet($_GET['id'])) && ($_GET['id'] != ''))
{
// Check to see if id-datafile is present
if(file_exists($_GET['include_path'].'userdata/'.$_GET['id'].'.php'))
{
// Include the datafile and send confirmation back to sender if wanted
include($_GET['include_path'].'userdata/'.$_GET['id'].'.php'); global $id_info;
if ($id_info['notify'] == 'on')
{
$notify_mail_sender = $lang['dear'].' '.$id_info['s_name'].','."\n\n".$id_info['r_name'].' ('.$id_info['r_mail'].')'.$lang['recipient_has_seen']."\n\n".$lang['please_come_back']."\n".$_GET['index_url']."\n\n".$lang['regards']."\n\n".$service_name.' ('.$admin_email.')'.$add;
mail($id_info['s_mail'],$id_info['r_name'].$lang['notify_sender_subject'],$notify_mail_sender, "From: ".$service_name."<".$admin_email.">");
$CRD_info = '<?php $id_info = array(\'notify\' => \'off\',\'sub\' => \''.$id_info['sub'].'\',\'s_name\' => \''.$id_info['s_name'].'\',\'s_mail\' => \''.$id_info['s_mail'].'\',\'r_name\' => \''.$id_info['r_name'].'\',\'r_mail\' => \''.$id_info['r_mail'].'\',\'date\' => \''.$id_info['date'].'\',\'time\' => \''.$id_info['time'].'\',\'card\' => \''.$id_info['card'].'\',\'msg\' => \''.$id_info['msg'].'\', ); ?>';
fwrite(fopen($_GET['include_path'].'userdata/'.$_GET['id'].'.php',"w"),$CRD_info);
}
$card_info = $lang['card_to'].' <u>'.$id_info['r_name'].'</u> - '.$lang['sent_at'].' '.$id_info['date'].', '.$lang['at'].' '.$id_info['time'].$lang['hour'];
$template = 'view';
include($_GET['include_path'].'template.php');
}
// else id is not present
else
{
$template = 'id_error';
include($_GET['include_path'].'template.php');
}
}
// So if no id is defined... lets see weither to send or to compose?
else
{
if ($_POST['action'] == 'send')
{
// Check the variables for IsSet & syntaxis:
if ($_POST['subject'] == '')
{
$error1 = $lang['enter_subject'].'<br><br>';
}
if (($_POST['msg'] == '') or ($_POST['msg'] == $lang['type_msg']))
{
$error2 = $lang['enter_msg'].'<br><br>';
}
if (($_POST['sender_name'] == '') or ($_POST['sender_name'] == $lang['name_here']))
{
$error3 = $lang['enter_sender_name'].'<br><br>';
}
if ((!IsEmail($_POST['sender_email'])) or ($_POST['sender_email'] == ''))
{
$error4 = $lang['enter_sender_email'].'<br><br>';
}
if ($_POST['recipient_name'] == '')
{
$error5 = $lang['enter_recipient_name'].'<br><br>';
}
if ((!IsEmail($_POST['recipient_email'])) or ($_POST['recipient_email'] == ''))
{
$error6 = $lang['enter_recipient_email'].'<br><br>';
}
$error = $error1.$error2.$error3.$error4.$error5.$error6;
if ($error == '')
{
// So the form is submitted and there are no errors
// ... now we can save the data and email the recipient
$count = fread(fopen($_GET['include_path'].'userdata/count.txt',"r"),4096) + 1;
fwrite(fopen($_GET['include_path'].'userdata/count.txt',"w+"),$count);
$id = 'CRD'.date("ymdHi").$count;
$view_card_url = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].'?'.$_GET['preset_vars'].'id='.$id;
$CRD_info = '<?php $id_info = array(\'notify\' => \''.$_POST['notify_sender'].'\',\'sub\' => \''.htmlspecialchars($_POST['subject']).'\',\'s_name\' => \''.htmlspecialchars($_POST['sender_name']).'\',\'s_mail\' => \''.$_POST['sender_email'].'\',\'r_name\' => \''.htmlspecialchars($_POST['recipient_name']).'\',\'r_mail\' => \''.$_POST['recipient_email'].'\',\'date\' => \''.date("d-m-Y").'\',\'time\' => \''.date("H:i").'\',\'card\' => \''.$_POST['card'].'\',\'msg\' => \''.htmlspecialchars(stripslashes($_POST['msg'])).'\', ); ?>';
fwrite(fopen($_GET['include_path'].'userdata/'.$id.'.php',"w+"),$CRD_info);
$notify_mail_recipient = $lang['dear_recipient']."\n\n".$lang['sender_has_sent']."\n\n". $lang['get_card_here'] ."\n".$view_card_url."\n\n". $lang['time_limit']."\n\n". $lang['regards'] ."\n\n".$service_name.' ('.$admin_email.')'.$add;
mail($_POST['recipient_email'],$lang['notify_recipient_subject'],$notify_mail_recipient, "From: ".$service_name."<".$admin_email.">");
if ($_POST['notify_sender'] != 'on')
{
$lang['card_viewed_confirm'] = '';
}
$template = 'sent';
include($_GET['include_path'].'template.php');
}
// Else if no sending is wanted or if there are errors ...
elseif ($error != '')
{
$action = 'compose';
}
}
if ($action == 'compose')
{
if (((!IsSet($_GET['card'])) or ($_GET['card'] == '')) and ((!IsSet($_POST['card'])) or ($_POST['card'] == '')))
{
// Show gallery
include($_GET['include_path'].'_gallery.php');
}
else
{
// Check input fields for IsSet, if not assign defaults
if ((!IsSet($_POST['msg'])) or ($_POST['msg'] == ''))
{
$msg_echo = $lang['type_msg'];
}
else
{
$msg_echo = $_POST['msg'];
}
if ((!IsSet($_POST['sender_email'])) or ($_POST['sender_email'] == ''))
{
$sender_email_echo = $lang['email_here'];
}
else
{
$sender_email_echo = $_POST['sender_email'];
}
if ((!IsSet($_POST['sender_name'])) or ($_POST['sender_name'] == ''))
{
$sender_name_echo = $lang['name_here'];
}
else
{
$sender_name_echo = $_POST['sender_name'];
}
// Include compose-template
$template = 'compose';
include($_GET['include_path'].'template.php');
}
}
}
// Next line is a footer message to promote this script, please leave intact!
echo('<center><font style="color:#000000; font: 12px Arial;"><i>Powered by: <a href="http://www.quick-xs.net/phpecard" target="_blank">phpECard</a></i></font></center>');
?>
config.php:
<?php
/***************************************************************************
* config.php script-name: phpECard *
* --------------------------------------------------------------------- *
* version : 2.1 *
* script suport page : http://quick-xs.net/phpecard *
* author email : [email protected] *
* *
***************************************************************************
* *
* This is the config-file. Som values used to fit the script into your *
* website are defined here. U must edit the admin-settings for use *
* *
***************************************************************************/
// ADMIN SETTINGS - VERRY IMPORTANT! SET THESE VALUES CORRECT!
$service_name = 'E-Card service'; // Service name: is also mail sender
$title = 'E-Card service'; // Site title if script != included
$default_language = 'english'; // Name related to installed language-file
$admin_email = '[email protected]'; // Admin e-mail adress
$preset_vars = ''; // Define variables needed to open script; 'page=ecard&' (close with '&')
$stylesheet = ''; // If you do not include this script, you may define your stylesheet
// BASIC STYLE SETTINGS:
$font_family = 'Arial';
$font_size = '10pt';
$title_font_family = 'Arial'; // set font
$title_font_size = '18pt'; // set font size
$title_font_weight = 'bold'; // set font weight
$title_font_color = '#000088'; // set font color
$table_border_width = '1';
$table_border_color = '#000000';
$table_body_background_color = '';
$table_body_background_image = '';
$button_table_background_color = '#ECEDF0';
// ADVANCED STYLE SETTINGS:
$error_msg_style = 'font-family:Arial; font-size:12px; font-weight:bold;color:#880000;';
$title_style = 'font-family:Arial; font-size:18px; color:#000088; font-weight:bold;';
$subject_style = 'font-family:Arial Black; font-size:18px; color:#880000; font-weight:bold;';
$button_style = 'color:#000000; font: bold 11px Arial; border-color:#000000; border-width:1pt; background-color:#FFFFFF;';
$general_font = 'color:#000000; font: 12px Arial;';
$input_textarea = 'color:#000000; font: normal 13px Arial; border-color:#000000; border-width:1pt;';
?>
<?php
/***************************************************************************
* index.php script-name: phpECard *
* --------------------------------------------------------------------- *
* version : 2.1 *
* script suport page : http://quick-xs.net/phpecard *
* author email : [email protected] *
* *
***************************************************************************
* *
* This is the index-file. The root-file of phpECard. *
* *
***************************************************************************/
if ((!IsSet($include_path)) or ($include_path == '')) {
$template = 'html_header';
include('template.php'); }
// Please suport the project bij not adding this commercy:
$add = "\n\n\n____________\n".'E-Card script powered by: http://www.quick-xs.net/phpecard';;
include($include_path.'config.php');
include($include_path.'functions.php');
if ((!IsSet($include_path)) or ($include_path == '')) {
$template = 'html_footer';
include('template.php'); }
?>
213 views