Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 3.137.200.139
Current Path : /var/www/html/gcg/src/ |
| Current File : /var/www/html/gcg/src/connect.php |
<?php
function connect()
{
@session_start();
$servername = "72.167.46.92";
$username = "resultsg_logu";
$password = "log159";
$FUNIVCODE = $_SESSION['FUNIVCODE'];
$conn= new mysqli($servername,$username,$password);
if(!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
$sql ="SHOW DATABASES";
$result = $conn->query($sql);
if($FUNIVCODE == '003')
{
$Databasename[] = resultsg_kus;
$Databasename[] = resultsg_kusd;
$Databasename[] = resultsg_uet;
}else if($FUNIVCODE == '027')
{
$Databasename[] = resultsg_rcu;
}else if($FUNIVCODE == '008')
{
$Databasename[] = resultsg_kswu;
}
else if($FUNIVCODE == '026')
{
$Databasename[] = resultsg_vku;
}
//$html_t="<table border = 1 cellspacing='1' style='margin-top:10px;margin-left:350px;font-size:20px;align:center;'><tr ><th>Database Name</th><th><input type='checkbox' onclick='ckallrecatstores()' id='chkall' style='margin-left:8px;'></th></tr>";
/* while($row = $result->fetch_assoc())
{
if($row['Database'] == sitebuilder5 || $row['Database'] == apsc || $row['Database'] == atmail || $row['Database'] == horde || $row['Database'] == phpmyadmin_54I9opllCbkk || $row['Database'] == phpmyadmin_HUcq18Gs5JMt || $row['Database'] == psa || $row['Database'] == information_schema || $row['Database']==mysql || $row['Database']==phpmyadmin || $row['Database']== webauth || $row['Database']== cdcol)
continue;
if($FUNIVCODE == '003')
{
$Databasename[] = resultsg_kus;
$Databasename[] = resultsg_kusd;
$Databasename[] = resultsg_uet;
}else if($FUNIVCODE == '027')
{
$Databasename[] = resultsg_rcu;
}else if($FUNIVCODE == '008')
{
$Databasename[] = resultsg_kswu;
}
else if($FUNIVCODE == '026')
{
$Databasename[] = resultsg_vku;
}
//if($row['Database'] == resultsg_vku || $row['Database'] == resultsg_rcu ||$row['Database'] == resultsg_kus || $row['Database'] == resultsg_uet|| $row['Database'] == resultsg_kusd || $row['Database'] == resultsg_kswu )
//$Databasename[] = $row['Database'];
} */
echo json_encode($Databasename);
}
?>
|