Exemple #1
0
 public function getView()
 {
     $o = $this;
     h::div(array('class' => 'clearfix'), function () use($o) {
         h::label(array('for' => 'username'), 'API Username');
         h::div(array('class' => 'input'), function () use($o) {
             h::input(array('class' => 'span6', 'type' => 'text', 'name' => 'username', 'value' => $o->getUsername()));
         });
     });
     h::div(array('class' => 'clearfix'), function () use($o) {
         h::label(array('for' => 'key'), 'API Secret');
         h::div(array('class' => 'input'), function () use($o) {
             h::input(array('class' => 'span6', 'type' => 'text', 'name' => 'key', 'value' => $o->getKey()));
         });
     });
 }
 /**
  *
  */
 public function toHtml(array $params = array(), array $innerCallbacks = array())
 {
     require_once 'lib/lib.htmlgen.php';
     $o = $this;
     //h::li(function () use ($o, $params, $innerCallbacks) {
     h::li(array('id' => $o->getInternalId()), function () use($o, $params, $innerCallbacks) {
         h::div(array('class' => 'builderElementLine'), function () use($o, $params) {
             h::h3($params['title']);
             /*
                       h::div(array('class' => 'builderElementActionItems'), function() use ($o) {
                         if ($o->isEditable()) {
                           h::a('Details', '#', array('class' => 'btn details'));
                         }
                         if ($o->isDeletable()) {
                           h::a('Delete', '#', array('class' => 'delete btn danger'));
                         }
                       });*/
         });
         h::div(array('class' => 'popover builderElementPopover right'), function () use($o, $params, $innerCallbacks) {
             h::div(array('class' => 'arrow'));
             h::div(array('class' => 'inner'), function () use($o, $params, $innerCallbacks) {
                 h::h3(array('class' => 'title'), function () use($o, $params) {
                     h::div(array('class' => 'actualTitle'), 'Details for ' . $params['title']);
                 });
                 h::div(array('class' => 'content'), function () use($o, $innerCallbacks) {
                     h::form(array('class' => 'form', 'action' => ''), function () use($o, $innerCallbacks) {
                         h::fieldset(function () use($o, $innerCallbacks) {
                             $params = array('help' => "Uncheck this if you don't want this task to execute at all.", 'label' => 'Active?', 'name' => 'active', 'checked' => $o->isActive());
                             $o->getHtmlInputCheckbox($params);
                             foreach ($innerCallbacks as $cb) {
                                 //
                                 // Filesets are special cases, because we might need to
                                 // iterate on more than one (in the future)
                                 //
                                 if ($cb['cb'] == 'getFilesets') {
                                     if ($o->getFilesets()) {
                                         $filesets = $o->getFilesets();
                                         foreach ($filesets as $fileset) {
                                             $fileset->toHtml();
                                         }
                                     }
                                     //
                                     // Normal to-HTML callbacks
                                     //
                                 } else {
                                     call_user_func(array($o, $cb['cb']), $cb);
                                 }
                             }
                             h::div(array('class' => 'actions'), function () {
                                 h::input(array('type' => 'submit', 'class' => 'btn', 'value' => 'Nothing to save', 'disabled' => 'disabled'));
                                 h::button(array('class' => 'btn delete danger'), 'Delete');
                             });
                         });
                     });
                 });
             });
         });
     });
     //});
 }
 public function getViewExecutables()
 {
     require_once 'lib/lib.htmlgen.php';
     $o = $this;
     h::fieldset(function () use($o) {
         h::div(array('class' => 'clearfix'), function () use($o) {
             h::label(array('for' => SystemSettings::EXECUTABLE_PHP), 'PHP');
             h::div(array('class' => 'input'), function () use($o) {
                 h::input(array('type' => 'text', 'class' => 'span6', 'name' => SystemSettings::EXECUTABLE_PHP, 'value' => $o[SystemSettings::EXECUTABLE_PHP]));
                 h::span(array('class' => 'help-block'), "The path to the host system's PHP executable.");
             });
         });
         h::div(array('class' => 'clearfix'), function () use($o) {
             h::label(array('for' => SystemSettings::EXECUTABLE_GIT), 'Git');
             h::div(array('class' => 'input'), function () use($o) {
                 h::input(array('type' => 'text', 'class' => 'span6', 'name' => SystemSettings::EXECUTABLE_GIT, 'value' => $o[SystemSettings::EXECUTABLE_GIT]));
                 h::span(array('class' => 'help-block'), "The path to the host system's Git executable. Required in order to allow Git as the configured SCM for projects.");
             });
         });
         h::div(array('class' => 'clearfix'), function () use($o) {
             h::label(array('for' => SystemSettings::EXECUTABLE_SVN), 'SVN');
             h::div(array('class' => 'input'), function () use($o) {
                 h::input(array('type' => 'text', 'class' => 'span6', 'name' => SystemSettings::EXECUTABLE_SVN, 'value' => $o[SystemSettings::EXECUTABLE_SVN]));
                 h::span(array('class' => 'help-block'), "The path to the host system's SVN executable. Required in order to allow SVN as the configured SCM for projects.");
             });
         });
         /*    });
         
             h::fieldset(function () use ($o) {
               h::legend('Archivers');*/
         h::div(array('class' => 'clearfix'), function () use($o) {
             h::label(array('for' => SystemSettings::EXECUTABLE_TAR), 'tar');
             h::div(array('class' => 'input'), function () use($o) {
                 h::input(array('type' => 'text', 'class' => 'span6', 'name' => SystemSettings::EXECUTABLE_TAR, 'value' => $o[SystemSettings::EXECUTABLE_TAR]));
                 h::span(array('class' => 'help-block'), "The path to the host system's tar executable. Will be used to generate all release packages.");
             });
         });
     });
 }
