Link to home
Start Free TrialLog in
Avatar of timshows
timshows

asked on

Reverse engineer asp file to recreate lost files

A client's webserver crashed resulting in some lost asp files. The lost files are similar to ones still in place so if someone could explain to me the logic of how these files work, maybe I can recreate the lost ones. This is probably a basic question, but normally I only work in Coldfusion, so I could use a quick tutorial on this specific topic/configuration.

In the below file, why are there asp files stored in a classes directory? Was the file cRestaurant.asp created by hand or some prgramming tool that I can use to recreate my missing files?

I also noticed that in the .mdb file that contains the data, that there are queries that are stored there, I'm guessing I will need to figure out which queries need to be recreated, since the asp reference them?
restaurantDetail.asp file (condensed version):
 
<!-- #include file="classes/cRestaurant.asp" -->
<!-- #include file="classes/cRestaurantList.asp" -->
<!-- #include file="classes/cImage.asp" -->
<!-- #include file="classes/cImageList.asp" -->
<!-- #include file="classes/cMenu.asp" -->
<!-- #include file="classes/cMenuList.asp" -->
<!-- #include file="classes/cReview.asp" -->
<!-- #include file="classes/cReviewList.asp" -->
 
<%
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
'-=-=-=- Start Subroutines and Functions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Sub ResultsForm		
%>
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
    	<td><div style="padding-bottom:10px"><img src="images/sp_904_banner.jpg" width="630" height="100" /></div></td>
  	</tr>
	</table>
	
	<table width="100%" border="0">
	<tr><td><h2><%=myRestaurant.Name%></h2></td></tr>
	</table>
		
	<table width="100%" border="0">
		<tr>
		<%
		Dim myList
		Set myList = New cImageList
		Call myList.GetRecordsByIDandType(recordID, "R")
		for each myImage in myList.Images.Items %>
			<td align="center"><div style="text-align:center;"><img src="includes/displayImage.asp?id=<%=myImage.ID%>" border="0" class="details"></div></td>
		<%	set myImage = nothing
		next %>
		</tr>
	</table>
	<br>
	<table width="96%" border="0" align="center">
		<tr><td colspan="2"><%=Replace(myRestaurant.Intro, vbcrlf, "<br>")%></td>
		  </tr>
		<tr><td colspan="2">&nbsp;</td>
		  </tr>
		<tr><td width="50%">Price: <font color="#006600"><%=myRestaurant.Price%></font><br>	
		<%
		tempCuisineString = ""
		tempCuisineString = myRestaurant.CuisineName
		If myRestaurant.CuisineName2 <> "" Then
			tempCuisineString = tempCuisineString & ", " & myRestaurant.CuisineName2
		End If
		If myRestaurant.CuisineName3 <> "" Then
			tempCuisineString = tempCuisineString & ", " & myRestaurant.CuisineName3
		End If
		If myRestaurant.CuisineName4 <> "" Then
			tempCuisineString = tempCuisineString & ", " & myRestaurant.CuisineName4
		End If
		If myRestaurant.CuisineName5 <> "" Then
			tempCuisineString = tempCuisineString & ", " & myRestaurant.CuisineName5
		End If		
		%>		
		Cuisine: <%=tempCuisineString%><br>
		Address: <%=myRestaurant.Address%>&nbsp;(<%=myRestaurant.LocationName%>)<br>
		Phone: <%=myRestaurant.Contact%><br>
		<%
		If myRestaurant.Email <> "" Then
			Response.Write("Email: <a href='mailto:" & myRestaurant.Email & "'>" & myRestaurant.Email & "</a><br>")
		End If
		If myRestaurant.URL <> "" Then
			Response.Write("Website: <a target='_blank' href='http://" & myRestaurant.URL & "'>" & myRestaurant.URL & "</a><br>")
		End If
		%>	
		Attire: <%=myRestaurant.Attire%><br>
		<% 
		tempItems = ""
		If myRestaurant.Hours <> "" 		Then tempItems = tempItems & "Open Hours: " & myRestaurant.Hours & ", " End If
		If myRestaurant.Alcohol <> "" 		Then tempItems = tempItems & myRestaurant.Alcohol & ", " End If
		If myRestaurant.Reservations = true Then tempItems = tempItems & " Reservations Available, " End If
		If myRestaurant.Breakfast = true 	Then tempItems = tempItems & " Breakfast, " End If
		If myRestaurant.Lunch = true 		Then tempItems = tempItems & " Lunch, " End If
		If myRestaurant.Dinner = true 		Then tempItems = tempItems & " Dinner, " End If
		If myRestaurant.SaladBar = true 	Then tempItems = tempItems & " SaladBar, " End If
		If tempItems <> "" Then
			tempItems = left(tempItems, len(tempItems)-2)
		End If
		Response.Write(tempItems)
		%>		
		</td>
		  <td width="50%" rowspan="4"><%=myRestaurant.MapURL%></td>
		</tr>
		
		<tr><td><br>		  &nbsp;</td>
		  </tr>
		<tr><td><br><%
			Set myList = New cMenuList
			Call myList.GetRecordsByIDandTypeAndDocumentType(recordID, "R", "Menu")
			If myList.RowsCount > 0 Then
				%><img src="images/icon_from_hp_dining.jpg"><%
				For each myMenu in myList.Menus.Items
				%>
					<a href="includes/displayMenu.asp?id=<%=myMenu.ID%>" target="_blank">
					<% If myMenu.DisplayName <> "" Then
						Response.Write(myMenu.DisplayName)
						Else
						Response.Write(left(myMenu.Filename,len(myMenu.Filename)-4))
						End If
					%></a><br>
					<%
					set myMenu = nothing
				next 
			End If 
			
			Response.Write("<br><br>")
			
			Set myList = New cMenuList
			Call myList.GetRecordsByIDandTypeAndDocumentType(recordID, "R", "Coupon")
			If myList.RowsCount > 0 Then
				%><img src="images/icon_from_hp_coupon.jpg"><%
				For each myMenu in myList.Menus.Items
				%>
					<a href="includes/displayMenu.asp?id=<%=myMenu.ID%>" target="_blank">
					<% If myMenu.DisplayName <> "" Then
						Response.Write(myMenu.DisplayName)
						Else
						Response.Write(left(myMenu.Filename,len(myMenu.Filename)-4))
						End If
					%></a><br>
					<%
					set myMenu = nothing
				next 
			End If	
			
			Response.Write("<br><br>")
			
			Set myList = New cMenuList
			Call myList.GetRecordsByIDandTypeAndDocumentType(recordID, "R", "Brochure")
			If myList.RowsCount > 0 Then
				%><img src="images/icon_from_hp_brochure.jpg"><%
				For each myMenu in myList.Menus.Items
				%>
					<a href="includes/displayMenu.asp?id=<%=myMenu.ID%>" target="_blank">
					<% If myMenu.DisplayName <> "" Then
						Response.Write(myMenu.DisplayName)
						Else
						Response.Write(left(myMenu.Filename,len(myMenu.Filename)-4))
						End If
					%></a><br>
					<%
					set myMenu = nothing
				next 
			End If			
			%>&nbsp;</td>
		  </tr>
		<tr>
        	<td><br>
			<% If Request.QueryString("cmd") = "Return" Then %>
				<a href="javascript:history.go(-3)">Return to List</a>
			<% Else %>
				<a href="javascript:history.go(-1)">Return to List</a>
			<% End If %>
			</td>
        </tr>		
	</table>
	<br>
	<% If myRestaurant.Email <> "" Then 
			emailToFieldInTheForm = ""
			emailToFieldInTheForm = myRestaurant.Email %>
			&nbsp;&nbsp;<b>Send a quick message to <%=myRestaurant.Name%></b>
			<!-- #include file="includes/contactForm.htm" -->				
	<% End If %>
	<br>
	<br>
	<br>
	<%
	Set myReviewList = New cReviewList
	Call myReviewList.GetApprovedRecordsByRecordIDandType(recordID, "R")
	If myReviewList.RowsCount > 0 Then
	%>
		&nbsp;&nbsp;<b>Reviews For <%=myRestaurant.Name%></b>
		<br><br>
		<table width="98%" border="0" align="center" cellpadding="5" cellspacing="5">
	<%
		For each myReview in myReviewList.Reviews.Items
			Response.Write("<td bgcolor='#9AD6EE' class='category_box_text' width='100%'>")
			Response.Write(myReview.Rating & " - ")
			Response.Write(myReview.CreatedDate & " - ")
			Response.Write(Replace(myReview.Comments,vbcrlf,"<br>") & "</td></tr>")
			set myReview = nothing
		next
	%>
		</table><br><br>
	<%
	Else
		Response.Write("No Reviews For " & myRestaurant.Name & "<br><br>") 
	End If
	
	RecordIDInTheForm = recordID
	RecordTypeInTheForm = "R"
	CompanyNameInTheForm = myRestaurant.Name
	ReturnURLInTheForm = "restaurantDetail.asp"
