Added new alert when failed database

Former-commit-id: ee0e8efaf3f32b4c5a86d421873555969274ca43
This commit is contained in:
samucarc 2019-02-28 17:40:11 +01:00
parent a8a9a9d620
commit 7e53461b94
3 changed files with 114 additions and 0 deletions

View File

@ -0,0 +1,113 @@
<html>
<head>
<style>
#alert_messages_na{
-moz-border-bottom-right-radius: 5px;
-webkit-border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
border-bottom-left-radius: 5px;
z-index:2;
position:fixed;
width:700px;
background:white;
left:50%;
top:20%;
margin-left:-350px;
}
.modalheade{
text-align:center;
width:100%;
height:37px;
left:0px;
background-color:#82b92e;
}
.modalheadertex{
color:white;
position:relative;
font-family:Nunito;
font-size:13pt;
top:8px;
}
.modalconten{
color:black;
background:white;
}
.modalcontentim{
float:left;
margin-left:30px;
margin-top:30px;
margin-bottom:30px;
}
.modalcontenttex{
float:left;
text-align:justify;
color:black;
font-size: 9.5pt;
line-height:13pt;
margin-top:40px;
width:430px;
margin-left:30px;
}
.modalwikibutto{
cursor:pointer;
text-align:center;
margin-right:45px;
float:right;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
margin-bottom:30px;
border-radius: 3px;
width:170px;
height:30px;
border: 1px solid #82b92e;
margin-top:8%;
background-color:#82b92e;
}
.modalwikibuttontex{
color:#ffffff;
font-family:Nunito;
font-size:10pt;
position:relative;
top:6px;
}
#opacity{
background:black;opacity:0.1;left:0px;top:0px;width:100%;height:100%;
}
</style>
</head>
<body>
<div id="alert_messages_na">
<div class='modalheade'>
<span class='modalheadertex'>
<?php echo __('Database error'); ?>
</span>
</div>
<div class='modalconten'>
<img class='modalcontentim' src='<?php echo $config['homeurl']; ?>/images/mysqlerr.png'>
<div class='modalcontenttex'>
<?php
echo __('Failure to connect to Database server, please check the configuration file config.php or contact system administrator if you need assistance.');
?>
</div>
</div>
<a href='https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Configuration' target='_blank'>
<div class='modalwikibutto cerrar'>
<span class='modalwikibuttontex'> <?php echo __('Documentation'); ?></span>
</div>
</a>
</div>
<div id="opacity"></div>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@ -45,6 +45,7 @@ function mysql_connect_db($host=null, $db=null, $user=null, $pass=null, $port=nu
if ($config['mysqli']) {
$connect_id = mysqli_connect($host, $user, $pass, $db, $port);
if (mysqli_connect_errno() > 0) {
include 'general/mysqlerr.php';
return false;
}