Ejemplo n.º 1
0
            $clean[$key] = trim($value);
        }
        $sql .= "AND (A.id=" . implode(" OR A.id=", $clean) . ") ";
    }
    if ($Strada != "") {
        $sql .= "AND S.Denumire LIKE '%" . str_replace("%20", " ", $Strada) . "%' ";
    }
    if ($Agent != "") {
        $sql .= "AND U.id=" . $Agent . " ";
    }
    if ($Proprietar != "") {
        $sql .= "AND ((C.Nume LIKE '%" . $Proprietar . "%') OR (C.Prenume LIKE '%" . $Proprietar . "%')) ";
    }
    $sql .= "ORDER BY O.DataActualizare " . ($tipSortareActualizare == 1 ? "DESC" : "");
    //echo htmlentities($sql);
    $ofertaList = $oferta->find_by_sql($sql);
    if (!empty($ofertaList)) {
        ?>
	<div id="oferte" class="view">
		<h3>Oferte gasite</h3>
		<table width="100%">
			<tr >
				<td class="header" align="center" width="5%">Cod</td>
				<td class="header" align="center" width="10%">Camere</td>
				<td class="header" width="70%">Detalii</td>
				<td class="header" align="center" width="10%"><?php 
        echo $tipOferta == 1 ? "Pret" : "Chirie";
        ?>
</td>
				<td class="header" align="center" width="5%">Foto</td>
			</tr>
Ejemplo n.º 2
0
    $record["Descriere"] = $tmp->Descriere;
    $record["idCategorieDotari"] = $tmp->idCategorieDotari;
    $record["Implicit"] = $tmp->Implicit;
    $sql .= "('" . join("', '", array_values($record)) . "'),";
}
$sql = substr($sql, 0, strlen($sql) - 1);
$result = execute_querry($sql, $conexiune2);
$ftp_file = array();
$sql_proprietate = "INSERT INTO Proprietate (id,idSubzona,idAgent,TipProprietate,Titlu,Descriere,Vanzare,";
$sql_proprietate .= "Inchiriere,Pret,PretChirie,Moneda,NumarCamere,Confort,TipApartament,Etaj,EtajeBloc,";
$sql_proprietate .= "TipConstructie,NrGrupuriSanitare,NumarBalcoane,SuprafataTerasa,CodBazaDate,AnConstructie,";
$sql_proprietate .= "DataActualizare,SuprafataUtila,SuprafataConstruita,OfertaSpeciala) VALUES ";
$sql_dotare = "INSERT INTO DotareApartament (idApartament,idDotare) VALUES ";
$sql_foto = "INSERT INTO Foto (idProprietate, NumeFisier, Tip, Marime, Detalii, Ordin, Schita) VALUES ";
$sql = "SELECT * FROM Oferta WHERE (Exportat<>1 OR Exportat=NULL)";
$oferte = Oferta::find_by_sql($sql);
//$oferta=array_shift($oferte);
$td = 0;
$ti = 0;
$tu = 0;
$sync = 0;
$insert = 0;
foreach ($oferte as $oferta) {
    $sync++;
    $apartament = Apartament::find_by_id($oferta->id);
    $client = Client::find_by_id($apartament->idClient);
    $agent = User::find_by_id($client->idUtilizator);
    $sql = "SELECT * FROM Proprietate WHERE CodBazaDate={$oferta->id}";
    $update = 0;
    $result = mysql_query($sql, $conexiune2);
    if ($row = mysql_fetch_array($result)) {
Ejemplo n.º 3
0
					<h3 onclick="showHide('listaOferte')" onmouseover="this.style.cursor='pointer'">Oferte ale clientului</h3>
					<table width="100%" id="listaOferte">
						<tr >
							<td class="header" width="5%" align="center">Cod</td>
							<td class="header" width="10%" align="center">Camere</td>
							<td class="header" width="70%">Detalii</td>
							<td class="header" width="10%" align="center">Pret</td>
							<td class="header" width="5%" align="center">Foto</td>
						</tr>
						<?php 
                $i = 0;
                foreach ($apList as $apartament) {
                    $sql = "SELECT * FROM Foto WHERE idApartament={$apartament->id} ORDER BY Ordin LIMIT 1";
                    $fotos = Foto::find_by_sql($sql);
                    $sql = "SELECT * FROM Oferta WHERE idApartament='{$apartament->id}'";
                    $ofertaList = Oferta::find_by_sql($sql);
                    $strada = Strada::find_by_id($apartament->idStrada);
                    if (!empty($ofertaList)) {
                        foreach ($ofertaList as $oferta) {
                            $i++;
                            $class = $i % 2 ? "impar" : "par";
                            ?>
						<tr id="<?php 
                            echo $oferta->id;
                            ?>
" class="<?php 
                            echo $class;
                            ?>
" style="font-weight: bold;" onmouseover="this.style.cursor='pointer';onOver(<?php 
                            echo $oferta->id;
                            ?>