%>
	&nbsp;&nbsp;<b>Submit a Review for <%=myRestaurant.Name%></b>
	<br><br>
	<!-- #include file="includes/reviewForm.htm" -->
<%	   
End Sub
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
'-=-=-=- End Subroutines and Functions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
%>
 
cRestaraunt.asp file:
 
<%
Class cRestaurant
 
Private m_ID			'number
Private m_Name
Private m_Cuisine		'number
Private m_Location		'number
Private m_Intro
Private m_Contact
Private m_MapURL
Private m_Attire
Private m_Hours
Private m_Alcohol
Private m_Reservations	'bool
Private m_SaladBar		'bool
Private m_Breakfast		'bool
Private m_Lunch			'bool
Private m_Dinner		'bool
Private m_CreatedDate	'date/time
Private m_CreatedBy
Private m_LastUpdated	'date/time
Private m_UpdatedBy
Private m_Price
Private m_Address
Private m_AdLevel
Private m_URL
Private m_Email
Private m_Priority
Private m_Cuisine2
Private m_Cuisine3
Private m_Cuisine4
Private m_Cuisine5
 
Private m_CuisineName
Private m_LocationName
Private m_CuisineName2
Private m_CuisineName3
Private m_CuisineName4
Private m_CuisineName5
 
Private m_LastError
Private m_RowsCount
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Property Get LastError()
    LastError = m_LastError
