Ejemplo n.º 1
0
 public static function mysql_select_db_check()
 {
     include '../SETTINGS.php';
     Setup::mysql_connection_check();
     if (@mysql_select_db($db_master_name)) {
         return json_encode(array("result" => 0, "param" => $db_master_name));
     } else {
         return json_encode(array("result" => 1, "param" => $db_master_name));
     }
 }
Ejemplo n.º 2
0
    ?>
</td>
            <?php 
    $ok = $ok && $test;
    ?>
        </tr>
    <?php 
}
?>

    <?php 
if ($ok) {
    ?>
        <tr>
            <?php 
    $test = Setup::mysql_connection_check($db_host, $db_port, $db_user, $db_password);
    ?>
            <td class="ui-widget-content"><b>MySQL</b> connection test</td>
            <td class="<?php 
    echo $test ? "ui-state-highlight" : "ui-state-error";
    ?>
">Host: <b><?php 
    echo $db_host;
    ?>
</b>, Port: <b><?php 
    echo $db_port;
    ?>
</b>, Login: <b><?php 
    echo $db_user;
    ?>
</b> <b><?php