Apartments San Antonio Tx, San Antonio Townhomes & Condos for Rent.

Your source for San Antonio townhomes and San Antonio Texas apartments

Mother and child in their apartment
See your San Antonio Apartments Tour
Search San Antonio townhomes for rent Search San Antonio Apartments
Call San Antonio Texas Apartments and Townhomes at Email San Antonio Apartments and Townhomes All about San Antonio Texas Apartments and Townhomes San Antonio, Texas Information San Antonio Corporate Housing San Antonio apartments and townhomes articles
<%@ LANGUAGE="VBSCRIPT" %> <% ' Make sure we Dim our variables. 'Option Explicit ' Allow for redirects in the code. Response.Buffer = TRUE ' Set P3P for third party Response.AddHeader "P3P","CP=""CAO PSA OUR""" ' Toggle on/off to test our pages. 'On Error Resume Next ' Global (page-level) variables. Dim objConn ' ADO database connection object Dim objCommand ' ADO command object Dim objRsReview ' ADO recordset for review query Dim objRsCustomer ' ADO recordset for review query Dim objRsAgent ' ADO recordset for review query Dim sWhere ' Stores built where statement Dim sOrderBy ' Stores built order by statement Dim vChkItem ' Stores aChkBoxes items 'ADO parameter objects Dim prmApartmentId,prmCityId,prmSt,prmLeasePeriods,prmLessThanYearLease,prmNumberOfUnits,prmApplicationFee Dim prmManagementId,prmSpecials,prmESchool,prmMSchool,prmHSchool,prmYearBuilt Dim prmHotWater,prmAmenities,prmParking,prmHeat,prmLowPrice,prmHighPrice Dim prmStarRating,prmDeposit,prmSqFt,prmPatioBalcony,prmVaultedCeiling Dim prmOutsideStorage,prmLinenCloset,prmFirePlace,prmWalkinCloset,prmGardenTub Dim prmBedroomType 'text variables Dim iApartmentId,iCityId,sSt,sLeasePeriods,sLessThanYearLease,iNumberOfUnits,cApplicationFee Dim iManagementId,sSpecials,iESchool,iMSchool,iHSchool,iYearBuilt Dim sHotWater,iAmenities,sParking,sHeat,cLowPrice,cHighPrice Dim sStarRating,cDeposit,iSqFt,sPatioBalcony,sVaultedCeiling Dim sOutsideStorage,sLinenCloset,sWalkinCloset,sGardenTub Dim sBedroomType,aZip,aMap,aWD,aDesc,aChkBoxes Dim intCount ' counter Dim sBG ' background color variable Dim iUnitID ' holds unitid unique id from recordset Dim sFirstUnitId ' holds unitid of first record in list Dim sCustomerId ' keeps track of current customer Dim sPhone ' holds customer phone Dim sFitness ' holds checkbox selection Dim sFireplace ' holds checkbox selection Dim sPool ' holds checkbox selection Dim sGarage ' holds checkbox selection Dim sLoft ' holds checkbox selection Dim sStudy ' holds checkbox selection Dim sFurnished ' holds checkbox selection Dim sClubroom ' holds checkbox selection Dim sBasketball ' holds checkbox selection Dim sSunroom ' holds checkbox selection Dim sGated ' holds checkbox selection Dim sPets ' holds checkbox selection Dim sTownhome ' holds checkbox selection Dim sDuplex ' holds checkbox selection Dim sLaundry ' holds checkbox selection Dim sFreeCable ' holds checkbox selection Dim sCvParking ' holds checkbox selection Dim sJoggingTrail ' holds checkbox selection Dim sWDProvided ' holds checkbox selection Dim sWDConnections ' holds checkbox selection Dim SortBy ' holds query string value for sorting records Dim rsSortBy ' converts browser display value of SortBy with actual value Dim FAreas ' holds query string values for selected areas Dim MakeCity ' formats selected areas for search Dim ag ' flag for checking if agent is viewing page ' Global (page-level) constants. Const cnPageTitle = "Search Apartment Information" %> <% '************************************************************************** '* Business Logic '************************************************************************** ' Set submitted values to local variables. iApartmentId = Request("selApartmentName") iESchool = Request("selElementarySchool") iMSchool = Request("selMiddleSchool") iHSchool = Request("selHighSchool") iCityId = Request("cityz") cLowPrice = Trim(Request("txtLowPrice")) cHighPrice = Trim(Request("txtHighPrice")) sBedroomType = Request("optBedroomType") aZip = Split(Request("hidZip"),",") aMap = Split(Request("hidMap"),",") aWD = Split(Request("hidWasherDryer"),",") 'aDesc = Split(Request("hidDescription"),",") aChkBoxes = Split(Request("hidCheckBoxes"),",") ag = Request("ag") rsSortBy = Request("SortBy") If rsSortBy = "HighRent" Then rsSortBy = "ui.Highprice" End If If rsSortBy = "AptName" Then rsSortBy = "ai.ApartmentName" End If If rsSortBy = "Unit" Then rsSortBy = "ui.Description" End If If rsSortBy = "SF" Then rsSortBy = "ui.SqFt" Else rsSortBy = "ai.ApartmentName" End If ' Customer id sCustomerId = Request("hidCustomerId") ' Create ADO objects. With (Server) Set objConn = .CreateObject("ADODB.Connection") Set objCommand = .CreateObject("ADODB.Command") Set objRsReview = .CreateObject("ADODB.Recordset") Set objRsCustomer = .CreateObject("ADODB.Recordset") Set objRsAgent = .CreateObject("ADODB.Recordset") 'Set objRsInfo = .CreateObject("ADODB.Recordset") End With With (objCommand) ' Create connection to database. objConn.Provider = "MSDataShape" objConn.Open Application("sSQLSVRDSN") 'objConn.Open Application("sDSN") .ActiveConnection = objConn 'Customer sql .CommandText = "SELECT * FROM TBL_CustomerInfo WHERE CustomerName IS NOT NULL ORDER BY CustomerName " .CommandType = adCmdText 'Open recordset Call objRsCustomer.Open(objCommand,,adOpenForwardOnly ,adLockReadOnly) 'Open recordset Call objRsAgent.Open(objCommand,,adOpenForwardOnly ,adLockReadOnly) 'Main apartment info 'Order by string sOrderBy = " ORDER BY ai.ApartmentName, ui.Description " 'sOrderBy = " ORDER BY " & rsSortBy sWhere = " WHERE " 'Selected Tour IDs Dim wTourIds, noselect wTourIds = Request("sTourIds") jumvar = wTourIds jumvarsplt = split(jumvar,",") valnum = CInt(ubound(jumvarsplt)) sWhere = sWhere & "(ui.UnitID = '" For z=1 to (valnum+1) 'response.write (" z: " & z & "
") sWhere = sWhere & jumvarsplt(z-1) & "' " If (z") End With End Sub '************************************************************************** '* Presentation Logic '************************************************************************** %> My Tour
" /> <% If ag = "agent" Then %> <% else %> <% end if %>
 
<% if noselect <> "" then Response.write ("

 

 

" & noselect & "

 

 

") End if %> <% Dim iRecCount, iShortFormCount, LocLabel, ckNW, ckNE, ckFNW, ckDTN, ckAH, ckW, ckSC, ckSW, ckSE, strApartmentName, iUnitIdResults, iUnitIdArray, iApartmentIdResults, iApartmentIdArray, strAptMatch iRecCount = 0 iShortFormCount = 0 'iUnitIdResults = "0" LocLabel = "" 'sBG = "DetailColorA" 'Do Until objRsReview.EOF OR intCount > 500 'Do While Not objRsReview.EOF AND iRecCount < 600 Do While Not objRsReview.EOF AND iRecCount < 30 LocLabel = "" iRecCount = iRecCount + 1 iShortFormCount = iShortFormCount + 1 strApartmentName = objRsReview("ApartmentName") 'Check which areas the selected zip codes fall under Select Case objRsReview("zip") 'North West check Case "78256" ckNW = "y" LocLabel = "North West" Case "78257" ckNW = "y" LocLabel = "North West" Case "78258" ckNW = "y" LocLabel = "North West" Case "78249" ckNW = "y" LocLabel = "North West" Case "78231" ckNW = "y" LocLabel = "North West" Case "78248" ckNW = "y" LocLabel = "North West" Case "78230" ckNW = "y" LocLabel = "North West" Case "78240" ckNW = "y" LocLabel = "North West" Case "78229" ckNW = "y" LocLabel = "North West" 'North East check Case "78259" ckNE = "y" LocLabel = "North East" Case "78266" ckNE = "y" LocLabel = "North East" Case "78232" ckNE = "y" LocLabel = "North East" Case "78247" ckNE = "y" LocLabel = "North East" Case "78216" ckNE = "y" LocLabel = "North East" Case "78213" ckNE = "y" LocLabel = "North East" Case "78217" ckNE = "y" LocLabel = "North East" 'West check Case "78253" ckFNW = "y" LocLabel = "West" Case "78250" ckFNW = "y" LocLabel = "West" Case "78251" ckFNW = "y" LocLabel = "West" Case "78238" ckFNW = "y" LocLabel = "West" Case "78254" ckFNW = "y" LocLabel = "West" 'Downtown check Case "78228" ckDTN = "y" LocLabel = "Downtown" Case "78201" ckDTN = "y" LocLabel = "Downtown" Case "78207" ckDTN = "y" LocLabel = "Downtown" Case "78237" ckDTN = "y" LocLabel = "Downtown" Case "78204" ckDTN = "y" LocLabel = "Downtown" Case "78205" ckDTN = "y" LocLabel = "Downtown" 'Montevista check Case "78212" ckSW = "y" LocLabel = "Montevista" Case "78215" ckSW = "y" LocLabel = "Montevista" 'South West check Case "78245" ckSW = "y" LocLabel = "South West" Case "78227" ckSW = "y" LocLabel = "South West" Case "78236" ckSW = "y" LocLabel = "South West" Case "78226" ckSW = "y" LocLabel = "South West" Case "78225" ckSW = "y" LocLabel = "South West" Case "78252" ckSW = "y" LocLabel = "South West" Case "78242" ckSW = "y" LocLabel = "South West" Case "78211" ckSW = "y" LocLabel = "South West" Case "78224" ckSW = "y" LocLabel = "South West" Case "78214" ckSW = "y" LocLabel = "South West" 'South East check Case "78219" ckSE = "y" LocLabel = "South East" Case "78202" ckSE = "y" LocLabel = "South East" Case "78203" ckSE = "y" LocLabel = "South East" Case "78210" ckSE = "y" LocLabel = "South East" Case "78220" ckSE = "y" LocLabel = "South East" Case "78222" ckSE = "y" LocLabel = "South East" Case "78263" ckSE = "y" LocLabel = "South East" Case "78223" ckSE = "y" LocLabel = "South East" Case "78235" ckSE = "y" LocLabel = "South East" 'Universal City check Case "78218" ckSE = "y" LocLabel = "Universal City" Case "78233" ckSE = "y" LocLabel = "Universal City" Case "78239" ckSE = "y" LocLabel = "Universal City" Case "78109" ckSE = "y" LocLabel = "Universal City" Case "78148" ckSE = "y" LocLabel = "Universal City" Case "78244" ckSE = "y" LocLabel = "Universal City" 'Alamo Heights check Case "78209" ckAH = "y" LocLabel = "Alamo Heights" Case "78234" ckAH = "y" LocLabel = "Alamo Heights" End Select 'If (iRecCount MOD 2) = 0 Then 'sBG = "cashback_DetailColorA" 'Else 'sBG = "cashback_DetailColorB" 'End If if iRecCount MOD 20 = 0 then Response.Flush end if iUnitid = objRsReview("UnitId") If iRecCount = 1 Then sFirstUnitId = iUnitid 'If instr(strApartmentName,"(")=0 AND objRsReview("NoInternet")=TRUE AND strAptMatch <> strApartmentName Then If instr(strApartmentName,"(")=0 AND strAptMatch <> strApartmentName Then iUnitIdResults = iUnitIdResults & "," & iUnitID iUnitIdArray = Split(iUnitIdResults, ",") iApartmentIdResults = iApartmentIdResults & "," & ObjRsReview("ApartmentId") iApartmentIdArray = Split(iApartmentIdResults, ",") %>
<% Response.Write("") %>
<% If ag = "agent" Then %> <%=objRsReview("ApartmentName")%>
<% end if %> <% If LocLabel="" then Response.write ("East") Else Response.write LocLabel End if %>
Beds / Baths: <% 'remove the word townhome and duplex from Bed/Bath descriptions If InStr(objRsReview("Description"), "duplex") then Response.Write(Replace(objRsReview("Description"), "duplex", " ")) Else Response.Write(Replace(objRsReview("Description"), "townhome", " ")) End if %>
Sq Ft: <% Response.Write(objRsReview("SqFt")) %>
Rent: <% Response.write("$" & objRsReview("EffRent") & " - " & "$" & objRsReview("LowPrice")) %> <% If ag = "agent" Then %> More Details on this apartment <% else %> More Details on this apartment <% end if %>
<% If ((objRsReview("WasherDryer") = "FA") OR (objRsReview("WasherDryer") = "SA")) then %> <% Else %> <% End If %> <% If (objRsReview("Pet")) then %> <% Else %> <% End If %> <% If (objRsReview("Garage")) then %> <% Else %> <% End If %> <% If (objRsReview("GasCooking") Or objRsReview("GasPaid")) then %> <% Else %> <% End If %>
amenities
<% if (objRsReview("AccessGates")) then %> <% else %> <% end if %> Access Gates
<% if (objRsReview("FreeCable")) then %> <% else %> <% end if %> Free Cable
<% if (objRsReview("Laundry")) then %> <% else %> <% end if %> Laundry Facility
<% if (objRsReview("Pools")) then %> <% else %> <% end if %> Pool
<% if (objRsReview("Jacuzzi")) then %> <% else %> <% end if %> Jacuzzi
<% if (objRsReview("Volleyball")) then %> <% else %> <% end if %> Volleyball
<% if (objRsReview("Alarms")) then %> <% else %> <% end if %> Security Alarm
<% if (objRsReview("FitnessCenter")) then %> <% else %> <% end if %> Fitness Center
<% if (objRsReview("RacquetBall")) then %> <% else %> <% end if %> Racquet Ball
<% if (objRsReview("BasketBall")) then %> <% else %> <% end if %> Basket Ball
<% if (objRsReview("Tennis")) then %> <% else %> <% end if %> Tennis
<% if (objRsReview("Sauna")) then %> <% else %> <% end if %> Sauna
<% if (objRsReview("JoggingTrail")) then %> <% else %> <% end if %> Jogging Trail
<% if (objRsReview("BusinessCenter")) then %> <% else %> <% end if %> Business Center
<% if (objRsReview("ElectricityPaid")) then %> <% else %> <% end if %> Electricity Paid
<% if (objRsReview("Furnished")) then %> <% else %> <% end if %> Furnished
<% if (objRsReview("Dishwasher")) then %> <% else %> <% end if %> Dishwasher
<% if (objRsReview("FrostFreeRefer")) then %> <% else %> <% end if %> Frost Free Ref.
<% if (objRsReview("Icemaker")) then %> <% else %> <% end if %> Icemaker
<% if (objRsReview("Microwave")) then %> <% else %> <% end if %> Microwave
<% if (objRsReview("ClubRoom")) then %> <% else %> <% end if %> Club Room
 
<% strAptMatch = strApartmentName objRsReview.MoveNext Else strAptMatch = strApartmentName iRecCount = iRecCount - 1 iShortFormCount = iShortFormCount - 1 objRsReview.MoveNext End If Loop Session("MyResults") = iUnitIdArray Session("MyAptIDs") = iApartmentIdArray %> <% If ag = "agent" Then %> <% else %> <% end if %>
 
<% Dim strSaveCriteria, Item For Each Item In Request.Querystring strSaveCriteria = strSaveCriteria + (item & "=" & Request.Querystring(Item)) & "&" 'Response.Write(Item) Next Session("SearchCriteria") = strSaveCriteria 'Response.Write(Session("SearchCriteria")) ' Clean up. If objRsReview.State = adStateOpen Then objRsReview.Close If objRsCustomer.State = adStateOpen Then objRsCustomer.Close If objRsAgent.State = adStateOpen Then objRsAgent.Close If objConn.State = adStateOpen Then objConn.Close Set objRsReview = Nothing Set objRsCustomer = Nothing Set objRsAgent = Nothing Set objCommand = Nothing Set objConn = Nothing %>
All persons or firms named herein are licensed brokers or salespersons in the State of Texas.
Copyright San Antonio Texas Apartments and Townhomes 2010. All rights reserved. Designed and maintained by AMB Design Studio.