Advertisement
Guest User

Untitled

a guest
Dec 18th, 2016
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.79 KB | None | 0 0
  1. <?
  2. $login = $_GET[login];
  3. if(isset($_SESSION[usr_name]) && isset($_SESSION[usr_level]) && $login!=logout)
  4. echo('');
  5. else {
  6. $ip = $_SERVER['REMOTE_ADDR'];
  7. ?>
  8. <? if($login!=login){ ?>
  9. <form action="http://pixelhebbo.com/inicio?login=login" method="post">
  10. <input class="usuario_usuario" type="text" name="username" placeholder="usuário"/>
  11. <input class="usuario_usuario" style="margin:5px 0px 0px 10px;" name="password" placeholder="senha" type="password"/>
  12. <input class="usuario_logar" type="submit" value="logar"/> <a href="http://pixelhebbo.com/registro"><div class="usuario_registro"><div style="margin:5px 0px 0px 0px">registre-se</div></div></a>
  13. </form>
  14. <? }
  15. elseif($login==login) {
  16. $username = $_POST[username];
  17. $password = md5($_POST[password]);
  18. $date = date("Y-m-d");
  19. $time = date("H:i:s");
  20. $sql = mysql_query("select * from usr_users where username = '$username' AND password = '$password'");
  21. $check = mysql_num_rows($sql);
  22. if($check!=1) {
  23. echo("<script type='text/javascript'>
  24. $(function(){
  25. $.pnotify({
  26. text: '<b>Falha no login</b><br>Verifique seus dados.'
  27. });
  28. });
  29. </script>
  30. <form action='http://pixelhebbo.com/inicio?login=login' method='post'>
  31. <input class='usuario_usuario' type='text' name='username' placeholder='usuário'/>
  32. <input class='usuario_usuario' style='margin:5px 0px 0px 10px;'' name='password' placeholder='senha' type='password'/>
  33. <input class='usuario_logar' type='submit' value='logar'/> <a href='http://pixelhebbo.com/registro'><div class='usuario_registro'><div style='margin:5px 0px 0px 0px'>registre-se</div></div></a>
  34. </form>
  35. ");
  36. if($content[loginlog]==1)
  37. $sqllog = mysql_query("insert into usr_logs(user, ip, time, date, success) values('$username', '$ip', '$time', '$date', 'Falhou')");
  38. }
  39. else {
  40. $user = mysql_fetch_array($sql);
  41. $_SESSION[usr_name] = $user[username];
  42. $_SESSION[usr_level] = $user[level];
  43. $_SESSION[usr_ban] = $user[ban];
  44. $_SESSION[usr_motivo] = $user[motivo];
  45. $_SESSION[usr_val] = $user[val];
  46. echo('');
  47. if($content[loginlog]==1)
  48. $sqllog = mysql_query("insert into usr_logs(user, ip, time, date, success) values('$username', '$ip', '$time', '$date', 'Successo')");
  49. $n = mysql_num_rows(mysql_query("SELECT * FROM ma_recados WHERE recebeu = '".$_SESSION[usr_name]."' AND lido = 'n'"));
  50. if($n>=1){
  51. echo("<script type='text/javascript'>
  52. $(function(){
  53. $.pnotify({
  54. text: '<b>Novos recados</b><br>Você possui recados na home.'
  55. });
  56. });
  57. </script>");
  58. }
  59. }
  60. }
  61. if($login==logout)
  62. {
  63. session_unset();
  64. echo("<script type='text/javascript'>
  65. $(function(){
  66. $.pnotify({
  67. text: '<b>Desconectado</b><br>Obrigado por nos visitar.'
  68. });
  69. });
  70. </script>");
  71. }
  72. }
  73. if($_SESSION[usr_ban]==1){
  74. session_unset();
  75. echo("<div style='margin:5px 0px 0px 5px; color:#ccc; font-size:13px; font-family:Raleway'>Você foi banido de nossos sistemas por tempo indeterminado. Qualquer dúvida sobre o acontecimento, entre em contato através do email <b>contato@pixelhebbo.com</b>.<a href='http://pixelhebbo.com/inicio'>Clique aqui para voltar ao login.</a></div><script type='text/javascript'>
  76. $(function(){
  77. $.pnotify({
  78. text: '<b>Banido!</b><br>Infelizmente você foi banido.'
  79. });
  80. });
  81. </script>");
  82. }else if(($_SESSION[usr_ban]==0) && ($_SESSION[usr_level]==1) || ($_SESSION[usr_level]==2)){ ?>
  83. <div class="logado_Caixa" title="Meus Dados" style="background-color:rgba(172,152,189,0.7);"><div style="width:18px; height:18px;background-image:url(http://pixelhebbo.com/imagens/icones/icone_logado_perfil.png); background-repeat:no-repeat; margin:16px;"></div></div>
  84. <div class="logado_Caixa" title="Meu Perfil" style="background-color:rgba(178,213,171,0.7);"><div style="width:18px; height:18px;background-image:url(http://pixelhebbo.com/imagens/icones/icone_logado_avatar.png); background-repeat:no-repeat; margin:16px;"></div></div>
  85. <div class="logado_Caixa" title="10 Pixels" style="background-color:rgba(62,144,192,0.7);"><div style="width:18px; height:18px;background-image:url(http://pixelhebbo.com/imagens/icones/icone_logado_pixels.png); background-repeat:no-repeat; margin:16px;"></div></div>
  86. <div class="logado_avatar" style="background-image:url(http://pixelhebbo.com/paginas/avatar.php?user=<?php echo $_SESSION[usr_name]; ?>&action=nrml&direction=4&head_direction=3&gesture=sml&size=b)"></div>
  87. <div class="logado_textos"style="font-size:16px; font-weight:600;">Olá, <?php echo $_SESSION[usr_name]; ?> !</div>
  88. <a href="http://pixelhebbo.com/home/<?php echo $_SESSION[usr_name]; ?>"><div class="logado_textos">Minha Home</div></a>
  89. <form method="post" action="http://pixelhebbo.com/inicio?login=logout"><input name="sair" type="submit" style="color:#594F4F; border:0; font-size:14px; width:150px; float:left; font-weight:500; height:20px; font-family:Raleway; background:rgba(255,255,255,0.0); outline:none; cursor:pointer; text-align:left;" value="Sair" /></form>
  90. <? } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement