Plugin Directory

Changeset 3366141


Ignore:
Timestamp:
09/23/2025 03:39:14 AM (6 months ago)
Author:
thevisad
Message:

Adjusting the database view

Location:
hngamers-atavism-core
Files:
2 edited
6 copied

Legend:

Unmodified
Added
Removed
  • hngamers-atavism-core/tags/0.0.12/hngamers-admin-styles.css

    r3366133 r3366141  
    1         .hngamers-admin-box {
    2             border: 1px solid #ccc;
    3             border-radius: 5px;
    4             box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    5             margin: 20px 0;
    6             padding: 15px;
    7             background-color: #fff;
    8         }
    9         .hngamers-admin-box h3 {
    10             margin-top: 0;
    11             font-size: 18px;
    12         }
    13         .hngamers-admin-box p {
    14             margin: 5px 0;
    15         }
    16         .hngamers-status-connected {
    17             color: green;
    18             font-weight: bold;
    19         }
    20         .hngamers-status-failure {
    21             color: red;
    22             font-weight: bold;
    23         }
     1.hngamers-admin-box {
     2  border: 1px solid #ccc;
     3  border-radius: 5px;
     4  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
     5  margin: 20px 0;
     6  padding: 15px;
     7  background-color: #fff;
     8}
     9
     10.hngamers-admin-box h3 {
     11  margin-top: 0;
     12  font-size: 18px;
     13  margin-bottom: 10px;
     14  border-bottom: 1px solid #eee;
     15  padding-bottom: 5px;
     16}
     17
     18.hngamers-status-row {
     19  display: flex;
     20  align-items: center;
     21  margin: 6px 0;
     22}
     23
     24.hngamers-status-row .label {
     25  flex: 0 0 180px;
     26  font-weight: 600;
     27}
     28
     29.hngamers-status-row .status img {
     30  vertical-align: middle;
     31  margin-right: 6px;
     32}
     33
     34.hngamers-status-connected {
     35  color: green;
     36  font-weight: bold;
     37}
     38
     39.hngamers-status-failure {
     40  color: red;
     41  font-weight: bold;
     42}
  • hngamers-atavism-core/tags/0.0.12/hngamerscore.php

    r3366133 r3366141  
    150150                        <a href="#server-<?php echo $i; ?>" class="nav-tab">Server <?php echo $i; ?></a>
    151151                    <?php endfor; ?>
    152                     <a href="#connection-status" class="nav-tab">Connection Status</a>
     152                    <a href="#connection-status" class="nav-tab">Database Status</a>
    153153                </h2>
    154154                <div id="master-db" class="tab-content" style="display: none;">
    155                     <h3>Master Database Settings</h3>
    156155                    <?php do_settings_sections('hngamers_core_admin_master'); ?>
    157156                </div>
     
    159158                <?php for ($i = 1; $i <= $server_count; $i++): ?>
    160159                    <div id="server-<?php echo $i; ?>" class="tab-content" style="display: none;">
    161                         <h3>Server <?php echo $i; ?> Settings</h3>
    162                         <h4>Admin Database Settings</h4>
    163160                        <?php do_settings_sections('hngamers_core_admin_server_' . $i); ?>
    164                         <h4>Atavism Database Settings</h4>
    165161                        <?php do_settings_sections('hngamers_core_atavism_server_' . $i); ?>
    166                         <h4>World Content Database Settings</h4>
    167162                        <?php do_settings_sections('hngamers_core_worldcontent_server_' . $i); ?>
    168163                    </div>
    169164                <?php endfor; ?>
    170165                <div id="connection-status" class="tab-content" style="display: none;">
    171                     <h3>Master Database Connection Status</h3>
     166                    <h3>Status Table</h3>
    172167                    <?php $this->hngamers_core_database_connectivity(); ?>
    173168                </div>
     
    219214
    220215        echo '<div class="hngamers-admin-box">';
    221         echo '<h3>Master Database Connection Status</h3>';
     216        echo '<h3>Master Database Status</h3>';
    222217
    223218        if ($this->hngamers_core_check_server_port($hostname, $port)) {
     
    226221                echo "<p class='hngamers-status-failure'><img src='" . $plugin_url . "images/offline$image_set.png' alt='Offline' width='$image_size' height='$image_size'> Failure! " . esc_html($mysqli_conn->connect_error, $domain = 'default') . "</p>";
    227222            } else {
    228                 echo "<p class='hngamers-status-connected'><img src='" . $plugin_url . "images/online$image_set.png' alt='Online' width='$image_size' height='$image_size'> Connected!</p>";
     223                echo "<div class='hngamers-status-row'><span class='label'>Master:</span>
     224      <span class='status hngamers-status-connected'><img src='" . $plugin_url . "images/Online$image_set.png' alt='Online' width='$image_size' height='$image_size'> Connected!</span></div>";
    229225            }
    230226            $mysqli_conn->close();
     
    239235        for ($count = 1; $count <= $server_count; $count++) {
    240236            echo '<div class="hngamers-admin-box">';
    241             echo '<h3>Server ' . esc_html($count, $domain = 'default') . ' Connection Status</h3>';
     237            echo '<h3>Server ' . esc_html($count, $domain = 'default') . '  Database Status</h3>';
    242238
    243239            // Admin Database
     
    249245
    250246            if ($this->hngamers_core_check_server_port($admin_hostname, $admin_port)) {
    251                 echo '<p>Admin Database: ';
     247                echo '<p>Admin: ';
    252248                $mysqli_conn = new mysqli($admin_hostname, $admin_user, $admin_password, $admin_schema, $admin_port);
    253249                if ($mysqli_conn && $mysqli_conn->connect_errno) {
     
    256252                    echo "<span class='hngamers-status-failure'><img src='" . $plugin_url . "images/offline$image_set.png' alt='Offline' width='$image_size' height='$image_size'> Database Connection Failure!</span></p>";
    257253                } else {
    258                     echo "<span class='hngamers-status-connected'><img src='" . $plugin_url . "images/online$image_set.png' alt='Online' width='$image_size' height='$image_size'> Connected!</span></p>";
     254                    echo "<span class='hngamers-status-connected'><img src='" . $plugin_url . "images/Online$image_set.png' alt='Online' width='$image_size' height='$image_size'> Connected!</span></p>";
    259255                    $mysqli_conn->close();
    260256                }
     
    271267
    272268            if ($this->hngamers_core_check_server_port($atavism_hostname, $atavism_port)) {
    273                 echo '<p>Atavism Database: ';
     269                echo '<p>Atavism: ';
    274270                $mysqli_conn = new mysqli($atavism_hostname, $atavism_user, $atavism_password, $atavism_schema, $atavism_port);
    275271                if ($mysqli_conn && $mysqli_conn->connect_errno) {
     
    278274                    echo "<span class='hngamers-status-failure'><img src='" . $plugin_url . "images/offline$image_set.png' alt='Offline' width='$image_size' height='$image_size'> Database Connection Failure!</span></p>";
    279275                } else {
    280                     echo "<span class='hngamers-status-connected'><img src='" . $plugin_url . "images/online$image_set.png' alt='Online' width='$image_size' height='$image_size'> Connected!</span></p>";
     276                    echo "<span class='hngamers-status-connected'><img src='" . $plugin_url . "images/Online$image_set.png' alt='Online' width='$image_size' height='$image_size'> Connected!</span></p>";
    281277                    $mysqli_conn->close();
    282278                }
     
    294290
    295291            if ($this->hngamers_core_check_server_port($worldcontent_hostname, $worldcontent_port)) {
    296                 echo '<p>World Content Database: ';
     292                echo '<p>Content: ';
    297293                $mysqli_conn = new mysqli($worldcontent_hostname, $worldcontent_user, $worldcontent_password, $worldcontent_schema, $worldcontent_port);
    298294                if ($mysqli_conn && $mysqli_conn->connect_errno) {
     
    301297                    echo "<span class='hngamers-status-failure'><img src='" . $plugin_url . "images/offline$image_set.png' alt='Offline' width='$image_size' height='$image_size'> Database Connection Failure!</span></p>";
    302298                } else {
    303                     echo "<span class='hngamers-status-connected'><img src='" . $plugin_url . "images/online$image_set.png' alt='Online' width='$image_size' height='$image_size'> Connected!</span></p>";
     299                    echo "<span class='hngamers-status-connected'><img src='" . $plugin_url . "images/Online$image_set.png' alt='Online' width='$image_size' height='$image_size'> Connected!</span></p>";
    304300                    $mysqli_conn->close();
    305301                }
  • hngamers-atavism-core/trunk/hngamers-admin-styles.css

    r3366133 r3366141  
    1         .hngamers-admin-box {
    2             border: 1px solid #ccc;
    3             border-radius: 5px;
    4             box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    5             margin: 20px 0;
    6             padding: 15px;
    7             background-color: #fff;
    8         }
    9         .hngamers-admin-box h3 {
    10             margin-top: 0;
    11             font-size: 18px;
    12         }
    13         .hngamers-admin-box p {
    14             margin: 5px 0;
    15         }
    16         .hngamers-status-connected {
    17             color: green;
    18             font-weight: bold;
    19         }
    20         .hngamers-status-failure {
    21             color: red;
    22             font-weight: bold;
    23         }
     1.hngamers-admin-box {
     2  border: 1px solid #ccc;
     3  border-radius: 5px;
     4  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
     5  margin: 20px 0;
     6  padding: 15px;
     7  background-color: #fff;
     8}
     9
     10.hngamers-admin-box h3 {
     11  margin-top: 0;
     12  font-size: 18px;
     13  margin-bottom: 10px;
     14  border-bottom: 1px solid #eee;
     15  padding-bottom: 5px;
     16}
     17
     18.hngamers-status-row {
     19  display: flex;
     20  align-items: center;
     21  margin: 6px 0;
     22}
     23
     24.hngamers-status-row .label {
     25  flex: 0 0 180px;
     26  font-weight: 600;
     27}
     28
     29.hngamers-status-row .status img {
     30  vertical-align: middle;
     31  margin-right: 6px;
     32}
     33
     34.hngamers-status-connected {
     35  color: green;
     36  font-weight: bold;
     37}
     38
     39.hngamers-status-failure {
     40  color: red;
     41  font-weight: bold;
     42}
  • hngamers-atavism-core/trunk/hngamerscore.php

    r3366133 r3366141  
    150150                        <a href="#server-<?php echo $i; ?>" class="nav-tab">Server <?php echo $i; ?></a>
    151151                    <?php endfor; ?>
    152                     <a href="#connection-status" class="nav-tab">Connection Status</a>
     152                    <a href="#connection-status" class="nav-tab">Database Status</a>
    153153                </h2>
    154154                <div id="master-db" class="tab-content" style="display: none;">
    155                     <h3>Master Database Settings</h3>
    156155                    <?php do_settings_sections('hngamers_core_admin_master'); ?>
    157156                </div>
     
    159158                <?php for ($i = 1; $i <= $server_count; $i++): ?>
    160159                    <div id="server-<?php echo $i; ?>" class="tab-content" style="display: none;">
    161                         <h3>Server <?php echo $i; ?> Settings</h3>
    162                         <h4>Admin Database Settings</h4>
    163160                        <?php do_settings_sections('hngamers_core_admin_server_' . $i); ?>
    164                         <h4>Atavism Database Settings</h4>
    165161                        <?php do_settings_sections('hngamers_core_atavism_server_' . $i); ?>
    166                         <h4>World Content Database Settings</h4>
    167162                        <?php do_settings_sections('hngamers_core_worldcontent_server_' . $i); ?>
    168163                    </div>
    169164                <?php endfor; ?>
    170165                <div id="connection-status" class="tab-content" style="display: none;">
    171                     <h3>Master Database Connection Status</h3>
     166                    <h3>Status Table</h3>
    172167                    <?php $this->hngamers_core_database_connectivity(); ?>
    173168                </div>
     
    219214
    220215        echo '<div class="hngamers-admin-box">';
    221         echo '<h3>Master Database Connection Status</h3>';
     216        echo '<h3>Master Database Status</h3>';
    222217
    223218        if ($this->hngamers_core_check_server_port($hostname, $port)) {
     
    226221                echo "<p class='hngamers-status-failure'><img src='" . $plugin_url . "images/offline$image_set.png' alt='Offline' width='$image_size' height='$image_size'> Failure! " . esc_html($mysqli_conn->connect_error, $domain = 'default') . "</p>";
    227222            } else {
    228                 echo "<p class='hngamers-status-connected'><img src='" . $plugin_url . "images/online$image_set.png' alt='Online' width='$image_size' height='$image_size'> Connected!</p>";
     223                echo "<div class='hngamers-status-row'><span class='label'>Master:</span>
     224      <span class='status hngamers-status-connected'><img src='" . $plugin_url . "images/Online$image_set.png' alt='Online' width='$image_size' height='$image_size'> Connected!</span></div>";
    229225            }
    230226            $mysqli_conn->close();
     
    239235        for ($count = 1; $count <= $server_count; $count++) {
    240236            echo '<div class="hngamers-admin-box">';
    241             echo '<h3>Server ' . esc_html($count, $domain = 'default') . ' Connection Status</h3>';
     237            echo '<h3>Server ' . esc_html($count, $domain = 'default') . '  Database Status</h3>';
    242238
    243239            // Admin Database
     
    249245
    250246            if ($this->hngamers_core_check_server_port($admin_hostname, $admin_port)) {
    251                 echo '<p>Admin Database: ';
     247                echo '<p>Admin: ';
    252248                $mysqli_conn = new mysqli($admin_hostname, $admin_user, $admin_password, $admin_schema, $admin_port);
    253249                if ($mysqli_conn && $mysqli_conn->connect_errno) {
     
    256252                    echo "<span class='hngamers-status-failure'><img src='" . $plugin_url . "images/offline$image_set.png' alt='Offline' width='$image_size' height='$image_size'> Database Connection Failure!</span></p>";
    257253                } else {
    258                     echo "<span class='hngamers-status-connected'><img src='" . $plugin_url . "images/online$image_set.png' alt='Online' width='$image_size' height='$image_size'> Connected!</span></p>";
     254                    echo "<span class='hngamers-status-connected'><img src='" . $plugin_url . "images/Online$image_set.png' alt='Online' width='$image_size' height='$image_size'> Connected!</span></p>";
    259255                    $mysqli_conn->close();
    260256                }
     
    271267
    272268            if ($this->hngamers_core_check_server_port($atavism_hostname, $atavism_port)) {
    273                 echo '<p>Atavism Database: ';
     269                echo '<p>Atavism: ';
    274270                $mysqli_conn = new mysqli($atavism_hostname, $atavism_user, $atavism_password, $atavism_schema, $atavism_port);
    275271                if ($mysqli_conn && $mysqli_conn->connect_errno) {
     
    278274                    echo "<span class='hngamers-status-failure'><img src='" . $plugin_url . "images/offline$image_set.png' alt='Offline' width='$image_size' height='$image_size'> Database Connection Failure!</span></p>";
    279275                } else {
    280                     echo "<span class='hngamers-status-connected'><img src='" . $plugin_url . "images/online$image_set.png' alt='Online' width='$image_size' height='$image_size'> Connected!</span></p>";
     276                    echo "<span class='hngamers-status-connected'><img src='" . $plugin_url . "images/Online$image_set.png' alt='Online' width='$image_size' height='$image_size'> Connected!</span></p>";
    281277                    $mysqli_conn->close();
    282278                }
     
    294290
    295291            if ($this->hngamers_core_check_server_port($worldcontent_hostname, $worldcontent_port)) {
    296                 echo '<p>World Content Database: ';
     292                echo '<p>Content: ';
    297293                $mysqli_conn = new mysqli($worldcontent_hostname, $worldcontent_user, $worldcontent_password, $worldcontent_schema, $worldcontent_port);
    298294                if ($mysqli_conn && $mysqli_conn->connect_errno) {
     
    301297                    echo "<span class='hngamers-status-failure'><img src='" . $plugin_url . "images/offline$image_set.png' alt='Offline' width='$image_size' height='$image_size'> Database Connection Failure!</span></p>";
    302298                } else {
    303                     echo "<span class='hngamers-status-connected'><img src='" . $plugin_url . "images/online$image_set.png' alt='Online' width='$image_size' height='$image_size'> Connected!</span></p>";
     299                    echo "<span class='hngamers-status-connected'><img src='" . $plugin_url . "images/Online$image_set.png' alt='Online' width='$image_size' height='$image_size'> Connected!</span></p>";
    304300                    $mysqli_conn->close();
    305301                }
Note: See TracChangeset for help on using the changeset viewer.