Bridges: Integrate Action Bar, delete on edit.
This commit is contained in:
parent
5f9c14ba96
commit
d5264be977
|
|
@ -221,4 +221,25 @@
|
||||||
$text['description-bridge_description']['sv-se'] = '';
|
$text['description-bridge_description']['sv-se'] = '';
|
||||||
$text['description-bridge_description']['uk-ua'] = '';
|
$text['description-bridge_description']['uk-ua'] = '';
|
||||||
|
|
||||||
|
$text['label-bridge_description']['en-us'] = "Description";
|
||||||
|
$text['label-bridge_description']['ar-eg'] = "";
|
||||||
|
$text['label-bridge_description']['de-at'] = "Beschreibung"; //copied from de-de
|
||||||
|
$text['label-bridge_description']['de-ch'] = "Beschreibung"; //copied from de-de
|
||||||
|
$text['label-bridge_description']['de-de'] = "Beschreibung";
|
||||||
|
$text['label-bridge_description']['es-cl'] = "Descripción";
|
||||||
|
$text['label-bridge_description']['es-mx'] = "Descripción"; //copied from es-cl
|
||||||
|
$text['label-bridge_description']['fr-ca'] = "Description"; //copied from fr-fr
|
||||||
|
$text['label-bridge_description']['fr-fr'] = "Description";
|
||||||
|
$text['label-bridge_description']['he-il'] = "";
|
||||||
|
$text['label-bridge_description']['it-it'] = "Descrizione";
|
||||||
|
$text['label-bridge_description']['nl-nl'] = "";
|
||||||
|
$text['label-bridge_description']['pl-pl'] = "Opis";
|
||||||
|
$text['label-bridge_description']['pt-br'] = "Descrição";
|
||||||
|
$text['label-bridge_description']['pt-pt'] = "Descripção";
|
||||||
|
$text['label-bridge_description']['ro-ro'] = "";
|
||||||
|
$text['label-bridge_description']['ru-ru'] = "Описание";
|
||||||
|
$text['label-bridge_description']['sv-se'] = "Beskrivning";
|
||||||
|
$text['label-bridge_description']['uk-ua'] = "Опис";
|
||||||
|
$text['label-bridge_description']['tr-tr'] = "Açıklama";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
@ -52,11 +52,27 @@
|
||||||
$bridge_name = $_POST["bridge_name"];
|
$bridge_name = $_POST["bridge_name"];
|
||||||
$bridge_destination = $_POST["bridge_destination"];
|
$bridge_destination = $_POST["bridge_destination"];
|
||||||
$bridge_enabled = $_POST["bridge_enabled"];
|
$bridge_enabled = $_POST["bridge_enabled"];
|
||||||
|
$bridge_description = $_POST["bridge_description"];
|
||||||
}
|
}
|
||||||
|
|
||||||
//process the user data and save it to the database
|
//process the user data and save it to the database
|
||||||
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||||
|
|
||||||
|
//delete the bridge
|
||||||
|
if (permission_exists('bridge_delete')) {
|
||||||
|
if ($_POST['action'] == 'delete' && is_uuid($bridge_uuid)) {
|
||||||
|
//prepare
|
||||||
|
$bridges[0]['checked'] = 'true';
|
||||||
|
$bridges[0]['bridge_uuid'] = $bridge_uuid;
|
||||||
|
//delete
|
||||||
|
$obj = new bridges;
|
||||||
|
$obj->delete($bridges);
|
||||||
|
//redirect
|
||||||
|
header('Location: bridges.php');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//get the uuid from the POST
|
//get the uuid from the POST
|
||||||
if ($action == "update") {
|
if ($action == "update") {
|
||||||
$bridge_uuid = $_POST["bridge_uuid"];
|
$bridge_uuid = $_POST["bridge_uuid"];
|
||||||
|
|
@ -99,6 +115,7 @@
|
||||||
$array['bridges'][0]['bridge_name'] = $bridge_name;
|
$array['bridges'][0]['bridge_name'] = $bridge_name;
|
||||||
$array['bridges'][0]['bridge_destination'] = $bridge_destination;
|
$array['bridges'][0]['bridge_destination'] = $bridge_destination;
|
||||||
$array['bridges'][0]['bridge_enabled'] = $bridge_enabled;
|
$array['bridges'][0]['bridge_enabled'] = $bridge_enabled;
|
||||||
|
$array['bridges'][0]['bridge_description'] = $bridge_description;
|
||||||
|
|
||||||
//save to the data
|
//save to the data
|
||||||
$database = new database;
|
$database = new database;
|
||||||
|
|
@ -118,7 +135,7 @@
|
||||||
header('Location: bridges.php');
|
header('Location: bridges.php');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} //(is_array($_POST) && strlen($_POST["persistformvar"]) == 0)
|
}
|
||||||
|
|
||||||
//pre-populate the form
|
//pre-populate the form
|
||||||
if (is_array($_GET) && $_POST["persistformvar"] != "true") {
|
if (is_array($_GET) && $_POST["persistformvar"] != "true") {
|
||||||
|
|
@ -132,6 +149,7 @@
|
||||||
$bridge_name = $row["bridge_name"];
|
$bridge_name = $row["bridge_name"];
|
||||||
$bridge_destination = $row["bridge_destination"];
|
$bridge_destination = $row["bridge_destination"];
|
||||||
$bridge_enabled = $row["bridge_enabled"];
|
$bridge_enabled = $row["bridge_enabled"];
|
||||||
|
$bridge_description = $row["bridge_description"];
|
||||||
}
|
}
|
||||||
unset($sql, $parameters, $row);
|
unset($sql, $parameters, $row);
|
||||||
}
|
}
|
||||||
|
|
@ -150,8 +168,9 @@
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td align='left' width='30%' nowrap='nowrap' valign='top'><b>".$text['title-bridge']."</b><br><br></td>\n";
|
echo "<td align='left' width='30%' nowrap='nowrap' valign='top'><b>".$text['title-bridge']."</b><br><br></td>\n";
|
||||||
echo "<td width='70%' align='right' valign='top'>\n";
|
echo "<td width='70%' align='right' valign='top'>\n";
|
||||||
echo " <input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='bridges.php'\" value='".$text['button-back']."'>";
|
echo " <a href='bridges.php'><button type='button' class='btn btn-default' style='margin-right: 15px;' alt='".$text['button-back']."'>".$text['button-back']."</button></a>";
|
||||||
echo " <input type='submit' class='btn' value='".$text['button-save']."'>";
|
echo " <button type='submit' class='btn btn-default' style='margin-right: 15px;' name='action' value='delete' onclick=\"if (confirm('".$text['confirm-delete']."')) { document.getElementById('frm').submit(); } else { this.blur(); return false; }\">".$text['button-delete']."</button>";
|
||||||
|
echo " <button type='submit' class='btn btn-default' name='action' value='save'>".$text['button-save']."</button>";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
|
|
@ -201,12 +220,23 @@
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
|
echo "<tr>\n";
|
||||||
|
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||||
|
echo " ".$text['label-bridge_description']."\n";
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "<td class='vtable' align='left'>\n";
|
||||||
|
echo " <input class='formfld' type='text' name='bridge_description' maxlength='255' value=\"".escape($bridge_description)."\">\n";
|
||||||
|
echo "<br />\n";
|
||||||
|
echo $text['description-bridge_description']."\n";
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo " <tr>\n";
|
echo " <tr>\n";
|
||||||
echo " <td colspan='2' align='right'>\n";
|
echo " <td colspan='2' align='right'>\n";
|
||||||
echo " <br />\n";
|
echo " <br />\n";
|
||||||
echo " <input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
echo " <input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||||
echo " <input type='hidden' name='bridge_uuid' value='".escape($bridge_uuid)."'>\n";
|
echo " <input type='hidden' name='bridge_uuid' value='".escape($bridge_uuid)."'>\n";
|
||||||
echo " <input type='submit' class='btn' value='".$text['button-save']."'>\n";
|
echo " <button type='submit' class='btn btn-default' name='action' value='save'>".$text['button-save']."</button>\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " </tr>";
|
echo " </tr>";
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
|
|
|
||||||
|
|
@ -39,25 +39,45 @@
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
//get the action
|
//get posted data
|
||||||
if (is_array($_POST["bridges"])) {
|
if (is_array($_POST['bridges'])) {
|
||||||
$bridges = $_POST["bridges"];
|
$action = $_POST['action'];
|
||||||
foreach($bridges as $row) {
|
$bridges = $_POST['bridges'];
|
||||||
if ($row['action'] == 'delete') {
|
}
|
||||||
$action = 'delete';
|
|
||||||
break;
|
//copy the bridges
|
||||||
}
|
if (permission_exists('bridge_add')) {
|
||||||
|
if ($action == 'copy' && is_array($bridges) && @sizeof($bridges) != 0) {
|
||||||
|
//copy
|
||||||
|
$obj = new bridges;
|
||||||
|
$obj->copy($bridges);
|
||||||
|
//redirect
|
||||||
|
header('Location: bridges.php');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//toggle the bridges
|
||||||
|
if (permission_exists('bridge_edit')) {
|
||||||
|
if ($action == 'toggle' && is_array($bridges) && @sizeof($bridges) != 0) {
|
||||||
|
//toggle
|
||||||
|
$obj = new bridges;
|
||||||
|
$obj->toggle($bridges);
|
||||||
|
//redirect
|
||||||
|
header('Location: bridges.php');
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//delete the bridges
|
//delete the bridges
|
||||||
if (permission_exists('bridge_delete')) {
|
if (permission_exists('bridge_delete')) {
|
||||||
if ($action == "delete") {
|
if ($action == 'delete' && is_array($bridges) && @sizeof($bridges) != 0) {
|
||||||
//download
|
//delete
|
||||||
$obj = new bridges;
|
$obj = new bridges;
|
||||||
$obj->delete($bridges);
|
$obj->delete($bridges);
|
||||||
//delete message
|
//redirect
|
||||||
message::add($text['message-delete']);
|
header('Location: bridges.php');
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -107,7 +127,7 @@
|
||||||
|
|
||||||
//get the list
|
//get the list
|
||||||
$sql = str_replace('count(*)', '*', $sql);
|
$sql = str_replace('count(*)', '*', $sql);
|
||||||
$sql .= order_by($order_by, $order);
|
$sql .= order_by($order_by, $order, 'bridge_name', 'asc');
|
||||||
$sql .= limit_offset($rows_per_page, $offset);
|
$sql .= limit_offset($rows_per_page, $offset);
|
||||||
$database = new database;
|
$database = new database;
|
||||||
$bridges = $database->select($sql, $parameters, 'all');
|
$bridges = $database->select($sql, $parameters, 'all');
|
||||||
|
|
@ -124,56 +144,98 @@
|
||||||
//include the header
|
//include the header
|
||||||
require_once "resources/header.php";
|
require_once "resources/header.php";
|
||||||
|
|
||||||
//define the checkbox_toggle function
|
//define the checkbox functions
|
||||||
echo "<script type=\"text/javascript\">\n";
|
echo "<script type='text/javascript'>\n";
|
||||||
echo " function checkbox_toggle(item) {\n";
|
echo " function checkbox_toggle() {\n";
|
||||||
echo " var inputs = document.getElementsByTagName(\"input\");\n";
|
echo " var inputs = document.getElementsByTagName('input');\n";
|
||||||
|
echo " var box_checked = document.getElementById('checkbox_all').checked;\n";
|
||||||
echo " for (var i = 0, max = inputs.length; i < max; i++) {\n";
|
echo " for (var i = 0, max = inputs.length; i < max; i++) {\n";
|
||||||
echo " if (inputs[i].type === 'checkbox') {\n";
|
echo " if (inputs[i].type === 'checkbox') {\n";
|
||||||
echo " if (document.getElementById('checkbox_all').checked == true) {\n";
|
echo " inputs[i].checked = box_checked;\n";
|
||||||
echo " inputs[i].checked = true;\n";
|
|
||||||
echo " }\n";
|
|
||||||
echo " else {\n";
|
|
||||||
echo " inputs[i].checked = false;\n";
|
|
||||||
echo " }\n";
|
|
||||||
echo " }\n";
|
echo " }\n";
|
||||||
echo " }\n";
|
echo " }\n";
|
||||||
|
echo " if (box_checked) {\n";
|
||||||
|
echo " document.getElementById('btn_check_all').style.display = 'none';\n";
|
||||||
|
echo " document.getElementById('btn_check_none').style.display = '';\n";
|
||||||
|
echo " }\n";
|
||||||
|
echo " else {\n";
|
||||||
|
echo " document.getElementById('btn_check_all').style.display = '';\n";
|
||||||
|
echo " document.getElementById('btn_check_none').style.display = 'none';\n";
|
||||||
|
echo " }\n";
|
||||||
echo " }\n";
|
echo " }\n";
|
||||||
|
/*
|
||||||
|
echo " function check_all() {\n";
|
||||||
|
echo " var inputs = document.getElementsByTagName('input');\n";
|
||||||
|
echo " for (var i = 0, max = inputs.length; i < max; i++) {\n";
|
||||||
|
echo " if (inputs[i].type === 'checkbox') {\n";
|
||||||
|
echo " inputs[i].checked = true;\n";
|
||||||
|
echo " }\n";
|
||||||
|
echo " }\n";
|
||||||
|
echo " document.getElementById('btn_check_all').style.display = 'none';\n";
|
||||||
|
echo " document.getElementById('btn_check_none').style.display = '';\n";
|
||||||
|
echo " }\n";
|
||||||
|
|
||||||
|
echo " function check_none() {\n";
|
||||||
|
echo " var inputs = document.getElementsByTagName('input');\n";
|
||||||
|
echo " for (var i = 0, max = inputs.length; i < max; i++) {\n";
|
||||||
|
echo " if (inputs[i].type === 'checkbox') {\n";
|
||||||
|
echo " inputs[i].checked = false;\n";
|
||||||
|
echo " }\n";
|
||||||
|
echo " }\n";
|
||||||
|
echo " document.getElementById('btn_check_all').style.display = '';\n";
|
||||||
|
echo " document.getElementById('btn_check_none').style.display = 'none';\n";
|
||||||
|
echo " }\n";
|
||||||
|
*/
|
||||||
echo "</script>\n";
|
echo "</script>\n";
|
||||||
|
|
||||||
//show the content
|
//show the content
|
||||||
echo "<table width='100%' border='0'>\n";
|
echo "<div class='action_bar'>\n";
|
||||||
echo " <tr>\n";
|
echo " <b style='float: left;'>".$text['title-bridges']." (".$num_rows.")</b>\n";
|
||||||
echo " <td width='50%' align='left' nowrap='nowrap'><b>".$text['title-bridges']."</b></td>\n";
|
if (permission_exists('bridge_add')) {
|
||||||
echo " <form method='get' action=''>\n";
|
echo " <a href='bridge_edit.php' alt=\"".$text['button-add']."\"><button type='button' class='btn btn-default'>".$text['button-add']."</button></a>";
|
||||||
echo " <td width='50%' style='vertical-align: top; text-align: right; white-space: nowrap;'>\n";
|
}
|
||||||
|
if (permission_exists('bridge_add') || permission_exists('bridge_edit') || permission_exists('bridge_delete')) {
|
||||||
if (permission_exists('bridge_all')) {
|
/*
|
||||||
if ($_GET['show'] == 'all') {
|
echo " <button type='button' class='btn btn-default' id='btn_check_all' alt=\"".$text['button-check_all']."\" onclick='check_all();'>".$text['button-check_all']."</button>\n";
|
||||||
echo " <input type='hidden' name='show' value='all'>";
|
echo " <button type='button' class='btn btn-default' id='btn_check_none' alt=\"".$text['button-check_none']."\" onclick='check_none();' style='display: none;'>".$text['button-check_none']."</button>\n";
|
||||||
|
*/
|
||||||
|
if (permission_exists('bridge_add')) {
|
||||||
|
echo " <button type='button' class='btn btn-default' alt=\"".$text['button-copy']."\" onclick=\"if (confirm('".$text['confirm-copy']."')) { set_action('copy'); submit_form('form_list'); } else { this.blur(); return false; }\">".$text['button-copy']."</button>";
|
||||||
}
|
}
|
||||||
else {
|
if (permission_exists('bridge_edit')) {
|
||||||
echo " <input type='button' class='btn' value='".$text['button-show_all']."' onclick=\"window.location='bridges.php?show=all';\">\n";
|
echo " <button type='button' class='btn btn-default' alt=\"".$text['button-toggle']."\" onclick=\"if (confirm('".$text['confirm-toggle']."')) { set_action('toggle'); submit_form('form_list'); } else { this.blur(); return false; }\">".$text['button-toggle']."</button>";
|
||||||
|
}
|
||||||
|
if (permission_exists('bridge_delete')) {
|
||||||
|
echo " <button type='button' class='btn btn-default' alt=\"".$text['button-delete']."\" onclick=\"if (confirm('".$text['confirm-delete']."')) { set_action('delete'); submit_form('form_list'); } else { this.blur(); return false; }\">".$text['button-delete']."</button>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
echo " <span style='white-space: nowrap;'>\n";
|
||||||
|
if (permission_exists('bridge_all')) {
|
||||||
|
if ($_GET['show'] == 'all') {
|
||||||
|
echo " <input type='hidden' name='show' value='all'>";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo " <a href='?show=all'><button type='button' class='btn btn-default' style='margin-left: 15px;'>".$text['button-show_all']."</button></a>\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo " <form id='form_search' class='inline' method='get'>\n";
|
||||||
|
echo " <input type='text' class='txt' style='width: 150px; margin-left: 15px;' name='search' id='search' value='".escape($search)."' onkeypress='reset_search();'>\n";
|
||||||
|
echo " <input type='submit' class='btn' id='btn_search' value=\"".$text['button-search']."\" style='".($search != '' ? 'display: none;' : null)."'>\n";
|
||||||
|
echo " <a href='bridges.php'><input type='button' class='btn' id='btn_reset' value=\"".$text['button-reset']."\" style='".($search == '' ? 'display: none;' : null)."'></a>\n";
|
||||||
|
echo " </form>\n";
|
||||||
|
echo " </span>\n";
|
||||||
|
echo "</div>\n";
|
||||||
|
|
||||||
echo " <input type='text' class='txt' style='width: 150px; margin-left: 15px;' name='search' id='search' value='".escape($search)."'>\n";
|
echo $text['title_description-bridge']."\n";
|
||||||
echo " <input type='submit' class='btn' name='submit' value='".$text['button-search']."'>\n";
|
echo "<br /><br />\n";
|
||||||
echo " </td>\n";
|
|
||||||
echo " </form>\n";
|
echo "<form id='form_list' method='post'>\n";
|
||||||
echo " </tr>\n";
|
echo "<input type='hidden' id='action' name='action' value=''>\n";
|
||||||
echo " <tr>\n";
|
|
||||||
echo " <td align='left' colspan='2'>\n";
|
|
||||||
echo " ".$text['title_description-bridge']."<br /><br />\n";
|
|
||||||
echo " </td>\n";
|
|
||||||
echo " </tr>\n";
|
|
||||||
echo "</table>\n";
|
|
||||||
|
|
||||||
echo "<form method='post' action=''>\n";
|
|
||||||
echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo " <th style='width:30px;'>\n";
|
echo " <th style='width: 30px;'>\n";
|
||||||
echo " <input type='checkbox' name='checkbox_all' id='checkbox_all' value='' onclick=\"checkbox_toggle();\">\n";
|
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' value='' onclick='checkbox_toggle();'>\n";
|
||||||
echo " </th>\n";
|
echo " </th>\n";
|
||||||
if ($_GET['show'] == "all" && permission_exists('bridge_all')) {
|
if ($_GET['show'] == "all" && permission_exists('bridge_all')) {
|
||||||
echo th_order_by('domain_name', $text['label-domain'], $order_by, $order);
|
echo th_order_by('domain_name', $text['label-domain'], $order_by, $order);
|
||||||
|
|
@ -181,15 +243,9 @@
|
||||||
echo th_order_by('bridge_name', $text['label-bridge_name'], $order_by, $order);
|
echo th_order_by('bridge_name', $text['label-bridge_name'], $order_by, $order);
|
||||||
echo th_order_by('bridge_destination', $text['label-bridge_destination'], $order_by, $order);
|
echo th_order_by('bridge_destination', $text['label-bridge_destination'], $order_by, $order);
|
||||||
echo th_order_by('bridge_enabled', $text['label-bridge_enabled'], $order_by, $order);
|
echo th_order_by('bridge_enabled', $text['label-bridge_enabled'], $order_by, $order);
|
||||||
echo " <td class='list_control_icons'>";
|
echo " <th>".$text['label-description']."</th>\n";
|
||||||
if (permission_exists('bridge_add')) {
|
echo " <td style='width: 1px;'> </td>\n";
|
||||||
echo " <a href='bridge_edit.php' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
echo "</tr>\n";
|
||||||
}
|
|
||||||
else {
|
|
||||||
echo " \n";
|
|
||||||
}
|
|
||||||
echo " </td>\n";
|
|
||||||
echo "<tr>\n";
|
|
||||||
|
|
||||||
if (is_array($bridges)) {
|
if (is_array($bridges)) {
|
||||||
$x = 0;
|
$x = 0;
|
||||||
|
|
@ -199,43 +255,65 @@
|
||||||
}
|
}
|
||||||
echo "<tr ".$tr_link.">\n";
|
echo "<tr ".$tr_link.">\n";
|
||||||
echo " <td valign='top' class='".$row_style[$c]." tr_link_void' style='align: center; padding: 3px 3px 0px 8px;'>\n";
|
echo " <td valign='top' class='".$row_style[$c]." tr_link_void' style='align: center; padding: 3px 3px 0px 8px;'>\n";
|
||||||
echo " <input type='checkbox' name=\"bridges[$x][checked]\" id='checkbox_".$x."' value='true' onclick=\"if (!this.checked) { document.getElementById('chk_all_".$x."').checked = false; }\">\n";
|
echo " <input type='checkbox' name='bridges[$x][checked]' id='checkbox_".$x."' value='true' onclick=\"if (!this.checked) { document.getElementById('checkbox_all').checked = false; }\">\n";
|
||||||
echo " <input type='hidden' name=\"bridges[$x][bridge_uuid]\" value='".escape($row['bridge_uuid'])."' />\n";
|
echo " <input type='hidden' name='bridges[$x][bridge_uuid]' value='".escape($row['bridge_uuid'])."' />\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
if ($_GET['show'] == "all" && permission_exists('bridge_all')) {
|
if ($_GET['show'] == "all" && permission_exists('bridge_all')) {
|
||||||
echo " <td valign='top' class='".$row_style[$c]."'>".escape($_SESSION['domains'][$row['domain_uuid']]['domain_name'])." </td>\n";
|
echo " <td valign='top' class='".$row_style[$c]."'>".escape($_SESSION['domains'][$row['domain_uuid']]['domain_name'])."</td>\n";
|
||||||
}
|
}
|
||||||
echo " <td valign='top' class='".$row_style[$c]."'>".escape($row['bridge_name'])." </td>\n";
|
echo " <td valign='top' class='".$row_style[$c]."'>";
|
||||||
echo " <td valign='top' class='".$row_style[$c]."'>".escape($row['bridge_destination'])." </td>\n";
|
|
||||||
echo " <td valign='top' class='".$row_style[$c]."'>".$text['label-'.$row['bridge_enabled']]." </td>\n";
|
|
||||||
echo " <td class='list_control_icons'>";
|
|
||||||
if (permission_exists('bridge_edit')) {
|
if (permission_exists('bridge_edit')) {
|
||||||
echo "<a href='bridge_edit.php?id=".escape($row['bridge_uuid'])."' alt='".$text['button-edit']."'>$v_link_label_edit</a>";
|
echo " <a ".$tr_link.">".escape($row['bridge_name'])."</a>\n";
|
||||||
}
|
}
|
||||||
if (permission_exists('bridge_delete')) {
|
else {
|
||||||
echo "<button type='submit' class='btn btn-default list_control_icon' name=\"bridges[$x][action]\" alt='".$text['button-delete']."' value='delete'><span class='fas fa-minus'></span></button>";
|
echo " ".escape($row['bridge_name'])."\n";
|
||||||
}
|
}
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
|
echo " <td valign='top' class='".$row_style[$c]."'>".escape($row['bridge_destination'])."</td>\n";
|
||||||
|
echo " <td valign='top' class='".$row_style[$c]."'>".$text['label-'.$row['bridge_enabled']]."</td>\n";
|
||||||
|
echo " <td valign='top' class='".$row_style[$c]."'>".escape($row['bridge_description'])."</td>\n";
|
||||||
|
echo " <td style='width: 0;' class='tr_link_void'>";
|
||||||
|
if (permission_exists('bridge_edit')) {
|
||||||
|
echo "<a href='bridge_edit.php?id=".escape($row['bridge_uuid'])."' alt='".$text['button-edit']."'>".$v_button_icon_edit."</a>";
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
if (permission_exists('bridge_delete')) {
|
||||||
|
echo "<button type='input' class='btn btn-default btn-icon' name='bridges[$x][checked]' value='true' alt='".$text['button-delete']."' onclick=\"if (confirm('".$text['confirm-delete']."')) { set_action('delete'); submit_form('form_list'); } else { this.blur(); return false; }\"><span class='fas fa-minus'></span></button>";
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
echo " </td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
$c = $c ? 0 : 1;
|
||||||
$x++;
|
$x++;
|
||||||
$c = $c == 1 ? 0 : 1;
|
}
|
||||||
} //end foreach
|
|
||||||
unset($sql, $bridges);
|
unset($sql, $bridges);
|
||||||
} //end if results
|
}
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
if (permission_exists('bridge_add')) {
|
|
||||||
echo "<div style='float: right;'>\n";
|
|
||||||
echo " <a href='bridge_edit.php' alt=\"".$text['button-add']."\">".$v_link_label_add."</a>";
|
|
||||||
echo "</div>\n";
|
|
||||||
}
|
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
echo "<div align='center'>".$paging_controls."</div>\n";
|
echo "<div align='center'>".$paging_controls."</div>\n";
|
||||||
|
|
||||||
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||||
|
|
||||||
echo "</form>\n";
|
echo "</form>\n";
|
||||||
|
|
||||||
|
//handle form actions
|
||||||
|
echo "<script type='text/javascript'>\n";
|
||||||
|
echo " function set_action(action) {\n";
|
||||||
|
echo " document.getElementById('action').value = action;\n";
|
||||||
|
echo " }\n";
|
||||||
|
|
||||||
|
echo " function submit_form(form_id) {\n";
|
||||||
|
echo " document.getElementById(form_id).submit();\n";
|
||||||
|
echo " }\n";
|
||||||
|
|
||||||
|
echo " function reset_search() {\n";
|
||||||
|
echo " document.getElementById('btn_reset').style.display = 'none';\n";
|
||||||
|
echo " document.getElementById('btn_search').style.display = '';\n";
|
||||||
|
echo " }\n";
|
||||||
|
echo "</script>\n";
|
||||||
|
|
||||||
//include the footer
|
//include the footer
|
||||||
require_once "resources/footer.php";
|
require_once "resources/footer.php";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,36 +44,158 @@ if (!class_exists('bridges')) {
|
||||||
}
|
}
|
||||||
|
|
||||||
//delete multiple bridges
|
//delete multiple bridges
|
||||||
if (is_array($bridges)) {
|
if (is_array($bridges) && @sizeof($bridges) != 0) {
|
||||||
//get the action
|
//delete the checked rows
|
||||||
foreach($bridges as $row) {
|
foreach($bridges as $x => $row) {
|
||||||
if ($row['action'] == 'delete') {
|
if ($row['checked'] == 'true' && is_uuid($row['bridge_uuid'])) {
|
||||||
$action = 'delete';
|
$array['bridges'][$x]['bridge_uuid'] = $row['bridge_uuid'];
|
||||||
break;
|
$array['bridges'][$x]['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//delete the checked rows
|
if (is_array($array) && @sizeof($array) != 0) {
|
||||||
if ($action == 'delete') {
|
//execute delete
|
||||||
$database = new database;
|
$database = new database;
|
||||||
foreach($bridges as $x => $row) {
|
|
||||||
if ($row['action'] == 'delete' or $row['checked'] == 'true') {
|
|
||||||
$array['bridges'][$x]['bridge_uuid'] = $row['bridge_uuid'];
|
|
||||||
$array['bridges'][$x]['domain_uuid'] = $_SESSION['domain_uuid'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (is_array($array) && @sizeof($array) != 0) {
|
|
||||||
$database->app_name = 'bridges';
|
$database->app_name = 'bridges';
|
||||||
$database->app_uuid = 'a6a7c4c5-340a-43ce-bcbc-2ed9bab8659d';
|
$database->app_uuid = 'a6a7c4c5-340a-43ce-bcbc-2ed9bab8659d';
|
||||||
$database->delete($array);
|
$database->delete($array);
|
||||||
unset($array);
|
unset($array);
|
||||||
}
|
//set message
|
||||||
unset($bridges);
|
message::add($text['message-delete']);
|
||||||
}
|
}
|
||||||
|
unset($bridges);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} //end the delete function
|
}
|
||||||
|
|
||||||
} //end the class
|
/**
|
||||||
|
* toggle bridges
|
||||||
|
*/
|
||||||
|
public function toggle($bridges) {
|
||||||
|
if (permission_exists('bridge_edit')) {
|
||||||
|
|
||||||
|
//add multi-lingual support
|
||||||
|
$language = new text;
|
||||||
|
$text = $language->get();
|
||||||
|
|
||||||
|
//validate the token
|
||||||
|
$token = new token;
|
||||||
|
if (!$token->validate($_SERVER['PHP_SELF'])) {
|
||||||
|
message::add($text['message-invalid_token'],'negative');
|
||||||
|
header('Location: bridges.php');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
//toggle the checked bridges
|
||||||
|
if (is_array($bridges) && @sizeof($bridges) != 0) {
|
||||||
|
//get current enabled state of checked bridges
|
||||||
|
foreach($bridges as $x => $row) {
|
||||||
|
if ($row['checked'] == 'true' && is_uuid($row['bridge_uuid'])) {
|
||||||
|
$bridge_uuids[] = "bridge_uuid = '".$row['bridge_uuid']."'";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (is_array($bridge_uuids) && @sizeof($bridge_uuids) != 0) {
|
||||||
|
$sql = "select bridge_uuid, bridge_enabled from v_bridges ";
|
||||||
|
$sql .= "where (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
||||||
|
$sql .= "and ( ".implode(' or ', $bridge_uuids)." ) ";
|
||||||
|
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||||
|
$database = new database;
|
||||||
|
$rows = $database->select($sql, $parameters, 'all');
|
||||||
|
if (is_array($rows) && @sizeof($rows) != 0) {
|
||||||
|
foreach ($rows as $row) {
|
||||||
|
$bridge_states[$row['bridge_uuid']] = $row['bridge_enabled'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
unset($sql, $parameters, $rows, $row);
|
||||||
|
}
|
||||||
|
|
||||||
|
//build update array
|
||||||
|
$x = 0;
|
||||||
|
foreach($bridge_states as $bridge_uuid => $bridge_state) {
|
||||||
|
$array['bridges'][$x]['bridge_uuid'] = $bridge_uuid;
|
||||||
|
$array['bridges'][$x]['bridge_enabled'] = $bridge_state == 'true' ? 'false' : 'true';
|
||||||
|
$x++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is_array($array) && @sizeof($array) != 0) {
|
||||||
|
//execute update
|
||||||
|
$database = new database;
|
||||||
|
$database->app_name = 'bridges';
|
||||||
|
$database->app_uuid = 'a6a7c4c5-340a-43ce-bcbc-2ed9bab8659d';
|
||||||
|
$database->save($array);
|
||||||
|
unset($array);
|
||||||
|
//set message
|
||||||
|
message::add($text['message-update']);
|
||||||
|
}
|
||||||
|
unset($bridges, $bridge_states);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* copy bridges
|
||||||
|
*/
|
||||||
|
public function copy($bridges) {
|
||||||
|
if (permission_exists('bridge_add')) {
|
||||||
|
|
||||||
|
//add multi-lingual support
|
||||||
|
$language = new text;
|
||||||
|
$text = $language->get();
|
||||||
|
|
||||||
|
//validate the token
|
||||||
|
$token = new token;
|
||||||
|
if (!$token->validate($_SERVER['PHP_SELF'])) {
|
||||||
|
message::add($text['message-invalid_token'],'negative');
|
||||||
|
header('Location: bridges.php');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
//copy the checked bridges
|
||||||
|
if (is_array($bridges) && @sizeof($bridges) != 0) {
|
||||||
|
|
||||||
|
//get checked bridges
|
||||||
|
foreach($bridges as $x => $row) {
|
||||||
|
if ($row['checked'] == 'true' && is_uuid($row['bridge_uuid'])) {
|
||||||
|
$bridge_uuids[] = "bridge_uuid = '".$row['bridge_uuid']."'";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//create insert array from existing data
|
||||||
|
if (is_array($bridge_uuids) && @sizeof($bridge_uuids) != 0) {
|
||||||
|
$sql = "select * from v_bridges ";
|
||||||
|
$sql .= "where (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
||||||
|
$sql .= "and ( ".implode(' or ', $bridge_uuids)." ) ";
|
||||||
|
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||||
|
$database = new database;
|
||||||
|
$rows = $database->select($sql, $parameters, 'all');
|
||||||
|
if (is_array($rows) && @sizeof($rows) != 0) {
|
||||||
|
foreach ($rows as $x => $row) {
|
||||||
|
$array['bridges'][$x]['bridge_uuid'] = uuid();
|
||||||
|
$array['bridges'][$x]['domain_uuid'] = $row['domain_uuid'];
|
||||||
|
$array['bridges'][$x]['bridge_name'] = $row['bridge_name'];
|
||||||
|
$array['bridges'][$x]['bridge_destination'] = $row['bridge_destination'];
|
||||||
|
$array['bridges'][$x]['bridge_enabled'] = $row['bridge_enabled'];
|
||||||
|
$array['bridges'][$x]['bridge_description'] = trim($row['bridge_description'].' ('.$text['label-copy'].')');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
unset($sql, $parameters, $rows, $row);
|
||||||
|
}
|
||||||
|
//execute insert
|
||||||
|
if (is_array($array) && @sizeof($array) != 0) {
|
||||||
|
$database = new database;
|
||||||
|
$database->app_name = 'bridges';
|
||||||
|
$database->app_uuid = 'a6a7c4c5-340a-43ce-bcbc-2ed9bab8659d';
|
||||||
|
$database->save($array);
|
||||||
|
unset($array);
|
||||||
|
//set message
|
||||||
|
message::add($text['message-copy']);
|
||||||
|
}
|
||||||
|
unset($bridges);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -337,6 +337,27 @@ $text['confirm-copy']['sv-se'] = "Vill du verkligen kopiera detta?";
|
||||||
$text['confirm-copy']['uk-ua'] = "";
|
$text['confirm-copy']['uk-ua'] = "";
|
||||||
$text['confirm-copy']['tr-tr'] = "Bunu gerçekten kopyalamak istiyor musunuz?";
|
$text['confirm-copy']['tr-tr'] = "Bunu gerçekten kopyalamak istiyor musunuz?";
|
||||||
|
|
||||||
|
$text['confirm-toggle']['en-us'] = "Do you really want to toggle this?";
|
||||||
|
$text['confirm-toggle']['ar-eg'] = "Do you really want to toggle this?";
|
||||||
|
$text['confirm-toggle']['de-at'] = "Do you really want to toggle this?";
|
||||||
|
$text['confirm-toggle']['de-ch'] = "Do you really want to toggle this?";
|
||||||
|
$text['confirm-toggle']['de-de'] = "Do you really want to toggle this?";
|
||||||
|
$text['confirm-toggle']['es-cl'] = "Do you really want to toggle this?";
|
||||||
|
$text['confirm-toggle']['es-mx'] = "Do you really want to toggle this?";
|
||||||
|
$text['confirm-toggle']['fr-ca'] = "Do you really want to toggle this?";
|
||||||
|
$text['confirm-toggle']['fr-fr'] = "Do you really want to toggle this?";
|
||||||
|
$text['confirm-toggle']['he-il'] = "Do you really want to toggle this?";
|
||||||
|
$text['confirm-toggle']['it-it'] = "Do you really want to toggle this?";
|
||||||
|
$text['confirm-toggle']['nl-nl'] = "Do you really want to toggle this?";
|
||||||
|
$text['confirm-toggle']['pl-pl'] = "Do you really want to toggle this?";
|
||||||
|
$text['confirm-toggle']['pt-br'] = "Do you really want to toggle this?";
|
||||||
|
$text['confirm-toggle']['pt-pt'] = "Do you really want to toggle this?";
|
||||||
|
$text['confirm-toggle']['ro-ro'] = "Do you really want to toggle this?";
|
||||||
|
$text['confirm-toggle']['ru-ru'] = "Do you really want to toggle this?";
|
||||||
|
$text['confirm-toggle']['sv-se'] = "Do you really want to toggle this?";
|
||||||
|
$text['confirm-toggle']['uk-ua'] = "Do you really want to toggle this?";
|
||||||
|
$text['confirm-toggle']['tr-tr'] = "Do you really want to toggle this?";
|
||||||
|
|
||||||
$text['button-apply']['en-us'] = "Apply";
|
$text['button-apply']['en-us'] = "Apply";
|
||||||
$text['button-apply']['ar-eg'] = "";
|
$text['button-apply']['ar-eg'] = "";
|
||||||
$text['button-apply']['de-at'] = "Anwenden"; //copied from de-de
|
$text['button-apply']['de-at'] = "Anwenden"; //copied from de-de
|
||||||
|
|
@ -1154,6 +1175,66 @@ $text['button-qr_code']['ru-ru'] = "QR Код";
|
||||||
$text['button-qr_code']['sv-se'] = "QR Kod";
|
$text['button-qr_code']['sv-se'] = "QR Kod";
|
||||||
$text['button-qr_code']['uk-ua'] = "";
|
$text['button-qr_code']['uk-ua'] = "";
|
||||||
|
|
||||||
|
$text['button-toggle']['en-us'] = "Toggle";
|
||||||
|
$text['button-toggle']['ar-eg'] = "Toggle";
|
||||||
|
$text['button-toggle']['de-at'] = "Toggle";
|
||||||
|
$text['button-toggle']['de-ch'] = "Toggle";
|
||||||
|
$text['button-toggle']['de-de'] = "Toggle";
|
||||||
|
$text['button-toggle']['es-cl'] = "Toggle";
|
||||||
|
$text['button-toggle']['es-mx'] = "Toggle";
|
||||||
|
$text['button-toggle']['fr-ca'] = "Toggle";
|
||||||
|
$text['button-toggle']['fr-fr'] = "Toggle";
|
||||||
|
$text['button-toggle']['he-il'] = "Toggle";
|
||||||
|
$text['button-toggle']['it-it'] = "Toggle";
|
||||||
|
$text['button-toggle']['nl-nl'] = "Toggle";
|
||||||
|
$text['button-toggle']['pl-pl'] = "Toggle";
|
||||||
|
$text['button-toggle']['pt-br'] = "Toggle";
|
||||||
|
$text['button-toggle']['pt-pt'] = "Toggle";
|
||||||
|
$text['button-toggle']['ro-ro'] = "Toggle";
|
||||||
|
$text['button-toggle']['ru-ru'] = "Toggle";
|
||||||
|
$text['button-toggle']['sv-se'] = "Toggle";
|
||||||
|
$text['button-toggle']['uk-ua'] = "Toggle";
|
||||||
|
|
||||||
|
$text['button-check_all']['en-us'] = "Check All";
|
||||||
|
$text['button-check_all']['ar-eg'] = "Check All";
|
||||||
|
$text['button-check_all']['de-at'] = "Check All";
|
||||||
|
$text['button-check_all']['de-ch'] = "Check All";
|
||||||
|
$text['button-check_all']['de-de'] = "Check All";
|
||||||
|
$text['button-check_all']['es-cl'] = "Check All";
|
||||||
|
$text['button-check_all']['es-mx'] = "Check All";
|
||||||
|
$text['button-check_all']['fr-ca'] = "Check All";
|
||||||
|
$text['button-check_all']['fr-fr'] = "Check All";
|
||||||
|
$text['button-check_all']['he-il'] = "Check All";
|
||||||
|
$text['button-check_all']['it-it'] = "Check All";
|
||||||
|
$text['button-check_all']['nl-nl'] = "Check All";
|
||||||
|
$text['button-check_all']['pl-pl'] = "Check All";
|
||||||
|
$text['button-check_all']['pt-br'] = "Check All";
|
||||||
|
$text['button-check_all']['pt-pt'] = "Check All";
|
||||||
|
$text['button-check_all']['ro-ro'] = "Check All";
|
||||||
|
$text['button-check_all']['ru-ru'] = "Check All";
|
||||||
|
$text['button-check_all']['sv-se'] = "Check All";
|
||||||
|
$text['button-check_all']['uk-ua'] = "Check All";
|
||||||
|
|
||||||
|
$text['button-check_none']['en-us'] = "Check None";
|
||||||
|
$text['button-check_none']['ar-eg'] = "Check None";
|
||||||
|
$text['button-check_none']['de-at'] = "Check None";
|
||||||
|
$text['button-check_none']['de-ch'] = "Check None";
|
||||||
|
$text['button-check_none']['de-de'] = "Check None";
|
||||||
|
$text['button-check_none']['es-cl'] = "Check None";
|
||||||
|
$text['button-check_none']['es-mx'] = "Check None";
|
||||||
|
$text['button-check_none']['fr-ca'] = "Check None";
|
||||||
|
$text['button-check_none']['fr-fr'] = "Check None";
|
||||||
|
$text['button-check_none']['he-il'] = "Check None";
|
||||||
|
$text['button-check_none']['it-it'] = "Check None";
|
||||||
|
$text['button-check_none']['nl-nl'] = "Check None";
|
||||||
|
$text['button-check_none']['pl-pl'] = "Check None";
|
||||||
|
$text['button-check_none']['pt-br'] = "Check None";
|
||||||
|
$text['button-check_none']['pt-pt'] = "Check None";
|
||||||
|
$text['button-check_none']['ro-ro'] = "Check None";
|
||||||
|
$text['button-check_none']['ru-ru'] = "Check None";
|
||||||
|
$text['button-check_none']['sv-se'] = "Check None";
|
||||||
|
$text['button-check_none']['uk-ua'] = "Check None";
|
||||||
|
|
||||||
$text['label-total']['en-us'] = "Total";
|
$text['label-total']['en-us'] = "Total";
|
||||||
$text['label-total']['ar-eg'] = "";
|
$text['label-total']['ar-eg'] = "";
|
||||||
$text['label-total']['de-at'] = "Summe"; //copied from de-de
|
$text['label-total']['de-at'] = "Summe"; //copied from de-de
|
||||||
|
|
@ -2451,6 +2532,27 @@ $text['label-context']['ru-ru'] = "Контекст";
|
||||||
$text['label-context']['sv-se'] = "Context";
|
$text['label-context']['sv-se'] = "Context";
|
||||||
$text['label-context']['uk-ua'] = "Контекст";
|
$text['label-context']['uk-ua'] = "Контекст";
|
||||||
|
|
||||||
|
$text['label-copy']['en-us'] = "Copy";
|
||||||
|
$text['label-copy']['ar-eg'] = "";
|
||||||
|
$text['label-copy']['de-at'] = "Kopieren"; //copied from de-de
|
||||||
|
$text['label-copy']['de-ch'] = "Kopieren"; //copied from de-de
|
||||||
|
$text['label-copy']['de-de'] = "Kopieren";
|
||||||
|
$text['label-copy']['es-cl'] = "Copiar";
|
||||||
|
$text['label-copy']['es-mx'] = "Copiar"; //copied from es-cl
|
||||||
|
$text['label-copy']['fr-ca'] = "Copier"; //copied from fr-fr
|
||||||
|
$text['label-copy']['fr-fr'] = "Copier";
|
||||||
|
$text['label-copy']['he-il'] = "העתק";
|
||||||
|
$text['label-copy']['it-it'] = "Copia";
|
||||||
|
$text['label-copy']['nl-nl'] = "";
|
||||||
|
$text['label-copy']['pl-pl'] = "Kopiuj";
|
||||||
|
$text['label-copy']['pt-br'] = "Copiar"; //copied from pt-pt
|
||||||
|
$text['label-copy']['pt-pt'] = "Copiar";
|
||||||
|
$text['label-copy']['ro-ro'] = "";
|
||||||
|
$text['label-copy']['ru-ru'] = "Копировать";
|
||||||
|
$text['label-copy']['sv-se'] = "Kopiera";
|
||||||
|
$text['label-copy']['uk-ua'] = "Копіювати";
|
||||||
|
$text['label-copy']['tr-tr'] = "Kopyala";
|
||||||
|
|
||||||
$text['label-music_on_hold']['en-us'] = "Music on Hold";
|
$text['label-music_on_hold']['en-us'] = "Music on Hold";
|
||||||
$text['label-music_on_hold']['ar-eg'] = "موسيقى المؤجلة";
|
$text['label-music_on_hold']['ar-eg'] = "موسيقى المؤجلة";
|
||||||
$text['label-music_on_hold']['de-at'] = "Wartemusik"; //copied from de-de
|
$text['label-music_on_hold']['de-at'] = "Wartemusik"; //copied from de-de
|
||||||
|
|
|
||||||
|
|
@ -1645,4 +1645,45 @@
|
||||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "/themes/default/images/logo_side_expanded.png";
|
$apps[$x]['default_settings'][$y]['default_setting_value'] = "/themes/default/images/logo_side_expanded.png";
|
||||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the expanded brand image path for the Side menu.";
|
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the expanded brand image path for the Side menu.";
|
||||||
|
$y++;
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "dde32589-2d0d-4d10-a42a-3948061c17fe";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "action_bar_border_bottom_size";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0 0 1px 0";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Sets the border size of the Action Bar.";
|
||||||
|
$y++;
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "8a2d3b59-a54a-4519-b049-4293e1f0dd4a";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "action_bar_border_bottom_style";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_value'] = "solid";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Sets the border style of the Action Bar.";
|
||||||
|
$y++;
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "1f5f0f7b-e779-48d0-b1a6-afa1a2c9cf9e";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "action_bar_border_bottom_color";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_value'] = "#dddddd";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Sets the border color of the Action Bar.";
|
||||||
|
$y++;
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "544cec97-3407-42f8-8627-32f92bcbc46b";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "action_bar_border_bottom_radius";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Sets the border radius of the Action Bar.";
|
||||||
|
$y++;
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "9de3beba-3b56-40e3-b312-111674a3b30f";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "action_bar_background";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_value'] = "rgba(255,255,255,0.9)";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Sets the background color/opacity/image of the Action Bar.";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
//define the link labels
|
//define the link labels
|
||||||
$v_link_label_edit = "<button type='button' class='btn btn-default list_control_icon'><span class='fas fa-pencil-alt'></span></button>";
|
|
||||||
$v_link_label_add = "<button type='button' class='btn btn-default list_control_icon'><span class='fas fa-plus'></span></button>";
|
$v_link_label_add = "<button type='button' class='btn btn-default list_control_icon'><span class='fas fa-plus'></span></button>";
|
||||||
|
$v_link_label_edit = "<button type='button' class='btn btn-default list_control_icon'><span class='fas fa-pencil-alt'></span></button>";
|
||||||
$v_link_label_delete = "<button type='button' class='btn btn-default list_control_icon'><span class='fas fa-minus'></span></button>";
|
$v_link_label_delete = "<button type='button' class='btn btn-default list_control_icon'><span class='fas fa-minus'></span></button>";
|
||||||
$v_link_label_view = "<button type='button' class='btn btn-default list_control_icon'><span class='fas fa-eye'></span></button>";
|
$v_link_label_view = "<button type='button' class='btn btn-default list_control_icon'><span class='fas fa-eye'></span></button>";
|
||||||
$v_link_label_play = "<button type='button' class='btn btn-default list_control_icon'><span class='fas fa-play'></span></button>";
|
$v_link_label_play = "<button type='button' class='btn btn-default list_control_icon'><span class='fas fa-play'></span></button>";
|
||||||
|
|
@ -10,4 +10,14 @@
|
||||||
$v_link_label_stop = "<button type='button' class='btn btn-default list_control_icon'><span class='fas fa-stop'></span></button>";
|
$v_link_label_stop = "<button type='button' class='btn btn-default list_control_icon'><span class='fas fa-stop'></span></button>";
|
||||||
$v_link_label_download = "<button type='button' class='btn btn-default list_control_icon'><span class='fas fa-cloud-download-alt'></span></button>";
|
$v_link_label_download = "<button type='button' class='btn btn-default list_control_icon'><span class='fas fa-cloud-download-alt'></span></button>";
|
||||||
|
|
||||||
|
//icon buttons
|
||||||
|
$v_button_icon_add = "<button type='button' class='btn btn-default btn-icon'><span class='fas fa-plus'></span></button>";
|
||||||
|
$v_button_icon_edit = "<button type='button' class='btn btn-default btn-icon'><span class='fas fa-pencil-alt'></span></button>";
|
||||||
|
$v_button_icon_delete = "<button type='button' class='btn btn-default btn-icon'><span class='fas fa-minus'></span></button>";
|
||||||
|
$v_button_icon_view = "<button type='button' class='btn btn-default btn-icon'><span class='fas fa-eye'></span></button>";
|
||||||
|
$v_button_icon_play = "<button type='button' class='btn btn-default btn-icon'><span class='fas fa-play'></span></button>";
|
||||||
|
$v_button_icon_pause = "<button type='button' class='btn btn-default btn-icon'><span class='fas fa-pause'></span></button>";
|
||||||
|
$v_button_icon_stop = "<button type='button' class='btn btn-default btn-icon'><span class='fas fa-stop'></span></button>";
|
||||||
|
$v_button_icon_download = "<button type='button' class='btn btn-default btn-icon'><span class='fas fa-cloud-download-alt'></span></button>";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
@ -2036,3 +2036,34 @@ $default_login = ($_REQUEST['login'] == 'default') ? true : false;
|
||||||
div.form_set > .field.nowrap {
|
div.form_set > .field.nowrap {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*******************************************************************************/
|
||||||
|
|
||||||
|
div.action_bar {
|
||||||
|
position: -webkit-sticky;
|
||||||
|
position: sticky;
|
||||||
|
<?php
|
||||||
|
switch ($_SESSION['theme']['menu_style']['text']) {
|
||||||
|
case 'side':
|
||||||
|
$action_bar_top = '0';
|
||||||
|
break;
|
||||||
|
case 'inline':
|
||||||
|
case 'static':
|
||||||
|
$action_bar_top = '-1px';
|
||||||
|
break;
|
||||||
|
case 'fixed':
|
||||||
|
default:
|
||||||
|
$action_bar_top = '49px';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
top: <?php echo $action_bar_top; ?>;
|
||||||
|
text-align: right;
|
||||||
|
border-bottom-width: <?php echo ($_SESSION['theme']['action_bar_border_bottom_size']['text'] != '') ? $_SESSION['theme']['action_bar_border_bottom_size']['text'] : '1px'; ?>;
|
||||||
|
border-bottom-style: <?php echo ($_SESSION['theme']['action_bar_border_bottom_style']['text'] != '') ? $_SESSION['theme']['action_bar_border_bottom_style']['text'] : 'solid'; ?>;
|
||||||
|
border-bottom-color: <?php echo ($_SESSION['theme']['action_bar_border_bottom_color']['text'] != '') ? $_SESSION['theme']['action_bar_border_bottom_color']['text'] : '#ddd'; ?>;
|
||||||
|
border-bottom-left-radius: <?php echo ($_SESSION['theme']['action_bar_border_bottom_radius']['text'] != '') ? $_SESSION['theme']['action_bar_border_bottom_radius']['text'] : '0'; ?>;
|
||||||
|
border-bottom-right-radius: <?php echo ($_SESSION['theme']['action_bar_border_bottom_radius']['text'] != '') ? $_SESSION['theme']['action_bar_border_bottom_radius']['text'] : '0'; ?>;
|
||||||
|
padding: 10px;
|
||||||
|
background: <?php echo ($_SESSION['theme']['action_bar_background']['text'] != '') ? $_SESSION['theme']['action_bar_background']['text'] : 'rgba(255,255,255,0.9)'; ?>;
|
||||||
|
margin: -10px -10px 10px -10px;
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue