Added option to control autoreload time in admin panel

This commit is contained in:
Andre Lorbach 2010-03-19 16:39:56 +01:00
parent 3013179143
commit dde066c1e1
8 changed files with 21 additions and 7 deletions

View File

@ -159,6 +159,7 @@ if ( isset($_POST['op']) )
if ( isset ($_POST['PopupMenuTimeout']) && is_numeric($_POST['PopupMenuTimeout']) ) { $content['PopupMenuTimeout'] = $_POST['PopupMenuTimeout']; } if ( isset ($_POST['PopupMenuTimeout']) && is_numeric($_POST['PopupMenuTimeout']) ) { $content['PopupMenuTimeout'] = $_POST['PopupMenuTimeout']; }
if ( isset ($_POST['ViewEntriesPerPage']) && is_numeric($_POST['ViewEntriesPerPage']) ) { $content['ViewEntriesPerPage'] = $_POST['ViewEntriesPerPage']; } if ( isset ($_POST['ViewEntriesPerPage']) && is_numeric($_POST['ViewEntriesPerPage']) ) { $content['ViewEntriesPerPage'] = $_POST['ViewEntriesPerPage']; }
if ( isset ($_POST['ViewEnableAutoReloadSeconds']) && is_numeric($_POST['ViewEnableAutoReloadSeconds']) ) { $content['ViewEnableAutoReloadSeconds'] = $_POST['ViewEnableAutoReloadSeconds']; } if ( isset ($_POST['ViewEnableAutoReloadSeconds']) && is_numeric($_POST['ViewEnableAutoReloadSeconds']) ) { $content['ViewEnableAutoReloadSeconds'] = $_POST['ViewEnableAutoReloadSeconds']; }
if ( isset ($_POST['AdminChangeWaitTime']) && is_numeric($_POST['AdminChangeWaitTime']) ) { $content['AdminChangeWaitTime'] = $_POST['AdminChangeWaitTime']; }
if ( isset ($_POST['MiscMaxExecutionTime']) && is_numeric($_POST['MiscMaxExecutionTime']) ) { $content['MiscMaxExecutionTime'] = $_POST['MiscMaxExecutionTime']; } if ( isset ($_POST['MiscMaxExecutionTime']) && is_numeric($_POST['MiscMaxExecutionTime']) ) { $content['MiscMaxExecutionTime'] = $_POST['MiscMaxExecutionTime']; }
// Read Text fields // Read Text fields
@ -213,6 +214,7 @@ if ( isset($_POST['op']) )
if ( isset ($_POST['User_PopupMenuTimeout']) && is_numeric($_POST['User_PopupMenuTimeout']) ) { $USERCFG['PopupMenuTimeout'] = $_POST['User_PopupMenuTimeout']; } if ( isset ($_POST['User_PopupMenuTimeout']) && is_numeric($_POST['User_PopupMenuTimeout']) ) { $USERCFG['PopupMenuTimeout'] = $_POST['User_PopupMenuTimeout']; }
if ( isset ($_POST['User_ViewEntriesPerPage']) && is_numeric($_POST['User_ViewEntriesPerPage']) ) { $USERCFG['ViewEntriesPerPage'] = $_POST['User_ViewEntriesPerPage']; } if ( isset ($_POST['User_ViewEntriesPerPage']) && is_numeric($_POST['User_ViewEntriesPerPage']) ) { $USERCFG['ViewEntriesPerPage'] = $_POST['User_ViewEntriesPerPage']; }
if ( isset ($_POST['User_ViewEnableAutoReloadSeconds']) && is_numeric($_POST['User_ViewEnableAutoReloadSeconds']) ) { $USERCFG['ViewEnableAutoReloadSeconds'] = $_POST['User_ViewEnableAutoReloadSeconds']; } if ( isset ($_POST['User_ViewEnableAutoReloadSeconds']) && is_numeric($_POST['User_ViewEnableAutoReloadSeconds']) ) { $USERCFG['ViewEnableAutoReloadSeconds'] = $_POST['User_ViewEnableAutoReloadSeconds']; }
if ( isset ($_POST['User_AdminChangeWaitTime']) && is_numeric($_POST['User_AdminChangeWaitTime']) ) { $USERCFG['AdminChangeWaitTime'] = $_POST['User_AdminChangeWaitTime']; }
// TODO!!!!!!!!!!!111111111 // TODO!!!!!!!!!!!111111111
// Read Text fields // Read Text fields
@ -233,6 +235,7 @@ if ( isset($_POST['op']) )
if ( !isset($content['SuppressDuplicatedMessages']) ) { $content['SuppressDuplicatedMessages'] = 0; } if ( !isset($content['SuppressDuplicatedMessages']) ) { $content['SuppressDuplicatedMessages'] = 0; }
if ( !isset($content['TreatNotFoundFiltersAsTrue']) ) { $content['TreatNotFoundFiltersAsTrue'] = 0; } if ( !isset($content['TreatNotFoundFiltersAsTrue']) ) { $content['TreatNotFoundFiltersAsTrue'] = 0; }
if ( !isset($content['InlineOnlineSearchIcons']) ) { $content['InlineOnlineSearchIcons'] = 1; } if ( !isset($content['InlineOnlineSearchIcons']) ) { $content['InlineOnlineSearchIcons'] = 1; }
if ( !isset($content['AdminChangeWaitTime']) ) { $content['AdminChangeWaitTime'] = 2; }
// Set checkbox States // Set checkbox States
if (isset($content['ViewUseTodayYesterday']) && $content['ViewUseTodayYesterday'] == 1) { $content['ViewUseTodayYesterday_checked'] = "checked"; } else { $content['ViewUseTodayYesterday_checked'] = ""; } if (isset($content['ViewUseTodayYesterday']) && $content['ViewUseTodayYesterday'] == 1) { $content['ViewUseTodayYesterday_checked'] = "checked"; } else { $content['ViewUseTodayYesterday_checked'] = ""; }
@ -329,6 +332,7 @@ if ( $content['ENABLEUSEROPTIONS'] )
$content['User_PopupMenuTimeout'] = GetConfigSetting('PopupMenuTimeout', $content['PopupMenuTimeout'], CFGLEVEL_USER); $content['User_PopupMenuTimeout'] = GetConfigSetting('PopupMenuTimeout', $content['PopupMenuTimeout'], CFGLEVEL_USER);
$content['User_ViewEntriesPerPage'] = GetConfigSetting('ViewEntriesPerPage', $content['ViewEntriesPerPage'], CFGLEVEL_USER); $content['User_ViewEntriesPerPage'] = GetConfigSetting('ViewEntriesPerPage', $content['ViewEntriesPerPage'], CFGLEVEL_USER);
$content['User_ViewEnableAutoReloadSeconds'] = GetConfigSetting('ViewEnableAutoReloadSeconds', $content['ViewEnableAutoReloadSeconds'], CFGLEVEL_USER); $content['User_ViewEnableAutoReloadSeconds'] = GetConfigSetting('ViewEnableAutoReloadSeconds', $content['ViewEnableAutoReloadSeconds'], CFGLEVEL_USER);
$content['User_AdminChangeWaitTime'] = GetConfigSetting('AdminChangeWaitTime', $content['AdminChangeWaitTime'], CFGLEVEL_USER);
$content['User_SearchCustomButtonCaption'] = GetConfigSetting('SearchCustomButtonCaption', $content['SearchCustomButtonCaption'], CFGLEVEL_USER); $content['User_SearchCustomButtonCaption'] = GetConfigSetting('SearchCustomButtonCaption', $content['SearchCustomButtonCaption'], CFGLEVEL_USER);
$content['User_SearchCustomButtonSearch'] = GetConfigSetting('SearchCustomButtonSearch', $content['SearchCustomButtonSearch'], CFGLEVEL_USER); $content['User_SearchCustomButtonSearch'] = GetConfigSetting('SearchCustomButtonSearch', $content['SearchCustomButtonSearch'], CFGLEVEL_USER);
// --- // ---

