Added admin panel for message parsers

This commit is contained in:
Andre Lorbach 2008-10-10 16:11:14 +02:00
parent 033120334f
commit 362c5ca032
15 changed files with 645 additions and 38 deletions

321
src/admin/parsers.php Normal file
View File

@ -0,0 +1,321 @@
<?php
/*
*********************************************************************
* phpLogCon - http://www.phplogcon.org
* -----------------------------------------------------------------
* Search Admin File
*
* -> Helps administrating message parsers
*
* All directives are explained within this file
*
* Copyright (C) 2008 Adiscon GmbH.
*
* This file is part of phpLogCon.
*
* PhpLogCon is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PhpLogCon is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with phpLogCon. If not, see <http://www.gnu.org/licenses/>.
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution
*********************************************************************
*/
// *** Default includes and procedures *** //
define('IN_PHPLOGCON', true);
$gl_root_path = './../';
// Now include necessary include files!
include($gl_root_path . 'include/functions_common.php');
include($gl_root_path . 'include/functions_frontendhelpers.php');
include($gl_root_path . 'include/functions_filters.php');
// Set PAGE to be ADMINPAGE!
define('IS_ADMINPAGE', true);
$content['IS_ADMINPAGE'] = true;
InitPhpLogCon();
InitSourceConfigs();
InitFrontEndDefaults(); // Only in WebFrontEnd
InitFilterHelpers(); // Helpers for frontend filtering!
// Init admin langauge file now!
IncludeLanguageFile( $gl_root_path . '/lang/' . $LANG . '/admin.php' );
// ---
// --- BEGIN Custom Code
if ( isset($_GET['op']) )
{
if ($_GET['op'] == "add")
{
// Set Mode to add
$content['ISEDITORNEWSEARCH'] = "true";
$content['SEARCH_FORMACTION'] = "addnewsearch";
$content['SEARCH_SENDBUTTON'] = $content['LN_SEARCH_ADD'];
//PreInit these values
$content['DisplayName'] = "";
$content['SearchQuery'] = "";
// General stuff
$content['userid'] = null;
$content['CHECKED_ISUSERONLY'] = "";
$content['SEARCHID'] = "";
// --- Check if groups are available
$content['SUBGROUPS'] = GetGroupsForSelectfield();
if ( is_array($content['SUBGROUPS']) )
$content['ISGROUPSAVAILABLE'] = true;
else
$content['ISGROUPSAVAILABLE'] = false;
}
else if ($_GET['op'] == "edit")
{
// Set Mode to edit
$content['ISEDITORNEWSEARCH'] = "true";
$content['SEARCH_FORMACTION'] = "editsearch";
$content['SEARCH_SENDBUTTON'] = $content['LN_SEARCH_EDIT'];
if ( isset($_GET['id']) )
{
//PreInit these values
$content['SEARCHID'] = DB_RemoveBadChars($_GET['id']);
$sqlquery = "SELECT * " .
" FROM " . DB_SEARCHES .
" WHERE ID = " . $content['SEARCHID'];
$result = DB_Query($sqlquery);
$mysearch = DB_GetSingleRow($result, true);
if ( isset($mysearch['DisplayName']) )
{
$content['SEARCHID'] = $mysearch['ID'];
$content['DisplayName'] = $mysearch['DisplayName'];
$content['SearchQuery'] = $mysearch['SearchQuery'];
if ( $mysearch['userid'] != null )
$content['CHECKED_ISUSERONLY'] = "checked";
else
$content['CHECKED_ISUSERONLY'] = "";
// --- Check if groups are available
$content['SUBGROUPS'] = GetGroupsForSelectfield();
if ( is_array($content['SUBGROUPS']) )
{
// Process All Groups
for($i = 0; $i < count($content['SUBGROUPS']); $i++)
{
if ( $mysearch['groupid'] != null && $content['SUBGROUPS'][$i]['mygroupid'] == $mysearch['groupid'] )
$content['SUBGROUPS'][$i]['group_selected'] = "selected";
else
$content['SUBGROUPS'][$i]['group_selected'] = "";
}
// Enable Group Selection
$content['ISGROUPSAVAILABLE'] = true;
}
else
$content['ISGROUPSAVAILABLE'] = false;
// ---
}
else
{
$content['ISEDITORNEWSEARCH'] = false;
$content['ISERROR'] = true;
$content['ERROR_MSG'] = GetAndReplaceLangStr( $content['LN_SEARCH_ERROR_IDNOTFOUND'], $content['SEARCHID'] );
}
}
else
{
$content['ISEDITORNEWSEARCH'] = false;
$content['ISERROR'] = true;
$content['ERROR_MSG'] = $content['LN_SEARCH_ERROR_INVALIDID'];
}
}
else if ($_GET['op'] == "delete")
{
if ( isset($_GET['id']) )
{
//PreInit these values
$content['SEARCHID'] = DB_RemoveBadChars($_GET['id']);
// Get UserInfo
$result = DB_Query("SELECT DisplayName FROM " . DB_SEARCHES . " WHERE ID = " . $content['SEARCHID'] );
$myrow = DB_GetSingleRow($result, true);
if ( !isset($myrow['DisplayName']) )
{
$content['ISERROR'] = true;
$content['ERROR_MSG'] = GetAndReplaceLangStr( $content['LN_SEARCH_ERROR_IDNOTFOUND'], $content['SEARCHID'] );
}
// --- Ask for deletion first!
if ( (!isset($_GET['verify']) || $_GET['verify'] != "yes") )
{
// This will print an additional secure check which the user needs to confirm and exit the script execution.
PrintSecureUserCheck( GetAndReplaceLangStr( $content['LN_SEARCH_WARNDELETESEARCH'], $myrow['DisplayName'] ), $content['LN_DELETEYES'], $content['LN_DELETENO'] );
}
// ---
// do the delete!
$result = DB_Query( "DELETE FROM " . DB_SEARCHES . " WHERE ID = " . $content['SEARCHID'] );
if ($result == FALSE)
{
$content['ISERROR'] = true;
$content['ERROR_MSG'] = GetAndReplaceLangStr( $content['LN_SEARCH_ERROR_DELSEARCH'], $content['SEARCHID'] );
}
else
DB_FreeQuery($result);
// Do the final redirect
RedirectResult( GetAndReplaceLangStr( $content['LN_SEARCH_ERROR_HASBEENDEL'], $myrow['DisplayName'] ) , "searches.php" );
}
else
{
$content['ISERROR'] = true;
$content['ERROR_MSG'] = $content['LN_SEARCH_ERROR_INVALIDID'];
}
}
}
if ( isset($_POST['op']) )
{
if ( isset ($_POST['id']) ) { $content['SEARCHID'] = intval(DB_RemoveBadChars($_POST['id'])); } else {$content['SEARCHID'] = -1; }
if ( isset ($_POST['DisplayName']) ) { $content['DisplayName'] = DB_RemoveBadChars($_POST['DisplayName']); } else {$content['DisplayName'] = ""; }
if ( isset ($_POST['SearchQuery']) ) { $content['SearchQuery'] = DB_RemoveBadChars($_POST['SearchQuery']); } else {$content['SearchQuery'] = ""; }
// User & Group handeled specially
if ( isset ($_POST['isuseronly']) )
{
$content['userid'] = $content['SESSION_USERID'];
$content['groupid'] = "null"; // Either user or group not both!
}
else
{
$content['userid'] = "null";
if ( isset ($_POST['groupid']) && $_POST['groupid'] != -1 )
$content['groupid'] = intval($_POST['groupid']);
else
$content['groupid'] = "null";
}
// --- Check mandotary values
if ( $content['DisplayName'] == "" )
{
$content['ISERROR'] = true;
$content['ERROR_MSG'] = $content['LN_SEARCH_ERROR_DISPLAYNAMEEMPTY'];
}
else if ( $content['SearchQuery'] == "" )
{
$content['ISERROR'] = true;
$content['ERROR_MSG'] = $content['LN_SEARCH_ERROR_SEARCHQUERYEMPTY'];
}
// ---
if ( !isset($content['ISERROR']) )
{
// Everything was alright, so we go to the next step!
if ( $_POST['op'] == "addnewsearch" )
{
// Add custom search now!
$sqlquery = "INSERT INTO " . DB_SEARCHES . " (DisplayName, SearchQuery, userid, groupid)
VALUES ('" . $content['DisplayName'] . "',
'" . $content['SearchQuery'] . "',
" . $content['userid'] . ",
" . $content['groupid'] . "
)";
$result = DB_Query($sqlquery);
DB_FreeQuery($result);
// Do the final redirect
RedirectResult( GetAndReplaceLangStr( $content['LN_SEARCH_HASBEENADDED'], $content['DisplayName'] ) , "searches.php" );
}
else if ( $_POST['op'] == "editsearch" )
{
$result = DB_Query("SELECT ID FROM " . DB_SEARCHES . " WHERE ID = " . $content['SEARCHID']);
$myrow = DB_GetSingleRow($result, true);
if ( !isset($myrow['ID']) )
{
$content['ISERROR'] = true;
$content['ERROR_MSG'] = GetAndReplaceLangStr( $content['LN_SEARCH_ERROR_IDNOTFOUND'], $content['SEARCHID'] );
}
else
{
// Edit the Search Entry now!
$result = DB_Query("UPDATE " . DB_SEARCHES . " SET
DisplayName = '" . $content['DisplayName'] . "',
SearchQuery = '" . $content['SearchQuery'] . "',
userid = " . $content['userid'] . ",
groupid = " . $content['groupid'] . "
WHERE ID = " . $content['SEARCHID']);
DB_FreeQuery($result);
// Done redirect!
RedirectResult( GetAndReplaceLangStr( $content['LN_SEARCH_HASBEENEDIT'], $content['DisplayName']) , "searches.php" );
}
}
}
}
if ( !isset($_POST['op']) && !isset($_GET['op']) )
{
// Default Mode = List Searches
$content['LISTPARSERS'] = "true";
// Init List of Parsers
InitMessageParsers();
// $content['PARSERS'] = $content['Search'];
if ( isset($content['PARSERS']) )
{
$i = 0; // Help counter!
foreach ($content['PARSERS'] as &$myParsers )
{
// $mySearch['SearchQuery_Display'] = strlen($mySearch['SearchQuery']) > 25 ? substr($mySearch['SearchQuery'], 0, 25) . " ..." : $mySearch['SearchQuery'];
// Allow EDIT
// $mySearch['ActionsAllowed'] = true;
// Set if help link is enabled
if ( strlen($myParsers['ParserHelpArticle']) > 0 )
$myParsers['ParserHelpEnabled'] = true;
else
$myParsers['ParserHelpEnabled'] = false;
// --- Set CSS Class
if ( $i % 2 == 0 )
$myParsers['cssclass'] = "line1";
else
$myParsers['cssclass'] = "line2";
$i++;
// ---
}
}
else
{
$content['LISTPARSERS'] = "false";
$content['ISERROR'] = true;
$content['ERROR_MSG'] = $content['LN_PARSERS_ERROR_NOPARSERS'];
}
}
// --- END Custom Code
// --- BEGIN CREATE TITLE
$content['TITLE'] = InitPageTitle();
$content['TITLE'] .= " :: " . $content['LN_ADMINMENU_MSGPARSERSOPT'];
// --- END CREATE TITLE
// --- Parsen and Output
InitTemplateParser();
$page -> parser($content, "admin/admin_parsers.html");
$page -> output();
// ---
?>

View File

@ -45,7 +45,14 @@ require_once($gl_root_path . 'include/constants_logstream.php');
abstract class MsgParser{
// Public configuration properties
public $_MsgNormalize = 0; // If set to one, the msg will be reconstructed if successfully parsed before
// Public Information properties
public $_ClassName = 'Default Messageparser';
public $_ClassDescription = 'This is a placeholder for the message parser description!';
public $_ClassRequiredFields = null;
public $_ClassHelpArticle = "http://www.monitorware.com/en/Articles/";
/**
* ParseLine

View File

@ -48,7 +48,12 @@ require_once($gl_root_path . 'include/constants_logstream.php');
// ---
class MsgParser_apache2 extends MsgParser {
// protected $_arrProperties = null;
// Public Information properties
public $_ClassName = 'Apache 2 Combined Format';
public $_ClassDescription = 'Parses the combined logfile format from Apache2 webservers.';
public $_ClassRequiredFields = null;
public $_ClassHelpArticle = "http://www.monitorware.com/Common/en/Articles/setup_mwagent_webserverlogging_phplogcon_mysql.php";
// Constructor
public function MsgParser_apache2() {

View File

@ -48,7 +48,12 @@ require_once($gl_root_path . 'include/constants_logstream.php');
// ---
class MsgParser_apache2common extends MsgParser {
// protected $_arrProperties = null;
// Public Information properties
public $_ClassName = 'Apache 2 Common Format';
public $_ClassDescription = 'Parses the common logfile format from Apache2 webservers.';
public $_ClassRequiredFields = null;
public $_ClassHelpArticle = "http://www.monitorware.com/Common/en/Articles/setup_mwagent_webserverlogging_phplogcon_mysql.php";
// Constructor
public function MsgParser_apache2common() {

View File

@ -46,7 +46,12 @@ require_once($gl_root_path . 'include/constants_logstream.php');
// ---
class MsgParser_eventlog extends MsgParser {
// protected $_arrProperties = null;
// Public Information properties
public $_ClassName = 'Adiscon Eventlog Format';
public $_ClassDescription = 'This is a parser for a special format which can be created with Adiscon Eventreporter or MonitorWare Agent.';
public $_ClassRequiredFields = null;
public $_ClassHelpArticle = "http://www.monitorware.com/en/Articles/";
// Constructor
public function MsgParser_eventlog() {

View File

@ -46,7 +46,12 @@ require_once($gl_root_path . 'include/constants_logstream.php');
// ---
class MsgParser_iis extends MsgParser {
// protected $_arrProperties = null;
// Public Information properties
public $_ClassName = 'Microsoft IIS Weblogs';
public $_ClassDescription = 'Parses the common weblog format used by the Microsoft IIS webserver.';
public $_ClassRequiredFields = null;
public $_ClassHelpArticle = "http://www.monitorware.com/en/Articles/";
// Constructor
public function MsgParser_iis() {

View File

@ -69,7 +69,12 @@ require_once($gl_root_path . 'include/constants_logstream.php');
// ---
class MsgParser_wireless extends MsgParser {
// protected $_arrProperties = null;
// Public Information properties
public $_ClassName = 'Custom Wireless Logfiles';
public $_ClassDescription = 'Custom logfile parser for wireless access points.';
public $_ClassRequiredFields = null;
public $_ClassHelpArticle = "";
// Constructor
public function MsgParser_wireless() {

View File

@ -1406,6 +1406,74 @@ function GetConfigSetting($szSettingName, $szDefaultValue = "", $DesiredConfigLe
return $szDefaultValue;
}
/*
* Helper function to get all directory from a folder
*/
function list_directories($directory, $failOnError = true)
{
$result = array();
if ( !$directoryHandler = @opendir ($directory) )
{
if ( $failOnError )
DieWithFriendlyErrorMsg( "list_directories: directory \"$directory\" doesn't exist!");
else
return null;
}
while (false !== ($fileName = @readdir ($directoryHandler)))
{
if ( is_dir( $directory . $fileName ) && ( $fileName != "." && $fileName != ".." ))
@array_push ($result, $fileName);
}
if ( @count ($result) === 0 )
{
if ( $failOnError )
DieWithFriendlyErrorMsg( "list_directories: no directories in \"$directory\" found!");
else
return null;
}
else
{
sort ($result);
return $result;
}
}
/*
* Helper function to get all files from a directory
*/
function list_files($directory, $failOnError = true)
{
$result = array();
if ( !$directoryHandler = @opendir ($directory) )
{
if ( $failOnError )
DieWithFriendlyErrorMsg( "list_directories: directory \"$directory\" doesn't exist!");
else
return null;
}
while (false !== ($fileName = @readdir ($directoryHandler)))
{
if ( is_file( $directory . $fileName ) && ( $fileName != "." && $fileName != ".." ))
@array_push ($result, $fileName);
}
if ( @count ($result) === 0 )
{
if ( $failOnError )
DieWithFriendlyErrorMsg( "list_directories: no files in \"$directory\" found!");
else
return null;
}
else
{
sort ($result);
return $result;
}
}
/*
* Helper function to get the errorCode
*/

View File

@ -196,6 +196,83 @@ function InitSource(&$mysource)
}
}
/*
* This function reads and generates a list of available message parsers
*/
function InitMessageParsers()
{
global $content, $gl_root_path;
$szDirectory = $gl_root_path . 'classes/msgparsers/'; // msgparser.' . $szParser . '.class.php';
$aFiles = list_files($szDirectory, true);
if ( isset($aFiles) && count($aFiles) > 0 )
{
foreach( $aFiles as $myFile )
{
// Check if file is valid msg parser!
if ( preg_match("/msgparser\.(.*?)\.class\.php$/", $myFile, $out ) )
{
// Set ParserID!
$myParserID = $out[1];
// Check if parser file include exists
$szIncludeFile = $szDirectory . $myFile;
if ( file_exists($szIncludeFile) )
{
// Try to include
if ( @include_once($szIncludeFile) )
{
// Set ParserClassName
$szParserClass = "MsgParser_" . $myParserID;
/// echo $szParserClass . "<br>";
// Create Instance and get properties
$tmpParser = new $szParserClass(); // Create an instance
$szParserName = $tmpParser->_ClassName;
$szParserDescription = $tmpParser->_ClassDescription;
$szParserHelpArticle = $tmpParser->_ClassHelpArticle;
// check for required fields!
if ( $tmpParser->_ClassRequiredFields != null && count($tmpParser->_ClassRequiredFields) > 0 )
{
$bCustomFields = true;
$bCustomFieldList = $tmpParser->_ClassRequiredFields;
}
else
{
$bCustomFields = false;
$bCustomFieldList = null;
}
// Add entry to msg parser list!
$content['PARSERS'][] = array (
"ID" => $myParserID,
"DisplayName" => $szParserName,
"Description" => $szParserDescription,
"CustomFields" => $bCustomFields,
"CustomFieldsList" => $bCustomFieldList,
"ParserHelpArticle" => $szParserHelpArticle,
);
}
else
{
// DEBUG ERROR
}
}
else
{
// DEBUG ERROR
}
}
}
}
}
/*
* Init Source configs
*/
function InitSourceConfigs()
{
global $CFG, $content, $currentSourceID;

View File

@ -93,27 +93,6 @@ function CreateThemesList()
}
}
function list_directories($directory)
{
$result = array();
if (! $directoryHandler = @opendir ($directory))
DieWithFriendlyErrorMsg( "list_directories: directory \"$directory\" doesn't exist!");
while (false !== ($fileName = @readdir ($directoryHandler)))
{
if ( is_dir( $directory . $fileName ) && ( $fileName != "." && $fileName != ".." ))
@array_push ($result, $fileName);
}
if ( @count ($result) === 0 )
DieWithFriendlyErrorMsg( "list_directories: no directories in \"$directory\" found!");
else
{
sort ($result);
return $result;
}
}
function VerifyTheme( $newtheme )
{
global $gl_root_path;

View File

@ -29,14 +29,15 @@ global $content;
// Global Stuff
$content['LN_ADMINMENU_HOMEPAGE'] = "Back to Show Events";
$content['LN_ADMINMENU_GENOPT'] = "General Options";
$content['LN_ADMINMENU_GENOPT'] = "Preferences";
$content['LN_ADMINMENU_SOURCEOPT'] = "Sources";
$content['LN_ADMINMENU_VIEWSOPT'] = "Views";
$content['LN_ADMINMENU_SEARCHOPT'] = "Searches";
$content['LN_ADMINMENU_USEROPT'] = "User Options";
$content['LN_ADMINMENU_GROUPOPT'] = "Group Options";
$content['LN_ADMINMENU_USEROPT'] = "Users";
$content['LN_ADMINMENU_GROUPOPT'] = "Groups";
$content['LN_ADMINMENU_CHARTOPT'] = "Charts";
$content['LN_ADMINMENU_FIELDOPT'] = "Fields";
$content['LN_ADMINMENU_MSGPARSERSOPT'] = "Message Parsers";
$content['LN_ADMIN_CENTER'] = "Admin center";
$content['LN_ADMIN_UNKNOWNSTATE'] = "Unknown State";
$content['LN_ADMIN_ERROR_NOTALLOWED'] = "You are not allowed to access this page with your user level.";

View File

@ -29,14 +29,15 @@ global $content;
// Global Stuff
$content['LN_ADMINMENU_HOMEPAGE'] = "Back to Show Events";
$content['LN_ADMINMENU_GENOPT'] = "General Options";
$content['LN_ADMINMENU_GENOPT'] = "Preferences";
$content['LN_ADMINMENU_SOURCEOPT'] = "Sources";
$content['LN_ADMINMENU_VIEWSOPT'] = "Views";
$content['LN_ADMINMENU_SEARCHOPT'] = "Searches";
$content['LN_ADMINMENU_USEROPT'] = "User Options";
$content['LN_ADMINMENU_GROUPOPT'] = "Group Options";
$content['LN_ADMINMENU_USEROPT'] = "Users";
$content['LN_ADMINMENU_GROUPOPT'] = "Groups";
$content['LN_ADMINMENU_CHARTOPT'] = "Charts";
$content['LN_ADMINMENU_FIELDOPT'] = "Fields";
$content['LN_ADMINMENU_MSGPARSERSOPT'] = "Message Parsers";
$content['LN_ADMIN_CENTER'] = "Admin center";
$content['LN_ADMIN_UNKNOWNSTATE'] = "Unknown State";
$content['LN_ADMIN_ERROR_NOTALLOWED'] = "You are not allowed to access this page with your user level.";
@ -295,4 +296,31 @@ $content['LN_FILTER_TYPE_STRING'] = "String";
$content['LN_FILTER_TYPE_NUMBER'] = "Number";
$content['LN_FILTER_TYPE_DATE'] = "Date";
// Parser Options
$content['LN_PARSERS_EDIT'] = "Edit Message Parser";
$content['LN_PARSERS_DELETE'] = "Delete Message Parser";
$content['LN_PARSERS_ID'] = "Parser ID";
$content['LN_PARSERS_NAME'] = "Parser Name";
$content['LN_PARSERS_DESCRIPTION'] = "Short Description";
$content['LN_PARSERS_ERROR_NOPARSERS'] = "There were no valid message parsers found in your installation. ";
$content['LN_PARSERS_HELP'] = "Help";
$content['LN_PARSERS_'] = "";
$content['LN_PARSERS_'] = "";
$content['LN_PARSERS_'] = "";
$content['LN_PARSERS_'] = "";
$content['LN_PARSERS_'] = "";
$content['LN_PARSERS_'] = "";
$content['LN_PARSERS_'] = "";
$content['LN_PARSERS_'] = "";
$content['LN_PARSERS_'] = "";
$content['LN_PARSERS_'] = "";
$content['LN_PARSERS_'] = "";
$content['LN_PARSERS_'] = "";
$content['LN_PARSERS_'] = "";
$content['LN_PARSERS_'] = "";
$content['LN_PARSERS_'] = "";
$content['LN_PARSERS_'] = "";
$content['LN_PARSERS_'] = "";
?>

View File

@ -29,14 +29,15 @@ global $content;
// Global Stuff
$content['LN_ADMINMENU_HOMEPAGE'] = "Back to Show Events";
$content['LN_ADMINMENU_GENOPT'] = "General Options";
$content['LN_ADMINMENU_GENOPT'] = "Preferences";
$content['LN_ADMINMENU_SOURCEOPT'] = "Sources";
$content['LN_ADMINMENU_VIEWSOPT'] = "Views";
$content['LN_ADMINMENU_SEARCHOPT'] = "Searches";
$content['LN_ADMINMENU_USEROPT'] = "User Options";
$content['LN_ADMINMENU_GROUPOPT'] = "Group Options";
$content['LN_ADMINMENU_USEROPT'] = "Users";
$content['LN_ADMINMENU_GROUPOPT'] = "Groups";
$content['LN_ADMINMENU_CHARTOPT'] = "Charts";
$content['LN_ADMINMENU_FIELDOPT'] = "Fields";
$content['LN_ADMINMENU_MSGPARSERSOPT'] = "Message Parsers";
$content['LN_ADMIN_CENTER'] = "Admin center";
$content['LN_ADMIN_UNKNOWNSTATE'] = "Unknown State";
$content['LN_ADMIN_ERROR_NOTALLOWED'] = "You are not allowed to access this page with your user level.";

View File

@ -3,16 +3,17 @@
<td class="topmenu2begin" nowrap align="center" width="16"><img align="left" src="{MENU_BULLET_BLUE}" width="16" height="16" vspace="0"></td>
<!-- <td class="topmenu2" nowrap align="center" width="150"><a class="topmenu1_link" href="{BASEPATH}index.php?" target="_top"><img align="left" src="{MENU_HOMEPAGE}" width="16" height="16" vspace="0">{LN_ADMINMENU_HOMEPAGE}</a></td>-->
<td class="topmenu2" nowrap align="center" width="125"><a class="topmenu1_link" href="{BASEPATH}admin/index.php" target="_top"><img align="left" src="{MENU_PREFERENCES}" width="16" height="16" vspace="0">{LN_ADMINMENU_GENOPT}</a></td>
<td class="topmenu2" nowrap align="center" width="100"><a class="topmenu1_link" href="{BASEPATH}admin/index.php" target="_top"><img align="left" src="{MENU_PREFERENCES}" width="16" height="16" vspace="0">{LN_ADMINMENU_GENOPT}</a></td>
<td class="topmenu2" nowrap align="center" width="80"><a class="topmenu1_link" href="{BASEPATH}admin/sources.php" target="_top"><img align="left" src="{MENU_DATAEDIT}" width="16" height="16" vspace="0">{LN_ADMINMENU_SOURCEOPT}</a></td>
<td class="topmenu2" nowrap align="center" width="80"><a class="topmenu1_link" href="{BASEPATH}admin/fields.php" target="_top"><img align="left" src="{MENU_FIELDS}" width="16" height="16" vspace="0">{LN_ADMINMENU_FIELDOPT}</a></td>
<td class="topmenu2" nowrap align="center" width="80"><a class="topmenu1_link" href="{BASEPATH}admin/views.php" target="_top"><img align="left" src="{MENU_DOCUMENTVIEW}" width="16" height="16" vspace="0">{LN_ADMINMENU_VIEWSOPT}</a></td>
<td class="topmenu2" nowrap align="center" width="80"><a class="topmenu1_link" href="{BASEPATH}admin/searches.php" target="_top"><img align="left" src="{MENU_TEXT_FIND}" width="16" height="16" vspace="0">{LN_ADMINMENU_SEARCHOPT}</a></td>
<td class="topmenu2" nowrap align="center" width="80"><a class="topmenu1_link" href="{BASEPATH}admin/charts.php" target="_top"><img align="left" src="{MENU_CHARTS}" width="16" height="16" vspace="0">{LN_ADMINMENU_CHARTOPT}</a></td>
<td class="topmenu2" nowrap align="center" width="125"><a class="topmenu1_link" href="{BASEPATH}admin/parsers.php" target="_top"><img align="left" src="{MENU_INTERNAL}" width="16" height="16" vspace="0">{LN_ADMINMENU_MSGPARSERSOPT}</a></td>
<!-- IF SESSION_ISADMIN="1" -->
<td class="topmenu2" nowrap align="center" width="110"><a class="topmenu1_link" href="{BASEPATH}admin/users.php" target="_top"><img align="left" src="{MENU_ADMINUSERS}" width="16" height="16" vspace="0">{LN_ADMINMENU_USEROPT}</a></td>
<td class="topmenu2" nowrap align="center" width="110"><a class="topmenu1_link" href="{BASEPATH}admin/groups.php" target="_top"><img align="left" src="{MENU_ADMINGROUPS}" width="16" height="16" vspace="0">{LN_ADMINMENU_GROUPOPT}</a></td>
<td class="topmenu2" nowrap align="center" width="80"><a class="topmenu1_link" href="{BASEPATH}admin/users.php" target="_top"><img align="left" src="{MENU_ADMINUSERS}" width="16" height="16" vspace="0">{LN_ADMINMENU_USEROPT}</a></td>
<td class="topmenu2" nowrap align="center" width="80"><a class="topmenu1_link" href="{BASEPATH}admin/groups.php" target="_top"><img align="left" src="{MENU_ADMINGROUPS}" width="16" height="16" vspace="0">{LN_ADMINMENU_GROUPOPT}</a></td>
<!-- ENDIF SESSION_ISADMIN="1" -->
<!-- IF SESSION_LOGGEDIN="true" -->

View File

@ -0,0 +1,99 @@
<!-- INCLUDE include_header.html -->
<!-- IF ISERROR="true" -->
<br><br>
<center>
<div class="table_with_border_second ErrorMsg" style="width:600px">
<div class="PriorityError">{LN_GEN_ERRORDETAILS}</div>
<p>{ERROR_MSG}</p>
</div>
<br><br>
<a href="javascript:history.back();" target="_top">{LN_GEN_ERRORRETURNPREV}</a>
</center>
<br><br>
<!-- ENDIF ISERROR="true" -->
<table width="100%" cellpadding="0" cellspacing="0" border="0" align="center" class="with_border">
<tr>
<td colspan="3" class="title" nowrap><B>{LN_SEARCH_CENTER}</B></td>
</tr>
<tr>
<td align="center" class="line2">
<br><br>
<!-- IF LISTPARSERS="true" -->
<table border="0" cellpadding="2" cellspacing="1" bgcolor="#DDDDDD" width="775" class="with_border_alternate">
<tr>
<td align="center" width="100" class="cellmenu1"><b>{LN_PARSERS_ID}</b></td>
<td align="center" width="200" class="cellmenu1"><b>{LN_PARSERS_NAME}</b></td>
<td align="center" width="300" class="cellmenu1"><b>{LN_PARSERS_DESCRIPTION}</b></td>
<td align="center" width="50" class="cellmenu1"><b>{LN_PARSERS_HELP}</b></td>
<td align="center" width="125" class="cellmenu1"><b>{LN_GEN_ACTIONS}</b></td>
</tr>
<!-- BEGIN PARSERS -->
<tr>
<td align="left" class="{cssclass}" valign="top"><b>{ID}</b></td>
<td align="left" class="{cssclass}" valign="top"><a href="{BASEPATH}admin/parsers.php?op=edit&id={ID}">{DisplayName}</a></td>
<td align="left" class="{cssclass}" valign="top">{Description}</td>
<td align="center" class="{cssclass}" valign="top">
<!-- IF ParserHelpEnabled="true" -->
<a href="{ParserHelpArticle}"><img src="{MENU_HELP}" width="16" title="{LN_PARSERS_HELP}"></a>
<!-- ENDIF ParserHelpEnabled="true" -->
</td>
<td align="center" class="{cssclass}">
&nbsp;<a href="{BASEPATH}admin/parsers.php?op=detailsedit&id={ID}"><img src="{MENU_EDIT}" width="16" title="{LN_PARSERS_EDIT}"></a>
&nbsp;<a href="{BASEPATH}admin/parsers.php?op=delete&id={ID}"><img src="{MENU_DELETE}" width="16" title="{LN_PARSERS_DELETE}"></a>
</td>
</tr>
<!-- END PARSERS -->
</table>
<!-- ENDIF LISTPARSERS="true" -->
<!-- IF ISEDITORNEWSEARCH="true" -->
<form action="{BASEPATH}admin/searches.php" method="post">
<table border="0" cellpadding="1" cellspacing="1" bgcolor="#DDDDDD" width="600" class="with_border_alternate">
<tr>
<td align="center" class="cellmenu1" colspan="2"><b>{LN_SEARCH_ADDEDIT}</b></td>
</tr>
<tr>
<td align="left" class="cellmenu2" width="250"><b>{LN_SEARCH_NAME}</b></td>
<td align="right" class="line1" width="350"><input type="text" name="DisplayName" size="55" maxlength="255" value="{DisplayName}"></td>
</tr>
<tr>
<td align="left" class="cellmenu2"><b>{LN_GEN_USERONLY}</b></td>
<td align="right" class="line2"><input type="text" name="SearchQuery" size="55" maxlength="1024" value="{SearchQuery}"></td>
</tr>
<tr>
<td align="left" class="cellmenu2"><b>{LN_GEN_USERONLY}</b></td>
<td align="right" class="line1"><input type="checkbox" name="isuseronly" value="{userid}" {CHECKED_ISUSERONLY}></td>
</tr>
<!-- IF ISGROUPSAVAILABLE="true" -->
<tr>
<td align="left" class="cellmenu2"><b>{LN_GEN_GROUPONLY}</b></td>
<td align="right" class="line2">
<select name="groupid" size="1" STYLE="width: 300px">
<!-- BEGIN SUBGROUPS -->
<option value="{mygroupid}" {group_selected}>{groupname}</option>
<!-- END SUBGROUPS -->
</select>
</td>
</tr>
<!-- ENDIF ISGROUPSAVAILABLE="true" -->
<tr>
<td align="center" colspan="2">
<input type="submit" value="{SEARCH_SENDBUTTON}">
<input type="hidden" name="op" value="{SEARCH_FORMACTION}">
<input type="hidden" name="id" value="{SEARCHID}">
</td>
</tr>
</table>
</form>
<!-- ENDIF ISEDITORNEWSEARCH="true" -->
<br><br>
</td>
</tr>
</table>
<!-- INCLUDE include_footer.html -->