Exemple #4
0
                foreach ($list as $label => $id) {
                    $content[] = h::th($group == 'Block' ? Text::instance()->process($Config->module('System')->db('texts'), $blocks[$label]) : $label) . h::{'td input[type=radio]'}(['name' => "permission[{$id}]", 'checked' => isset($group_permissions[$id]) ? $group_permissions[$id] : -1, 'value' => [-1, 0, 1], 'in' => [$L->not_specified, $L->deny, $L->allow]]);
                }
                if (count($list) % 2) {
                    $content[] = h::{'td[colspan=2]'}();
                }
                $count = count($content);
                $content_ = [];
                for ($i = 0; $i < $count; $i += 2) {
                    $content_[] = $content[$i] . $content[$i + 1];
                }
                $tabs_content .= h::{'div#permissions_group_' . strtr($group, '/', '_') . ' table.cs-table-borderless.cs-center-all tr'}(h::{'td.cs-left-all[colspan=4]'}(h::{'button.cs-permissions-invert'}($L->invert) . h::{'button.cs-permissions-deny-all'}($L->deny_all) . h::{'button.cs-permissions-allow-all'}($L->allow_all)), $content_);
            }
            unset($content, $content_, $count, $i, $permissions, $group, $list, $label, $id, $blocks);
            $Page->title($L->permissions_for_group($Group->get($rc[3], 'title')));
            $a->content(h::{'p.lead.cs-center'}($L->permissions_for_group($Group->get($rc[3], 'title'))) . h::{'ul.cs-tabs li'}($tabs) . h::div($tabs_content) . h::br() . h::{'input[type=hidden]'}(['name' => 'id', 'value' => $rc[3]]));
            break;
    }
    $a->content(h::{'input[type=hidden]'}(['name' => 'mode', 'value' => $rc[2]]));
} else {
    $a->buttons = false;
    $groups_ids = $Group->get_all();
    $groups_list = [];
    foreach ($groups_ids as $id) {
        $id = $id['id'];
        $group_data = $Group->get($id);
        $groups_list[] = [h::{'a.cs-button-compact'}(h::icon('pencil'), ['href' => "{$a->action}/edit/{$id}", 'data-title' => $L->edit_group_information]) . ($id != User::ADMIN_GROUP_ID && $id != User::USER_GROUP_ID && $id != User::BOT_GROUP_ID ? h::{'a.cs-button-compact'}(h::icon('trash-o'), ['href' => "{$a->action}/delete/{$id}", 'data-title' => $L->delete]) : '') . h::{'a.cs-button-compact'}(h::icon('key'), ['href' => "{$a->action}/permissions/{$id}", 'data-title' => $L->edit_group_permissions]), $id, $group_data['title'], $group_data['description']];
    }
    unset($id, $group_data, $groups_ids);
    $a->content(h::{'table.cs-table.cs-center-all'}(h::{'thead tr th'}($L->action, 'id', $L->group_name, $L->description) . h::{'tbody tr| td'}($groups_list)) . h::{'p.cs-left a.cs-button'}($L->add_group, ['href' => "admin/System/{$rc['0']}/{$rc['1']}/add"]));
}
Exemple #5
0
     $content_ = [];
     for ($i = 0; $i < $count; $i += 2) {
         $content_[] = $groups_content[$i] . $groups_content[$i + 1];
     }
     $groups_content = $content_;
     unset($count, $content_);
     $users_list = $User->db()->qfa(["SELECT\n\t\t\t\t\t`id`,\n\t\t\t\t\t`value`\n\t\t\t\tFROM `[prefix]users_permissions`\n\t\t\t\tWHERE `permission` = '%s'", $permission]);
     $users_content = [];
     foreach ($users_list as &$user) {
         $value = $user['value'];
         $user = $user['id'];
         $users_content[] = h::th($User->username($user)) . h::{'td input[type=radio]'}(['name' => 'users[' . $user . ']', 'checked' => $value, 'value' => [-1, 0, 1], 'in' => [$L->inherited, $L->deny, $L->allow]]);
     }
     unset($user, $value);
     $Page->title($L->permissions_for_block(get_block_title($rc[3])));
     $a->content(h::{'p.lead.cs-center'}($L->permissions_for_block(get_block_title($rc[3]))) . h::{'ul.cs-tabs li'}($L->groups, $L->users) . h::div(h::{'table.cs-table-borderless.cs-center-all tr'}(h::{'td.cs-left-all[colspan=4]'}(h::{'button.cs-permissions-invert'}($L->invert) . h::{'button.cs-permissions-allow-all'}($L->allow_all) . h::{'button.cs-permissions-deny-all'}($L->deny_all)), $groups_content) . h::{'table.cs-table-borderless.cs-center-all tr'}([h::{'td.cs-left-all'}(h::{'button.cs-permissions-invert'}($L->invert) . h::{'button.cs-permissions-allow-all'}($L->allow_all) . h::{'button.cs-permissions-deny-all'}($L->deny_all)), h::{'td table#cs-block-users-changed-permissions.cs-table-borderless.cs-center-all tr'}($users_content), h::{'td input#block_users_search[type=search]'}(['autocomplete' => 'off', 'permission' => $permission, 'placeholder' => $L->type_username_or_email_press_enter, 'style' => 'width: 100%']), h::{'td#block_users_search_results'}()])) . h::{'input#cs-block-users-search-found[type=hidden]'}(['value' => implode(',', $users_list)]) . h::br() . h::{'input[type=hidden]'}([[['name' => 'block[id]', 'value' => $rc[3]]], [['name' => 'mode', 'value' => $rc[2]]]]));
     break;
 case 'search_users':
     $form = false;
     $a->generate_auto = false;
     interface_off();
     $users_list = $User->search_users($_POST['search_phrase']);
     $found_users = explode(',', $_POST['found_users']);
     $permission = (int) $_POST['permission'];
     $content = [];
     foreach ($users_list as $user) {
         if (in_array($user, $found_users)) {
             continue;
         }
         $found_users[] = $user;
         $value = $User->db()->qfs(["SELECT `value`\n\t\t\t\t\tFROM `[prefix]users_permissions`\n\t\t\t\t\tWHERE\n\t\t\t\t\t\t`id`\t\t\t= '%s' AND\n\t\t\t\t\t\t`permission`\t= '%s'", $user, $permission]);
Exemple #6
0
 * @category       modules
 * @author         Nazar Mokrynskyi <*****@*****.**>
 * @copyright      Copyright (c) 2014, Nazar Mokrynskyi
 * @license        MIT License, see license.txt
 */
namespace cs\modules\Precincts;

use h, cs\Core, cs\Index, cs\Language, cs\Page, cs\User;
$Index = Index::instance();
$Index->title_auto = false;
$L = Language::instance();
$Page = Page::instance();
if (isset($Index->route_path[0], $Index->route_ids[1]) && $Index->route_path[0] == 'violation') {
    $violation = Violations::instance()->get($Index->route_ids[1]);
    if ($violation['images']) {
        $Page->replace('/<meta content="[^"]*share.png" property="og:image">/Uims', '');
        $Page->replace('/<link href="[^"]*share.png" rel="image_src">/Uims', '');
        $Page->link(['rel' => 'image_src', 'href' => $violation['images'][0]]);
        foreach ($violation['images'] as $image) {
            $Page->og('image', $image);
            $Page->og('image:secure_url', $image);
        }
    }
    if ($violation['text']) {
        $Page->Description = description($violation['text']);
    }
}
$Page->Header .= h::{'button.cs-elections-add-violation'}(h::{'i.uk-icon-plus'}() . " {$L->add_violation}") . h::{'button.cs-elections-last-violations'}();
$Page->js("window.disqus_shortname = '" . Core::instance()->disqus_shortname . "';", 'code');
$Page->content(h::{'div.cs-elections-last-violations-panel'}(h::h2($L->last_violations) . h::{'section'}()) . h::{'aside.cs-elections-precinct-sidebar'}() . h::{'aside.cs-elections-add-violation-sidebar'}() . h::{'aside.cs-elections-violation-read-more-sidebar'}() . h::{'aside.cs-elections-main-sidebar'}(h::{'div.cs-elections-opirzagin a[href=become_eyes]'}($L->become_eyes) . h::{'div.cs-elections-opirzagin a[href=opirzagin]'}($L->opircrew) . h::{'div.cs-elections-opirzagin a[href=instruktsia]'}($L->instruktsia) . h::{'div.cs-elections-socials'}('<div class="yashare-auto-init" data-yashareL10n="uk" data-yashareQuickServices="facebook" data-yashareLink="https://www.facebook.com/opir.org" data-yashareTheme="counter" data-yashareImage="https://opir.org/components/modules/Common/includes/img/share.png"></div>' . '<div class="yashare-auto-init" data-yashareL10n="uk" data-yashareQuickServices="vkontakte,twitter" data-yashareLink="https://opir.org/" data-yashareTheme="counter" data-yashareImage="https://opir.org/components/modules/Common/includes/img/share.png"></div>') . h::h2($L->precincts_search) . h::{'input.cs-elections-precincts-search[type=search]'}(['placeholder' => $L->number_or_address]) . h::{'section.cs-elections-precincts-search-results[level=0]'}() . h::h2($L->mobile_apps) . h::{'div.cs-elections-mobile-apps'}(h::{'a[target=_blank'}($L->download_in('App Store'), ['href' => 'https://itunes.apple.com/ua/app/opir.org/id896488790']) . h::{'a[target=_blank]'}($L->download_in('Google Play'), ['href' => 'https://play.google.com/store/apps/details?id=example.yariksoffice']) . h::{'a[target=_blank]'}($L->download_in('Market Place'), ['onclick' => "\$.cs.simple_modal('{$L->soon}')"])) . h::h2($L->contacts) . h::{'div.cs-elections-contacts'}(h::a(h::icon('phone') . '+38 093 012 22 11') . h::a(h::icon('phone') . '+38 067 708 42 90') . h::{'a[href=mailto:info@opir.org]'}(h::icon('envelope') . '*****@*****.**')) . h::h2($L->map_legend) . h::{'div.cs-elections-map-legend'}(h::div($L->precincts_with_violations) . h::div($L->precincts_without_violations) . h::div($L->district_precincts))));
Exemple #7
0
 /**
  * Substitutes header information about user, sign in/sign up forms, etc.
  *
  * @return Page
  */
 protected function get_header_info()
 {
     $L = Language::instance();
     $User = User::instance(true);
     $this->user_avatar_image = $User->avatar();
     if ($User->user()) {
         $this->header_info = h::{'div.cs-header-user-block'}(h::b("{$L->hello}, " . $User->username() . '! ' . h::{'icon.cs-header-sign-out-process'}('sign-out', ['style' => 'cursor: pointer;', 'data-title' => $L->sign_out])) . h::div(h::a($L->profile, ['href' => path($L->profile) . "/{$User->login}"]) . ' | ' . h::a($L->settings, ['href' => path($L->profile) . '/' . path($L->settings)])) . $this->header_info);
         Trigger::instance()->run('System/Page/get_header_info');
     } else {
         $external_systems_list = '';
         Trigger::instance()->run('System/Page/external_sign_in_list', ['list' => &$external_systems_list]);
         $this->header_info = h::{'div.cs-header-guest-form'}(h::b("{$L->hello}, {$L->guest}!") . h::div(h::{'button.cs-header-sign-in-slide.cs-button-compact.uk-icon-sign-in'}($L->sign_in) . h::{'button.cs-header-registration-slide.cs-button-compact.uk-icon-pencil'}($L->sign_up, ['data-title' => $L->quick_registration_form]))) . h::{'div.cs-header-restore-password-form'}(h::{'input.cs-no-ui.cs-header-restore-password-email[tabindex=1]'}(['placeholder' => $L->login_or_email, 'autocapitalize' => 'off', 'autocorrect' => 'off']) . h::br() . h::{'button.cs-header-restore-password-process.cs-button-compact.uk-icon-question[tabindex=2]'}($L->restore_password) . h::{'button.cs-button-compact.cs-header-back[tabindex=3]'}(h::icon('chevron-down'), ['data-title' => $L->back]), ['style' => 'display: none;']) . h::{'div.cs-header-registration-form'}(h::{'input.cs-no-ui.cs-header-registration-email[type=email][tabindex=1]'}(['placeholder' => $L->email, 'autocapitalize' => 'off', 'autocorrect' => 'off']) . h::br() . h::{'button.cs-header-registration-process.cs-button-compact.uk-icon-pencil[tabindex=2]'}($L->sign_up) . h::{'button.cs-button-compact.cs-header-back[tabindex=4]'}(h::icon('chevron-down'), ['data-title' => $L->back]), ['style' => 'display: none;']) . h::{'form.cs-header-sign-in-form.cs-no-ui'}(h::{'input.cs-no-ui.cs-header-sign-in-email[tabindex=1]'}(['placeholder' => $L->login_or_email, 'autocapitalize' => 'off', 'autocorrect' => 'off']) . h::{'input.cs-no-ui.cs-header-user-password[type=password][tabindex=2]'}(['placeholder' => $L->password]) . h::br() . h::{'button.cs-button-compact.uk-icon-sign-in[tabindex=3][type=submit]'}($L->sign_in) . h::{'button.cs-button-compact.cs-header-back[tabindex=5]'}(h::icon('chevron-down'), ['data-title' => $L->back]) . h::{'button.cs-button-compact.cs-header-restore-password-slide[tabindex=4]'}(h::icon('question'), ['data-title' => $L->restore_password]), ['style' => 'display: none;']) . $external_systems_list;
     }
     return $this;
 }
Exemple #8
0
            if (isset($user_data['reg_ip'])) {
                $user_data['reg_ip'] = hex2ip($user_data['reg_ip'], 10);
                if ($user_data['reg_ip'][1]) {
                    $user_data['reg_ip'] = $user_data['reg_ip'][0] . h::br() . $user_data['reg_ip'][1];
                } else {
                    $user_data['reg_ip'] = $user_data['reg_ip'][0];
                }
            }
            if (isset($user_data['last_ip'])) {
                $user_data['last_ip'] = hex2ip($user_data['last_ip'], 10);
                if ($user_data['last_ip'][1]) {
                    $user_data['last_ip'] = $user_data['last_ip'][0] . h::br() . $user_data['last_ip'][1];
                } else {
                    $user_data['last_ip'] = $user_data['last_ip'][0];
                }
            }
            if (in_array(User::ADMIN_GROUP_ID, $groups)) {
                $type = h::info('a');
            } elseif (in_array(User::USER_GROUP_ID, $groups)) {
                $type = h::info('u');
            } elseif ($is_bot) {
                $type = h::info('b');
            } else {
                $type = h::info('g');
            }
            $users_list[] = array_values([$buttons, $type] + $user_data);
        }
    }
    unset($id, $buttons, $user_data, $users_ids, $is_guest, $is_root, $is_bot);
    $a->content(h::{'ul.cs-tabs li'}($L->search, h::info('show_columns')) . h::div(h::div(h::select(['in' => array_merge([$L->all_columns], $search_columns), 'value' => array_merge([''], $search_columns)], ['selected' => $search_column ?: '', 'name' => 'search_column']) . $L->search_mode . ' ' . h::select($search_modes, ['selected' => $search_mode ?: 'LIKE', 'name' => 'search_mode']) . h::{'input.uk-form-width-medium'}(['value' => $search_text, 'name' => 'search_text', 'placeholder' => $L->search_text]) . $L->page . ' ' . h::{'input[type=number]'}(['value' => $start + 1, 'min' => 1, 'name' => 'search_start']) . $L->items . ' ' . h::{'input[type=number]'}(['value' => $limit, 'min' => 1, 'name' => 'search_limit']), ['style' => 'text-align: left;']) . h::{'ul#cs-users-search-columns.uk-padding-remove'}($columns_list)) . h::{'input#cs-users-search-selected-columns[name=columns][type=hidden]'}() . h::hr() . h::{'p.cs-left'}(h::{'button[type=submit]'}($L->search), $L->found_users($results_count) . ($results_count > $limit ? ' / ' . $L->page_from($start + 1, ceil($results_count / $limit)) : '')) . h::{'table.cs-table.cs-center-all'}(h::{'thead tr th'}(array_merge([$L->action, ''], $columns)) . h::{'tbody tr| td'}($users_list)) . h::{'p.cs-left'}($L->found_users($results_count) . ($results_count > $limit ? ' / ' . $L->page_from($start + 1, ceil($results_count / $limit)) : ''), h::{'a.cs-button'}($L->add_user, ['href' => 'admin/System/users/users/add/0']) . h::{'a.cs-button'}($L->add_bot, ['href' => 'admin/System/users/users/add_bot/0'])));
}
Exemple #9
0
    });
    h::body(function () {
        h::div(array("id" => "wrapper"), function () {
            h::h1("Hello, World", array("class" => "title"));
            h::comment("navigation");
            h::ul(array("class" => "links"), function () {
                foreach (array(1, 2, 3) as $x) {
                    h::li(function () use($x) {
                        h::a("Link {$x}", "#{$x}");
                    });
                }
            });
            h::comment("let's see some text");
            h::p("Lorem ipsum dolor sit amet, consectetur adipisicing elit...");
            h::comment("now for a table");
            h::table(function () {
                $table_data = h::get_variable('table_data', array());
                h::tr(array("class" => "header"), function () {
                    h::th("key");
                    h::th("value");
                });
                foreach ($table_data as $k => $v) {
                    h::tr(array("class" => h::cycle(array("odd", "even"))), function () use($k, $v) {
                        h::td($k);
                        h::td($v);
                    });
                }
            });
        });
    });
});
Exemple #10
0
            $a->generate_auto = false;
            $db = DB::instance();
            if (isset($rc[4])) {
                $Page->content(h::{'p.cs-test-result'}($db->test([$rc[3], $rc[4]]) ? $L->success : $L->failed));
            } elseif (isset($rc[3])) {
                $Page->content(h::{'p.cs-test-result'}($db->test([$rc[3]]) ? $L->success : $L->failed));
            } else {
                $Page->content(h::{'p.cs-test-result'}($db->test($_POST['db']) ? $L->success : $L->failed));
            }
    }
} else {
    $test_dialog = true;
    $db_list = [];
    $databases = $Config->db;
    if (!empty($databases)) {
        foreach ($databases as $i => &$db_data) {
            $db_list[] = [[[h::{'a.cs-button-compact'}([h::icon('plus'), ['href' => "{$a->action}/add/{$i}", 'data-title' => "{$L->add} {$L->mirror} {$L->of_db}"]], $i ? [h::icon('pencil'), ['href' => "{$a->action}/edit/{$i}", 'data-title' => "{$L->edit} {$L->db}"]] : false, $i ? [h::icon('trash-o'), ['href' => "{$a->action}/delete/{$i}", 'data-title' => $L->delete . ' ' . $L->db]] : false, [h::icon('signal'), ['onMouseDown' => "cs.db_test('{$a->action}/test/{$i}', true);", 'data-title' => $L->test_connection]]), ['class' => 'cs-left-all']], $i ? $db_data['host'] : $Core->db_host, $i ? $db_data['type'] : $Core->db_type, $i ? $db_data['prefix'] : $Core->db_prefix, $i ? $db_data['name'] : $Core->db_name, $i ? $db_data['user'] : '******', $i ? $db_data['charset'] : $Core->db_charset], ['class' => $i ? '' : 'text-primary']];
            foreach ($Config->db[$i]['mirrors'] as $m => &$mirror) {
                if (is_array($mirror) && !empty($mirror)) {
                    $db_list[] = [[h::{'a.cs-button-compact'}([h::icon('pencil'), ['href' => "admin/System/{$rc['0']}/{$rc['1']}/edit/{$i}/{$m}", 'data-title' => "{$L->edit} {$L->mirror} {$L->of_db}"]], [h::icon('trash-o'), ['href' => "admin/System/{$rc['0']}/{$rc['1']}/delete/{$i}/{$m}", 'data-title' => "{$L->delete} {$L->mirror} {$L->of_db}"]], [h::icon('signal'), ['onMouseDown' => "cs.db_test('{$a->action}/test/{$i}/{$m}', true);", 'data-title' => $L->test_connection]]), ['class' => 'cs-right-all']], $mirror['host'], $mirror['type'], $mirror['prefix'], $mirror['name'], $mirror['user'], $mirror['charset']];
                }
            }
            unset($m, $mirror);
        }
        unset($i, $db_data);
    }
    unset($databases);
    $a->content(h::{'table.cs-table'}(h::{'thead tr th'}($L->action, $L->db_host, $L->db_type, $L->db_prefix, $L->db_name, $L->db_user, $L->db_charset) . h::tbody(h::{'tr| td'}([$db_list]))) . h::{'table.cs-table-borderless.cs-left-even.cs-right-odd tr| td'}([[h::info('db_balance'), h::{'input[type=radio]'}(['name' => 'core[db_balance]', 'checked' => $Config->core['db_balance'], 'value' => [0, 1], 'in' => [$L->off, $L->on]])], [h::info('maindb_for_write'), h::{'input[type=radio]'}(['name' => 'core[maindb_for_write]', 'checked' => $Config->core['maindb_for_write'], 'value' => [0, 1], 'in' => [$L->off, $L->on]])]]) . h::{'p a.cs-button'}($L->add_database, ['href' => "admin/System/{$rc['0']}/{$rc['1']}/add"]) . h::{'input[type=hidden]'}(['name' => 'mode', 'value' => 'config']));
}
$test_dialog && $a->content(h::{'div#cs-db-test.uk-modal div'}(h::h3($L->test_connection) . h::div()));