diff --git a/configure b/configure index 88c5a8d3..53338eae 100755 --- a/configure +++ b/configure @@ -3423,7 +3423,7 @@ os=`uname -s` id_bin="id" -SUBDIRS="src etc util" +SUBDIRS="src etc util init.d" @@ -4153,7 +4153,7 @@ CFLAGS="$static -O2 -Wall -g" LIBS="$antispam_libs $sunos_libs " OBJS="dirs.o misc.o counters.o cfg.o sig.o decoder.o list.o parser.o parser_utils.o rules.o session.o message.o attachment.o digest.o store.o archive.o tai.o $objs" -ac_config_files="$ac_config_files Makefile src/Makefile etc/Makefile util/Makefile" +ac_config_files="$ac_config_files Makefile src/Makefile etc/Makefile util/Makefile init.d/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -4862,6 +4862,7 @@ do "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "etc/Makefile") CONFIG_FILES="$CONFIG_FILES etc/Makefile" ;; "util/Makefile") CONFIG_FILES="$CONFIG_FILES util/Makefile" ;; + "init.d/Makefile") CONFIG_FILES="$CONFIG_FILES init.d/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac diff --git a/configure.in b/configure.in index 299d640e..be821e32 100644 --- a/configure.in +++ b/configure.in @@ -51,7 +51,7 @@ os=`uname -s` id_bin="id" dnl SUBDIRS="src etc util perl init.d templates history contrib/stat" -SUBDIRS="src etc util" +SUBDIRS="src etc util init.d" dnl static build @@ -276,6 +276,6 @@ CFLAGS="$static -O2 -Wall -g" LIBS="$antispam_libs $sunos_libs " OBJS="dirs.o misc.o counters.o cfg.o sig.o decoder.o list.o parser.o parser_utils.o rules.o session.o message.o attachment.o digest.o store.o archive.o tai.o $objs" -AC_CONFIG_FILES([Makefile src/Makefile etc/Makefile util/Makefile]) +AC_CONFIG_FILES([Makefile src/Makefile etc/Makefile util/Makefile init.d/Makefile]) AC_OUTPUT diff --git a/init.d/Makefile.in b/init.d/Makefile.in new file mode 100644 index 00000000..11aed88d --- /dev/null +++ b/init.d/Makefile.in @@ -0,0 +1,35 @@ +SHELL = @SHELL@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +bindir = @bindir@ +sbindir = @sbindir@ +includedir = @includedir@ +libdir = @libdir@ +libexecdir = @libexecdir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +mandir = @mandir@ +datarootdir = @datarootdir@ +localstatedir = @localstatedir@ + +CC = @CC@ +CFLAGS = @CFLAGS@ @CPPFLAGS@ +DEFS = @defs@ +INCDIR = -I. -I../.. -I../../src @INCDIR@ @sql_includes@ +LIBDIR = -L. @LIBDIR@ @LDFLAGS@ -L../../src +LIBS = @LIBS@ @sql_libs@ + +INSTALL = @INSTALL@ + +all: + sed -e "s%SBINDIR%$(sbindir)%" -e "s%SYSCONFDIR%$(sysconfdir)%" $(srcdir)/rc.piler.in > $(srcdir)/rc.piler + + +install: + +clean: + rm -f rc.piler + +distclean: clean + rm -f Makefile diff --git a/init.d/rc.piler.in b/init.d/rc.piler.in new file mode 100644 index 00000000..82dd10fa --- /dev/null +++ b/init.d/rc.piler.in @@ -0,0 +1,50 @@ +#!/bin/sh +## +## + +NAME=piler +PID_FILE=`SBINDIR/pilerconf -q pidfile | cut -f2 -d=` +PID_NUMBER=`test -f ${PID_FILE} && cat ${PID_FILE}` + +start() { + echo "starting piler . . ." + SBINDIR/piler -d +} + +stop() { + echo "stopping piler" + killall ${NAME} +} + +check_status(){ + test -f /proc/${PID_NUMBER}/status +} + +case "$1" in + start) + start; + ;; + + stop) + stop; + ;; + + status) + if check_status; + then + echo "${NAME} is running." + else + echo "${NAME} is not running." + fi + ;; + + restart) + stop; + sleep 1; + start; + ;; + + *) + echo "Usage: $0 start|stop|restart|status" +esac + diff --git a/webui/.htaccess b/webui/.htaccess index e93410fc..ee91d6b3 100644 --- a/webui/.htaccess +++ b/webui/.htaccess @@ -1,3 +1,4 @@ + RewriteEngine On RewriteRule ^search.php /index.php?route=search/search&type=simple [L] RewriteRule ^advanced.php /index.php?route=search/search&type=advanced [L] @@ -6,4 +7,6 @@ RewriteRule ^search-helper.php /index.php?route=search/helper [L] RewriteRule ^audit-helper.php /index.php?route=audit/helper [L] RewriteRule ^message.php /index.php?route=message/view [L] RewriteRule ^settings.php /index.php?route=user/settings [L] +RewriteRule ^login.php /index.php?route=login/login [L] +RewriteRule ^logout.php /index.php?route=login/logout [L] diff --git a/webui/controller/login/login.php b/webui/controller/login/login.php index 43a2b6cc..0fda9846 100644 --- a/webui/controller/login/login.php +++ b/webui/controller/login/login.php @@ -29,13 +29,13 @@ class ControllerLoginLogin extends Controller { LOGGER('logged in'); - /*if(isset($_POST['relocation']) && $_POST['relocation']) { - header("Location: " . SITE_URL . "index.php?" . $_POST['relocation']); + if(isset($_POST['relocation']) && $_POST['relocation']) { + header("Location: " . SITE_URL . $_POST['relocation']); } else { header("Location: " . SITE_URL . "search.php"); - }*/ + } - header("Location: " . SITE_URL . "search.php"); + //header("Location: " . SITE_URL . "search.php"); exit; } diff --git a/webui/controller/search/search.php b/webui/controller/search/search.php index b147c3de..cf11eb4f 100644 --- a/webui/controller/search/search.php +++ b/webui/controller/search/search.php @@ -14,17 +14,21 @@ class ControllerSearchSearch extends Controller { $this->load->model('search/search'); + $this->document->title = $this->data['text_simple_search']; + $this->data['searchtype'] = 'simple'; if(isset($this->request->get['type'])) { if($this->request->get['type'] == 'advanced') { $this->template = "search/advanced.tpl"; $this->data['searchtype'] = 'advanced'; + $this->document->title = $this->data['text_advanced_search']; } if($this->request->get['type'] == 'expert') { $this->template = "search/expert.tpl"; $this->data['searchtype'] = 'expert'; + $this->document->title = $this->data['text_expert_search']; } } diff --git a/webui/language/en/messages.php b/webui/language/en/messages.php index 278a15af..f7334cef 100644 --- a/webui/language/en/messages.php +++ b/webui/language/en/messages.php @@ -12,6 +12,7 @@ $_['text_add_new_user_alias'] = "Add new user"; $_['text_add_policy'] = "Add new policy"; $_['text_administration'] = "Administration"; $_['text_admin_user'] = "Admin user"; +$_['text_advanced'] = "Advanced"; $_['text_advanced_search'] = "Advanced search"; $_['text_all'] = "all"; $_['text_any'] = "any"; @@ -82,6 +83,8 @@ $_['text_existing_policies'] = "Existing policies"; $_['text_existing_rules'] = "Existing rules"; $_['text_existing_user'] = "Existing user"; $_['text_existing_users'] = "Existing users"; +$_['text_expert'] = "Expert"; +$_['text_expert_search'] = "Expert search"; $_['text_failed'] = "failed"; $_['text_failed_to_add'] = "Failed to add"; @@ -231,6 +234,8 @@ $_['text_server_name'] = "Server name"; $_['text_server_operating_system'] = "Operating System"; $_['text_set'] = "Set"; $_['text_settings'] = "Settings"; +$_['text_simple'] = "Simple"; +$_['text_simple_search'] = "Simple search"; $_['text_size'] = "Size"; $_['text_smtp_status'] = "SMTP status"; $_['text_statistics'] = "Statistics"; diff --git a/webui/language/hu/messages.iso-8859-2.php b/webui/language/hu/messages.iso-8859-2.php index 509e3c31..d0417903 100644 --- a/webui/language/hu/messages.iso-8859-2.php +++ b/webui/language/hu/messages.iso-8859-2.php @@ -12,6 +12,7 @@ $_['text_add_new_user_alias'] = " $_['text_add_policy'] = "Új házirend"; $_['text_administration'] = "Adminisztráció"; $_['text_admin_user'] = "Admin felhasználó"; +$_['text_advanced'] = "Összetett"; $_['text_advanced_search'] = "Összetett keresés"; $_['text_all'] = "összes"; $_['text_any'] = "mindegy"; @@ -82,6 +83,8 @@ $_['text_existing_policies'] = "L $_['text_existing_rules'] = "Létező szabályok"; $_['text_existing_user'] = "Létező felhasználó"; $_['text_existing_users'] = "Létező felhasználók"; +$_['text_expert'] = "Haladó"; +$_['text_expert_search'] = "Haladó keresés"; $_['text_failed'] = "sikertelen"; $_['text_failed_to_add'] = "Hiba a hozzáadás során"; @@ -232,6 +235,8 @@ $_['text_server_name'] = "Szerver n $_['text_server_operating_system'] = "Operációs rendszer"; $_['text_set'] = "Beállít"; $_['text_settings'] = "Beállítások"; +$_['text_simple'] = "Egyszerű"; +$_['text_simple_search'] = "Egyszerű keresés"; $_['text_size'] = "Méret"; $_['text_smtp_status'] = "SMTP státusz"; $_['text_statistics'] = "Statisztika"; diff --git a/webui/language/hu/messages.php b/webui/language/hu/messages.php index 520f39a7..e95d1ab8 100644 --- a/webui/language/hu/messages.php +++ b/webui/language/hu/messages.php @@ -12,6 +12,7 @@ $_['text_add_new_user_alias'] = "Ăšj felhasználĂł"; $_['text_add_policy'] = "Ăšj házirend"; $_['text_administration'] = "AdminisztráciĂł"; $_['text_admin_user'] = "Admin felhasználĂł"; +$_['text_advanced'] = "Ă–sszetett"; $_['text_advanced_search'] = "Ă–sszetett keresĂ©s"; $_['text_all'] = "összes"; $_['text_any'] = "mindegy"; @@ -82,6 +83,8 @@ $_['text_existing_policies'] = "LĂ©tezĹ‘ házirendek"; $_['text_existing_rules'] = "LĂ©tezĹ‘ szabályok"; $_['text_existing_user'] = "LĂ©tezĹ‘ felhasználĂł"; $_['text_existing_users'] = "LĂ©tezĹ‘ felhasználĂłk"; +$_['text_expert'] = "HaladĂł"; +$_['text_expert_search'] = "HaladĂł keresĂ©s"; $_['text_failed'] = "sikertelen"; $_['text_failed_to_add'] = "Hiba a hozzáadás során"; @@ -232,6 +235,8 @@ $_['text_server_name'] = "Szerver nĂ©v"; $_['text_server_operating_system'] = "OperáciĂłs rendszer"; $_['text_set'] = "BeállĂt"; $_['text_settings'] = "BeállĂtások"; +$_['text_simple'] = "Egyszerű"; +$_['text_simple_search'] = "Egyszerű keresĂ©s"; $_['text_size'] = "MĂ©ret"; $_['text_smtp_status'] = "SMTP státusz"; $_['text_statistics'] = "Statisztika"; diff --git a/webui/view/theme/default/stylesheet/style-default.css b/webui/view/theme/default/stylesheet/style-default.css index 5169ed0b..69700708 100644 --- a/webui/view/theme/default/stylesheet/style-default.css +++ b/webui/view/theme/default/stylesheet/style-default.css @@ -132,7 +132,7 @@ input[type=button].secondary { margin: 0; background-color:#eee; color: gray; font: bold 12px Arial, sans-serif; width: 24%;} input[type=button].advsecondary { margin: 0; background-color:#eee; color: gray; font: bold 12px Arial, sans-serif; width: 15%;} - input[type=button].load { margin: 0; background-color:#eee; color: black; font: bold 12px Arial, sans-serif; width: 16%;} + input[type=button].load { margin: 0; background-color:#eee; color: black; font: bold 12px Arial, sans-serif; width: 17%;} input[type=button].short { margin: 0; background-color:#eee; color: gray; font: bold 12px Arial, sans-serif; width: 50px;} input[type=checkbox].attachmenttype { margin: 0; vertical-align: middle; } @@ -152,14 +152,18 @@ * dropdown menu */ + .mcell { display: table-cell; font: normal 12px Arial, sans-serif; vertical-align: top; } + ul.dropdown { position: relative; } ul.dropdown li { font-weight: bold; float: left; background: #ffffff; text-align: center; padding-right: 40px; padding-left: 40px; border: 0px solid red; } - ul.dropdown li.first_li { font-weight: bold; float: left; background: #ffffff; text-align: left; padding-left:80px; } - ul.dropdown li.center_li { font-weight: bold; float: left; background: #ffffff; text-align: center; padding: 0; width: 190px; } - ul.dropdown li.last_li { font-weight: bold; float: left; background: #ffffff; text-align: right; padding-right: 0; margin-left: 10px; } + ul.dropdown li.first_li { font-weight: bold; float: left; background: #ffffff; text-align: left; padding-left:80px; padding-right: 5px; } + ul.dropdown li.search_li { font-weight: bold; float: left; background: #ffffff; text-align: center; padding: 0; padding-right: 5px; } + ul.dropdown li.no_search_li { font-weight: bold; float: left; background: #ffffff; text-align: center; padding: 0; padding-right: 5px; } + ul.dropdown li.center_li { font-weight: bold; float: left; background: #ffffff; text-align: center; padding: 0; width: 190px; } + ul.dropdown li.last_li { font-weight: bold; float: left; background: #ffffff; text-align: right; padding: 0; } ul.dropdown li.admin { font-weight: bold; float: left; background: #ffffff; padding-right: 5px; padding-left: 2px; } - ul.dropdown li.first_li_admin { background: #ffffff; text-align: left; margin-left: 80px; padding-left: 0px; padding-right: 5px; } + ul.dropdown li.first_li_admin { background: #ffffff; text-align: left; margin-left: 90px; padding-left: 0px; padding-right: 5px; } ul.dropdown li.last_li_admin { background: #ffffff; text-align: right; padding: 0; } ul.dropdown li.logout { font-weight: bold; float: right; background: #ffffff; width: 100px; text-align: right; } @@ -169,6 +173,7 @@ ul.dropdown li a { padding: 0; color: #222; border-bottom: none; } ul.dropdown li.hover, ul.dropdown li:hover { background: #F3D673; color: black; position: relative; } + ul.dropdown li.no_search_li:hover { background: #ffffff; color: black; position: relative; } ul.dropdown li.hover a { color: black; } ul.dropdown ul { width: 150px; text-align: left; visibility: hidden; position: absolute; top: 100%; left: 0; } diff --git a/webui/view/theme/default/templates/common/menu-admin.tpl b/webui/view/theme/default/templates/common/menu-admin.tpl index 14de4b60..72a8c4df 100644 --- a/webui/view/theme/default/templates/common/menu-admin.tpl +++ b/webui/view/theme/default/templates/common/menu-admin.tpl @@ -31,7 +31,7 @@