2 /* +-----------------------------------------------------------------------------+
3 * Copyright 2016 matrix israel
4 * LICENSE: This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 3
7 * of the License, or (at your option) any later version.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 * You should have received a copy of the GNU General Public License
13 * along with this program. If not, see
14 * http://www.gnu.org/licenses/licenses.html#GPL
15 * @author Oshri Rozmarin <oshri.rozmarin@gmail.com>
16 * +------------------------------------------------------------------------------+
20 if ($closeBeforeOpening):
22 opener.document.forms[0].submit();
29 <a href="multipledb/edit"><input type="submit" value="<?php echo $translate->z_xlt('Add new database') ?>"></a>
30 <a href="multipledb/generatesafekey"><input type="submit" value="<?php echo $translate->z_xlt('Generate safe key') ?>"></a>
31 <table class="responstable">
34 foreach ($getmultipledb as $value) {
35 $date = date('Y/m/d H:i:s', strtotime($value['date']));
36 $editLang = $translate->z_xlt('Edit');
37 $removeLang = $translate->z_xlt('Remove');
38 $id = $this->escapeHtml($value['id']);
39 $namespace = $this->escapeHtml($value['namespace']);
40 $username = $this->escapeHtml($value['username']);
41 $dbname = $this->escapeHtml($value['dbname']);
42 $host = $this->escapeHtml($value['host']);
43 $port = $this->escapeHtml($value['port']);
46 <td><a href="multipledb/edit?id={$id}">{$editLang}</a> | <a href="multipledb/remove?id={$id}" onclick="save($(this),'{$namespace}')">{$removeLang}</a></td>
58 $lang = $translate->z_xlt('Empty table');
61 <td colspan="7">{$lang}</td>
67 <th><?php echo $translate->z_xlt('Options') ?></th>
68 <th><?php echo $translate->z_xlt('Namespace') ?></th>
69 <th><span><?php echo $translate->z_xlt('Username') ?></span></th>
70 <th><?php echo $translate->z_xlt('Database name') ?></th>
71 <th><?php echo $translate->z_xlt('Host') ?></th>
72 <th><?php echo $translate->z_xlt('Port') ?></th>
73 <th><?php echo $translate->z_xlt('Date') ?></th>
80 <script type="text/javascript">
81 function save(box,table){
82 var href = box.prop('href');
83 event.preventDefault()
85 var answer = confirm('<?php echo $translate->z_xlt('Are you sure you want to remove namespace') ?>' + ' ' + table + '?');
87 window.location = href;