Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

danilo.rp

Cada usuário ter sua privacidade

Recommended Posts

Ola pessoal tudo bem, gostaria de saber se alguen sabe como cada usuario ter sua privacidade, tipo tem o joão e o paulinha, eles tem uma coluna cada um, so que ninguem pode ver as coisas, como faço isso?

Compartilhar este post


Link para o post
Compartilhar em outros sites

Esplica melhor o que você quer, fazer tipo uma agenda, uma página onde o usuário pode personalizar o que quer ver.E o seu bd? que tipo de informações do user você está armaz?

Compartilhar este post


Link para o post
Compartilhar em outros sites

é o seguinte vai ter varios usuarios eles vao ser colunista poderam colocar texto e foto nas colunas, so que ele naun pode vizualizar as materia um dos outros, eu ja tenho separado por sessoin o login e senha, que são as sequintes paginas esta é de login e senha

<!--#include file = "../abrirbanco.asp" --><% 'conferir senha response.buffer=truewlogin=request.form ("login")wsenha=request.form ("senha")wsql = "SELECT log_id , log_login , log_senha , log_nivel FROM LOGIN WHERE log_login ='" & wlogin & "' and log_senha = '" & wsenha & "' "set wrs = wcon.Execute(wsql)IF NOT wrs.EOF THEN        select case wrs("log_nivel")case 1  session("nivelacesso") = 1  response.redirect "index2.asp"case 2  session("nivelacesso") = 2  response.redirect "index2.asp"case 3  session("nivelacesso") = 3  response.redirect "index2.asp"case 4  session("nivelacesso") = 4  response.redirect "index2.asp"end select        END IF     %> <html><head><title>::Administração:: Portal Palavra Viva ::</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"><table width="100%" height="100%" border="0" align="center" valign="center"><tr> <td align="center" valign="middle"><table width="560" height="0" border="0" align="center" bgcolor="#000000" style="background: #3399ff; border-bottom-color: #999999; border-bottom-style: outset; border-bottom-width: 1px; border-left-color: #999999; border-left-style: outset; border-left-width: 1px; border-right-color: #999999; border-right-style: outset; border-right-width: 1px; border-top-color: #999999; border-top-style: outset; border-top-width: 1px;"><tr> <td width="428"><font style="font-family: verdana; font-size: 11px; " color="#333333">Selecione seu usuário, informe sua senha e clique em 'Entrar' </font></td><td width="120"><div align="right"><font style="font-family: verdana; font-size: 11px; " color="#333333">Tela de Login</font></div></td></tr><table width="560" height="0" border="0" align="center" bgcolor="#000000" style="background: #FFFFFF; border-bottom-color: #999999; border-bottom-style: outset; border-bottom-width: 1px; border-left-color: #999999; border-left-style: outset; border-left-width: 1px; border-right-color: #999999; border-right-style: outset; border-right-width: 1px; border-top-color: #999999; border-top-style: outset; border-top-width: 1px;"><form name="form1" method="post" action="default.asp"> <tr><td width="35%" align="left"><font style="font-family: verdana; font-size: 11px; " color="#000000">Login</font><input type="text" name="login" style="background: #D4D0C8; font: message-box; width: 100px;"></td><td width="35%" align="left"><font style="font-family: verdana; font-size: 11px; " color="#000000">Senha</font><input type="password" name="senha" style="background: #D4D0C8; font: message-box; width: 100px;"></td><td width="35%" align="right"><font style="font-family: verdana; font-size: 11px; " color="#000000"><input type="submit" name="Entrar" value="Entrar" style="background: #FFFFFF; border-bottom-color: #999999; border-bottom-style: outset; border-bottom-width: 1px; border-left-color: #999999; border-left-style: outset; border-left-width: 1px; border-right-color: #999999; border-right-style: outset; border-right-width: 1px; border-top-color: #999999; border-top-style: outset; border-top-width: 1px;"></font></td></tr></form></table></table></table></body></html>

e esta e de links a pagina que ve a session do usuario e teria que separar cada colunista

link.asp