View File

@ -55,8 +55,8 @@ InitFilterHelpers(); // Helpers for frontend filtering!
// Init admin langauge file now! // Init admin langauge file now!
IncludeLanguageFile( $gl_root_path . '/lang/' . $LANG . '/admin.php' ); IncludeLanguageFile( $gl_root_path . '/lang/' . $LANG . '/admin.php' );
// Hardcoded atm // Configureable now!
$content['REDIRSECONDS'] = 2; $content['REDIRSECONDS'] = GetConfigSetting("AdminChangeWaitTime", 2, CFGLEVEL_USER);
// *** *** // // *** *** //
// --- CONTENT Vars // --- CONTENT Vars
@ -75,7 +75,7 @@ if ( isset($_GET['msg']) )
else else
$content['SZMSG'] = $content["LN_ADMIN_UNKNOWNSTATE"]; $content['SZMSG'] = $content["LN_ADMIN_UNKNOWNSTATE"];
$content['TITLE'] = "LogAnalyzer - Redirecting to '" . $content['SZREDIR'] . "' in 5 seconds"; // Title of the Page $content['TITLE'] = "LogAnalyzer - Redirecting to '" . $content['SZREDIR'] . "' in " . $content['REDIRSECONDS'] . " seconds"; // Title of the Page
// --- // ---
// --- Parsen and Output // --- Parsen and Output

