<% '-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# ' Loja Exemplo Locaweb ' Versão: 6.5 ' Data: 12/09/06 ' Arquivo: ADM_altera_categoria.asp ' Versão do arquivo: 0.0 ' Data da ultima atualização: 16/10/08 ' '----------------------------------------------------------------------------- ' 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&"") %> <%=Application("NomeLoja")%>
• Alterar Categoria

<% Call abre_conexao(conexao) codigo_categoria = request.querystring("codigo_categoria") 'Messagem referente a alteração da categoria msg_resultado = request("msg_resultado") 'Messagem referente a alteração da subcategoria msg_resultadoSubcategoria = request("msg_resultadoSubcategoria") %>
<% If checkIdioma <> "" Then array_checkIdioma = checkIdioma Vetor = Split(checkIdioma, ",") For I = 0 To Ubound(Vetor) If Vetor(I) = varLang Then varAbaClass = "abasON" Else varAbaClass = "abas" End If %> <% Next End If %>
<%= Pega_DadoBanco("IdiomaseCambios","idioma","sigla_idioma","'"&Vetor(I)&"'")%>
<% If msg_resultado <> "" Then %> <% End If If checkIdioma <> "" Then If InStr(checkIdioma,",") = 0 Then Vetor = checkIdioma VetorIdioma = Vetor VetorCount = 0 Else Vetor = Split(checkIdioma, ",") VetorCount = Ubound(Vetor) End if For I = 0 To VetorCount If VetorIdioma = "" Then VetorIdioma = Vetor(I) End If Set RS_Categoria = Server.CreateObject("ADODB.Recordset") RS_Categoria.CursorLocation = 3 RS_Categoria.CursorType = 0 RS_Categoria.LockType = 3 RS_Categoria.Open "SELECT codigo_chave, codigo_categoria, nome_categoria, descricao_categoria, sigla_idioma FROM Categorias WHERE codigo_categoria = " & codigo_categoria & " AND sigla_idioma = '"& VetorIdioma &"'", Conexao If Not RS_Categoria.EOF Then nome_categoria = RS_Categoria("nome_categoria") codigo_categoria = RS_Categoria("codigo_categoria") descricao_categoria = RS_Categoria("descricao_categoria") If RS_Categoria("descricao_categoria") <> "" Then descricao_categoria = RS_Categoria("descricao_categoria") Else descricao_categoria = Empty End If If RS_Categoria("codigo_chave") <> "" Then codigo_chave = RS_Categoria("codigo_chave") Else codigo_chave = "0" End If Else descricao_categoria = Empty nome_categoria = Empty codigo_chave = "0" End If If VetorIdioma = varLang Then verDisplay = "''" Else verDisplay = "none" End If %> <% VetorIdioma = "" Next End If %>
<%=msg_resultado%>
<% If VetorCount <> 0 Then If codigo_chave <> Empty Then %> <%Else%> <% End If End If %>
 APAGAR ESTA CATEGORIA DESTE IDIOMA
 CATEGORIA NÃO CADASTRADA PARA ESTE IDIOMA
 NOME DA CATEGORIA
DESCRIÇÃO DA CATEGORIA
<% 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_categoria oFCKeditor.Height = "300" oFCKeditor.Width = "100%" oFCKeditor.Create "descricao_categoria|"&VetorIdioma %>
  
<%If request("msg_resultadoSubcategoria") <> "" Then%> <%End if%> <% Set RS_SubCategorias = Server.CreateObject("ADODB.Recordset") RS_SubCategorias.CursorLocation = 3 RS_SubCategorias.CursorType = 0 RS_SubCategorias.LockType = 3 RS_SubCategorias.Open "SELECT codigo_chave, codigo_subcategoria, codigo_categoria, nome_subcategoria, descricao_subcategoria, sigla_idioma FROM Subcategorias WHERE codigo_categoria=" & codigo_categoria & " AND sigla_idioma = '"&varLang&"'", Conexao ' Checa se existem Categorias no banco de dados If RS_SubCategorias.Eof then %> <% Else While Not RS_SubCategorias.EOF If RS_SubCategorias.AbsolutePosition Mod 2 = 0 Then strColor = "class='Linha2Tabela'" Else strColor = "class='Linha1Tabela'" End If %> onMouseOver="this.style.backgroundColor='#FFECEC'; this.style.cursor='hand';" onMouseOut="this.style.backgroundColor='';" onclick="javascript: window.location='adm_altera_subcategoria.asp?codigo_categoria=<%= codigo_categoria %>&codigo_subcategoria=<%= RS_SubCategorias("codigo_subcategoria") %>';"> <% RS_SubCategorias.MoveNext Wend End if %>
SUBCATEGORIAS RELACIONADAS
<%=msg_resultadoSubcategoria%>
CÓDIGO
SUBCATEGORIA
DESCRIÇÃO
Nenhuma Subcategoria relacionada a esta categoria.
<%= RS_SubCategorias ("codigo_subcategoria") %> <%= RS_SubCategorias("nome_subcategoria") %> <%= RS_SubCategorias("descricao_subcategoria") %>
<% RS_SubCategorias.Close Set RS_SubCategorias = Nothing RS_Categoria.Close Set RS_Categoria = Nothing %>