<%if session("nivelacesso") > 4 thenresponse.redirect "default.asp"end if%><br><html><head><title>Untitled Document</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><body text="#000000" link="#000000" vlink="#000000" alink="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"><div align="center"><%if session("nivelacesso") = 1 then%>                <%'total acessoa administrativo do site%>  <table width="120" height="0" border="0" align="center" bgcolor="#DADADA" style="background: #DADADA; border-bottom-color: #DADADA; border-bottom-style: outset; border-bottom-width: 0px; border-left-color: #DADADA; border-left-style: outset; border-left-width: 0px; border-right-color: #DADADA; border-right-style: outset; border-right-width: 0px; border-top-color: #DADADA; border-top-style: outset; border-top-width: 0px;">    <tr>      <td bgcolor="#CCCCCC">         <div align="center"><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>Administrador</strong></font></div></td>    </tr><table cellspacing="0" cellpadding="0" width="120" bgcolor="#DADADA" border="0" bordercolorlight="#DADADA" bordercolordark="#DADADA" style="background: #ffffff; border-bottom-color: #DADADA; border-bottom-style: outset; border-bottom-width: 0px; border-left-color: #DADADA; border-left-style: outset; border-left-width: 0px; border-right-color: #DADADA; border-right-style: outset; border-right-width: 0px; border-top-color: #DADADA; border-top-style: outset; border-top-width: 0px;" align="center">    <tr>       <td width="8"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><img src="../images/globinho.jpg" width="7" height="7"></font></td>      <td width="102"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><a href="historia.asp" target="mainFrame" style="text-decoration: none">Historia</a></font></td>    </tr>    <tr>       <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><img src="../images/globinho.jpg" width="7" height="7"></font></td>      <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><a href="ministerios.asp" target="mainFrame" style="text-decoration: none">Ministérios</a></font></td>    </tr>    <tr>       <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><img src="../images/globinho.jpg" width="7" height="7"></font></td>      <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><a href="estudos.asp" target="mainFrame" style="text-decoration: none">Estudos</a></font></td>    </tr>    <tr>       <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><img src="../images/globinho.jpg" width="7" height="7"></font></td>      <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><a href="biblia.asp" target="mainFrame" style="text-decoration: none">Biblia</a></font></td>    </tr>    <tr>       <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><img src="../images/globinho.jpg" width="7" height="7"></font></td>      <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><a href="jovens.asp" target="mainFrame" style="text-decoration: none">Jovens</a></font></td>    </tr>    <tr>       <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><img src="../images/globinho.jpg" width="7" height="7"></font></td>      <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><a href="tiraduvidas.asp" target="mainFrame" style="text-decoration: none">Tira         Duvidas </a> </font></td>    </tr>    <tr align="center">       <td height="10" colspan="2"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">------------------</font></td>    </tr>    <tr>       <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><img src="../images/globinho.jpg" width="7" height="7"></font></td>      <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><a href="cadastre.asp" target="mainFrame" style="text-decoration: none">Cadastre-se</a></font></td>    </tr>    <tr>       <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><img src="../images/globinho.jpg" width="7" height="7"></font></td>      <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><a href="novidades.asp" target="mainFrame" style="text-decoration: none">Novidades</a></font></td>    </tr>    <tr>       <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><img src="../images/globinho.jpg" width="7" height="7"></font></td>      <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><a href="musicas.asp" target="mainFrame" style="text-decoration: none">Músicas</a></font></td>    </tr>    <tr>       <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><img src="../images/globinho.jpg" width="7" height="7"></font></td>      <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><a href="destaque.asp" target="mainFrame" style="text-decoration: none">Destaque</a></font></td>    </tr>    <tr>       <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><img src="../images/globinho.jpg" width="7" height="7"></font></td>      <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><a href="fotos.asp" target="mainFrame" style="text-decoration: none">Fotos</a></font></td>    </tr>    <tr>       <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><img src="../images/globinho.jpg" width="7" height="7"></font></td>      <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><a href="enquetes.asp" target="mainFrame" style="text-decoration: none">Enquete</a></font></td>    </tr>    <tr>       <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><img src="../images/globinho.jpg" width="7" height="7"></font></td>      <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><a href="downloads.asp" target="mainFrame" style="text-decoration: none">Downloads</a></font></td>    </tr>    <tr>      <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><img src="../images/globinho.jpg" width="7" height="7"></font></td>      <td><a href="#" target="mainFrame" style="text-decoration: none"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Usuarios</font></a></td>    </tr>  </table>  </table>  <%end if%>  <% '----------------------------------------------------------------------------------------------------------------- %>  <%if session("nivelacesso") = 2 then%>  <%'jovens%>  <table width="120" border="0" bgcolor="#CCCCCC">    <tr>      <td><div align="center"><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>Seja bem vindo<br>Colunista Joven</strong></font></div></td>  </tr>  <table>    <tr>     <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><img src="../images/globinho.jpg" width="7" height="7"></font></td>    <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><a href="jovens.asp" target="mainFrame" style="text-decoration: none">Jovens</a></font></td>  </tr>  </table></table><%end if%>  <% '----------------------------------------------------------------------------------------------------------------- %>  <%	log_id = request("log_id")  %>  <%if session("nivelacesso") = 3 then%>  <%'colunistas%>  <table width="120" border="0" bgcolor="#CCCCCC">    <tr>      <td><div align="center"><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>Seja bem vindo<br>Colunista</strong></font></div></td>  </tr>  <table>    <tr>     <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><img src="../images/globinho.jpg" width="7" height="7"></font></td>    <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><a href="colunista_view.asp?log_id=<%= log_id%>" target="mainFrame" style="text-decoration: none">Coluna</a></font></td>  </tr>  </table></table><%end if%>  <% '----------------------------------------------------------------------------------------------------------------- %>  <%if session("nivelacesso") = 4 then%>  <%'2administrador%>  <table width="120" border="0" bgcolor="#CCCCCC">    <tr>      <td><div align="center"><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>Seja Bem Vindo<br>Administrador</strong></font></div></td>  </tr>  <table width="120" height="194" border="0">  <tr>     <td width="8"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><img src="../images/globinho.jpg" width="7" height="7"></font></td>    <td width="102"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><a href="historia.asp" target="mainFrame" style="text-decoration: none">Historia</a></font></td>  </tr>  <tr>     <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><img src="../images/globinho.jpg" width="7" height="7"></font></td>    <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><a href="ministerios.asp" target="mainFrame" style="text-decoration: none">Ministérios</a></font></td>  </tr>  <tr>     <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><img src="../images/globinho.jpg" width="7" height="7"></font></td>    <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><a href="estudos.asp" target="mainFrame" style="text-decoration: none">Estudos</a></font></td>  </tr>  <tr>     <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><img src="../images/globinho.jpg" width="7" height="7"></font></td>    <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><a href="biblia.asp" target="mainFrame" style="text-decoration: none">Biblia</a></font></td>  </tr>  <tr>     <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><img src="../images/globinho.jpg" width="7" height="7"></font></td>    <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><a href="jovens.asp" target="mainFrame" style="text-decoration: none">Jovens</a></font></td>  </tr>  <tr>     <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><img src="../images/globinho.jpg" width="7" height="7"></font></td>    <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><a href="tiraduvidas.asp" target="mainFrame" style="text-decoration: none">Tira       Duvidas </a> </font></td>  </tr>  <tr align="center">     <td height="10" colspan="2"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">------------------</font></td>  </tr>  <tr>     <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><img src="../images/globinho.jpg" width="7" height="7"></font></td>    <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><a href="cadastre.asp" target="mainFrame" style="text-decoration: none">Cadastros</a></font></td>  </tr>  <tr>     <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><img src="../images/globinho.jpg" width="7" height="7"></font></td>    <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><a href="novidades.asp" target="mainFrame" style="text-decoration: none">Novidades</a></font></td>  </tr>  <tr>     <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><img src="../images/globinho.jpg" width="7" height="7"></font></td>    <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><a href="fotos.asp" target="mainFrame" style="text-decoration: none">Fotos</a></font></td>  </tr>  <tr>     <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><img src="../images/globinho.jpg" width="7" height="7"></font></td>    <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><a href="enquetes.asp" target="mainFrame" style="text-decoration: none">Enquete</a></font></td>  </tr>  <tr>     <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><img src="../images/globinho.jpg" width="7" height="7"></font></td>    <td><a href="#" target="mainFrame" style="text-decoration: none"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Usuarios</font></a></td>  </tr></table></table><%end if%></div></body></html>

