<% '-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# ' Loja Exemplo Locaweb ' Versão: 6.4 ' Data: 12/09/06 ' Arquivo: ADM_altera_subcategoria.asp ' Versão do arquivo: 0.0 ' Data da ultima atualização: 30/08/07 ' '----------------------------------------------------------------------------- ' Licença Código Livre: http://comercio.Locaweb.com.br/gpl/gpl.txt '-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# ' Esta página só pode ser acessada se o visitante já se autenticou checa_senha() 'Verifica se o perfil de usuário permite acesso a esta página Call checa_perfil_admin(""&ADMProd&"") codigo_categoria = request("codigo_categoria") %> <%=Application("NomeLoja")%>
• Alterar SubCategoria

<% Call abre_conexao(conexao) codigo_subcategoria = request.querystring("codigo_subcategoria") msg_resultadoSubcategoria = request("msg_resultadoSubcategoria") %>
<% If checkIdioma <> "" Then Set RS_Categoria = Server.CreateObject("ADODB.Recordset") RS_Categoria.CursorLocation = 3 RS_Categoria.CursorType = 0 RS_Categoria.LockType = 3 RS_Categoria.Open "SELECT sigla_idioma FROM Categorias WHERE codigo_categoria = " & request("codigo_categoria") & "", Conexao If Not RS_Categoria.EOF Then While Not RS_Categoria.EOF verifIdioma = ChecaValorArray(checkIdioma,RS_Categoria("sigla_idioma")) If verifIdioma Then checkIdiomaBDTemp = checkIdiomaBDTemp & RS_Categoria("sigla_idioma") & "," checkIdiomaBDTemp1 = Split(checkIdiomaBDTemp,",") If UBound(checkIdiomaBDTemp1) <> 0 Then checkIdiomaBD = checkIdiomaBDTemp End If If RS_Categoria("sigla_idioma") = varLang Then varAbaClass = "abasON" Else varAbaClass = "abas" End If %> <% End If RS_Categoria.MoveNext Wend End If RS_Categoria.Close Set RS_Categoria = Nothing End If %>
">');" class="TextoPageLink"><%=Sigla_IdiomaPais(RS_Categoria("sigla_idioma"))%>
<% If msg_resultadoSubcategoria <> "" Then %> <% End If If checkIdiomaBD <> "" Then If InStr(checkIdiomaBD,",") = 0 Then Vetor = checkIdiomaBD VetorIdioma = Vetor VetorCount = 0 Else Vetor = Split(checkIdiomaBD, ",") VetorCount = Ubound(Vetor) End if For I = 0 To VetorCount If VetorIdioma = "" Then VetorIdioma = Vetor(I) End If If VetorIdioma = varLang Then verDisplay = "''" Else verDisplay = "none" End If Set RS_Subcategoria = Server.CreateObject("ADODB.Recordset") RS_Subcategoria.CursorLocation = 3 RS_Subcategoria.CursorType = 0 RS_Subcategoria.LockType = 3 RS_Subcategoria.Open "SELECT codigo_chave, codigo_subcategoria, codigo_categoria, nome_subcategoria, descricao_subcategoria, sigla_idioma FROM SubCategorias WHERE codigo_subcategoria = " & codigo_subcategoria & " AND sigla_idioma = '"& VetorIdioma &"'", Conexao If Not RS_Subcategoria.EOF Then If RS_Subcategoria("codigo_chave") <> session("trava_codigo_chave") Then nome_subcategoria = RS_Subcategoria("nome_subcategoria") codigo_subcategoria = RS_Subcategoria("codigo_subcategoria") descricao_subcategoria = RS_Subcategoria("descricao_subcategoria") End if If RS_Subcategoria("descricao_subcategoria") <> "" Then descricao_subcategoria = RS_Subcategoria("descricao_subcategoria") Else descricao_subcategoria = Empty End If If RS_Subcategoria("codigo_chave") <> "" Then codigo_chave = RS_Subcategoria("codigo_chave") Else codigo_chave = "0" End If Else descricao_subcategoria = Empty nome_subcategoria = Empty codigo_chave = "0" End If If VetorIdioma = varLang Then verDisplay = "''" Else verDisplay = "none" End If RS_Subcategoria.Close Set RS_Subcategoria = Nothing %> <% VetorIdioma = "" Next End If %>
<%=msg_resultadoSubcategoria%>
<% If VetorCount <> 0 Then If codigo_chave <> Empty Then%> <%Else%> <% End If End if %>
 APAGAR ESTA SUBCATEGORIA DESTE IDIOMA
 SUBCATEGORIA NÃO CADASTRADA PARA ESTE IDIOMA
 NOME DA SUBCATEGORIA
DESCRIÇÃO DA SUBCATEGORIA
<% Dim sBasePath sBasePath = Request.ServerVariables("PATH_INFO") sBasePath = Left( sBasePath, InStrRev( sBasePath, "/_samples" ) ) Dim oFCKeditor Set oFCKeditor = New FCKeditor oFCKeditor.BasePath = sBasePath oFCKeditor.Value = descricao_subcategoria oFCKeditor.Height = "300" oFCKeditor.Width = "100%" oFCKeditor.Create "descricao_subcategoria|"&VetorIdioma %>
  
OBS: Se apagar a subcategoria, todos os produtos e pedidos relativos a essa subcategoria serão removidos.