End Property
 
Public Property Let LastError(value)
    m_LastError = value
End Property 
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Property Get RowsCount()
    RowsCount = m_RowsCount
End Property
 
Public Property Let RowsCount(value)
    m_RowsCount = value
End Property 
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Property Get ID()
    ID = clng(m_ID)
End Property
 
Public Property Let ID(value)
    m_ID = value
End Property 
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Property Get Name()
    Name = m_Name
End Property
 
Public Property Let Name(value)
    m_Name = value
End Property 
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Property Get Cuisine()
    Cuisine = clng(m_Cuisine)
End Property
 
Public Property Let Cuisine(value)
    m_Cuisine = value
End Property 
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Property Get Location()
    Location = clng(m_Location)
End Property
 
Public Property Let Location(value)
    m_Location = value
End Property 
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Property Get Intro()
    Intro = m_Intro
End Property
 
Public Property Let Intro(value)
    m_Intro = value
End Property 
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Property Get Contact()
    Contact = m_Contact
End Property
 
Public Property Let Contact(value)
    m_Contact = value
End Property 
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Property Get MapURL()
    MapURL = m_MapURL
End Property
 
Public Property Let MapURL(value)
    m_MapURL = value
End Property 
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Property Get Attire()
    Attire = m_Attire
End Property
 
Public Property Let Attire(value)
    m_Attire = value
End Property 
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Property Get Hours()
    Hours = m_Hours
End Property
 
Public Property Let Hours(value)
    m_Hours = value
End Property 
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Property Get Alcohol()
    Alcohol = m_Alcohol
End Property
 
Public Property Let Alcohol(value)
    m_Alcohol = value
End Property 
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Property Get Reservations()
    Reservations = m_Reservations
End Property
 
Public Property Let Reservations(value)
    m_Reservations = value
End Property 
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Property Get SaladBar()
    SaladBar = m_SaladBar
End Property
 
Public Property Let SaladBar(value)
    m_SaladBar = value
End Property 
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Property Get Breakfast()
    Breakfast = m_Breakfast
End Property
 
Public Property Let Breakfast(value)
    m_Breakfast = value
End Property 
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Property Get Lunch()
    Lunch = m_Lunch
End Property
 
Public Property Let Lunch(value)
    m_Lunch = value
End Property 
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Property Get Dinner()
    Dinner = m_Dinner
End Property
 
Public Property Let Dinner(value)
    m_Dinner = value
End Property 
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Property Get CreatedDate()
    CreatedDate = m_CreatedDate
End Property
 
