E:
/
home
/
kbcomunicacao1
/
Web
/
sistema
/
Upload File
HOME
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/administrativo.dwt.asp" codeOutsideHTMLIsLocked="false" --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- InstanceBeginEditable name="doctitle" --> <title>KB COMUNICAÇÃO - SISTEMA ADMINISTRATIVO</title> <!-- InstanceEndEditable --> <link href="estilo.css" rel="stylesheet" type="text/css"> <!-- InstanceBeginEditable name="head" --> <!-- InstanceEndEditable --> </head> <!-- #include file ="conexao.asp" --> <% acao = request("acao") if acao = "sair" then For Each objCookie In Request.Cookies Response.Cookies(objCookie) = "" Next response.Redirect "login.asp" end if logado = request.cookies("logado") if logado <> "logado" then response.redirect "login.asp" else end if menu = request("menu") Session.lcid = 1046 %> <body> <link rel="stylesheet" type="text/css" href="js/jquery.qtip.min.css" /> <!--JavaScript - Might want to move these to the footer of the page to prevent blocking--> <script type="text/javascript" src="js/jquery.min.js"></script> <script type="text/javascript" src="js/jquery.qtip.min.js"></script> <table width="100%" class="fundopontos" border="0" cellspacing="0" cellpadding="0"> <tr> <td> <table width="999" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="23%" align="center"><a href="index.asp"><img src="layout/logo.jpg" width="125" height="114" border="0" /></a></td> <td width="77%" height="129" align="right"> <!--MENU TOPO COM FILTRO --> <% if menu = "1" then esse1 = "src=""layout/menu_inicio_p.jpg"" border=""0"" onMouseOver=""this.src='layout/menu_inicio_p.jpg'"" onMouseOut=""this.src='layout/menu_inicio_p.jpg'""" esse2 = "src=""layout/menu_noticia_c.jpg"" border=""0"" onMouseOver=""this.src='layout/menu_noticia_p.jpg'"" onMouseOut=""this.src='layout/menu_noticia_c.jpg'""" esse3 = "src=""layout/menu_categoria_c.jpg"" border=""0"" onMouseOver=""this.src='layout/menu_categoria_p.jpg'"" onMouseOut=""this.src='layout/menu_categoria_c.jpg'""" esse4 = "src=""layout/menu_imprensa_c.jpg"" border=""0"" onMouseOver=""this.src='layout/menu_imprensa_p.jpg'"" onMouseOut=""this.src='layout/menu_imprensa_c.jpg'""" esse5 = "src=""layout/menu_usuarios_c.jpg"" border=""0"" onMouseOver=""this.src='layout/menu_usuarios_p.jpg'"" onMouseOut=""this.src='layout/menu_usuarios_c.jpg'""" else if menu = "2" then esse1 = "src=""layout/menu_inicio_c.jpg"" border=""0"" onMouseOver=""this.src='layout/menu_inicio_p.jpg'"" onMouseOut=""this.src='layout/menu_inicio_c.jpg'""" esse2 = "src=""layout/menu_noticia_p.jpg"" border=""0"" onMouseOver=""this.src='layout/menu_noticia_p.jpg'"" onMouseOut=""this.src='layout/menu_noticia_p.jpg'""" esse3 = "src=""layout/menu_categoria_c.jpg"" border=""0"" onMouseOver=""this.src='layout/menu_categoria_p.jpg'"" onMouseOut=""this.src='layout/menu_categoria_c.jpg'""" esse4 = "src=""layout/menu_imprensa_c.jpg"" border=""0"" onMouseOver=""this.src='layout/menu_imprensa_p.jpg'"" onMouseOut=""this.src='layout/menu_imprensa_c.jpg'""" esse5 = "src=""layout/menu_usuarios_c.jpg"" border=""0"" onMouseOver=""this.src='layout/menu_usuarios_p.jpg'"" onMouseOut=""this.src='layout/menu_usuarios_c.jpg'""" else if menu = "3" then esse1 = "src=""layout/menu_inicio_c.jpg"" border=""0"" onMouseOver=""this.src='layout/menu_inicio_p.jpg'"" onMouseOut=""this.src='layout/menu_inicio_c.jpg'""" esse2 = "src=""layout/menu_noticia_c.jpg"" border=""0"" onMouseOver=""this.src='layout/menu_noticia_p.jpg'"" onMouseOut=""this.src='layout/menu_noticia_c.jpg'""" esse3 = "src=""layout/menu_categoria_p.jpg"" border=""0"" onMouseOver=""this.src='layout/menu_categoria_p.jpg'"" onMouseOut=""this.src='layout/menu_categoria_p.jpg'""" esse4 = "src=""layout/menu_imprensa_c.jpg"" border=""0"" onMouseOver=""this.src='layout/menu_imprensa_p.jpg'"" onMouseOut=""this.src='layout/menu_imprensa_c.jpg'""" esse5 = "src=""layout/menu_usuarios_c.jpg"" border=""0"" onMouseOver=""this.src='layout/menu_usuarios_p.jpg'"" onMouseOut=""this.src='layout/menu_usuarios_c.jpg'""" else if menu = "4" then esse1 = "src=""layout/menu_inicio_c.jpg"" border=""0"" onMouseOver=""this.src='layout/menu_inicio_p.jpg'"" onMouseOut=""this.src='layout/menu_inicio_c.jpg'""" esse2 = "src=""layout/menu_noticia_c.jpg"" border=""0"" onMouseOver=""this.src='layout/menu_noticia_p.jpg'"" onMouseOut=""this.src='layout/menu_noticia_c.jpg'""" esse3 = "src=""layout/menu_categoria_c.jpg"" border=""0"" onMouseOver=""this.src='layout/menu_categoria_p.jpg'"" onMouseOut=""this.src='layout/menu_categoria_c.jpg'""" esse4 = "src=""layout/menu_imprensa_p.jpg"" border=""0"" onMouseOver=""this.src='layout/menu_imprensa_p.jpg'"" onMouseOut=""this.src='layout/menu_imprensa_p.jpg'""" esse5 = "src=""layout/menu_usuarios_c.jpg"" border=""0"" onMouseOver=""this.src='layout/menu_usuarios_p.jpg'"" onMouseOut=""this.src='layout/menu_usuarios_c.jpg'""" else if menu = "5" then esse1 = "src=""layout/menu_inicio_c.jpg"" border=""0"" onMouseOver=""this.src='layout/menu_inicio_p.jpg'"" onMouseOut=""this.src='layout/menu_inicio_c.jpg'""" esse2 = "src=""layout/menu_noticia_c.jpg"" border=""0"" onMouseOver=""this.src='layout/menu_noticia_p.jpg'"" onMouseOut=""this.src='layout/menu_noticia_c.jpg'""" esse3 = "src=""layout/menu_categoria_c.jpg"" border=""0"" onMouseOver=""this.src='layout/menu_categoria_p.jpg'"" onMouseOut=""this.src='layout/menu_categoria_c.jpg'""" esse4 = "src=""layout/menu_imprensa_c.jpg"" border=""0"" onMouseOver=""this.src='layout/menu_imprensa_p.jpg'"" onMouseOut=""this.src='layout/menu_imprensa_c.jpg'""" esse5 = "src=""layout/menu_usuarios_p.jpg"" border=""0"" onMouseOver=""this.src='layout/menu_usuarios_p.jpg'"" onMouseOut=""this.src='layout/menu_usuarios_p.jpg'""" else esse1 = "src=""layout/menu_inicio_c.jpg"" border=""0"" onMouseOver=""this.src='layout/menu_inicio_p.jpg'"" onMouseOut=""this.src='layout/menu_inicio_c.jpg'""" esse2 = "src=""layout/menu_noticia_c.jpg"" border=""0"" onMouseOver=""this.src='layout/menu_noticia_p.jpg'"" onMouseOut=""this.src='layout/menu_noticia_c.jpg'""" esse3 = "src=""layout/menu_categoria_c.jpg"" border=""0"" onMouseOver=""this.src='layout/menu_categoria_p.jpg'"" onMouseOut=""this.src='layout/menu_categoria_c.jpg'""" esse4 = "src=""layout/menu_imprensa_c.jpg"" border=""0"" onMouseOver=""this.src='layout/menu_imprensa_p.jpg'"" onMouseOut=""this.src='layout/menu_imprensa_c.jpg'""" esse5 = "src=""layout/menu_usuarios_c.jpg"" border=""0"" onMouseOver=""this.src='layout/menu_usuarios_p.jpg'"" onMouseOut=""this.src='layout/menu_usuarios_c.jpg'""" end if end if end if end if end if %> <a href="inicial.asp?menu=1"><img <%=esse1%>/></a> <a href="noticias.asp?menu=2"><img <%=esse2%>/></a> <a href="clientes.asp?menu=3"> <img <%=esse3%>/></a> <a href="imprensa.asp?menu=4"> <img <%=esse4%>/></a> <a href="usuarios.asp?menu=5"><img <%=esse5%>/></a> <!--FINAL MENU TOPO COM FILTRO --> </td> </tr> </table> </td> </tr> <tr> <td height="50" ><!-- InstanceBeginEditable name="EditRegion1" --> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="13%"><table width="127" height="33" background="layout/fundo_botao_topo.png" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="center"><a href="inicial.asp?menu=1" style="color:#FFF;">Todas os destaques</a></td> </tr> </table></td> <td width="39%"><table width="127" height="33" background="layout/fundo_botao_topo.png" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="center"><a href="inicial.asp?menu=1&tipo=inserir" style="color:#FFF;">Inserir destaque</a></td> </tr> </table></td> <td width="48%" align="right"> <table width="127" height="33" background="layout/fundo_botao_topo.png" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="center"><a href="?acao=sair" style="color:#FFF;">Sair do sistema</a></td> </tr> </table> </td> </tr> </table> <!-- InstanceEndEditable --></td> </tr> <tr> <td> </td> </tr> <tr> <td><!-- InstanceBeginEditable name="EditRegion2" --> <% tipo = request("tipo") if tipo = "" then %> <table width="999" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td> </td> </tr> <tr> <td> <table width="100%" border="0" cellspacing="3" cellpadding="3"> <tr> <td width="50%" align="left" valign="top"> <table width="986" style="border:1px solid #cacaca; background-color:#FFF;" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="50" height="41" background="layout/fundo_topo_menu.jpg"><img src="layout/casa.png" alt="CATEGORIAS" width="37" height="32" hspace="5" /></td> <td width="936" background="layout/fundo_topo_menu.jpg" class="fontBranca"><strong>Destaque - Página inicial</strong></td> </tr> <tr> <td colspan="2"> <% set recDestaques = server.CreateObject( "ADODB.recordset") SQL = "SELECT id, imagem FROM destaques ORDER BY id DESC" recDestaques.open SQL, conbanco do while not recDestaques.eof %> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td onmouseover="this.style.background='#efefef'" onmouseout="this.style.background=''" style="cursor:pointer;"> <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-top:#c7c7c7 solid 1px; border-bottom:#c7c7c7 solid 1px;"> <tr> <td width="93%" height="26" align="left" > <a title="DESTAQUE HOME" target="_blank"><img src="../destaques/<%=recDestaques("imagem")%>" width="297" height="101"/></a></td> <td width="3%"><a href="inicial.asp?menu=1&tipo=editar&id=<%=recDestaques("id")%>" title="EDITAR"><img src="layout/editar.png" alt="EDITAR" width="18" height="18" hspace="5" border="0" /></a></td> <td width="4%"><a href="inicial.asp?menu=1&tipo=deletar&id=<%=recDestaques("id")%>" title="DELETAR"><img src="layout/deletar.png" alt="DELETAR" width="14" height="16" hspace="5" border="0" /></a></td> </tr> </table> </td> </tr> </table> <% recDestaques.movenext loop recDestaques.close set recDestaques = nothing %> </td> </tr> </table> </table> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> </table> <% else if tipo = "editar" then id = request("id") set recDestaque = server.CreateObject( "ADODB.recordset") SQL = "SELECT imagem, url FROM destaques WHERE id = "&id recDestaque.open SQL, conbanco %> <table width="999" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td> </td> </tr> <tr> <td> <table width="100%" border="0" cellspacing="3" cellpadding="3"> <tr> <td width="50%" align="left" valign="top"> <table width="986" style="border:1px solid #cacaca; background-color:#FFF;" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="50" height="41" background="layout/fundo_topo_menu.jpg"><img src="layout/casa.png" alt="CATEGORIAS" width="37" height="32" hspace="5" /></td> <td width="936" background="layout/fundo_topo_menu.jpg" class="fontBranca"><strong>Editar destaque</strong></td> </tr> <tr> <td colspan="2"> <form ACTION="uploadDestaque1.asp" METHOD="POST" ENCtype="multipart/form-data"> <input name="menu" id="menu" type="hidden" value="<%=menu%>" /> <input name="id" id="id" type="hidden" value="<%=id%>" /> <input name="tipo" id="tipo" type="hidden" value="editou" /> <table width="100%" border="0" cellspacing="3" cellpadding="3"> <tr> <td align="right"><strong>Nova</strong></td> <td><input type="file" size="40" id="myFile" name="myFile" style="width: 860px;" /></td> </tr> <tr> <td align="right" valign="top"><strong>URL</strong></td> <td><input name="url" type="text" id="url" style="width: 860px;" value="<%=recDestaque("url")%>"/></td> </tr> <tr> <td width="11%" align="right" valign="top"><strong>Atual</strong></td> <td width="89%"><strong><img src="../destaques/<%=recDestaque("imagem")%>" /></strong></td> </tr> <tr> <td> </td> <td><input type="submit" name="button" id="button" value="SALVAR" /></td> </tr> </table> </form> </td> </tr> </table> </table> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> </table> <% recDestaque.close set recDestaque = nothing else if tipo = "deletar" then id = request("id") set recDestaque = server.CreateObject( "ADODB.recordset") SQL = "SELECT imagem FROM destaques WHERE id = "&id recDestaque.open SQL, conbanco %> <table width="999" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td> </td> </tr> <tr> <td> <table width="100%" border="0" cellspacing="3" cellpadding="3"> <tr> <td width="50%" align="left" valign="top"> <table width="986" style="border:1px solid #cacaca; background-color:#FFF;" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="50" height="41" background="layout/fundo_topo_menu.jpg"><img src="layout/casa.png" alt="CATEGORIAS" width="37" height="32" hspace="5" /></td> <td width="936" background="layout/fundo_topo_menu.jpg" class="fontBranca"><strong>Deletar destaque</strong></td> </tr> <tr> <td colspan="2"> <table width="100%" border="0" cellspacing="3" cellpadding="3"> <tr> <td align="center"><p>Deseja mesmo deletar o destaque:</p> <p> <strong><img src="../destaques/<%=recDestaque("imagem")%>" /></strong></p></td> </tr> <tr> <td align="center"><strong><a href="inicial.asp?id=<%=id%>&tipo=deletarmesmp">SIM</a> | <a href="inicial.asp?menu=1">NÃO</a></strong></td> </tr> </table> </td> </tr> </table> </table> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> </table> <% else if tipo = "deletarmesmp" then id = request("id") sqlText = "DELETE FROM destaques WHERE id="&id conbanco.Execute(sqlText) response.redirect("inicial.asp?menu=1") else if tipo = "inserir" then %> <table width="999" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td> </td> </tr> <tr> <td> <table width="100%" border="0" cellspacing="3" cellpadding="3"> <tr> <td width="50%" align="left" valign="top"> <table width="986" style="border:1px solid #cacaca; background-color:#FFF;" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="50" height="41" background="layout/fundo_topo_menu.jpg"><img src="layout/casa.png" alt="CATEGORIAS" width="37" height="32" hspace="5" /></td> <td width="936" background="layout/fundo_topo_menu.jpg" class="fontBranca"><strong>Inserir destaque</strong></td> </tr> <tr> <td colspan="2"> <form ACTION="uploadDestaque.asp" METHOD="POST" ENCtype="multipart/form-data"> <input name="menu" id="menu" type="hidden" value="<%=menu%>" /> <input name="tipo" id="tipo" type="hidden" value="inseriu" /> <table width="100%" border="0" cellspacing="3" cellpadding="3"> <tr> <td width="11%" align="right"><strong>Imagem</strong></td> <td width="89%"><input type="FILE" SIZE="40" id="myFile" NAME="myFile" style="width: 860px;"></td> </tr> <tr> <td align="right" valign="middle"><strong>URL</strong></td> <td valign="middle"><input type="text" name="url" id="url" style="width: 860px;"/></td> </tr> <tr> <td> </td> <td><input type="submit" name="button" id="button" value="CADASTRAR" /></td> </tr> </table> </form> </td> </tr> </table> </table> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> </table> <% end if end if end if end if end if %> <!-- InstanceEndEditable --></td> </tr> <tr> <td> </td> </tr> </table> </td> </tr> </table> <script type="text/javascript" class="example"> $(document).ready(function() { // Match all <A/> links with a title tag and use it as the content (default). $('a[title]').qtip(); }); </script> </body> <!-- InstanceEnd --></html>