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" --> <script type="text/javascript" src="nicEdit.js"></script> <script type="text/javascript"> //<![CDATA[ bkLib.onDomLoaded(function() { new nicEditor({fullPanel : true, iconsPath : 'nicEditorIcons.gif'}).panelInstance('noticia'); }); //]]> </script> <script> function mascara(src, mask){ var i = src.value.length; var saida = mask.substring(0,1); var texto = mask.substring(i) if (texto.substring(0,1) != saida) { src.value += texto.substring(0,1); } } function MM_jumpMenu(targ,selObj,restore){ //v3.0 eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); if (restore) selObj.selectedIndex=0; } </script> <table width="998" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="133"> <table width="127" height="33" background="layout/fundo_botao_topo.png" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="center"><a href="imprensa.asp?menu=4" style="color:#FFF;">Cliente</a></td> </tr> </table> </td> <td width="133"> <table width="127" height="33" background="layout/fundo_botao_topo.png" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="center"><a href="chamadas.asp?menu=4" style="color:#FFF;">Notícias</a></td> </tr> </table> </td> <td width="133" align="left"> <table width="127" height="33" background="layout/fundo_botao_topo.png" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="center"><a href="artigos.asp?menu=4" style="color:#FFF;">Artigos</a></td> </tr> </table> </td> <td width="127" align="left"> <table width="127" height="33" background="layout/fundo_botao_topo.png" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="center"><a href="imagens.asp?menu=4" style="color:#FFF;">Imagens</a></td> </tr> </table> </td> <td width="135" 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="namidia.asp?menu=4" style="color:#FFF;">Na Mídia</a></td> </tr> </table></td> <td width="337" 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" --> <table width="999" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td> </td> </tr> <tr> <td> <table width="999" style="border:1px solid #cacaca; background-color:#FFF;" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="3" height="41" background="layout/fundo_topo_menu.jpg"> </td> <td background="layout/fundo_topo_menu.jpg" class="fontBranca" width="700"><strong>Notícias</strong></td> <td width="14%" background="layout/fundo_topo_menu.jpg" class="fontBranca"><table style="font-family:Verdana, Geneva, sans-serif; font-size:11px;" background="layout/menu_menu.png" width="126" height="33" border="0" cellspacing="3" cellpadding="3"> <tr> <td align="center"><a href="chamadas.asp" style="color:#FFF;">Início</a></td> </tr> </table></td> <td width="14%" background="layout/fundo_topo_menu.jpg" class="fontBranca"><table style="font-family:Verdana, Geneva, sans-serif; font-size:11px;" background="layout/menu_menu.png" width="126" height="33" border="0" cellspacing="3" cellpadding="3"> <tr> <td align="center"><a href="chamadas.asp?tipo=inserir" style="color:#FFF;">Inserir Notícia</a></td> </tr> </table></td> </tr> <tr> <td colspan="4" valign="top"> <% tipo = request("tipo") if tipo = "" then %> <form action="chamadas.asp" method="post" name="chamadas"> <input name="tipo" id="tipo" type="hidden" value="cliente" /> <input name="menu" id="menu" type="hidden" value="4" /> <table width="100%" border="0" cellspacing="3" cellpadding="3"> <tr> <td align="center" valign="top"><strong>Por favor selecione o cliente para proseguir.</strong></td> </tr> <tr> <td align="center" valign="top"> <select name="id" id="id"> <% set recCliente = server.CreateObject( "ADODB.recordset") SQL = "SELECT nome, id FROM cliente ORDER BY nome ASC" recCliente.open SQL, conbanco %> <option value="">------</option> <% do while not recCliente.eof %> <option value="<%=recCliente("id")%>"><%=recCliente("nome")%></option> <% recCliente.movenext loop recCliente.close set recCliente = nothing %> </select> <input type="submit" name="button2" id="button2" value="CONTINUAR" /></td> </tr> </table> </form> <% else if tipo = "editar" then id = request("id") iddocliente = request("iddocliente") set recNoticia = server.CreateObject( "ADODB.recordset") SQL = "SELECT titulo, dia, mes, ano, noticia FROM noticias WHERE id = "&id recNoticia.open SQL, conbanco set recCliente = server.CreateObject( "ADODB.recordset") SQL = "SELECT nome FROM cliente WHERE id = "&iddocliente recCliente.open SQL, conbanco %> <form action="chamadas.asp" method="post" name="noticia"> <input name="id" id="id" type="hidden" value="<%=id%>" /> <input name="tipo" id="tipo" type="hidden" value="editou" /> <input name="iddocliente" id="iddocliente" type="hidden" value="<%=iddocliente%>" /> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="fontBranca"> </td> </tr> <tr> <td height="41" bgcolor="#2D2D2D" class="fontBranca"> Editar notícia</td> </tr> <tr> <td><table width="100%" border="0" cellspacing="3" cellpadding="3"> <tr> <td align="right"><strong>Cliente</strong></td> <td align="left"><select name="cliente" id="cliente"> <option value="<%=iddocliente%>"><%=recCliente("nome")%></option> <option value="<%=iddocliente%>"></option> <% recCliente.close set recCliente = nothing set recCliente = server.CreateObject( "ADODB.recordset") SQL = "SELECT id, nome FROM cliente ORDER BY nome ASC" recCliente.open SQL, conbanco do while not recCliente.eof %> <option value="<%=recCliente("id")%>"><%=recCliente("nome")%></option> <% recCliente.movenext loop recCliente.close set recCliente = nothing %> </select></td> </tr> <tr> <td width="10%" align="right"><strong>Titulo</strong></td> <td width="90%" align="left"><input name="titulo" type="text" id="titulo" style="width: 860px;" value="<%=recNoticia("titulo")%>" /></td> </tr> <tr> <td align="right"><strong>Data</strong></td> <td align="left"><input name="data" type="text" id="data" onkeypress="mascara(this, '##/##/####')" value="<%=recNoticia("dia")%>/<%=recNoticia("mes")%>/<%=recNoticia("ano")%>" size="10" maxlength="10" /></td> </tr> <tr> <td align="right" valign="top"><strong>Notícia</strong></td> <td align="left"><textarea name="noticia" id="noticia" rows="10" style="width:860px;"><%=recNoticia("noticia")%></textarea></td> </tr> <tr> <td> </td> <td><input type="submit" name="button" id="button" value="SALVAR" /></td> </tr> </table></td> </tr> </table> </form> <% recNoticia.close set recNoticia = nothing else if tipo = "inserir" then %> <form action="chamadas.asp" method="post" name="noticia"> <input name="tipo" id="tipo" type="hidden" value="inseriu" /> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="fontBranca"> </td> </tr> <tr> <td height="41" bgcolor="#2D2D2D" class="fontBranca"> Inserir notícia</td> </tr> <tr> <td><table width="100%" border="0" cellspacing="3" cellpadding="3"> <tr> <td align="right"><strong>Cliente</strong></td> <td align="left"><select name="cliente" id="cliente"> <% set recCliente = server.CreateObject( "ADODB.recordset") SQL = "SELECT id, nome FROM cliente ORDER BY nome ASC" recCliente.open SQL, conbanco do while not recCliente.eof %> <option value="<%=recCliente("id")%>"><%=recCliente("nome")%></option> <% recCliente.movenext loop recCliente.close set recCliente = nothing %> </select></td> </tr> <tr> <td width="10%" align="right"><strong>Titulo</strong></td> <td width="90%" align="left"><input name="titulo" type="text" id="titulo" style="width: 860px;" /></td> </tr> <tr> <td align="right"><strong>Data</strong></td> <td align="left"><input name="data" type="text" id="data" onkeypress="mascara(this, '##/##/####')" size="10" maxlength="10" /></td> </tr> <tr> <td align="right" valign="top"><strong>Notícia</strong></td> <td align="left"><textarea name="noticia" id="noticia" rows="10" style="width:860px;"></textarea></td> </tr> <tr> <td> </td> <td><input type="submit" name="button" id="button" value="SALVAR" /></td> </tr> </table></td> </tr> </table> </form> <% else if tipo = "deletar" then id = request("id") iddocliente = request("iddocliente") set recNoticia = server.CreateObject( "ADODB.recordset") SQL = "SELECT titulo FROM noticias WHERE id = "&id recNoticia.open SQL, conbanco %> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="fontBranca"> </td> </tr> <tr> <td height="41" bgcolor="#2D2D2D" class="fontBranca"> Deletar notícia</td> </tr> <tr> <td><table width="100%" border="0" cellspacing="3" cellpadding="3"> <tr> <td align="center">Deseja mesmo deletar a notícia: <strong><%=recNoticia("titulo")%></strong></td> </tr> <tr> <td align="center"><strong><a href="chamadas.asp?tipo=deletasim&id=<%=id%>&iddocliente=<%=iddocliente%>">SIM</a> | <a href="chamadas.asp?menu=4&tipo=cliente&id=<%=iddocliente%>">NÃO</a></strong></td> </tr> </table></td> </tr> </table> <% recNoticia.close set recNoticia = nothing else if tipo = "deletasim" then id = request("id") iddocliente = request("iddocliente") sqlText = "DELETE FROM noticias WHERE id="&id conbanco.Execute(sqlText) response.Redirect("chamadas.asp?menu=4&tipo=cliente&id="&iddocliente) else if tipo = "cliente" then iddocliente = request("id") set recNoticias = server.CreateObject( "ADODB.recordset") SQL = "SELECT id, titulo, data, dia, mes, ano, noticia, cliente FROM noticias WHERE cliente = "&iddocliente recNoticias.open SQL, conbanco set recCliente = server.CreateObject( "ADODB.recordset") SQL = "SELECT nome FROM cliente WHERE id = "&iddocliente recCliente.open SQL, conbanco nomedocliente = recCliente("nome") recCliente.close set recCliente = nothing %> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="3" class="fontBranca"> </td> </tr> <tr> <td height="41" bgcolor="#2D2D2D" class="fontBranca"> Notícias do cliente: <strong><%=nomedocliente%></strong></td> <td bgcolor="#2D2D2D" class="fontBranca"> </td> <td align="right" bgcolor="#2D2D2D" class="fontBranca"> </td> </tr> <tr> <td colspan="3"> <% do while not recNoticias.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" > <strong><%=recNoticias("dia")%>/<%=recNoticias("mes")%>/<%=recNoticias("ano")%></strong> - <a title="NOTÍCIAS" target="_blank"><%=recNoticias("titulo")%></a></td> <td width="3%"><a href="chamadas.asp?menu=4&tipo=editar&id=<%=recNoticias("id")%>&iddocliente=<%=iddocliente%>" title="EDITAR"><img src="layout/editar.png" alt="EDITAR" width="18" height="18" hspace="5" border="0" /></a></td> <td width="4%"><a href="chamadas.asp?menu=4&tipo=deletar&id=<%=recNoticias("id")%>&iddocliente=<%=iddocliente%>" title="DELETAR"><img src="layout/deletar.png" alt="DELETAR" width="14" height="16" hspace="5" border="0" /></a></td> </tr> </table> </td> </tr> </table> <% recNoticias.movenext loop recNoticias.close set recNoticias = nothing %> </td> </tr> </table> <% else if tipo = "editou" then iddocliente = request("iddocliente") id = request("id") cliente = request("cliente") titulo = request("titulo") noticia = request("noticia") datis = split(Request.Form("data"),"/") dataf = datis(2) & "-" & datis(1) & "-" & datis(0) dia = datis(0) mes = datis(1) ano = datis(2) sqlText = "UPDATE noticias SET titulo='"&titulo&"', data='"&dataf&"', dia='"&dia&"', mes='"&mes&"', ano='"&ano&"', noticia='"¬icia&"', cliente='"&cliente&"' WHERE id="&id conbanco.Execute(sqlText) response.Redirect("chamadas.asp?tipo=cliente&menu=4&id="&iddocliente&"") else if tipo = "inseriu" then cliente = request("cliente") titulo = request("titulo") noticia = request("noticia") datis = split(Request.Form("data"),"/") dataf = datis(2) & "-" & datis(1) & "-" & datis(0) dia = datis(0) mes = datis(1) ano = datis(2) sqlText = "INSERT INTO noticias (titulo, data, dia, mes, ano, noticia, cliente) values ('" sqlText = sqlText & titulo sqlText = sqlText & "', '" sqlText = sqlText & dataf sqlText = sqlText & "', '" sqlText = sqlText & dia sqlText = sqlText & "', '" sqlText = sqlText & mes sqlText = sqlText & "', '" sqlText = sqlText & ano sqlText = sqlText & "', '" sqlText = sqlText & noticia sqlText = sqlText & "', '" sqlText = sqlText & cliente sqlText = sqlText & "')" conbanco.Execute (sqlText) response.Redirect("chamadas.asp?menu=4&tipo=cliente&id="&cliente) end if end if end if end if end if end if end if end if %> </td> </tr> </table> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> </table> <!-- 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>