Trackshipment

<% if not Request.Form ="" then session.LCID=2057 dim awbno,tempawb 'ON ERROR RESUME NEXT awbno=cstr(Request.Form("awbno"))+"," awbno=replace(awbno, chr(13), ",") awbno=replace(awbno, CHR(10), "") For i = 1 To Len(AWBNO) If MID(AWBNO,i, 1) ="," Then CALL DISPLAY (TRIM(TEMPAWB)) TEMPAWB="" Else 'Response.Write tempawb TEMPAWB = TEMPAWB + Mid(AWBNO, i, 1) end if next SUB DISPLAY(CN) dim sqlstr dim sqlstr2 'ON ERROR RESUME NEXT set con = server.createobject("adodb.connection") set rst = server.createobject("adodb.recordset") set rst1=server.createobject("adodb.recordset") set rst2=server.createobject("adodb.recordset") 'con.open "provider=SQLOLEDB;data source=64.71.180.27;uid=iqbal;pwd=first@123;initial catalog=microwins_dabase" 'con.open "provider=SQLOLEDB;data source=database.kapryhost.com;uid=mic_ff;pwd=iqbal@mic;initial catalog=mic_ff" con.open "provider=SQLOLEDB;data source=49.50.86.196,8463;uid=arlog;pwd=Iqbal@786;initial catalog=AR_Logistics" 'con.open "provider=SQLOLEDB;data source=.;uid=SA;pwd=;initial catalog=IMPORT" 'sqlStr="SELECT * FROM DATAENTRY WHERE awbno ='"& LTRIM(CN) & "' or NETNO ='"& TRIM(CN) & "'" sqlStr="SELECT * FROM DATAENTRY WHERE awbno ='"& LTRIM(CN) & "'" sqlstr1="SELECT * FROM SHPHISTORY WHERE awbno ='"& LTRIM(CN) & "' ORDER BY STATUS_DT DESC, Short DESC" 'RST.OPEN "SELECT * FROM DATAENTRY WHERE AWBNO ='"& TRIM(CN) & "' OR NETNO ='"& TRIM(CN) & "'", CON sqlStr2="SELECT * FROM imgscan WHERE awbno ='"& LTRIM(CN) & "'" 'Response.Write SQLSTR RST.OPEN sqlstr, CON RST1.OPEN SQLSTR1, CON RST2.OPEN SQLSTR2, CON if not rst.EOF then DIM MYAWB MYAWB=TRIM(RST("AWBNO")) DIM STATUS STATUS="" IF rst("STATUS")="DELIVERED" THEN STATUS="DELIVERED" elseIF TRIM(rst("STATUS"))="R T O" THEN STATUS="R.T.O" elseIF TRIM(rst("STATUS"))="HOLD" THEN STATUS="HOLD" elseIF rst("STATUS")="Consignment Received At Germany" THEN STATUS="Under Custom Clearance Process In U. K. " elseIF rst("STATUS")="H" THEN STATUS="OUT FOR DELIVERY" elseIF rst("STATUS")=" " THEN STATUS="IN TRANSIT" elseIF ISNULL( rst("STATUS")) THEN STATUS="IN TRANSIT" end if %>
<% ' response.write(s) set rst=nothing %>
Shippment History <% WHILE NOT RST1.EOF %> <% RST1.MoveNext WEND %>
Activity Date Activity Status
<% = rst1("STATUS_DT")%> <% = rst1("status")%>


<% else response.write"No result found. Invalid number" end if set rst=nothing set con=nothing END SUB END IF %>