<?php
// +---------------------------------------------------------------------------------------+
// | TenderSystem                                                                          |
// +---------------------------------------------------------------------------------------+
// | The contents of this file are subject to the TenderSystem Public License Version 1.1  |
// | ("License"); you may not use this file except in compliance with the License. You may |
// | obtain a copy of the License at http://www.tendersystem.com/tpl/                      |
// |                                                                                       |
// | Software distributed under the License is distributed on an "AS IS" basis, WITHOUT    |
// | WARRANTY OF ANY KIND, either express or implied. See the License for the specific     |
// | language governing rights and limitations under the License.                          |
// |                                                                                       |
// | All copies of the Covered Code must include the "Powered by TenderSystem" logo and    |
// | ValueCard copyright notice on every user interface screen and in every outgoing       |
// | email in the same form as they appear in the distribution.                            |
// |                                                                                       |
// | The Original Code is: TenderSystem                                                    |
// | The Initial Developer of the Original Code is ValueCard (Pty) Limited.                |
// | Portions created by ValueCard are Copyright (C) 2002 ValueCard (Pty) Limited.         |
// | All Rights Reserved.                                                                  |
// | Contributor(s): __________________.                                                   |
// +---------------------------------------------------------------------------------------+

///////////////////////////////////////////////////////////////////////////////////////////
// Purpose of file: Email Template
///////////////////////////////////////////////////////////////////////////////////////////
$subject = $lang['subject']." ".$suppliername;

$html = $lang['dear']." ".$suppliername;
$html.= "<br/><br/>";
$html.= $lang['youhavebeenratedby']." ";
$html.= "<a href=\"mailto:".$user_info['email']."\" TITLE=\"".$subject."\">".$user_info['name']." ".$user_info['surname']."</a>";
$html.= " ".$lang['from']." ".$orgname."(".$branchname.")";
if ($onbehalf) {
	$html.= ", ".$lang['onbehalfof']." ".$onbehalf_user['name']." ".$onbehalf_user['surname'];  	
}		
$html.= ".<br/><br/>";
$html.= $lang['pleaseseecommentrating'];
$html.= "<br/>";
// populate table
$html.= "<table width=\"70%\"  border=\"0\" cellpadding=\"2\" cellspacing=\"0\">";
$html.= "<tr>";
$html.= "<td class=\"h\" align=\"left\" colspan=\"2\">";
$html.= $lang['ratings'];
$html.= "</td>";
$html.= "</tr>";
$html.= "<tr>";
$html.= "<td class=\"h1b\" align=\"left\">";
$html.= $lang['clientservice'];
$html.= "</td>";
$html.= "<td class=\"h1c\" align=\"left\">";
$html.= $rating['first_rate'];
$html.= "</td>";
$html.= "</tr>";
$html.= "<tr>";
$html.= "<td class=\"h1b\" align=\"left\">";
$html.= $lang['stockavailability'];
$html.= "</td>";
$html.= "<td class=\"h1c\" align=\"left\">";
$html.= $rating['second_rate']; 
$html.= "</td>";
$html.= "</tr>";
$html.= "<tr>";
$html.= "<td class=\"h1b\" align=\"left\">";
$html.= $lang['rating'];
$html.= "</td>";
$html.= "<td class=\"h1c\" align=\"left\">";
$html.= (($rating['first_rate'] + $rating['second_rate']) / 2)." ".$lang['outof']." ".$cfg['rating']['outof']; 
$html.= "</td>";
$html.= "</tr>";			
$html.= "<td class=\"h1b\" align=\"left\">";
$html.= $lang['new']." ".$lang['overallrating'];
$html.= "</td>";
$html.= "<td class=\"h1c\" align=\"left\">";
$html.= $new_rating_value;
$html.= "</td>";
$html.= "</tr>";	
$html.= "<tr>";
if ($rating['rating_comment']) {
	$html.= "<td class=\"h1b\" align=\"left\">";
	$html.= $lang['comment'];
	$html.= "</td>";
	$html.= "<td class=\"h1c\" align=\"left\">";
	$html.= $rating['rating_comment'];
	$html.= "</td>";
	$html.= "</tr>";
}
$html.= "</table><br/>";		
?>