<%@ Language=VBScript %> <%Option Explicit%> <% Dim RS2 : Set RS2 = Server.CreateObject("ADODB.Recordset") Dim sesid ConnectRS select case Request.Form("action") case "login": if Request.Form("username") <> "" then 'Prise de l'information de l'acheteur selon son nom d'utilisateur (..., (SELECT COUNT(ID_Transaction) FROM tblTransaction WHERE ID_ach = a.ID_ach) AS [transac]...) strSQL = "SELECT a.ID_Ach, 0 AS [ID_Assistant], webActif, webPassword, webDateFin, (SELECT COUNT(ID_CCach) FROM tblCCAch WHERE ID_ach = a.ID_ach) AS [CCACH] FROM tblSUBAcheteur AS a WHERE webUsername = '" & replace(lcase(Request.Form("username")), "'", "''") & "'" & _ " UNION SELECT ID_Ach, ID_Assistant, webActif, webPassword, webDateFin, 0 FROM tblAssistant WHERE webUsername = '" & replace(lcase(Request.Form("username")), "'", "''") & "'" 'Response.Write "" RS.Open strSQL, CNRS 'ouverture de la requête if RS.EOF then 'vérification qu'un nom a été trouvé vMess = "Nom d'utilisateur inconnu" else if RS.Fields("webPassword") <> Request.form("password") then 'vérification du mot de passe vMess = "Mot de passe incorrect" else Session("user") = UCase(Request.Form("username")) 'l'utilisateur est identifié Session("Userid") = RS.Fields("ID_Ach") Session("Assistid") = RS.Fields("ID_Assistant") Session("CCACH") = RS.Fields("CCACH") 'Session("Transac") = RS.Fields("transac") if Session("CCACH") > 0 then dim RScc: Set RScc = Server.CreateObject("ADODB.Recordset") strSQL = "SELECT MAX(Date_CCAch) FROM tblCCach WHERE ID_ach = " & Session("Userid") & " AND ID_EtapeCCach = 1" RScc.Open strSQL, CNRS Response.Write "" if RScc.EOF then Session("CCACH") = 0 else if DateDiff("m", RScc.Fields(0), Date) > 12 then Session("CCACH") = 0 end if end if end if if not RS.Fields("webActif") then 'vérification de l'état de son accès vMess = "Vous êtes identifié mais votre accès a été révoqué" else if datediff("d", RS.Fields("webDateFin"), date) > 0 then 'vérification de la fin de son accès vMess = "Vous êtes identifié mais votre accès a prit fin le " & RS.Fields("webDateFin") else Session("perm") = 1 strSQL = " SELECT d.Nom_dos" & _ " FROM tblDossier AS d INNER JOIN tblSUBAcheteur AS a ON d.ID_dos = a.ID_dos" & _ " WHERE a.ID_Ach = " & Session("Userid") RS2.Open strSQL, CNRS sesid = RS2.Fields(0) RS2.Close() if Session("Userid") <> 1 then SendEMail EMAIL_FROM, EMAIL_TO, "","L'ach. #"& Session("Userid") & " : " & sesid & " vient de se connecter sur le site immobilier !!! ", " " end if end if end if end if end if RS.Close end if case "logout": Session.Abandon Response.Redirect "index.asp" end select %> <%Dim idAch,idTypeAch,idResTemp,resid idResTemp = 0 if Request.Form("hidcheck") = 1 then Sub RunScript Location.Reload(True) End Sub if Session("Userid")<>1 AND Session("perm") = 1 then strSQL = " SELECT d.Nom_dos,a.ID_TypeAcheteur " & _ " FROM tblDossier AS d INNER JOIN tblSUBAcheteur AS a ON d.ID_dos = a.ID_dos" & _ " WHERE a.ID_Ach = " & Session("Userid") RS.Open strSQL, CNRS idAch = Session("Userid") & RS.Fields(0) idTypeAch = RS.Fields("ID_TypeAcheteur") RS.Close() strSQL = _ "SELECT r.ID_res AS vID,l.Open_Listing, IIF(w.ID_AccesWeb IS NULL, 2, 1) as vOrd " & _ "FROM (((tblSUBResidence AS r " & _ " INNER JOIN tblVente AS v ON r.ID_res = v.ID_res) " & _ " INNER JOIN (SELECT * FROM tblListing WHERE Id_Listing = " & Request.Form("hidID") & ") AS l ON v.ID_Vente = l.ID_Vente ) " & _ " LEFT JOIN tblAccesWeb AS w ON ( " & _ " l.ID_Listing = w.ID_Listing " & _ " AND w.ID_ach = " & Session("Userid") & " " strSQL = strSQL & _ " )) " & _ "WHERE Actif_Listing " & _ "ORDER BY 1 ASC " Response.Write "" RS.Open strSQL, CNRS if RS.Fields("vOrd") = 2 then SendEMail EMAIL_FROM, EMAIL_TO, "","L'ach. #" & idAch & " et l-sommaire sans acces client #" & RS.Fields("vID"), " " elseif (idTypeAch=1 or idTypeAch=2) then SendEMail EMAIL_FROM, EMAIL_TO, "","L'ach. #" & idAch & " et l-sommaire #" & RS.Fields("vID"), " " else SendEMail EMAIL_FROM, EMAIL_TO, "","L'ach. #" & idAch & " et l-sommaire accesible suite à l'envoi de masse #" & RS.Fields("vID"), " " end if RS.Close end if Server.Execute "ficheWeb.asp" else '***************************************************************************************************************** dim DD, MD, SD 'DefaultDevise, ModDevise and SymboleDevise if Request.QueryString("d") <> "" then DD = Request.QueryString("d") else DD = Request.Cookies("devise") end if MD = 1 SD = "$" Public Function Div0(ByVal v1, ByVal v2) If Not IsNull(v1) And Not IsNull(v2) Then If v2 <> 0 Then Div0 = v1 / v2 Else Div0 = 0 End If End If End Function Public Function CalculerMensualite(ECapital, EDuree, ETaux) 'set the variables Dim vTaux 'As Double Dim vPaiement 'As Currency Dim vDiviseur 'As Double Dim vNumPaiement 'As Integer Dim vQuotien 'As Double Dim vQuotien1 'As Double If ECapital > 0 And EDuree > 0 Then vTaux = (ETaux) / 2 vQuotien1 = ((1 + vTaux) ^ 2) - 1 vQuotien = ((1 + vQuotien1) ^ (1 / 12)) - 1 vNumPaiement = EDuree * 12 vDiviseur =Div0( (1 - ((1 + vQuotien) ^ (-1 * vNumPaiement))) , vQuotien) if vDiviseur <>0 then vPaiement = ECapital / vDiviseur end if CalculerMensualite = FormatNumber(vPaiement, 2) Else CalculerMensualite = 0 End If End Function Public function ShowProjection() if RS.Fields("final") <> true then Response.Write "Fiche préliminaire(résumé) " else Response.Write "Dossier complet(résumé)" end if End function Public function PN(vVal) if P then dim I dim vRet vRet = "" for I = 1 to len(vVal) vRet = vRet & "-" next PN = vRet else PN = vVal end if end function Public function PS(vVal) if P then PS = "" else PS = vVal end if end function Public function lettreID() if RS.Fields("Open_Listing") <> 0 then lettreID = ((RS.Fields("vID") +3000) Mod 1804) + RS.Fields("vID") else lettreID = RS.Fields("vID") end if end function Public function lettreOpen(rid) if rid <> RS.Fields("vID") then if rid < 300 then lettreOpen = "Z" elseif rid >1499 then lettreOpen = "H" else lettreOpen = "B" end if end if end function Public function deuxChiffre(vVal) if Len(vVal) =1 then deuxChiffre = "0"& vVal else deuxChiffre = vVal end if end function %> Richard Perreault <%Dim brp, rr,nom brp = Request.QueryString("brp") rr = Request.QueryString("rr") nom = Request.QueryString("nom") if rr="1" then SendEMail EMAIL_FROM, EMAIL_TO, "","Site Rp (résidences recherches) ouvert à partir de l'envoi BRP#" & brp & " l'ach. #" & nom & " !!! ", " " elseif rr="2" then SendEMail EMAIL_FROM, EMAIL_TO, "","Site Rp (résidences à vendre) ouvert à partir de l'envoi BRP#" & brp & " l'ach. #" & nom & " !!! ", " " end if %>
<% Dim noBrp strSQL = " SELECT Last_brp FROM tblBrp" RS2.Open strSQL, CNRS noBrp = RS2.Fields(0) RS2.Close noBrp = noBrp & "Web.html"%>

