forked from SimplesIP/pabx-app
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
69 lines
2.7 KiB
69 lines
2.7 KiB
<?php |
|
|
|
//conecta ao banco de dados |
|
$conexao = $dbcon = pg_connect(GetConectString()) or die(GetAvisoErroDB()); |
|
|
|
/* |
|
* Seta modo de trandação. |
|
* pg_query($dbcon, 'SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED' ); |
|
|
|
pg_query($dbcon, "set session characteristics as transaction isolation level read uncommitted"); |
|
*/ |
|
|
|
function GetConectString() { |
|
include "configBd.php"; |
|
return "host='$dbHost' port='$dbPort' dbname='$dbName' user='$dbUser' password='$dbPassword'"; |
|
} |
|
|
|
function GetAvisoErroDB() { |
|
include('configs/config.php'); |
|
$_SESSION["Db_conf_ok"] = "0"; |
|
return "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\"> |
|
<html> |
|
<head> |
|
<title>Simples IP</title> |
|
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"> |
|
<style type=\"text/css\"> |
|
<!-- |
|
.style1 { |
|
font-family: Arial, Helvetica, sans-serif; |
|
font-size: 16px; |
|
font-weight: bold; |
|
color: #CC0033; |
|
} |
|
.style2 { |
|
font-family: Arial, Helvetica, sans-serif; |
|
font-weight: bold; |
|
} |
|
body { |
|
background-color: #CCCCCC; |
|
} |
|
--> |
|
</style> |
|
</head> |
|
|
|
<body> |
|
<table width=\"60%\" style=\"border: 2px solid #CC0033;\" border=\"0\" align=\"center\" cellpadding=\"2\" cellspacing=\"0\" bordercolor=\"#FFFFFF\" bgcolor=\"#FFFFFF\"> |
|
<tr> |
|
<td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"10\"> |
|
<tr> |
|
<td align=\"left\"><img src=\"". LOGO_HEADER_SITE ."\" width=\"160\" height=\"69\"></td> |
|
</tr> |
|
<tr align=\"center\"> |
|
<td nowrap><span class=\"style1\"> Não foi possível estabelecer uma conexão com o banco de dados! </span></td> |
|
</tr> |
|
<tr> |
|
<td align=\"center\" class=\"style1\">Se o problema persistir entre em contado com o suporte técnico </td> |
|
</tr> |
|
<tr align=\"center\"> |
|
<td><a href=\"index.php\" class=\"style2\">Tentar Novamente </a></td> |
|
</tr> |
|
</table></td> |
|
</tr> |
|
</table> |
|
</body> |
|
</html> |
|
"; |
|
} |
|
|
|
?>
|
|
|