Problème de scripte multi-langue
Posté : 21 oct. 2010, 23:31
Bonjour,
J'ai un scripte d'annonces de voitures d'occasions, le scripte est multi-langue (Allemand-français), toutes les fonctions (recherches, inscriptions, questionnaires) fonctionne dans la langue allemande mais pas en français. D'après mes informations, c'est une histoire d'accents et d'apostrophes. Ma table langue SQL est "utf8_unicode_ci" est les accents sont remplacés par les codes spécifiques mais le problème persiste.
Merci de votre aide
Voici un morceau de code
<? include("include/escape.php");?>
<? include("include/all.php");?>
<? include("include/lang.php");
define("PATH_DIR",str_replace("\\","/",dirname(__FILE__))."/");
?>
<?
$k = GetKey();
$ID = toGet($_GET['ID'], $_POST['ID']);
$miSend = toGet($_GET['miSend'], $_POST['miSend']);
$AddList = toGet($_GET['AddList'], $_POST['AddList']);
$Action = toGet($_GET['Action'], $_POST['Action']);
$ip = getenv(REMOTE_ADDR);
mysql_query("insert into t_visitors (PageType, IP, EstateID) values('Estate', '".$ip."', '".$ID."')");
if ($miSend != '') {
switch($Action) {
case 'AddList' :
if (IsHave("Select * from t_add_list where EstateID='".$ID."' and CookieID='".$_SESSION['UserID']."'") == 0) {
$sql = "insert into t_add_list (EstateID, CookieID, ADate) values ('".$ID."', '".$_SESSION['UserID']."', '".date("Y-m-d H:i:s")."')";
mysql_query($sql);
header("Location: advert_detail.php?ID=".$ID."");
}
/* if (!isset($_COOKIE['AddList'])) {
if (IsHave("Select * from t_add_list where EstateID='".$ID."' and CookieID='".session_id()."'") == 0) {
$sql = "insert into t_add_list (EstateID, CookieID, ADate) values ('".$ID."', '".session_id()."', '".date("Y-m-d H:i:s")."')";
mysql_query($sql);
setcookie("AddList", session_id(), time()+360000000);
header("Location: advert_detail.php?ID=".$ID."");
}
} else {
if (IsHave("Select * from t_add_list where EstateID='".$ID."' and CookieID='".$_COOKIE['AddList']."'") == 0) {
$sql = "insert into t_add_list (EstateID, CookieID, ADate) values ('".$ID."', '".$_COOKIE['AddList']."', '".date("Y-m-d H:i:s")."')";
mysql_query($sql);
}
}*/
break;
}
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<?
$sql = "select * from t_advert where ID='".$ID."'";
$qrPageInfo = mysql_query($sql);
$rsPageInfo = mysql_fetch_array($qrPageInfo);
?>
<title><?=($rsPageInfo['PageTitle']?str_replace('"', """, stripslashes($rsPageInfo['PageTitle'])):str_replace('"', """, stripslashes($SiteTitle)))?></title>
<META NAME="keywords" CONTENT="<?=($rsPageInfo['PageKeywords']?str_replace('"', """, stripslashes($rsPageInfo['PageKeywords'])):str_replace('"', """, stripslashes($SiteKeywords)))?>">
<META NAME="description" CONTENT="<?=($rsPageInfo['PageDesc']?str_replace('"', """, stripslashes($rsPageInfo['PageDesc'])):str_replace('"', """, stripslashes($SiteDesicription)))?>">
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style>
<link href="style/style.css" rel="stylesheet" type="text/css">
<script language="JavaScript" src="js/lib.js"></script>
<script language="JavaScript" src="js/src/dynapi.js"></script>
<script language="Javascript">
dynapi.library.setPath('js/src/');
dynapi.library.include('dynapi.library');
dynapi.library.include('dynapi.functions');
dynapi.library.include('dynapi.api');
</script>
<script language='JavaScript'>
<!--
function frmSubmitInfo() {
var frm = document.frmInfo;
Error = "";
validateNotEmpty(frm.first_last_name, '<?=($_SESSION['QuestionFirstLastName'])?>');
if (Error=='')
validateNotEmpty(frm.Phone, '<?=($_SESSION['QuestionPhone'])?>');
if (Error=='')
validateEmail(frm.Email, '<?=($_SESSION['QuestionEmail'])?>');
if (Error=='')
validateNotEmpty(frm.InfoMessages, '<?=($_SESSION['QuestionMess'])?>');
if (Error=='')
validateNotEmpty(frm.image_text, '<?=($_SESSION['QuestionConfirmCode'])?>');
if (Error=='')
return true;
else
alert(Error);
return false;
}
function myFormSubmitInfo() {
if (frmSubmitInfo() ) {
document.frmInfo.submit();
} else {
return false;
}
}
function frmSubmitFriend() {
var frm = document.frmFriend;
Error = "";
validateNotEmpty(frm.first_last_name, '<?=($_SESSION['QuestionFirstLastName'])?>');
if (Error=='')
validateNotEmpty(frm.first_last_name_friend, '<?=($_SESSION['QuestionFriendName'])?>');
if (Error=='')
validateEmail(frm.Email, '<?=($_SESSION['QuestionEmail'])?>');
if (Error=='')
validateEmail(frm.Email_Friend, '<?=($_SESSION['QuestionFriendEmail'])?>');
if (Error=='')
validateNotEmpty(frm.image_text, '<?=($_SESSION['QuestionConfirmCode'])?>');
if (Error=='')
return true;
else
alert(Error);
return false;
}
function myFormSubmitFriend() {
if (frmSubmitFriend() ) {
document.frmFriend.submit();
} else {
return false;
}
}
//-->
</script>
<script language="javascript">
function GetMessage(value) {
switch (value) {
case 1 :
document.getElementById("Message1").style.display = 'block';
document.getElementById("Message2").style.display = 'none';
break;
case 2 :
document.getElementById("Message2").style.display = 'block';
document.getElementById("Message1").style.display = 'none';
break;
}
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
function ChangeCurrency() {
if (document.getElementById("RentCurrency").value != document.getElementById("OrgRentCurrency").value) {
document.getElementById("ShowOrgPrice").style.display = 'block';
} else {
document.getElementById("ShowOrgPrice").style.display = 'none';
}
switch(document.getElementById("RentCurrency").value) {
case 'YTL':
switch(document.getElementById("OrgRentCurrency").value) {
case 'YTL': document.getElementById('ShowPrice').innerHTML = f.formatNumber(Math.ceil(document.getElementById("RentPrice").value),'#,##0'); break;
case 'USD': document.getElementById('ShowPrice').innerHTML = f.formatNumber(Math.ceil(document.getElementById("RentPrice").value*<?=($_SESSION['CurrencyUSD'])?>),'#,##0'); break;
case 'EUR': document.getElementById('ShowPrice').innerHTML = f.formatNumber(Math.ceil(document.getElementById("RentPrice").value*<?=($_SESSION['CurrencyEUR'])?>),'#,##0'); break;
case 'GBP': document.getElementById('ShowPrice').innerHTML = f.formatNumber(Math.ceil(document.getElementById("RentPrice").value*<?=($_SESSION['CurrencyGBP'])?>),'#,##0'); break;
}
break;
case 'USD':
switch(document.getElementById("OrgRentCurrency").value) {
case 'USD': document.getElementById('ShowPrice').innerHTML = f.formatNumber(Math.ceil(document.getElementById("RentPrice").value),'#,##0'); break;
case 'YTL': document.getElementById('ShowPrice').innerHTML = f.formatNumber(Math.ceil(document.getElementById("RentPrice").value*(1/<?=($_SESSION['CurrencyUSD'])?>)),'#,##0'); break;
case 'EUR': document.getElementById('ShowPrice').innerHTML = f.formatNumber(Math.ceil(document.getElementById("RentPrice").value*(<?=($_SESSION['CurrencyEUR'])?>/<?=($_SESSION['CurrencyUSD'])?>)),'#,##0'); break;
case 'GBP': document.getElementById('ShowPrice').innerHTML = f.formatNumber(Math.ceil(document.getElementById("RentPrice").value*(<?=($_SESSION['CurrencyGBP'])?>/<?=($_SESSION['CurrencyUSD'])?>)),'#,##0'); break;
}
break;
case 'EUR':
switch(document.getElementById("OrgRentCurrency").value) {
case 'EUR': document.getElementById('ShowPrice').innerHTML = f.formatNumber(Math.ceil(document.getElementById("RentPrice").value),'#,##0'); break;
case 'YTL': document.getElementById('ShowPrice').innerHTML = f.formatNumber(Math.ceil(document.getElementById("RentPrice").value*(1/<?=($_SESSION['CurrencyEUR'])?>)),'#,##0'); break;
case 'USD': document.getElementById('ShowPrice').innerHTML = f.formatNumber(Math.ceil(document.getElementById("RentPrice").value*(<?=($_SESSION['CurrencyUSD'])?>/<?=($_SESSION['CurrencyEUR'])?>)),'#,##0'); break;
case 'GBP': document.getElementById('ShowPrice').innerHTML = f.formatNumber(Math.ceil(document.getElementById("RentPrice").value*(<?=($_SESSION['CurrencyGBP'])?>/<?=($_SESSION['CurrencyEUR'])?>)),'#,##0'); break;
}
break;
case 'GBP':
switch(document.getElementById("OrgRentCurrency").value) {
case 'GBP': document.getElementById('ShowPrice').innerHTML = f.formatNumber(Math.ceil(document.getElementById("RentPrice").value),'#,##0'); break;
case 'YTL': document.getElementById('ShowPrice').innerHTML = f.formatNumber(Math.ceil(document.getElementById("RentPrice").value*(1/<?=($_SESSION['CurrencyGBP'])?>)),'#,##0'); break;
case 'USD': document.getElementById('ShowPrice').innerHTML = f.formatNumber(Math.ceil(document.getElementById("RentPrice").value*(<?=($_SESSION['CurrencyUSD'])?>/<?=($_SESSION['CurrencyGBP'])?>)),'#,##0'); break;
case 'EUR': document.getElementById('ShowPrice').innerHTML = f.formatNumber(Math.ceil(document.getElementById("RentPrice").value*(<?=($_SESSION['CurrencyEUR'])?>/<?=($_SESSION['CurrencyGBP'])?>)),'#,##0'); break;
}
}
}
</script>
</head>
<body>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" style="margin-top:-20px;">
<tr>
<td bgcolor="<?=($SiteBackColor)?>"> </td>
<td width="15"> </td>
<td width="770" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="390"><? include("top.php");?></td>
</tr>
<tr>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="189" valign="top"><? include("left.php");?></td>
<td width="4"><img src="images/spacer.gif" width="1" height="1"></td>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="20" bgcolor="<?=($MenuColor)?>"><table width="100%" height="20" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="3"><img src="images/spacer.gif" width="1" height="1"></td>
<td class="FontWhiteBold"><?=($_SESSION['EstateInfo'])?></td>
</tr>
</table></td>
</tr>
<tr>
<td height="5"><img src="images/spacer.gif" width="1" height="1"></td>
</tr>
<?
$sql = "select *,
(select t_properties.Name from t_advert, t_properties where t_advert.CityID=t_properties.ID and t_advert.ID='".$ID."') as estate_city,
(select t_properties.Name from t_advert, t_properties where t_advert.TownShipID=t_properties.ID and t_advert.ID='".$ID."') as estate_township,
(select t_properties.Name from t_advert, t_properties where t_advert.EstateStatus=t_properties.ItemID and t_properties.PageType='EstateStatus' and t_properties.PageLang='".$_SESSION['Lang']."' and t_advert.ID='".$ID."') as estate_status,
(select t_properties.Name from t_advert, t_properties where t_advert.EstateType=t_properties.ItemID and t_properties.PageType='EstateType' and t_properties.PageLang='".$_SESSION['Lang']."' and t_advert.ID='".$ID."') as estate_type,
(select t_properties.Name from t_advert, t_properties where t_advert.WarmingSystem=t_properties.ItemID and t_properties.PageType='WarmingSystem' and t_properties.PageLang='".$_SESSION['Lang']."' and t_advert.ID='".$ID."') as estate_warming_system,
(select t_properties.Name from t_advert, t_properties where t_advert.Ground=t_properties.ItemID and t_properties.PageType='Ground' and t_properties.PageLang='".$_SESSION['Lang']."' and t_advert.ID='".$ID."') as estate_ground,
(select t_properties.Name from t_advert, t_properties where t_advert.RoomType=t_properties.ItemID and t_properties.PageType='RoomType' and t_properties.PageLang='".$_SESSION['Lang']."' and t_advert.ID='".$ID."') as estate_room_type,
(select t_properties.Name from t_advert, t_properties where t_advert.FlatItem=t_properties.ItemID and t_properties.PageType='FlatItem' and t_properties.PageLang='".$_SESSION['Lang']."' and t_advert.ID='".$ID."') as estate_flat_item,
(select t_properties.Name from t_advert, t_properties where t_advert.CurrentFlat=t_properties.ItemID and t_properties.PageType='CurrentFlat' and t_properties.PageLang='".$_SESSION['Lang']."' and t_advert.ID='".$ID."') as estate_current_flat,
(select t_advert_images.Images from t_advert, t_advert_images where t_advert.ID=t_advert_images.ParentID and t_advert.ID='".$ID."' order by Seq asc LIMIT 0,1) as estate_images
from t_advert where ID='".$ID."'
";
$qrAdProperty = mysql_query($sql);
$rsProperty = mysql_fetch_array($qrAdProperty);
?>
<tr>
<td class="DefaultTextJust"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="320" height="240" valign="top"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top">
<span id="PageImage" style="display:block;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<?
$physical_image = $rsProperty['estate_images']."_small.jpg";
$chk_image_big = PATH_DIR.'images/estate/'.$physical_image;
if (file_exists($chk_image_big) )
{
if($rsProperty['estate_images']!="")
{
?>
<a href="javascript:popImage('images/estate/<?=($rsProperty['estate_images'])?>_big.jpg','Images','middle_center',true,false)">
<? if ($rsProperty['AdvertType'] == 2) { ?>
<img src="sold.php?str=<?=($_SESSION['Sold'])?>&img=images/estate/<?=($rsProperty['estate_images'])?>_normal.jpg" border="0">
<? } else { ?>
<img src="images/estate/<?=($rsProperty['estate_images'])?>_normal.jpg" border="0">
<? } ?>
</a>
<? }else{?>
<img src="images/estate/noimage_large.jpg" border="0">
<? } ?>
<? }else{ ?>
<img src="images/estate/noimage_large.jpg" border="0">
<? } ?>
</td>
</tr>
</table>
</span>
<span id="PageImageLoading" style="display:none;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="200" align="center"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><img src="images/loading.gif" width="16" height="16"></td>
</tr>
<tr>
<td height="20" align="center" class="BrownTextRegular"><?=($_SESSION['AllLoading'])?></td>
</tr>
</table></td>
</tr>
</table>
</span> </td>
</tr>
</table></td>
<td width="2"><img src="images/spacer.gif" width="1" height="1"></td>
<td valign="top"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="2">
<tr>
<td width="90" height="18" bgcolor="EFEFEF" class="BrownText10"> <?=($_SESSION['RefNo'])?></td>
<td bgcolor="EFEFEF" class="DefaultTextJust"> <?=($rsProperty['RefNo'])?></td>
</tr>
<tr>
<td height="18" bgcolor="EFEFEF" class="BrownText10"> <?=($_SESSION['CityName'] ." / ". $_SESSION['TownShip'])?></td>
<td bgcolor="EFEFEF" class="DefaultTextJust"> <?=($rsProperty['estate_city'] ." / ". $rsProperty['estate_township'])?> </td>
</tr>
<? if (trim($rsProperty['Location'])!='') { ?>
<tr>
<td height="18" bgcolor="EFEFEF" class="BrownText10"> <?=($_SESSION['Location'])?></td>
<td bgcolor="EFEFEF" class="DefaultTextJust"> <?=($rsProperty['Location'])?></td>
J'ai un scripte d'annonces de voitures d'occasions, le scripte est multi-langue (Allemand-français), toutes les fonctions (recherches, inscriptions, questionnaires) fonctionne dans la langue allemande mais pas en français. D'après mes informations, c'est une histoire d'accents et d'apostrophes. Ma table langue SQL est "utf8_unicode_ci" est les accents sont remplacés par les codes spécifiques mais le problème persiste.
Merci de votre aide
Voici un morceau de code
<? include("include/escape.php");?>
<? include("include/all.php");?>
<? include("include/lang.php");
define("PATH_DIR",str_replace("\\","/",dirname(__FILE__))."/");
?>
<?
$k = GetKey();
$ID = toGet($_GET['ID'], $_POST['ID']);
$miSend = toGet($_GET['miSend'], $_POST['miSend']);
$AddList = toGet($_GET['AddList'], $_POST['AddList']);
$Action = toGet($_GET['Action'], $_POST['Action']);
$ip = getenv(REMOTE_ADDR);
mysql_query("insert into t_visitors (PageType, IP, EstateID) values('Estate', '".$ip."', '".$ID."')");
if ($miSend != '') {
switch($Action) {
case 'AddList' :
if (IsHave("Select * from t_add_list where EstateID='".$ID."' and CookieID='".$_SESSION['UserID']."'") == 0) {
$sql = "insert into t_add_list (EstateID, CookieID, ADate) values ('".$ID."', '".$_SESSION['UserID']."', '".date("Y-m-d H:i:s")."')";
mysql_query($sql);
header("Location: advert_detail.php?ID=".$ID."");
}
/* if (!isset($_COOKIE['AddList'])) {
if (IsHave("Select * from t_add_list where EstateID='".$ID."' and CookieID='".session_id()."'") == 0) {
$sql = "insert into t_add_list (EstateID, CookieID, ADate) values ('".$ID."', '".session_id()."', '".date("Y-m-d H:i:s")."')";
mysql_query($sql);
setcookie("AddList", session_id(), time()+360000000);
header("Location: advert_detail.php?ID=".$ID."");
}
} else {
if (IsHave("Select * from t_add_list where EstateID='".$ID."' and CookieID='".$_COOKIE['AddList']."'") == 0) {
$sql = "insert into t_add_list (EstateID, CookieID, ADate) values ('".$ID."', '".$_COOKIE['AddList']."', '".date("Y-m-d H:i:s")."')";
mysql_query($sql);
}
}*/
break;
}
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<?
$sql = "select * from t_advert where ID='".$ID."'";
$qrPageInfo = mysql_query($sql);
$rsPageInfo = mysql_fetch_array($qrPageInfo);
?>
<title><?=($rsPageInfo['PageTitle']?str_replace('"', """, stripslashes($rsPageInfo['PageTitle'])):str_replace('"', """, stripslashes($SiteTitle)))?></title>
<META NAME="keywords" CONTENT="<?=($rsPageInfo['PageKeywords']?str_replace('"', """, stripslashes($rsPageInfo['PageKeywords'])):str_replace('"', """, stripslashes($SiteKeywords)))?>">
<META NAME="description" CONTENT="<?=($rsPageInfo['PageDesc']?str_replace('"', """, stripslashes($rsPageInfo['PageDesc'])):str_replace('"', """, stripslashes($SiteDesicription)))?>">
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style>
<link href="style/style.css" rel="stylesheet" type="text/css">
<script language="JavaScript" src="js/lib.js"></script>
<script language="JavaScript" src="js/src/dynapi.js"></script>
<script language="Javascript">
dynapi.library.setPath('js/src/');
dynapi.library.include('dynapi.library');
dynapi.library.include('dynapi.functions');
dynapi.library.include('dynapi.api');
</script>
<script language='JavaScript'>
<!--
function frmSubmitInfo() {
var frm = document.frmInfo;
Error = "";
validateNotEmpty(frm.first_last_name, '<?=($_SESSION['QuestionFirstLastName'])?>');
if (Error=='')
validateNotEmpty(frm.Phone, '<?=($_SESSION['QuestionPhone'])?>');
if (Error=='')
validateEmail(frm.Email, '<?=($_SESSION['QuestionEmail'])?>');
if (Error=='')
validateNotEmpty(frm.InfoMessages, '<?=($_SESSION['QuestionMess'])?>');
if (Error=='')
validateNotEmpty(frm.image_text, '<?=($_SESSION['QuestionConfirmCode'])?>');
if (Error=='')
return true;
else
alert(Error);
return false;
}
function myFormSubmitInfo() {
if (frmSubmitInfo() ) {
document.frmInfo.submit();
} else {
return false;
}
}
function frmSubmitFriend() {
var frm = document.frmFriend;
Error = "";
validateNotEmpty(frm.first_last_name, '<?=($_SESSION['QuestionFirstLastName'])?>');
if (Error=='')
validateNotEmpty(frm.first_last_name_friend, '<?=($_SESSION['QuestionFriendName'])?>');
if (Error=='')
validateEmail(frm.Email, '<?=($_SESSION['QuestionEmail'])?>');
if (Error=='')
validateEmail(frm.Email_Friend, '<?=($_SESSION['QuestionFriendEmail'])?>');
if (Error=='')
validateNotEmpty(frm.image_text, '<?=($_SESSION['QuestionConfirmCode'])?>');
if (Error=='')
return true;
else
alert(Error);
return false;
}
function myFormSubmitFriend() {
if (frmSubmitFriend() ) {
document.frmFriend.submit();
} else {
return false;
}
}
//-->
</script>
<script language="javascript">
function GetMessage(value) {
switch (value) {
case 1 :
document.getElementById("Message1").style.display = 'block';
document.getElementById("Message2").style.display = 'none';
break;
case 2 :
document.getElementById("Message2").style.display = 'block';
document.getElementById("Message1").style.display = 'none';
break;
}
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
function ChangeCurrency() {
if (document.getElementById("RentCurrency").value != document.getElementById("OrgRentCurrency").value) {
document.getElementById("ShowOrgPrice").style.display = 'block';
} else {
document.getElementById("ShowOrgPrice").style.display = 'none';
}
switch(document.getElementById("RentCurrency").value) {
case 'YTL':
switch(document.getElementById("OrgRentCurrency").value) {
case 'YTL': document.getElementById('ShowPrice').innerHTML = f.formatNumber(Math.ceil(document.getElementById("RentPrice").value),'#,##0'); break;
case 'USD': document.getElementById('ShowPrice').innerHTML = f.formatNumber(Math.ceil(document.getElementById("RentPrice").value*<?=($_SESSION['CurrencyUSD'])?>),'#,##0'); break;
case 'EUR': document.getElementById('ShowPrice').innerHTML = f.formatNumber(Math.ceil(document.getElementById("RentPrice").value*<?=($_SESSION['CurrencyEUR'])?>),'#,##0'); break;
case 'GBP': document.getElementById('ShowPrice').innerHTML = f.formatNumber(Math.ceil(document.getElementById("RentPrice").value*<?=($_SESSION['CurrencyGBP'])?>),'#,##0'); break;
}
break;
case 'USD':
switch(document.getElementById("OrgRentCurrency").value) {
case 'USD': document.getElementById('ShowPrice').innerHTML = f.formatNumber(Math.ceil(document.getElementById("RentPrice").value),'#,##0'); break;
case 'YTL': document.getElementById('ShowPrice').innerHTML = f.formatNumber(Math.ceil(document.getElementById("RentPrice").value*(1/<?=($_SESSION['CurrencyUSD'])?>)),'#,##0'); break;
case 'EUR': document.getElementById('ShowPrice').innerHTML = f.formatNumber(Math.ceil(document.getElementById("RentPrice").value*(<?=($_SESSION['CurrencyEUR'])?>/<?=($_SESSION['CurrencyUSD'])?>)),'#,##0'); break;
case 'GBP': document.getElementById('ShowPrice').innerHTML = f.formatNumber(Math.ceil(document.getElementById("RentPrice").value*(<?=($_SESSION['CurrencyGBP'])?>/<?=($_SESSION['CurrencyUSD'])?>)),'#,##0'); break;
}
break;
case 'EUR':
switch(document.getElementById("OrgRentCurrency").value) {
case 'EUR': document.getElementById('ShowPrice').innerHTML = f.formatNumber(Math.ceil(document.getElementById("RentPrice").value),'#,##0'); break;
case 'YTL': document.getElementById('ShowPrice').innerHTML = f.formatNumber(Math.ceil(document.getElementById("RentPrice").value*(1/<?=($_SESSION['CurrencyEUR'])?>)),'#,##0'); break;
case 'USD': document.getElementById('ShowPrice').innerHTML = f.formatNumber(Math.ceil(document.getElementById("RentPrice").value*(<?=($_SESSION['CurrencyUSD'])?>/<?=($_SESSION['CurrencyEUR'])?>)),'#,##0'); break;
case 'GBP': document.getElementById('ShowPrice').innerHTML = f.formatNumber(Math.ceil(document.getElementById("RentPrice").value*(<?=($_SESSION['CurrencyGBP'])?>/<?=($_SESSION['CurrencyEUR'])?>)),'#,##0'); break;
}
break;
case 'GBP':
switch(document.getElementById("OrgRentCurrency").value) {
case 'GBP': document.getElementById('ShowPrice').innerHTML = f.formatNumber(Math.ceil(document.getElementById("RentPrice").value),'#,##0'); break;
case 'YTL': document.getElementById('ShowPrice').innerHTML = f.formatNumber(Math.ceil(document.getElementById("RentPrice").value*(1/<?=($_SESSION['CurrencyGBP'])?>)),'#,##0'); break;
case 'USD': document.getElementById('ShowPrice').innerHTML = f.formatNumber(Math.ceil(document.getElementById("RentPrice").value*(<?=($_SESSION['CurrencyUSD'])?>/<?=($_SESSION['CurrencyGBP'])?>)),'#,##0'); break;
case 'EUR': document.getElementById('ShowPrice').innerHTML = f.formatNumber(Math.ceil(document.getElementById("RentPrice").value*(<?=($_SESSION['CurrencyEUR'])?>/<?=($_SESSION['CurrencyGBP'])?>)),'#,##0'); break;
}
}
}
</script>
</head>
<body>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" style="margin-top:-20px;">
<tr>
<td bgcolor="<?=($SiteBackColor)?>"> </td>
<td width="15"> </td>
<td width="770" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="390"><? include("top.php");?></td>
</tr>
<tr>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="189" valign="top"><? include("left.php");?></td>
<td width="4"><img src="images/spacer.gif" width="1" height="1"></td>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="20" bgcolor="<?=($MenuColor)?>"><table width="100%" height="20" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="3"><img src="images/spacer.gif" width="1" height="1"></td>
<td class="FontWhiteBold"><?=($_SESSION['EstateInfo'])?></td>
</tr>
</table></td>
</tr>
<tr>
<td height="5"><img src="images/spacer.gif" width="1" height="1"></td>
</tr>
<?
$sql = "select *,
(select t_properties.Name from t_advert, t_properties where t_advert.CityID=t_properties.ID and t_advert.ID='".$ID."') as estate_city,
(select t_properties.Name from t_advert, t_properties where t_advert.TownShipID=t_properties.ID and t_advert.ID='".$ID."') as estate_township,
(select t_properties.Name from t_advert, t_properties where t_advert.EstateStatus=t_properties.ItemID and t_properties.PageType='EstateStatus' and t_properties.PageLang='".$_SESSION['Lang']."' and t_advert.ID='".$ID."') as estate_status,
(select t_properties.Name from t_advert, t_properties where t_advert.EstateType=t_properties.ItemID and t_properties.PageType='EstateType' and t_properties.PageLang='".$_SESSION['Lang']."' and t_advert.ID='".$ID."') as estate_type,
(select t_properties.Name from t_advert, t_properties where t_advert.WarmingSystem=t_properties.ItemID and t_properties.PageType='WarmingSystem' and t_properties.PageLang='".$_SESSION['Lang']."' and t_advert.ID='".$ID."') as estate_warming_system,
(select t_properties.Name from t_advert, t_properties where t_advert.Ground=t_properties.ItemID and t_properties.PageType='Ground' and t_properties.PageLang='".$_SESSION['Lang']."' and t_advert.ID='".$ID."') as estate_ground,
(select t_properties.Name from t_advert, t_properties where t_advert.RoomType=t_properties.ItemID and t_properties.PageType='RoomType' and t_properties.PageLang='".$_SESSION['Lang']."' and t_advert.ID='".$ID."') as estate_room_type,
(select t_properties.Name from t_advert, t_properties where t_advert.FlatItem=t_properties.ItemID and t_properties.PageType='FlatItem' and t_properties.PageLang='".$_SESSION['Lang']."' and t_advert.ID='".$ID."') as estate_flat_item,
(select t_properties.Name from t_advert, t_properties where t_advert.CurrentFlat=t_properties.ItemID and t_properties.PageType='CurrentFlat' and t_properties.PageLang='".$_SESSION['Lang']."' and t_advert.ID='".$ID."') as estate_current_flat,
(select t_advert_images.Images from t_advert, t_advert_images where t_advert.ID=t_advert_images.ParentID and t_advert.ID='".$ID."' order by Seq asc LIMIT 0,1) as estate_images
from t_advert where ID='".$ID."'
";
$qrAdProperty = mysql_query($sql);
$rsProperty = mysql_fetch_array($qrAdProperty);
?>
<tr>
<td class="DefaultTextJust"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="320" height="240" valign="top"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top">
<span id="PageImage" style="display:block;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<?
$physical_image = $rsProperty['estate_images']."_small.jpg";
$chk_image_big = PATH_DIR.'images/estate/'.$physical_image;
if (file_exists($chk_image_big) )
{
if($rsProperty['estate_images']!="")
{
?>
<a href="javascript:popImage('images/estate/<?=($rsProperty['estate_images'])?>_big.jpg','Images','middle_center',true,false)">
<? if ($rsProperty['AdvertType'] == 2) { ?>
<img src="sold.php?str=<?=($_SESSION['Sold'])?>&img=images/estate/<?=($rsProperty['estate_images'])?>_normal.jpg" border="0">
<? } else { ?>
<img src="images/estate/<?=($rsProperty['estate_images'])?>_normal.jpg" border="0">
<? } ?>
</a>
<? }else{?>
<img src="images/estate/noimage_large.jpg" border="0">
<? } ?>
<? }else{ ?>
<img src="images/estate/noimage_large.jpg" border="0">
<? } ?>
</td>
</tr>
</table>
</span>
<span id="PageImageLoading" style="display:none;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="200" align="center"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><img src="images/loading.gif" width="16" height="16"></td>
</tr>
<tr>
<td height="20" align="center" class="BrownTextRegular"><?=($_SESSION['AllLoading'])?></td>
</tr>
</table></td>
</tr>
</table>
</span> </td>
</tr>
</table></td>
<td width="2"><img src="images/spacer.gif" width="1" height="1"></td>
<td valign="top"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="2">
<tr>
<td width="90" height="18" bgcolor="EFEFEF" class="BrownText10"> <?=($_SESSION['RefNo'])?></td>
<td bgcolor="EFEFEF" class="DefaultTextJust"> <?=($rsProperty['RefNo'])?></td>
</tr>
<tr>
<td height="18" bgcolor="EFEFEF" class="BrownText10"> <?=($_SESSION['CityName'] ." / ". $_SESSION['TownShip'])?></td>
<td bgcolor="EFEFEF" class="DefaultTextJust"> <?=($rsProperty['estate_city'] ." / ". $rsProperty['estate_township'])?> </td>
</tr>
<? if (trim($rsProperty['Location'])!='') { ?>
<tr>
<td height="18" bgcolor="EFEFEF" class="BrownText10"> <?=($_SESSION['Location'])?></td>
<td bgcolor="EFEFEF" class="DefaultTextJust"> <?=($rsProperty['Location'])?></td>