Acheteur / Vendeur

  • <%if Request.QueryString("p") = "mandats" then Response.Write "

    Liste des mandats

    " else Response.Write "Liste des mandats" end if %>
  • <% if Session("Perm") = 1 then %>
  • " target="_blank"> Comparez mandats
  • <%else %>
  • Comparez mandats
  • <% end if%>
  • <% if Request.QueryString("p") = "motdepasse" then Response.Write "

    Achat / mot de passe

    " else Response.Write "Achat / mot de passe" end if %>
  • <% if Request.QueryString("p") = "faq" then Response.Write "

    F.A.Q.- mandat acheteur

    " else Response.Write "F.A.Q.- mandat acheteur" end if %>
  • <% if Request.QueryString("p") = "vente" then Response.Write "

    Vente de résidence

    " else Response.Write "Vente de résidence" end if %>
  • <% if Request.QueryString("p") = "loyers" then Response.Write "

    Types d'hebergement

    " else Response.Write "Types d'hebergement" end if %>

Chercher Mandat

Calculez

<%if session("user") <> "" then%>

Identification

Vous êtes connecté
en tant que : <%=Session("user")%>

<%=vMess%>

<%else%>

Identification

Utilisateur : " size="20" />

Mot de passe :

<%=vMess%>

< S'INSCRIRE >

