|
<%
howmany = 0
If request("view") = "" OR isNull(request("view")) Then
view = "ALL"
Else
view = request("view")
End If
If request("format") = "" OR isNull(request("format")) Then
format = "card"
Else
format = request("format")
End If
If request("view") <> "" AND NOT isNull(request("view")) AND request("format") = "details" Then
format = "card"
End If
SearchWhere = request("SearchWhere")
SearchFor = request("SearchFor")
If (SearchWhere = "All") Then
SQL_SearchWhere = "(Name_Last LIKE ('%" & SearchFor & "%') OR Name_Middle LIKE ('%" & SearchFor & "%') OR Name_First LIKE ('%" & SearchFor & "%') OR Company LIKE ('%" & SearchFor & "%') OR Job_Title LIKE ('%" & SearchFor & "%') OR Address_1 LIKE ('%" & SearchFor & "%') OR Address_2 LIKE ('%" & SearchFor & "%') OR City LIKE ('%" & SearchFor & "%') OR State LIKE ('%" & SearchFor & "%') OR Zip LIKE ('%" & SearchFor & "%') OR Country LIKE ('%" & SearchFor & "%') OR Email_1 LIKE ('%" & SearchFor & "%') OR Email_2 LIKE ('%" & SearchFor & "%') OR Email_3 LIKE ('%" & SearchFor & "%') OR Website LIKE ('%" & SearchFor & "%') OR User_Name LIKE ('%" & SearchFor & "%') OR Password LIKE ('%" & SearchFor & "%') OR IM_Type LIKE ('%" & SearchFor & "%') OR IM_Address LIKE ('%" & SearchFor & "%') OR Misc_1 LIKE ('%" & SearchFor & "%') OR Misc_2 LIKE ('%" & SearchFor & "%') OR Misc_3 LIKE ('%" & SearchFor & "%') OR Misc_4 LIKE ('%" & SearchFor & "%') OR Misc_5 LIKE ('%" & SearchFor & "%') OR Notes LIKE ('%" & SearchFor & "%'))"
ElseIf (SearchWhere = "Email") Then
SQL_SearchWhere = "(Email_1 LIKE ('%" & SearchFor & "%') OR Email_2 LIKE ('%" & SearchFor & "%') OR Email_3 LIKE ('%" & SearchFor & "%'))"
Else
SQL_SearchWhere = SearchWhere & " LIKE ('%" & SearchFor & "%')"
End If
If NOT (SearchFor = "") Then
SQL_SearchFor = " WHERE " & SQL_SearchWhere
Else
SQL_SearchFor = ""
End If
%>
|
|
|
<%
If format = "card" Then
Set RS = Server.CreateObject("ADODB.Recordset")
cellnum = 1
RS.ActiveConnection = Conn
SQL = "SELECT * FROM Contacts" & SQL_SearchFor & " ORDER BY name_last"
RS.Open SQL, Conn, 1,4
If NOT (RS.BOF AND RS.EOF) Then
Do While NOT RS.EOF
If view = "ALL" OR LCase(view) = LCase(Left(RS("Name_Last"),1)) Then
If cellnum = 1 Then%>
<%End If%>
| "><%If Not isNull(RS("Name_Last")) AND RS("Name_Last") <> "" Then%><%=RS("Name_Last")%> <%End If%> |
<%If Not isNull(RS("Misc_1")) AND RS("Misc_1") <> "" Then%><%=RS("Misc_1")%> <%End If%> |
<%If Not isNull(RS("City")) AND RS("City") <> "" Then%><%=RS("City")%> - <%End If%><%If Not isNull(RS("State")) AND RS("State") <> "" Then%><%=RS("State")%>
<%End If%><%If Not isNull(RS("Country")) AND RS("Country") <> "" Then%><%=RS("Country")%><%End If%>
<%If Not isNull(RS("Email_1")) AND RS("Email_1") <> "" Then%>"><%=RS("Email_1")%><%End If%>
"> |
|
<%If cellnum = 2 Then%>
<%End If
If cellnum = 1 Then
howmany = howmany + 1
cellnum = 2
Else
howmany = howmany + 1
cellnum =1
End If
End If
RS.movenext
Loop
If cellnum = 2 Then
response.write ""
End If
Else%>
|
Actualmente no hay contactos.
|
<%End If
End If
If format = "list" Then
Set RS = Server.CreateObject("ADODB.Recordset")
RS.ActiveConnection = Conn
SQL = "SELECT * FROM Contacts" & SQL_SearchFor & " ORDER BY name_last"
RS.Open SQL, Conn, 1, 3
colorchanger = 0
color1 = "#ebebeb"
color2 = "#FFFFFF"
If NOT (RS.BOF AND RS.EOF) Then%>
|