eles tem que pegar o codigo do usuario para separar mas eu naun sai fazer isso, tem como você me ajudar.

Compartilhar este post


Link para o post
Compartilhar em outros sites

Cara tá vendo isso?

select case wrs("log_nivel")case 1 session("nivelacesso") = 1 response.redirect "index2.asp"case 2 session("nivelacesso") = 2 response.redirect "index2.asp"case 3 session("nivelacesso") = 3 response.redirect "index2.asp"case 4 session("nivelacesso") = 4 response.redirect "index2.asp"end select

você pode fazer assim:

<b>

IF NOT wrs.EOF THEN

session("nivelacesso")= wrs("log_nivel")

response.redirect "index2.asp"

end if</b>

 

Valeu?

E qual é esse site? desculpe perguntar

Compartilhar este post


Link para o post
Compartilhar em outros sites

Pelo que entendi você tem usuários com nível de acesso diferente e cada um tem suas notícias independentes, é isso?

 

Se for faz assim

'verifica login e senharesponse.buffer=truewlogin=request.form ("login")wsenha=request.form ("senha")wSQL= "SELECT log_id , log_login , log_senha , log_nivel FROM login WHERE log_login ='" wSQL= wSQL & wlogin & "'  AND log_senha = '" & wsenha & "' "set wRS = wCON.Execute(wSQL)'armazena Id e nível do usuárioif not wRS.eof then                session("IdUsuario") = "wrs("log_id")                session("NivelAcesso")= wrs("log_nivel")	Response.Redirect("index2.asp")end if'seleciona as notícias do usuário logado	wSQL="SELECT * FROM TabelaNoticias WHERE log_id=" & session("IdUsuario") set wRS=wCon.Execute(wSQL)'verifica o nivel de acesso do usuárioif session("NivelAcesso")=1 then               Administradorend ifif session("NivelAcesso")=2 then               Colunista Jovemend ifif session("NivelAcesso")=3 then               Colunistaend if             if session("NivelAcesso")=4 then               Usuário com Acesso de Nivel 4end if

 

DICA: Edenta o teu código direitinho, fica + fácil p/ você entender e pra poder te ajudar.

 

- Detalhes:

Estou levando em consideração que a tabela onde você coloca as notícias esteja relacionada ao colunista pelo campo log_id.

 

Se não é isso que você quer, entao eu não entendi.

 

 

Abraços,

Nyan

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.