<%if vMess = "" then%> <%end if%> <%end if%>
<%Dim Mach, RDC_AR,RDC_AR2,RDCT,RDE,RDF,RDB_AR,RDB_AR2,tDette,vVal,vVal2,vID,taux,norme1, norme2,RDF_norme1,RDF_norme2,Occloyers,RDB,RDB1,OccloyersSoins,Vacantloyers,RDC,RDE1,RDC1,RDCT1 %> <% if Len(Session("Userid"))> 0 and Session("Perm") = 1 then %> <% ' 25 - + terrain = ouvert, 25-50 partiel, 50+ locked Mach = 0 if Session("Perm") = 1 then strSQL = _ "SELECT DISTINCT r.ID_res AS vID, l.ID_Listing, Hidden_Listing,Open_Listing, Nom_Listing,motPasse, ID_TypeEntreprise, " & _ " chUnite,final, moRevenuBrut,AutresRev,AutresRev2,VacAutresRev,VacAutresRev2, moPrix,moTauxPerteVacance, v.MainListing, " & _ " (SELECT Nom_Lieu FROM tblLieu WHERE ID_Lieu = r.ID_Lieu) AS [Nom_Lieu], " & _ " IIF(DateDiff('d', Date(), EcheanceNouveau_res) > 0, 0, 1) as vNew, " & _ " IIF(ID_AccesWeb IS NULL, 2, 1) as vOrd, rel.ID_Relation, rel.Signer " & _ "FROM (((tblSUBResidence AS r " & _ " INNER JOIN tblVente AS v ON r.ID_res = v.ID_res) " & _ " INNER JOIN (SELECT * FROM tblListing WHERE Open2_Listing = 0) AS l ON v.ID_Vente = l.ID_Vente ) " & _ " LEFT JOIN tblAccesWeb AS w ON ( " & _ " l.ID_Listing = w.ID_Listing " & _ " AND w.ID_ach = " & Session("Userid") & " " strSQL = strSQL & _ " )) " & _ " LEFT JOIN tblRelation AS rel ON ( " & _ " l.ID_Listing = rel.ID_Listing " & _ " AND rel.ID_TypeRelation = 3 AND rel.Signer = 1 " & _ " AND rel.ID_ach = " & Session("Userid") & " " strSQL = strSQL & _ " ) " & _ "WHERE Actif_Listing " & _ "ORDER BY 1 ASC " else strSQL = _ "SELECT r.ID_res AS vID, ID_Listing, Hidden_Listing,Open_Listing, Nom_Listing,motPasse, ID_TypeEntreprise, " & _ " chUnite,final, moRevenuBrut,AutresRev,AutresRev2,VacAutresRev,VacAutresRev2, moPrix,moTauxPerteVacance, v.MainListing, " & _ " (SELECT Nom_Lieu FROM tblLieu WHERE ID_Lieu = r.ID_Lieu) AS [Nom_Lieu], " & _ " IIF(DateDiff('d', Date(), EcheanceNouveau_res) > 0, 0, 1) as vNew, " & _ " 2 as vOrd " & _ "FROM (tblSUBResidence AS r " & _ " INNER JOIN tblVente AS v ON r.ID_res = v.ID_res) " & _ " INNER JOIN (SELECT * FROM tblListing WHERE Open2_Listing = 0) AS l ON v.ID_Vente = l.ID_Vente " & _ "WHERE Actif_Listing " & _ "ORDER BY 1 ASC " end if Response.Write "" RS.Open strSQL, CNRS %>

