<?php
/***************************************************************************
 *  template.php                                    script-name: phpECard  *
 *  ---------------------------------------------------------------------  *
 *  version                  : 2.1                                         *
 *  script suport page       : http://quick-xs.net/phpecard                *
 *  author email             : phpecard@quick-xs.net                       *
 *                                                                         *
 ***************************************************************************
 *                                                                         *
 *  Most of the eventually html-output can be edited in the parts below.   *
 *                                                                         *
 ***************************************************************************/

//
// COMPOSE CARD
//
// =========================================================================
if ($template == 'compose') { $output = '
<!---   START COMPOSE BODY (edit nothing above this line)   --->

	<script LANGUAGE="JavaScript">
	var n = (document.layers) ? 1:0; var ie = (document.all) ? 1:0; var browser=((n || ie) && parseInt(navigator.appVersion)>=4)  
	// Browser = True when version >= 4
	// n = true when netscape
	//ie = true when ms-iexplorer
	    function tag_onfocus() {
		if (ie) {
			document.activeElement.select(); } }
	//-->
	</script>

	<font style="'.$title_style.'">'.$lang['compose'].'</font>
	<hr>
	<table border="0" width="100%" bgcolor="#ECEDF0">
	<form action="'.$PHP_SELF.'?'.$_GET['preset_vars'].'" method="POST"><input type="hidden" name="card" value="'.$card.'"><input type="hidden" name="action" value="send"><input type="hidden" name="language" value="'.$_GET['language'].$_POST['language'].'">
	<tr>
		<td> 		
		&nbsp;<input type="button" class="button" value=" '.$lang['other_card'].' " onclick="window.location.href=\''.$PHP_SELF.'?'.$_GET['preset_vars'].'\'" style="'.$button_style.'">
		</td>
		<td align="right">
		<input type="button" class="buttonlite" value=" '.$lang['cancel'].' " onclick="javascript:history.go(-1)" style="'.$button_style.'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT type="reset" class="buttonlite" value=" '.$lang['reset'].' " style="'.$button_style.'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT type="submit" class="button" value=" '.$lang['send'].' " class="plaats" style="'.$button_style.'">&nbsp;
		</td>
	</tr>
	</table>

	<center>
	<br>
	<b><font style="'.$error_msg_style.'">'.$error.'</font></b>

	<table border="0" cellspacing="'.$table_border_width.'" cellpadding="0" bgcolor="'.$table_border_color.'" width="365">
		<tr>
			<td bgcolor="#0080C0">
			<center><img src="'.$include_path.'images/'.$_GET['card'].'.jpg" width="365"></center>
		</td>
	</tr>
	<tr>
		<td bgcolor="#FFFFFF">
		<table width="100%" cellspacing="0" cellpadding="7" background="'.$include_path.'images/paper.jpg">
		<tr>
			<td width="65%">
			<font style="'.$general_font.'">'.$lang['subject'].':</font><br>
			<input name="subject" size="22" value="'.htmlspecialchars($subject).'" onFocus="tag_onfocus();" style="'.$input_textarea.'"><br><br>
			<textarea name="msg" rows="8" cols="25" maxlength="400" onFocus="tag_onfocus();" style="'.$input_textarea.'">'.htmlspecialchars(stripslashes($msg_echo)).'</textarea>
			<font style="font-size:7pt;">'.$lang['htmlspecialchars'].'</font><br><br>
			<font style="'.$general_font.'"><b>'.$lang['sender'].':</b></font><br>
			<input name="sender_name" size="20" value="'.htmlspecialchars($sender_name_echo).'" onFocus="tag_onfocus();" style="'.$input_textarea.'">&nbsp;<br>
			<input name="sender_email" size="20" value="'.$sender_email_echo.'" onFocus="tag_onfocus();" style="'.$input_textarea.'">&nbsp;
			</td>
			<td width="35%" valign="top"><font style="'.$general_font.'">
			<p align="right"><a href="http://www.quick-xs.net/phpecard" target="_blank"><img src="'.$include_path.'images/phpecard.gif" border="0"></a><br><br></p>
			<font style="'.$general_font.'">'.$lang['to_name'].':</font><br><input name="recipient_name" size="20" value="'.htmlspecialchars($recipient_name).'" style="'.$input_textarea.'"><br><br>
			<font style="'.$general_font.'">'.$lang['to_email'].':</font><br><input name="recipient_email" size="20" value="'.$recipient_email.'" style="'.$input_textarea.'">
			</td>
		</tr>
		</table>
		</td>
	</tr>
	</table>
	<input type="checkbox" name="notify_sender" checked="'.$checked.'"> <font style="'.$general_font.'">'.$lang['inform_me'].'.</font>
	<br><br>
	<table border="0" width="100%" bgcolor="#ECEDF0">
	<tr>
		<td>		
		&nbsp;<input type="button" class="button" value=" '.$lang['other_card'].' " onclick="window.location.href=\''.$PHP_SELF.'?'.$_GET['preset_vars'].'\'" style="'.$button_style.'">
		</td>
		<td align="right">
		<input type="button" class="buttonlite" value=" '.$lang['cancel'].' " onclick="javascript:history.go(-1)" style="'.$button_style.'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT type="reset" class="buttonlite" value=" '.$lang['reset'].' " style="'.$button_style.'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT type="submit" class="button" value=" '.$lang['send'].' " class="plaats" style="'.$button_style.'">&nbsp;
		</td>
	</tr></FORM>
	</table>
	</center>
	<hr>



<!---   END COMPOSE BODY (edit nothing under this line)   --->
'; }
// =========================================================================





//
// SENT CONFIRMATION MESSAGE
//
// =========================================================================
if ($template == 'sent') { $output = '
<!---   START CONFIRMATION BODY (edit nothing above this line)   --->



	<font style="'.$title_style.'">'.$lang['card_sent'].'</font>
	<hr>
	
	<font style="'.$general_font.'">
	<b>'.$lang['ur_card_to'].' <u>'.$recipient_name.'</u> '.$lang['sending'].'.</b><br>
	<br>
	'.$lang['mail_to'].'<b>'.$_POST['recipient_name'].'</b>.<br> '.$lang['catch_msg'].'<br>'.$lang['card_viewed_confirm'].'</b>
	<br>
	<br>
	<br>&#187; <a href="'.$_GET['index_url'].'">'.$lang['back_index'].'</a>
	<br><hr>
	</font>



<!---   END CONFIRMATION BODY (edit nothing under this line)   --->
'; }
// =========================================================================





//
// ID-ERROR
//
// =========================================================================
if ($template == 'id_error') { $output = '
<!---   START ID_ERROR BODY (edit nothing above this line)   --->

	<font style="'.$title_style.'">'.$lang['id_error'].'</font>
	<hr>


	<b>'.$lang['unknown_id'].'</b> <br><br>
	'.$lang['over_date'].'<br><br>
	'.$lang['other_error_suport'].'<br><br>
	'.$lang['excuse'].'<br><br>


<!---   END ID_ERROR BODY (edit nothing under this line)   --->
'; }
// =========================================================================







//
// VIEW CARD
//
// =========================================================================
if ($template == 'view') { 
$output = '
<!---   START VIEWING BODY (edit nothing above this line)   --->



	<font style="'.$general_font.'">
	<font style="'.$title_style.'">'.$lang['view_card'].'</font>
	<hr>
	<table border="0" width="100%" bgcolor="#ECEDF0">
	<tr>
		<td>		
		  <center><font style="'.$general_font.'"><b>'.$card_info.'.</b></font></center>
		</td>
	</tr>
	</table>

	<center>
	<br>
	<font style="'.$subject_style.'">'.$id_info['sub'].'</font>

	<table border="0" cellspacing="'.$table_border_width.'" cellpadding="0" bgcolor="'.$table_border_color.'" width="365">
		<tr>
			<td bgcolor="#0080C0">
			<center><img src="'.$include_path.'images/'.$id_info['card'].'.jpg"></center>
		</td>
	</tr>
	<tr>
		<td bgcolor="#FFFFFF">
		<table width="100%" cellspacing="0" cellpadding="7" background="'.$include_path.'images/paper.jpg">
		<tr>
			<td width="55%"><font style="'.$general_font.'">
			<b>'.$id_info['sub'].'</b><br><br>
			'.nl2br($id_info['msg']).'<br><br>
			<b>'.$lang['sender'].':</b><br>
			'.$id_info['s_name'].'<br>
			'.$id_info['s_mail'].'<br>
			</font></td>
			<td height="100%">
			<table cellspacing="0" cellpadding="0" border="0" height="100%" width="1"><tr><td width="1" bgcolor="#CCCCCC"> </td></tr></table>
			</td>
			<td width="45%" valign="top"><font style="'.$general_font.'">
			<p align="right"><a href="http://www.quick-xs.net/phpecard" target="_blank"><img src="'.$_GET['include_path'].'images/phpecard.gif" border="0"></a><br><br></p>
			<b>'.$id_info['r_name'].'</b><br>
			<b>'.$id_info['r_mail'].'</b><br><br><br><br><br><br>
			</td>
		</tr>
		</table>
		</td>
	</tr>
	</table>
	</center>
	<br><br><br>
	&#187; <a href="'.$_GET['index_url'].'">'.$lang['invite_send'].'</a>
	</font>
	<hr>
	
	
<!---   END VIEWING BODY (edit nothing under this line)   --->
'; }
// =========================================================================





//
// HTML HEADER
//
// =========================================================================
if ($template == 'html_header') { 
$output = '
	<html>
	<head>
	<title>'.$title.'</title>
	<link rel="stylesheet" href="'.$stylesheet.'" type="text/css">
	</head>
	<body>
		<style>
		body {	
			}
		</style>
'; }
// =========================================================================





//
// HTML FOOTER
//
// =========================================================================
if ($template == 'html_footer') { 
$output = '
	</body>
	</html>
'; }
// =========================================================================








// return the wanted html-output
echo($output);

?>