View File

@ -1547,6 +1547,7 @@ function SaveGeneralSettingsIntoDB($bForceStripSlahes = false)
WriteConfigValue( "ViewStringCharacterLimit", true, null, null,$bForceStripSlahes ); WriteConfigValue( "ViewStringCharacterLimit", true, null, null,$bForceStripSlahes );
WriteConfigValue( "ViewEntriesPerPage", true, null, null,$bForceStripSlahes ); WriteConfigValue( "ViewEntriesPerPage", true, null, null,$bForceStripSlahes );
WriteConfigValue( "ViewEnableAutoReloadSeconds", true, null, null,$bForceStripSlahes ); WriteConfigValue( "ViewEnableAutoReloadSeconds", true, null, null,$bForceStripSlahes );
WriteConfigValue( "AdminChangeWaitTime", true, null, null,$bForceStripSlahes );
WriteConfigValue( "PopupMenuTimeout", true, null, null,$bForceStripSlahes ); WriteConfigValue( "PopupMenuTimeout", true, null, null,$bForceStripSlahes );
WriteConfigValue( "PrependTitle", true, null, null,$bForceStripSlahes ); WriteConfigValue( "PrependTitle", true, null, null,$bForceStripSlahes );
@ -1591,6 +1592,7 @@ function SaveUserGeneralSettingsIntoDB()
WriteConfigValue( "ViewStringCharacterLimit", false, $content['SESSION_USERID'] ); WriteConfigValue( "ViewStringCharacterLimit", false, $content['SESSION_USERID'] );
WriteConfigValue( "ViewEntriesPerPage", false, $content['SESSION_USERID'] ); WriteConfigValue( "ViewEntriesPerPage", false, $content['SESSION_USERID'] );
WriteConfigValue( "ViewEnableAutoReloadSeconds", false, $content['SESSION_USERID'] ); WriteConfigValue( "ViewEnableAutoReloadSeconds", false, $content['SESSION_USERID'] );
WriteConfigValue( "AdminChangeWaitTime", false, $content['SESSION_USERID'] );
WriteConfigValue( "PopupMenuTimeout", false, $content['SESSION_USERID'] ); WriteConfigValue( "PopupMenuTimeout", false, $content['SESSION_USERID'] );
WriteConfigValue( "PrependTitle", false, $content['SESSION_USERID'] ); WriteConfigValue( "PrependTitle", false, $content['SESSION_USERID'] );

View File