LISTINGS ACCESSIBLES

    <% do while not RS.EOF if RS.Fields("chUnite")< 25 then if (Not RS.Fields("Hidden_Listing")) and RS.Fields("vOrd") < 2 then %>
  • <% if RS.Fields("vNew") = 0 then %>Nouveau<% end if if RS.Fields("ID_TypeEntreprise") = 5 then %>TERRAIN<% Else %>RÉSIDENCE<% end if if RS.Fields("Open_Listing") <> 0 then Mach = 1 %>  #<%= ((RS.Fields("vID") +3000) Mod 1804) + RS.Fields("vID") %> <% if RS.Fields("vID") < 300 then Response.Write "Z" else if RS.Fields("vID") >1499 then Response.Write "H" else Response.Write "B" end if if Session("Userid")=1 then Response.Write "/" & RS.Fields("vID") end if else Mach =0 %> #<%=RS.Fields("vID")%> <% if RS.Fields("Hidden_Listing") then%>C<%end if %> <% end if if RS.Fields("MainListing") <> RS.Fields("ID_Listing") then Response.Write " (Projection)" end if %>

    <%if RS.Fields("Open_Listing") <> 0 then%> Mandat acheteur seulement

    <% end if%> <% RDB_AR2 = RS.Fields("AutresRev2") RDB_AR = RS.Fields("AutresRev") RDC_AR =0 RDC_AR2 =0 if RDB_AR = 111111 then RDB_AR =0 else RDC_AR = RDB_AR - RS.Fields("VacAutresRev") end if if RDB_AR2 = 111111 then RDB_AR2 =0 else RDC_AR2 = RDB_AR2 - RS.Fields("VacAutresRev2")end if if RS.Fields("vOrd") < 2 OR RS.Fields("chUnite") < 25 then Response.Write "Prix: " & FormatNumber(RS.Fields("moPrix") * MD, 0, , , True) & " " & SD& "
    " end if Response.Write RS.Fields("Nom_Lieu") & "
    " if RS.Fields("ID_TypeEntreprise") = 2 then Response.Write "Immeuble Vacant
    " if RS.Fields("moRevenuBrut") > 0 then Response.Write "Revenu brut suggéré: " & FormatNumber((RS.Fields("moRevenuBrut")+RS.Fields("AutresRev")+RS.Fields("AutresRev2")) * MD, 0, , , True) & " " & SD & "
    " end if elseif RS.Fields("ID_TypeEntreprise") = 5 then Response.write "Terrain vacant
    " else if RS.Fields("Open_Listing") <> 0 then Response.Write "plus d'infos?(514-644-4444)"& "
    " else Response.Write "Revenu brut: " & FormatNumber((RS.Fields("moRevenuBrut")+RDB_AR+RDB_AR2) * MD, 0, , , True) & " " & SD & "
    " end if end if %> <% tDette =0 vVal = 0 vVal2 = 0 vID = RS.Fields("ID_Listing") strSQL = " SELECT ID_TypePret, Hypotheque_cre, TauxInteret_cre, Mensuel_cre, Amortissement_cre,ID_TypeCreancier,Date_Solde,Date_Client" & _ " FROM tblCreancier" & _ " WHERE ID_Listing = " & RS.Fields("ID_Listing") & " AND (ID_TypePret = 1 or ID_TypePret = 2 or ID_TypePret = 4 )" RS2.Open strSQL, CNRS do while not RS2.EOF tDette = tDette + RS2.Fields("Hypotheque_cre") vVal2 = vVal2 + RS2.Fields("Mensuel_cre") taux = RS2.Fields("TauxInteret_cre") RS2.MoveNext loop RS2.Close RS2.Open " SELECT SUM(Valeur_Depense) as vRet FROM tblDepense WHERE Valeur_Depense <> 111111 and ID_Listing = " & vID, CNRS if not isnull(RS2.Fields(0)) then vVal = RS2.Fields(0) RS2.Close if RS.Fields("chUnite")>50 then norme1 = 75 norme2 = 85 else norme1 = 65 norme2 = 75 end if RDF_norme1 = CalculerMensualite(norme1*RS.Fields("moPrix")/ 100,25,taux)*12 RDF_norme2 = CalculerMensualite(norme2*RS.Fields("moPrix")/ 100,25,taux)*12 %> <% RS2.Open " SELECT SUM (Tarif)" & _ " FROM tblLoyers" & _ " WHERE Tarif <> 111111 and ID_Listing = " & vID,CNRS %> <% Occloyers = 12 * RS2.Fields(0) RS2.Close%> <% RS2.Open " SELECT SUM (Soin)" & _ " FROM tblLoyers" & _ " WHERE Soin <> 111111 and ID_Listing = " & vID,CNRS %> <% OccloyersSoins = 12 * RS2.Fields(0) RS2.Close%> <% if isnull(OccloyersSoins) then OccloyersSoins=0 end if%> <% if Occloyers <> 0 then RDB = Occloyers + OccloyersSoins else RDB = RS.Fields("moRevenuBrut") end if%> <% Vacantloyers = 0 RDC =0 RDC1=0 RS2.Open " SELECT SUM (Tarif)" & _ " FROM tblLoyers" & _ " WHERE Tarif <> 111111 and Vacante = 1 AND ID_Listing = " & vID,CNRS if not isnull(RS2.Fields(0)) then Vacantloyers = 12 * RS2.Fields(0) end if if not isnull(RS2.Fields(0)) then RDC = RDB - Vacantloyers else RDC=RDB end if RS2.Close RDB1 = RDB * RS.Fields("moTauxPerteVacance") RDC1 = RDB - RDB1 %> <% RDCT = RDC + RDC_AR +RDC_AR2 RDCT1 = RDC1 + RDC_AR +RDC_AR2 RDE = RDCT - vVal RDE1 = RDCT1 - vVal RDF = vVal2 * 12 %> <%if RDE <> 0 and RDF_norme1 <>0 then if RS.Fields("Open_Listing") = 0 then Response.Write "Net(avant hyp.) : " & FormatNumber(RDE1 * MD, 0, , , True) & " " & SD & "
    " end if%>
    <%Response.Write "Financement" %>   /  <%Response.Write "Ratio c.d.d. "%>
    <% Response.Write ""& norme1& "%"%> --> <% Response.Write ""& FormatNumber(Div0(RDE,RDF_norme1), 2, , , true)%>
    <% Response.Write ""& norme2& "%"%> --> <% Response.Write ""& FormatNumber(Div0(RDE,RDF_norme2), 2, , , true)%>
    <% Response.Write "MRN:  "%> <%Response.Write FormatNumber(Div0(RS.Fields("moPrix"),RDE1), 2, , , true)&"(a1) /  "%> <%Response.Write FormatNumber(Div0(RS.Fields("moPrix"),RDE), 2, , , true)&"(a2)"%>
    <% end if%> <% resid = RS.Fields("vID") if RS.Fields("vOrd") < 2 then %>
    );" src="images/ico_unlock.jpg" alt="Fiche complète disponible">Listing sommaire
    <% Dim dosC,myDate myDate =Year(Date())& deuxChiffre(Month(Date()))& deuxChiffre(Day(Date())+14) dosC=0 RS2.Open "select ID_Relation from tblRelation where ID_Ach = " & Session("Userid") &_ " and iD_TypeRelation =4 and Date_Relation > Date()-30 and ID_Listing = " & vID,CNRS if (RS2.EOF And RS2.BOF) then dosC=0 elseif not isnull(RS2.Fields(0)) then dosC = RS2.Fields(0) end if RS2.Close if dosC <>0 then %> &mtp=<%=myDate%>&ida=<%=Session("Userid")%>"> Fiche complète Listing complet
    <%else %> <%if Isnull(RS.Fields("ID_Relation")) and Session("Userid")<>1 then %> &resid=<% =RS.Fields("vID")%>&ids=<%=Session("Userid")%>&mac=<%=lettreID() & lettreOpen(lettreID()) %>"> <%elseif Session("Userid")=1 then%> &resid=<% =RS.Fields("vID")%>&usid=<% =RS.Fields("motPasse")%>&ids=<% =Session("Userid")%>&mac=<%=lettreID() & lettreOpen(lettreID()) %>"> <% elseif Mach =1 then %> &resid=<% =RS.Fields("vID")%>&ids=<% =Session("Userid")%>&ids2=111&mac=<%=lettreID() & lettreOpen(lettreID()) %>"> <%else %> &resid=<% =RS.Fields("vID")%>&ids=<% =Session("Userid")%>&mac=<%=lettreID() & lettreOpen(lettreID()) %>"> <%end if%> Fiche complète Listing complet
    <% end if %> <% end if %> &idAch=<% =Session("Userid")%>"> Fiche complète Faites vos projections ! <%if RS.Fields("Open_Listing")= 0 then%>
     
    <% end if%>
    <% if RS.Fields("vOrd") = 1 then%> <% if Isnull(RS.Fields("ID_Relation")) then %><% else %>
  • <%end if end if RS.MoveNext loop RS.Close %>