|
Apellido,
Nombre |
e-mail |
<%Do While NOT RS.EOF
If view = "ALL" OR LCase(view) = LCase(Left(RS("Name_Last"),1)) Then%>
|
|
<%If Not isNull(RS("Name_Last")) AND RS("Name_Last") <> "" Then%><%=RS("Name_Last")%> - <%End If%><%=RS("City")%> - <%=RS("Country")%> |
<%If Not isNull(RS("Email_1")) AND RS("Email_1") <> "" Then%>"><%=RS("Email_1")%><%End If%> |
<%End If
If colorchanger = 1 Then
howmany = howmany + 1
colorchanger = 0
color1 = "#ebebeb"
color2 = "#FFFFFF"
Else
howmany = howmany + 1
colorchanger = 1
color1 = "#FFFFFF"
color2 = "#ebebeb"
End If
RS.movenext
Loop%>
|
|
|
<%Else%>
|
Actualmente no hay contactos.
|
<%End If
End If
If format = "details" Then
Set RS = Server.CreateObject("ADODB.Recordset")
RS.ActiveConnection = Conn
SQL = "SELECT * FROM Contacts WHERE ID LIKE '" & request("ID") & "'"
RS.Open SQL, Conn, 1, 3
If NOT (RS.BOF AND RS.EOF) Then%>
|
Información Personal |
Información
Telefónica |
|
Nombre: |
<%If Not isNull(RS("Name_Title")) AND RS("Name_Title") <> "" Then%><%=RS("Name_Title")%> <%End If%><%If Not isNull(RS("Name_First")) AND RS("Name_First") <> "" Then%><%=RS("Name_First")%> <%End If%><%If Not isNull(RS("Name_Middle")) AND RS("Name_Middle") <> "" Then%><%=RS("Name_Middle")%> <%End If%><%If Not isNull(RS("Name_Last")) AND RS("Name_Last") <> "" Then%><%=RS("Name_Last")%> <%End If%><%=RS("Name_Suffix")%> |
|
|
|
Título: |
<%=RS("Name_Title")%> |
|
Nombre: |
<%=RS("Name_First")%> |
|
Segundo Nombre: |
<%=RS("Name_Middle")%> |
|
Apellido: |
<%=RS("Name_Last")%> |
|
Sufijo: |
<%=RS("Name_Suffix")%> |
|
|
|
Compañía: |
<%=RS("Company")%> |
|
Cargo: |
<%=RS("Job_Title")%> |
|
|
Tel. Trabajo: |
<%If RS("Phone_Work_1") <> "" AND NOT isNull(RS("Phone_Work_1")) Then%> (<%=RS("Phone_Work_1")%>) <%End If%><%If RS("Phone_Work_2") <> "" AND NOT isNull(RS("Phone_Work_2")) AND RS("Phone_Work_3") <> "" AND NOT isNull(RS("Phone_Work_3")) Then%><%=RS("Phone_Work_2")%>-<%=RS("Phone_Work_3")%><%End If%> |
|
Trabajo Int.: |
<%=RS("Phone_Work_Ext")%> |
|
|
|
Trabajo Fax: |
<%If RS("Fax_Work_1") <> "" AND NOT isNull(RS("Fax_Work_1")) Then%> (<%=RS("Fax_Work_1")%>) <%End If%><%If RS("Fax_Work_2") <> "" AND NOT isNull(RS("Fax_Work_2")) AND RS("Fax_Work_3") <> "" AND NOT isNull(RS("Fax_Work_3")) Then%><%=RS("Fax_Work_2")%>-<%=RS("Fax_Work_3")%><%End If%> |
|
|
|
Teléfono Casa: |
<%If RS("Phone_Home_1") <> "" AND NOT isNull(RS("Phone_Home_1")) Then%> (<%=RS("Phone_Home_1")%>) <%End If%><%If RS("Phone_Home_2") <> "" AND NOT isNull(RS("Phone_Home_2")) AND RS("Phone_Home_3") <> "" AND NOT isNull(RS("Phone_Home_3")) Then%><%=RS("Phone_Home_2")%>-<%=RS("Phone_Home_3")%><%End If%> |
|
|
|
Celular: |
<%If RS("Phone_Mobile_1") <> "" AND NOT isNull(RS("Phone_Mobile_1")) Then%> (<%=RS("Phone_Mobile_1")%>) <%End If%><%If RS("Phone_Mobile_2") <> "" AND NOT isNull(RS("Phone_Mobile_2")) AND RS("Phone_Mobile_3") <> "" AND NOT isNull(RS("Phone_Mobile_3")) Then%><%=RS("Phone_Mobile_2")%>-<%=RS("Phone_Mobile_3")%><%End If%> |
|
|
|
Información
Domiciliaria |
Información
de Internet |
|
Domicilio: |
<%If Not isNull(RS("Name_Title")) AND RS("Name_Title") <> "" Then%><%=RS("Name_Title")%> <%End If%><%If Not isNull(RS("Name_First")) AND RS("Name_First") <> "" Then%><%=RS("Name_First")%> <%End If%><%If Not isNull(RS("Name_Middle")) AND RS("Name_Middle") <> "" Then%><%=RS("Name_Middle")%> <%End If%><%If Not isNull(RS("Name_Last")) AND RS("Name_Last") <> "" Then%><%=RS("Name_Last")%> <%End If%><%=RS("Name_Suffix")%> <%If Not isNull(RS("Company")) AND RS("Company") <> "" Then%><%=RS("Company")%> <%End If%><%If Not isNull(RS("Address_1")) AND RS("Address_1") <> "" Then%><%=RS("Address_1")%> <%End If%><%If Not isNull(RS("Address_2")) AND RS("Address_2") <> "" Then%><%=RS("Address_2")%> <%End If%><%If Not isNull(RS("City")) AND RS("City") <> "" Then%><%=RS("City")%>, <%End If%><%If Not isNull(RS("State")) AND RS("State") <> "" Then%><%=RS("State")%> <%End If%><%=RS("Zip")%> |
|
|
|
Dirección1: |
<%=RS("Address_1")%> |
|
Dirección 2: |
<%=RS("Address_2")%> |
|
Ciudad: |
<%=RS("City")%> |
|
Provincia: |
<%=RS("State")%> |
|
CP.: |
<%=RS("Zip")%> |
|
País: |
<%=RS("Country")%> |
|
|
Email 1: |
<%If Not isNull(RS("Email_1")) AND RS("Email_1") <> "" Then%>"><%=RS("Email_1")%><%End If%> |
|
Email 2: |
<%If Not isNull(RS("Email_2")) AND RS("Email_2") <> "" Then%>"><%=RS("Email_2")%><%End If%> |
|
Email 3: |
<%If Not isNull(RS("Email_3")) AND RS("Email_3") <> "" Then%>"><%=RS("Email_3")%><%End If%> |
|
|
|
Web URL: |
<%If Not isNull(RS("Website")) AND RS("Website") <> "" Then%>" target="top"><%=RS("Website")%><%End If%> |
|
|
|
Usuario: |
<%=RS("User_Name")%> |
|
Password: |
<%=RS("Password")%> |
|
|
|
IM: |
<%=RS("IM_Type")%> |
|
Msn: |
<%=RS("IM_Address")%> |
|
|
|
Informaciones
Varias |
Notas |
|
Cumpleaños: |
<%=RS("Misc_1")%> |
|
Notas 2: |
<%=RS("Misc_2")%> |
|
Notas 3: |
<%=RS("Misc_3")%> |
|
Notas 4: |
<%=RS("Misc_4")%> |
|
Notas 5: |
<%=RS("Misc_5")%> |
|
|
|
<%Else%>
|
Actualmente no hay contactos.
|
<%End If
End If
%>