@ -79,6 +79,7 @@ $content['LN_GEN_MSGCHARLIMIT'] = "Anzahl der Zeichen im Meldungsfenster in der
$content['LN_GEN_STRCHARLIMIT'] = "Anzahl der Zeichen in Feldern"; $content['LN_GEN_STRCHARLIMIT'] = "Anzahl der Zeichen in Feldern";
$content['LN_GEN_ENTRIESPERPAGE'] = "Anzahl der Zeilen pro Seite"; $content['LN_GEN_ENTRIESPERPAGE'] = "Anzahl der Zeilen pro Seite";
$content['LN_GEN_AUTORELOADSECONDS'] = "Ermögliche automatisches neu laden der Seite nach Sekunden"; $content['LN_GEN_AUTORELOADSECONDS'] = "Ermögliche automatisches neu laden der Seite nach Sekunden";
$content['LN_GEN_ADMINCHANGEWAITTIME'] = "Reloadtime in Adminpanel";
$content['LN_GEN_IPADRRESOLVE'] = "Ermitteln der IP-Adresse durch DNS-Abfragen"; $content['LN_GEN_IPADRRESOLVE'] = "Ermitteln der IP-Adresse durch DNS-Abfragen";
$content['LN_GEN_CUSTBTNCAPT'] = "Benutzerdefinierte Such-Titel"; $content['LN_GEN_CUSTBTNCAPT'] = "Benutzerdefinierte Such-Titel";
$content['LN_GEN_CUSTBTNSRCH'] = "Benutzerdefinierte Such-Zeichenfolge"; $content['LN_GEN_CUSTBTNSRCH'] = "Benutzerdefinierte Such-Zeichenfolge";
@ -92,7 +93,6 @@ $content['LN_GEN_DEFSOURCE'] = "Standard Quelle";
$content['LN_GEN_SUPPRESSDUPMSG'] = "Doppelte Meldungen nur einmal anzeigen"; $content['LN_GEN_SUPPRESSDUPMSG'] = "Doppelte Meldungen nur einmal anzeigen";
$content['LN_GEN_TREATFILTERSTRUE'] = "Treat filters of not found fields as true"; $content['LN_GEN_TREATFILTERSTRUE'] = "Treat filters of not found fields as true";
$content['LN_GEN_INLINESEARCHICONS'] = "Show Onlinesearch icons within fields"; $content['LN_GEN_INLINESEARCHICONS'] = "Show Onlinesearch icons within fields";
$content['LN_GEN_OPTIONNAME'] = "Option Name"; $content['LN_GEN_OPTIONNAME'] = "Option Name";
$content['LN_GEN_GLOBALVALUE'] = "Globale Werte"; $content['LN_GEN_GLOBALVALUE'] = "Globale Werte";
$content['LN_GEN_PERSONALVALUE'] = "Persönliche (benutzerbezogene)Werte"; $content['LN_GEN_PERSONALVALUE'] = "Persönliche (benutzerbezogene)Werte";

View File

@ -79,6 +79,7 @@ $content['LN_GEN_MSGCHARLIMIT'] = "Character limit of the message in main view";
$content['LN_GEN_STRCHARLIMIT'] = "Character display limit for all string type fields"; $content['LN_GEN_STRCHARLIMIT'] = "Character display limit for all string type fields";
$content['LN_GEN_ENTRIESPERPAGE'] = "Number of entries per page"; $content['LN_GEN_ENTRIESPERPAGE'] = "Number of entries per page";
$content['LN_GEN_AUTORELOADSECONDS'] = "Enable autoreload after seconds"; $content['LN_GEN_AUTORELOADSECONDS'] = "Enable autoreload after seconds";
$content['LN_GEN_ADMINCHANGEWAITTIME'] = "Reloadtime in Adminpanel";
$content['LN_GEN_IPADRRESOLVE'] = "Resolve IP Addresses using DNS"; $content['LN_GEN_IPADRRESOLVE'] = "Resolve IP Addresses using DNS";
$content['LN_GEN_CUSTBTNCAPT'] = "Custom search caption"; $content['LN_GEN_CUSTBTNCAPT'] = "Custom search caption";
$content['LN_GEN_CUSTBTNSRCH'] = "Custom search string"; $content['LN_GEN_CUSTBTNSRCH'] = "Custom search string";
@ -92,7 +93,6 @@ $content['LN_GEN_DEFSOURCE'] = "Default selected source";
$content['LN_GEN_SUPPRESSDUPMSG'] = "Suppress duplicated messages"; $content['LN_GEN_SUPPRESSDUPMSG'] = "Suppress duplicated messages";
$content['LN_GEN_TREATFILTERSTRUE'] = "Treat filters of not found fields as true"; $content['LN_GEN_TREATFILTERSTRUE'] = "Treat filters of not found fields as true";
$content['LN_GEN_INLINESEARCHICONS'] = "Show Onlinesearch icons within fields"; $content['LN_GEN_INLINESEARCHICONS'] = "Show Onlinesearch icons within fields";
$content['LN_GEN_OPTIONNAME'] = "Option name"; $content['LN_GEN_OPTIONNAME'] = "Option name";
$content['LN_GEN_GLOBALVALUE'] = "Global value"; $content['LN_GEN_GLOBALVALUE'] = "Global value";
$content['LN_GEN_PERSONALVALUE'] = "Personal (User)value"; $content['LN_GEN_PERSONALVALUE'] = "Personal (User)value";

