<% id=format(Request.Form("textfield")) If id="" then id=Request.QueryString("id") End If ' Function that eliminates singles "'" and spaces in input strings ' And some other things to avoid SQL injection attacks Function format(st) dim stnew stnew = st stnew = Replace(stnew,"'","''") stnew = Replace(stnew,"""","") stnew = Replace(stnew,"--","") stnew = Replace(stnew,"DELETE","") stnew = Replace(stnew,"UPDATE","") stnew = Replace(stnew,"DROP","") stnew = Replace(stnew,"SELECT","") stnew = Replace(stnew,"INSERT","") stnew = Server.HTMLEncode(stnew) format = Trim(stnew) End Function Set connection = Server.CreateObject("ADODB.Connection") connection.Open("customers") SQL="SELECT * FROM Phone WHERE Phone_Number like '"& id &"';" Set list=connection.Execute(SQL) If list.EOF then Response.Redirect("./sphonenotfound.asp") End If SQL="SELECT * FROM Customer WHERE ID_Customer like '"&list.Fields("ID_Customer")&"';" Set list2=connection.Execute(SQL) %> Cellular Advice NI LTD

Show Phone Details

This phone has the following details:

" />

">Customer's Details  
Company <%Response.Write(list2.Fields("Company_Name"))%>
Name <%Response.Write(list2.Fields("Name"))%>
Surname <%Response.Write(list2.Fields("Surname"))%>

Phone Details
Phone Number <%Response.Write(list.Fields("Phone_Number"))%>
Network <%Response.Write(list.Fields("Network"))%>
Type <%Response.Write(list.Fields("Type"))%>
IMEI <%Response.Write(list.Fields("IMEI"))%>
SIM <%Response.Write(list.Fields("SIM"))%>
Contract Date
(dd/mm/yyyy)
<%Response.Write(Day(list.Fields("Contract_Date")))%>/ <%Response.Write(Month(list.Fields("Contract_Date")))%> /<%Response.Write(Year(list.Fields("Contract_Date")))%>
Password <%Response.Write(list.Fields("Password"))%>
Tariff <%Response.Write(list.Fields("Tariff"))%>
Model <%Response.Write(list.Fields("Model"))%>
CPS <%Response.Write(list.Fields("CPS"))%>
Upg_Ref <%Response.Write(list.Fields("Upg_Ref"))%>
Profit <%Response.Write(list.Fields("Profit"))%> £
Commision <%Response.Write(list.Fields("Commission"))%> £

Bank Details  
Bank Name <%Response.Write(list.Fields("Bank_Name"))%>
Account Number <%Response.Write(list.Fields("Account_Number"))%>
Sort Code <%Response.Write(list.Fields("Sort_Code"))%>



">Click here to see the details of the customer.


Click here to list the usage of this phone.


Click here to calculate the usage of this phone.

©2005 Cellular Advice NI LTD

<% connection.Close() %> e-REdING. Biblioteca de la Escuela Superior de Ingenieros de Sevilla.


SISTEMA DE INFORMACIÓN INTEGRAL PARA EMPRESAS APLICANDO TECNOLOGÍAS DE INFORMACIÓN Y VPNS

: Salvago Hidalgo, Raúl
: Ingeniería Telecomunicación
Contenido del proyecto: