Advertisement
Guest User

Untitled

a guest
Feb 21st, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4. // Configurações do Script
  5. // ==============================
  6. $_SG['conectaServidor'] = true; // Abre uma conexão com o servidor MySQL?
  7. $_SG['abreSessao'] = true; // Inicia a sessão com um session_start()?
  8. $_SG['caseSensitive'] = true; // Usar case-sensitive? Onde 'thiago' é diferente de 'THIAGO'
  9. $_SG['validaSempre'] = true; // Deseja validar o usuário e a senha a cada carregamento de página?
  10.  
  11. $_SG['servidor'] = 'localhost'; // Servidor MySQL
  12.  
  13. $_SG['usuario'] = 'strataeg_wkvcrm'; // Usuário MySQL
  14.  
  15. $_SG['senha'] = '2015wkvcrm2015';
  16.  
  17.  
  18. $_SG['banco'] = 'strataeg_wkvcrm'; // Banco de dados MySQL
  19.  
  20. $_SG['paginaLogin'] = 'index.php'; // Página de login
  21. $_SG['tabela'] = 'usuarios'; // Nome da tabela onde os usuários são salvos
  22. // ==============================
  23.  
  24. // ======================================
  25. // ~ Não edite a partir deste ponto ~
  26. // ======================================
  27.  
  28. // Verifica se precisa fazer a conexão com o MySQL
  29. if ($_SG['conectaServidor'] == true) {
  30. $_SG['link'] = mysqli_connect($_SG['servidor'], $_SG['usuario'], $_SG['senha'], $_SG['banco']);
  31. if (!$_SG['link']) {
  32. die('Não foi possível conectar a base de dados: ' . mysqli_error());
  33. }
  34. mysqli_query($_SG['link'], "SET NAMES 'utf8'");
  35. }
  36.  
  37. if ($_SG['abreSessao'] == true) {
  38. if (!isset($_SESSION)) {
  39. session_start();
  40. }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement