<option value="vandut de altii" <?php if ($oferta->Stare == "vandut de altii") { echo "selected"; } ?> >vandut de altii</option> <option value="stand by" <?php if ($oferta->Stare == "stand by") { echo "selected"; } ?> >stand by</option> </select> <label class="label">sursa</label><select class="standard" id="ApidSursa" name="ApidSursa"> <?php $sursalist = Sursa::find_all(); foreach ($sursalist as $xsursa) { echo "<option "; if ($apartament->idSursa == $sursa->id) { echo " selected='selected'"; } echo " value='" . $xsursa->id . "'>" . $xsursa->Descriere; echo "</option>"; } ?> </select> </fieldset> <script type="text/javascript"> var cal1=Calendar.setup({onSelect:function(){cal1.hide();}}); cal1.manageFields("ApDataIntrare-trigger", "ApDataIntrare", "%d/%m/%Y"); var cal2=Calendar.setup({onSelect:function(){cal1.hide();}});
function sync($site) { if ($site > 0 && $site != 3) { return 1; } return 0; } $oferta = Oferta::find_by_id($idOferta); $apartament = Apartament::find_by_id($oferta->idApartament); $client = Client::find_by_id($apartament->idClient); $agent = User::find_by_id($client->idUtilizator); $strada = Strada::find_by_id($apartament->idStrada); $subzona = Subzona::find_by_id($apartament->idSubzona); $cartier = Cartier::find_by_id($subzona->idCartier); $oras = Zona::find_by_id($cartier->idZona); $sursa = Sursa::find_by_id($apartament->idSursa); $agentIntroducere = User::find_by_id($oferta->idAgentIntroducere); $agentInchiriere = User::find_by_id($oferta->idAgentInchiriere); $agentVanzare = User::find_by_id($oferta->IdAgentVanzare); $sql = "SELECT * FROM CategorieDotari WHERE TipProprietate=1 ORDER BY Prioritate"; $CatDotList = CategorieDotari::find_by_sql($sql); if (!empty($CatDotList)) { foreach ($CatDotList as $CatDot) { $sql = "SELECT * FROM Dotare WHERE idCategorieDotari='{$CatDot->id}'"; $DotList = Dotare::find_by_sql($sql); if (!empty($DotList)) { foreach ($DotList as $Dot) { $sql = "SELECT * FROM DotareApartament WHERE idDotare='{$Dot->id}' AND idApartament='{$apartament->id}'"; $DotApList = Dotareapartament::find_by_sql($sql); if (!empty($DotApList)) { foreach ($DotApList as $DotAp) {