View File

@ -79,6 +79,7 @@ $content['LN_GEN_MSGCHARLIMIT'] = "Character limit of the message in main view";
$content['LN_GEN_STRCHARLIMIT'] = "Character display limit for all string type fields"; $content['LN_GEN_STRCHARLIMIT'] = "Character display limit for all string type fields";
$content['LN_GEN_ENTRIESPERPAGE'] = "Number of entries per page"; $content['LN_GEN_ENTRIESPERPAGE'] = "Number of entries per page";
$content['LN_GEN_AUTORELOADSECONDS'] = "Enable autoreload after seconds"; $content['LN_GEN_AUTORELOADSECONDS'] = "Enable autoreload after seconds";
$content['LN_GEN_ADMINCHANGEWAITTIME'] = "Reloadtime in Adminpanel";
$content['LN_GEN_IPADRRESOLVE'] = "Resolve IP Addresses using DNS"; $content['LN_GEN_IPADRRESOLVE'] = "Resolve IP Addresses using DNS";
$content['LN_GEN_CUSTBTNCAPT'] = "Custom search caption"; $content['LN_GEN_CUSTBTNCAPT'] = "Custom search caption";
$content['LN_GEN_CUSTBTNSRCH'] = "Custom search string"; $content['LN_GEN_CUSTBTNSRCH'] = "Custom search string";
@ -92,7 +93,6 @@ $content['LN_GEN_DEFSOURCE'] = "Default selected source";
$content['LN_GEN_SUPPRESSDUPMSG'] = "Suppress duplicated messages"; $content['LN_GEN_SUPPRESSDUPMSG'] = "Suppress duplicated messages";
$content['LN_GEN_TREATFILTERSTRUE'] = "Treat filters of not found fields as true"; $content['LN_GEN_TREATFILTERSTRUE'] = "Treat filters of not found fields as true";
$content['LN_GEN_INLINESEARCHICONS'] = "Show Onlinesearch icons within fields"; $content['LN_GEN_INLINESEARCHICONS'] = "Show Onlinesearch icons within fields";
$content['LN_GEN_OPTIONNAME'] = "Option name"; $content['LN_GEN_OPTIONNAME'] = "Option name";
$content['LN_GEN_GLOBALVALUE'] = "Global value"; $content['LN_GEN_GLOBALVALUE'] = "Global value";
$content['LN_GEN_PERSONALVALUE'] = "Personal (User)value"; $content['LN_GEN_PERSONALVALUE'] = "Personal (User)value";

View File