Public Property Let CreatedDate(value)
    m_CreatedDate = value
End Property 
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Property Get CreatedBy()
    CreatedBy = m_CreatedBy
End Property
 
Public Property Let CreatedBy(value)
    m_CreatedBy = value
End Property 
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Property Get LastUpdated()
    LastUpdated = m_LastUpdated
End Property
 
Public Property Let LastUpdated(value)
    m_LastUpdated = value
End Property 
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Property Get UpdatedBy()
    UpdatedBy = m_UpdatedBy
End Property
 
Public Property Let UpdatedBy(value)
    m_UpdatedBy = value
End Property
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Property Get Price()
    Price = m_Price
End Property
 
Public Property Let Price(value)
    m_Price = value
End Property 
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Property Get Address()
    Address = m_Address
End Property
 
Public Property Let Address(value)
    m_Address = value
End Property
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Property Get AdLevel()
   If m_AdLevel <> "" Then    
    	AdLevel = CLng(m_AdLevel)
   End If
End Property
 
Public Property Let AdLevel(value)
    m_AdLevel = value
End Property
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Property Get URL()
    URL = m_URL
End Property
 
Public Property Let URL(value)
    m_URL = value
End Property
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Property Get Email()
    Email = m_Email
End Property
 
Public Property Let Email(value)
    m_Email = value
End Property
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Property Get Priority()
    Priority = m_Priority
End Property
 
Public Property Let Priority(value)
    m_Priority = value
End Property
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Property Get Cuisine2()
	If m_Cuisine2 <> "" Then
    	Cuisine2 = clng(m_Cuisine2)
	End If
End Property
 
Public Property Let Cuisine2(value)
    m_Cuisine2 = value
End Property 
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Property Get Cuisine3()
	If m_Cuisine3 <> "" Then
    	Cuisine3 = clng(m_Cuisine3)
	End If
End Property
 
Public Property Let Cuisine3(value)
    m_Cuisine3 = value
End Property 
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Property Get Cuisine4()
	If m_Cuisine4 <> "" Then
    	Cuisine4 = clng(m_Cuisine4)
	End If
End Property
 
Public Property Let Cuisine4(value)
    m_Cuisine4 = value
End Property 
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Property Get Cuisine5()
	If m_Cuisine5 <> "" Then
    	Cuisine5 = clng(m_Cuisine5)
	End If
End Property
 
Public Property Let Cuisine5(value)
    m_Cuisine5 = value
End Property 
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Property Get CuisineName()
    CuisineName = m_CuisineName
End Property
 
Public Property Let CuisineName(value)
    m_CuisineName = value
End Property 
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Property Get LocationName()
    LocationName = m_LocationName
End Property
 
Public Property Let LocationName(value)
    m_LocationName = value
End Property 
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Property Get CuisineName2()
    CuisineName2 = m_CuisineName2
End Property
 
Public Property Let CuisineName2(value)
    m_CuisineName2 = value
End Property 
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Property Get CuisineName3()
    CuisineName3 = m_CuisineName3
End Property
 
Public Property Let CuisineName3(value)
    m_CuisineName3 = value
End Property 
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Property Get CuisineName4()
    CuisineName4 = m_CuisineName4
End Property
 
Public Property Let CuisineName4(value)
    m_CuisineName4 = value
End Property 
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Property Get CuisineName5()
    CuisineName5 = m_CuisineName5
End Property
 
Public Property Let CuisineName5(value)
    m_CuisineName5 = value
