<!--#include file="../include/Conno.asp"-->
<!--#include file="../Include/char.asp" -->

<!--#include file="IsLogin.asp" -->
<%
 m_BtnUpdate = Request.Form("btnUpdate")
 m_BtnInsert = Request.Form("btnInsert")
 m_BtnDelete = Request.Form("hidDelete2")
 m_TypeName = checkStr(Trim(Request.Form("txtTypeName")))
 m_CategoryID = Request.Form("selCategoryUpdate")
 m_UserID = Session("CurUserID")
 if m_BtnInsert = "ΜνΌΣ" then
   m_Sql = "Insert Into AL_Category(F_UserID,F_Value)" 
   m_Sql = m_Sql + "Values('"&m_UserID&"','"&m_TypeName&"')"
   conn.Execute(m_Sql)
   Response.redirect "AL_AddressList.asp"
 end if
 
 if m_BtnUpdate = "ΠήΈΔ" then
  m_Sql = "update AL_Category set F_Value='"&m_TypeName&"' where F_ID="&m_CategoryID
  conn.Execute(m_Sql)
   Response.redirect "AL_AddressList.asp"
 end if
 
 if m_btnDelete = "ΙΎ³ύ" then
   m_Sql = "DELETE FROM AL_Category Where F_ID = "&m_CategoryID
   conn.Execute(m_Sql)
   'Detlete all Category BookMark
   m_Sql = "DELETE FROM AL_AddressList WHERE F_CategoryID= "&m_CategoryID
   conn.Execute(m_Sql)
   Response.redirect "AL_AddressList.asp"
 end if

Call CloseDatabase()
%>