@ -79,6 +79,7 @@ $content['LN_GEN_MSGCHARLIMIT'] = "Character limit of the message in main view";
$content['LN_GEN_STRCHARLIMIT'] = "Character display limit for all string type fields"; $content['LN_GEN_STRCHARLIMIT'] = "Character display limit for all string type fields";
$content['LN_GEN_ENTRIESPERPAGE'] = "Number of entries per page"; $content['LN_GEN_ENTRIESPERPAGE'] = "Number of entries per page";
$content['LN_GEN_AUTORELOADSECONDS'] = "Enable autoreload after seconds"; $content['LN_GEN_AUTORELOADSECONDS'] = "Enable autoreload after seconds";
$content['LN_GEN_ADMINCHANGEWAITTIME'] = "Reloadtime in Adminpanel";
$content['LN_GEN_IPADRRESOLVE'] = "Resolve IP Addresses using DNS"; $content['LN_GEN_IPADRRESOLVE'] = "Resolve IP Addresses using DNS";
$content['LN_GEN_CUSTBTNCAPT'] = "Custom search caption"; $content['LN_GEN_CUSTBTNCAPT'] = "Custom search caption";
$content['LN_GEN_CUSTBTNSRCH'] = "Custom search string"; $content['LN_GEN_CUSTBTNSRCH'] = "Custom search string";
@ -92,7 +93,6 @@ $content['LN_GEN_DEFSOURCE'] = "Default selected source";
$content['LN_GEN_SUPPRESSDUPMSG'] = "Suppress duplicated messages"; $content['LN_GEN_SUPPRESSDUPMSG'] = "Suppress duplicated messages";
$content['LN_GEN_TREATFILTERSTRUE'] = "Treat filters of not found fields as true"; $content['LN_GEN_TREATFILTERSTRUE'] = "Treat filters of not found fields as true";
$content['LN_GEN_INLINESEARCHICONS'] = "Show Onlinesearch icons within fields"; $content['LN_GEN_INLINESEARCHICONS'] = "Show Onlinesearch icons within fields";
$content['LN_GEN_OPTIONNAME'] = "Option name"; $content['LN_GEN_OPTIONNAME'] = "Option name";
$content['LN_GEN_GLOBALVALUE'] = "Global value"; $content['LN_GEN_GLOBALVALUE'] = "Global value";
$content['LN_GEN_PERSONALVALUE'] = "Personal (User)value"; $content['LN_GEN_PERSONALVALUE'] = "Personal (User)value";

View File

@ -160,6 +160,14 @@
<td align="right" class="line1" ><input type="text" name="User_ViewEnableAutoReloadSeconds" size="16" maxlength="12" value="{User_ViewEnableAutoReloadSeconds}"></td> <td align="right" class="line1" ><input type="text" name="User_ViewEnableAutoReloadSeconds" size="16" maxlength="12" value="{User_ViewEnableAutoReloadSeconds}"></td>
<!-- ENDIF ENABLEUSEROPTIONS="true" --> <!-- ENDIF ENABLEUSEROPTIONS="true" -->
</tr> </tr>
<tr>
<td align="left" class="cellmenu2" nowrap><b>{LN_GEN_ADMINCHANGEWAITTIME}</b></td>
<td align="right" class="line1" ><input type="text" name="AdminChangeWaitTime" size="16" maxlength="12" value="{AdminChangeWaitTime}" {DISABLE_GLOBALEDIT_FORMCONTROL}></td>
<!-- IF ENABLEUSEROPTIONS="true" -->
<td align="right" class="line1" ><input type="text" name="User_AdminChangeWaitTime" size="16" maxlength="12" value="{User_AdminChangeWaitTime}"></td>
<!-- ENDIF ENABLEUSEROPTIONS="true" -->
</tr>
<tr> <tr>
<td align="left" class="cellmenu2" nowrap><b>{LN_GEN_POPUPMENUTIMEOUT}</b></td> <td align="left" class="cellmenu2" nowrap><b>{LN_GEN_POPUPMENUTIMEOUT}</b></td>
<td align="right" class="line1" ><input type="text" name="PopupMenuTimeout" size="16" maxlength="12" value="{PopupMenuTimeout}" {DISABLE_GLOBALEDIT_FORMCONTROL}></td> <td align="right" class="line1" ><input type="text" name="PopupMenuTimeout" size="16" maxlength="12" value="{PopupMenuTimeout}" {DISABLE_GLOBALEDIT_FORMCONTROL}></td>