End Property 
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Function LoadThisRecordID(strID)
	Dim strSQL
    'strSQL = "EXEC GetRestaurantByID " & CLng(strID) 
	
	strSQL = "SELECT Restaurant.ID, Restaurant.Name, Restaurant.Cuisine, Restaurant.Location, " & _
		"Restaurant.Intro, Restaurant.Contact, Restaurant.MapURL, Restaurant.Attire, " & _
		"Restaurant.Hours, Restaurant.Alcohol, Restaurant.Reservations, Restaurant.SaladBar, " & _
		"Restaurant.Breakfast, Restaurant.Lunch, Restaurant.Dinner, Restaurant.CreatedDate, " & _
		"Restaurant.CreatedBy, Restaurant.LastUpdated, Restaurant.UpdatedBy, Restaurant.Price, " & _
		"Restaurant.Address, Restaurant.AdLevel, Restaurant.URL, Restaurant.Email, Restaurant.Priority, " & _
		"Restaurant.Cuisine2, Restaurant.Cuisine3, Restaurant.Cuisine4, Restaurant.Cuisine5, " & _
		"Locations.Location AS LocationName, A.Category AS CuisineName, " & _
		"B.Category AS CuisineName2, C.Category AS CuisineName3, " & _
		"D.Category AS CuisineName4, E.Category AS CuisineName5 " & _
		"FROM (((((Restaurant LEFT JOIN Locations ON Restaurant.Location=Locations.ID) " & _
		"LEFT JOIN Category AS A ON Restaurant.Cuisine = A.ID) " & _
		"LEFT JOIN Category AS B ON Restaurant.Cuisine2 = B.ID) " & _
		"LEFT JOIN Category AS C ON Restaurant.Cuisine3 = C.ID) " & _
		"LEFT JOIN Category AS D ON Restaurant.Cuisine4 = D.ID)" & _
		"LEFT JOIN Category AS E ON Restaurant.Cuisine5 = E.ID " & _
		"WHERE Restaurant.ID = " & CLng(strID)	
	
    LoadThisRecordID = LoadData (strSQL)
End Function
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Private Function LoadData(strSQL)
	Dim rs
    Set rs = LoadRecordSet(strSQL) 'sqlHelper
    LoadData = FillThisObjectFromRecordSet(rs)
    rs. close
    set rs = nothing
End Function
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Private Function FillThisObjectFromRecordSet(parmRS)
	Select case parmRS.recordcount
    	Case 1
        	Me.ID			= parmRS.fields("ID").Value
            Me.Name			= parmRS.fields("Name").Value
            Me.Cuisine		= parmRS.fields("Cuisine").Value
            Me.Location		= parmRS.fields("Location").Value
            Me.Intro		= parmRS.fields("Intro").Value
            Me.Contact		= parmRS.fields("Contact").Value
            Me.MapURL		= parmRS.fields("MapURL").Value
            Me.Attire		= parmRS.fields("Attire").Value
            Me.Hours		= parmRS.fields("Hours").Value
            Me.Alcohol		= parmRS.fields("Alcohol").Value
            Me.Reservations	= parmRS.fields("Reservations").Value
            Me.SaladBar		= parmRS.fields("SaladBar").Value
            Me.Breakfast	= parmRS.fields("Breakfast").Value
            Me.Lunch		= parmRS.fields("Lunch").Value
            Me.Dinner		= parmRS.fields("Dinner").Value
            Me.CreatedDate	= parmRS.fields("CreatedDate").Value
            Me.CreatedBy	= parmRS.fields("CreatedBy").Value
            Me.LastUpdated	= parmRS.fields("LastUpdated").Value
            Me.UpdatedBy	= parmRS.fields("UpdatedBy").Value
            Me.Price		= parmRS.fields("Price").Value
			Me.Address		= parmRS.fields("Address").Value
			Me.AdLevel		= parmRS.fields("AdLevel").Value
			Me.URL			= parmRS.fields("URL").Value
			Me.Email		= parmRS.fields("Email").Value
			Me.Priority		= parmRS.fields("Priority").Value
			Me.Cuisine2		= parmRS.fields("Cuisine2").Value
			Me.Cuisine3		= parmRS.fields("Cuisine3").Value
			Me.Cuisine4		= parmRS.fields("Cuisine4").Value
			Me.Cuisine5		= parmRS.fields("Cuisine5").Value
			
			Me.CuisineName		= parmRS.fields("CuisineName").Value
            Me.LocationName		= parmRS.fields("LocationName").Value
			Me.CuisineName2		= parmRS.fields("CuisineName2").Value
			Me.CuisineName3		= parmRS.fields("CuisineName3").Value
			Me.CuisineName4		= parmRS.fields("CuisineName4").Value
			Me.CuisineName5		= parmRS.fields("CuisineName5").Value
           
            FillThisObjectFromRecordSet = Me.ID
        Case -1, 0
           	m_LastError = "Invalid Restaurant Id"
        Case Else
			m_LastError = "Error: FillThisObjectFromRecordSet: Restaurant"            
        End Select
        
        m_rowsCount = parmRS.recordcount
