<?php 
///////////// start promo /////////////
$sql = mysql_query("SELECT 
	locatie_cazare.id,
	locatie_cazare.tip_locatie, 
	locatie_cazare.clasificare, 
	locatie_cazare.denumire_locatie, 
	locatie_cazare.judet, 
	locatie_cazare.oras, 
	locatie_cazare.comuna,
	locatie_cazare.sat, 	
	locatie_cazare.promovare,
	locatie_cazare.status,
	foto_locatie.foto_mica, 
	foto_locatie.id_locatie 
		from 
	locatie_cazare INNER JOIN foto_locatie ON 
	locatie_cazare.id = foto_locatie.id_locatie 
		WHERE 
	locatie_cazare.promovare = 'PLATIT' 
		and 
	locatie_cazare.status = 'ACTIV' order by RAND() LIMIT 1");
	
while($locatie = mysql_fetch_row($sql)){

if ($locatie['7'] == null){
		if ($locatie['6'] == null){$loc1 = $locatie['5'];}else{$loc1 = $locatie['6'];}	
			}else{$loc1 = $locatie['7'];}
$url_loc = str_ireplace($ptr_url, '-', $loc1);	
$url_denumire = str_ireplace($ptr_url, '-', $locatie['3']);	

echo'<a href="http://'.$title.'/rezerva-cazare/cazare-'.strtolower($locatie['1']).'-'.strtolower($locatie['4']).'-'.strtolower($url_loc).'-'.strtolower($url_denumire).'-'.$locatie['0'].'.html" alt="Apasa pentru a vizualiza locatia - '.ucwords(strtolower($locatie['3'])).' - '.$title.'" title="Apasa pentru a vizualiza locatia - '.ucwords(strtolower($locatie['3'])).' - '.$title.'" >
<center>
	<fieldset id="fieldsetdreaptapromo">
	 <legend id="legenddreaptapromo" align="left">Promovat</legend>

<img id="fotopromo" src="http://www.ro-cazare.info/upload/foto_mica/'.$locatie['10'].'" title="Click si vezi detalii despre aceasta locatie de cazare - Portal de promovare turistica pentru locatii de cazare din Romania" alt="Click si vezi detalii despre aceasta locatie de cazare - Portal de promovare turistica pentru locatii de cazare din Romania" />
	<br />
<center><h3>'.ucwords(strtolower($locatie['3'])).'</h3></center>
'.ucwords(strtolower($locatie['1'])).' '.ucwords(strtolower($locatie['2'])).'<br />
'.ucwords(strtolower($locatie['4'])).' '.ucwords(strtolower($locatie['5'])).' '.ucwords(strtolower($locatie['6'])).'';
echo'<br />';
	$sql_tarife = mysql_query("SELECT * FROM `tarife_cazare` WHERE id_locatie = ".$locatie['0']."  order by pret desc limit 0,1");
		while($pret = mysql_fetch_row($sql_tarife)){	
$pret = $pret['7'];
echo'<p style="text-align: center; vertical-align: bottom; font-family : \'Rye\', cursive; font-size : 14px; color : #156CB9;">
		De la '.$pret.' Lei
	</p>';
		}
echo'</fieldset>
</center></a>';
}
///////////// end promo /////////////
///////////// start evaluare /////////////
if ($_GET['id'] != null){ 

$id_locatie = $_GET['id'];

echo'<center>
	<fieldset id="fieldsetdreapta">
	 <legend id="legenddreapta" align="left">Evalueaza locatia</legend>';
echo'<form method="post" action="index.php?pagina=comentarii">';
echo'<table border="0">';
	echo '<tr>
			<td colspan="2">
	<input name="nume" style="width: 142px;" type="text" value="nume (obligatoriu)" onfocus="if (this.value == \'nume (obligatoriu)\') {this.value = \'\';}" onblur="if (this.value == \'\') {this.value = \'nume (obligatoriu)\';}" />		
			</td>
		</tr>
		<tr>
			<td colspan="2">
	<input name="email" style="width: 142px;" type="text" value="email (obligatoriu)" onfocus="if (this.value == \'email (obligatoriu)\') {this.value = \'\';}" onblur="if (this.value == \'\') {this.value = \'email (obligatoriu)\';}" />		
			</td>
		</tr>
		<tr>
			<td>Amabilitate</td>
			<td align="right">
				<select name="amabilitate">
					<option value="1">1</option>
					<option value="2">2</option>
					<option value="3">3</option>
					<option value="4">4</option>
					<option value="5" selected>5</option>
					<option value="6">6</option>
					<option value="7">7</option>
					<option value="8">8</option>
					<option value="9">9</option>
					<option value="10">10</option>
				</select>	
			</td>
		</tr>
		<tr>
			<td>Calitate personal</td>
			<td align="right">
				<select name="personal">
					<option value="1">1</option>
					<option value="2">2</option>
					<option value="3">3</option>
					<option value="4">4</option>
					<option value="5" selected>5</option>
					<option value="6">6</option>
					<option value="7">7</option>
					<option value="8">8</option>
					<option value="9">9</option>
					<option value="10">10</option>
				</select>	
			</td>
		</tr>
		<tr>
			<td>Receptie</td>
			<td align="right">
				<select name="receptie">
					<option value="1">1</option>
					<option value="2">2</option>
					<option value="3">3</option>
					<option value="4">4</option>
					<option value="5" selected>5</option>
					<option value="6">6</option>
					<option value="7">7</option>
					<option value="8">8</option>
					<option value="9">9</option>
					<option value="10">10</option>
				</select>	
			</td>
		</tr>
		<tr>
			<td>Confort</td>
			<td align="right">
				<select name="confort">
					<option value="1">1</option>
					<option value="2">2</option>
					<option value="3">3</option>
					<option value="4">4</option>
					<option value="5" selected>5</option>
					<option value="6">6</option>
					<option value="7">7</option>
					<option value="8">8</option>
					<option value="9">9</option>
					<option value="10">10</option>
				</select>	
			</td>
		</tr>
		<tr>
			<td>Facilitati</td>
			<td align="right">
				<select name="facilitati">
					<option value="1">1</option>
					<option value="2">2</option>
					<option value="3">3</option>
					<option value="4">4</option>
					<option value="5" selected>5</option>
					<option value="6">6</option>
					<option value="7">7</option>
					<option value="8">8</option>
					<option value="9">9</option>
					<option value="10">10</option>
				</select>	
			</td>
		</tr>
		<tr>
			<td>Servicii</td>
			<td align="right">
				<select name="servicii">
					<option value="1">1</option>
					<option value="2">2</option>
					<option value="3">3</option>
					<option value="4">4</option>
					<option value="5" selected>5</option>
					<option value="6">6</option>
					<option value="7">7</option>
					<option value="8">8</option>
					<option value="9">9</option>
					<option value="10">10</option>
				</select>	
			</td>
		</tr>
		<tr>
			<td>Curatenie</td>
			<td align="right">
				<select name="curatenie">
					<option value="1">1</option>
					<option value="2">2</option>
					<option value="3">3</option>
					<option value="4">4</option>
					<option value="5" selected>5</option>
					<option value="6">6</option>
					<option value="7">7</option>
					<option value="8">8</option>
					<option value="9">9</option>
					<option value="10">10</option>
				</select>	
			</td>
		</tr>
		<tr>
			<td>Locatie</td>
			<td align="right">
				<select name="locatie">
					<option value="1">1</option>
					<option value="2">2</option>
					<option value="3">3</option>
					<option value="4">4</option>
					<option value="5" selected>5</option>
					<option value="6">6</option>
					<option value="7">7</option>
					<option value="8">8</option>
					<option value="9">9</option>
					<option value="10">10</option>
				</select>	
			</td>
		</tr>
		<tr>
			<td>Imprejurimi</td>
			<td align="right">
				<select name="imprejurimi">
					<option value="1">1</option>
					<option value="2">2</option>
					<option value="3">3</option>
					<option value="4">4</option>
					<option value="5" selected>5</option>
					<option value="6">6</option>
					<option value="7">7</option>
					<option value="8">8</option>
					<option value="9">9</option>
					<option value="10">10</option>
				</select>	
			</td>
		</tr>
		<tr>
			<td>Calitate / Pret</td>
			<td align="right">
				<select name="calitate">
					<option value="1">1</option>
					<option value="2">2</option>
					<option value="3">3</option>
					<option value="4">4</option>
					<option value="5" selected>5</option>
					<option value="6">6</option>
					<option value="7">7</option>
					<option value="8">8</option>
					<option value="9">9</option>
					<option value="10">10</option>
				</select>	
			</td>
		</tr>
		<tr>
			<td colspan="2">
				Pareri:	
			</td>
		</tr>
		<tr>
			<td colspan="2">
				<textarea name="comentarii" cols="15" rows="8"></textarea>	
			</td>
		</tr>
		<tr>
			<td colspan="2">
	Pareri pe email <input name="email_coment" type="checkbox" value="1" checked="yes" />
			</td>
		</tr>
		<tr>
			<td align="right">8+10=</td>
			<td align="left">
				<input name="cod_securitate" type="text" value="" size="2" />
			</td>
		</tr>
		<tr>
			<td colspan="2" align="center">
				<input name="conditie" type="hidden" value="10">
				<input name="id_locatie" type="hidden" value="'.$id_locatie.'">
				<input name="submit" type="submit" value="Finalizeaza">
			</td>
		</tr>';
echo'</table>
		</form>
</fieldset>
</center>';
}
///////////// end evaluare /////////////
?>