Added Custom Search Admin page and logic to load the custom searches from the database

This commit is contained in:
Andre Lorbach 2008-07-17 17:29:35 +02:00
parent 2fabf173a9
commit 70c941dd64
11 changed files with 503 additions and 10 deletions

View File

@ -482,7 +482,7 @@ if ( !isset($_POST['op']) && !isset($_GET['op']) )
// --- BEGIN CREATE TITLE
$content['TITLE'] = InitPageTitle();
$content['TITLE'] .= " :: Group Options";
$content['TITLE'] .= " :: " . $content['LN_ADMINMENU_GROUPOPT'];
// --- END CREATE TITLE
// --- Parsen and Output

View File

@ -141,7 +141,7 @@ if ($content['DebugUserLogin'] == 1) { $content['DebugUserLogin_checked'] = "che
// --- BEGIN CREATE TITLE
$content['TITLE'] = InitPageTitle();
$content['TITLE'] .= " :: General Options";
$content['TITLE'] .= " :: " . $content['LN_ADMINMENU_GENOPT'];
// --- END CREATE TITLE
// --- Parsen and Output

362
src/admin/searches.php Normal file
View File

@ -0,0 +1,362 @@
<?php
/*
*********************************************************************
* phpLogCon - http://www.phplogcon.org
* -----------------------------------------------------------------
* User Admin File
*
* -> Helps administrating custom searches
*
* 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
// Only if the user is an admin!
//if ( !isset($_SESSION['SESSION_ISADMIN']) || $_SESSION['SESSION_ISADMIN'] == 0 )
// DieWithFriendlyErrorMsg( $content['LN_ADMIN_ERROR_NOTALLOWED'] );
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'] = "";
$content['userid'] = null;
$content['CHECKED_ISUSERONLY'] = "";
$content['SEARCHID'] = "";
// --- Check if groups are available
$sqlquery = "SELECT " .
DB_GROUPS . ".ID as mygroupid, " .
DB_GROUPS . ".groupname " .
"FROM " . DB_GROUPS .
" ORDER BY " . DB_GROUPS . ".groupname";
$result = DB_Query($sqlquery);
$content['SUBGROUPS'] = DB_GetAllRows($result, true);
if ( isset($content['SUBGROUPS']) && count($content['SUBGROUPS']) > 0 )
{
// Process All Groups
for($i = 0; $i < count($content['SUBGROUPS']); $i++)
$content['SUBGROUPS'][$i]['group_selected'] = "";
// Enable Group Selection
$content['ISGROUPSAVAILABLE'] = true;
array_unshift( $content['SUBGROUPS'], array ("mygroupid" => -1, "groupname" => $content['LN_SEARCH_SELGROUPENABLE'], "group_selected" => "") );
}
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
$sqlquery = "SELECT " .
DB_GROUPS . ".ID as mygroupid, " .
DB_GROUPS . ".groupname " .
"FROM " . DB_GROUPS .
" ORDER BY " . DB_GROUPS . ".groupname";
$result = DB_Query($sqlquery);
$content['SUBGROUPS'] = DB_GetAllRows($result, true);
if ( isset($content['SUBGROUPS']) && count($content['SUBGROUPS']) > 0 )
{
// 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;
array_unshift( $content['SUBGROUPS'], array ("mygroupid" => -1, "groupname" => $content['LN_SEARCH_SELGROUPENABLE'], "group_selected" => "") );
}
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['LISTSEARCHES'] = "true";
// Read all Serverentries
$sqlquery = "SELECT " .
DB_SEARCHES . ".ID, " .
DB_SEARCHES . ".DisplayName, " .
DB_SEARCHES . ".SearchQuery, " .
DB_SEARCHES . ".userid, " .
DB_SEARCHES . ".groupid, " .
DB_USERS . ".username, " .
DB_GROUPS . ".groupname " .
" FROM " . DB_SEARCHES .
" LEFT OUTER JOIN (" . DB_USERS . ", " . DB_GROUPS .
") ON (" .
DB_SEARCHES . ".userid=" . DB_USERS . ".ID AND " .
DB_SEARCHES . ".groupid=" . DB_GROUPS . ".ID " .
") " .
" ORDER BY " . DB_SEARCHES . ".userid, " . DB_SEARCHES . ".groupid, " . DB_SEARCHES . ".DisplayName";
//echo $sqlquery;
$result = DB_Query($sqlquery);
$content['SEARCHES'] = DB_GetAllRows($result, true);
// --- Process Users
for($i = 0; $i < count($content['SEARCHES']); $i++)
{
$content['SEARCHES'][$i]['SearchQuery_Display'] = strlen($content['SEARCHES'][$i]['SearchQuery']) > 25 ? substr($content['SEARCHES'][$i]['SearchQuery'], 0, 25) . " ..." : $content['SEARCHES'][$i]['SearchQuery'];
// --- Set Image for Type
if ( $content['SEARCHES'][$i]['userid'] != null )
{
$content['SEARCHES'][$i]['SearchTypeImage'] = $content["MENU_ADMINUSERS"];
$content['SEARCHES'][$i]['SearchTypeText'] = $content["LN_GEN_USERONLY"];
}
else if ( $content['SEARCHES'][$i]['groupid'] != null )
{
$content['SEARCHES'][$i]['SearchTypeImage'] = $content["MENU_ADMINGROUPS"];
$content['SEARCHES'][$i]['SearchTypeText'] = $content["LN_GEN_GROUPONLY"];
}
else
{
$content['SEARCHES'][$i]['SearchTypeImage'] = $content["MENU_GLOBAL"];
$content['SEARCHES'][$i]['SearchTypeText'] = $content["LN_GEN_GLOBAL"];
}
// ---
// --- Set CSS Class
if ( $i % 2 == 0 )
$content['SEARCHES'][$i]['cssclass'] = "line1";
else
$content['SEARCHES'][$i]['cssclass'] = "line2";
// ---
}
// ---
}
// --- END Custom Code
// --- BEGIN CREATE TITLE
$content['TITLE'] = InitPageTitle();
$content['TITLE'] .= " :: " . $content['LN_ADMINMENU_SEARCHOPT'];
// --- END CREATE TITLE
// --- Parsen and Output
InitTemplateParser();
$page -> parser($content, "admin/admin_searches.html");
$page -> output();
// ---
?>

View File

@ -371,7 +371,7 @@ if ( !isset($_POST['op']) && !isset($_GET['op']) )
// --- BEGIN CREATE TITLE
$content['TITLE'] = InitPageTitle();
$content['TITLE'] .= " :: User Options";
$content['TITLE'] .= " :: " . $content['LN_ADMINMENU_USEROPT'];
// --- END CREATE TITLE
// --- Parsen and Output

BIN
src/images/icons/earth.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 990 B

View File

@ -431,6 +431,7 @@ function InitFrontEndVariables()
$content['MENU_ADD'] = $content['BASEPATH'] . "images/icons/add.png";
$content['MENU_EDIT'] = $content['BASEPATH'] . "images/icons/edit.png";
$content['MENU_DELETE'] = $content['BASEPATH'] . "images/icons/delete.png";
$content['MENU_GLOBAL'] = $content['BASEPATH'] . "images/icons/earth.png";
$content['MENU_PAGER_BEGIN'] = $content['BASEPATH'] . "images/icons/media_beginning.png";
$content['MENU_PAGER_PREVIOUS'] = $content['BASEPATH'] . "images/icons/media_rewind.png";

View File

@ -306,7 +306,7 @@ function LoadSearchesFromDatabase()
// Create Where for USERID
if ( isset($content['SESSION_LOGGEDIN']) && $content['SESSION_LOGGEDIN'] )
$szWhereUser = " OR " . DB_SEARCHES . ".userid = " . $content['SESSION_USERID'];
$szWhereUser = " OR " . DB_SEARCHES . ".userid = " . $content['SESSION_USERID'] . " ";
else
$szWhereUser = "";
@ -317,15 +317,19 @@ function LoadSearchesFromDatabase()
$sqlquery = " SELECT * " .
" FROM " . DB_SEARCHES .
" WHERE userid = NULL " .
" WHERE (" . DB_SEARCHES . ".userid IS NULL AND " . DB_SEARCHES . ".groupid IS NULL) " .
$szWhereUser .
$szGroupWhere .
" ORDER BY " . DB_SEARCHES . ".DisplayName";
" ORDER BY " . DB_SEARCHES . ".userid, " . DB_SEARCHES . ".groupid, " . DB_SEARCHES . ".DisplayName";
// " ORDER BY " . DB_SEARCHES . ".DisplayName";
$result = DB_Query($sqlquery);
$myrows = DB_GetAllRows($result, true);
if ( isset($myrows ) && count($myrows) > 0 )
{
// Overwrite Search Array with Database one
$CFG['Search'] = $myrows;
$content['Search'] = $myrows;
// Cleanup searches and fill / load from database

View File

@ -42,6 +42,9 @@ $content['LN_DELETEYES'] = "Yes";
$content['LN_DELETENO'] = "No";
$content['LN_GEN_ACTIONS'] = "Available Actions";
$content['LN_ADMIN_SEND'] = "Send changes";
$content['LN_GEN_USERONLY'] = "User only";
$content['LN_GEN_GROUPONLY'] = "Group only";
$content['LN_GEN_GLOBAL'] = "Global";
// General Options
$content['LN_ADMIN_MISC'] = "Miscellaneous Options";
@ -78,7 +81,7 @@ $content['LN_USER_ERROR_IDNOTFOUND'] = "Error, User with ID '%1' , was not found
$content['LN_USER_ERROR_DONOTDELURSLF'] = "Error, you can not DELETE YOURSELF!";
$content['LN_USER_ERROR_DELUSER'] = "Deleting of the user with id '%1' failed!";
$content['LN_USER_ERROR_INVALIDID'] = "Error, invalid ID, User not found";
$content['LN_USER_ERROR_HASBEENDEL'] = "The User '%1' has been successfully DELETED!";
$content['LN_USER_ERROR_HASBEENDEL'] = "The User '%1' has been successfully deleted!";
$content['LN_USER_ERROR_USEREMPTY'] = "Error, Username was empty";
$content['LN_USER_ERROR_USERNAMETAKEN'] = "Error, this Username is already taken!";
$content['LN_USER_ERROR_PASSSHORT'] = "Error, Password was to short, or did not match";
@ -110,7 +113,7 @@ $content['LN_GROUP_ERROR_HASBEENEDIT'] = "The group '%1' has been successfully e
$content['LN_GROUP_ERROR_INVALIDGROUP'] = "Error, invalid ID, Group not found";
$content['LN_GROUP_WARNDELETEGROUP'] = "Are you sure that you want to delete the Group '%1'? All Groupsettings will be deleted as well.";
$content['LN_GROUP_ERROR_DELGROUP'] = "Deleting of the group with id '%1' failed!";
$content['LN_GROUP_ERROR_HASBEENDEL'] = "The Group '%1' has been successfully DELETED!";
$content['LN_GROUP_ERROR_HASBEENDEL'] = "The Group '%1' has been successfully deleted!";
$content['LN_GROUP_MEMBERS'] = "Groupmembers: ";
$content['LN_GROUP_ADDUSER'] = "Add User to Group";
$content['LN_GROUP_ERROR_USERIDMISSING'] = "The userid is missing.";
@ -123,4 +126,30 @@ $content['LN_GROUP_ERROR_REMUSERFROMGROUP'] = "The user '%1' could not be remove
$content['LN_GROUP_USERHASBEENREMOVED'] = "The user '%1' has been successfully removed from the group '%2'";
$content['LN_GROUP_'] = "";
// Custom Searches center
$content['LN_SEARCH_CENTER'] = "Custom Searches";
$content['LN_SEARCH_ADD'] = "Add Custom Search";
$content['LN_SEARCH_ID'] = "ID";
$content['LN_SEARCH_NAME'] = "Search Name";
$content['LN_SEARCH_QUERY'] = "Search Query";
$content['LN_SEARCH_TYPE'] = "Type of Search";
$content['LN_SEARCH_EDIT'] = "Edit Custom Search";
$content['LN_SEARCH_DELETE'] = "Delete Custom Search";
$content['LN_SEARCH_ADDEDIT'] = "Add / Edit a Custom Search";
$content['LN_SEARCH_USERONLY'] = "For me only <br>(Only available to your user)";
$content['LN_SEARCH_GROUPONLY'] = "For this group <br>(Only available to the selected group)";
$content['LN_SEARCH_SELGROUPENABLE'] = ">> Select Group to enable <<";
$content['LN_SEARCH_ERROR_DISPLAYNAMEEMPTY'] = "The DisplayName cannot be empty.";
$content['LN_SEARCH_ERROR_SEARCHQUERYEMPTY'] = "The SearchQuery cannot be empty.";
$content['LN_SEARCH_HASBEENADDED'] = "The Custom Search '%1' has been successfully added.";
$content['LN_SEARCH_ERROR_IDNOTFOUND'] = "Could not find a search with ID '%1'.";
$content['LN_SEARCH_ERROR_INVALIDID'] = "Invalid search ID.";
$content['LN_SEARCH_HASBEENEDIT'] = "The Custom Search '%1' has been successfully edited.";
$content['LN_SEARCH_WARNDELETESEARCH'] = "Are you sure that you want to delete the Custom Search '%1'? This cannot be undone!";
$content['LN_SEARCH_ERROR_DELSEARCH'] = "Deleting of the Custom Search with id '%1' failed!";
$content['LN_SEARCH_ERROR_HASBEENDEL'] = "The Custom Search '%1' has been successfully deleted!";
$content['LN_SEARCH_'] = "";
$content['LN_SEARCH_'] = "";
?>

View File

@ -66,6 +66,7 @@
<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_GROUP_ADDEDIT}</b></td>
</tr>
<tr>
<td align="left" class="cellmenu2" width="150" nowrap><b>{LN_GROUP_NAME}</b></td>
<td align="right" class="line0" width="100%"><input type="text" name="groupname" size="40" maxlength="64" value="{groupname}"></td>
@ -93,6 +94,7 @@
<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_GROUP_ADDUSER}: '{GROUPNAME}'</b></td>
</tr>
<tr>
<td align="left" class="cellmenu2" width="150" nowrap><b>{LN_USER_NAME}</b></td>
<td align="right" class="line0" width="100%">
@ -122,6 +124,7 @@
<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_GROUP_USERDELETE}: '{GROUPNAME}'</b></td>
</tr>
<tr>
<td align="left" class="cellmenu2" width="150" nowrap><b>{LN_USER_NAME}</b></td>
<td align="right" class="line0" width="100%">

View File

@ -0,0 +1,93 @@
<!-- INCLUDE include_header.html -->
<!-- IF ISERROR="true" -->
<center>
<h3><font color="red">{ERROR_MSG}</font></h3>
</center>
<!-- 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 LISTSEARCHES="true" -->
<table border="0" cellpadding="2" cellspacing="1" bgcolor="#DDDDDD" width="750" class="with_border_alternate">
<tr>
<td align="center" width="50" class="cellmenu1"><b>{LN_SEARCH_ID}</b></td>
<td align="center" width="200" class="cellmenu1"><b>{LN_SEARCH_NAME}</b></td>
<td align="center" width="200" class="cellmenu1"><b>{LN_SEARCH_QUERY}</b></td>
<td align="center" width="100" class="cellmenu1"><b>{LN_SEARCH_TYPE}</b></td>
<td align="center" width="200" class="cellmenu1"><b>{LN_GEN_ACTIONS}</b></td>
</tr>
<!-- BEGIN SEARCHES -->
<tr>
<td align="center" class="{cssclass}"><b>{ID}</b></td>
<td align="left" class="{cssclass}"><a href="{BASEPATH}admin/searches.php?op=edit&id={ID}">{DisplayName}</a></td>
<td align="left" class="{cssclass}"><a href="{BASEPATH}index.php?{SearchQuery}">{SearchQuery_Display}</a></td>
<td align="left" class="{cssclass}"><img src="{SearchTypeImage}" width="16" align="left"> <b>{SearchTypeText}</b></td>
<!-- <td align="center" class="{cssclass}"><a href="{BASEPATH}admin/users.php?miniop=setisadmin&id={ID}&newval={set_isadmin}"><img src="{is_isadmin_string}" width="16"></a></td>-->
<td align="center" class="{cssclass}">
&nbsp;<a href="{BASEPATH}admin/searches.php?op=edit&id={ID}"><img src="{MENU_EDIT}" width="16" title="{LN_SEARCH_EDIT}"></a>
&nbsp;<a href="{BASEPATH}admin/searches.php?op=delete&id={ID}"><img src="{MENU_DELETE}" width="16" title="{LN_SEARCH_DELETE}"></a>
</td>
</tr>
<!-- END SEARCHES -->
<tr>
<td align="center" colspan="5" class="line0"><b><a href="{BASEPATH}admin/searches.php?op=add"><img src="{MENU_ADD}" title="{LN_SEARCH_ADD}">&nbsp;{LN_SEARCH_ADD}</a></b></td>
</tr>
</table>
<!-- ENDIF LISTSEARCHES="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_SEARCH_QUERY}</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_SEARCH_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_SEARCH_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 -->

View File

@ -44,6 +44,7 @@
<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_USER_ADDEDIT}</b></td>
</tr>
<tr>
<td align="left" class="cellmenu2" width="150" nowrap><b>{LN_USER_NAME}</b></td>
<td align="right" class="line0" width="100%"><input type="text" name="username" size="40" maxlength="64" value="{USERNAME}"></td>