<%end if %> <% ' 25 - + terrain = ouvert, 25-50 partiel, 50+ locked Mach = 0 if Session("Perm") = 1 then strSQL = _ "SELECT DISTINCT r.ID_res AS vID, l.ID_Listing, Hidden_Listing,Open_Listing, Nom_Listing,motPasse, ID_TypeEntreprise, " & _ " chUnite,final, moRevenuBrut,AutresRev,AutresRev2,VacAutresRev,VacAutresRev2, moPrix,moTauxPerteVacance, v.MainListing, " & _ " (SELECT Nom_Lieu FROM tblLieu WHERE ID_Lieu = r.ID_Lieu) AS [Nom_Lieu], " & _ " IIF(DateDiff('d', Date(), EcheanceNouveau_res) > 0, 0, 1) as vNew, " & _ " IIF(ID_AccesWeb IS NULL, 2, 1) as vOrd, rel.ID_Relation, rel.Signer " & _ "FROM (((tblSUBResidence AS r " & _ " INNER JOIN tblVente AS v ON r.MainVente = v.ID_Vente) " & _ " INNER JOIN (SELECT * FROM tblListing WHERE Open2_Listing = 0) AS l ON v.ID_Vente = l.ID_Vente ) " & _ " LEFT JOIN tblAccesWeb AS w ON ( " & _ " l.ID_Listing = w.ID_Listing " & _ " AND w.ID_ach = " & Session("Userid") & " " strSQL = strSQL & _ " )) " & _ " LEFT JOIN tblRelation AS rel ON ( " & _ " l.ID_Listing = rel.ID_Listing " & _ " AND rel.ID_TypeRelation = 3 AND rel.Signer = 1 " & _ " AND rel.ID_ach = " & Session("Userid") & " " strSQL = strSQL & _ " ) " & _ "WHERE Actif_Listing " & _ "ORDER BY 1 ASC " else strSQL = _ "SELECT r.ID_res AS vID, ID_Listing, Hidden_Listing,Open_Listing, Nom_Listing,motPasse, ID_TypeEntreprise, " & _ " chUnite,final, moRevenuBrut,AutresRev,AutresRev2,VacAutresRev,VacAutresRev2, moPrix,moTauxPerteVacance, v.MainListing, " & _ " (SELECT Nom_Lieu FROM tblLieu WHERE ID_Lieu = r.ID_Lieu) AS [Nom_Lieu], " & _ " IIF(DateDiff('d', Date(), EcheanceNouveau_res) > 0, 0, 1) as vNew, " & _ " 2 as vOrd " & _ "FROM (tblSUBResidence AS r " & _ " INNER JOIN tblVente AS v ON r.MainVente = v.ID_Vente) " & _ " INNER JOIN (SELECT * FROM tblListing WHERE Open2_Listing = 0) AS l ON v.ID_Vente = l.ID_Vente " & _ "WHERE Actif_Listing " & _ "ORDER BY 1 ASC " end if Response.Write "" RS.Open strSQL, CNRS %>

