nagiosql/templates/admin/settings.tpl.htm
2017-05-22 11:24:21 +02:00

285 lines
14 KiB
HTML

<!-- (c) 2005-2012 by Martin Willisegger -->
<!-- -->
<!-- Project : NagiosQL -->
<!-- Component : settings administration template -->
<!-- Website : http://www.nagiosql.org -->
<!-- Date : $LastChangedDate: 2012-02-21 14:10:41 +0100 (Tue, 21 Feb 2012) $ -->
<!-- Author : $LastChangedBy: martin $ -->
<!-- Version : 3.2.0 -->
<!-- Revision : $LastChangedRevision: 1229 $ -->
<!-- BEGIN header -->
<div id="content_main">
<div id="content_title">{TITLE}</div>
<!-- END header -->
<!-- BEGIN settingssite -->
<script language="JavaScript" type="text/JavaScript">
<!--
// Abort form
function abort() {
this.location.href = "{ACTION_INSERT}";
}
// Send form
function LockButton() {
if (checkForm() == false) {
return false;
} else {
document.frmSettings.submit();
document.frmSettings.subForm.disabled = true;
}
}
// Check form entries
function checkForm() {
// Are all required fields filled in?
var fields1 = "selValue1,tfValue1,tfValue3,tfValue4,tfValue5,tfValue6";
var fields2 = "tfValue10";
var msg = "{FILL_ALLFIELDS}";
var header = "{LANG_FORMCHECK}";
var form = document.frmSettings;
var check = false;
check = checkfields(fields1,form,myFocusObject);
if (check == false) {
msginit(msg,header,1);
return false;
}
// Check if Updatecheck is enabled
boxes=document.getElementsByName("radValue2")
checkedUpd=0
for(var i=0;i<boxes.length;i++){
if(boxes[i].checked){
checkedUpd=i
break // No need to check the rest since only one can be checked.
}
}
if (checkedUpd == 0) {
boxes=document.getElementsByName("radValue3")
checkedProxy=0
for(var i=0;i<boxes.length;i++){
if(boxes[i].checked){
checkedProxy=i
break // No need to check the rest since only one can be checked.
}
}
if (checkedProxy == 0) {
check = checkfields(fields2,form,myFocusObject);
if (check == false) {
msginit(msg,header,1);
return false;
}
}
}
}
// Enable hidden fields
function showFields(name,key) {
if (name == "radValue2") {
if (key == 0) {
document.getElementById('Proxy').className = "elementHide";
document.getElementById('ProxyServer').className = "elementHide";
document.getElementById('ProxyUser').className = "elementHide";
document.getElementById('ProxyPasswd').className = "elementHide";
} else {
boxes=document.getElementsByName("radValue3")
checkedBox=0
for(var i=0;i<boxes.length;i++){
if(boxes[i].checked){
checkedBox=i
break // No need to check the rest since only one can be checked.
}
}
if (checkedBox == 0) {
document.getElementById('Proxy').className = "elementShow";
document.getElementById('ProxyServer').className = "elementShow";
document.getElementById('ProxyUser').className = "elementShow";
document.getElementById('ProxyPasswd').className = "elementShow";
} else {
document.getElementById('Proxy').className = "elementShow";
document.getElementById('ProxyServer').className = "elementHide";
document.getElementById('ProxyUser').className = "elementHide";
document.getElementById('ProxyPasswd').className = "elementHide";
}
}
} else if (name == "radValue3") {
if (key == 0) {
document.getElementById('Proxy').className = "elementShow";
document.getElementById('ProxyServer').className = "elementHide";
document.getElementById('ProxyUser').className = "elementHide";
document.getElementById('ProxyPasswd').className = "elementHide";
} else {
document.getElementById('Proxy').className = "elementShow";
document.getElementById('ProxyServer').className = "elementShow";
document.getElementById('ProxyUser').className = "elementShow";
document.getElementById('ProxyPasswd').className = "elementShow";
}
}
}
//-->
</script>
<form name="frmSettings" method="post" action="{ACTION_INSERT}">
<table border="0" cellpadding="0" class="content_formtable">
<tr>
<td colspan="3"><b>{PATH}</b></td>
</tr>
<tr>
<td class="content_tbl_row1" style="width:250px;">{TEMPDIR_NAME} *</td>
<td class="content_tbl_row2"><input type='text' name='tfValue1' id='tfValue1' value='{TEMPDIR_VALUE}' class="inpmust"></td>
<td class="content_tbl_row3"><img src="{IMAGE_PATH}tip.gif" alt="{LANG_HELP}" title="{LANG_HELP}" width="18" height="18" onclick="dialoginit('settings','txtTempdir','all','Info')" class="infobutton_1"></td>
</tr>
<tr>
<td>{PROTOCOL_NAME} *</td>
<td>
<select name="selValue1" class="selectbordermust inpmust">
<option class="inpmust" value="1" {HTTP_SELECTED}>http</option>
<option class="inpmust" value="2" {HTTPS_SELECTED}>https</option>
</select>
</td>
<td><img src="{IMAGE_PATH}tip.gif" alt="{LANG_HELP}" title="{LANG_HELP}" width="18" height="18" onclick="dialoginit('settings','selProtocol','all','Info')" class="infobutton_1"></td>
</tr>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td colspan="3"><b>{DATA}</b></td>
</tr>
<tr>
<td>{LOCALE}</td>
<td>
<select name="selValue2" class="selectborder">
<!-- BEGIN language -->
<option value="{LANGUAGE_ID}" {LANGUAGE_SELECTED}>{LANGUAGE_NAME}</option>
<!-- END language -->
</select>
</td>
<td><img src="{IMAGE_PATH}tip.gif" alt="{LANG_HELP}" title="{LANG_HELP}" width="18" height="18" onclick="dialoginit('settings','selLanguage','all','Info')" class="infobutton_1"></td>
</tr>
<tr>
<td>{ENCODING_NAME}</td>
<td><input name='tfValue2' type='text' id='tfValue2' value='{ENCODING_VALUE}'></td>
<td><img src="{IMAGE_PATH}tip.gif" alt="{LANG_HELP}" title="{LANG_HELP}" width="18" height="18" onclick="dialoginit('settings','txtEncoding','all','Info')" class="infobutton_1"></td>
</tr>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td colspan="3"><b>{DB}</b></td>
</tr>
<tr>
<td>{SERVER_NAME} *</td>
<td><input name='tfValue3' type='text' id='tfValue3' value='{SERVER_VALUE}'class="inpmust"></td>
<td><img src="{IMAGE_PATH}tip.gif" alt="{LANG_HELP}" title="{LANG_HELP}" width="18" height="18" onclick="dialoginit('settings','txtDBserver','all','Info')" class="infobutton_1"></td>
</tr>
<tr>
<td>{SERVER_PORT} *</td>
<td><input name='tfValue4' type='text' id='tfValue4' value='{PORT_VALUE}'class="inpmust"></td>
<td><img src="{IMAGE_PATH}tip.gif" alt="{LANG_HELP}" title="{LANG_HELP}" width="18" height="18" onclick="dialoginit('settings','txtDBport','all','Info')" class="infobutton_1"></td>
</tr>
<tr>
<td>{DATABASE_NAME} *</td>
<td><input name='tfValue5' type='text' id='tfValue5' value='{DATABASE_VALUE}'class="inpmust"></td>
<td><img src="{IMAGE_PATH}tip.gif" alt="{LANG_HELP}" title="{LANG_HELP}" width="18" height="18" onclick="dialoginit('settings','txtDBname','all','Info')" class="infobutton_1"></td>
</tr>
<tr>
<td>{USERNAME_NAME} *</td>
<td><input name='tfValue6' type='text' id='tfValue6' value='{USERNAME_VALUE}'class="inpmust"></td>
<td><img src="{IMAGE_PATH}tip.gif" alt="{LANG_HELP}" title="{LANG_HELP}" width="18" height="18" onclick="dialoginit('settings','txtDBuser','all','Info')" class="infobutton_1"></td>
</tr>
<tr>
<td>{PASSWORD_NAME}</td>
<td><input name='tfValue7' type='password' id='tfValue7' value='{PASSWORD_VALUE}'></td>
<td><img src="{IMAGE_PATH}tip.gif" alt="{LANG_HELP}" title="{LANG_HELP}" width="18" height="18" onclick="dialoginit('settings','txtDBpass','all','Info')" class="infobutton_1"></td>
</tr>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td colspan="3"><b>{SECURITY}</b></td>
</tr>
<tr>
<td>{LOGOFFTIME_NAME}</td>
<td><input name='tfValue8' type='text' id='tfValue8' value='{LOGOFFTIME_VALUE}'></td>
<td><img src="{IMAGE_PATH}tip.gif" alt="{LANG_HELP}" title="{LANG_HELP}" width="18" height="18" onclick="dialoginit('settings','txtLogoff','all','Info')" class="infobutton_1"></td>
</tr>
<tr>
<td>{WSAUTH_NAME}*</td>
<td>
<select name="selValue3" class="selectbordermust inpmust">
<option class="inpmust" value="0" {WSAUTH_0_SELECTED}>NagiosQL</option>
<option class="inpmust" value="1" {WSAUTH_1_SELECTED}>Apache</option>
</select>
</td>
<td><img src="{IMAGE_PATH}tip.gif" alt="{LANG_HELP}" title="{LANG_HELP}" width="18" height="18" onclick="dialoginit('settings','selWSAuth','all','Info')" class="infobutton_1"></td>
</tr>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td colspan="3"><b>{COMMON}</b></td>
</tr>
<tr>
<td>{PAGELINES_NAME}</td>
<td><input name='tfValue9' type='text' id='tfValue9' value='{PAGELINES_VALUE}'></td>
<td><img src="{IMAGE_PATH}tip.gif" alt="{LANG_HELP}" title="{LANG_HELP}" width="18" height="18" onclick="dialoginit('settings','txtLines','all','Info')" class="infobutton_1"></td>
</tr>
<tr>
<td>{SELDISABLE_NAME}</td>
<td>
<select name="selValue4" class="selectborder">
<option value="1" {SELDISABLE_1_SELECTED}>NagiosQL 3</option>
<option value="0" {SELDISABLE_0_SELECTED}>NagiosQL 2</option>
</select>
</td>
<td><img src="{IMAGE_PATH}tip.gif" alt="{LANG_HELP}" title="{LANG_HELP}" width="18" height="18" onclick="dialoginit('settings','selSeldisable','all','Info')" class="infobutton_1"></td>
</tr>
<tr>
<td>{TEMPLATE_CHECK}</td>
<td>
<input type="radio" name="radValue1" value="1" {TPL_CHECK_1_CHECKED}><div style="float:left; padding:3px; padding-right:8px;">{LANG_ENABLE}</div>
<input type="radio" name="radValue1" value="0" {TPL_CHECK_0_CHECKED}><div style="float:left; padding:3px;">{LANG_DISABLE}</div>
</td>
<td><img src="{IMAGE_PATH}tip.gif" alt="{LANG_HELP}" title="{LANG_HELP}" width="18" height="18" onclick="dialoginit('settings','templatecheck','all','Info')" class="infobutton_1"></td>
</tr>
<tr>
<td>{UPDATE_CHECK}</td>
<td>
<input type="radio" name="radValue2" value="1" {UPD_CHECK_1_CHECKED} onClick="showFields(this.name,this.value)"><div style="float:left;padding:3px; padding-right:8px;">{LANG_ENABLE}</div>
<input type="radio" name="radValue2" value="0" {UPD_CHECK_0_CHECKED} onClick="showFields(this.name,this.value)"><div style="float:left;padding:3px;">{LANG_DISABLE}</div>
</td>
<td><img src="{IMAGE_PATH}tip.gif" alt="{LANG_HELP}" title="{LANG_HELP}" width="18" height="18" onclick="dialoginit('settings','updatecheck','all','Info')" class="infobutton_1"></td>
</tr>
<tr id="Proxy" class="{CLASS_NAME_1}">
<td>{UPD_PROXY_CHECK}</td>
<td>
<input type="radio" name="radValue3" value="1" {UPD_PROXY_1_CHECKED} onClick="showFields(this.name,this.value)"><div style="float:left; padding:3px; padding-right:8px;">{LANG_ENABLE}</div>
<input type="radio" name="radValue3" value="0" {UPD_PROXY_0_CHECKED} onClick="showFields(this.name,this.value)"><div style="float:left; padding:3px;">{LANG_DISABLE}</div>
</td>
<td><img src="{IMAGE_PATH}tip.gif" alt="{LANG_HELP}" title="{LANG_HELP}" width="18" height="18" onclick="dialoginit('settings','chkUpdProxy','all','Info')" class="infobutton_1"></td>
</tr>
<tr id="ProxyServer" class="{CLASS_NAME_2}">
<td>{UPD_PROXY_SERVER} *</td>
<td><input name='tfValue10' class="inpmust" type='text' id='tfValue10' value='{UPD_PROXY_SERVER_VALUE}'></td>
<td><img src="{IMAGE_PATH}tip.gif" alt="{LANG_HELP}" title="{LANG_HELP}" width="18" height="18" onclick="dialoginit('settings','txtProxyServer','all','Info')" class="infobutton_1"></td>
</tr>
<tr id="ProxyUser" class="{CLASS_NAME_2}">
<td>{UPD_PROXY_USERNAME}</td>
<td><input name='tfValue11' type='text' id='tfValue11' value='{UPD_PROXY_USERNAME_VALUE}'></td>
<td><img src="{IMAGE_PATH}tip.gif" alt="{LANG_HELP}" title="{LANG_HELP}" width="18" height="18" onclick="dialoginit('settings','txtProxyUser','all','Info')" class="infobutton_1"></td>
</tr>
<tr id="ProxyPasswd" class="{CLASS_NAME_2}">
<td>{UPD_PROXY_PASSWORD}</td>
<td><input name='tfValue12' type='password' id='tfValue12' value='{UPD_PROXY_PASSWORD_VALUE}'></td>
<td><img src="{IMAGE_PATH}tip.gif" alt="{LANG_HELP}" title="{LANG_HELP}" width="18" height="18" onclick="dialoginit('settings','txtProxyPasswd','all','Info')" class="infobutton_1"></td>
</tr>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td colspan="3"><input name="subForm" type="button" id="subForm" value="{LANG_SAVE}" onClick="LockButton()" {ADD_CONTROL}>&nbsp;<input name="subAbort" type="button" id="subAbort" onClick="abort()" value="{LANG_ABORT}"><span class="required_info">* {LANG_REQUIRED}</span></td>
</tr>
</table>
</form>
<br>
<p><span class="redmessage">{ERRORMESSAGE}</span><span class="greenmessage">{INFOMESSAGE}</span></p>
</div>
<div id="msgcontainer"></div>
<div id="infodialog">
<div id="dialogcontent" class="bd"></div>
</div>
<!-- END settingssite -->