End Function
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Function InsertRestaurant() 	'InsertRecord(tblName, strAutoFieldName, ArrFlds, ArrValues )
 
	Dim array1, array2
	array1 = Array("Name", "Cuisine", "Location", "Intro", "Contact", "MapURL", "Attire", "Hours", "Alcohol", "Reservations", "SaladBar", "Breakfast", "Lunch", "Dinner", "CreatedDate", "CreatedBy", "Price", "Address", "AdLevel", "URL", "Email", "Priority", "Cuisine2", "Cuisine3", "Cuisine4", "Cuisine5")
	array2 = Array(Me.Name, Me.Cuisine, Me.Location, Me.Intro, Me.Contact, Me.MapURL, Me.Attire, Me.Hours, Me.Alcohol, Me.Reservations, Me.SaladBar, Me.Breakfast, Me.Lunch, Me.Dinner, Me.CreatedDate, Me.CreatedBy, Me.Price, Me.Address, Me.AdLevel, Me.URL, Me.Email, Me.Priority, Me.Cuisine2, Me.Cuisine3, Me.Cuisine4, Me.Cuisine5)
	
    Me.ID = InsertRecord("Restaurant", "ID", array1, array2)
End Function
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Function UpdateRestaurant()
    Dim strSQL
    strSQL = "UPDATE Restaurant SET " & _
    "Name = '"			& SQLFilter(Me.Name)	& "', " & _
    "Cuisine = "		& CLng(Me.Cuisine)		& ",  "	& _
    "Location = "		& CLng(Me.Location)		& ",  "	& _
    "Intro = '"			& SQLFilter(Me.Intro)	& "', " & _
    "Contact = '" 		& SQLFilter(Me.Contact)	& "', " & _
    "MapURL = '" 		& SQLFilter(Me.MapURL)	& "', " & _
    "Attire = '" 		& SQLFilter(Me.Attire)	& "', " & _
    "Hours = '" 		& SQLFilter(Me.Hours)	& "', " & _
    "Alcohol = '" 		& Me.Alcohol			& "', " & _
    "Reservations = "	& CBool(Me.Reservations) & ", " & _
    "SaladBar = " 		& CBool(Me.SaladBar)	& ", " & _
    "Breakfast = " 		& CBool(Me.Breakfast)	& ", " & _
    "Lunch = " 			& CBool(Me.Lunch)		& ", " & _
    "Dinner = " 		& CBool(Me.Dinner)		& ", " & _
    "LastUpdated = '" 	& Me.LastUpdated		& "', " & _
    "UpdatedBy = '" 	& Me.UpdatedBy			& "', " & _
    "Price = '" 		& SQLFilter(Me.Price)	& "', " & _
	"Address = '" 		& SQLFilter(Me.Address)	& "', " & _
	"URL = '" 			& SQLFilter(Me.URL)		& "', " & _
	"Email = '" 		& SQLFilter(Me.Email)	& "', " & _
	"Priority = "		& CLng(Me.Priority)		& ",  "	& _
	"Cuisine2 = "		& CLng(Me.Cuisine2)		& ",  "	& _
	"Cuisine3 = "		& CLng(Me.Cuisine3)		& ",  "	& _
	"Cuisine4 = "		& CLng(Me.Cuisine4)		& ",  "	& _
	"Cuisine5 = "		& CLng(Me.Cuisine5)		& ",  "	& _
	"AdLevel = " 		& CLng(Me.AdLevel)		& " " & _   
    "WHERE ID = " & CLng(Me.ID)     
    
    UpdateOrDeleteRecord strSQL
    UpdateRestaurant =  Me.ID
End Function
 
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Function DeleteRestaurant()
    Dim strSQL
    strSQL = "EXEC DeleteRestaurant " & Me.ID
    UpdateOrDeleteRecord strSQL
    DeleteRestaurant =  Me.ID
End Function
 
End Class
%>

Open in new window

Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

>>In the below file, why are there asp files stored in a classes directory? Was the file cRestaurant.asp created by hand or some prgramming tool that I can use to recreate my missing files?

I'm sorry to tell, but once your source files are lost, you probably can't "guess" 100% correctly what the source files are doing, even you know the methods/functions called out from that particular source file.
Avatar of timshows
timshows

ASKER

So the experts are recommednig just starting over?
ASKER CERTIFIED SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Have you tried undeleting the files?
http://undelete-plus.com/
Please consider my answer (id 22047698).