%@ LANGUAGE=VBScript %>
<% Response.Buffer = True %>
<%
IF Session("Common_Access") < 1 THEN
'msgbox "Invalid User Name OR Password",48,"Warning"
Response.Clear
'error logon warning
Response.Redirect "Default.asp"
ELSEIF Session("Common_Access") = 1 THEN
Response.Redirect "UComInfoAdd.asp"
END IF
Set IndustryNetSQL = Server.CreateObject("ADODB.Connection")
IndustryNetSQL.Open "thaiindustry", "tinhosting", "tinhosting"
sql = "SELECT * FROM usermember " &_
"WHERE username = '"& session("UserName") & "'"
Set RS = IndustryNetSQL.Execute(sql)
v_userid = RS("userid")
sql2 = "SELECT * FROM company " &_
"WHERE userid = "& v_userid &""
Set RS2 = IndustryNetSQL.Execute(sql2)
v_companyid = RS2("CompanyID")
v_catid = RS2("catid")
sql3 = "SELECT * FROM products " &_
"WHERE companyid = "& v_companyid & ""
Set RS3 = IndustryNetSQL.Execute(sql3)
RS2.CLOSE
IF RS3.EOF THEN
Response.Redirect "UProdInfoAdd.asp"
ELSE
v3_catid = v_catid
END IF
cat_v = ""
RS3.CLOSE
sql3 = "SELECT * FROM products " &_
"WHERE companyid = "& v_companyid & " " &_
"ORDER BY productname ASC"
Set RS3 = IndustryNetSQL.Execute(sql3)
IF session("Status_Edit_Product") <> 0 THEN
v_productid99 = Request.Form("Edt_prod")
ss =RS3("ProductName")
DO WHILE v_productid99 <> ss
RS3.MOVENEXT
ss = RS3("ProductName")
LOOP
c_productid = RS3("ProductID")
c_name = RS3("ProductName")
c_brand = RS3("BrandName")
c_desc = RS3("Productdescription")
c_spec = RS3("Specification")
c_Category = v_catid
c_packing = RS3("Packing")
c_price = RS3("Price")
c_capacity = RS3("Capacity")
c_minorder = RS3("MinOrder")
sql4 = "SELECT catid,category FROM categories "&_
"WHERE catid ="& c_category & ""
Set RS4 = IndustryNetSQL.Execute(sql4)
session("Status_Edit_Product") = 0
ELSE
sql4 = "SELECT catid,category FROM categories "&_
"WHERE catid ="& v3_catid & ""
Set RS4 = IndustryNetSQL.Execute(sql4)
END IF
RS5 = RS3
RS3.MOVEFIRST
%>
Welcome to Thai Industry Network
|
|
|
<%= FormatDateTime (date, vbLongDate) %>
|
|
|
|
|
|
|
| User Member |
<%=RS("FName")& " " %><%=RS("LName")& " " %> |
|
| Product Infomation Manager [Edit]<%=v_productid99 %> |
|
|
<%session("Status_Edit_Product") = 1 %>