LISTINGS VISIBLES SANS ACCÈS CLIENT

    <%do while not RS.EOF if RS.Fields("chUnite")< 25 then if (Not RS.Fields("Hidden_Listing")) and RS.Fields("vOrd") = 2 then %>
  • <% if RS.Fields("vNew") = 0 then %>Nouveau<% end if if RS.Fields("ID_TypeEntreprise") = 5 then %>TERRAIN<% Else %>NouveauRÉSIDENCE<% end if if RS.Fields("Open_Listing") <> 0 then Mach = 1 %>  #<%= ((RS.Fields("vID") +3000) Mod 1804) + RS.Fields("vID") %> <% if RS.Fields("vID") < 300 then Response.Write "Z" else if RS.Fields("vID") >1499 then Response.Write "H" else Response.Write "B" end if if Session("Userid")=1 then Response.Write "/" & RS.Fields("vID") end if else Mach =0 %> #<%=RS.Fields("vID")%> <% if RS.Fields("Hidden_Listing") then%>C<%end if %> <% end if if RS.Fields("MainListing") <> RS.Fields("ID_Listing") then Response.Write " (Projection)" end if %>

    <%if RS.Fields("Open_Listing") <> 0 then%> Mandat acheteur seulement

    <% end if%> <% RDB_AR2 = RS.Fields("AutresRev2") RDB_AR = RS.Fields("AutresRev") RDC_AR =0 RDC_AR2 =0 if RDB_AR = 111111 then RDB_AR =0 else RDC_AR = RDB_AR - RS.Fields("VacAutresRev") end if if RDB_AR2 = 111111 then RDB_AR2 =0 else RDC_AR2 = RDB_AR2 - RS.Fields("VacAutresRev2")end if if RS.Fields("vOrd") < 2 OR RS.Fields("chUnite") < 25 then Response.Write "Prix: " & FormatNumber(RS.Fields("moPrix") * MD, 0, , , True) & " " & SD& "
    " end if Response.Write RS.Fields("Nom_Lieu") & "
    " if RS.Fields("ID_TypeEntreprise") = 2 then Response.Write "Immeuble Vacant
    " if RS.Fields("moRevenuBrut") > 0 then Response.Write "Revenu brut suggéré: " & FormatNumber((RS.Fields("moRevenuBrut")+RS.Fields("AutresRev")+RS.Fields("AutresRev2")) * MD, 0, , , True) & " " & SD & "
    " end if elseif RS.Fields("ID_TypeEntreprise") = 5 then Response.write "Terrain vacant
    " else if RS.Fields("Open_Listing") <> 0 then Response.Write "plus d'infos?(514-644-4444)"& "
    " else Response.Write "Revenu brut: " & FormatNumber((RS.Fields("moRevenuBrut")+RDB_AR+RDB_AR2) * MD, 0, , , True) & " " & SD & "
    " end if end if %> <% tDette =0 vVal = 0 vVal2 = 0 vID = RS.Fields("ID_Listing") strSQL = " SELECT ID_TypePret, Hypotheque_cre, TauxInteret_cre, Mensuel_cre, Amortissement_cre,ID_TypeCreancier,Date_Solde,Date_Client" & _ " FROM tblCreancier" & _ " WHERE ID_Listing = " & RS.Fields("ID_Listing") & " AND (ID_TypePret = 1 or ID_TypePret = 2 or ID_TypePret = 4 )" RS2.Open strSQL, CNRS do while not RS2.EOF tDette = tDette + RS2.Fields("Hypotheque_cre") vVal2 = vVal2 + RS2.Fields("Mensuel_cre") taux = RS2.Fields("TauxInteret_cre") RS2.MoveNext loop RS2.Close RS2.Open " SELECT SUM(Valeur_Depense) as vRet FROM tblDepense WHERE Valeur_Depense <> 111111 and ID_Listing = " & vID, CNRS if not isnull(RS2.Fields(0)) then vVal = RS2.Fields(0) RS2.Close if RS.Fields("chUnite")>50 then norme1 = 75 norme2 = 85 else norme1 = 65 norme2 = 75 end if RDF_norme1 = CalculerMensualite(norme1*RS.Fields("moPrix")/ 100,25,taux)*12 RDF_norme2 = CalculerMensualite(norme2*RS.Fields("moPrix")/ 100,25,taux)*12 %> <% RS2.Open " SELECT SUM (Tarif)" & _ " FROM tblLoyers" & _ " WHERE Tarif <> 111111 and ID_Listing = " & vID,CNRS %> <% Occloyers = 12 * RS2.Fields(0) RS2.Close%> <% RS2.Open " SELECT SUM (Soin)" & _ " FROM tblLoyers" & _ " WHERE Soin <> 111111 and ID_Listing = " & vID,CNRS %> <% OccloyersSoins = 12 * RS2.Fields(0) RS2.Close%> <% if isnull(OccloyersSoins) then OccloyersSoins=0 end if%> <% if Occloyers <> 0 then RDB = Occloyers + OccloyersSoins else RDB = RS.Fields("moRevenuBrut") end if%> <% Vacantloyers = 0 RDC =0 RDC1=0 RS2.Open " SELECT SUM (Tarif)" & _ " FROM tblLoyers" & _ " WHERE Tarif <> 111111 and Vacante = 1 AND ID_Listing = " & vID,CNRS if not isnull(RS2.Fields(0)) then Vacantloyers = 12 * RS2.Fields(0) end if if not isnull(RS2.Fields(0)) then RDC = RDB - Vacantloyers else RDC=RDB end if RS2.Close RDB1 = RDB * RS.Fields("moTauxPerteVacance") RDC1 = RDB - RDB1 %> <% RDCT = RDC + RDC_AR +RDC_AR2 RDCT1 = RDC1 + RDC_AR +RDC_AR2 RDE = RDCT - vVal RDE1 = RDCT1 - vVal RDF = vVal2 * 12 %> <%if RDE <> 0 and RDF_norme1 <>0 then if RS.Fields("Open_Listing") = 0 then Response.Write "Net(avant hyp.) : " & FormatNumber(RDE1 * MD, 0, , , True) & " " & SD & "
    " end if%>
    <%Response.Write "Financement" %>   /  <%Response.Write "Ratio c.d.d. "%>
    <% Response.Write ""& norme1& "%"%> --> <% Response.Write ""& FormatNumber(Div0(RDE,RDF_norme1), 2, , , true)%>
    <% Response.Write ""& norme2& "%"%> --> <% Response.Write ""& FormatNumber(Div0(RDE,RDF_norme2), 2, , , true)%>
    <% Response.Write "MRN:  "%> <%Response.Write FormatNumber(Div0(RS.Fields("moPrix"),RDE1), 2, , , true)&"(a1) /  "%> <%Response.Write FormatNumber(Div0(RS.Fields("moPrix"),RDE), 2, , , true)&"(a2)"%>
    <% end if%>
    );" src="images/ico_half.jpg" alt="Fiche sommaire disponible">Listing sommaire
    &resid=<% =RS.Fields("vID")%>"> Fiche complète Listing complet
    Fiche complète Faites vos projections ! <%if RS.Fields("Open_Listing")= 0 then%>  

    <% end if%>
  • <%end if end if RS.MoveNext loop RS.Close %>
<% EndConnect %>
<%end if %>