Thread: SF.net SVN: postfixadmin: [107] trunk
Brought to you by:
christian_boltz,
gingerdog
From: <Gin...@us...> - 2007-09-30 15:53:54
|
Revision: 107 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=107&view=rev Author: GingerDog Date: 2007-09-30 08:53:54 -0700 (Sun, 30 Sep 2007) Log Message: ----------- update license headers Modified Paths: -------------- trunk/admin/backup.php trunk/admin/broadcast-message.php trunk/admin/create-admin.php trunk/admin/create-alias.php trunk/admin/create-domain.php trunk/admin/create-mailbox.php trunk/admin/delete.php trunk/admin/edit-active-admin.php trunk/admin/edit-active-domain.php trunk/admin/edit-active.php trunk/admin/edit-admin.php trunk/admin/edit-alias.php trunk/admin/edit-domain.php trunk/admin/edit-mailbox.php trunk/admin/edit-vacation.php trunk/admin/index.php trunk/admin/list-admin.php trunk/admin/list-domain.php trunk/admin/list-virtual.php trunk/admin/main.php trunk/admin/search.php trunk/admin/viewlog.php trunk/common.php trunk/config.inc.php.sample trunk/create-alias.php trunk/create-mailbox.php trunk/delete.php trunk/edit-active.php trunk/edit-alias.php trunk/edit-mailbox.php trunk/edit-vacation.php trunk/functions.inc.php trunk/index.php trunk/login.php trunk/logout.php trunk/main.php trunk/overview.php trunk/password.php trunk/search.php trunk/sendmail.php trunk/setup.php trunk/users/edit-alias.php trunk/users/index.php trunk/users/login.php trunk/users/logout.php trunk/users/main.php trunk/users/password.php trunk/users/vacation.php trunk/variables.inc.php trunk/viewlog.php Modified: trunk/admin/backup.php =================================================================== --- trunk/admin/backup.php 2007-09-28 20:35:43 UTC (rev 106) +++ trunk/admin/backup.php 2007-09-30 15:53:54 UTC (rev 107) @@ -1,22 +1,25 @@ <?php -// -// Postfix Admin -// by Mischa Peters <mischa at high5 dot net> -// Copyright (c) 2002 - 2005 High5! -// Licensed under GPL for more info check GPL-LICENSE.TXT -// -// File: backup.php -// -// Template File: -none- -// -// Template Variables: -// -// -none- -// -// Form POST \ GET Variables: -// -// -none- -// +/** + * Postfix Admin + * + * LICENSE + * This source file is subject to the GPL license that is bundled with + * this package in the file LICENSE.TXT. + * + * Further details on the project are available at : + * http://www.postfixadmin.com or http://postfixadmin.sf.net + * + * @version $Id$ + * @license GNU GPL v2 or later. + * + * File: backup.php + * Used to save all settings - but only works for MySQL databases. + * Template File: -none- + * + * Template Variables: -none- + * + * Form POST \ GET Variables: -none- + */ require_once('../common.php'); Modified: trunk/admin/broadcast-message.php =================================================================== --- trunk/admin/broadcast-message.php 2007-09-28 20:35:43 UTC (rev 106) +++ trunk/admin/broadcast-message.php 2007-09-30 15:53:54 UTC (rev 107) @@ -1,25 +1,30 @@ <?php -// -// Postfix Admin -// by Mischa Peters <mischa at high5 dot net> -// Copyright (c) 2002 - 2005 High5! -// Licensed under GPL for more info check GPL-LICENSE.TXT -// -// File: broadcast-message.php -// -// Template File: broadcast-message.tpl -// -// Template Variables: -// -// -none- -// -// Form POST \ GET Variables: -// -// name -// subject -// message -// -// +/** + * Postfix Admin + * + * LICENSE + * This source file is subject to the GPL license that is bundled with + * this package in the file LICENSE.TXT. + * + * Further details on the project are available at : + * http://www.postfixadmin.com or http://postfixadmin.sf.net + * + * @version $Id$ + * @license GNU GPL v2 or later. + * + * File: broadcast-message.php + * Used to send a message to _ALL_ users with mailboxes on this server. + * + * Template File: broadcast-message.tpl + * + * Template Variables: -none- + * + * Form POST \ GET Variables: + * + * name + * subject + * message + */ require_once('../common.php'); Modified: trunk/admin/create-admin.php =================================================================== --- trunk/admin/create-admin.php 2007-09-28 20:35:43 UTC (rev 106) +++ trunk/admin/create-admin.php 2007-09-30 15:53:54 UTC (rev 107) @@ -1,28 +1,35 @@ <?php -// -// Postfix Admin -// by Mischa Peters <mischa at high5 dot net> -// Copyright (c) 2002 - 2005 High5! -// Licensed under GPL for more info check GPL-LICENSE.TXT -// -// File: create-admin.php -// -// Template File: admin_create-admin.tpl -// -// -// Template Variables: -// -// tMessage -// tUsername -// tDomains -// -// Form POST \ GET Variables: -// -// fUsername -// fPassword -// fPassword2 -// fDomains -// +/** + * Postfix Admin + * + * LICENSE + * This source file is subject to the GPL license that is bundled with + * this package in the file LICENSE.TXT. + * + * Further details on the project are available at : + * http://www.postfixadmin.com or http://postfixadmin.sf.net + * + * @version $Id$ + * @license GNU GPL v2 or later. + * + * File: create-admin.php + * Used to create new administrators. + * Template File: admin_create-admin.tpl + * + * + * Template Variables: + * + * tMessage + * tUsername + * tDomains + * + * Form POST \ GET Variables: + * + * fUsername + * fPassword + * fPassword2 + * fDomains + */ require_once('../common.php'); Modified: trunk/admin/create-alias.php =================================================================== --- trunk/admin/create-alias.php 2007-09-28 20:35:43 UTC (rev 106) +++ trunk/admin/create-alias.php 2007-09-30 15:53:54 UTC (rev 107) @@ -1,28 +1,3 @@ <?php -// -// Postfix Admin -// by Mischa Peters <mischa at high5 dot net> -// Copyright (c) 2002 - 2005 High5! -// Licensed under GPL for more info check GPL-LICENSE.TXT -// -// File: create-alias.php -// -// Template File: create-alias.tpl -// -// Template Variables: -// -// tMessage -// tAddress -// tGoto -// tDomain -// -// Form POST \ GET Variables: -// -// fAddress -// fGoto -// fDomain -// - require ("../create-alias.php"); - ?> Modified: trunk/admin/create-domain.php =================================================================== --- trunk/admin/create-domain.php 2007-09-28 20:35:43 UTC (rev 106) +++ trunk/admin/create-domain.php 2007-09-30 15:53:54 UTC (rev 107) @@ -1,33 +1,40 @@ <?php -// -// Postfix Admin -// by Mischa Peters <mischa at high5 dot net> -// Copyright (c) 2002 - 2005 High5! -// Licensed under GPL for more info check GPL-LICENSE.TXT -// -// File: create-domain.php -// -// Template File: admin_create-domain.tpl -// -// Template Variables: -// -// tMessage -// tDomain -// tDescription -// tAliases -// tMailboxes -// tMaxquota -// tDefaultaliases -// -// Form POST \ GET Variables: -// -// fDomain -// fDescription -// fAliases -// fMailboxes -// fMaxquota -// fDefaultaliases -// +/** + * Postfix Admin + * + * LICENSE + * This source file is subject to the GPL license that is bundled with + * this package in the file LICENSE.TXT. + * + * Further details on the project are available at : + * http://www.postfixadmin.com or http://postfixadmin.sf.net + * + * @version $Id$ + * @license GNU GPL v2 or later. + * + * File: create-domain.php + * Allows administrators to create new domains. + * Template File: admin_create-domain.tpl + * + * Template Variables: + * + * tMessage + * tDomain + * tDescription + * tAliases + * tMailboxes + * tMaxquota + * tDefaultaliases + * + * Form POST \ GET Variables: + * + * fDomain + * fDescription + * fAliases + * fMailboxes + * fMaxquota + * fDefaultaliases + */ require_once('../common.php'); Modified: trunk/admin/create-mailbox.php =================================================================== --- trunk/admin/create-mailbox.php 2007-09-28 20:35:43 UTC (rev 106) +++ trunk/admin/create-mailbox.php 2007-09-30 15:53:54 UTC (rev 107) @@ -1,35 +1,3 @@ <?php -// -// Postfix Admin -// by Mischa Peters <mischa at high5 dot net> -// Copyright (c) 2002 - 2005 High5! -// Licensed under GPL for more info check GPL-LICENSE.TXT -// -// File: create-mailbox.php -// -// Template File: create-mailbox.tpl -// -// Template Variables: -// -// tMessage -// tUsername -// tName -// tQuota -// tDomain -// -// Form POST \ GET Variables: -// -// fUsername -// fPassword -// fPassword2 -// fName -// fQuota -// fDomain -// fActive -// fMail -// - require ("../create-mailbox.php"); - -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ ?> Modified: trunk/admin/delete.php =================================================================== --- trunk/admin/delete.php 2007-09-28 20:35:43 UTC (rev 106) +++ trunk/admin/delete.php 2007-09-30 15:53:54 UTC (rev 107) @@ -1,25 +1,33 @@ <?php -// -// Postfix Admin -// by Mischa Peters <mischa at high5 dot net> -// Copyright (c) 2002 - 2005 High5! -// Licensed under GPL for more info check GPL-LICENSE.TXT -// -// File: delete.php -// -// Template File: message.tpl -// -// Template Variables: -// -// tMessage -// -// Form POST \ GET Variables: -// -// fTable -// fWhere -// fDelete -// fDomain -// +/** + * Postfix Admin + * + * LICENSE + * This source file is subject to the GPL license that is bundled with + * this package in the file LICENSE.TXT. + * + * Further details on the project are available at : + * http://www.postfixadmin.com or http://postfixadmin.sf.net + * + * @version $Id$ + * @license GNU GPL v2 or later. + * + * File: delete.php + * Used to delete a domain, mailbox or alias. + * + * Template File: message.tpl + * + * Template Variables: + * + * tMessage + * + * Form POST \ GET Variables: + * + * fTable + * fWhere + * fDelete + * fDomain + */ require_once('../common.php'); Modified: trunk/admin/edit-active-admin.php =================================================================== --- trunk/admin/edit-active-admin.php 2007-09-28 20:35:43 UTC (rev 106) +++ trunk/admin/edit-active-admin.php 2007-09-30 15:53:54 UTC (rev 107) @@ -1,22 +1,30 @@ <?php -// -// Postfix Admin -// by Mischa Peters <mischa at high5 dot net> -// Copyright (c) 2002 - 2005 High5! -// Licensed under GPL for more info check GPL-LICENSE.TXT -// -// File: edit-active.php -// -// Template File: message.tpl -// -// Template Variables: -// -// tMessage -// -// Form POST \ GET Variables: -// -// fUsername -// +/** + * Postfix Admin + * + * LICENSE + * This source file is subject to the GPL license that is bundled with + * this package in the file LICENSE.TXT. + * + * Further details on the project are available at : + * http://www.postfixadmin.com or http://postfixadmin.sf.net + * + * @version $Id$ + * @license GNU GPL v2 or later. + * + * File: edit-active-admin.php + * Edit an active administrator. This is used as a 'toggle' page from list-admin. + * + * Template File: message.tpl + * + * Template Variables: + * + * tMessage + * + * Form POST \ GET Variables: + * + * fUsername + */ require_once('../common.php'); Modified: trunk/admin/edit-active-domain.php =================================================================== --- trunk/admin/edit-active-domain.php 2007-09-28 20:35:43 UTC (rev 106) +++ trunk/admin/edit-active-domain.php 2007-09-30 15:53:54 UTC (rev 107) @@ -1,22 +1,29 @@ <?php -// -// Postfix Admin -// by Mischa Peters <mischa at high5 dot net> -// Copyright (c) 2002 - 2005 High5! -// Licensed under GPL for more info check GPL-LICENSE.TXT -// -// File: edit-active.php -// -// Template File: message.tpl -// -// Template Variables: -// -// tMessage -// -// Form POST \ GET Variables: -// -// fDomain -// +/** + * Postfix Admin + * + * LICENSE + * This source file is subject to the GPL license that is bundled with + * this package in the file LICENSE.TXT. + * + * Further details on the project are available at : + * http://www.postfixadmin.com or http://postfixadmin.sf.net + * + * @version $Id$ + * @license GNU GPL v2 or later. + * + * File: edit-active-domain.php + * Responsible for toggling the status of a domain + * Template File: message.tpl + * + * Template Variables: + * + * tMessage + * + * Form POST \ GET Variables: + * + * fDomain + */ require_once('../common.php'); Modified: trunk/admin/edit-active.php =================================================================== --- trunk/admin/edit-active.php 2007-09-28 20:35:43 UTC (rev 106) +++ trunk/admin/edit-active.php 2007-09-30 15:53:54 UTC (rev 107) @@ -1,25 +1,3 @@ <?php -// -// Postfix Admin -// by Mischa Peters <mischa at high5 dot net> -// Copyright (c) 2002 - 2005 High5! -// Licensed under GPL for more info check GPL-LICENSE.TXT -// -// File: edit-active.php -// -// Template File: message.tpl -// -// Template Variables: -// -// tMessage -// -// Form POST \ GET Variables: -// -// fUsername -// fDomain -// - require("../edit-active.php"); - -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ ?> Modified: trunk/admin/edit-admin.php =================================================================== --- trunk/admin/edit-admin.php 2007-09-28 20:35:43 UTC (rev 106) +++ trunk/admin/edit-admin.php 2007-09-30 15:53:54 UTC (rev 107) @@ -1,29 +1,37 @@ <?php -// -// Postfix Admin -// by Mischa Peters <mischa at high5 dot net> -// Copyright (c) 2002 - 2005 High5! -// Licensed under GPL for more info check GPL-LICENSE.TXT -// -// File: edit-admin.php -// -// Template File: admin_edit-admin.tpl -// -// Template Variables: -// -// tAllDomains -// tDomains -// tActive -// tSadmin -// -// Form POST \ GET Variables: -// -// fDescription -// fAliases -// fMailboxes -// fMaxquota -// fActive -// +/** + * Postfix Admin + * + * LICENSE + * This source file is subject to the GPL license that is bundled with + * this package in the file LICENSE.TXT. + * + * Further details on the project are available at : + * http://www.postfixadmin.com or http://postfixadmin.sf.net + * + * @version $Id$ + * @license GNU GPL v2 or later. + * + * File: edit-admin.php + * Edits a normal administrator's details. + * + * Template File: admin_edit-admin.tpl + * + * Template Variables: + * + * tAllDomains + * tDomains + * tActive + * tSadmin + * + * Form POST \ GET Variables: + * + * fDescription + * fAliases + * fMailboxes + * fMaxquota + * fActive + */ require_once('../common.php'); Modified: trunk/admin/edit-alias.php =================================================================== --- trunk/admin/edit-alias.php 2007-09-28 20:35:43 UTC (rev 106) +++ trunk/admin/edit-alias.php 2007-09-30 15:53:54 UTC (rev 107) @@ -1,26 +1,3 @@ <?php -// -// Postfix Admin -// by Mischa Peters <mischa at high5 dot net> -// Copyright (c) 2002 - 2005 High5! -// Licensed under GPL for more info check GPL-LICENSE.TXT -// -// File: edit-alias.php -// -// Template File: edit-alias.tpl -// -// Template Variables: -// -// tMessage -// tGoto -// -// Form POST \ GET Variables: -// -// fAddress -// fDomain -// fGoto -// - require("../edit-alias.php"); - ?> Modified: trunk/admin/edit-domain.php =================================================================== --- trunk/admin/edit-domain.php 2007-09-28 20:35:43 UTC (rev 106) +++ trunk/admin/edit-domain.php 2007-09-30 15:53:54 UTC (rev 107) @@ -1,30 +1,37 @@ <?php -// -// Postfix Admin -// by Mischa Peters <mischa at high5 dot net> -// Copyright (c) 2002 - 2005 High5! -// Licensed under GPL for more info check GPL-LICENSE.TXT -// -// File: edit-domain.php -// -// Template File: admin_edit-domain.tpl -// -// Template Variables: -// -// tDescription -// tAliases -// tMailboxes -// tMaxquota -// tActive -// -// Form POST \ GET Variables: -// -// fDescription -// fAliases -// fMailboxes -// fMaxquota -// fActive -// +/** + * Postfix Admin + * + * LICENSE + * This source file is subject to the GPL license that is bundled with + * this package in the file LICENSE.TXT. + * + * Further details on the project are available at : + * http://www.postfixadmin.com or http://postfixadmin.sf.net + * + * @version $Id$ + * @license GNU GPL v2 or later. + * + * File: edit-domain.php + * Updates the properties of a domain. + * Template File: admin_edit-domain.tpl + * + * Template Variables: + * + * tDescription + * tAliases + * tMailboxes + * tMaxquota + * tActive + * + * Form POST \ GET Variables: + * + * fDescription + * fAliases + * fMailboxes + * fMaxquota + * fActive + */ require_once('../common.php'); Modified: trunk/admin/edit-mailbox.php =================================================================== --- trunk/admin/edit-mailbox.php 2007-09-28 20:35:43 UTC (rev 106) +++ trunk/admin/edit-mailbox.php 2007-09-30 15:53:54 UTC (rev 107) @@ -1,32 +1,3 @@ <?php -// -// Postfix Admin -// by Mischa Peters <mischa at high5 dot net> -// Copyright (c) 2002 - 2005 High5! -// Licensed under GPL for more info check GPL-LICENSE.TXT -// -// File: edit-mailbox.php -// -// Template File: edit-mailbox.tpl -// -// Template Variables: -// -// tMessage -// tName -// tQuota -// -// Form POST \ GET Variables: -// -// fUsername -// fDomain -// fPassword -// fPassword2 -// fName -// fQuota -// fActive -// - require("../edit-mailbox.php"); - -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ ?> Modified: trunk/admin/edit-vacation.php =================================================================== --- trunk/admin/edit-vacation.php 2007-09-28 20:35:43 UTC (rev 106) +++ trunk/admin/edit-vacation.php 2007-09-30 15:53:54 UTC (rev 107) @@ -1,32 +1,3 @@ <?php -// -// Postfix Admin -// by Mischa Peters <mischa at high5 dot net> -// Copyright (c) 2002 - 2007 High5! -// Licensed under GPL for more info check GPL-LICENSE.TXT -// -// File: edit-vacation.php -// -// Template File: edit-vacation.tpl -// -// Template Variables: -// -// tMessage -// tSubject -// tBody -// -// Form POST \ GET Variables: -// -// fUsername -// fDomain -// fCanceltarget -// fChange -// fBack -// fQuota -// fActive -// -// - require ("../edit-vacation.php"); - ?> Modified: trunk/admin/index.php =================================================================== --- trunk/admin/index.php 2007-09-28 20:35:43 UTC (rev 106) +++ trunk/admin/index.php 2007-09-30 15:53:54 UTC (rev 107) @@ -1,22 +1,4 @@ <?php -// -// Postfix Admin -// by Mischa Peters <mischa at high5 dot net> -// Copyright (c) 2002 - 2005 High5! -// Licensed under GPL for more info check GPL-LICENSE.TXT -// -// File: index.php -// -// Template File: -none- -// -// Template Variables: -// -// -none- -// -// Form POST \ GET Variables: -// -// -none- -// header ("Location: list-admin.php"); exit(0); ?> Modified: trunk/admin/list-admin.php =================================================================== --- trunk/admin/list-admin.php 2007-09-28 20:35:43 UTC (rev 106) +++ trunk/admin/list-admin.php 2007-09-30 15:53:54 UTC (rev 107) @@ -1,22 +1,25 @@ <?php -// -// Postfix Admin -// by Mischa Peters <mischa at high5 dot net> -// Copyright (c) 2002 - 2005 High5! -// Licensed under GPL for more info check GPL-LICENSE.TXT -// -// File: list-admin.php -// -// Template File: list-admin.tpl -// -// Template Variables: -// -// -none- -// -// Form POST \ GET Variables: -// -// -none- -// +/** + * Postfix Admin + * + * LICENSE + * This source file is subject to the GPL license that is bundled with + * this package in the file LICENSE.TXT. + * + * Further details on the project are available at : + * http://www.postfixadmin.com or http://postfixadmin.sf.net + * + * @version $Id$ + * @license GNU GPL v2 or later. + * + * File: list-admin.php + * Lists all administrators + * Template File: list-admin.tpl + * + * Template Variables: -none- + * + * Form POST \ GET Variables: -none- + */ require_once("../common.php"); Modified: trunk/admin/list-domain.php =================================================================== --- trunk/admin/list-domain.php 2007-09-28 20:35:43 UTC (rev 106) +++ trunk/admin/list-domain.php 2007-09-30 15:53:54 UTC (rev 107) @@ -1,22 +1,29 @@ <?php -// -// Postfix Admin -// by Mischa Peters <mischa at high5 dot net> -// Copyright (c) 2002 - 2005 High5! -// Licensed under GPL for more info check GPL-LICENSE.TXT -// -// File: list-domain.php -// -// Template File: admin_list-domain.tpl -// -// Template Variables: -// -// -none- -// -// Form POST \ GET Variables: -// -// fUsername -// +/** + * Postfix Admin + * + * LICENSE + * This source file is subject to the GPL license that is bundled with + * this package in the file LICENSE.TXT. + * + * Further details on the project are available at : + * http://www.postfixadmin.com or http://postfixadmin.sf.net + * + * @version $Id$ + * @license GNU GPL v2 or later. + * + * File: list-domain.php + * List all domains as a quick overview. + * Template File: admin_list-domain.tpl + * + * Template Variables: + * + * -none- + * + * Form POST \ GET Variables: + * + * fUsername + */ require_once('../common.php'); Modified: trunk/admin/list-virtual.php =================================================================== --- trunk/admin/list-virtual.php 2007-09-28 20:35:43 UTC (rev 106) +++ trunk/admin/list-virtual.php 2007-09-30 15:53:54 UTC (rev 107) @@ -1,25 +1,33 @@ <?php -// -// Postfix Admin -// by Mischa Peters <mischa at high5 dot net> -// Copyright (c) 2002 - 2005 High5! -// Licensed under GPL for more info check GPL-LICENSE.TXT -// -// File: list-virtual.php -// -// Template File: admin_list-virtual.tpl -// -// Template Variables: -// -// tMessage -// tAlias -// tMailbox -// -// Form POST \ GET Variables: -// -// fDomain -// fDisplay -// +/** + * Postfix Admin + * + * LICENSE + * This source file is subject to the GPL license that is bundled with + * this package in the file LICENSE.TXT. + * + * Further details on the project are available at : + * http://www.postfixadmin.com or http://postfixadmin.sf.net + * + * @version $Id$ + * @license GNU GPL v2 or later. + * + * File: list-virtual.php + * List virtual users for a domain. + * + * Template File: admin_list-virtual.tpl + * + * Template Variables: + * + * tMessage + * tAlias + * tMailbox + * + * Form POST \ GET Variables: + * + * fDomain + * fDisplay + */ require_once('../common.php'); Modified: trunk/admin/main.php =================================================================== --- trunk/admin/main.php 2007-09-28 20:35:43 UTC (rev 106) +++ trunk/admin/main.php 2007-09-30 15:53:54 UTC (rev 107) @@ -1,22 +1,4 @@ <?php -// -// Postfix Admin -// by Mischa Peters <mischa at high5 dot net> -// Copyright (c) 2002 - 2005 High5! -// Licensed under GPL for more info check GPL-LICENSE.TXT -// -// File: main.php -// -// Template File: -none- -// -// Template Variables: -// -// -none- -// -// Form POST \ GET Variables: -// -// -none- -// header ("Location: list-admin.php"); exit; ?> Modified: trunk/admin/search.php =================================================================== --- trunk/admin/search.php 2007-09-28 20:35:43 UTC (rev 106) +++ trunk/admin/search.php 2007-09-30 15:53:54 UTC (rev 107) @@ -1,25 +1,32 @@ <?php -// -// Postfix Admin -// by Mischa Peters <mischa at high5 dot net> -// Copyright (c) 2002 - 2005 High5! -// Licensed under GPL for more info check GPL-LICENSE.TXT -// -// File: search.php -// -// Template File: search.tpl -// -// Template Variables: -// -// tAlias -// tMailbox -// -// Form POST \ GET Variables: -// -// search -// fDomain -// fGo -// +/** + * Postfix Admin + * + * LICENSE + * This source file is subject to the GPL license that is bundled with + * this package in the file LICENSE.TXT. + * + * Further details on the project are available at : + * http://www.postfixadmin.com or http://postfixadmin.sf.net + * + * @version $Id$ + * @license GNU GPL v2 or later. + * + * File: search.php + * Allows for search by e.g. name, mailbox name etc. + * Template File: search.tpl + * + * Template Variables: + * + * tAlias + * tMailbox + * + * Form POST \ GET Variables: + * + * search + * fDomain + * fGo + */ require_once('../common.php'); Modified: trunk/admin/viewlog.php =================================================================== --- trunk/admin/viewlog.php 2007-09-28 20:35:43 UTC (rev 106) +++ trunk/admin/viewlog.php 2007-09-30 15:53:54 UTC (rev 107) @@ -1,25 +1,3 @@ <?php -// -// Postfix Admin -// by Mischa Peters <mischa at high5 dot net> -// Copyright (c) 2002 - 2005 High5! -// Licensed under GPL for more info check GPL-LICENSE.TXT -// -// File: viewlog.php -// -// Template File: viewlog.tpl -// -// Template Variables: -// -// tMessage -// tLog -// -// Form POST \ GET Variables: -// -// fDomain -// - require("../viewlog.php"); - -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ ?> Modified: trunk/common.php =================================================================== --- trunk/common.php 2007-09-28 20:35:43 UTC (rev 106) +++ trunk/common.php 2007-09-30 15:53:54 UTC (rev 107) @@ -1,18 +1,21 @@ <?php -// Postfix Admin -// by Mischa Peters <mischa at high5 dot net> -// Copyright (c) 2002 - 2005 High5! -// Licensed under GPL for more info check GPL-LICENSE.TXT -// -// File: common.php.php -// -// Template File: -none- -// -// Template Variables: -none- -// -// Form POST \ GET Variables: -none- -// - +/** + * Postfix Admin + * + * LICENSE + * This source file is subject to the GPL license that is bundled with + * this package in the file LICENSE.TXT. + * + * Further details on the project are available at : + * http://www.postfixadmin.com or http://postfixadmin.sf.net + * + * @version $Id$ + * @license GNU GPL v2 or later. + * + * File: common.php + * All pages should include this file - which itself sets up the necessary + * environment and ensures other functions are loaded. + */ $incpath = dirname(__FILE__); (ini_get('magic_quotes_gpc') ? ini_set('magic_quotes_runtime', '0') : '1'); (ini_get('magic_quotes_gpc') ? ini_set('magic_quotes_sybase', '0') : '1'); Modified: trunk/config.inc.php.sample =================================================================== --- trunk/config.inc.php.sample 2007-09-28 20:35:43 UTC (rev 106) +++ trunk/config.inc.php.sample 2007-09-30 15:53:54 UTC (rev 107) @@ -1,12 +1,21 @@ <?php -// -// Postfix Admin -// by Mischa Peters <mischa at high5 dot net> -// Copyright (c) 2002 - 2005 High5! -// Licensed under GPL for more info check GPL-LICENSE.TXT -// -// File: config.inc.php -// +/** + * Postfix Admin + * + * LICENSE + * This source file is subject to the GPL license that is bundled with + * this package in the file LICENSE.TXT. + * + * Further details on the project are available at : + * http://www.postfixadmin.com or http://postfixadmin.sf.net + * + * @version $Id$ + * @license GNU GPL v2 or later. + * + * File: config.inc.php + * Contains configuration options. + */ + if (ereg ("config.inc.php", $_SERVER['PHP_SELF'])) { header ("Location: login.php"); Modified: trunk/create-alias.php =================================================================== --- trunk/create-alias.php 2007-09-28 20:35:43 UTC (rev 106) +++ trunk/create-alias.php 2007-09-30 15:53:54 UTC (rev 107) @@ -1,27 +1,36 @@ <?php -// -// Postfix Admin -// by Mischa Peters <mischa at high5 dot net> -// Copyright (c) 2002 - 2005 High5! -// Licensed under GPL for more info check GPL-LICENSE.TXT -// -// File: create-alias.php -// -// Template File: create-alias.tpl -// -// Template Variables: -// -// tMessage -// tAddress -// tGoto -// tDomain -// -// Form POST \ GET Variables: -// -// fAddress -// fGoto -// fDomain -// +/** + * Postfix Admin + * + * LICENSE + * + * This source file is subject to the GPL license that is bundled with + * this package in the file LICENSE.TXT. + * + * Further details on the project are available at : + * http://www.postfixadmin.com or http://postfixadmin.sf.net + * + * File: create-alias.php + * Template File: create-alias.tpl + * Responsible for allowing for the creation of mail aliases. + * + * @version $Id$ + * @license GNU GPL v2 or later. + * + * Template Variables: + * + * tMessage + * tAddress + * tGoto + * tDomain + * + * Form POST \ GET Variables: + * + * fAddress + * fGoto + * fDomain + * + */ require_once('common.php'); @@ -39,110 +48,116 @@ if ($_SERVER['REQUEST_METHOD'] == "GET") { - - if (isset ($_GET['domain'])) $tDomain = escape_string ($_GET['domain']); - + if (isset ($_GET['domain'])) { + $tDomain = escape_string ($_GET['domain']); + } } if ($_SERVER['REQUEST_METHOD'] == "POST") { + if (isset ($_POST['fAddress']) && isset ($_POST['fDomain'])) { + $fAddress = escape_string($_POST['fAddress']) . "@" . escape_string ($_POST['fDomain']); + $fAddress = strtolower ($fAddress); + } - if (isset ($_POST['fAddress']) && isset ($_POST['fDomain'])) $fAddress = escape_string ($_POST['fAddress']) . "@" . escape_string ($_POST['fDomain']); - $fAddress = strtolower ($fAddress); - if (isset ($_POST['fGoto'])) $fGoto = escape_string ($_POST['fGoto']); - $fGoto = strtolower ($fGoto); - isset ($_POST['fActive']) ? $fActive = escape_string ($_POST['fActive']) : $fActive = "1"; - if (isset ($_POST['fDomain'])) $fDomain = escape_string ($_POST['fDomain']); + if (isset ($_POST['fGoto'])) { + $fGoto = escape_string ($_POST['fGoto']); + $fGoto = strtolower ($fGoto); + } + if(isset($_POST['fActive'])) { + $fActive = escape_string ($_POST['fActive']) + } + else { + $fActive = "1"; + } - if (!preg_match ('/@/',$fGoto)) - { - $fGoto = $fGoto . "@" . escape_string ($_POST['fDomain']); - } - - if (! (authentication_has_role('global-admin') || check_owner ($SESSID_USERNAME, $fDomain) )) - { - $error = 1; - $tAddress = escape_string ($_POST['fAddress']); - $tGoto = $fGoto; - $tDomain = $fDomain; - $pCreate_alias_address_text = $PALANG['pCreate_alias_address_text_error1']; - } + if(isset($_POST['fDomain'])) { + $fDomain = escape_string ($_POST['fDomain']); + } - if (!check_alias ($fDomain)) - { - $error = 1; - $tAddress = escape_string ($_POST['fAddress']); - $tGoto = $fGoto; - $tDomain = $fDomain; - $pCreate_alias_address_text = $PALANG['pCreate_alias_address_text_error3']; - } - - if (empty ($fAddress) or !check_email ($fAddress)) - { - $error = 1; - $tAddress = escape_string ($_POST['fAddress']); - $tGoto = $fGoto; - $tDomain = $fDomain; - $pCreate_alias_address_text = $PALANG['pCreate_alias_address_text_error1']; - } + if(!preg_match ('/@/',$fGoto)) { + $fGoto = $fGoto . "@" . escape_string ($_POST['fDomain']); + } - if (empty ($fGoto) or !check_email ($fGoto)) - { - $error = 1; - $tAddress = escape_string ($_POST['fAddress']); - $tGoto = $fGoto; - $tDomain = $fDomain; - $pCreate_alias_goto_text = $PALANG['pCreate_alias_goto_text_error']; - } + if(!(authentication_has_role('global-admin') || + check_owner ($SESSID_USERNAME, $fDomain) )) + { + $error = 1; + $tAddress = escape_string ($_POST['fAddress']); + $tGoto = $fGoto; + $tDomain = $fDomain; + $pCreate_alias_address_text = $PALANG['pCreate_alias_address_text_error1']; + } - if (escape_string ($_POST['fAddress']) == "*") $fAddress = "@" . escape_string ($_POST['fDomain']); + if(!check_alias($fDomain)) { + $error = 1; + $tAddress = escape_string ($_POST['fAddress']); + $tGoto = $fGoto; + $tDomain = $fDomain; + $pCreate_alias_address_text = $PALANG['pCreate_alias_address_text_error3']; + } - $result = db_query ("SELECT * FROM $table_alias WHERE address='$fAddress'"); - if ($result['rows'] == 1) - { - $error = 1; - $tAddress = escape_string ($_POST['fAddress']); - $tGoto = $fGoto; - $tDomain = $fDomain; - $pCreate_alias_address_text = $PALANG['pCreate_alias_address_text_error2']; - } + if(empty ($fAddress) || !check_email ($fAddress)) { + $error = 1; + $tAddress = escape_string ($_POST['fAddress']); + $tGoto = $fGoto; + $tDomain = $fDomain; + $pCreate_alias_address_text = $PALANG['pCreate_alias_address_text_error1']; + } - if ($fActive == "on") - { - $sqlActive = db_get_boolean(True); - } - else - { - $sqlActive = db_get_boolean(False); - } + if (empty($fGoto) || !check_email ($fGoto)) { + $error = 1; + $tAddress = escape_string ($_POST['fAddress']); + $tGoto = $fGoto; + $tDomain = $fDomain; + $pCreate_alias_goto_text = $PALANG['pCreate_alias_goto_text_error']; + } - if ($error != 1) - { - if (preg_match ('/^\*@(.*)$/', $fGoto, $match)) $fGoto = "@" . $match[1]; - - $result = db_query ("INSERT INTO $table_alias (address,goto,domain,created,modified,active) VALUES ('$fAddress','$fGoto','$fDomain',NOW(),NOW(),'$sqlActive')"); - if ($result['rows'] != 1) - { - $tDomain = $fDomain; - $tMessage = $PALANG['pCreate_alias_result_error'] . "<br />($fAddress -> $fGoto)<br />\n"; - } - else - { - db_log ($SESSID_USERNAME, $fDomain, 'create_alias', "$fAddress -> $fGoto"); + if (escape_string($_POST['fAddress']) == "*") { + $fAddress = "@" . escape_string ($_POST['fDomain']); + } - $tDomain = $fDomain; - $tMessage = $PALANG['pCreate_alias_result_success'] . "<br />($fAddress -> $fGoto)<br />\n"; - } - } + $result = db_query ("SELECT * FROM $table_alias WHERE address='$fAddress'"); + if ($result['rows'] == 1) { + $error = 1; + $tAddress = escape_string ($_POST['fAddress']); + $tGoto = $fGoto; + $tDomain = $fDomain; + $pCreate_alias_address_text = $PALANG['pCreate_alias_address_text_error2']; + } + if ($fActive == "on") { + $sqlActive = db_get_boolean(True); + } + else { + $sqlActive = db_get_boolean(False); + } + + if ($error != 1) { + if (preg_match('/^\*@(.*)$/', $fGoto, $match)) { + $fGoto = "@" . $match[1]; + } + + $result = db_query ("INSERT INTO $table_alias (address,goto,domain,created,modified,active) VALUES ('$fAddress','$fGoto','$fDomain',NOW(),NOW(),'$sqlActive')"); + if ($result['rows'] != 1) { + $tDomain = $fDomain; + $tMessage = $PALANG['pCreate_alias_result_error'] . "<br />($fAddress -> $fGoto)<br />\n"; + } + else { + db_log ($SESSID_USERNAME, $fDomain, 'create_alias', "$fAddress -> $fGoto"); + + $tDomain = $fDomain; + $tMessage = $PALANG['pCreate_alias_result_success'] . "<br />($fAddress -> $fGoto)<br />\n"; + } + } } include ("$incpath/templates/header.tpl"); if (authentication_has_role('global-admin')) { - include ("$incpath/templates/admin_menu.tpl"); + include ("$incpath/templates/admin_menu.tpl"); } else { - include ("$incpath/templates/menu.tpl"); + include ("$incpath/templates/menu.tpl"); } include ("$incpath/templates/create-alias.tpl"); Modified: trunk/create-mailbox.php =================================================================== --- trunk/create-mailbox.php 2007-09-28 20:35:43 UTC (rev 106) +++ trunk/create-mailbox.php 2007-09-30 15:53:54 UTC (rev 107) @@ -1,33 +1,42 @@ <?php -// -// Postfix Admin -// by Mischa Peters <mischa at high5 dot net> -// Copyright (c) 2002 - 2005 High5! -// Licensed under GPL for more info check GPL-LICENSE.TXT -// -// File: create-mailbox.php -// -// Template File: create-mailbox.tpl -// -// Template Variables: -// -// tMessage -// tUsername -// tName -// tQuota -// tDomain -// -// Form POST \ GET Variables: -// -// fUsername -// fPassword -// fPassword2 -// fName -// fQuota -// fDomain -// fActive -// fMail -// +/** + * Postfix Admin + * + * LICENSE + * This source file is subject to the GPL license that is bundled with + * this package in the file LICENSE.TXT. + * + * Further details on the project are available at : + * http://www.postfixadmin.com or http://postfixadmin.sf.net + * + * @version $Id$ + * @license GNU GPL v2 or later. + * + * File: create-mailbox.php + * Responsible for allowing for the creation of mail boxes + * + * @version $Id$ + * @license GNU GPL v2 or later. + * + * Template Variables: + * + * tMessage + * tUsername + * tName + * tQuota + * tDomain + * + * Form POST \ GET Variables: + * + * fUsername + * fPassword + * fPassword2 + * fName + * fQuota + * fDomain + * fActive + * fMail + */ require_once('common.php'); Modified: trunk/delete.php =================================================================== --- trunk/delete.php 2007-09-28 20:35:43 UTC (rev 106) +++ trunk/delete.php 2007-09-30 15:53:54 UTC (rev 107) @@ -1,23 +1,38 @@ <?php -// -// Postfix Admin -// by Mischa Peters <mischa at high5 dot net> -// Copyright (c) 2002 - 2005 High5! -// Licensed under GPL for more info check GPL-LICENSE.TXT -// -// File: delete.php -// -// Template File: message.tpl -// -// Template Variables: -// -// tMessage -// -// Form POST \ GET Variables: -// -// fDelete -// fDomain -// +/** + * Postfix Admin + * + * LICENSE + * This source file is subject to the GPL license that is bundled with + * this package in the file LICENSE.TXT. + * + * Further details on the project are available at : + * http://www.postfixadmin.com or http://postfixadmin.sf.net + * + * @version $Id$ + * @license GNU GPL v2 or later. + * + * File: delete.php + * Responsible for allowing for the deletion of domains; note if + * a domain is deleted, all mailboxes and aliases belonging to the + * domain are also removed. + * + * @version $Id$ + * @license GNU GPL v2 or later. + * + * Template Variables: + * + * Template File: message.tpl + * + * Template Variables: + * + * tMessage + * + * Form POST \ GET Variables: + * + * fDelete + * fDomain + */ require_once('common.php'); Modified: trunk/edit-active.php =================================================================== --- trunk/edit-active.php 2007-09-28 20:35:43 UTC (rev 106) +++ trunk/edit-active.php 2007-09-30 15:53:54 UTC (rev 107) @@ -1,25 +1,32 @@ <?php -// -// Postfix Admin -// by Mischa Peters <mischa at high5 dot net> -// Copyright (c) 2002 - 2005 High5! -// Licensed under GPL for more info check GPL-LICENSE.TXT -// -// File: edit-active.php -// -// Template File: message.tpl -// -// Template Variables: -// -// tMessage -// -// Form POST \ GET Variables: -// -// fUsername -// fDomain -// fReturn -// - +/** + * Postfix Admin + * + * LICENSE + * This source file is subject to the GPL license that is bundled with + * this package in the file LICENSE.TXT. + * + * Further details on the project are available at : + * http://www.postfixadmin.com or http://postfixadmin.sf.net + * + * @version $Id$ + * @license GNU GPL v2 or later. + * + * File: edit-active.php + * Responsible for toggling the active status of a mailbox. + * + * Template File: message.tpl + * + * Template Variables: + * + * tMessage + * + * Form POST \ GET Variables: + * + * fUsername + * fDomain + * fReturn + */ require_once('common.php'); authentication_require_role('admin'); Modified: trunk/edit-alias.php =================================================================== --- trunk/edit-alias.php 2007-09-28 20:35:43 UTC (rev 106) +++ trunk/edit-alias.php 2007-09-30 15:53:54 UTC (rev 107) @@ -1,25 +1,33 @@ <?php -// -// Postfix Admin -// by Mischa Peters <mischa at high5 dot net> -// Copyright (c) 2002 - 2005 High5! -// Licensed under GPL for more info check GPL-LICENSE.TXT -// -// File: edit-alias.php -// -// Template File: edit-alias.tpl -// -// Template Variables: -// -// tMessage -// tGoto -// -// Form POST \ GET Variables: -// -// fAddress -// fDomain -// fGoto -// +/** + * Postfix Admin + * + * LICENSE + * This source file is subject to the GPL license that is bundled with + * this package in the file LICENSE.TXT. + * + * Further details on the project are available at : + * http://www.postfixadmin.com or http://postfixadmin.sf.net + * + * @version $Id$ + * @license GNU GPL v2 or later. + * + * File: edit-alias.php + * Used to update an alias. + * + * Template File: edit-alias.tpl + * + * Template Variables: + * + * tMessage + * tGoto + * + * Form POST \ GET Variables: + * + * fAddress + * fDomain + * fGoto + */ require_once('common.php'); Modified: trunk/edit-mailbox.php =================================================================== --- trunk/edit-mailbox.php 2007-09-28 20:35:43 UTC (rev 106) +++ trunk/edit-mailbox.php 2007-09-30 15:53:54 UTC (rev 107) @@ -1,30 +1,37 @@ <?php -// -// Postfix Admin -// by Mischa Peters <mischa at high5 dot net> -// Copyright (c) 2002 - 2005 High5! -// Licensed under GPL for more info check GPL-LICENSE.TXT -// -// File: edit-mailbox.php -// -// Template File: edit-mailbox.tpl -// -// Template Variables: -// -// tMessage -// tName -// tQuota -// -// Form POST \ GET Variables: -// -// fUsername -// fDomain -// fPassword -// fPassword2 -// fName -// fQuota -// fActive -// +/** + * Postfix Admin + * + * LICENSE + * This source file is subject to the GPL license that is bundled with + * this package in the file LICENSE.TXT. + * + * Further details on the project are available at : + * http://www.postfixadmin.com or http://postfixadmin.sf.net + * + * @version $Id$ + * @license GNU GPL v2 or later. + * + * File: edit-mailbox.php + * Used to update an existing mailboxes settings. + * Template File: edit-mailbox.tpl + * + * Template Variables: + * + * tMessage + * tName + * tQuota + * + * Form POST \ GET Variables: + * + * fUsername + * fDomain + * fPassword + * fPassword2 + * fName + * fQuota + * fActive + */ require_once('common.php'); Modified: trunk/edit-vacation.php =================================================================== --- trunk/edit-vacation.php 2007-09-28 20:35:43 UTC (rev 106) +++ trunk/edit-vacation.php 2007-09-30 15:53:54 UTC (rev 107) @@ -1,33 +1,39 @@ <?php -// XXX TODO - Remove the code duplication between this file (for admins) and users/vacation.php -// - too much of the code is identical for there not to be some refactoring possible. -// -// Postfix Admin -// by Mischa Peters <mischa at high5 dot net> -// Copyright (c) 2002 - 2007 High5! -// Licensed under GPL for more info check GPL-LICENSE.TXT -// -// File: edit-vacation.php -// -// Template File: edit-vacation.tpl -// -// Template Variables: -// -// tUseremail -// tMessage -// tSubject -// tBody -// -// Form POST \ GET Variables: -// -// fUsername -// fDomain -// fCanceltarget -// fChange -// fBack -// fQuota -// fActive -// +/** + * Postfix Admin + * + * LICENSE + * This source file is subject to the GPL license that is bundled with + * this package in the file LICENSE.TXT. + * + * Further details on the project are available at : + * http://www.postfixadmin.com or http://postfixadmin.sf.net + * + * @version $Id$ + * @license GNU GPL v2 or later. + * + * File: edit-vacation.php + * Responsible for allowing users to update their vacation status. + * + * Template File: edit-vacation.tpl + * + * Template Variables: + * + * tUseremail + * tMessage + * tSubject + * tBody + * + * Form POST \ GET Variables: + * + * fUsername + * fDomain + * fCanceltarget + * fChange + * fBack + * fQuota + * fActive + */ require_once('common.php'); Modified: trunk/functions.inc.php =================================================================== --- trunk/functions.inc.php 2007-09-28 20:35:43 UTC (rev 106) +++ trunk/functions.inc.php 2007-09-30 15:53:54 UTC (rev 107) @@ -1,13 +1,20 @@ <?php -// -// Postfix Admin -// by Mischa Peters <mischa at high5 dot net> -// Copyright (c) 2002 - 2005 High5! -// Licensed under GPL for more info check GPL-LICENSE.TXT -// -// File: functions.inc.php -// -//error_reporting (E_NOTICE | E_ERROR | E_WARNING | E_PARSE); +/** + * Postfix Admin + * + * LICENSE + * This source file is subject to the GPL license that is bundled with + * this package in the file LICENSE.TXT. + * + * Further details on the project are available at : + * http://www.postfixadmin.com or http://postfixadmin.sf.net + * + * @version $Id$ + * @license GNU GPL v2 or later. + * + * File: functions.inc.php + * Contains re-usable code. + */ if (ereg ("functions.inc.php", $_SERVER['PHP_SELF'])) { Modified: trunk/index.php =================================================================== --- trunk/index.php 2007-09-28 20:35:43 UTC (rev 106) +++ trunk/index.php 2007-09-30 15:53:54 UTC (rev 107) @@ -1,22 +1,26 @@ <?php -// -// Postfix Admin -// by Mischa Peters <mischa at high5 dot net> -// Copyright (c) 2002 - 2005 High5! -// Licensed under GPL for more info check GPL-LICENSE.TXT -// -// File: index.php -// -// Template File: -none- -// -// Template Variables: -// -// -none- -// -// Form POST \ GET Variables: -// -// -none- -// +/** + * Postfix Admin + * + * LICENSE + * This source file is subject to the GPL license that is bundled with + * this package in the file LICENSE.TXT. + * + * Further details on the project are available at : + * http://www.postfixadmin.com or http://postfixadmin.sf.net + * + * @version $Id$ + * @license GNU GPL v2 or later. + * + * File: index.php + * Shows a sort-of welcome page. + * Template File: -none- + * + * Template Variables: -none- + * + * Form POST \ GET Variables: -none- + */ + if (!file_exists (realpath ("./setup.php"))) { header ("Location: login.php"); Modified: trunk/login.php =================================================================== --- trunk/login.php 2007-09-28 20:35:43 UTC (rev 106) +++ trunk/login.php 2007-09-30 15:53:54 UTC (rev 107) @@ -1,24 +1,31 @@ <?php -// -// Postfix Admin -// by Mischa Peters <mischa at high5 dot net> -// Copyright (c) 2002 - 2005 High5! -// Licensed under GPL for more info check GPL-LICENSE.TXT -// -// File: login.php -// -// Template File: login.tpl -// -// Template Variables: -// -// tMessage -// tUsername -// -// Form POST \ GET Variables: -// -// fUsername -// fPassword -// +/** + * Postfix Admin + * + * LICENSE + * This source file is subject to the GPL license that is bundled with + * this package in the file LICENSE.TXT. + * + * Further details on the project are available at : + * http://www.postfixadmin.com or http://postfixadmin.sf.net + * + * @version $Id$ + * @license GNU GPL v2 or later. + * + * File: login.php + * Authenticates a user, and populates their $_SESSION as appropriate. + * Template File: login.tpl + * + * Template Variables: + * + * tMessage + * tUsername + * + * Form POST \ GET Variables: + * + * fUsername + * fPassword + */ require_once('common.php'); if ($_SERVER['REQUEST_METHOD'] == "GET") Modified: trunk/logout.php =================================================================== --- trunk/logout.php 2007-09-28 20:35:43 UTC (rev 106) +++ trunk/logout.php 2007-09-30 15:53:54 UTC (rev 107) @@ -1,22 +1,25 @@ <?php -// -// Postfix Admin -// by Mischa Peters <mischa at high5 dot net> -// Copyright (c) 2002 - 2005 High5! -// Licensed under GPL for more info check GPL-LICENSE.TXT -// -// File: logout.php -// -// Template File: -none- -// -// Template Variables: -// -// -none- -// -// Form POST \ GET Variables: -// -// -none- -// +/** + * Postfix Admin + * + * LICENSE + * This source file is subject to the GPL license that is bundled with + * this package in the file LICENSE.TXT. + * + * Further details on the project are available at : + * http://www.postfixadmin.com or http://postfixadmin.sf.net + * + * @version $Id$ + * @license GNU GPL v2 or later. + * + * File: logout.php + * De-authenticates a user. + * Template File: -none- + * + * Template Variables: -none- + * + * Form POST \ GET Variables: -none- + */ require_once('common.php'); Modified: trunk/main.php =================================================================== --- trunk/main.php 2007-09-28 20:35:43 UTC (rev 106) +++ trunk/main.php 2007-09-30 15:53:54 UTC (rev 107) @@ -1,22 +1,25 @@ <?php -// -// Postfix Admin -// by Mischa Peters <mischa at high5 dot net> -// Copyright (c) 2002 - 2005 High5! -// Licensed under GPL for more info check GPL-LICENSE.TXT -// -// File: main.php -// -// Template File: main.tpl -// -// Template Variables: -// -// -none- -// -// Form POST \ GET Variables: -// -// -none- -// +/** + * Postfix Admin + * + * LICENSE + * This source file is subject to the GPL license that is bundled with + * this package in the file LICENSE.TXT. + * + * Further details on the project are available at : + * http://www.postfixadmin.com or http://postfixadmin.sf.net + * + * @version $Id$ + * @license GNU GPL v2 or later. + * + * File: main.php + * Displays a menu/home page. + * Template File: main.tpl + * + * Template Variables: -none- + * + * Form POST \ GET Variables: -none- + */ require_once('common.php'); @@ -24,19 +27,8 @@ authentication_require_role('admin'); -if ($_SERVER["REQUEST_METHOD"] == "GET") -{ - include ("./templates/header.tpl"); - include ("./templates/menu.tpl"); - include ("./templates/main.tpl"); - include ("./templates/footer.tpl"); -} - -if ($_SERVER["REQUEST_METHOD"] == "POST") -{ - include ("./templates/header.tpl"); - include ("./templates/menu.tpl"); - include ("./templates/main.tpl"); - include ("./templates/footer.tpl"); -} +include ("./templates/header.tpl"); +include ("./templates/menu.tpl"); +include ("./templates/main.tpl"); +include ("./templates/footer.tpl"); ?> Modified: trunk/overview.php =================================================================== --- trunk/overview.php 2007-09-28 20:35:43 UTC (rev 106) +++ trunk/overview.php 2007-09-30 15:53:54 UTC (rev 107) @@ -1,28 +1,36 @@ <?php -// -// Postfix Admin -// by Mischa Peters <mischa at high5 dot net> -// Copyright (c) 2002 - 2005 High5! -// Licensed under GPL for more info check GPL-LICENSE.TXT -// -// File: overview.php -// -// Template File: overview.tpl -// -// Template Variables: -// -// tAlias -// tDomain -// tMailbox -// tDisplay_back -// tDisplay_next -// -// Form POST \ GET Variables: -// -// domain -// fDomain -// limit -// +/** + * Postfix Admin + * + * LICENSE + * This source file is subject to the GPL license that is bundled with + * this package in the file LICENSE.TXT. + * + * Further details on the project are available at : + * http://www.postfixadmin.com or http://postfixadmin.sf.net + * + * @version $Id$ + * @license GNU GPL v2 or later. + * + * File: overview.php + * Shows an overview for admins. + * + * Template File: overview.tpl + * + * Template Variables: + * + * tAlias + * tDomain + * tMailbox + * tDisplay_back + * tDisplay_next + * + * Form POST \ GET Variables: + * + * domain + * fDomain + * limit + */ require_once('common.php'); Modified: trunk/password.php =================================================================== --- trunk/password.php 2007-09-28 20:35:43 UTC (rev 106) +++ trunk/password.php 2007-09-30 15:53:54 UTC (rev 107) @@ -1,24 +1,31 @@ <?php -// -// Postfix Admin -// by Mischa Peters <mischa at high5 dot net> -// Copyright (c) 2002 - 2005 High5! -// Licensed under GPL for more info check GPL-LICENSE.TXT -// -// File: password.php -// -// Template File: password.tpl -// -// Template Variables: -// -// tMessage -// -// Form POST \ GET Variables: -// -// fPassword_current -// fPassword -// fPassword2 -// +/** + * Postfix Admin + * + * LICENSE + * This source file is subject to the GPL license that is bundled with + * this package in the file LICENSE.TXT. + * + * Further details on the project are available at : + * http://www.postfixadmin.com or http://postfixadmin.sf.net + * + * @version $Id$ + * @license GNU GPL v2 or later. + * + * File: password.php + * Allows admins to change their own password. + * Template File: password.tpl + * + * Template Variables: + * + * tMessage + * + * Form POST \ GET Variables: + * + * fPassword_current + * fPassword + * fPassword2 + */ require_once('common.php'); Modified: trunk/search.php =================================================================== --- trunk/search.php 2007-09-28 20:35:43 UTC (rev 106) +++ trunk/search.php 2007-09-30 15:53:54 UTC (rev 107) @@ -1,35 +1,42 @@ <?php -// -// Postfix Admin -// by Mischa Peters <mischa at high5 dot net> -// Copyright (c) 2002 - 2005 High5! -// Licensed under GPL for more info check GPL-LICENSE.TXT -// -// File: search.php -// -// Template File: search.tpl -// -// Template Variables: -// -// tAlias -// tMailbox -// -// Form POST \ GET Variables: -// -// fSearch -// fGo -// fDomain -// +/** + * Postfix Admin + * + * LICENSE + * This source file is subject to the GPL license that is bundled with + * this package in the file LICENSE.TXT. + * + * Further details on the project are available at : + * http://www.postfixadmin.com or http://postfixadmin.sf.net + * + * @version $Id$ + * @license GNU GPL v2 or later. + * + * File: search.php + * Provides a method for searching for a user/mailbox + * Template File: search.tpl + * + * Template Variables: + * + * tAlias + * tMailbox + * + * Form POST \ GET Variables: + * + * fSearch + * fGo + * fDomain + */ require_once('common.php'); authentication_require_role('admin'); $SESSID_USERNAME = authentication_get_username(); if(authentication_has_role('global-admin')) { - $list_domains = list_domains (); + $list_domains = list_domains (); } else { - $list_domains = list_domains_for_admin ($SESSID_USERNAME); + $list_domains = list_domains_for_admin ($SESSID_USERNAME); } @@ -38,140 +45,140 @@ if ($_SERVER['REQUEST_METHOD'] == "GET") { - if (isset ($_GET['search'])) $fSearch = escape_string ($_GET['search']); + if (isset ($_GET['search'])) $fSearch = escape_string ($_GET['search']); - if ($CONF['alias_control_admin'] == "YES") - { - $query = "SELECT $table_alias.address,$table_alias.goto,$table_alias.modified,$table_alias.domain,$table_alias.active FROM $table_alias WHERE $table_alias.address LIKE '%$fSearch%' OR $table_alias.goto LIKE '%$fSearch%' ORDER BY $table_alias.address"; - } - else - { - $query = "SELECT $table_alias.address,$table_alias.goto,$table_alias.modified,$table_alias.domain,$table_alias.active FROM $table_alias LEFT JOIN $table_mailbox ON $table_alias.address=$table_mailbox.username WHERE $table_alias.address LIKE '%$fSearch%' AND $table_mailbox.maildir IS NULL ORDER BY $table_alias.address"; - } + if ($CONF['alias_control_admin'] == "YES") + { + $query = "SELECT $table_alias.address,$table_alias.goto,$table_alias.modified,$table_alias.domain,$table_alias.active FROM $table_alias WHERE $table_alias.address LIKE '%$fSearch%' OR $table_alias.goto LIKE '%$fSearch%' ORDER BY $table_alias.address"; + } + else + { + $query = "SELECT $table_alias.address,$table_alias.goto,$table_alias.modified,$table_alias.domain,$table_alias.active FROM $table_alias LEFT JOIN $table_mailbox ON $table_alias.address=$table_mailbox.username WHERE $table_alias.address LIKE '%$fSearch%' AND $table_mailbox.maildir IS NULL ORDER BY $table_alias.address"; + } - $result = db_query ($query); - if ($result['rows'] > 0) - { - while ($row = db_array ($result['result'])) - { - if (check_owner ($SESSID_USERNAME, $row['domain'])) - { - if ('pgsql'==$CONF['database_type']) + $result = db_query ($query); + if ($result['rows'] > 0) + { + while ($row = db_array ($result['result'])) + { + if (check_owner ($SESSID_USERNAME, $row['domain'])) { - $row['modified']=gmstrftime('%c %Z',$row['modified']); - $row['active']=('t'==$row['active']) ? 1 : 0; - } - $tAlias[] = $row; - } - } - } + if ('pgsql'==$CONF['database_type']) + { + $row['modified']=gmstrftime('%c %Z',$row['modified']); + $row['active']=('t'==$row['active']) ? 1 : 0; + } + $tAlias[] = $row; + } + } + } - if ($CONF['vacation_control_admin'] == 'YES') - { - $query = ("SELECT $table_mailbox.*, $table_vacation.active AS v_active FROM $table_mailbox LEFT JOIN $table_vacation ON $table_mailbox.username=$table_vacation.email WHERE $table_mailbox.username LIKE '%$fSearch%' OR $table_mailbox.name LIKE '%$fSearch%' ORDER BY $table_mailbox.username"); - } - else - { - $query = "SELECT * FROM $table_mailbox WHERE username LIKE '%$fSearch%' OR name LIKE '%$fSearch%' ORDER BY username"; - } + if ($CONF['vacation_control_admin'] == 'YES') + { + $query = ("SELECT $table_mailbox.*, $table_vacation.active AS v_active FROM $table_mailbox LEFT JOIN $table_vacation ON $table_mailbox.username=$table_vacation.email WHERE $table_mailbox.username LIKE '%$fSearch%' OR $table_mailbox.name LIKE '%$fSearch%' ORDER BY $table_mailbox.username"); + } + else + { + $query = "SELECT * FROM $table_mailbox WHERE username LIKE '%$fSearch%' OR name LIKE '%$fSearch%' ORDER BY username"; + } - $result = db_query ($query); - if ($result['rows'] > 0) - { - while ($row = db_array ($result['result'])) - { - if (check_owner ($SESSID_USERNAME, $row['domain'])) - { - if ('pgsql'==$CONF['database_type']) + $result = db_query ($query); + if ($result['rows'] > 0) + { + while ($row = db_array ($result['result'])) + { + if (check_owner ($SESSID_USERNAME, $row['domain'])) { - $row['modified']=gmstrftime('%c %Z',$row['modified']); - $row['active']=('t'==$row['active']) ? 1 : 0; - } - $tMailbox[] = $row; - } - } - } + if ('pgsql'==$CONF['database_type']) + { + $row['modified']=gmstrftime('%c %Z',$row['modified']); + $row['active']=('t'==$row['active']) ? 1 : 0; + } + $tMailbox[] = $row; + } + } + } - include ("./templates/header.tpl"); - include ("./templates/menu.tpl"); - include ("./templates/search.tpl"); - include ("./templates/footer.tpl"); + include ("./templates/header.tpl"); + include ("./templates/menu.tpl"); + include ("./templates/search.tpl"); + include ("./templates/footer.tpl"); } if ($_SERVER['REQUEST_METHOD'] == "POST") { - if (isset ($_POST['search'])) $fSearch = escape_string ($_POST['search']); - if (isset ($_POST['fGo'])) $fGo = escape_string ($_POST['fGo']); - if (isset ($_POST['fDomain'])) $fDomain = escape_string ($_POST['fDomain']); + if (isset ($_POST['search'])) $fSearch = escape_string ($_POST['search']); + if (isset ($_POST['fGo'])) $fGo = escape_string ($_POST['fGo']); + if (isset ($_POST['fDomain'])) $fDomain = escape_string ($_POST['fDomain']); - if (empty ($fSearch) && !empty ($fGo)) - { - if (authentication_has_role('global-admin')) - { - header("Location: list-virtual.php?domain=" . $fDomain ) && exit; - } - else - { - header("Location: overview.php?domain=" . $fDomain ) && exit; - } - } + if (empty ($fSearch) && !empty ($fGo)) + { + if (authentication_has_role('global-admin')) + { + header("Location: list-virtual.php?domain=" . $fDomain ) && exit; + } + else + { + header("Location: overview.php?domain=" . $fDomain ) && exit; + } + } - if ($CONF['alias_control_admin'] == "YES") - { - $query = "SELECT $table_alias.address,$table_alias.goto,$table_alias.modified,$table_alias.domain,$table_alias.active FROM $table_alias WHERE $table_alias.address LIKE '%$fSearch%' OR $table_alias.goto LIKE '%$fSearch%' ORDER BY $table_alias.address"; - } - else - { - $query = "SELECT $table_alias.address,$table_alias.goto,$table_alias.modified,$table_alias.domain,$table_alias.active FROM $table_alias LEFT JOIN $table_mailbox ON $table_alias.address=$table_mailbox.username WHERE $table_alias.address LIKE '%$fSearch%' AND $table_mailbox.maildir IS NULL ORDER BY $table_alias.address"; - } + if ($CONF['alias_control_admin'] == "YES") + { +... [truncated message content] |
From: <chr...@us...> - 2007-10-03 00:51:44
|
Revision: 121 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=121&view=rev Author: christian_boltz Date: 2007-10-02 17:51:47 -0700 (Tue, 02 Oct 2007) Log Message: ----------- - merge admin_list-virtual.tpl into overview.tpl - deleted admin_list-virtual.tpl - admin/list-virtual.php now uses overview.tpl template Modified Paths: -------------- trunk/admin/list-virtual.php trunk/templates/overview.tpl Removed Paths: ------------- trunk/templates/admin_list-virtual.tpl Modified: trunk/admin/list-virtual.php =================================================================== --- trunk/admin/list-virtual.php 2007-10-02 23:31:47 UTC (rev 120) +++ trunk/admin/list-virtual.php 2007-10-03 00:51:47 UTC (rev 121) @@ -15,7 +15,7 @@ * File: list-virtual.php * List virtual users for a domain. * - * Template File: admin_list-virtual.tpl + * Template File: overview.tpl * * Template Variables: * @@ -160,7 +160,7 @@ include ("../templates/header.tpl"); include ("../templates/admin_menu.tpl"); -include ("../templates/admin_list-virtual.tpl"); +include ("../templates/overview.tpl"); include ("../templates/footer.tpl"); /* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ Deleted: trunk/templates/admin_list-virtual.tpl =================================================================== --- trunk/templates/admin_list-virtual.tpl 2007-10-02 23:31:47 UTC (rev 120) +++ trunk/templates/admin_list-virtual.tpl 2007-10-03 00:51:47 UTC (rev 121) @@ -1,259 +0,0 @@ -<div id="admin_virtual"> -<form name="overview" method="post"> -<select name="fDomain" onChange="this.form.submit();"> -<?php -for ($i = 0; $i < sizeof ($list_domains); $i++) -{ - if ($fDomain == $list_domains[$i]) - { - print "<option value=\"$list_domains[$i]\" selected>$list_domains[$i]</option>\n"; - } - else - { - print "<option value=\"$list_domains[$i]\">$list_domains[$i]</option>\n"; - } -} -?> -</select> -<input type="hidden" name="limit" value="0" /> -<input type="submit" name="go" value="<?php print $PALANG['pAdminList_virtual_button']; ?>" /> -</form> -<h4><?php print $PALANG['pAdminList_virtual_welcome'] . $fDomain; ?></h4> -<p><?php print $PALANG['pAdminList_virtual_alias_alias_count'] . ": " . $limit['alias_count'] . " / " . $limit['aliases']; ?></p> -<p><?php print $PALANG['pAdminList_virtual_alias_mailbox_count'] . ": " . $limit['mailbox_count'] . " / " . $limit['mailboxes']; ?></p> -<form name="search" method="post" action="search.php"><?php print $PALANG['pSearch']; ?>: -<input type="textbox" name="search" size="10" /> -</form> -</div> - -<div id="nav_bar"> - <table width=730><colgroup span="1"><col width="550"></col></colgroup> - <tr><td align=left > -<?php -if ($limit['alias_pgindex_count'] ) print "<b>".$PALANG['pOverview_alias_title']."</b>  "; -($tDisplay_back_show == 1) ? $highlight_at = $tDisplay_back / $CONF['page_size'] + 1 : $highlight_at = 0; -$current_limit=$highlight_at * $CONF['page_size']; -for ($i = 0; $i < $limit['alias_pgindex_count']; $i++) -{ - if ( $i == $highlight_at ) - { - print "<a href=\"list-virtual.php?domain=$fDomain&limit=" . $i * $CONF['page_size'] . "\"><b>" . $limit['alias_pgindex'][$i] . "</b></a>\n"; - } - else - { - print "<a href=\"list-virtual.php?domain=$fDomain&limit=" . $i * $CONF['page_size'] . "\">" . $limit['alias_pgindex'][$i] . "</a>\n"; - } -} -print "</td><td valign=middle align=right>"; - -if ($tDisplay_back_show == 1) -{ - print "<a href=\"list-virtual.php?domain=$fDomain&limit=$tDisplay_back\"><img border=\"0\" src=\"../images/arrow-l.png\" title=\"" . $PALANG['pOverview_left_arrow'] . "\" alt=\"" . $PALANG['pOverview_left_arrow'] . "\" /></a>\n"; -} -if ($tDisplay_up_show == 1) -{ - print "<a href=\"list-virtual.php?domain=$fDomain&limit=0\"><img border=\"0\" src=\"../images/arrow-u.png\" title=\"" . $PALANG['pOverview_up_arrow'] . "\" alt=\"" . $PALANG['pOverview_up_arrow'] . "\" /></a>\n"; -} -if ($tDisplay_next_show == 1) -{ - print "<a href=\"list-virtual.php?domain=$fDomain&limit=$tDisplay_next\"><img border=\"0\" src=\"../images/arrow-r.png\" title=\"" . $PALANG['pOverview_right_arrow'] . "\" alt=\"" . $PALANG['pOverview_right_arrow'] . "\" /></a>\n"; -} -print "</td></tr></table></div>\n"; - - -if (sizeof ($tAlias) > 0) -{ - print "<table id=\"alias_table\">\n"; - print " <tr>\n"; - print " <td colspan=\"6\"><h3>" . $PALANG['pOverview_alias_title'] . "</h3></td>"; - print " </tr>"; - print " <tr class=\"header\">\n"; - if ($CONF['show_status'] == 'YES') { print "<td></td>\n"; } - print " <td>" . $PALANG['pAdminList_virtual_alias_address'] . "</td>\n"; - print " <td>" . $PALANG['pAdminList_virtual_alias_goto'] . "</td>\n"; - print " <td>" . $PALANG['pAdminList_virtual_alias_modified'] . "</td>\n"; - print " <td>" . $PALANG['pAdminList_virtual_alias_active'] . "</td>\n"; - print " <td colspan=\"2\"> </td>\n"; - print " </tr>\n"; - - for ($i = 0; $i < sizeof ($tAlias); $i++) - { - if ((is_array ($tAlias) and sizeof ($tAlias) > 0)) - { - print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n"; - if ($CONF['show_status'] == 'YES') - { - print " <td>" . gen_show_status($tAlias[$i]['address']) . "</td>\n"; - } - - print " <td>" . $tAlias[$i]['address'] . "</td>\n"; - if ($CONF['alias_goto_limit'] > 0) { - print " <td>" . ereg_replace (",", "<br>", preg_replace('/^(([^,]+,){'.$CONF['alias_goto_limit'].'})[^,]+,.*/','$1[and '. (substr_count ($tAlias[$i]['goto'], ',') - $CONF['alias_goto_limit'] + 1) .' more...]',$tAlias[$i]['goto'])) . "</td>\n"; - } else { - print " <td>" . ereg_replace (",", "<br>", $tAlias[$i]['goto']) . "</td>\n"; - } - print " <td>" . $tAlias[$i]['modified'] . "</td>\n"; - $active = ($tAlias[$i]['active'] == 1) ? $PALANG['YES'] : $PALANG['NO']; - print " <td><a href=\"edit-active.php?alias=" . urlencode ($tAlias[$i]['address']) . "&domain=$fDomain&return=list-virtual.php?domain=$fDomain" . urlencode ("&limit=" . $current_limit) . "\">" . $active . "</a></td>\n"; - print " <td><a href=\"edit-alias.php?address=" . urlencode ($tAlias[$i]['address']) . "&domain=$fDomain" . "\">" . $PALANG['edit'] . "</a></td>\n"; - print " <td><a href=\"delete.php?table=alias" . "&delete=" . urlencode ($tAlias[$i]['address']) . "&domain=$fDomain" . "\"onclick=\"return confirm ('" . $PALANG['confirm'] . $PALANG['pOverview_get_aliases'] . ": ". $tAlias[$i]['address'] . "')\">" . $PALANG['del'] . "</a></td>\n"; - print " </tr>\n"; - } - } - print "</table>\n"; -} -if($tCanAddAlias) { - print "<p><a href=\"create-alias.php?domain=$fDomain\">" . $PALANG['pMenu_create_alias'] . "</a>\n"; -} - - print "<div id=\"nav_bar\"><a name=\"MidArrow\" /a>\n<table width=730><colgroup span=\"1\"> <col width=\"550\"></col></colgroup> <tr><td align=left >"; - if ( $limit['mbox_pgindex_count'] ) print "<b>".$PALANG['pOverview_mailbox_title']."</b>  "; - ($tDisplay_back_show == 1) ? $highlight_at = $tDisplay_back / $CONF['page_size'] + 1 : $highlight_at = 0; - for ($i = 0; $i < $limit['mbox_pgindex_count']; $i++) - { - if ( $i == $highlight_at ) - { - print "<a href=\"list-virtual.php?domain=$fDomain&limit=" . $i * $CONF['page_size'] . "#MidArrow\"><b>" . $limit['mbox_pgindex'][$i] . "</b></a>\n"; - } - else - { - print "<a href=\"list-virtual.php?domain=$fDomain&limit=" . $i * $CONF['page_size'] . "#MidArrow\">" . $limit['mbox_pgindex'][$i] . "</a>\n"; - } - } - print "</td><td valign=middle align=right>"; - - -if ($tDisplay_back_show == 1) -{ - print "<a href=\"list-virtual.php?domain=$fDomain&limit=$tDisplay_back#MidArrow\"><img border=\"0\" src=\"../images/arrow-l.png\" title=\"" . $PALANG['pOverview_left_arrow'] . "\" alt=\"" . $PALANG['pOverview_left_arrow'] . "\" /></a>\n"; -} -if ($tDisplay_up_show == 1) -{ - print "<a href=\"list-virtual.php?domain=$fDomain&limit=0#MidArrow\"><img border=\"0\" src=\"../images/arrow-u.png\" title=\"" . $PALANG['pOverview_up_arrow'] . "\" alt=\"" . $PALANG['pOverview_up_arrow'] . "\" /></a>\n"; -} -if ($tDisplay_next_show == 1) -{ - print "<a href=\"list-virtual.php?domain=$fDomain&limit=$tDisplay_next#MidArrow\"><img border=\"0\" src=\"../images/arrow-r.png\" title=\"" . $PALANG['pOverview_right_arrow'] . "\" alt=\"" . $PALANG['pOverview_right_arrow'] . "\" /></a>\n"; -} -print "</td></tr></table></div>\n"; - - -if (sizeof ($tMailbox) > 0) -{ - print "<table id=\"mailbox_table\">\n"; - print " <tr>\n"; - print " <td colspan=\"7\"><h3>" . $PALANG['pOverview_mailbox_title'] . "</h3></td>"; - print " </tr>"; - print " <tr class=\"header\">\n"; - if ($CONF['show_status'] == 'YES') { print "<td></td>\n"; } - print " <td>" . $PALANG['pAdminList_virtual_mailbox_username'] . "</td>\n"; - print " <td>" . $PALANG['pAdminList_virtual_mailbox_name'] . "</td>\n"; - if ($CONF['quota'] == 'YES') print " <td>" . $PALANG['pAdminList_virtual_mailbox_quota'] . "</td>\n"; - print " <td>" . $PALANG['pAdminList_virtual_mailbox_modified'] . "</td>\n"; - print " <td>" . $PALANG['pAdminList_virtual_mailbox_active'] . "</td>\n"; - if ($CONF['alias_control'] == 'YES') - { - print " <td colspan=\"3\"> </td>\n"; - } - else - { - print " <td colspan=\"2\"> </td>\n"; - } - print " </tr>\n"; - - for ($i = 0; $i < sizeof ($tMailbox); $i++) - { - if ((is_array ($tMailbox) and sizeof ($tMailbox) > 0)) - { - print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n"; - - if ($CONF['show_status'] == 'YES') - { - print " <td>" . gen_show_status($tMailbox[$i]['username']) . "</td>\n"; - } - - print " <td>" . $tMailbox[$i]['username'] . "</td>\n"; - print " <td>" . $tMailbox[$i]['name'] . "</td>\n"; - if ($CONF['quota'] == 'YES') - { - print " <td>"; - if ($tMailbox[$i]['quota'] == 0) - { - print $PALANG['pOverview_unlimited']; - } - elseif ($tMailbox[$i]['quota'] < 0) - { - print $PALANG['pOverview_disabled']; - } - else - { - print divide_quota ($tMailbox[$i]['quota']); - } - print "</td>\n"; - } - print " <td>" . $tMailbox[$i]['modified'] . "</td>\n"; - $active = ($tMailbox[$i]['active'] == 1) ? $PALANG['YES'] : $PALANG['NO']; - print " <td><a href=\"edit-active.php?username=" . urlencode ($tMailbox[$i]['username']) . "&domain=$fDomain" . "\">" . $active . "</a></td>\n"; - - if ($CONF['vacation_control_admin'] == 'YES') - { - $v_active = ($tMailbox[$i]['v_active'] == 1) ? $PALANG['pOverview_vacation_edit'] : $PALANG['pOverview_vacation_option']; - print " <td><a href=\"edit-vacation.php?username=" . urlencode ($tMailbox[$i]['username']) . "&domain=$fDomain" . "\">" .$v_active . "</a></td>\n"; - } - - if ($CONF['alias_control'] == 'YES') - { - print " <td><a href=\"edit-alias.php?address=" . urlencode ($tMailbox[$i]['username']) . "&domain=$fDomain" . "\">" . $PALANG['pOverview_alias_edit'] . "</a></td>\n"; - } - print " <td><a href=\"edit-mailbox.php?username=" . urlencode ($tMailbox[$i]['username']) . "&domain=$fDomain" . "\">" . $PALANG['edit'] . "</a></td>\n"; - print " <td><a href=\"delete.php?table=mailbox" . "&delete=" . urlencode ($tMailbox[$i]['username']) . "&domain=$fDomain" . "\"onclick=\"return confirm ('" . $PALANG['confirm'] . $PALANG['pOverview_get_mailboxes'] . ": ". $tMailbox[$i]['username'] . "')\">" . $PALANG['del'] . "</a></td>\n"; - print " </tr>\n"; - } - } - print "</table>\n"; - print "<div id=\"nav_bar\"><a name=\"LowArrow\" /a>\n"; - if ($tDisplay_back_show == 1) - { - print "<a href=\"list-virtual.php?domain=$fDomain&limit=$tDisplay_back#LowArrow\"><img border=\"0\" src=\"../images/arrow-l.png\" title=\"" . $PALANG['pOverview_left_arrow'] . "\" alt=\"" . $PALANG['pOverview_left_arrow'] . "\" /></a>\n"; - } - if ($tDisplay_up_show == 1) - { - print "<a href=\"list-virtual.php?domain=$fDomain&limit=0#LowArrow\"><img border=\"0\" src=\"../images/arrow-u.png\" title=\"" . $PALANG['pOverview_up_arrow'] . "\" alt=\"" . $PALANG['pOverview_up_arrow'] . "\" /></a>\n"; - } - if ($tDisplay_next_show == 1) - { - print "<a href=\"list-virtual.php?domain=$fDomain&limit=$tDisplay_next#LowArrow\"><img border=\"0\" src=\"../images/arrow-r.png\" title=\"" . $PALANG['pOverview_right_arrow'] . "\" alt=\"" . $PALANG['pOverview_right_arrow'] . "\" /></a>\n"; - } - print "</div>\n"; - -} -if($tCanAddMailbox) { - print "<p><a href=\"create-mailbox.php?domain=$fDomain\">" . $PALANG['pMenu_create_mailbox'] . "</a>\n"; -} - -if ($CONF['show_status'] == 'YES' && $CONF['show_status_key'] == 'YES') -{ - print "<br><br>"; - if ($CONF['show_undeliverable'] == 'YES') - { - print " <span style='background-color:" . $CONF['show_undeliverable_color'] . - "'>" . $CONF['show_status_text'] . "</span>=" . $PALANG['pStatus_undeliverable'] . "\n"; - } - if ($CONF['show_popimap'] == 'YES') - { - print " <span style='background-color:" . $CONF['show_popimap_color'] . - "'>" . $CONF['show_status_text'] . "</span>=" . $PALANG['pStatus_popimap'] . "\n"; - } - if ( $CONF['show_custom_count'] > 0 ) - { - for ($i = 0; $i < sizeof ($CONF['show_custom_domains']); $i++) - { - print " <span style='background-color:" . $CONF['show_custom_colors'][$i] . "'>" . - $CONF['show_status_text'] . "</span>=" . $PALANG['pStatus_custom'] . - $CONF['show_custom_domains'][$i] . "\n"; - } - } - -} -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ -?> Modified: trunk/templates/overview.tpl =================================================================== --- trunk/templates/overview.tpl 2007-10-02 23:31:47 UTC (rev 120) +++ trunk/templates/overview.tpl 2007-10-03 00:51:47 UTC (rev 121) @@ -1,7 +1,16 @@ <div id="overview"> -<form name="overview" method="get"> -<select name="domain" onChange="this.form.submit();"> +<form name="overview" method="post"> +<select name="fDomain" onChange="this.form.submit();"> <?php + +if (authentication_has_role('global-admin')) { + $file = 'list-virtual.php'; + $incpath = '..'; # warning: overrides $incpath from common.php - TODO: fix common.php $incpath +} else { + $file = 'overview.php'; + $incpath = '.'; # warning: overrides $incpath from common.php - TODO: fix common.php $incpath +} + if ($limit['aliases'] == 0) $limit['aliases'] = $PALANG['pOverview_unlimited']; if ($limit['mailboxes'] == 0) $limit['mailboxes'] = $PALANG['pOverview_unlimited']; if ($limit['maxquota'] == 0) $limit['maxquota'] = $PALANG['pOverview_unlimited']; @@ -22,43 +31,56 @@ } ?> </select> -<input type="hidden" name="limit" value="0"> +<input type="hidden" name="limit" value="0" /> <input class="button" type="submit" name="go" value="<?php print $PALANG['pOverview_button']; ?>" /> </form> <h4><?php print $PALANG['pOverview_welcome'] . $fDomain; ?></h4> <p><?php print $PALANG['pOverview_alias_alias_count'] . ": " . $limit['alias_count'] . " / " . $limit['aliases']; ?></p> <p><?php print $PALANG['pOverview_alias_mailbox_count'] . ": " . $limit['mailbox_count'] . " / " . $limit['mailboxes']; ?></p> -<?php print $PALANG['pSearch']; ?>:<form name="search" method="post" action="search.php"> -<input type="textbox" name="search" size="10"> +<form name="search" method="post" action="search.php"><?php print $PALANG['pSearch']; ?>: +<input type="textbox" name="search" size="10" /> </form> </div> +<div id="nav_bar"> + <table width=730><colgroup span="1"><col width="550"></col></colgroup> + <tr><td align=left > <?php -print "<div id=\"nav_bar\">\n<table width=730><colgroup span=\"1\"> <col width=\"550\"></col></colgroup> <tr><td align=left >"; -if ( $limit['alias_pgindex_count'] ) print "<b>".$PALANG['pOverview_alias_title']."</b>  "; +if ($limit['alias_pgindex_count'] ) print "<b>".$PALANG['pOverview_alias_title']."</b>  "; ($tDisplay_back_show == 1) ? $highlight_at = $tDisplay_back / $CONF['page_size'] + 1 : $highlight_at = 0; +$current_limit=$highlight_at * $CONF['page_size']; for ($i = 0; $i < $limit['alias_pgindex_count']; $i++) { if ( $i == $highlight_at ) { - print "<a href=\"overview.php?domain=$fDomain&limit=" . $i * $CONF['page_size'] . "\"><b>" . $limit['alias_pgindex'][$i] . "</b></a>\n"; + print "<a href=\"$file?domain=$fDomain&limit=" . $i * $CONF['page_size'] . "\"><b>" . $limit['alias_pgindex'][$i] . "</b></a>\n"; } else { - print "<a href=\"overview.php?domain=$fDomain&limit=" . $i * $CONF['page_size'] . "\">" . $limit['alias_pgindex'][$i] . "</a>\n"; + print "<a href=\"$file?domain=$fDomain&limit=" . $i * $CONF['page_size'] . "\">" . $limit['alias_pgindex'][$i] . "</a>\n"; } } print "</td><td valign=middle align=right>"; -if ($tDisplay_back_show == 1) print "<a href=\"overview.php?domain=$fDomain&limit=$tDisplay_back\"><img border=\"0\" src=\"images/arrow-l.png\" title=\"" . $PALANG['pOverview_left_arrow'] . "\" alt=\"" . $PALANG['pOverview_left_arrow'] . "\"></a>\n"; -if ($tDisplay_up_show == 1) print "<a href=\"overview.php?domain=$fDomain&limit=0\"><img border=\"0\" src=\"images/arrow-u.png\" title=\"" . $PALANG['pOverview_up_arrow']."\" alt=\"" . $PALANG['pOverview_up_arrow'] . "\"></a>\n"; -if ($tDisplay_next_show == 1) print "<a href=\"overview.php?domain=$fDomain&limit=$tDisplay_next\"><img border=\"0\" src=\"images/arrow-r.png\" title=\"" . $PALANG['pOverview_right_arrow'] . "\" alt=\"" . $PALANG['pOverview_right_arrow'] . "\"></a>\n"; + +if ($tDisplay_back_show == 1) +{ + print "<a href=\"$file?domain=$fDomain&limit=$tDisplay_back\"><img border=\"0\" src=\"$incpath/images/arrow-l.png\" title=\"" . $PALANG['pOverview_left_arrow'] . "\" alt=\"" . $PALANG['pOverview_left_arrow'] . "\" /></a>\n"; +} +if ($tDisplay_up_show == 1) +{ + print "<a href=\"$file?domain=$fDomain&limit=0\"><img border=\"0\" src=\"$incpath/images/arrow-u.png\" title=\"" . $PALANG['pOverview_up_arrow'] . "\" alt=\"" . $PALANG['pOverview_up_arrow'] . "\" /></a>\n"; +} +if ($tDisplay_next_show == 1) +{ + print "<a href=\"$file?domain=$fDomain&limit=$tDisplay_next\"><img border=\"0\" src=\"$incpath/images/arrow-r.png\" title=\"" . $PALANG['pOverview_right_arrow'] . "\" alt=\"" . $PALANG['pOverview_right_arrow'] . "\" /></a>\n"; +} print "</td></tr></table></div>\n"; if (sizeof ($tAlias) > 0) { print "<table id=\"alias_table\">\n"; print " <tr>\n"; - print " <td colspan=\"7\"><h3>".$PALANG['pOverview_alias_title']."</h3></td>"; + print " <td colspan=\"7\"><h3>" . $PALANG['pOverview_alias_title'] . "</h3></td>"; print " </tr>"; print " <tr class=\"header\">\n"; if ($CONF['show_status'] == 'YES') { print "<td></td>\n"; } @@ -87,6 +109,17 @@ } print " <td>" . $tAlias[$i]['modified'] . "</td>\n"; + +# TODO: merge superadmin / domain admin code + if (authentication_has_role('global-admin')) { +# superadmin code + $active = ($tAlias[$i]['active'] == 1) ? $PALANG['YES'] : $PALANG['NO']; + print " <td><a href=\"edit-active.php?alias=" . urlencode ($tAlias[$i]['address']) . "&domain=$fDomain&return=$file?domain=$fDomain" . urlencode ("&limit=" . $current_limit) . "\">" . $active . "</a></td>\n"; + print " <td><a href=\"edit-alias.php?address=" . urlencode ($tAlias[$i]['address']) . "&domain=$fDomain" . "\">" . $PALANG['edit'] . "</a></td>\n"; + print " <td><a href=\"delete.php?table=alias" . "&delete=" . urlencode ($tAlias[$i]['address']) . "&domain=$fDomain" . "\"onclick=\"return confirm ('" . $PALANG['confirm'] . $PALANG['pOverview_get_aliases'] . ": ". $tAlias[$i]['address'] . "')\">" . $PALANG['del'] . "</a></td>\n"; + + } else { +# domain admin code if ($CONF['special_alias_control'] == 'YES') { $active = ($tAlias[$i]['active'] == 1) ? $PALANG['YES'] : $PALANG['NO']; @@ -112,14 +145,19 @@ print " <td> </td>\n"; } } +# end diff + } + print " </tr>\n"; } } - print "</table>\n"; } +if($tCanAddAlias) { print "<p><a href=\"create-alias.php?domain=$fDomain\">" . $PALANG['pMenu_create_alias'] . "</a>\n"; +} + print "<div id=\"nav_bar\"><a name=\"MidArrow\" /a>\n<table width=730><colgroup span=\"1\"> <col width=\"550\"></col></colgroup> <tr><td align=left >"; if ( $limit['mbox_pgindex_count'] ) print "<b>".$PALANG['pOverview_mailbox_title']."</b>  "; ($tDisplay_back_show == 1) ? $highlight_at = $tDisplay_back / $CONF['page_size'] + 1 : $highlight_at = 0; @@ -127,28 +165,29 @@ { if ( $i == $highlight_at ) { - print "<a href=\"overview.php?domain=$fDomain&limit=" . $i * $CONF['page_size'] . "#MidArrow\"><b>" . $limit['mbox_pgindex'][$i] . "</b></a>\n"; + print "<a href=\"$file?domain=$fDomain&limit=" . $i * $CONF['page_size'] . "#MidArrow\"><b>" . $limit['mbox_pgindex'][$i] . "</b></a>\n"; } else { - print "<a href=\"overview.php?domain=$fDomain&limit=" . $i * $CONF['page_size'] . "#MidArrow\">" . $limit['mbox_pgindex'][$i] . "</a>\n"; + print "<a href=\"$file?domain=$fDomain&limit=" . $i * $CONF['page_size'] . "#MidArrow\">" . $limit['mbox_pgindex'][$i] . "</a>\n"; } } print "</td><td valign=middle align=right>"; - if ($tDisplay_back_show == 1) - { - print "<a href=\"overview.php?domain=$fDomain&limit=$tDisplay_back#MidArrow\"><img border=\"0\" src=\"images/arrow-l.png\" title=\"" . $PALANG['pOverview_left_arrow'] . "\" alt=\"" . $PALANG['pOverview_left_arrow'] . "\" /></a>\n"; - } - if ($tDisplay_up_show == 1) - { - print "<a href=\"overview.php?domain=$fDomain&limit=0#MidArrow\"><img border=\"0\" src=\"images/arrow-u.png\" title=\"" . $PALANG['pOverview_up_arrow'] . "\" alt=\"" . $PALANG['pOverview_up_arrow'] . "\" /></a>\n"; - } - if ($tDisplay_next_show == 1) - { - print "<a href=\"overview.php?domain=$fDomain&limit=$tDisplay_next#MidArrow\"><img border=\"0\" src=\"images/arrow-r.png\" title=\"" . $PALANG['pOverview_right_arrow'] . "\" alt=\"" . $PALANG['pOverview_right_arrow'] . "\" /></a>\n"; - } - print "</td></tr></table></div>\n"; +if ($tDisplay_back_show == 1) +{ + print "<a href=\"$file?domain=$fDomain&limit=$tDisplay_back#MidArrow\"><img border=\"0\" src=\"$incpath/images/arrow-l.png\" title=\"" . $PALANG['pOverview_left_arrow'] . "\" alt=\"" . $PALANG['pOverview_left_arrow'] . "\" /></a>\n"; +} +if ($tDisplay_up_show == 1) +{ + print "<a href=\"$file?domain=$fDomain&limit=0#MidArrow\"><img border=\"0\" src=\"$incpath/images/arrow-u.png\" title=\"" . $PALANG['pOverview_up_arrow'] . "\" alt=\"" . $PALANG['pOverview_up_arrow'] . "\" /></a>\n"; +} +if ($tDisplay_next_show == 1) +{ + print "<a href=\"$file?domain=$fDomain&limit=$tDisplay_next#MidArrow\"><img border=\"0\" src=\"$incpath/images/arrow-r.png\" title=\"" . $PALANG['pOverview_right_arrow'] . "\" alt=\"" . $PALANG['pOverview_right_arrow'] . "\" /></a>\n"; +} +print "</td></tr></table></div>\n"; + if (sizeof ($tMailbox) > 0) { $colspan=8; @@ -156,7 +195,7 @@ if ($CONF['alias_control_admin'] == 'YES') $colspan=$colspan+1; print "<table id=\"mailbox_table\">\n"; print " <tr>\n"; - print " <td colspan=\"$colspan\"><h3>".$PALANG['pOverview_mailbox_title']."</h3></td>"; + print " <td colspan=\"$colspan\"><h3>" . $PALANG['pOverview_mailbox_title'] . "</h3></td>"; print " </tr>"; print " <tr class=\"header\">\n"; if ($CONF['show_status'] == 'YES') { print "<td></td>\n"; } @@ -174,6 +213,7 @@ if ((is_array ($tMailbox) and sizeof ($tMailbox) > 0)) { print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n"; + if ($CONF['show_status'] == 'YES') { print " <td>" . gen_show_status($tMailbox[$i]['username']) . "</td>\n"; @@ -201,6 +241,7 @@ print " <td>" . $tMailbox[$i]['modified'] . "</td>\n"; $active = ($tMailbox[$i]['active'] == 1) ? $PALANG['YES'] : $PALANG['NO']; print " <td><a href=\"edit-active.php?username=" . urlencode ($tMailbox[$i]['username']) . "&domain=$fDomain" . "\">" . $active . "</a></td>\n"; + if ($CONF['vacation_control_admin'] == 'YES') { $v_active_int = $tMailbox[$i]['v_active']; @@ -218,12 +259,18 @@ echo "<td> </td>\n"; } } - if ($CONF['alias_control_admin'] == 'YES') + + $edit_aliases=0; + if ( authentication_has_role('global-admin') && $CONF['alias_control_admin'] == 'YES') $edit_aliases = 1; + if ( (! authentication_has_role('global-admin')) && $CONF['alias_control'] == 'YES') $edit_aliases = 1; + + if ($edit_aliases == 1) { print " <td><a href=\"edit-alias.php?address=" . urlencode ($tMailbox[$i]['username']) . "&domain=$fDomain" . "\">" . $PALANG['pOverview_alias_edit'] . "</a></td>\n"; } + print " <td><a href=\"edit-mailbox.php?username=" . urlencode ($tMailbox[$i]['username']) . "&domain=$fDomain" . "\">" . $PALANG['edit'] . "</a></td>\n"; - print " <td><a href=\"delete.php?delete=" . urlencode ($tMailbox[$i]['username']) . "&domain=$fDomain" . "\"onclick=\"return confirm ('" . $PALANG['confirm'] . $PALANG['pOverview_get_mailboxes'] . ": ". $tMailbox[$i]['username'] . "')\">" . $PALANG['del'] . "</a></td>\n"; + print " <td><a href=\"delete.php?table=mailbox" . "&delete=" . urlencode ($tMailbox[$i]['username']) . "&domain=$fDomain" . "\"onclick=\"return confirm ('" . $PALANG['confirm'] . $PALANG['pOverview_get_mailboxes'] . ": ". $tMailbox[$i]['username'] . "')\">" . $PALANG['del'] . "</a></td>\n"; print " </tr>\n"; } } @@ -231,19 +278,22 @@ print "<div id=\"nav_bar\"><a name=\"LowArrow\" /a>\n"; if ($tDisplay_back_show == 1) { - print "<a href=\"overview.php?domain=$fDomain&limit=$tDisplay_back#LowArrow\"><img border=\"0\" src=\"images/arrow-l.png\" title=\"" . $PALANG['pOverview_left_arrow'] . "\" alt=\"" . $PALANG['pOverview_left_arrow'] . "\" /></a>\n"; + print "<a href=\"$file?domain=$fDomain&limit=$tDisplay_back#LowArrow\"><img border=\"0\" src=\"$incpath/images/arrow-l.png\" title=\"" . $PALANG['pOverview_left_arrow'] . "\" alt=\"" . $PALANG['pOverview_left_arrow'] . "\" /></a>\n"; } if ($tDisplay_up_show == 1) { - print "<a href=\"overview.php?domain=$fDomain&limit=0#LowArrow\"><img border=\"0\" src=\"images/arrow-u.png\" title=\"" . $PALANG['pOverview_up_arrow'] . "\" alt=\"" . $PALANG['pOverview_up_arrow'] . "\" /></a>\n"; + print "<a href=\"$file?domain=$fDomain&limit=0#LowArrow\"><img border=\"0\" src=\"$incpath/images/arrow-u.png\" title=\"" . $PALANG['pOverview_up_arrow'] . "\" alt=\"" . $PALANG['pOverview_up_arrow'] . "\" /></a>\n"; } if ($tDisplay_next_show == 1) { - print "<a href=\"overview.php?domain=$fDomain&limit=$tDisplay_next#LowArrow\"><img border=\"0\" src=\"images/arrow-r.png\" title=\"" . $PALANG['pOverview_right_arrow'] . "\" alt=\"" . $PALANG['pOverview_right_arrow'] . "\" /></a>\n"; + print "<a href=\"$file?domain=$fDomain&limit=$tDisplay_next#LowArrow\"><img border=\"0\" src=\"$incpath/images/arrow-r.png\" title=\"" . $PALANG['pOverview_right_arrow'] . "\" alt=\"" . $PALANG['pOverview_right_arrow'] . "\" /></a>\n"; } print "</div>\n"; + } -print "<p><a href=\"create-mailbox.php?domain=$fDomain\">" . $PALANG['pMenu_create_mailbox'] . "</a>\n"; +if($tCanAddMailbox) { + print "<p><a href=\"create-mailbox.php?domain=$fDomain\">" . $PALANG['pMenu_create_mailbox'] . "</a>\n"; +} if ($CONF['show_status'] == 'YES' && $CONF['show_status_key'] == 'YES') { @@ -263,11 +313,11 @@ for ($i = 0; $i < sizeof ($CONF['show_custom_domains']); $i++) { print " <span style='background-color:" . $CONF['show_custom_colors'][$i] . "'>" . - $CONF['show_status_text'] . "</span>=" . $PALANG['pStatus_custom'] . + $CONF['show_status_text'] . "</span>=" . $PALANG['pStatus_custom'] . $CONF['show_custom_domains'][$i] . "\n"; } } } -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3 ft=php */ +/* vim: set ft=php expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-10-04 00:01:17
|
Revision: 126 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=126&view=rev Author: christian_boltz Date: 2007-10-03 17:01:07 -0700 (Wed, 03 Oct 2007) Log Message: ----------- - merge admin/search.php into search.php - merge GET and POST code - admin/search.php still has the old code commented out @pgsql users: please test the search - I can't promise that everything works. There are several TODOs / open questions regarding pgsql in search.php currently... Modified Paths: -------------- trunk/admin/search.php trunk/search.php Modified: trunk/admin/search.php =================================================================== --- trunk/admin/search.php 2007-10-03 22:55:01 UTC (rev 125) +++ trunk/admin/search.php 2007-10-04 00:01:07 UTC (rev 126) @@ -30,6 +30,9 @@ require_once('../common.php'); +require_once('../search.php'); + +/* authentication_require_role('global-admin'); $tAlias = array(); @@ -97,7 +100,7 @@ include ("../templates/header.tpl"); include ("../templates/admin_menu.tpl"); - include ("../templates/admin_search.tpl"); + include ("../templates/search.tpl"); include ("../templates/footer.tpl"); } @@ -169,8 +172,9 @@ include ("../templates/header.tpl"); include ("../templates/admin_menu.tpl"); - include ("../templates/admin_search.tpl"); + include ("../templates/search.tpl"); include ("../templates/footer.tpl"); } +*/ /* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ ?> Modified: trunk/search.php =================================================================== --- trunk/search.php 2007-10-03 22:55:01 UTC (rev 125) +++ trunk/search.php 2007-10-04 00:01:07 UTC (rev 126) @@ -46,63 +46,8 @@ if ($_SERVER['REQUEST_METHOD'] == "GET") { if (isset ($_GET['search'])) $fSearch = escape_string ($_GET['search']); - - if ($CONF['alias_control_admin'] == "YES") - { - $query = "SELECT $table_alias.address,$table_alias.goto,$table_alias.modified,$table_alias.domain,$table_alias.active FROM $table_alias WHERE $table_alias.address LIKE '%$fSearch%' OR $table_alias.goto LIKE '%$fSearch%' ORDER BY $table_alias.address"; - } - else - { - $query = "SELECT $table_alias.address,$table_alias.goto,$table_alias.modified,$table_alias.domain,$table_alias.active FROM $table_alias LEFT JOIN $table_mailbox ON $table_alias.address=$table_mailbox.username WHERE $table_alias.address LIKE '%$fSearch%' AND $table_mailbox.maildir IS NULL ORDER BY $table_alias.address"; - } - - $result = db_query ($query); - if ($result['rows'] > 0) - { - while ($row = db_array ($result['result'])) - { - if (check_owner ($SESSID_USERNAME, $row['domain'])) - { - if ('pgsql'==$CONF['database_type']) - { - $row['modified']=gmstrftime('%c %Z',$row['modified']); - $row['active']=('t'==$row['active']) ? 1 : 0; - } - $tAlias[] = $row; - } - } - } - - if ($CONF['vacation_control_admin'] == 'YES') - { - $query = ("SELECT $table_mailbox.*, $table_vacation.active AS v_active FROM $table_mailbox LEFT JOIN $table_vacation ON $table_mailbox.username=$table_vacation.email WHERE $table_mailbox.username LIKE '%$fSearch%' OR $table_mailbox.name LIKE '%$fSearch%' ORDER BY $table_mailbox.username"); - } - else - { - $query = "SELECT * FROM $table_mailbox WHERE username LIKE '%$fSearch%' OR name LIKE '%$fSearch%' ORDER BY username"; - } - - $result = db_query ($query); - if ($result['rows'] > 0) - { - while ($row = db_array ($result['result'])) - { - if (check_owner ($SESSID_USERNAME, $row['domain'])) - { - if ('pgsql'==$CONF['database_type']) - { - $row['modified']=gmstrftime('%c %Z',$row['modified']); - $row['active']=('t'==$row['active']) ? 1 : 0; - } - $tMailbox[] = $row; - } - } - } - - include ("./templates/header.tpl"); - include ("./templates/menu.tpl"); - include ("./templates/search.tpl"); - include ("./templates/footer.tpl"); + if (isset ($_GET['fGo'])) $fGo = escape_string ($_GET['fGo']); + if (isset ($_GET['fDomain'])) $fDomain = escape_string ($_GET['domain']); } if ($_SERVER['REQUEST_METHOD'] == "POST") @@ -110,8 +55,9 @@ if (isset ($_POST['search'])) $fSearch = escape_string ($_POST['search']); if (isset ($_POST['fGo'])) $fGo = escape_string ($_POST['fGo']); if (isset ($_POST['fDomain'])) $fDomain = escape_string ($_POST['fDomain']); +} - if (empty ($fSearch) && !empty ($fGo)) + if (empty ($fSearch) /* && !empty ($fGo) */) { if (authentication_has_role('global-admin')) { @@ -123,7 +69,6 @@ } } - if ($CONF['alias_control_admin'] == "YES") { $query = "SELECT $table_alias.address,$table_alias.goto,$table_alias.modified,$table_alias.domain,$table_alias.active FROM $table_alias WHERE $table_alias.address LIKE '%$fSearch%' OR $table_alias.goto LIKE '%$fSearch%' ORDER BY $table_alias.address"; @@ -138,47 +83,71 @@ { while ($row = db_array ($result['result'])) { - if (check_owner ($SESSID_USERNAME, $row['domain'])) + if (check_owner ($SESSID_USERNAME, $row['domain']) || authentication_has_role('global-admin')) { if ('pgsql'==$CONF['database_type']) { $row['modified']=gmstrftime('%c %Z',$row['modified']); $row['active']=('t'==$row['active']) ? 1 : 0; - } + } $tAlias[] = $row; } } } + +/* + + */ if ($CONF['vacation_control_admin'] == 'YES') { $query = ("SELECT $table_mailbox.*, $table_vacation.active AS v_active FROM $table_mailbox LEFT JOIN $table_vacation ON $table_mailbox.username=$table_vacation.email WHERE $table_mailbox.username LIKE '%$fSearch%' OR $table_mailbox.name LIKE '%$fSearch%' ORDER BY $table_mailbox.username"); + # TODO: special query for pgsql needed? } else { $query = "SELECT * FROM $table_mailbox WHERE username LIKE '%$fSearch%' OR name LIKE '%$fSearch%' ORDER BY username"; + /* TODO: special query for pgsql really needed? + if ('pgsql'==$CONF['database_type']) + { + $query = "SELECT *,extract(epoch from created) as uts_created,extract(epoch from modified) as uts_modified FROM $table_mailbox WHERE username LIKE '%$fSearch%' OR name LIKE '%$fSearch%' ORDER BY username"; + } + */ } - $result = db_query ("$query"); + $result = db_query ($query); if ($result['rows'] > 0) { while ($row = db_array ($result['result'])) { - if (check_owner ($SESSID_USERNAME, $row['domain'])) + if (check_owner ($SESSID_USERNAME, $row['domain']) || authentication_has_role('global-admin')) { if ('pgsql'==$CONF['database_type']) { + $row['created']=gmstrftime('%c %Z',$row['created']); $row['modified']=gmstrftime('%c %Z',$row['modified']); + # TODO: code from admin/search.php + # $row['created']=gmstrftime('%c %Z',$row['uts_created']); + # $row['modified']=gmstrftime('%c %Z',$row['uts_modified']); $row['active']=('t'==$row['active']) ? 1 : 0; - } + # TODO: code from admin/search.php + # unset($row['uts_created']); + # unset($row['uts_modified']); + } $tMailbox[] = $row; } } } - include ("./templates/header.tpl"); - include ("./templates/menu.tpl"); - include ("./templates/search.tpl"); - include ("./templates/footer.tpl"); +include ("$incpath/templates/header.tpl"); + +if (authentication_has_role('global-admin')) { + include ("$incpath/templates/admin_menu.tpl"); +} else { + include ("$incpath/templates/menu.tpl"); } + +include ("$incpath/templates/search.tpl"); +include ("$incpath/templates/footer.tpl"); + ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Gin...@us...> - 2007-10-04 13:53:43
|
Revision: 128 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=128&view=rev Author: GingerDog Date: 2007-10-04 06:53:45 -0700 (Thu, 04 Oct 2007) Log Message: ----------- config.inc.php: renamed from config.inc.php.sample; added variable that needs disabling for site to work Added Paths: ----------- trunk/config.inc.php Removed Paths: ------------- trunk/config.inc.php.sample Copied: trunk/config.inc.php (from rev 127, trunk/config.inc.php.sample) =================================================================== --- trunk/config.inc.php (rev 0) +++ trunk/config.inc.php 2007-10-04 13:53:45 UTC (rev 128) @@ -0,0 +1,305 @@ +<?php +/** + * Postfix Admin + * + * LICENSE + * This source file is subject to the GPL license that is bundled with + * this package in the file LICENSE.TXT. + * + * Further details on the project are available at : + * http://www.postfixadmin.com or http://postfixadmin.sf.net + * + * @version $Id$ + * @license GNU GPL v2 or later. + * + * File: config.inc.php + * Contains configuration options. + */ + +if (ereg ("config.inc.php", $_SERVER['PHP_SELF'])) +{ + header ("Location: login.php"); + exit; +} + +/***************************************************************** + * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + * The following line needs commenting out or removing before the + * application will run! + * Doing this implies you have changed this file as required. + */ +$CONF['configured'] = false; + + +// Postfix Admin Path +// Set the location of your Postfix Admin installation here. +// You must enter complete url (http://domain.tld/) and full path (/var/www/postfixadmin) +$CONF['postfix_admin_url'] = ''; +$CONF['postfix_admin_path'] = dirname(__FILE__); + +// Language config +// Language files are located in './languages'. +$CONF['default_language'] = 'en'; + +// Database Config +// mysql = MySQL 3.23 and 4.0 +// mysqli = MySQL 4.1 +// pgsql = PostgreSQL +$CONF['database_type'] = 'mysql'; +$CONF['database_host'] = 'localhost'; +$CONF['database_user'] = 'postfixadmin'; +$CONF['database_password'] = 'postfixadmin'; +$CONF['database_name'] = 'postfix'; +$CONF['database_prefix'] = ''; + +// Here, if you need, you can customize table names. +$CONF['database_prefix'] = ''; +$CONF['database_tables'] = array ( + 'admin' => 'admin', + 'alias' => 'alias', + 'domain' => 'domain', + 'domain_admins' => 'domain_admins', + 'log' => 'log', + 'mailbox' => 'mailbox', + 'vacation' => 'vacation', + 'vacation_notification' => 'vacation_notification', +); + +// Site Admin +// Define the Site Admins email address below. +// This will be used to send emails from to create mailboxes. +$CONF['admin_email'] = 'pos...@ch...d'; + +// Mail Server +// Hostname (FQDN) of your mail server. +// This is used to send email to Postfix in order to create mailboxes. +$CONF['smtp_server'] = 'localhost'; +$CONF['smtp_port'] = '25'; + +// Encrypt +// In what way do you want the passwords to be crypted? +// md5crypt = internal postfix admin md5 +// system = whatever you have set as your PHP system default +// cleartext = clear text passwords (ouch!) +$CONF['encrypt'] = 'md5crypt'; + +// Minimum length required for passwords. Postfixadmin will not +// allow users to set passwords which are shorter than this value. +$CONF['min_password_length'] = 5; + +// Generate Password +// Generate a random password for a mailbox or admin and display it. +// If you want to automagically generate paswords set this to 'YES'. +$CONF['generate_password'] = 'NO'; + +// Show Password +// Always show password after adding a mailbox or admin. +// If you want to always see what password was set set this to 'YES'. +$CONF['show_password'] = 'NO'; + +// Page Size +// Set the number of entries that you would like to see +// in one page. +$CONF['page_size'] = '10'; + +// Default Aliases +// The default aliases that need to be created for all domains. +$CONF['default_aliases'] = array ( + 'abuse' => 'ab...@ch...d', + 'hostmaster' => 'hos...@ch...d', + 'postmaster' => 'pos...@ch...d', + 'webmaster' => 'web...@ch...d' +); + +// Mailboxes +// If you want to store the mailboxes per domain set this to 'YES'. +// Example: /usr/local/virtual/domain.tld/use...@do...d +$CONF['domain_path'] = 'NO'; +// If you don't want to have the domain in your mailbox set this to 'NO'. +// Example: /usr/local/virtual/domain.tld/username +$CONF['domain_in_mailbox'] = 'YES'; + +// Default Domain Values +// Specify your default values below. Quota in MB. +$CONF['aliases'] = '10'; +$CONF['mailboxes'] = '10'; +$CONF['maxquota'] = '10'; + +// Quota +// When you want to enforce quota for your mailbox users set this to 'YES'. +$CONF['quota'] = 'NO'; +// You can either use '1024000' or '1048576' +$CONF['quota_multiplier'] = '1024000'; + +// Transport +// If you want to define additional transport options for a domain set this to 'YES'. +// Read the transport file of the Postfix documentation. +$CONF['transport'] = 'NO'; +// Transport options +// If you want to define additional transport options put them in array below. +$CONF['transport_options'] = array ( + 'virtual', // for virtual accounts + 'local', // for system accounts + 'relay' // for backup mx +); +// Transport default +// You should define default transport. It must be in array above. +$CONF['transport_default'] = 'virtual'; + +// Virtual Vacation +// If you want to use virtual vacation for you mailbox users set this to 'YES'. +// NOTE: Make sure that you install the vacation module. http://high5.net/postfixadmin/ +$CONF['vacation'] = 'NO'; +// This is the autoreply domain that you will need to set in your Postfix +// transport maps to handle virtual vacations. It does not need to be a +// real domain (i.e. you don't need to setup DNS for it). +$CONF['vacation_domain'] = 'autoreply.change-this-to-your.domain.tld'; + +// Vacation Control +// If you want users to take control of vacation set this to 'YES'. +// TODO: not implemented +$CONF['vacation_control'] ='YES'; + +// Vacation Control for admins +// Set to 'YES' if your domain admins should be able to edit user vacation. +$CONF['vacation_control_admin'] = 'YES'; + +// Alias Control +// Postfix Admin inserts an alias in the alias table for every mailbox it creates. +// The reason for this is that when you want catch-all and normal mailboxes +// to work you need to have the mailbox replicated in the alias table. +// If you want to take control of these aliases as well set this to 'YES'. +$CONF['alias_control'] = 'NO'; + +// Alias Control for admins +// Set to 'NO' if your domain admins shouldn't be able to edit user aliases. +$CONF['alias_control_admin'] = 'NO'; + +// Special Alias Control +// Set to 'NO' if your domain admins shouldn't be able to edit default aliases. +$CONF['special_alias_control'] = 'NO'; + +// Alias Goto Field Limit +// Set the max number of entries that you would like to see +// in one 'goto' field in overview, the rest will be hidden and "[and X more...]" will be added. +// '0' means no limits. +$CONF['alias_goto_limit'] = '0'; + +// Backup +// If you don't want backup tab set this to 'NO'; +$CONF['backup'] = 'YES'; + +// Send Mail +// If you don't want sendmail tab set this to 'NO'; +$CONF['sendmail'] = 'YES'; + +// Logging +// If you don't want logging set this to 'NO'; +$CONF['logging'] = 'YES'; + +// Header +$CONF['show_header_text'] = 'NO'; +$CONF['header_text'] = ':: Postfix Admin ::'; + +// link to display under 'Main' menu when logged in as a user. +$CONF['user_footer_link'] = "http://change-this-to-your.domain.tld/main"; + +// Footer +// Below information will be on all pages. +// If you don't want the footer information to appear set this to 'NO'. +$CONF['show_footer_text'] = 'YES'; +$CONF['footer_text'] = 'Return to change-this-to-your.domain.tld'; +$CONF['footer_link'] = 'http://change-this-to-your.domain.tld'; + +// Welcome Message +// This message is send to every newly created mailbox. +// Change the text between EOM. +$CONF['welcome_text'] = <<<EOM +Hi, + +Welcome to your new account. +EOM; + +// When creating mailboxes, check that the domain-part of the +// address is legal by performing a name server look-up. +$CONF['emailcheck_resolve_domain']='YES'; + + +// Optional: +// Analyze alias gotos and display a colored block in the first column +// indicating if an alias or mailbox appears to deliver to a non-existent +// account. Also, display indications, for POP/IMAP mailboxes and +// for custom destinations (such as mailboxes that forward to a UNIX shell +// account or mail that is sent to a MS exchange server, or any other +// domain or subdomain you use) +// See http://www.w3schools.com/html/html_colornames.asp for a list of +// color names available on most browsers + +//set to YES to enable this feature +$CONF['show_status']='NO'; +//display a guide to what these colors mean +$CONF['show_status_key']='NO'; +// 'show_status_text' will be displayed with the background colors +// associated with each status, you can customize it here +$CONF['show_status_text']=' '; +// show_undeliverable is useful if most accounts are delivered to this +// postfix system. If many aliases and mailboxes are forwarded +// elsewhere, you will probably want to disable this. +$CONF['show_undeliverable']='NO'; +$CONF['show_undeliverable_color']='tomato'; +$CONF['show_undeliverable_exceptions']=array("unixmail.domain.ext","exchangeserver.domain.ext","gmail.com"); +$CONF['show_popimap']='NO'; +$CONF['show_popimap_color']='darkgrey'; +// set 'show_custom_count' to 0 to disable custom indicators +$CONF['show_custom_count']=2; +$CONF['show_custom_domains']=array("subdomain.domain.ext","domain2.ext"); +$CONF['show_custom_colors']=array("lightgreen","lightblue"); + + +// Optional: +// Script to run after creation of mailboxes. +// Note that this may fail if PHP is run in "safe mode", or if +// operating system features (such as SELinux) or limitations +// prevent the web-server from executing external scripts. +// $CONF['mailbox_postcreation_script']='sudo -u courier /usr/local/bin/postfixadmin-mailbox-postcreation.sh'; + +// Optional: +// Script to run after deletion of mailboxes. +// Note that this may fail if PHP is run in "safe mode", or if +// operating system features (such as SELinux) or limitations +// prevent the web-server from executing external scripts. +// $CONF['mailbox_postdeletion_script']='sudo -u courier /usr/local/bin/postfixadmin-mailbox-postdeletion.sh'; + +// Optional: +// Script to run after deletion of domains. +// Note that this may fail if PHP is run in "safe mode", or if +// operating system features (such as SELinux) or limitations +// prevent the web-server from executing external scripts. +// $CONF['domain_postdeletion_script']='sudo -u courier /usr/local/bin/postfixadmin-domain-postdeletion.sh'; + +// Optional: +// Sub-folders which should automatically be created for new users. +// The sub-folders will also be subscribed to automatically. +// Will only work with IMAP server which implement sub-folders. +// Will not work with POP3. +// If you define create_mailbox_subdirs, then the +// create_mailbox_subdirs_host must also be defined. +// +// $CONF['create_mailbox_subdirs']=array('Spam'); +// $CONF['create_mailbox_subdirs_host']='localhost'; +// +// Normally, the TCP port number does not have to be specified. +// $CONF['create_mailbox_subdirs_hostport']=143; +// +// If you have trouble connecting to the IMAP-server, then specify +// a value for $CONF['create_mailbox_subdirs_hostoptions']. These +// are some examples to experiment with: +// $CONF['create_mailbox_subdirs_hostoptions']=array('notls'); +// $CONF['create_mailbox_subdirs_hostoptions']=array('novalidate-cert','norsh'); +// See also the "Optional flags for names" table at +// http://www.php.net/manual/en/function.imap-open.php + +// +// END OF CONFIG FILE +// +?> Deleted: trunk/config.inc.php.sample =================================================================== --- trunk/config.inc.php.sample 2007-10-04 07:34:10 UTC (rev 127) +++ trunk/config.inc.php.sample 2007-10-04 13:53:45 UTC (rev 128) @@ -1,292 +0,0 @@ -<?php -/** - * Postfix Admin - * - * LICENSE - * This source file is subject to the GPL license that is bundled with - * this package in the file LICENSE.TXT. - * - * Further details on the project are available at : - * http://www.postfixadmin.com or http://postfixadmin.sf.net - * - * @version $Id$ - * @license GNU GPL v2 or later. - * - * File: config.inc.php - * Contains configuration options. - */ - -if (ereg ("config.inc.php", $_SERVER['PHP_SELF'])) -{ - header ("Location: login.php"); - exit; -} - -// Postfix Admin Path -// Set the location of your Postfix Admin installation here. -// You must enter complete url (http://domain.tld/) and full path (/var/www/postfixadmin) -$CONF['postfix_admin_url'] = ''; -$CONF['postfix_admin_path'] = dirname(__FILE__); - -// Language config -// Language files are located in './languages'. -$CONF['default_language'] = 'en'; - -// Database Config -// mysql = MySQL 3.23 and 4.0 -// mysqli = MySQL 4.1 -// pgsql = PostgreSQL -$CONF['database_type'] = 'mysql'; -$CONF['database_host'] = 'localhost'; -$CONF['database_user'] = 'postfixadmin'; -$CONF['database_password'] = 'postfixadmin'; -$CONF['database_name'] = 'postfix'; -$CONF['database_prefix'] = ''; - -// Here, if you need, you can customize table names. -$CONF['database_prefix'] = ''; -$CONF['database_tables'] = array ( - 'admin' => 'admin', - 'alias' => 'alias', - 'domain' => 'domain', - 'domain_admins' => 'domain_admins', - 'log' => 'log', - 'mailbox' => 'mailbox', - 'vacation' => 'vacation', - 'vacation_notification' => 'vacation_notification', -); - -// Site Admin -// Define the Site Admins email address below. -// This will be used to send emails from to create mailboxes. -$CONF['admin_email'] = 'pos...@ch...d'; - -// Mail Server -// Hostname (FQDN) of your mail server. -// This is used to send email to Postfix in order to create mailboxes. -$CONF['smtp_server'] = 'localhost'; -$CONF['smtp_port'] = '25'; - -// Encrypt -// In what way do you want the passwords to be crypted? -// md5crypt = internal postfix admin md5 -// system = whatever you have set as your PHP system default -// cleartext = clear text passwords (ouch!) -$CONF['encrypt'] = 'md5crypt'; - -// Generate Password -// Generate a random password for a mailbox or admin and display it. -// If you want to automagically generate paswords set this to 'YES'. -$CONF['generate_password'] = 'NO'; - -// Show Password -// Always show password after adding a mailbox or admin. -// If you want to always see what password was set set this to 'YES'. -$CONF['show_password'] = 'NO'; - -// Page Size -// Set the number of entries that you would like to see -// in one page. -$CONF['page_size'] = '10'; - -// Default Aliases -// The default aliases that need to be created for all domains. -$CONF['default_aliases'] = array ( - 'abuse' => 'ab...@ch...d', - 'hostmaster' => 'hos...@ch...d', - 'postmaster' => 'pos...@ch...d', - 'webmaster' => 'web...@ch...d' -); - -// Mailboxes -// If you want to store the mailboxes per domain set this to 'YES'. -// Example: /usr/local/virtual/domain.tld/use...@do...d -$CONF['domain_path'] = 'NO'; -// If you don't want to have the domain in your mailbox set this to 'NO'. -// Example: /usr/local/virtual/domain.tld/username -$CONF['domain_in_mailbox'] = 'YES'; - -// Default Domain Values -// Specify your default values below. Quota in MB. -$CONF['aliases'] = '10'; -$CONF['mailboxes'] = '10'; -$CONF['maxquota'] = '10'; - -// Quota -// When you want to enforce quota for your mailbox users set this to 'YES'. -$CONF['quota'] = 'NO'; -// You can either use '1024000' or '1048576' -$CONF['quota_multiplier'] = '1024000'; - -// Transport -// If you want to define additional transport options for a domain set this to 'YES'. -// Read the transport file of the Postfix documentation. -$CONF['transport'] = 'NO'; -// Transport options -// If you want to define additional transport options put them in array below. -$CONF['transport_options'] = array ( - 'virtual', // for virtual accounts - 'local', // for system accounts - 'relay' // for backup mx -); -// Transport default -// You should define default transport. It must be in array above. -$CONF['transport_default'] = 'virtual'; - -// Virtual Vacation -// If you want to use virtual vacation for you mailbox users set this to 'YES'. -// NOTE: Make sure that you install the vacation module. http://high5.net/postfixadmin/ -$CONF['vacation'] = 'NO'; -// This is the autoreply domain that you will need to set in your Postfix -// transport maps to handle virtual vacations. It does not need to be a -// real domain (i.e. you don't need to setup DNS for it). -$CONF['vacation_domain'] = 'autoreply.change-this-to-your.domain.tld'; - -// Vacation Control -// If you want users to take control of vacation set this to 'YES'. -// TODO: not implemented -$CONF['vacation_control'] ='YES'; - -// Vacation Control for admins -// Set to 'YES' if your domain admins should be able to edit user vacation. -$CONF['vacation_control_admin'] = 'YES'; - -// Alias Control -// Postfix Admin inserts an alias in the alias table for every mailbox it creates. -// The reason for this is that when you want catch-all and normal mailboxes -// to work you need to have the mailbox replicated in the alias table. -// If you want to take control of these aliases as well set this to 'YES'. -$CONF['alias_control'] = 'NO'; - -// Alias Control for admins -// Set to 'NO' if your domain admins shouldn't be able to edit user aliases. -$CONF['alias_control_admin'] = 'NO'; - -// Special Alias Control -// Set to 'NO' if your domain admins shouldn't be able to edit default aliases. -$CONF['special_alias_control'] = 'NO'; - -// Alias Goto Field Limit -// Set the max number of entries that you would like to see -// in one 'goto' field in overview, the rest will be hidden and "[and X more...]" will be added. -// '0' means no limits. -$CONF['alias_goto_limit'] = '0'; - -// Backup -// If you don't want backup tab set this to 'NO'; -$CONF['backup'] = 'YES'; - -// Send Mail -// If you don't want sendmail tab set this to 'NO'; -$CONF['sendmail'] = 'YES'; - -// Logging -// If you don't want logging set this to 'NO'; -$CONF['logging'] = 'YES'; - -// Header -$CONF['show_header_text'] = 'NO'; -$CONF['header_text'] = ':: Postfix Admin ::'; - -// link to display under 'Main' menu when logged in as a user. -$CONF['user_footer_link'] = "http://change-this-to-your.domain.tld/main"; - -// Footer -// Below information will be on all pages. -// If you don't want the footer information to appear set this to 'NO'. -$CONF['show_footer_text'] = 'YES'; -$CONF['footer_text'] = 'Return to change-this-to-your.domain.tld'; -$CONF['footer_link'] = 'http://change-this-to-your.domain.tld'; - -// Welcome Message -// This message is send to every newly created mailbox. -// Change the text between EOM. -$CONF['welcome_text'] = <<<EOM -Hi, - -Welcome to your new account. -EOM; - -// When creating mailboxes, check that the domain-part of the -// address is legal by performing a name server look-up. -$CONF['emailcheck_resolve_domain']='YES'; - - -// Optional: -// Analyze alias gotos and display a colored block in the first column -// indicating if an alias or mailbox appears to deliver to a non-existent -// account. Also, display indications, for POP/IMAP mailboxes and -// for custom destinations (such as mailboxes that forward to a UNIX shell -// account or mail that is sent to a MS exchange server, or any other -// domain or subdomain you use) -// See http://www.w3schools.com/html/html_colornames.asp for a list of -// color names available on most browsers - -//set to YES to enable this feature -$CONF['show_status']='NO'; -//display a guide to what these colors mean -$CONF['show_status_key']='NO'; -// 'show_status_text' will be displayed with the background colors -// associated with each status, you can customize it here -$CONF['show_status_text']=' '; -// show_undeliverable is useful if most accounts are delivered to this -// postfix system. If many aliases and mailboxes are forwarded -// elsewhere, you will probably want to disable this. -$CONF['show_undeliverable']='NO'; -$CONF['show_undeliverable_color']='tomato'; -$CONF['show_undeliverable_exceptions']=array("unixmail.domain.ext","exchangeserver.domain.ext","gmail.com"); -$CONF['show_popimap']='NO'; -$CONF['show_popimap_color']='darkgrey'; -// set 'show_custom_count' to 0 to disable custom indicators -$CONF['show_custom_count']=2; -$CONF['show_custom_domains']=array("subdomain.domain.ext","domain2.ext"); -$CONF['show_custom_colors']=array("lightgreen","lightblue"); - - -// Optional: -// Script to run after creation of mailboxes. -// Note that this may fail if PHP is run in "safe mode", or if -// operating system features (such as SELinux) or limitations -// prevent the web-server from executing external scripts. -// $CONF['mailbox_postcreation_script']='sudo -u courier /usr/local/bin/postfixadmin-mailbox-postcreation.sh'; - -// Optional: -// Script to run after deletion of mailboxes. -// Note that this may fail if PHP is run in "safe mode", or if -// operating system features (such as SELinux) or limitations -// prevent the web-server from executing external scripts. -// $CONF['mailbox_postdeletion_script']='sudo -u courier /usr/local/bin/postfixadmin-mailbox-postdeletion.sh'; - -// Optional: -// Script to run after deletion of domains. -// Note that this may fail if PHP is run in "safe mode", or if -// operating system features (such as SELinux) or limitations -// prevent the web-server from executing external scripts. -// $CONF['domain_postdeletion_script']='sudo -u courier /usr/local/bin/postfixadmin-domain-postdeletion.sh'; - -// Optional: -// Sub-folders which should automatically be created for new users. -// The sub-folders will also be subscribed to automatically. -// Will only work with IMAP server which implement sub-folders. -// Will not work with POP3. -// If you define create_mailbox_subdirs, then the -// create_mailbox_subdirs_host must also be defined. -// -// $CONF['create_mailbox_subdirs']=array('Spam'); -// $CONF['create_mailbox_subdirs_host']='localhost'; -// -// Normally, the TCP port number does not have to be specified. -// $CONF['create_mailbox_subdirs_hostport']=143; -// -// If you have trouble connecting to the IMAP-server, then specify -// a value for $CONF['create_mailbox_subdirs_hostoptions']. These -// are some examples to experiment with: -// $CONF['create_mailbox_subdirs_hostoptions']=array('notls'); -// $CONF['create_mailbox_subdirs_hostoptions']=array('novalidate-cert','norsh'); -// See also the "Optional flags for names" table at -// http://www.php.net/manual/en/function.imap-open.php - -// -// END OF CONFIG FILE -// -?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-10-07 17:23:32
|
Revision: 135 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=135&view=rev Author: christian_boltz Date: 2007-10-07 10:23:29 -0700 (Sun, 07 Oct 2007) Log Message: ----------- - setup.php now has a "create superadmin" form - completely reworked HTML code in setup.php - moved admin creation code from create_admin.php to functions.php, function create_admin - several related changes in functions.inc.php: - use table_by_key() directly instead of the cached variables (which are empty if config.inc.php was not read before functions.php) - add an additional (optional) parameter $setup to db_connect, changed many die(msg) calls to $error_message .= msg. If $setup is given, the return value is array($link, $error_text) instead of $link - db_connect now checks for invalid $CONF['database_type'] Modified Paths: -------------- trunk/functions.inc.php trunk/setup.php trunk/stylesheet.css Modified: trunk/functions.inc.php =================================================================== --- trunk/functions.inc.php 2007-10-05 08:58:36 UTC (rev 134) +++ trunk/functions.inc.php 2007-10-07 17:23:29 UTC (rev 135) @@ -737,9 +737,7 @@ // function admin_exist ($username) { - global $table_admin; - - $result = db_query ("SELECT 1 FROM $table_admin WHERE username='$username'"); + $result = db_query ("SELECT 1 FROM " . table_by_key ('admin') . " WHERE username='$username'"); if ($result['rows'] != 1) { return false; @@ -1236,66 +1234,88 @@ "; - -// -// db_connect -// Action: Makes a connection to the database if it doesn't exist -// Call: db_connect () -// -function db_connect () +/** + * db_connect + * Action: Makes a connection to the database if it doesn't exist + * Call: db_connect () + * Optional parameter: $setup = TRUE, used by setup.php + * + * Return value: + * a) without $setup or $setup == 0 + * - $link - the database connection -OR- + * - call die() in case of connection problems + * b) with $setup == TRUE + * array($link, $error_text); + */ +function db_connect ($setup = 0) { global $CONF; global $DEBUG_TEXT; + if ($setup != 0) $DEBUG_TEXT = ''; + $error_text = ''; + $link = 0; if ($CONF['database_type'] == "mysql") { if (function_exists ("mysql_connect")) { - $link = @mysql_connect ($CONF['database_host'], $CONF['database_user'], $CONF['database_password']) or die ("<p />DEBUG INFORMATION:<br />Connect: " . mysql_error () . "$DEBUG_TEXT"); - @mysql_query("SET CHARACTER SET utf8",$link); - @mysql_query("SET COLLATION_CONNECTION='utf8_general_ci'",$link); - $succes = @mysql_select_db ($CONF['database_name'], $link) or die ("<p />DEBUG INFORMATION:<br />MySQL Select Database: " . mysql_error () . "$DEBUG_TEXT"); + $link = @mysql_connect ($CONF['database_host'], $CONF['database_user'], $CONF['database_password']) or $error_text .= ("<p />DEBUG INFORMATION:<br />Connect: " . mysql_error () . "$DEBUG_TEXT"); + if ($link) { + @mysql_query("SET CHARACTER SET utf8",$link); + @mysql_query("SET COLLATION_CONNECTION='utf8_general_ci'",$link); + $succes = @mysql_select_db ($CONF['database_name'], $link) or $error_text .= ("<p />DEBUG INFORMATION:<br />MySQL Select Database: " . mysql_error () . "$DEBUG_TEXT"); + } } else { - print "<p />DEBUG INFORMATION:<br />MySQL 3.x / 4.0 functions not available!<br />database_type = 'mysql' in config.inc.php, are you using a different database? $DEBUG_TEXT"; - die(); + $error_text .= "<p />DEBUG INFORMATION:<br />MySQL 3.x / 4.0 functions not available!<br />database_type = 'mysql' in config.inc.php, are you using a different database? $DEBUG_TEXT"; } } - - if ($CONF['database_type'] == "mysqli") + elseif ($CONF['database_type'] == "mysqli") { if (function_exists ("mysqli_connect")) { - $link = @mysqli_connect ($CONF['database_host'], $CONF['database_user'], $CONF['database_password']) or die ("<p />DEBUG INFORMATION:<br />Connect: " . mysqli_connect_error () . "$DEBUG_TEXT"); - @mysqli_query($link,"SET CHARACTER SET utf8"); - @mysqli_query($link,"SET COLLATION_CONNECTION='utf8_general_ci'"); - $success = @mysqli_select_db ($link, $CONF['database_name']) or die ("<p />DEBUG INFORMATION:<br />MySQLi Select Database: " . mysqli_error ($link) . "$DEBUG_TEXT"); + $link = @mysqli_connect ($CONF['database_host'], $CONF['database_user'], $CONF['database_password']) or $error_text .= ("<p />DEBUG INFORMATION:<br />Connect: " . mysqli_connect_error () . "$DEBUG_TEXT"); + if ($link) { + @mysqli_query($link,"SET CHARACTER SET utf8"); + @mysqli_query($link,"SET COLLATION_CONNECTION='utf8_general_ci'"); + $success = @mysqli_select_db ($link, $CONF['database_name']) or $error_text .= ("<p />DEBUG INFORMATION:<br />MySQLi Select Database: " . mysqli_error ($link) . "$DEBUG_TEXT"); + } } else { - print "<p />DEBUG INFORMATION:<br />MySQL 4.1 functions not available!<br />database_type = 'mysqli' in config.inc.php, are you using a different database? $DEBUG_TEXT"; - die(); + $error_text .= "<p />DEBUG INFORMATION:<br />MySQL 4.1 functions not available!<br />database_type = 'mysqli' in config.inc.php, are you using a different database? $DEBUG_TEXT"; } } - - if ($CONF['database_type'] == "pgsql") + elseif ($CONF['database_type'] == "pgsql") { if (function_exists ("pg_pconnect")) { $connect_string = "host=" . $CONF['database_host'] . " dbname=" . $CONF['database_name'] . " user=" . $CONF['database_user'] . " password=" . $CONF['database_password']; - $link = @pg_pconnect ($connect_string) or die ("<p />DEBUG INFORMATION:<br />Connect: failed to connect to database. $DEBUG_TEXT"); - pg_set_client_encoding($link, 'UNICODE'); + $link = @pg_pconnect ($connect_string) or $error_text .= ("<p />DEBUG INFORMATION:<br />Connect: failed to connect to database. $DEBUG_TEXT"); + if ($link) pg_set_client_encoding($link, 'UNICODE'); } else { - print "<p />DEBUG INFORMATION:<br />PostgreSQL functions not available!<br />database_type = 'pgsql' in config.inc.php, are you using a different database? $DEBUG_TEXT"; - die(); + $error_text .= "<p />DEBUG INFORMATION:<br />PostgreSQL functions not available!<br />database_type = 'pgsql' in config.inc.php, are you using a different database? $DEBUG_TEXT"; } } + else + { + $error_text = "<p />DEBUG INFORMATION:<br />Invalid \$CONF['database_type']! Please fix your config.inc.php! $DEBUG_TEXT"; + } - if ($link) + if ($setup) { + return array($link, $error_text); + } + elseif ($error_text != "") + { + print $error_text; + die(); + } + elseif ($link) + { return $link; } else @@ -1846,7 +1866,107 @@ return $stat_string; } +/* + Called by create-admin.php and setup.php + Returns: + array( + 'error' => 0, # 0 on success, otherwise > 0 + 'tMessage' => '', # success / failure message + 'pAdminCreate_admin_username_text' => '', # help text / error message for username + 'pAdminCreate_admin_password_text' => '' # error message for username + ) + */ + +function create_admin($fUsername, $fPassword, $fPassword2, $fDomains, $no_generate_password=0) +{ + global $PALANG; + global $CONF; + $error = 0; + $tMessage = ''; + $pAdminCreate_admin_username_text = ''; + $pAdminCreate_admin_password_text = ''; + + if (!check_email ($fUsername)) + { + $error = 1; + $pAdminCreate_admin_username_text = $PALANG['pAdminCreate_admin_username_text_error1']; + } + + if (empty ($fUsername) or admin_exist ($fUsername)) + { + $error = 1; + $pAdminCreate_admin_username_text = $PALANG['pAdminCreate_admin_username_text_error2']; + } + + if (empty ($fPassword) or empty ($fPassword2) or ($fPassword != $fPassword2)) + { + if (empty ($fPassword) and empty ($fPassword2) and $CONF['generate_password'] == "YES" && $no_generate_password == 0) + { + $fPassword = generate_password (); + } + else + { + $error = 1; + $pAdminCreate_admin_username_text = $PALANG['pAdminCreate_admin_username_text']; + $pAdminCreate_admin_password_text = $PALANG['pAdminCreate_admin_password_text_error']; + } + } + + if ($error != 1) + { + $password = pacrypt($fPassword); + $pAdminCreate_admin_username_text = $PALANG['pAdminCreate_admin_username_text']; + + $result = db_query ("INSERT INTO " . table_by_key('admin') . " (username,password,created,modified) VALUES ('$fUsername','$password',NOW(),NOW())"); + if ($result['rows'] != 1) + { + $tMessage = $PALANG['pAdminCreate_admin_result_error'] . "<br />($fUsername)<br />"; + } + else + { + if (!empty ($fDomains[0])) + { + for ($i = 0; $i < sizeof ($fDomains); $i++) + { + $domain = $fDomains[$i]; + $result = db_query ("INSERT INTO " . table_by_key ('domain_admins') . " (username,domain,created) VALUES ('$fUsername','$domain',NOW())"); + } + } + $tMessage = $PALANG['pAdminCreate_admin_result_success'] . "<br />($fUsername"; + if ($CONF['generate_password'] == "YES" && $no_generate_password == 0) + { + $tMessage .= " / $fPassword)</br />"; + } + else + { + if ($CONF['show_password'] == "YES" && $no_generate_password == 0) + { + $tMessage .= " / $fPassword)</br />"; + } + else + { + $tMessage .= ")</br />"; + } + } + } + } + + # TODO: should we log creation, editing and deletion of admins? + # Note: needs special handling in viewlog, because domain is empty + # db_log ($SESSID_USERNAME, '', 'create_admin', "$fUsername"); + + return array( + $error, + $tMessage, + $pAdminCreate_admin_username_text, + $pAdminCreate_admin_password_text + ); + + +} + + $table_admin = table_by_key ('admin'); $table_alias = table_by_key ('alias'); $table_domain = table_by_key ('domain'); Modified: trunk/setup.php =================================================================== --- trunk/setup.php 2007-10-05 08:58:36 UTC (rev 134) +++ trunk/setup.php 2007-10-07 17:23:29 UTC (rev 135) @@ -22,17 +22,19 @@ * * Form POST \ GET Variables: -none- */ + +require_once("languages/en.lang"); +require_once("functions.inc.php"); + +$CONF['show_header_text'] = 'NO'; +require('templates/header.tpl'); ?> -<html> -<head> -<title>Postfix Admin Setup Checker</title> -</head> -<body> -<img id="login_header_logo" src="images/postbox.png" /> -<img id="login_header_logo" src="images/postfixadmin2.png" /> -<h2>Postfix Admin Setup Checker 1.0.0</h2> -Running software:<br /> -<p /> + +<div class='setup'> +<h2>Postfix Admin Setup Checker</h2> + +<p>Running software: +<ul> <?php // // Check for availablilty functions @@ -57,29 +59,28 @@ { if (phpversion() < 5) $phpversion = 4; if (phpversion() >= 5) $phpversion = 5; - print "- PHP version " . phpversion () . "<br />\n"; + print "<li>PHP version " . phpversion () . "\n"; } else { - print "<li><b>Unable to check for PHP version. (missing function: phpversion())</b><br />\n"; + print "<li><b>Unable to check for PHP version. (missing function: phpversion())</b>\n"; } -print "<p />\n"; // // Check for Apache version // if ($f_apache_get_version == 1) { - print "- " . apache_get_version() . "<br /><p />\n"; + print "<li>" . apache_get_version() . "\n"; } else { - print "<li><b>Unable to check for Apache version. (missing function: apache_get_version())</b><br />\n"; + print "<li><b>Unable to check for Apache version. (missing function: apache_get_version())</b>\n"; } -print "<p />\n"; -print "Checking for dependencies:<br />\n"; -print "<p />\n"; +print "</ul>"; +print "<p>Checking for dependencies:\n"; +print "<ul>\n"; // // Check for Magic Quotes @@ -88,26 +89,27 @@ { if (get_magic_quotes_gpc () == 0) { - print "- Magic Quotes: Disabled - OK<br /><p />\n"; + print "<li>Magic Quotes: Disabled - OK\n"; } else { - print "<li><b>Warning: Magic Quotes: ON (internal workaround used)</b><br /><p />\n"; + print "<li><b>Warning: Magic Quotes: ON (internal workaround used)</b>\n"; } } else { - print "<li><b>Unable to check for Magic Quotes. (missing function: get_magic_quotes_gpc())</b><br />\n"; + print "<li><b>Unable to check for Magic Quotes. (missing function: get_magic_quotes_gpc())</b>\n"; } -print "<p />\n"; - // // Check for config.inc.php // +$config_loaded = 0; if ($file_config == 1) { - print "- Depends on: presence config.inc.php - OK<br />\n"; + print "<li>Depends on: presence config.inc.php - OK\n"; + require_once('config.inc.php'); + $config_loaded = 1; } else { @@ -117,7 +119,6 @@ print "<pre>% cp config.inc.php.sample config.inc.php</pre>\n"; $error =+ 1; } -print "<p />\n"; // // Check if there is support for at least 1 database @@ -150,9 +151,8 @@ // if ($f_mysql_connect == 1) { - print "- Depends on: MySQL 3.23, 4.0 - OK<br />\n"; + print "<li>Depends on: MySQL 3.23, 4.0 - OK\n"; } -print "<p />\n"; // // MySQL 4.1 functions @@ -161,26 +161,45 @@ { if ($f_mysqli_connect == 1) { - print "- Depends on: MySQL 4.1 - OK (change the database_type in config.inc.php!!)<br />\n"; + print "<li>Depends on: MySQL 4.1 - OK\n"; + if ( !($config_loaded && $CONF['database_type'] == 'mysqli') ) { + print "(change the database_type to 'mysqli' in config.inc.php!!)\n"; + } } } -print "<p />\n"; // // PostgreSQL functions // if ($f_pg_connect == 1) { - print "- Depends on: PostgreSQL - OK (change the database_type in config.inc.php!!)<br />\n"; + print "<li>Depends on: PostgreSQL - OK \n"; + if ( !($config_loaded && $CONF['database_type'] == 'pgsql') ) { + print "(change the database_type to 'pgsql' in config.inc.php!!)\n"; + } } -print "<p />\n"; // +// Database connection +// +if ($config_loaded) { + list ($link, $error_text) = db_connect(TRUE); + if ($error_text == "") { + print "<li>Testing database connection - OK"; + } else { + print "<li><b>Error: Can't connect to database</b><br />\n"; + print "Please edit the \$CONF['database_*'] parameters in config.inc.php.\n"; + print "$error_text\n"; + $error ++; + } +} + +// // Session functions // if ($f_session_start == 1) { - print "- Depends on: session - OK<br />\n"; + print "<li>Depends on: session - OK\n"; } else { @@ -192,14 +211,13 @@ print "% portinstall php$phpversion-session</pre>\n"; $error =+ 1; } -print "<p />\n"; // // PCRE functions // if ($f_preg_match == 1) { - print "- Depends on: pcre - OK<br />\n"; + print "<li>Depends on: pcre - OK\n"; } else { @@ -211,15 +229,81 @@ print "% portinstall php$phpversion-pcre</pre>\n"; $error =+ 1; } -print "<p />\n"; -if ($error == 0) +print "</ul>"; + +if ($error != 0) { - print "Everything seems fine... you are ready to rock & roll!</br>\n"; + print "<p><b>Please fix the errors listed above.</b></p>"; +} +else +{ + print "<p>Everything seems fine... you are ready to rock & roll!</p>\n"; + + $pAdminCreate_admin_username_text = $PALANG['pAdminCreate_admin_username_text']; + $pAdminCreate_admin_password_text = ""; + $tUsername = ''; + $tMessage = ''; + + + if ($_SERVER['REQUEST_METHOD'] == "POST") + { + if (isset ($_POST['fUsername'])) $fUsername = escape_string ($_POST['fUsername']); + if (isset ($_POST['fPassword'])) $fPassword = escape_string ($_POST['fPassword']); + if (isset ($_POST['fPassword2'])) $fPassword2 = escape_string ($_POST['fPassword2']); + + list ($error, $tMessage, $pAdminCreate_admin_username_text, $pAdminCreate_admin_password_text) = create_admin($fUsername, $fPassword, $fPassword2, array('ALL'), TRUE); + if ($error != 0) { + if (isset ($_POST['fUsername'])) $tUsername = escape_string ($_POST['fUsername']); + } else { + print "<p><b>$tMessage</b></p>"; + echo "<p><b>You can now log in to Postfix Admin.</b></p>"; + } + } + + if ($_SERVER['REQUEST_METHOD'] == "GET" || $error != 0) + { + ?> + +<div id="edit_form"> +<form name="create_admin" method="post"> +<table> + <tr> + <td colspan="3"><h3>Create superadmin account</h3></td> + </tr> + <tr> + <td><?php print $PALANG['pAdminCreate_admin_username'] . ":"; ?></td> + <td><input class="flat" type="text" name="fUsername" value="<?php print $tUsername; ?>" /></td> + <td><?php print $pAdminCreate_admin_username_text; ?></td> + </tr> + <tr> + <td><?php print $PALANG['pAdminCreate_admin_password'] . ":"; ?></td> + <td><input class="flat" type="password" name="fPassword" /></td> + <td><?php print $pAdminCreate_admin_password_text; ?></td> + </tr> + <tr> + <td><?php print $PALANG['pAdminCreate_admin_password2'] . ":"; ?></td> + <td><input class="flat" type="password" name="fPassword2" /></td> + <td> </td> + </tr> + <tr> + <td colspan="3" class="hlp_center"><input class="button" type="submit" name="submit" value="<?php print $PALANG['pAdminCreate_admin_button']; ?>" /></td> + </tr> + <tr> + <td colspan="3" class="standout"><?php print $tMessage; ?></td> + </tr> +</table> +</form> +</div> + + <?php + } + print "<b>Make sure you delete this setup.php file!</b><br />\n"; print "Also check the config.inc.php file for any settings that you might need to change!<br />\n"; print "Click here to go to the <a href=\"admin\">admin section</a> (make sure that your .htaccess is setup properly)\n"; } ?> +</div> </body> </html> Modified: trunk/stylesheet.css =================================================================== --- trunk/stylesheet.css 2007-10-05 08:58:36 UTC (rev 134) +++ trunk/stylesheet.css 2007-10-07 17:23:29 UTC (rev 135) @@ -21,10 +21,6 @@ color: #888888; } -ul { - padding-left: 0px; -} - table { // border-spacing: 0; // padding: 0; @@ -250,4 +246,13 @@ color: #777777; } +div.setup { + width:700px; + margin-left:auto; + margin-right:auto; + text-align: left; +} +div.setup li { + padding-bottom:1em; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-10-07 17:49:46
|
Revision: 137 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=137&view=rev Author: christian_boltz Date: 2007-10-07 10:49:50 -0700 (Sun, 07 Oct 2007) Log Message: ----------- - force user to delete setup.php (which allows creation of superadmins now!) Note: Developers can use $CONF['configured'] == 'I_know_the_risk_of_not_deleting_setup.php' to avoid deletion of setup.php after every "svn up". WARNING: THIS ALLOWS NON-AUTHENTIFICATED USERS TO CREATE SUPERADMIN ACCOUNTS! Use this setting only on development systems, where the database is not used by postfix. Modified Paths: -------------- trunk/index.php trunk/login.php Modified: trunk/index.php =================================================================== --- trunk/index.php 2007-10-07 17:41:29 UTC (rev 136) +++ trunk/index.php 2007-10-07 17:49:50 UTC (rev 137) @@ -21,7 +21,9 @@ * Form POST \ GET Variables: -none- */ -if (!file_exists (realpath ("./setup.php"))) +$CONF['configured'] = FALSE; +@include_once('config.inc.php'); # hide error message because only $CONF['configured'] is checked here +if (!file_exists (realpath ("./setup.php")) || $CONF['configured'] == 'I_know_the_risk_of_not_deleting_setup.php') { header ("Location: login.php"); exit; Modified: trunk/login.php =================================================================== --- trunk/login.php 2007-10-07 17:41:29 UTC (rev 136) +++ trunk/login.php 2007-10-07 17:49:50 UTC (rev 137) @@ -28,6 +28,19 @@ */ require_once('common.php'); + +# force user to delete setup.php (allows creation of superadmins!) +if (file_exists (realpath ("./setup.php"))) { + if (is_string($CONF['configured']) && $CONF['configured'] == 'I_know_the_risk_of_not_deleting_setup.php') + { + } + else + { + print "Please delete setup.php before using Postfix Admin!"; + exit; + } +} + if ($_SERVER['REQUEST_METHOD'] == "GET") { include ("./templates/header.tpl"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-10-07 23:12:05
|
Revision: 140 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=140&view=rev Author: christian_boltz Date: 2007-10-07 16:12:07 -0700 (Sun, 07 Oct 2007) Log Message: ----------- - initial version of fetchmail support (by Viktor Gotwig,info AT symateam.de) (see postfixadmin-devel mailinglist for detailed description and known problems, subject "fetchmail support") - encoded some german umlauts as htmlentities Modified Paths: -------------- trunk/languages/de.lang trunk/languages/en.lang Added Paths: ----------- trunk/fetchmail.php trunk/templates/fetchmail.tpl Added: trunk/fetchmail.php =================================================================== --- trunk/fetchmail.php (rev 0) +++ trunk/fetchmail.php 2007-10-07 23:12:07 UTC (rev 140) @@ -0,0 +1,174 @@ +<?php +/** + * Postfix Admin + * + * LICENSE + * This source file is subject to the GPL license that is bundled with + * this package in the file LICENSE.TXT. + * + * Further details on the project are available at : + * http://www.postfixadmin.com or http://postfixadmin.sf.net + * + * @version $Id$ + * @license GNU GPL v2 or later. + * + * File: fetchmail.php + * Responsible for setting up fetchmail + * + * @version $Id$ + * @license GNU GPL v2 or later. + * + * Template Variables: + * + * TODO + * + * Form POST \ GET Variables: + * + * TODO + */ + +/* new sql table: fetchmail + +create table fetchmail( + id int(11) unsigned not null auto_increment, + mailbox varchar(255) not null default '', + src_server varchar(255) not null default '', + src_auth enum('password','kerberos_v5','kerberos','kerberos_v4','gssapi','cram-md5','otp','ntlm','msn','ssh','any'), + src_user varchar(255) not null default '', + src_password varchar(255) not null default '', + src_folder varchar(255) not null default '', + pool_time int(11) unsigned not null default 10, + fetchall tinyint(1) unsigned not null default 0, + keep tinyint(1) unsigned not null default 0, + protocol enum('POP3','IMAP','POP2','ETRN','AUTO'), + extra_options text, + returned_text text, + mda varchar(255) not null default '', + date timestamp(14), + primary key(id) +); + +*/ + +require_once('common.php'); + +authentication_require_role('admin'); + +$fm_struct=array( // list($editible,$view,$type,$title,$comment) + "id" =>array(0,1,'id', 'ID','Record ID'), + "mailbox" =>array(1,1,'enum', 'Mailbox','Local mailbox'), + "src_server" =>array(1,1,'text', 'Server','Remote Server'), + "src_auth" =>array(1,1,'enum', 'Auth Type','Mostly password'), + "src_user" =>array(1,1,'text', 'User','Remote User'), + "src_password" =>array(1,1,'password', 'Password','Remote Password'), + "src_folder" =>array(1,1,'text', 'Folder','Remote Folder'), + "pool_time" =>array(1,1,'num', 'Poll','Poll Time (min)'), + "fetchall" =>array(1,1,'bool', 'Fetch All','Retrieve both old (seen) and new messages'), + "keep" =>array(1,1,'bool', 'Keep','Keep retrieved messages on the remote mailserver'), + "protocol" =>array(1,1,'enum', 'Protocol','Protocol to use'), + "extra_options" =>array(1,1,'longtext', 'Extra Options','Extra fetchmail Options'), + "mda" =>array(1,1,'longtext', 'MDA','Mail Delivery Agent'), + "date" =>array(0,1,'text', 'Date','Date of last pooling/configuration change'), + "returned_text" =>array(0,1,'longtext', 'Returned Text','Text message from last pooling'), +); + +$SESSID_USERNAME = authentication_get_username(); +if (!$SESSID_USERNAME ) + exit; + +$fm_defaults=array( + "id" =>0, + "mailbox" => array($SESSID_USERNAME), + "pool_time" =>10, + "src_auth" => + array('password','kerberos_v5','kerberos','kerberos_v4','gssapi','cram-md5','otp','ntlm','msn','ssh','any'), + "protocol" => + array('POP3','IMAP','POP2','ETRN','AUTO'), +); + + +$list_domains = list_domains_for_admin ($SESSID_USERNAME); +$user_domains=implode("','",array_values($list_domains)); +$sql="SELECT username FROM mailbox WHERE domain in ('".$user_domains."')"; + +$res = db_query ($sql); +if ($res['rows'] > 0){ + $fm_defaults["mailbox"]=array(); + while ($name = db_array ($res['result'])){ + $fm_defaults["mailbox"][] = $name["username"]; + } +} +else{ + $fm_defaults["mailbox"]=array(); + $fm_defaults["mailbox"][]=$SESSID_USERNAME; +} + +$new=$_REQUEST["new"]; +$edit=(int)$_REQUEST["edit"]; +$delete=$_REQUEST["delete"]; +$save=$_REQUEST["save"]; +$cancel=$_REQUEST["cancel"]; + +if ($cancel){ + $edit=0; +} +elseif($edit && $save){ + $_vals=array(); + foreach($fm_struct as $key=>$row){ + list($editible,$view,$type,$title,$comment)=$row; + if ($editible){ + $func="_inp_".$type; + $val=$_REQUEST[$key]; + if ($type!="password" || substr($val,0,1)!="*"){ + $_vals[]=$key."='".mysql_escape_string( + function_exists($func) + ?$func($val) + :$val)."'"; + } + } + } + $sql="UPDATE fetchmail SET ".implode(",",$_vals).",returned_text='' WHERE id=".$edit; + $res= db_query ($sql); +} +elseif($delete){ + db_query ("delete from fetchmail WHERE id=".$edit); +} +elseif ($new){ + $_keys=array(); + $_vals=array(); + foreach($fm_defaults as $key=>$val){ + $_keys[]=$key; + $_vals[]="'".(is_array($val)?$val[0]:mysql_escape_string($val))."'"; + } + $sql="INSERT fetchmail (".implode(",",$_keys).") VALUES (".implode(",",$_vals).")"; + $res= db_query ($sql); + $sql="SELECT id FROM fetchmail order by id desc limit 1"; + $res= db_query ($sql); + list($edit)=mysql_fetch_row($res['result']); +} + +$res = db_query ("SELECT ".implode(",",array_keys($fm_struct))." FROM fetchmail order by id desc"); +if ($res['rows'] > 0){ + while ($row = db_array ($res['result'])){ + $tFmail[] = $row; + } +} + +function _inp_num($val){ + return (int)($val); +} + +function _inp_bool($val){ + return $val?1:0; +} + +function _inp_password($val){ + return base64_encode($val); +} + + include ("./templates/header.tpl"); + include ("./templates/menu.tpl"); + include ("./templates/fetchmail.tpl"); + include ("./templates/footer.tpl"); + +?> Modified: trunk/languages/de.lang =================================================================== --- trunk/languages/de.lang 2007-10-07 19:52:40 UTC (rev 139) +++ trunk/languages/de.lang 2007-10-07 23:12:07 UTC (rev 140) @@ -25,6 +25,7 @@ $PALANG['pMenu_overview'] = 'Überblick'; $PALANG['pMenu_create_alias'] = 'Alias hinzufügen'; $PALANG['pMenu_create_mailbox'] = 'Mailbox hinzufügen'; +$PALANG['pMenu_fetchmail'] = 'E-Mail Abruf bearbeiten'; $PALANG['pMenu_sendmail'] = 'Email versenden'; $PALANG['pMenu_password'] = 'Passwort ändern'; $PALANG['pMenu_viewlog'] = 'Log ansehen'; @@ -32,7 +33,7 @@ $PALANG['pMain_welcome'] = 'Willkommen zu Postfix Admin!'; $PALANG['pMain_overview'] = 'Listet Ihre Aliase und Mailboxen auf. Sie können sie hier editieren und löschen.'; -$PALANG['pMain_create_alias'] = 'Fügt einen neuen Alias für Ihre Domain hinzu.'; +$PALANG['pMain_create_alias'] = 'Fügt einen neuen Alias für Ihre Domain hinzu.'; $PALANG['pMain_create_mailbox'] = 'Legt eine neue Mailbox für Ihre Domain an.'; $PALANG['pMain_sendmail'] = 'Versenden Sie eine Email.'; $PALANG['pMain_password'] = 'Ändern Sie Ihr Admin-Passwort.'; @@ -280,24 +281,28 @@ $PALANG['pUsersVacation_subject_text'] = 'Ich bin weg...'; $PALANG['pUsersVacation_body'] = 'Text'; $PALANG['pUsersVacation_body_text'] = <<<EOM -Ich bin vom <date> bis <date> nicht zu Hause / im Büro. -In dringenden Fällen setzen Sie sich bitte mit <contact person> in Verbindung. -Vielen Dank für Ihr Verständniss. +Ich bin vom <date> bis <date> nicht zu Hause / im Büro. +In dringenden Fällen setzen Sie sich bitte mit <contact person> in Verbindung. +Vielen Dank für Ihr Verständnis. EOM; $PALANG['pUsersVacation_button_away'] = 'Ich gehe weg'; $PALANG['pUsersVacation_button_back'] = 'Ich bin zurück'; $PALANG['pUsersVacation_result_error'] = '<span class="error_msg">Konnte Ihre Automatische Antwort nicht einstellen!</span>'; $PALANG['pUsersVacation_result_success'] = 'Ihre Automatische Antwort wurde gelöscht!'; -$PALANG['pCreate_dbLog_createmailbox'] = 'Mailbox hinzufügen'; -$PALANG['pCreate_dbLog_createalias'] = 'Alias hinzufügen'; -$PALANG['pDelete_dbLog_deletealias'] = 'Alias löschen'; -$PALANG['pDelete_dbLog_deletemailbox'] = 'Mailbox löschen'; +$PALANG['pCreate_dbLog_createmailbox'] = 'Mailbox hinzufügen'; +$PALANG['pCreate_dbLog_createalias'] = 'Alias hinzuü\xBCgen'; +$PALANG['pDelete_dbLog_deletealias'] = 'Alias lüschen'; +$PALANG['pDelete_dbLog_deletemailbox'] = 'Mailbox löschen'; -$PALANG['pEdit_dbLog_editactive'] = 'Aktiv-Status ändern'; +$PALANG['pEdit_dbLog_editactive'] = 'Aktiv-Status ändern'; $PALANG['pEdit_dbLog_editalias'] = 'Alias bearbeiten'; $PALANG['pEdit_dbLog_editmailbox'] = 'Mailbox bearbeiten'; $PALANG['pSearch'] = 'suche'; $PALANG['pSearch_welcome'] = 'Suche nach: '; + +$PALANG['pFetchmail_welcome'] = 'E-Mail Abruf für: '; +$PALANG['pFetchmail_new_entry'] = 'Neuer Eintrag'; + ?> Modified: trunk/languages/en.lang =================================================================== --- trunk/languages/en.lang 2007-10-07 19:52:40 UTC (rev 139) +++ trunk/languages/en.lang 2007-10-07 23:12:07 UTC (rev 140) @@ -28,6 +28,7 @@ $PALANG['pMenu_overview'] = 'Overview'; $PALANG['pMenu_create_alias'] = 'Add Alias'; $PALANG['pMenu_create_mailbox'] = 'Add Mailbox'; +$PALANG['pMenu_fetchmail'] = 'Fetch Email'; $PALANG['pMenu_sendmail'] = 'Send Email'; $PALANG['pMenu_password'] = 'Password'; $PALANG['pMenu_viewlog'] = 'View Log'; @@ -354,4 +355,8 @@ $PALANG['pStatus_popimap'] = 'POP/IMAP '; $PALANG['pPasswordTooShort'] = "Password is too short - requires %s characters"; + +$PALANG['pFetchmail_welcome'] = 'Fetch mail for:'; +$PALANG['pFetchmail_new_entry'] = 'New entry'; + ?> Added: trunk/templates/fetchmail.tpl =================================================================== --- trunk/templates/fetchmail.tpl (rev 0) +++ trunk/templates/fetchmail.tpl 2007-10-07 23:12:07 UTC (rev 140) @@ -0,0 +1,155 @@ +<div id="overview"> +<form name="overview" method="post"> + +<?php + + $headers=array(); + foreach($fm_struct as $row){ + list($editible,$view,$type,$title,$comment)=$row; + if ($view){ + $headers[]=$row; + } + } + + print "<table id=\"log_table\" border=0>\n"; + print " <tr>\n"; + print " <td colspan=\"".(sizeof($headers)-1)."\"><h3>".$PALANG['pFetchmail_welcome'].$user_domains."</h3></td>\n"; + print " <td align=right><a href='?new=1'>>> ".$PALANG['pFetchmail_new_entry']."</a></td>\n"; + print " </tr>\n"; + print " <tr class=\"header\">\n"; + foreach($headers as $row){ + list($editible,$view,$type,$title,$comment)=$row; + print " <td>" . $title . "</td>\n"; + } + print " </tr>\n"; + + if (sizeof ($tFmail) > 0){ + foreach($tFmail as $row){ + if ($edit && $edit==$row["id"]){ + print "<tr><td colspan=".sizeof($headers).">".fetchmail_edit_row($row)."</td></tr>\n"; + } + else{ + print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n"; + foreach($row as $key=>$val){ + list($editible,$view,$type,$title,$comment)=$fm_struct[$key]; + if ($view){ + $func="_listview_".$type; + print " <td nowrap>" . (function_exists($func)?$func($val):$val) . "</td>\n"; + } + } + print " </tr>\n"; + } + } + + } + +function fetchmail_edit_row($data=array()){ + global $fm_struct,$fm_defaults; + $id=$data["id"]; + $_id=$data["id"]*100+1; + $ret="<table cellspacing=1 cellpadding=0 border=0 width=100%>"; + foreach($fm_struct as $key=>$struct){ + list($editible,$view,$type,$title,$comment)=$struct; + if ($editible){ + $ret.="<tr><td align=left valign=top><label for=${_id} style='width:20em;'>${title}: </label></td>"; + $ret.="<td align=left style='padding-left:.25em;padding-right:.25em;background-color:white;'>"; + $func="_edit_".$type; + if (! function_exists($func)) + $func="_edit_text"; + $val=isset($data[$key]) + ?$data[$key] + :(! is_array($fm_defaults[$key]) + ?$fm_defaults[$key] + :'' + ); + $ret.=$func($_id++,$key,$fm_defaults[$key],$val); + $ret.="</td><td align=left valign=top><i> ${comment}</i></td></tr>\n"; + } + elseif($view){ + $func="_view_".$type; + $val=isset($data[$key]) + ?(function_exists($func) + ?$func($data[$key]) + :nl2br($data[$key]) + ) + :"--x--"; + $ret.="<tr><td align=left valign=top>${title}: </label></td>"; + $ret.="<td align=left valign=top style='padding-left:.25em;padding-right:.25em;background-color:white;'>".$val; + $ret.="</td><td align=left valign=top><i> ${comment}</i></td></tr>\n"; + } + } + $ret.="<tr><td align=left><input type=submit name=cancel value='Abbrechen'></td><td align=right><input type=submit name=save value='Save'></td><td align=right><input type=submit name=delete value='Delete'>"; + if ($id){ + $ret.="<input type=hidden name=edit value='${id}'>"; + } + $ret.="</td></tr>\n"; + $ret.="</table>\n"; + return $ret; +} + +function _edit_text($id,$key,$def_vals,$val=""){ + $val=htmlspecialchars($val); + return "<input type=text name=${key} id=${id} value='${val}'>"; +} + +function _edit_password($id,$key,$def_vals,$val=""){ + $val=preg_replace("{.}","*",$val); + return "<input type=password name=${key} id=${id} value='${val}'>"; +} + +function _edit_num($id,$key,$def_vals,$val=""){ + $val=(int)($val); + return "<input type=text name=${key} id=${id} value='${val}'>"; +} + +function _edit_bool($id,$key,$def_vals,$val=""){ + $ret="<input type=checkbox name=${key} id=${id}"; + if ($val) + $ret.=" checked"; + $ret.=">"; + return $ret; +} + +function _edit_longtext($id,$key,$def_vals,$val=""){ + $val=htmlspecialchars($val); + return "<textarea name=${key} id=${id} rows=2 style='width:20em;'>${val}</textarea>"; +} + +function _edit_enum($id,$key,$def_vals,$val=""){ + $ret="<select name=${key} id=${id}>"; + foreach($def_vals as $opt_val){ + $ret.="<option"; + if ($opt_val==$val) + $ret.=" selected"; + $ret.=">${opt_val}</option>\n"; + } + $ret.="</select>\n"; + return $ret; +} + +function _listview_id($val){ + return "<a href='?edit=${val}'> ${val} </a>"; +} + +function _listview_bool($val){ + return $val?"+":""; +} + +function _listview_longtext($val){ + return strlen($val)?"Text - ".strlen($val)." chars":"--x--"; +} + +function _listview_text($val){ + return sizeof($val)?$val:"--x--"; +} + +function _listview_password($val){ + return preg_replace("{.}","*",$val); +} + + +?> +</table> +<p /> +</form> +</div> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-10-07 23:24:12
|
Revision: 141 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=141&view=rev Author: christian_boltz Date: 2007-10-07 16:24:14 -0700 (Sun, 07 Oct 2007) Log Message: ----------- - DATABASE_*.TXT: Do no longer create default superadmin ad...@do...d, this is now done via setup.php Modified Paths: -------------- trunk/DATABASE_MYSQL.TXT trunk/DATABASE_PGSQL.TXT Modified: trunk/DATABASE_MYSQL.TXT =================================================================== --- trunk/DATABASE_MYSQL.TXT 2007-10-07 23:12:07 UTC (rev 140) +++ trunk/DATABASE_MYSQL.TXT 2007-10-07 23:24:14 UTC (rev 141) @@ -150,8 +150,3 @@ FOREIGN KEY (on_vacation) REFERENCES vacation(email) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci TYPE=InnoDB COMMENT='Postfix Admin - Virtual Vacation Notifications'; -# -# -# superadmin user & password (login: ad...@do...d, password: admin) -INSERT INTO domain_admins (username, domain, active) VALUES ('ad...@do...d','ALL','1'); -INSERT INTO admin (username, password, active) VALUES ('ad...@do...d','$1$0fec9189$bgI6ncWrldPOsXnkUBIjl1','1'); Modified: trunk/DATABASE_PGSQL.TXT =================================================================== --- trunk/DATABASE_PGSQL.TXT 2007-10-07 23:12:07 UTC (rev 140) +++ trunk/DATABASE_PGSQL.TXT 2007-10-07 23:24:14 UTC (rev 141) @@ -167,9 +167,3 @@ GRANT SELECT ON vacation TO vacation; GRANT SELECT,INSERT,DELETE ON vacation_notification TO vacation; --- --- --- superadmin user & password (login: ad...@do...d, password: admin) -INSERT INTO domain (domain) VALUES ('ALL'); -INSERT INTO domain_admins (username, domain, active) VALUES ('ad...@do...d','ALL','1'); -INSERT INTO admin (username, password, active) VALUES ('ad...@do...d','$1$0fec9189$bgI6ncWrldPOsXnkUBIjl1','1'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Gin...@us...> - 2007-10-09 16:23:07
|
Revision: 143 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=143&view=rev Author: GingerDog Date: 2007-10-09 09:23:09 -0700 (Tue, 09 Oct 2007) Log Message: ----------- fix edit-admin to not use the db password to pre-populate the field - as per emails with Christian Boltz Modified Paths: -------------- trunk/admin/edit-admin.php trunk/templates/admin_edit-admin.tpl Modified: trunk/admin/edit-admin.php =================================================================== --- trunk/admin/edit-admin.php 2007-10-09 16:19:41 UTC (rev 142) +++ trunk/admin/edit-admin.php 2007-10-09 16:23:09 UTC (rev 143) @@ -71,24 +71,25 @@ // has the password changed? $originalPassword = $admin_details['password']; - if($fPassword != $originalPassword) { - // if it has, ensure both fields are the same... - if ($fPassword == $fPassword2) - { - if(strlen($fPassword) >= $CONF['min_password_length']) { - $fPassword = pacrypt($fPassword); + if($fPassword != '') { + if($fPassword != $originalPassword) { + // if it has, ensure both fields are the same... + if ($fPassword == $fPassword2) + { + if(strlen($fPassword) >= $CONF['min_password_length']) { + $fPassword = pacrypt($fPassword); + } + else { + $error = 1; + flash_error(sprintf($PALANG['pPasswordTooShort'], $CONF['min_password_length'])); + } } else { $error = 1; - flash_error(sprintf($PALANG['pPasswordTooShort'], $CONF['min_password_length'])); + $pAdminEdit_admin_password_text = $PALANG['pAdminEdit_admin_password_text_error']; } } - else { - $error = 1; - $pAdminEdit_admin_password_text = $PALANG['pAdminEdit_admin_password_text_error']; - } } - $fDomains = array(); if (array_key_exists('fDomains', $_POST)) $fDomains = escape_string ($_POST['fDomains']); if ($error != 1) Modified: trunk/templates/admin_edit-admin.tpl =================================================================== --- trunk/templates/admin_edit-admin.tpl 2007-10-09 16:19:41 UTC (rev 142) +++ trunk/templates/admin_edit-admin.tpl 2007-10-09 16:23:09 UTC (rev 143) @@ -4,27 +4,27 @@ <tr> <td colspan="3"><h3><?php print $PALANG['pAdminEdit_admin_welcome']; ?></h3></td></tr> <tr> - <td><?php print $PALANG['pAdminEdit_admin_username'] . ":"; ?></td> + <td><?php print $PALANG['pAdminEdit_admin_username']; ?>:</td> <td><?php print $username; ?></td> <td> </td> </tr> <tr> - <td><?php print $PALANG['pAdminEdit_admin_password'] . ":"; ?></td> - <td><input class="flat" type="password" autocomplete="off" name="fPassword" value="<?php echo $tPassword; ?>"/></td> + <td><?php print $PALANG['pAdminEdit_admin_password']; ?>:</td> + <td><input class="flat" type="password" autocomplete="off" name="fPassword" value=""/></td> <td><?php print $pAdminEdit_admin_password_text; ?></td> </tr> <tr> - <td><?php print $PALANG['pAdminEdit_admin_password2'] . ":"; ?></td> - <td><input class="flat" type="password" name="fPassword2" /></td> + <td><?php print $PALANG['pAdminEdit_admin_password2']; ?>:</td> + <td><input class="flat" type="password" name="fPassword2" value="" /></td> <td> </td> </tr> <tr> - <td><?php print $PALANG['pAdminEdit_admin_active'] . ":"; ?></td> + <td><?php print $PALANG['pAdminEdit_admin_active']; ?>:</td> <td><input class="flat" type="checkbox" name="fActive" <?php print (!empty ($tActive)) ? 'checked' : ''; ?> /></td> <td> </td> </tr> <tr> - <td><?php print $PALANG['pAdminEdit_admin_super_admin'] . ":"; ?></td> + <td><?php print $PALANG['pAdminEdit_admin_super_admin']; ?>:</td> <td><input class="flat" type="checkbox" name="fSadmin" <?php print (!empty ($tSadmin)) ? 'checked' : ''; ?> /></td> <td> </td> </tr> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-10-11 22:27:23
|
Revision: 151 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=151&view=rev Author: christian_boltz Date: 2007-10-11 15:27:25 -0700 (Thu, 11 Oct 2007) Log Message: ----------- - added fetchmail.php to menu.tpl (only displayed if $CONF['fetchmail'] == 'YES') - shortened german menu text for fetchmail - config.inc.php: - added $CONF['fetchmail'] and $CONF['fetchmail_extra_options'], including a big warning for the latter one. - include config.inc.php at the end if it exists. This can make future updates easier because you don't have to edit config.inc.php itsself. It should also make development easier because you don't need to undo local changes before commiting config.inc.php - fetchmail.tpl: - new array display_fields, contains the list of fields to display in the table. This also solves most "undefined index" warnings. Note: editing fetchmail does not honor $CONF['fetchmail_extra_options'] = 'NO' yet. Modified Paths: -------------- trunk/config.inc.php trunk/languages/de.lang trunk/templates/fetchmail.tpl trunk/templates/menu.tpl Modified: trunk/config.inc.php =================================================================== --- trunk/config.inc.php 2007-10-11 18:58:24 UTC (rev 150) +++ trunk/config.inc.php 2007-10-11 22:27:25 UTC (rev 151) @@ -197,6 +197,15 @@ // If you don't want logging set this to 'NO'; $CONF['logging'] = 'YES'; +// Fetchmail +// If you don't want fetchmail tab set this to 'NO'; +$CONF['fetchmail'] = 'YES'; + +// fetchmail_extra_options allows users to specify any fetchmail options and any MDA +// (it will even accept 'rm -rf /' as MDA!) +// This should be set to NO, except if you *really* trust *all* your users. +$CONF['fetchmail_extra_options'] = 'NO'; + // Header $CONF['show_header_text'] = 'NO'; $CONF['header_text'] = ':: Postfix Admin ::'; @@ -299,6 +308,15 @@ // See also the "Optional flags for names" table at // http://www.php.net/manual/en/function.imap-open.php + +// If you want to keep most settings at default values and/or want to ensure +// that future updates work without problems, you can use a separate config +// file (config.local.php) instead of editing this file and override some +// settings there. +if (file_exists (realpath ("./config.local.php"))) { + include('config.local.php'); +}; + // // END OF CONFIG FILE // Modified: trunk/languages/de.lang =================================================================== --- trunk/languages/de.lang 2007-10-11 18:58:24 UTC (rev 150) +++ trunk/languages/de.lang 2007-10-11 22:27:25 UTC (rev 151) @@ -29,7 +29,7 @@ $PALANG['pMenu_overview'] = 'Überblick'; $PALANG['pMenu_create_alias'] = 'Alias hinzufügen'; $PALANG['pMenu_create_mailbox'] = 'Mailbox hinzufügen'; -$PALANG['pMenu_fetchmail'] = 'E-Mail Abruf bearbeiten'; +$PALANG['pMenu_fetchmail'] = 'E-Mail Abruf'; $PALANG['pMenu_sendmail'] = 'Email versenden'; $PALANG['pMenu_password'] = 'Passwort ändern'; $PALANG['pMenu_viewlog'] = 'Log ansehen'; Modified: trunk/templates/fetchmail.tpl =================================================================== --- trunk/templates/fetchmail.tpl 2007-10-11 18:58:24 UTC (rev 150) +++ trunk/templates/fetchmail.tpl 2007-10-11 22:27:25 UTC (rev 151) @@ -2,12 +2,41 @@ <form name="overview" method="post"> <?php - + +# fields to display in table view +$display_fields=array( + "id", + "mailbox", + "src_server", + "src_auth", + "src_user", +# "src_password", + "src_folder", + "pool_time", + "fetchall", + "keep", + "protocol", +); + +if ($CONF['fetchmail_extra_options'] == 'YES') { + array_push( + $display_fields, + "extra_options", + "mda" + ); +} + +array_push( + $display_fields, + "date", + "returned_text" +); + $headers=array(); - foreach($fm_struct as $row){ - list($editible,$view,$type,$title,$comment)=$row; + foreach($display_fields as $row){ + list($editible,$view,$type,$title,$comment)=$fm_struct[$row]; if ($view){ - $headers[]=$row; + $headers[]=$fm_struct[$row]; } } @@ -30,17 +59,19 @@ } else{ print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n"; - foreach($row as $key=>$val){ + foreach($display_fields as $key){ + list($editible,$view,$type,$title,$comment)=$fm_struct[$key]; + $val = $row[$key]; if ($view){ $func="_listview_".$type; print " <td nowrap>" . (function_exists($func)?$func($val):$val) . "</td>\n"; } + } print " </tr>\n"; } } - } function fetchmail_edit_row($data=array()){ @@ -153,3 +184,4 @@ <p /> </form> </div> +<?php /* vim: set ft=php expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ ?> Modified: trunk/templates/menu.tpl =================================================================== --- trunk/templates/menu.tpl 2007-10-11 18:58:24 UTC (rev 150) +++ trunk/templates/menu.tpl 2007-10-11 22:27:25 UTC (rev 151) @@ -6,6 +6,9 @@ <li><a target="_top" href="<?php print $url; ?>"><?php print $PALANG['pMenu_create_alias']; ?></a></li> <?php $url = "create-mailbox.php"; if (isset ($_GET['domain'])) $url .= "?domain=" . $_GET['domain']; ?> <li><a target="_top" href="<?php print $url; ?>"><?php print $PALANG['pMenu_create_mailbox']; ?></a></li> + <?php if ($CONF['fetchmail'] == "YES") { ?> + <li><a target="_top" href="fetchmail.php"><?php print $PALANG['pMenu_fetchmail']; ?></a></li> + <?php } ?> <?php if ($CONF['sendmail'] == 'YES') { ?><li><a target="_top" href="sendmail.php"><?php print $PALANG['pMenu_sendmail']; ?></a></li><?php } ?> <?php if ($CONF['vacation'] == "YES") { ?> <li><a target="_top" href="edit-vacation.php"><?php print $PALANG['pUsersMenu_vacation']; ?></a></li> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-10-23 00:01:27
|
Revision: 160 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=160&view=rev Author: christian_boltz Date: 2007-10-22 17:01:31 -0700 (Mon, 22 Oct 2007) Log Message: ----------- fetchmail.php - changed editable and display flags of some columns in $fm_struct (this array is pretty useful once you understand how to use it ;-) - completed support for $CONF['fetchmail_extra_options'] = 'NO' - added several escape_string() calls - fixed several $_GET/$_POST undefined index warnings - fixed some MySQL vs. PgSQL issues - some small fixes fetchmail.tpl - changed layout to separate list and edit view - fixed an undefined index warning - replaced ID column with edit link Modified Paths: -------------- trunk/fetchmail.php trunk/templates/fetchmail.tpl Modified: trunk/fetchmail.php =================================================================== --- trunk/fetchmail.php 2007-10-22 23:49:10 UTC (rev 159) +++ trunk/fetchmail.php 2007-10-23 00:01:31 UTC (rev 160) @@ -54,20 +54,25 @@ authentication_require_role('admin'); +$extra_options = 0; +if ($CONF['fetchmail_extra_options'] == 'YES') $extra_options = 1; + $fm_struct=array( // list($editible,$view,$type,$title,$comment) - "id" =>array(0,1,'id', 'ID','Record ID'), + # first column: allow editing? + # second column: display field? + "id" =>array(0,0,'id', 'ID','Record ID'), "mailbox" =>array(1,1,'enum', 'Mailbox','Local mailbox'), "src_server" =>array(1,1,'text', 'Server','Remote Server'), "src_auth" =>array(1,1,'enum', 'Auth Type','Mostly password'), "src_user" =>array(1,1,'text', 'User','Remote User'), - "src_password" =>array(1,1,'password', 'Password','Remote Password'), + "src_password" =>array(1,0,'password', 'Password','Remote Password'), "src_folder" =>array(1,1,'text', 'Folder','Remote Folder'), "pool_time" =>array(1,1,'num', 'Poll','Poll Time (min)'), "fetchall" =>array(1,1,'bool', 'Fetch All','Retrieve both old (seen) and new messages'), "keep" =>array(1,1,'bool', 'Keep','Keep retrieved messages on the remote mailserver'), "protocol" =>array(1,1,'enum', 'Protocol','Protocol to use'), - "extra_options" =>array(1,1,'longtext', 'Extra Options','Extra fetchmail Options'), - "mda" =>array(1,1,'longtext', 'MDA','Mail Delivery Agent'), + "extra_options" =>array($extra_options,$extra_options,'longtext', 'Extra Options','Extra fetchmail Options'), + "mda" =>array($extra_options,$extra_options,'longtext', 'MDA','Mail Delivery Agent'), "date" =>array(0,1,'text', 'Date','Date of last pooling/configuration change'), "returned_text" =>array(0,1,'longtext', 'Returned Text','Text message from last pooling'), ); @@ -86,10 +91,11 @@ array('POP3','IMAP','POP2','ETRN','AUTO'), ); - + $list_domains = list_domains_for_admin ($SESSID_USERNAME); -$user_domains=implode("','",array_values($list_domains)); -$sql="SELECT username FROM mailbox WHERE domain in ('".$user_domains."')"; +$user_domains=implode("','",array_values($list_domains)); # for displaying +$user_domains_sql=implode("','",escape_string(array_values($list_domains))); # for SQL +$sql="SELECT username FROM mailbox WHERE domain in ('".$user_domains_sql."')"; $res = db_query ($sql); if ($res['rows'] > 0){ @@ -100,14 +106,14 @@ } else{ $fm_defaults["mailbox"]=array(); - $fm_defaults["mailbox"][]=$SESSID_USERNAME; + $fm_defaults["mailbox"][]=$SESSID_USERNAME; # TODO: Does this really make sense? Or should we display a message "please create a mailbox first!"? } -$new=$_REQUEST["new"]; -$edit=(int)$_REQUEST["edit"]; -$delete=$_REQUEST["delete"]; -$save=$_REQUEST["save"]; -$cancel=$_REQUEST["cancel"]; +$new = (int) safeget ("new"); +$edit = (int) safeget ("edit"); +$delete = safepost("delete"); +$save = safepost("save"); +$cancel = safepost("cancel"); if ($cancel){ $edit=0; @@ -116,11 +122,11 @@ $_vals=array(); foreach($fm_struct as $key=>$row){ list($editible,$view,$type,$title,$comment)=$row; - if ($editible){ + if ($editible != 0){ $func="_inp_".$type; - $val=$_REQUEST[$key]; + $val=safepost($key); if ($type!="password" || substr($val,0,1)!="*"){ - $_vals[]=$key."='".mysql_escape_string( + $_vals[]=$key."='".escape_string( function_exists($func) ?$func($val) :$val)."'"; @@ -132,22 +138,23 @@ } elseif($delete){ db_query ("delete from fetchmail WHERE id=".$edit); + $edit=0; } elseif ($new){ $_keys=array(); $_vals=array(); foreach($fm_defaults as $key=>$val){ $_keys[]=$key; - $_vals[]="'".(is_array($val)?$val[0]:mysql_escape_string($val))."'"; + $_vals[]="'".(is_array($val)?$val[0]:$val)."'"; } - $sql="INSERT fetchmail (".implode(",",$_keys).") VALUES (".implode(",",$_vals).")"; + $sql="INSERT fetchmail (".implode(",",escape_string($_keys)).") VALUES (".implode(",",escape_string($_vals)).")"; $res= db_query ($sql); $sql="SELECT id FROM fetchmail order by id desc limit 1"; $res= db_query ($sql); list($edit)=mysql_fetch_row($res['result']); } -$res = db_query ("SELECT ".implode(",",array_keys($fm_struct))." FROM fetchmail order by id desc"); +$res = db_query ("SELECT ".implode(",",escape_string(array_keys($fm_struct)))." FROM fetchmail order by id desc"); if ($res['rows'] > 0){ while ($row = db_array ($res['result'])){ $tFmail[] = $row; @@ -159,7 +166,7 @@ } function _inp_bool($val){ - return $val?1:0; + return $val?db_get_boolean(true):db_get_boolean(false); } function _inp_password($val){ Modified: trunk/templates/fetchmail.tpl =================================================================== --- trunk/templates/fetchmail.tpl 2007-10-22 23:49:10 UTC (rev 159) +++ trunk/templates/fetchmail.tpl 2007-10-23 00:01:31 UTC (rev 160) @@ -1,6 +1,3 @@ -<div id="overview"> -<form name="overview" method="post"> - <?php # fields to display in table view @@ -40,7 +37,21 @@ } } - print "<table id=\"log_table\" border=0>\n"; +if ($edit) { # edit mode + echo '<div id="edit_form">'; + echo '<form name="fetchmail" method="post">'; + if (sizeof ($tFmail) > 0){ + foreach($tFmail as $row) { + if ($edit && $edit==$row["id"]) { + print fetchmail_edit_row($row); + } + } + } +} else { # display mode + + print '<div id="overview">'; + print '<form name="overview" method="post">'; + print "<table id=\"log_table\" border=0>\n"; print " <tr>\n"; print " <td colspan=\"".(sizeof($headers)-1)."\"><h3>".$PALANG['pFetchmail_welcome'].$user_domains."</h3></td>\n"; print " <td align=right><a href='?new=1'>>> ".$PALANG['pFetchmail_new_entry']."</a></td>\n"; @@ -50,14 +61,15 @@ list($editible,$view,$type,$title,$comment)=$row; print " <td>" . $title . "</td>\n"; } + print "<td> </td>"; print " </tr>\n"; if (sizeof ($tFmail) > 0){ foreach($tFmail as $row){ - if ($edit && $edit==$row["id"]){ - print "<tr><td colspan=".sizeof($headers).">".fetchmail_edit_row($row)."</td></tr>\n"; - } - else{ +# if ($edit && $edit==$row["id"]){ +# print "<tr><td colspan=".sizeof($headers).">".fetchmail_edit_row($row)."</td></tr>\n"; +# } +# else{ print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n"; foreach($display_fields as $key){ @@ -69,16 +81,19 @@ } } + print "<td><a href=\"fetchmail.php?edit=" . $row['id'] . "\">" . $PALANG['edit'] . "</a></td>"; print " </tr>\n"; - } +# } } } +} # end display mode function fetchmail_edit_row($data=array()){ - global $fm_struct,$fm_defaults; + global $fm_struct,$fm_defaults,$PALANG; $id=$data["id"]; $_id=$data["id"]*100+1; - $ret="<table cellspacing=1 cellpadding=0 border=0 width=100%>"; + $ret="<table>"; + $ret .= '<tr><td colspan="3"><h3>' . $PALANG['pMenu_fetchmail'] . '</h3></td></tr>'; foreach($fm_struct as $key=>$struct){ list($editible,$view,$type,$title,$comment)=$struct; if ($editible){ @@ -93,7 +108,8 @@ ?$fm_defaults[$key] :'' ); - $ret.=$func($_id++,$key,$fm_defaults[$key],$val); + $fm_defaults_key = ""; if (isset($fm_defaults[$key])) $fm_defaults_key = $fm_defaults[$key]; + $ret.=$func($_id++,$key,$fm_defaults_key,$val); $ret.="</td><td align=left valign=top><i> ${comment}</i></td></tr>\n"; } elseif($view){ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-10-25 22:59:50
|
Revision: 163 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=163&view=rev Author: christian_boltz Date: 2007-10-25 15:59:52 -0700 (Thu, 25 Oct 2007) Log Message: ----------- The work of two nights causes a long changelog. Here we go: fetchmail.php: - IMPORTANT: fixed typo in database column name. If you have created the fetchmail database already, you have to rename the "pool_time" column to "poll_time" - fixed adding of new entries - don't display status fields (last poll date and result) in edit mode - validate and quote the GET and POST variables - show POSTed data again if invalid values were entered (data to display in the edit form is passed to fetchmail.tpl in $formvars) - check results of database operations and display error/success messages - check owner of target mailbox on all operations - changed password handling: empty means no change (instead of sending "******" around) - reworked and moved around large code portions - added some TODO notes fetchmail.tpl: - use data from $formvars in edit mode instead of parsing the full array - moved "new entry" below the table - replaced delete button with delete links - Note: the boolean fields need testing with PgSQL. Especially test if they are displayed as active correctly in list and edit mode! *.lang: - added several fetchmail-related strings, more to follow - added $PALANG['please_keep_this_as_last_entry'] which always has to be the last entry in the language files. This solves the problem that language-check.sh mixes up the string order when adding strings at the end of the language files. - added vim:ft=php Modified Paths: -------------- trunk/fetchmail.php trunk/languages/bg.lang trunk/languages/ca.lang trunk/languages/cn.lang trunk/languages/cs.lang trunk/languages/da.lang trunk/languages/de.lang trunk/languages/en.lang trunk/languages/es.lang trunk/languages/et.lang trunk/languages/eu.lang trunk/languages/fi.lang trunk/languages/fo.lang trunk/languages/fr.lang trunk/languages/hr.lang trunk/languages/hu.lang trunk/languages/is.lang trunk/languages/it.lang trunk/languages/lt.lang trunk/languages/mk.lang trunk/languages/nl.lang trunk/languages/nn.lang trunk/languages/pl.lang trunk/languages/pt-br.lang trunk/languages/ru.lang trunk/languages/sk.lang trunk/languages/sl.lang trunk/languages/sv.lang trunk/languages/tr.lang trunk/languages/tw.lang trunk/templates/fetchmail.tpl Modified: trunk/fetchmail.php =================================================================== --- trunk/fetchmail.php 2007-10-25 12:29:38 UTC (rev 162) +++ trunk/fetchmail.php 2007-10-25 22:59:52 UTC (rev 163) @@ -20,11 +20,17 @@ * * Template Variables: * - * TODO - * * Form POST \ GET Variables: * - * TODO + * GET: + * - edit + * - delete + * - new + * + * POST: + * - save + * - cancel + * - all editable form values, see $fm_struct */ /* new sql table: fetchmail @@ -37,7 +43,7 @@ src_user varchar(255) not null default '', src_password varchar(255) not null default '', src_folder varchar(255) not null default '', - pool_time int(11) unsigned not null default 10, + poll_time int(11) unsigned not null default 10, fetchall tinyint(1) unsigned not null default 0, keep tinyint(1) unsigned not null default 0, protocol enum('POP3','IMAP','POP2','ETRN','AUTO'), @@ -57,6 +63,16 @@ $extra_options = 0; if ($CONF['fetchmail_extra_options'] == 'YES') $extra_options = 1; +# import control GET/POST variables. Form values are imported below. +$new = (int) safeget ("new") == 1 ? 1:0; +$edit = (int) safeget ("edit"); +$delete = (int) safeget ("delete"); +$save = safepost("save") != "" ? 1:0; +$cancel = safepost("cancel") != "" ? 1:0; + +$display_status = 1; +if ($new || $edit) $display_status = 0; + $fm_struct=array( // list($editible,$view,$type,$title,$comment) # first column: allow editing? # second column: display field? @@ -67,14 +83,14 @@ "src_user" =>array(1,1,'text', 'User','Remote User'), "src_password" =>array(1,0,'password', 'Password','Remote Password'), "src_folder" =>array(1,1,'text', 'Folder','Remote Folder'), - "pool_time" =>array(1,1,'num', 'Poll','Poll Time (min)'), + "poll_time" =>array(1,1,'num', 'Poll','Poll Time (min)'), "fetchall" =>array(1,1,'bool', 'Fetch All','Retrieve both old (seen) and new messages'), "keep" =>array(1,1,'bool', 'Keep','Keep retrieved messages on the remote mailserver'), "protocol" =>array(1,1,'enum', 'Protocol','Protocol to use'), "extra_options" =>array($extra_options,$extra_options,'longtext', 'Extra Options','Extra fetchmail Options'), "mda" =>array($extra_options,$extra_options,'longtext', 'MDA','Mail Delivery Agent'), - "date" =>array(0,1,'text', 'Date','Date of last pooling/configuration change'), - "returned_text" =>array(0,1,'longtext', 'Returned Text','Text message from last pooling'), + "date" => array(0,$display_status,'text', 'Date','Date of last polling/configuration change'), + "returned_text" => array(0,$display_status,'longtext', 'Returned Text','Text message from last polling'), ); $SESSID_USERNAME = authentication_get_username(); @@ -84,7 +100,7 @@ $fm_defaults=array( "id" =>0, "mailbox" => array($SESSID_USERNAME), - "pool_time" =>10, + "poll_time" => 10, "src_auth" => array('password','kerberos_v5','kerberos','kerberos_v4','gssapi','cram-md5','otp','ntlm','msn','ssh','any'), "protocol" => @@ -93,9 +109,9 @@ $list_domains = list_domains_for_admin ($SESSID_USERNAME); -$user_domains=implode("','",array_values($list_domains)); # for displaying +$user_domains=implode(", ",array_values($list_domains)); # for displaying $user_domains_sql=implode("','",escape_string(array_values($list_domains))); # for SQL -$sql="SELECT username FROM mailbox WHERE domain in ('".$user_domains_sql."')"; +$sql="SELECT username FROM mailbox WHERE domain in ('".$user_domains_sql."')"; # TODO: replace with domain selection dropdown $res = db_query ($sql); if ($res['rows'] > 0){ @@ -109,56 +125,112 @@ $fm_defaults["mailbox"][]=$SESSID_USERNAME; # TODO: Does this really make sense? Or should we display a message "please create a mailbox first!"? } -$new = (int) safeget ("new"); -$edit = (int) safeget ("edit"); -$delete = safepost("delete"); -$save = safepost("save"); -$cancel = safepost("cancel"); +$row_id = 0; +if ($delete) { + $row_id = $delete; +} elseif ($edit) { + $row_id = $edit; +} -if ($cancel){ +if ($row_id) { + $result = db_query ("SELECT ".implode(",",escape_string(array_keys($fm_struct)))." FROM fetchmail WHERE id=" . $row_id); + if ($result['rows'] > 0) { + $edit_row = db_array ($result['result']); + $account = $edit_row['src_user'] . " @ " . $edit_row['src_server']; + } + + $edit_row_domain = explode('@', $edit_row['mailbox']); + if ($result['rows'] <= 0 || !check_owner($SESSID_USERNAME, $edit_row_domain[1])) { # owner check for $edit and $delete + flash_error(sprintf($PALANG['pFetchmail_error_invalid_id'], $row_id)); + $edit = 0; $delete = 0; + } +} + + +if ($cancel) { $edit=0; -} -elseif($edit && $save){ - $_vals=array(); +} elseif ($delete) { + $result = db_query ("delete from fetchmail WHERE id=".$delete); + if ($result['rows'] != 1) + { + flash_error($PALANG['pDelete_delete_error']) . '</span'; + } else { + flash_info(sprintf($PALANG['pDelete_delete_success'],$account)); + } + $delete=0; +} elseif ( ($edit || $new) && $save) { + $formvars=array(); foreach($fm_struct as $key=>$row){ list($editible,$view,$type,$title,$comment)=$row; if ($editible != 0){ $func="_inp_".$type; $val=safepost($key); - if ($type!="password" || substr($val,0,1)!="*"){ - $_vals[]=$key."='".escape_string( - function_exists($func) - ?$func($val) - :$val)."'"; - } + if ($type!="password" || strlen($val) > 0) { # skip on empty (aka unchanged) password + $formvars[$key]= escape_string( function_exists($func) ?$func($val) :$val); + } } } - $sql="UPDATE fetchmail SET ".implode(",",$_vals).",returned_text='' WHERE id=".$edit; - $res= db_query ($sql); + $formvars['id'] = $edit; # results in 0 on $new + + if (!in_array($formvars['mailbox'], $fm_defaults['mailbox'])) { + flash_error($PALANG['pFetchmail_invalid_mailbox']); + $save = 0; + } + if ($formvars['src_server'] == '') { + flash_error($PALANG['pFetchmail_server_missing']); + # TODO: validate domain name + $save = 0; + } + if (empty($formvars['src_user']) ) { + flash_error($PALANG['pFetchmail_user_missing']); + $save = 0; + } + if ($new && empty($formvars['src_password']) ) { + flash_error($PALANG['pFetchmail_password_missing']); + $save = 0; + } + + if ($save) { + if ($new) { + $sql="INSERT fetchmail (".implode(",",escape_string(array_keys($formvars))).") VALUES ('".implode("','",escape_string($formvars))."')"; + } else { # $edit + foreach(array_keys($formvars) as $key) { + $formvars[$key] = escape_string($key) . "='" . escape_string($formvars[$key]) . "'"; + } + $sql="UPDATE fetchmail SET ".implode(",",$formvars).",returned_text='', date=NOW() WHERE id=".$edit; + } + $result = db_query ($sql); + if ($result['rows'] != 1) + { + flash_error($PALANG['pFetchmail_database_save_error']); + } else { + flash_info($PALANG['pFetchmail_database_save_success']); + $edit = 0; $new = 0; # display list after saving + } + } else { + $formvars['src_password'] = ''; # never display password + } + +} elseif ($edit) { + $formvars = $edit_row; + $formvars['src_password'] = ''; +} elseif ($new) { + foreach (array_keys($fm_struct) as $value) { + if (isset($fm_defaults[$value])) { + $formvars[$value] = $fm_defaults[$value]; + } else { + $formvars[$value] = ''; + } + } } -elseif($delete){ - db_query ("delete from fetchmail WHERE id=".$edit); - $edit=0; -} -elseif ($new){ - $_keys=array(); - $_vals=array(); - foreach($fm_defaults as $key=>$val){ - $_keys[]=$key; - $_vals[]="'".(is_array($val)?$val[0]:$val)."'"; - } - $sql="INSERT fetchmail (".implode(",",escape_string($_keys)).") VALUES (".implode(",",escape_string($_vals)).")"; - $res= db_query ($sql); - $sql="SELECT id FROM fetchmail order by id desc limit 1"; - $res= db_query ($sql); - list($edit)=mysql_fetch_row($res['result']); -} -$res = db_query ("SELECT ".implode(",",escape_string(array_keys($fm_struct)))." FROM fetchmail order by id desc"); -if ($res['rows'] > 0){ - while ($row = db_array ($res['result'])){ - $tFmail[] = $row; - } +if ($edit + $new == 0) { # display list + $res = db_query ("SELECT ".implode(",",escape_string(array_keys($fm_struct)))." FROM fetchmail order by id desc"); + if ($res['rows'] > 0) { + while ($row = db_array ($res['result'])) { + $tFmail[] = $row; + } + } } function _inp_num($val){ @@ -178,4 +250,5 @@ include ("./templates/fetchmail.tpl"); include ("./templates/footer.tpl"); +/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ ?> Modified: trunk/languages/bg.lang =================================================================== --- trunk/languages/bg.lang 2007-10-25 12:29:38 UTC (rev 162) +++ trunk/languages/bg.lang 2007-10-25 22:59:52 UTC (rev 163) @@ -73,6 +73,7 @@ $PALANG['pOverview_get_modified'] = 'Ïîñëåäíî ìîäèôèöèðàí'; $PALANG['pDelete_delete_error'] = '<span class="error_msg">Íå ìîãà äà èçòðèÿ çàïèñà '; +$PALANG['pDelete_delete_success'] = '%s deleted.'; # XXX $PALANG['pDelete_postdelete_error'] = '<span class="error_msg">Unable to remove mailbox '; # XXX $PALANG['pDelete_domain_error'] = '<span class="error_msg">Òîçè äîìåéí íå å âàø! '; $PALANG['pDelete_alias_error'] = '<span class="error_msg">Unable to delete alias '; # XXX @@ -319,6 +320,13 @@ $PALANG['pUsersVacation_result_success'] = 'Âàøèÿò àâòîìàòè÷åí îòãîâîð áåøå ïðåìàõíàò!'; $PALANG['pCreate_dbLog_createmailbox'] = 'create mailbox'; +$PALANG['pFetchmail_database_save_error'] = 'Could not save this entry in the database!'; # XXX +$PALANG['pFetchmail_database_save_success'] = 'Entry saved in database.'; # XXX +$PALANG['pFetchmail_error_invalid_id'] = 'No entry with ID %s found!'; # XXX +$PALANG['pFetchmail_invalid_mailbox'] = 'Invalid mailbox!'; # XXX +$PALANG['pFetchmail_server_missing'] = 'Please enter the remote server name!'; # XXX +$PALANG['pFetchmail_user_missing'] = 'Please enter the remote username!'; # XXX +$PALANG['pFetchmail_password_missing'] = 'Please enter the remote password!'; # XXX $PALANG['pCreate_dbLog_createalias'] = 'create alias'; $PALANG['pDelete_dbLog_deletealias'] = 'delete alias'; $PALANG['pDelete_dbLog_deletemailbox'] = 'delete mailbox'; @@ -346,5 +354,6 @@ $PALANG['pFetchmail_welcome'] = 'Fetch mail for:'; # XXX $PALANG['pFetchmail_new_entry'] = 'New entry'; # XXX -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ +$PALANG['please_keep_this_as_last_entry'] = ''; # needed for language-check.sh +/* vim: set expandtab ft=php softtabstop=3 tabstop=3 shiftwidth=3: */ ?> Modified: trunk/languages/ca.lang =================================================================== --- trunk/languages/ca.lang 2007-10-25 12:29:38 UTC (rev 162) +++ trunk/languages/ca.lang 2007-10-25 22:59:52 UTC (rev 163) @@ -72,6 +72,7 @@ $PALANG['pOverview_get_modified'] = 'Última Modificació'; $PALANG['pDelete_delete_error'] = '<span class="error_msg">Imposible borrar el registre '; +$PALANG['pDelete_delete_success'] = '%s deleted.'; # XXX $PALANG['pDelete_postdelete_error'] = '<span class="error_msg">Unable to remove mailbox '; # XXX $PALANG['pDelete_domain_error'] = '<span class="error_msg">Aquest domini no et pertany '; $PALANG['pDelete_alias_error'] = '<span class="error_msg">Unable to delete alias '; # XXX @@ -318,6 +319,13 @@ $PALANG['pUsersVacation_result_error'] = '<span class="error_msg">Imposible actualitzar la configuració de la seva resposta automàtica!</span>'; $PALANG['pUsersVacation_result_success'] = 'La seva resposta automàtica ha estat esborrada!'; +$PALANG['pFetchmail_database_save_error'] = 'Could not save this entry in the database!'; # XXX +$PALANG['pFetchmail_database_save_success'] = 'Entry saved in database.'; # XXX +$PALANG['pFetchmail_error_invalid_id'] = 'No entry with ID %s found!'; # XXX +$PALANG['pFetchmail_invalid_mailbox'] = 'Invalid mailbox!'; # XXX +$PALANG['pFetchmail_server_missing'] = 'Please enter the remote server name!'; # XXX +$PALANG['pFetchmail_user_missing'] = 'Please enter the remote username!'; # XXX +$PALANG['pFetchmail_password_missing'] = 'Please enter the remote password!'; # XXX $PALANG['pCreate_dbLog_createmailbox'] = 'create mailbox'; $PALANG['pCreate_dbLog_createalias'] = 'create alias'; $PALANG['pDelete_dbLog_deletealias'] = 'delete alias'; @@ -346,5 +354,6 @@ $PALANG['pFetchmail_welcome'] = 'Fetch mail for:'; # XXX $PALANG['pFetchmail_new_entry'] = 'New entry'; # XXX -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ +$PALANG['please_keep_this_as_last_entry'] = ''; # needed for language-check.sh +/* vim: set expandtab ft=php softtabstop=3 tabstop=3 shiftwidth=3: */ ?> Modified: trunk/languages/cn.lang =================================================================== --- trunk/languages/cn.lang 2007-10-25 12:29:38 UTC (rev 162) +++ trunk/languages/cn.lang 2007-10-25 22:59:52 UTC (rev 163) @@ -73,6 +73,7 @@ $PALANG['pOverview_get_modified'] = '最后修改日期'; $PALANG['pDelete_delete_error'] = '<span class="error_msg">不能删除本记录'; +$PALANG['pDelete_delete_success'] = '%s deleted.'; # XXX $PALANG['pDelete_postdelete_error'] = '<span class="error_msg">Unable to remove mailbox '; # XXX $PALANG['pDelete_domain_error'] = '<span class="error_msg">你没有该域的管理权限'; $PALANG['pDelete_alias_error'] = '<span class="error_msg">Unable to delete alias '; # XXX @@ -319,6 +320,13 @@ $PALANG['pUsersVacation_result_success'] = '你的自动回复已经关闭!'; $PALANG['pCreate_dbLog_createmailbox'] = '新建邮箱'; +$PALANG['pFetchmail_database_save_error'] = 'Could not save this entry in the database!'; # XXX +$PALANG['pFetchmail_database_save_success'] = 'Entry saved in database.'; # XXX +$PALANG['pFetchmail_error_invalid_id'] = 'No entry with ID %s found!'; # XXX +$PALANG['pFetchmail_invalid_mailbox'] = 'Invalid mailbox!'; # XXX +$PALANG['pFetchmail_server_missing'] = 'Please enter the remote server name!'; # XXX +$PALANG['pFetchmail_user_missing'] = 'Please enter the remote username!'; # XXX +$PALANG['pFetchmail_password_missing'] = 'Please enter the remote password!'; # XXX $PALANG['pCreate_dbLog_createalias'] = '新建别名'; $PALANG['pDelete_dbLog_deletealias'] = '删除别名'; $PALANG['pDelete_dbLog_deletemailbox'] = '邮件邮箱'; @@ -346,5 +354,6 @@ $PALANG['pFetchmail_welcome'] = 'Fetch mail for:'; # XXX $PALANG['pFetchmail_new_entry'] = 'New entry'; # XXX -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ +$PALANG['please_keep_this_as_last_entry'] = ''; # needed for language-check.sh +/* vim: set expandtab ft=php softtabstop=3 tabstop=3 shiftwidth=3: */ ?> Modified: trunk/languages/cs.lang =================================================================== --- trunk/languages/cs.lang 2007-10-25 12:29:38 UTC (rev 162) +++ trunk/languages/cs.lang 2007-10-25 22:59:52 UTC (rev 163) @@ -76,6 +76,7 @@ $PALANG['pOverview_get_modified'] = 'Naposledy změněno'; $PALANG['pDelete_delete_error'] = '<span class="error_msg">Nelze smazat položku '; +$PALANG['pDelete_delete_success'] = '%s deleted.'; # XXX $PALANG['pDelete_postdelete_error'] = '<span class="error_msg">Nelze odstranit schránku '; $PALANG['pDelete_domain_error'] = '<span class="error_msg">Tato doména není vaše '; $PALANG['pDelete_alias_error'] = '<span class="error_msg">Nelze odstranit přesměrování '; @@ -322,6 +323,13 @@ EOM; $PALANG['pUsersVacation_button_away'] = 'Odjet pryč'; $PALANG['pUsersVacation_button_back'] = 'Vrátit se'; +$PALANG['pFetchmail_database_save_error'] = 'Could not save this entry in the database!'; # XXX +$PALANG['pFetchmail_database_save_success'] = 'Entry saved in database.'; # XXX +$PALANG['pFetchmail_error_invalid_id'] = 'No entry with ID %s found!'; # XXX +$PALANG['pFetchmail_invalid_mailbox'] = 'Invalid mailbox!'; # XXX +$PALANG['pFetchmail_server_missing'] = 'Please enter the remote server name!'; # XXX +$PALANG['pFetchmail_user_missing'] = 'Please enter the remote username!'; # XXX +$PALANG['pFetchmail_password_missing'] = 'Please enter the remote password!'; # XXX $PALANG['pUsersVacation_result_error'] = '<span class="error_msg">Nepodařilo se upravit nastavení!</span>'; $PALANG['pUsersVacation_result_success'] = 'Nastavení bylo upraveno!'; @@ -356,5 +364,6 @@ $PALANG['pFetchmail_welcome'] = 'Fetch mail for:'; # XXX $PALANG['pFetchmail_new_entry'] = 'New entry'; # XXX -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ +$PALANG['please_keep_this_as_last_entry'] = ''; # needed for language-check.sh +/* vim: set expandtab ft=php softtabstop=3 tabstop=3 shiftwidth=3: */ ?> Modified: trunk/languages/da.lang =================================================================== --- trunk/languages/da.lang 2007-10-25 12:29:38 UTC (rev 162) +++ trunk/languages/da.lang 2007-10-25 22:59:52 UTC (rev 163) @@ -73,6 +73,7 @@ $PALANG['pOverview_get_modified'] = 'Senest rettet'; $PALANG['pDelete_delete_error'] = '<span class="error_msg">Kan ikke slette denne post '; +$PALANG['pDelete_delete_success'] = '%s deleted.'; # XXX $PALANG['pDelete_postdelete_error'] = '<span class="error_msg">Kunne ikke fjerne postkassen '; $PALANG['pDelete_domain_error'] = '<span class="error_msg">Dette domæne er ikke dit '; $PALANG['pDelete_alias_error'] = '<span class="error_msg">Unable to delete alias '; # XXX @@ -319,6 +320,13 @@ $PALANG['pUsersVacation_result_error'] = '<span class="error_msg">Kan ikke opdatere dine autosvar indstillinger!</span>'; $PALANG['pUsersVacation_result_success'] = 'Dit autosvar er fjernet!'; +$PALANG['pFetchmail_database_save_error'] = 'Could not save this entry in the database!'; # XXX +$PALANG['pFetchmail_database_save_success'] = 'Entry saved in database.'; # XXX +$PALANG['pFetchmail_error_invalid_id'] = 'No entry with ID %s found!'; # XXX +$PALANG['pFetchmail_invalid_mailbox'] = 'Invalid mailbox!'; # XXX +$PALANG['pFetchmail_server_missing'] = 'Please enter the remote server name!'; # XXX +$PALANG['pFetchmail_user_missing'] = 'Please enter the remote username!'; # XXX +$PALANG['pFetchmail_password_missing'] = 'Please enter the remote password!'; # XXX $PALANG['pCreate_dbLog_createmailbox'] = 'create mailbox'; $PALANG['pCreate_dbLog_createalias'] = 'create alias'; $PALANG['pDelete_dbLog_deletealias'] = 'delete alias'; @@ -347,5 +355,6 @@ $PALANG['pFetchmail_welcome'] = 'Fetch mail for:'; # XXX $PALANG['pFetchmail_new_entry'] = 'New entry'; # XXX -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ +$PALANG['please_keep_this_as_last_entry'] = ''; # needed for language-check.sh +/* vim: set expandtab ft=php softtabstop=3 tabstop=3 shiftwidth=3: */ ?> Modified: trunk/languages/de.lang =================================================================== --- trunk/languages/de.lang 2007-10-25 12:29:38 UTC (rev 162) +++ trunk/languages/de.lang 2007-10-25 22:59:52 UTC (rev 163) @@ -74,6 +74,7 @@ $PALANG['pOverview_get_modified'] = 'Zuletzt verändert'; $PALANG['pDelete_delete_error'] = '<span class="error_msg">Eintrag konnte nicht gelöscht werden '; +$PALANG['pDelete_delete_success'] = '%s gelöscht.'; $PALANG['pDelete_postdelete_error'] = '<span class="error_msg">Mailbox konnte nicht gelöscht werden '; $PALANG['pDelete_domain_error'] = '<span class="error_msg">Diese Domain gehört nicht Ihnen '; $PALANG['pDelete_alias_error'] = '<span class="error_msg">Alias konnte nicht gelöscht werden '; @@ -355,8 +356,15 @@ $PALANG['pPasswordTooShort'] = "Das Passwort ist zu kurz - mindestens %s Zeichen benötigt"; $PALANG['pFetchmail_welcome'] = 'E-Mail Abruf für: '; - $PALANG['pFetchmail_new_entry'] = 'Neuer Eintrag'; +$PALANG['pFetchmail_database_save_error'] = 'Eintrag konnte nicht in der Datenbank gespeichert werden!'; +$PALANG['pFetchmail_database_save_success'] = 'Eintrag wurde in der Datenbank gespeichert'; +$PALANG['pFetchmail_error_invalid_id'] = 'Kein Eintrag mit ID %s gefunden!'; +$PALANG['pFetchmail_invalid_mailbox'] = 'Ungültiges Postfach!'; +$PALANG['pFetchmail_server_missing'] = 'Bitte geben Sie den Namen des Servers ein!'; +$PALANG['pFetchmail_user_missing'] = 'Bitte geben Sie den Benutzernamen ein!'; +$PALANG['pFetchmail_password_missing'] = 'Bitte geben Sie das Passwort ein!'; -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ +$PALANG['please_keep_this_as_last_entry'] = ''; # needed for language-check.sh +/* vim: set expandtab ft=php softtabstop=3 tabstop=3 shiftwidth=3: */ ?> Modified: trunk/languages/en.lang =================================================================== --- trunk/languages/en.lang 2007-10-25 12:29:38 UTC (rev 162) +++ trunk/languages/en.lang 2007-10-25 22:59:52 UTC (rev 163) @@ -76,6 +76,7 @@ $PALANG['pOverview_get_modified'] = 'Last Modified'; $PALANG['pDelete_delete_error'] = '<span class="error_msg">Unable to delete the entry '; +$PALANG['pDelete_delete_success'] = '%s deleted.'; $PALANG['pDelete_postdelete_error'] = '<span class="error_msg">Unable to remove mailbox '; $PALANG['pDelete_domain_error'] = '<span class="error_msg">This domain is not yours '; $PALANG['pDelete_alias_error'] = '<span class="error_msg">Unable to delete alias '; @@ -357,7 +358,14 @@ $PALANG['pFetchmail_welcome'] = 'Fetch mail for:'; $PALANG['pFetchmail_new_entry'] = 'New entry'; +$PALANG['pFetchmail_database_save_error'] = 'Could not save this entry in the database!'; +$PALANG['pFetchmail_database_save_success'] = 'Entry saved in database.'; +$PALANG['pFetchmail_error_invalid_id'] = 'No entry with ID %s found!'; +$PALANG['pFetchmail_invalid_mailbox'] = 'Invalid mailbox!'; +$PALANG['pFetchmail_server_missing'] = 'Please enter the remote server name!'; +$PALANG['pFetchmail_user_missing'] = 'Please enter the remote username!'; +$PALANG['pFetchmail_password_missing'] = 'Please enter the remote password!'; - -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ +$PALANG['please_keep_this_as_last_entry'] = ''; # needed for language-check.sh +/* vim: set expandtab ft=php softtabstop=3 tabstop=3 shiftwidth=3: */ ?> Modified: trunk/languages/es.lang =================================================================== --- trunk/languages/es.lang 2007-10-25 12:29:38 UTC (rev 162) +++ trunk/languages/es.lang 2007-10-25 22:59:52 UTC (rev 163) @@ -72,6 +72,7 @@ $PALANG['pOverview_get_modified'] = 'Última Modificación'; $PALANG['pDelete_delete_error'] = '<span class="error_msg">Imposible borrar el registro '; +$PALANG['pDelete_delete_success'] = '%s deleted.'; # XXX $PALANG['pDelete_postdelete_error'] = '<span class="error_msg">Unable to remove mailbox '; # XXX $PALANG['pDelete_domain_error'] = '<span class="error_msg">Este dominio no le pertenece '; $PALANG['pDelete_alias_error'] = '<span class="error_msg">Unable to delete alias '; # XXX @@ -318,6 +319,13 @@ $PALANG['pUsersVacation_button_back'] = 'De vuelta'; $PALANG['pUsersVacation_result_error'] = '<span class="error_msg">¡Imposible actualizar la configuración de su respuesta automática!</span>'; $PALANG['pUsersVacation_result_success'] = '¡Su respuesta automática ha sido borrada!'; +$PALANG['pFetchmail_database_save_error'] = 'Could not save this entry in the database!'; # XXX +$PALANG['pFetchmail_database_save_success'] = 'Entry saved in database.'; # XXX +$PALANG['pFetchmail_error_invalid_id'] = 'No entry with ID %s found!'; # XXX +$PALANG['pFetchmail_invalid_mailbox'] = 'Invalid mailbox!'; # XXX +$PALANG['pFetchmail_server_missing'] = 'Please enter the remote server name!'; # XXX +$PALANG['pFetchmail_user_missing'] = 'Please enter the remote username!'; # XXX +$PALANG['pFetchmail_password_missing'] = 'Please enter the remote password!'; # XXX $PALANG['pCreate_dbLog_createmailbox'] = 'create mailbox'; $PALANG['pCreate_dbLog_createalias'] = 'create alias'; @@ -347,5 +355,6 @@ $PALANG['pFetchmail_welcome'] = 'Fetch mail for:'; # XXX $PALANG['pFetchmail_new_entry'] = 'New entry'; # XXX -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ +$PALANG['please_keep_this_as_last_entry'] = ''; # needed for language-check.sh +/* vim: set expandtab ft=php softtabstop=3 tabstop=3 shiftwidth=3: */ ?> Modified: trunk/languages/et.lang =================================================================== --- trunk/languages/et.lang 2007-10-25 12:29:38 UTC (rev 162) +++ trunk/languages/et.lang 2007-10-25 22:59:52 UTC (rev 163) @@ -73,6 +73,7 @@ $PALANG['pOverview_get_modified'] = 'Viimati muudetud'; $PALANG['pDelete_delete_error'] = '<span class="error_msg">Kustutamine ebaõnnestus. Kirje: '; +$PALANG['pDelete_delete_success'] = '%s deleted.'; # XXX $PALANG['pDelete_postdelete_error'] = '<span class="error_msg">Unable to remove mailbox '; # XXX $PALANG['pDelete_domain_error'] = '<span class="error_msg">Puuduvad õigused. Domeen: '; $PALANG['pDelete_alias_error'] = '<span class="error_msg">Unable to delete alias '; # XXX @@ -319,6 +320,13 @@ $PALANG['pUsersVacation_button_away'] = 'Olen eemal alates'; $PALANG['pUsersVacation_button_back'] = 'Tulen tagasi'; $PALANG['pUsersVacation_result_error'] = '<span class="error_msg">Automaatse vastuse uuendamine ebaõnnestus!</span>'; +$PALANG['pFetchmail_database_save_error'] = 'Could not save this entry in the database!'; # XXX +$PALANG['pFetchmail_database_save_success'] = 'Entry saved in database.'; # XXX +$PALANG['pFetchmail_error_invalid_id'] = 'No entry with ID %s found!'; # XXX +$PALANG['pFetchmail_invalid_mailbox'] = 'Invalid mailbox!'; # XXX +$PALANG['pFetchmail_server_missing'] = 'Please enter the remote server name!'; # XXX +$PALANG['pFetchmail_user_missing'] = 'Please enter the remote username!'; # XXX +$PALANG['pFetchmail_password_missing'] = 'Please enter the remote password!'; # XXX $PALANG['pUsersVacation_result_success'] = 'Automaatne vastus on eemaldatud!'; $PALANG['pCreate_dbLog_createmailbox'] = 'postkasti loomine'; @@ -350,5 +358,6 @@ $PALANG['pFetchmail_welcome'] = 'Fetch mail for:'; # XXX $PALANG['pFetchmail_new_entry'] = 'New entry'; # XXX -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ +$PALANG['please_keep_this_as_last_entry'] = ''; # needed for language-check.sh +/* vim: set expandtab ft=php softtabstop=3 tabstop=3 shiftwidth=3: */ ?> Modified: trunk/languages/eu.lang =================================================================== --- trunk/languages/eu.lang 2007-10-25 12:29:38 UTC (rev 162) +++ trunk/languages/eu.lang 2007-10-25 22:59:52 UTC (rev 163) @@ -72,6 +72,7 @@ $PALANG['pOverview_get_modified'] = 'Azken aldaketa'; $PALANG['pDelete_delete_error'] = '<span class="error_msg">Ezinezkoa sarrera ezabatzea '; +$PALANG['pDelete_delete_success'] = '%s deleted.'; # XXX $PALANG['pDelete_postdelete_error'] = '<span class="error_msg">Unable to remove mailbox '; # XXX $PALANG['pDelete_domain_error'] = '<span class="error_msg">Ez zara domeinu honen jabe'; $PALANG['pDelete_alias_error'] = '<span class="error_msg">Unable to delete alias '; # XXX @@ -318,6 +319,13 @@ $PALANG['pUsersVacation_result_success'] = 'Zure erantzun automatikoa borratu da!'; $PALANG['pCreate_dbLog_createmailbox'] = 'create mailbox'; +$PALANG['pFetchmail_database_save_error'] = 'Could not save this entry in the database!'; # XXX +$PALANG['pFetchmail_database_save_success'] = 'Entry saved in database.'; # XXX +$PALANG['pFetchmail_error_invalid_id'] = 'No entry with ID %s found!'; # XXX +$PALANG['pFetchmail_invalid_mailbox'] = 'Invalid mailbox!'; # XXX +$PALANG['pFetchmail_server_missing'] = 'Please enter the remote server name!'; # XXX +$PALANG['pFetchmail_user_missing'] = 'Please enter the remote username!'; # XXX +$PALANG['pFetchmail_password_missing'] = 'Please enter the remote password!'; # XXX $PALANG['pCreate_dbLog_createalias'] = 'create alias'; $PALANG['pDelete_dbLog_deletealias'] = 'delete alias'; $PALANG['pDelete_dbLog_deletemailbox'] = 'delete mailbox'; @@ -345,5 +353,6 @@ $PALANG['pFetchmail_welcome'] = 'Fetch mail for:'; # XXX $PALANG['pFetchmail_new_entry'] = 'New entry'; # XXX -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ +$PALANG['please_keep_this_as_last_entry'] = ''; # needed for language-check.sh +/* vim: set expandtab ft=php softtabstop=3 tabstop=3 shiftwidth=3: */ ?> Modified: trunk/languages/fi.lang =================================================================== --- trunk/languages/fi.lang 2007-10-25 12:29:38 UTC (rev 162) +++ trunk/languages/fi.lang 2007-10-25 22:59:52 UTC (rev 163) @@ -73,6 +73,7 @@ $PALANG['pOverview_get_modified'] = 'Viimeksi muokattu'; $PALANG['pDelete_delete_error'] = '<span class="error_msg">Tietueen poisto ei onnistu '; +$PALANG['pDelete_delete_success'] = '%s deleted.'; # XXX $PALANG['pDelete_postdelete_error'] = '<span class="error_msg">Unable to remove mailbox '; # XXX $PALANG['pDelete_domain_error'] = '<span class="error_msg">Tämä ei ole sinun domainisi '; $PALANG['pDelete_alias_error'] = '<span class="error_msg">Unable to delete alias '; # XXX @@ -319,6 +320,13 @@ $PALANG['pCreate_dbLog_createmailbox'] = 'create mailbox'; $PALANG['pCreate_dbLog_createalias'] = 'create alias'; +$PALANG['pFetchmail_database_save_error'] = 'Could not save this entry in the database!'; # XXX +$PALANG['pFetchmail_database_save_success'] = 'Entry saved in database.'; # XXX +$PALANG['pFetchmail_error_invalid_id'] = 'No entry with ID %s found!'; # XXX +$PALANG['pFetchmail_invalid_mailbox'] = 'Invalid mailbox!'; # XXX +$PALANG['pFetchmail_server_missing'] = 'Please enter the remote server name!'; # XXX +$PALANG['pFetchmail_user_missing'] = 'Please enter the remote username!'; # XXX +$PALANG['pFetchmail_password_missing'] = 'Please enter the remote password!'; # XXX $PALANG['pDelete_dbLog_deletealias'] = 'delete alias'; $PALANG['pDelete_dbLog_deletemailbox'] = 'delete mailbox'; @@ -345,5 +353,6 @@ $PALANG['pFetchmail_welcome'] = 'Fetch mail for:'; # XXX $PALANG['pFetchmail_new_entry'] = 'New entry'; # XXX -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ +$PALANG['please_keep_this_as_last_entry'] = ''; # needed for language-check.sh +/* vim: set expandtab ft=php softtabstop=3 tabstop=3 shiftwidth=3: */ ?> Modified: trunk/languages/fo.lang =================================================================== --- trunk/languages/fo.lang 2007-10-25 12:29:38 UTC (rev 162) +++ trunk/languages/fo.lang 2007-10-25 22:59:52 UTC (rev 163) @@ -73,6 +73,7 @@ $PALANG['pOverview_get_modified'] = 'Síðst broytt'; $PALANG['pDelete_delete_error'] = '<span class="error_msg">Fái ikki strikað '; +$PALANG['pDelete_delete_success'] = '%s deleted.'; # XXX $PALANG['pDelete_postdelete_error'] = '<span class="error_msg">Unable to remove mailbox '; # XXX $PALANG['pDelete_domain_error'] = '<span class="error_msg">Hetta er ikki títt navnaøki '; $PALANG['pDelete_alias_error'] = '<span class="error_msg">Unable to delete alias '; # XXX @@ -319,6 +320,13 @@ Títt navn EOM; $PALANG['pUsersVacation_button_away'] = 'Burtur'; +$PALANG['pFetchmail_database_save_error'] = 'Could not save this entry in the database!'; # XXX +$PALANG['pFetchmail_database_save_success'] = 'Entry saved in database.'; # XXX +$PALANG['pFetchmail_error_invalid_id'] = 'No entry with ID %s found!'; # XXX +$PALANG['pFetchmail_invalid_mailbox'] = 'Invalid mailbox!'; # XXX +$PALANG['pFetchmail_server_missing'] = 'Please enter the remote server name!'; # XXX +$PALANG['pFetchmail_user_missing'] = 'Please enter the remote username!'; # XXX +$PALANG['pFetchmail_password_missing'] = 'Please enter the remote password!'; # XXX $PALANG['pUsersVacation_button_back'] = 'Heima'; $PALANG['pUsersVacation_result_error'] = '<span class="error_msg">Fái ikki broytt tínar frítíðarboð uppsetingar!</span>'; $PALANG['pUsersVacation_result_success'] = 'Títt frítíðarboð er strikað!'; @@ -351,5 +359,6 @@ $PALANG['pFetchmail_welcome'] = 'Fetch mail for:'; # XXX $PALANG['pFetchmail_new_entry'] = 'New entry'; # XXX -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ +$PALANG['please_keep_this_as_last_entry'] = ''; # needed for language-check.sh +/* vim: set expandtab ft=php softtabstop=3 tabstop=3 shiftwidth=3: */ ?> Modified: trunk/languages/fr.lang =================================================================== --- trunk/languages/fr.lang 2007-10-25 12:29:38 UTC (rev 162) +++ trunk/languages/fr.lang 2007-10-25 22:59:52 UTC (rev 163) @@ -75,6 +75,7 @@ $PALANG['pOverview_get_modified'] = 'Dernière Modification'; $PALANG['pDelete_delete_error'] = '<span class="error_msg">Impossible d\'effacer cette entrée '; +$PALANG['pDelete_delete_success'] = '%s deleted.'; # XXX $PALANG['pDelete_postdelete_error'] = '<span class="error_msg">Impossible d\'effacer ce compte courriel'; $PALANG['pDelete_domain_error'] = '<span class="error_msg">Ce domaine n\'est pas le votre '; $PALANG['pDelete_alias_error'] = '<span class="error_msg">Impossible d\'effacer cet alias '; @@ -321,6 +322,13 @@ $PALANG['pUsersVacation_result_success'] = 'Votre réponse automatique a été enlevée!'; $PALANG['pCreate_dbLog_createmailbox'] = 'Création de compte'; +$PALANG['pFetchmail_database_save_error'] = 'Could not save this entry in the database!'; # XXX +$PALANG['pFetchmail_database_save_success'] = 'Entry saved in database.'; # XXX +$PALANG['pFetchmail_error_invalid_id'] = 'No entry with ID %s found!'; # XXX +$PALANG['pFetchmail_invalid_mailbox'] = 'Invalid mailbox!'; # XXX +$PALANG['pFetchmail_server_missing'] = 'Please enter the remote server name!'; # XXX +$PALANG['pFetchmail_user_missing'] = 'Please enter the remote username!'; # XXX +$PALANG['pFetchmail_password_missing'] = 'Please enter the remote password!'; # XXX $PALANG['pCreate_dbLog_createalias'] = 'Création d\'alias'; $PALANG['pDelete_dbLog_deletealias'] = 'Suppression d\'alias'; $PALANG['pDelete_dbLog_deletemailbox'] = 'Suppression de compte'; @@ -348,5 +356,6 @@ $PALANG['pFetchmail_welcome'] = 'Récupérer le courrier pour :'; $PALANG['pFetchmail_new_entry'] = 'Nouvelle entrée'; -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ +$PALANG['please_keep_this_as_last_entry'] = ''; # needed for language-check.sh +/* vim: set expandtab ft=php softtabstop=3 tabstop=3 shiftwidth=3: */ ?> Modified: trunk/languages/hr.lang =================================================================== --- trunk/languages/hr.lang 2007-10-25 12:29:38 UTC (rev 162) +++ trunk/languages/hr.lang 2007-10-25 22:59:52 UTC (rev 163) @@ -72,6 +72,7 @@ $PALANG['pOverview_get_modified'] = 'Zadnja promjena'; $PALANG['pDelete_delete_error'] = '<span class="error_msg">Unos nije bilo moguče izbrisati '; +$PALANG['pDelete_delete_success'] = '%s deleted.'; # XXX $PALANG['pDelete_postdelete_error'] = '<span class="error_msg">Unable to remove mailbox '; # XXX $PALANG['pDelete_domain_error'] = '<span class="error_msg">Izabrana domena nije pod vaim nadzorom '; $PALANG['pDelete_alias_error'] = '<span class="error_msg">Unable to delete alias '; # XXX @@ -318,6 +319,13 @@ $PALANG['pUsersVacation_result_success'] = 'Obvijest o odsutnosti je uklonjena!'; $PALANG['pCreate_dbLog_createmailbox'] = 'stvori potanski ormarić'; +$PALANG['pFetchmail_database_save_error'] = 'Could not save this entry in the database!'; # XXX +$PALANG['pFetchmail_database_save_success'] = 'Entry saved in database.'; # XXX +$PALANG['pFetchmail_error_invalid_id'] = 'No entry with ID %s found!'; # XXX +$PALANG['pFetchmail_invalid_mailbox'] = 'Invalid mailbox!'; # XXX +$PALANG['pFetchmail_server_missing'] = 'Please enter the remote server name!'; # XXX +$PALANG['pFetchmail_user_missing'] = 'Please enter the remote username!'; # XXX +$PALANG['pFetchmail_password_missing'] = 'Please enter the remote password!'; # XXX $PALANG['pCreate_dbLog_createalias'] = 'stvori alias'; $PALANG['pDelete_dbLog_deletealias'] = 'pobrii alias'; $PALANG['pDelete_dbLog_deletemailbox'] = 'pobrii potanski ormarić'; @@ -345,5 +353,6 @@ $PALANG['pFetchmail_new_entry'] = 'New entry'; # XXX -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ +$PALANG['please_keep_this_as_last_entry'] = ''; # needed for language-check.sh +/* vim: set expandtab ft=php softtabstop=3 tabstop=3 shiftwidth=3: */ ?> Modified: trunk/languages/hu.lang =================================================================== --- trunk/languages/hu.lang 2007-10-25 12:29:38 UTC (rev 162) +++ trunk/languages/hu.lang 2007-10-25 22:59:52 UTC (rev 163) @@ -75,6 +75,7 @@ $PALANG['pOverview_get_modified'] = 'Utolsó módosítás'; $PALANG['pDelete_delete_error'] = '<span class="error_msg">Nem sikerült törölni a bejegyzést '; +$PALANG['pDelete_delete_success'] = '%s deleted.'; # XXX $PALANG['pDelete_postdelete_error'] = '<span class="error_msg">Nem sikerült törölni a mailbox-ot '; $PALANG['pDelete_domain_error'] = '<span class="error_msg">Ehhez a domainhez nincs jogosultságod '; $PALANG['pDelete_alias_error'] = '<span class="error_msg">Nem sikerült törölni az alias-t '; @@ -321,6 +322,13 @@ Ez egy automatikus üzenet. EOM; +$PALANG['pFetchmail_database_save_error'] = 'Could not save this entry in the database!'; # XXX +$PALANG['pFetchmail_database_save_success'] = 'Entry saved in database.'; # XXX +$PALANG['pFetchmail_error_invalid_id'] = 'No entry with ID %s found!'; # XXX +$PALANG['pFetchmail_invalid_mailbox'] = 'Invalid mailbox!'; # XXX +$PALANG['pFetchmail_server_missing'] = 'Please enter the remote server name!'; # XXX +$PALANG['pFetchmail_user_missing'] = 'Please enter the remote username!'; # XXX +$PALANG['pFetchmail_password_missing'] = 'Please enter the remote password!'; # XXX $PALANG['pUsersVacation_button_away'] = 'Automatikus válaszadás bekapcsolása'; $PALANG['pUsersVacation_button_back'] = 'Automatikus válaszadás kikapcsolása'; $PALANG['pUsersVacation_result_error'] = '<span class="error_msg">Nem sikerült megváltoztatni az automatikus válasz konfigurációdat!</span>'; @@ -360,5 +368,6 @@ $PALANG['pFetchmail_new_entry'] = 'Új bejegyzés'; -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ +$PALANG['please_keep_this_as_last_entry'] = ''; # needed for language-check.sh +/* vim: set expandtab ft=php softtabstop=3 tabstop=3 shiftwidth=3: */ ?> Modified: trunk/languages/is.lang =================================================================== --- trunk/languages/is.lang 2007-10-25 12:29:38 UTC (rev 162) +++ trunk/languages/is.lang 2007-10-25 22:59:52 UTC (rev 163) @@ -73,6 +73,7 @@ $PALANG['pOverview_get_modified'] = 'Síðast breytt'; $PALANG['pDelete_delete_error'] = '<span class="error_msg">Get ekki eytt færslunni '; +$PALANG['pDelete_delete_success'] = '%s deleted.'; # XXX $PALANG['pDelete_postdelete_error'] = '<span class="error_msg">Unable to remove mailbox '; # XXX $PALANG['pDelete_domain_error'] = '<span class="error_msg">Þetta er ekki þitt lén '; $PALANG['pDelete_alias_error'] = '<span class="error_msg">Unable to delete alias '; # XXX @@ -319,6 +320,13 @@ $PALANG['pCreate_dbLog_createmailbox'] = 'create mailbox'; $PALANG['pCreate_dbLog_createalias'] = 'create alias'; +$PALANG['pFetchmail_database_save_error'] = 'Could not save this entry in the database!'; # XXX +$PALANG['pFetchmail_database_save_success'] = 'Entry saved in database.'; # XXX +$PALANG['pFetchmail_error_invalid_id'] = 'No entry with ID %s found!'; # XXX +$PALANG['pFetchmail_invalid_mailbox'] = 'Invalid mailbox!'; # XXX +$PALANG['pFetchmail_server_missing'] = 'Please enter the remote server name!'; # XXX +$PALANG['pFetchmail_user_missing'] = 'Please enter the remote username!'; # XXX +$PALANG['pFetchmail_password_missing'] = 'Please enter the remote password!'; # XXX $PALANG['pDelete_dbLog_deletealias'] = 'delete alias'; $PALANG['pDelete_dbLog_deletemailbox'] = 'delete mailbox'; @@ -345,5 +353,6 @@ $PALANG['pFetchmail_welcome'] = 'Fetch mail for:'; # XXX $PALANG['pFetchmail_new_entry'] = 'New entry'; # XXX -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ +$PALANG['please_keep_this_as_last_entry'] = ''; # needed for language-check.sh +/* vim: set expandtab ft=php softtabstop=3 tabstop=3 shiftwidth=3: */ ?> Modified: trunk/languages/it.lang =================================================================== --- trunk/languages/it.lang 2007-10-25 12:29:38 UTC (rev 162) +++ trunk/languages/it.lang 2007-10-25 22:59:52 UTC (rev 163) @@ -73,6 +73,7 @@ $PALANG['pOverview_get_modified'] = 'Ultima modifica'; $PALANG['pDelete_delete_error'] = '<span class="error_msg">Impossibile cancellare '; +$PALANG['pDelete_delete_success'] = '%s deleted.'; # XXX $PALANG['pDelete_postdelete_error'] = '<span class="error_msg">Unable to remove mailbox '; # XXX $PALANG['pDelete_domain_error'] = '<span class="error_msg">Questo dominio non è tuo '; $PALANG['pDelete_alias_error'] = '<span class="error_msg">Unable to delete alias '; # XXX @@ -319,6 +320,13 @@ $PALANG['pUsersVacation_result_success'] = 'La tua risposta automatica è stata tolta!'; $PALANG['pCreate_dbLog_createmailbox'] = 'create mailbox'; +$PALANG['pFetchmail_database_save_error'] = 'Could not save this entry in the database!'; # XXX +$PALANG['pFetchmail_database_save_success'] = 'Entry saved in database.'; # XXX +$PALANG['pFetchmail_error_invalid_id'] = 'No entry with ID %s found!'; # XXX +$PALANG['pFetchmail_invalid_mailbox'] = 'Invalid mailbox!'; # XXX +$PALANG['pFetchmail_server_missing'] = 'Please enter the remote server name!'; # XXX +$PALANG['pFetchmail_user_missing'] = 'Please enter the remote username!'; # XXX +$PALANG['pFetchmail_password_missing'] = 'Please enter the remote password!'; # XXX $PALANG['pCreate_dbLog_createalias'] = 'create alias'; $PALANG['pDelete_dbLog_deletealias'] = 'delete alias'; $PALANG['pDelete_dbLog_deletemailbox'] = 'delete mailbox'; @@ -346,5 +354,6 @@ $PALANG['pFetchmail_welcome'] = 'Fetch mail for:'; # XXX $PALANG['pFetchmail_new_entry'] = 'New entry'; # XXX -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ +$PALANG['please_keep_this_as_last_entry'] = ''; # needed for language-check.sh +/* vim: set expandtab ft=php softtabstop=3 tabstop=3 shiftwidth=3: */ ?> Modified: trunk/languages/lt.lang =================================================================== --- trunk/languages/lt.lang 2007-10-25 12:29:38 UTC (rev 162) +++ trunk/languages/lt.lang 2007-10-25 22:59:52 UTC (rev 163) @@ -72,6 +72,7 @@ $PALANG['pOverview_get_modified'] = 'Paskutinis keitimas'; $PALANG['pDelete_delete_error'] = '<span class="error_msg">Įrašo pašalinti nepavyko '; +$PALANG['pDelete_delete_success'] = '%s deleted.'; # XXX $PALANG['pDelete_postdelete_error'] = '<span class="error_msg">Unable to remove mailbox '; # XXX $PALANG['pDelete_domain_error'] = '<span class="error_msg">Ne jūsų sritis '; $PALANG['pDelete_alias_error'] = '<span class="error_msg">Unable to delete alias '; # XXX @@ -318,6 +319,13 @@ $PALANG['pUsersVacation_result_success'] = 'Auto atsakovas išjungtas!'; $PALANG['pCreate_dbLog_createmailbox'] = 'pašto dėžutė sukurta'; +$PALANG['pFetchmail_database_save_error'] = 'Could not save this entry in the database!'; # XXX +$PALANG['pFetchmail_database_save_success'] = 'Entry saved in database.'; # XXX +$PALANG['pFetchmail_error_invalid_id'] = 'No entry with ID %s found!'; # XXX +$PALANG['pFetchmail_invalid_mailbox'] = 'Invalid mailbox!'; # XXX +$PALANG['pFetchmail_server_missing'] = 'Please enter the remote server name!'; # XXX +$PALANG['pFetchmail_user_missing'] = 'Please enter the remote username!'; # XXX +$PALANG['pFetchmail_password_missing'] = 'Please enter the remote password!'; # XXX $PALANG['pCreate_dbLog_createalias'] = 'sinonimas sukurtas'; $PALANG['pDelete_dbLog_deletealias'] = 'sinonimas pašalintas'; $PALANG['pDelete_dbLog_deletemailbox'] = 'pašto dėžutė pašalinta'; @@ -345,5 +353,6 @@ $PALANG['pFetchmail_welcome'] = 'Fetch mail for:'; # XXX $PALANG['pFetchmail_new_entry'] = 'New entry'; # XXX -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ +$PALANG['please_keep_this_as_last_entry'] = ''; # needed for language-check.sh +/* vim: set expandtab ft=php softtabstop=3 tabstop=3 shiftwidth=3: */ ?> Modified: trunk/languages/mk.lang =================================================================== --- trunk/languages/mk.lang 2007-10-25 12:29:38 UTC (rev 162) +++ trunk/languages/mk.lang 2007-10-25 22:59:52 UTC (rev 163) @@ -73,6 +73,7 @@ $PALANG['pOverview_get_modified'] = 'Последна промена'; $PALANG['pDelete_delete_error'] = '<span class="error_msg">Не можам да го избришам записот '; +$PALANG['pDelete_delete_success'] = '%s deleted.'; # XXX $PALANG['pDelete_postdelete_error'] = '<span class="error_msg">Unable to remove mailbox '; # XXX $PALANG['pDelete_domain_error'] = '<span class="error_msg">Овој домен не е ваш '; $PALANG['pDelete_alias_error'] = '<span class="error_msg">Unable to delete alias '; # XXX @@ -319,6 +320,13 @@ $PALANG['pUsersVacation_result_error'] = '<span class="error_msg">Не можам да ги променам сетирањата за автоматскиот одговор!</span>'; $PALANG['pUsersVacation_result_success'] = 'Вашиот автоматски одговор е отстранет!'; +$PALANG['pFetchmail_database_save_error'] = 'Could not save this entry in the database!'; # XXX +$PALANG['pFetchmail_database_save_success'] = 'Entry saved in database.'; # XXX +$PALANG['pFetchmail_error_invalid_id'] = 'No entry with ID %s found!'; # XXX +$PALANG['pFetchmail_invalid_mailbox'] = 'Invalid mailbox!'; # XXX +$PALANG['pFetchmail_server_missing'] = 'Please enter the remote server name!'; # XXX +$PALANG['pFetchmail_user_missing'] = 'Please enter the remote username!'; # XXX +$PALANG['pFetchmail_password_missing'] = 'Please enter the remote password!'; # XXX $PALANG['pCreate_dbLog_createmailbox'] = 'create mailbox'; $PALANG['pCreate_dbLog_createalias'] = 'create alias'; $PALANG['pDelete_dbLog_deletealias'] = 'delete alias'; @@ -347,5 +355,6 @@ $PALANG['pFetchmail_welcome'] = 'Fetch mail for:'; # XXX $PALANG['pFetchmail_new_entry'] = 'New entry'; # XXX -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ +$PALANG['please_keep_this_as_last_entry'] = ''; # needed for language-check.sh +/* vim: set expandtab ft=php softtabstop=3 tabstop=3 shiftwidth=3: */ ?> Modified: trunk/languages/nl.lang =================================================================== --- trunk/languages/nl.lang 2007-10-25 12:29:38 UTC (rev 162) +++ trunk/languages/nl.lang 2007-10-25 22:59:52 UTC (rev 163) @@ -73,6 +73,7 @@ $PALANG['pOverview_get_modified'] = 'Laatst bewerkt'; $PALANG['pDelete_delete_error'] = '<span class="error_msg">Mislukt te verwijderen '; +$PALANG['pDelete_delete_success'] = '%s deleted.'; # XXX $PALANG['pDelete_postdelete_error'] = '<span class="error_msg">Unable to remove mailbox '; # XXX $PALANG['pDelete_domain_error'] = '<span class="error_msg">Dit is niet uw domein '; $PALANG['pDelete_alias_error'] = '<span class="error_msg">Unable to delete alias '; # XXX @@ -319,6 +320,13 @@ $PALANG['pUsersVacation_result_success'] = 'Uw automatisch beantwoorder is verwijderd.'; $PALANG['pCreate_dbLog_createmailbox'] = 'create mailbox'; +$PALANG['pFetchmail_database_save_error'] = 'Could not save this entry in the database!'; # XXX +$PALANG['pFetchmail_database_save_success'] = 'Entry saved in database.'; # XXX +$PALANG['pFetchmail_error_invalid_id'] = 'No entry with ID %s found!'; # XXX +$PALANG['pFetchmail_invalid_mailbox'] = 'Invalid mailbox!'; # XXX +$PALANG['pFetchmail_server_missing'] = 'Please enter the remote server name!'; # XXX +$PALANG['pFetchmail_user_missing'] = 'Please enter the remote username!'; # XXX +$PALANG['pFetchmail_password_missing'] = 'Please enter the remote password!'; # XXX $PALANG['pCreate_dbLog_createalias'] = 'create alias'; $PALANG['pDelete_dbLog_deletealias'] = 'delete alias'; $PALANG['pDelete_dbLog_deletemailbox'] = 'delete mailbox'; @@ -346,5 +354,6 @@ $PALANG['pFetchmail_welcome'] = 'Fetch mail for:'; # XXX $PALANG['pFetchmail_new_entry'] = 'New entry'; # XXX -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ +$PALANG['please_keep_this_as_last_entry'] = ''; # needed for language-check.sh +/* vim: set expandtab ft=php softtabstop=3 tabstop=3 shiftwidth=3: */ ?> Modified: trunk/languages/nn.lang =================================================================== --- trunk/languages/nn.lang 2007-10-25 12:29:38 UTC (rev 162) +++ trunk/languages/nn.lang 2007-10-25 22:59:52 UTC (rev 163) @@ -73,6 +73,7 @@ $PALANG['pOverview_get_modified'] = 'Sist endret'; $PALANG['pDelete_delete_error'] = '<span class="error_msg">Kan ikke slette'; +$PALANG['pDelete_delete_success'] = '%s deleted.'; # XXX $PALANG['pDelete_postdelete_error'] = '<span class="error_msg">Unable to remove mailbox '; # XXX $PALANG['pDelete_domain_error'] = '<span class="error_msg">Dette domenet er ikke ditt'; $PALANG['pDelete_alias_error'] = '<span class="error_msg">Unable to delete alias '; # XXX @@ -319,6 +320,13 @@ $PALANG['pCreate_dbLog_createalias'] = 'opprett alias'; $PALANG['pDelete_dbLog_deletealias'] = 'slett alias'; $PALANG['pDelete_dbLog_deletemailbox'] = 'slett e-postkonto'; +$PALANG['pFetchmail_database_save_error'] = 'Could not save this entry in the database!'; # XXX +$PALANG['pFetchmail_database_save_success'] = 'Entry saved in database.'; # XXX +$PALANG['pFetchmail_error_invalid_id'] = 'No entry with ID %s found!'; # XXX +$PALANG['pFetchmail_invalid_mailbox'] = 'Invalid mailbox!'; # XXX +$PALANG['pFetchmail_server_missing'] = 'Please enter the remote server name!'; # XXX +$PALANG['pFetchmail_user_missing'] = 'Please enter the remote username!'; # XXX +$PALANG['pFetchmail_password_missing'] = 'Please enter the remote password!'; # XXX $PALANG['pEdit_dbLog_editactive'] = 'endre status'; $PALANG['pEdit_dbLog_editalias'] = 'endre alias'; $PALANG['pEdit_dbLog_editmailbox'] = 'endre e-postkonto'; @@ -343,5 +351,6 @@ $PALANG['pFetchmail_new_entry'] = 'New entry'; # XXX -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ +$PALANG['please_keep_this_as_last_entry'] = ''; # needed for language-check.sh +/* vim: set expandtab ft=php softtabstop=3 tabstop=3 shiftwidth=3: */ ?> Modified: trunk/languages/pl.lang =================================================================== --- trunk/languages/pl.lang 2007-10-25 12:29:38 UTC (rev 162) +++ trunk/languages/pl.lang 2007-10-25 22:59:52 UTC (rev 163) @@ -75,6 +75,7 @@ $PALANG['pOverview_get_modified'] = 'Ostatnio zmodyfikowany'; $PALANG['pDelete_delete_error'] = '<span class="error_msg">Nie można usunąć tego wpisu '; +$PALANG['pDelete_delete_success'] = '%s deleted.'; # XXX $PALANG['pDelete_postdelete_error'] = '<span class="error_msg">Nie można usunąć konta '; $PALANG['pDelete_domain_error'] = '<span class="error_msg">Ta domena nie należy do Ciebie '; $PALANG['pDelete_alias_error'] = '<span class="error_msg">Nie można usunąć aliasu '; @@ -321,6 +322,13 @@ $PALANG['pUsersVacation_result_error'] = '<span class="error_msg">Nie mogę zaktualizować ustawień Twojej auto odpowiedzi!</span>'; $PALANG['pUsersVacation_result_success'] = 'Twoja auto odpowiedź została usunięta!'; +$PALANG['pFetchmail_database_save_error'] = 'Could not save this entry in the database!'; # XXX +$PALANG['pFetchmail_database_save_success'] = 'Entry saved in database.'; # XXX +$PALANG['pFetchmail_error_invalid_id'] = 'No entry with ID %s found!'; # XXX +$PALANG['pFetchmail_invalid_mailbox'] = 'Invalid mailbox!'; # XXX +$PALANG['pFetchmail_server_missing'] = 'Please enter the remote server name!'; # XXX +$PALANG['pFetchmail_user_missing'] = 'Please enter the remote username!'; # XXX +$PALANG['pFetchmail_password_missing'] = 'Please enter the remote password!'; # XXX $PALANG['pCreate_dbLog_createmailbox'] = 'create mailbox'; $PALANG['pCreate_dbLog_createalias'] = 'create alias'; $PALANG['pDelete_dbLog_deletealias'] = 'delete alias'; @@ -349,5 +357,6 @@ $PALANG['pFetchmail_welcome'] = 'Fetch mail for:'; # XXX $PALANG['pFetchmail_new_entry'] = 'New entry'; # XXX -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ +$PALANG['please_keep_this_as_last_entry'] = ''; # needed for language-check.sh +/* vim: set expandtab ft=php softtabstop=3 tabstop=3 shiftwidth=3: */ ?> Modified: trunk/languages/pt-br.lang =================================================================== --- trunk/languages/pt-br.lang 2007-10-25 12:29:38 UTC (rev 162) +++ trunk/languages/pt-br.lang 2007-10-25 22:59:52 UTC (rev 163) @@ -73,6 +73,7 @@ $PALANG['pOverview_get_modified'] = 'Última modificação'; $PALANG['pDelete_delete_error'] = '<span class="error_msg">Não foi possível apagar esse registro '; +$PALANG['pDelete_delete_success'] = '%s deleted.'; # XXX $PALANG['pDelete_postdelete_error'] = '<span class="error_msg">Unable to remove mailbox '; # XXX $PALANG['pDelete_domain_error'] = '<span class="error_msg">Esse domínio não é seu! '; $PALANG['pDelete_alias_error'] = '<span class="error_msg">Unable to delete alias '; # XXX @@ -319,6 +320,13 @@ $PALANG['pUsersVacation_result_success'] = 'Sua resposta automática foi removida!'; $PALANG['pCreate_dbLog_createmailbox'] = 'create mailbox'; +$PALANG['pFetchmail_database_save_error'] = 'Could not save this entry in the database!'; # XXX +$PALANG['pFetchmail_database_save_success'] = 'Entry saved in database.'; # XXX +$PALANG['pFetchmail_error_invalid_id'] = 'No entry with ID %s found!'; # XXX +$PALANG['pFetchmail_invalid_mailbox'] = 'Invalid mailbox!'; # XXX +$PALANG['pFetchmail_server_missing'] = 'Please enter the remote server name!'; # XXX +$PALANG['pFetchmail_user_missing'] = 'Please enter the remote username!'; # XXX +$PALANG['pFetchmail_password_missing'] = 'Please enter the remote password!'; # XXX $PALANG['pCreate_dbLog_createalias'] = 'create alias'; $PALANG['pDelete_dbLog_deletealias'] = 'delete alias'; $PALANG['pDelete_dbLog_deletemailbox'] = 'delete mailbox'; @@ -346,5 +354,6 @@ $PALANG['pFetchmail_welcome'] = 'Fetch mail for:'; # XXX $PALANG['pFetchmail_new_entry'] = 'New entry'; # XXX -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ +$PALANG['please_keep_this_as_last_entry'] = ''; # needed for language-check.sh +/* vim: set expandtab ft=php softtabstop=3 tabstop=3 shiftwidth=3: */ ?> Modified: trunk/languages/ru.lang =================================================================== --- trunk/languages/ru.lang 2007-10-25 12:29:38 UTC (rev 162) +++ trunk/languages/ru.lang 2007-10-25 22:59:52 UTC (rev 163) @@ -76,6 +76,7 @@ $PALANG['pOverview_get_modified'] = 'Последнее изменение'; $PALANG['pDelete_delete_error'] = '<span class="error_msg">Невозможно удалить запись '; +$PALANG['pDelete_delete_success'] = '%s deleted.'; # XXX $PALANG['pDelete_postdelete_error'] = '<span class="error_msg">Невозможно удалить ящик '; $PALANG['pDelete_domain_error'] = '<span class="error_msg">Этот домен не принадлежит вам '; $PALANG['pDelete_alias_error'] = '<span class="error_msg">Невозможно удалить алиас '; @@ -322,6 +323,13 @@ EOM; $PALANG['pUsersVacation_button_away'] = 'Ухожу'; $PALANG['pUsersVacation_button_back'] = 'Возвращаюсь'; +$PALANG['pFetchmail_database_save_error'] = 'Could not save this entry in the database!'; # XXX +$PALANG['pFetchmail_database_save_success'] = 'Entry saved in database.'; # XXX +$PALANG['pFetchmail_error_invalid_id'] = 'No entry with ID %s found!'; # XXX +$PALANG['pFetchmail_invalid_mailbox'] = 'Invalid mailbox!'; # XXX +$PALANG['pFetchmail_server_missing'] = 'Please enter the remote server name!'; # XXX +$PALANG['pFetchmail_user_missing'] = 'Please enter the remote username!'; # XXX +$PALANG['pFetchmail_password_missing'] = 'Please enter the remote password!'; # XXX $PALANG['pUsersVacation_result_error'] = '<span class="error_msg">Невозможно изменить настройки автоответчика!</span>'; $PALANG['pUsersVacation_result_success'] = 'Ваш автоответчик был убран!'; @@ -359,5 +367,6 @@ $PALANG['pFetchmail_new_entry'] = 'Новая запись'; -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ +$PALANG['please_keep_this_as_last_entry'] = ''; # needed for language-check.sh +/* vim: set expandtab ft=php softtabstop=3 tabstop=3 shiftwidth=3: */ ?> Modified: trunk/languages/sk.lang =================================================================== --- trunk/languages/sk.lang 2007-10-25 12:29:38 UTC (rev 162) +++ trunk/languages/sk.lang 2007-10-25 22:59:52 UTC (rev 163) @@ -73,6 +73,7 @@ $PALANG['pOverview_get_modified'] = 'Naposledy zmenené'; $PALANG['pDelete_delete_error'] = '<span class="error_msg">Nie je možné zmazať položku '; +$PALANG['pDelete_delete_success'] = '%s deleted.'; # XXX $PALANG['pDelete_postdelete_error'] = '<span class="error_msg">Unable to remove mailbox '; # XXX $PALANG['pDelete_domain_error'] = '<span class="error_msg">Táto doména nie je vaša '; $PALANG['pDelete_alias_error'] = '<span class="error_msg">Unable to delete alias '; # XXX @@ -319,6 +320,13 @@ $PALANG['pUsersVacation_result_success'] = 'Nastavenie bolo upravené!'; $PALANG['pCreate_dbLog_createmailbox'] = 'vytvoriť mailbox'; +$PALANG['pFetchmail_database_save_error'] = 'Could not save this entry in the database!'; # XXX +$PALANG['pFetchmail_database_save_success'] = 'Entry saved in database.'; # XXX +$PALANG['pFetchmail_error_invalid_id'] = 'No entry with ID %s found!'; # XXX +$PALANG['pFetchmail_invalid_mailbox'] = 'Invalid mailbox!'; # XXX +$PALANG['pFetchmail_server_missing'] = 'Please enter the remote server name!'; # XXX +$PALANG['pFetchmail_user_missing'] = 'Please enter the remote username!'; # XXX +$PALANG['pFetchmail_password_missing'] = 'Please enter the remote password!'; # XXX $PALANG['pCreate_dbLog_createalias'] = 'vytvoriť alias'; $PALANG['pDelete_dbLog_deletealias'] = 'zmazať alias'; $PALANG['pDelete_dbLog_deletemailbox'] = 'zmazať mailbox'; @@ -346,5 +354,6 @@ $PALANG['pFetchmail_welcome'] = 'Fetch mail for:'; # XXX $PALANG['pFetchmail_new_entry'] = 'New entry'; ... [truncated message content] |
From: <chr...@us...> - 2007-10-25 23:12:50
|
Revision: 164 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=164&view=rev Author: christian_boltz Date: 2007-10-25 16:12:51 -0700 (Thu, 25 Oct 2007) Log Message: ----------- - replaced tabs with spaces in fetchmail.php and fetchmail.tpl - whitespace changes only, no other difference Modified Paths: -------------- trunk/fetchmail.php trunk/templates/fetchmail.tpl Modified: trunk/fetchmail.php =================================================================== --- trunk/fetchmail.php 2007-10-25 22:59:52 UTC (rev 163) +++ trunk/fetchmail.php 2007-10-25 23:12:51 UTC (rev 164) @@ -73,38 +73,39 @@ $display_status = 1; if ($new || $edit) $display_status = 0; -$fm_struct=array( // list($editible,$view,$type,$title,$comment) +$fm_struct=array( // list($editible,$view,$type,$title,$comment) # first column: allow editing? # second column: display field? - "id" =>array(0,0,'id', 'ID','Record ID'), - "mailbox" =>array(1,1,'enum', 'Mailbox','Local mailbox'), - "src_server" =>array(1,1,'text', 'Server','Remote Server'), - "src_auth" =>array(1,1,'enum', 'Auth Type','Mostly password'), - "src_user" =>array(1,1,'text', 'User','Remote User'), - "src_password" =>array(1,0,'password', 'Password','Remote Password'), - "src_folder" =>array(1,1,'text', 'Folder','Remote Folder'), - "poll_time" =>array(1,1,'num', 'Poll','Poll Time (min)'), - "fetchall" =>array(1,1,'bool', 'Fetch All','Retrieve both old (seen) and new messages'), - "keep" =>array(1,1,'bool', 'Keep','Keep retrieved messages on the remote mailserver'), - "protocol" =>array(1,1,'enum', 'Protocol','Protocol to use'), - "extra_options" =>array($extra_options,$extra_options,'longtext', 'Extra Options','Extra fetchmail Options'), - "mda" =>array($extra_options,$extra_options,'longtext', 'MDA','Mail Delivery Agent'), - "date" => array(0,$display_status,'text', 'Date','Date of last polling/configuration change'), - "returned_text" => array(0,$display_status,'longtext', 'Returned Text','Text message from last polling'), + # the others: type title help text (in edit form) + "id" => array(0,0,'id', 'ID', 'Record ID'), + "mailbox" => array(1,1,'enum', 'Mailbox', 'Local mailbox'), + "src_server" => array(1,1,'text', 'Server', 'Remote Server'), + "src_auth" => array(1,1,'enum', 'Auth Type','Mostly password'), + "src_user" => array(1,1,'text', 'User', 'Remote User'), + "src_password" => array(1,0,'password', 'Password', 'Remote Password'), + "src_folder" => array(1,1,'text', 'Folder', 'Remote Folder'), + "poll_time" => array(1,1,'num', 'Poll', 'Poll Time (min)'), + "fetchall" => array(1,1,'bool', 'Fetch All','Retrieve both old (seen) and new messages'), + "keep" => array(1,1,'bool', 'Keep', 'Keep retrieved messages on the remote mailserver'), + "protocol" => array(1,1,'enum', 'Protocol', 'Protocol to use'), + "extra_options" => array($extra_options,$extra_options,'longtext', 'Extra Options','Extra fetchmail Options'), + "mda" => array($extra_options,$extra_options,'longtext', 'MDA', 'Mail Delivery Agent'), + "date" => array(0,$display_status, 'text', 'Date', 'Date of last polling/configuration change'), + "returned_text" => array(0,$display_status, 'longtext', 'Returned Text','Text message from last polling'), ); $SESSID_USERNAME = authentication_get_username(); if (!$SESSID_USERNAME ) - exit; + exit; $fm_defaults=array( - "id" =>0, - "mailbox" => array($SESSID_USERNAME), + "id" =>0, + "mailbox" => array($SESSID_USERNAME), "poll_time" => 10, - "src_auth" => - array('password','kerberos_v5','kerberos','kerberos_v4','gssapi','cram-md5','otp','ntlm','msn','ssh','any'), - "protocol" => - array('POP3','IMAP','POP2','ETRN','AUTO'), + "src_auth" => + array('password','kerberos_v5','kerberos','kerberos_v4','gssapi','cram-md5','otp','ntlm','msn','ssh','any'), + "protocol" => + array('POP3','IMAP','POP2','ETRN','AUTO'), ); @@ -115,14 +116,14 @@ $res = db_query ($sql); if ($res['rows'] > 0){ - $fm_defaults["mailbox"]=array(); - while ($name = db_array ($res['result'])){ - $fm_defaults["mailbox"][] = $name["username"]; - } + $fm_defaults["mailbox"]=array(); + while ($name = db_array ($res['result'])){ + $fm_defaults["mailbox"][] = $name["username"]; + } } else{ - $fm_defaults["mailbox"]=array(); - $fm_defaults["mailbox"][]=$SESSID_USERNAME; # TODO: Does this really make sense? Or should we display a message "please create a mailbox first!"? + $fm_defaults["mailbox"]=array(); + $fm_defaults["mailbox"][]=$SESSID_USERNAME; # TODO: Does this really make sense? Or should we display a message "please create a mailbox first!"? } $row_id = 0; @@ -148,7 +149,7 @@ if ($cancel) { - $edit=0; + $edit=0; } elseif ($delete) { $result = db_query ("delete from fetchmail WHERE id=".$delete); if ($result['rows'] != 1) @@ -160,16 +161,16 @@ $delete=0; } elseif ( ($edit || $new) && $save) { $formvars=array(); - foreach($fm_struct as $key=>$row){ - list($editible,$view,$type,$title,$comment)=$row; - if ($editible != 0){ - $func="_inp_".$type; - $val=safepost($key); + foreach($fm_struct as $key=>$row){ + list($editible,$view,$type,$title,$comment)=$row; + if ($editible != 0){ + $func="_inp_".$type; + $val=safepost($key); if ($type!="password" || strlen($val) > 0) { # skip on empty (aka unchanged) password $formvars[$key]= escape_string( function_exists($func) ?$func($val) :$val); } - } - } + } + } $formvars['id'] = $edit; # results in 0 on $new if (!in_array($formvars['mailbox'], $fm_defaults['mailbox'])) { @@ -234,21 +235,21 @@ } function _inp_num($val){ - return (int)($val); + return (int)($val); } function _inp_bool($val){ - return $val?db_get_boolean(true):db_get_boolean(false); + return $val?db_get_boolean(true):db_get_boolean(false); } function _inp_password($val){ - return base64_encode($val); + return base64_encode($val); } - include ("./templates/header.tpl"); - include ("./templates/menu.tpl"); - include ("./templates/fetchmail.tpl"); - include ("./templates/footer.tpl"); +include ("./templates/header.tpl"); +include ("./templates/menu.tpl"); +include ("./templates/fetchmail.tpl"); +include ("./templates/footer.tpl"); /* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ ?> Modified: trunk/templates/fetchmail.tpl =================================================================== --- trunk/templates/fetchmail.tpl 2007-10-25 22:59:52 UTC (rev 163) +++ trunk/templates/fetchmail.tpl 2007-10-25 23:12:51 UTC (rev 164) @@ -1,12 +1,12 @@ <?php - $headers=array(); - foreach($fm_struct as $row){ - list($editible,$view,$type,$title,$comment)=$row; - if ($view){ - $headers[]=$row; - } - } +$headers=array(); +foreach($fm_struct as $row){ + list($editible,$view,$type,$title,$comment)=$row; + if ($view){ + $headers[]=$row; + } +} if ($edit || $new) { # edit mode echo '<div id="edit_form">'; @@ -17,36 +17,36 @@ print '<div id="overview">'; print '<form name="overview" method="post">'; print "<table id=\"log_table\" border=0>\n"; - print " <tr>\n"; - print " <td colspan=\"".(sizeof($headers)+2)."\"><h3>".$PALANG['pFetchmail_welcome'].$user_domains."</h3></td>\n"; - print " </tr>\n"; - print " <tr class=\"header\">\n"; - foreach($headers as $row){ - list($editible,$view,$type,$title,$comment)=$row; - print " <td>" . $title . "</td>\n"; - } + print " <tr>\n"; + print " <td colspan=\"".(sizeof($headers)+2)."\"><h3>".$PALANG['pFetchmail_welcome'].$user_domains."</h3></td>\n"; + print " </tr>\n"; + print " <tr class=\"header\">\n"; + foreach($headers as $row){ + list($editible,$view,$type,$title,$comment)=$row; + print " <td>" . $title . "</td>\n"; + } print "<td> </td>"; print "<td> </td>"; - print " </tr>\n"; - + print " </tr>\n"; + if (sizeof ($tFmail) > 0){ foreach($tFmail as $row){ - print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n"; - foreach($row as $key=>$val){ + print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n"; + foreach($row as $key=>$val){ - if (!isset($fm_struct[$key])) continue; # TODO: not really nice, but avoids undefined index warnings ;-) + if (!isset($fm_struct[$key])) continue; # TODO: not really nice, but avoids undefined index warnings ;-) list($editible,$view,$type,$title,$comment)=$fm_struct[$key]; - if ($view){ - $func="_listview_".$type; - print " <td nowrap>" . (function_exists($func)?$func($val):$val) . "</td>\n"; - } + if ($view){ + $func="_listview_".$type; + print " <td nowrap>" . (function_exists($func)?$func($val):$val) . "</td>\n"; + } - } + } print "<td><a href=\"fetchmail.php?edit=" . $row['id'] . "\">" . $PALANG['edit'] . "</a></td>"; print " <td><a href=\"fetchmail.php?delete=" . $row['id'] . "\"onclick=\"return confirm ('" . $PALANG['confirm'] . $PALANG['pMenu_fetchmail'] . ": ". htmlentities($row['src_user']) . " @ " . htmlentities($row['src_server']) . "')\">" . $PALANG['del'] . "</a></td>\n"; - print " </tr>\n"; + print " </tr>\n"; } } print "</table>"; @@ -54,121 +54,121 @@ print "</form>\n"; print "</div>\n"; - print "<p><a href='?new=1'>".$PALANG['pFetchmail_new_entry']."</a></p>\n"; + print "<p><a href='?new=1'>".$PALANG['pFetchmail_new_entry']."</a></p>\n"; } # end display mode function fetchmail_edit_row($data=array()){ - global $fm_struct,$fm_defaults,$PALANG; - $id=$data["id"]; - $_id=$data["id"]*100+1; - $ret="<table>"; + global $fm_struct,$fm_defaults,$PALANG; + $id=$data["id"]; + $_id=$data["id"]*100+1; + $ret="<table>"; $ret .= '<tr><td colspan="3"><h3>' . $PALANG['pMenu_fetchmail'] . '</h3></td></tr>'; # TODO: $formvars possibly contains db-specific boolean values # TODO: no problems with MySQL, to be tested with PgSQL # TODO: undefined values may also occour - foreach($fm_struct as $key=>$struct){ - list($editible,$view,$type,$title,$comment)=$struct; - if ($editible){ - $ret.="<tr><td align=left valign=top><label for=${_id} style='width:20em;'>${title}: </label></td>"; - $ret.="<td align=left style='padding-left:.25em;padding-right:.25em;background-color:white;'>"; - $func="_edit_".$type; - if (! function_exists($func)) - $func="_edit_text"; - $val=isset($data[$key]) - ?$data[$key] - :(! is_array($fm_defaults[$key]) - ?$fm_defaults[$key] - :'' - ); - $fm_defaults_key = ""; if (isset($fm_defaults[$key])) $fm_defaults_key = $fm_defaults[$key]; - $ret.=$func($_id++,$key,$fm_defaults_key,$val); - $ret.="</td><td align=left valign=top><i> ${comment}</i></td></tr>\n"; - } - elseif($view){ - $func="_view_".$type; - $val=isset($data[$key]) - ?(function_exists($func) - ?$func($data[$key]) - :nl2br($data[$key]) - ) - :"--x--"; - $ret.="<tr><td align=left valign=top>${title}: </label></td>"; - $ret.="<td align=left valign=top style='padding-left:.25em;padding-right:.25em;background-color:white;'>".$val; - $ret.="</td><td align=left valign=top><i> ${comment}</i></td></tr>\n"; - } - } + foreach($fm_struct as $key=>$struct){ + list($editible,$view,$type,$title,$comment)=$struct; + if ($editible){ + $ret.="<tr><td align=left valign=top><label for=${_id} style='width:20em;'>${title}: </label></td>"; + $ret.="<td align=left style='padding-left:.25em;padding-right:.25em;background-color:white;'>"; + $func="_edit_".$type; + if (! function_exists($func)) + $func="_edit_text"; + $val=isset($data[$key]) + ?$data[$key] + :(! is_array($fm_defaults[$key]) + ?$fm_defaults[$key] + :'' + ); + $fm_defaults_key = ""; if (isset($fm_defaults[$key])) $fm_defaults_key = $fm_defaults[$key]; + $ret.=$func($_id++,$key,$fm_defaults_key,$val); + $ret.="</td><td align=left valign=top><i> ${comment}</i></td></tr>\n"; + } + elseif($view){ + $func="_view_".$type; + $val=isset($data[$key]) + ?(function_exists($func) + ?$func($data[$key]) + :nl2br($data[$key]) + ) + :"--x--"; + $ret.="<tr><td align=left valign=top>${title}: </label></td>"; + $ret.="<td align=left valign=top style='padding-left:.25em;padding-right:.25em;background-color:white;'>".$val; + $ret.="</td><td align=left valign=top><i> ${comment}</i></td></tr>\n"; + } + } # TODO: pressing enter in the form "clicks" cancel button instead of submit button - $ret.="<tr><td align=left><input type=submit name=cancel value='Abbrechen'></td><td align=right><input type=submit name=save value='Save'></td><td align=right>"; - if ($id){ - $ret.="<input type=hidden name=edit value='${id}'>"; - } - $ret.="</td></tr>\n"; - $ret.="</table>\n"; + $ret.="<tr><td align=left><input type=submit name=cancel value='Abbrechen'></td><td align=right><input type=submit name=save value='Save'></td><td align=right>"; + if ($id){ + $ret.="<input type=hidden name=edit value='${id}'>"; + } + $ret.="</td></tr>\n"; + $ret.="</table>\n"; $ret.="<p />\n"; $ret.="</form>\n"; $ret.="</div>\n"; - return $ret; + return $ret; } function _edit_text($id,$key,$def_vals,$val=""){ - $val=htmlspecialchars($val); - return "<input type=text name=${key} id=${id} value='${val}'>"; + $val=htmlspecialchars($val); + return "<input type=text name=${key} id=${id} value='${val}'>"; } function _edit_password($id,$key,$def_vals,$val=""){ - $val=preg_replace("{.}","*",$val); - return "<input type=password name=${key} id=${id} value='${val}'>"; + $val=preg_replace("{.}","*",$val); + return "<input type=password name=${key} id=${id} value='${val}'>"; } function _edit_num($id,$key,$def_vals,$val=""){ - $val=(int)($val); - return "<input type=text name=${key} id=${id} value='${val}'>"; + $val=(int)($val); + return "<input type=text name=${key} id=${id} value='${val}'>"; } function _edit_bool($id,$key,$def_vals,$val=""){ - $ret="<input type=checkbox name=${key} id=${id}"; - if ($val) - $ret.=" checked"; - $ret.=">"; - return $ret; + $ret="<input type=checkbox name=${key} id=${id}"; + if ($val) + $ret.=" checked"; + $ret.=">"; + return $ret; } function _edit_longtext($id,$key,$def_vals,$val=""){ - $val=htmlspecialchars($val); - return "<textarea name=${key} id=${id} rows=2 style='width:20em;'>${val}</textarea>"; + $val=htmlspecialchars($val); + return "<textarea name=${key} id=${id} rows=2 style='width:20em;'>${val}</textarea>"; } function _edit_enum($id,$key,$def_vals,$val=""){ - $ret="<select name=${key} id=${id}>"; - foreach($def_vals as $opt_val){ - $ret.="<option"; - if ($opt_val==$val) - $ret.=" selected"; - $ret.=">${opt_val}</option>\n"; - } - $ret.="</select>\n"; - return $ret; + $ret="<select name=${key} id=${id}>"; + foreach($def_vals as $opt_val){ + $ret.="<option"; + if ($opt_val==$val) + $ret.=" selected"; + $ret.=">${opt_val}</option>\n"; + } + $ret.="</select>\n"; + return $ret; } function _listview_id($val){ - return "<a href='?edit=${val}'> ${val} </a>"; + return "<a href='?edit=${val}'> ${val} </a>"; } function _listview_bool($val){ - return $val?"+":""; + return $val?"+":""; } function _listview_longtext($val){ - return strlen($val)?"Text - ".strlen($val)." chars":"--x--"; + return strlen($val)?"Text - ".strlen($val)." chars":"--x--"; } function _listview_text($val){ - return sizeof($val)?$val:"--x--"; + return sizeof($val)?$val:"--x--"; } function _listview_password($val){ - return preg_replace("{.}","*",$val); + return preg_replace("{.}","*",$val); } /* vim: set ft=php expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-10-30 00:18:54
|
Revision: 166 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=166&view=rev Author: christian_boltz Date: 2007-10-29 17:18:53 -0700 (Mon, 29 Oct 2007) Log Message: ----------- - merged admin/delete.php into /delete.php - the WHERE fieldname is now hardcoded instead of being a $_GET parameter This fixes a possible security hole in admin/delete.php (only vulnerabe when logged in as global-admin) Modified Paths: -------------- trunk/admin/delete.php trunk/delete.php trunk/templates/admin_list-admin.tpl trunk/templates/admin_list-domain.tpl trunk/templates/overview.tpl Modified: trunk/admin/delete.php =================================================================== --- trunk/admin/delete.php 2007-10-26 06:13:46 UTC (rev 165) +++ trunk/admin/delete.php 2007-10-30 00:18:53 UTC (rev 166) @@ -1,161 +1,3 @@ <?php -/** - * Postfix Admin - * - * LICENSE - * This source file is subject to the GPL license that is bundled with - * this package in the file LICENSE.TXT. - * - * Further details on the project are available at : - * http://www.postfixadmin.com or http://postfixadmin.sf.net - * - * @version $Id$ - * @license GNU GPL v2 or later. - * - * File: delete.php - * Used to delete a domain, mailbox or alias. - * - * Template File: message.tpl - * - * Template Variables: - * - * tMessage - * - * Form POST \ GET Variables: - * - * fTable - * fWhere - * fDelete - * fDomain - */ - -require_once('../common.php'); - -authentication_require_role('global-admin'); - -if ($_SERVER['REQUEST_METHOD'] == "GET") -{ - if (isset ($_GET['table'])) $fTable = escape_string ($_GET['table']); - if (isset ($_GET['where'])) $fWhere = escape_string ($_GET['where']); - if (isset ($_GET['delete'])) $fDelete = escape_string ($_GET['delete']); - if (isset ($_GET['domain'])) $fDomain = escape_string ($_GET['domain']); - - if ($CONF['database_type'] == "pgsql") db_query('BEGIN'); - - $error=0; - - if (empty ($fTable)) - { - $error = 1; - } - - if ($fTable == "domain") - { - $result_domain_admins = db_delete ($table_domain_admins,$fWhere,$fDelete); - $result_alias = db_delete ($table_alias,$fWhere,$fDelete); - $result_mailbox = db_delete ($table_mailbox,$fWhere,$fDelete); - $result_log = db_delete ($table_log,$fWhere,$fDelete); - if ($CONF['vacation'] == "YES") - { - $result_vacation = db_delete ($table_vacation,$fWhere,$fDelete); - } - $result_domain = db_delete ($table_domain,$fWhere,$fDelete); - - if (!$result_domain || !domain_postdeletion($fDelete)) - { - $error = 1; - $tMessage = $PALANG['pAdminDelete_domain_error']; - } - else - { - $url = "list-domain.php"; - } - } - - if ($fTable == "admin") - { - $result_admin = db_delete ($table_admin,$fWhere,$fDelete); - $result_domain_admins = db_delete ($table_domain_admins,$fWhere,$fDelete); - - if (!($result_admin == 1) and ($result_domain_admins >= 0)) - { - $error = 1; - $tMessage = $PALANG['pAdminDelete_admin_error']; - } - else - { - $url = "list-admin.php"; - } - } - - if ($fTable == "alias" or $fTable == "mailbox") - { - if ($CONF['database_type'] == "pgsql") db_query('BEGIN'); - $result = db_query ("DELETE FROM $table_alias WHERE address='$fDelete' AND domain='$fDomain'"); - if ($result['rows'] != 1) - { - $error = 1; - $tMessage = $PALANG['pDelete_delete_error'] . "<b>$fDelete</b> (alias)!</span>"; - } - else - { - $url = "list-virtual.php?domain=$fDomain"; - db_log ($SESSID_USERNAME , $fDomain, 'delete_alias', $fDelete); - } - - if (!$error) - { - $result = db_query ("SELECT * FROM $table_mailbox WHERE username='$fDelete' AND domain='$fDomain'"); - if ($result['rows'] == 1) - { - $result = db_query ("DELETE FROM $table_mailbox WHERE username='$fDelete' AND domain='$fDomain'"); - $postdel_res=mailbox_postdeletion($fDelete,$fDomain); - if ($result['rows'] != 1 || !$postdel_res) - { - $error = 1; - $tMessage = $PALANG['pDelete_delete_error'] . "<b>$fDelete</b> ("; - if ($result['rows']!=1) - { - $tMessage.='mailbox'; - if (!$postdel_res) $tMessage.=', '; - } - if (!$postdel_res) - { - $tMessage.='post-deletion'; - } - $tMessage.=')</span>'; - } - else - { - $url = "list-virtual.php?domain=$fDomain"; - db_query ("DELETE FROM $table_vacation WHERE email='$fDelete' AND domain='$fDomain'"); - db_log ($SESSID_USERNAME, $fDomain, 'delete_mailbox', $fDelete); - } - } - } - } - - if ($error == 1) - { - if ($CONF['database_type']=='pgsql') { db_query('ROLLBACK'); } - } else { - if ($CONF['database_type']=='pgsql') { db_query('COMMIT'); } - header ("Location: $url"); - exit; - } - - include ("../templates/header.tpl"); - include ("../templates/admin_menu.tpl"); - include ("../templates/message.tpl"); - include ("../templates/footer.tpl"); -} - -if ($_SERVER['REQUEST_METHOD'] == "POST") -{ - include ("../templates/header.tpl"); - include ("../templates/menu.tpl"); - include ("../templates/message.tpl"); - include ("../templates/footer.tpl"); -} -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ +require('../delete.php'); ?> Modified: trunk/delete.php =================================================================== --- trunk/delete.php 2007-10-26 06:13:46 UTC (rev 165) +++ trunk/delete.php 2007-10-30 00:18:53 UTC (rev 166) @@ -13,15 +13,10 @@ * @license GNU GPL v2 or later. * * File: delete.php - * Responsible for allowing for the deletion of domains; note if - * a domain is deleted, all mailboxes and aliases belonging to the - * domain are also removed. + * Used to delete admins, domains, mailboxes and aliases. + * Note: if a domain is deleted, all mailboxes and aliases belonging + * to the domain are also removed. * - * @version $Id$ - * @license GNU GPL v2 or later. - * - * Template Variables: - * * Template File: message.tpl * * Template Variables: @@ -30,6 +25,7 @@ * * Form POST \ GET Variables: * + * fTable * fDelete * fDomain */ @@ -39,12 +35,62 @@ authentication_require_role('admin'); $SESSID_USERNAME = authentication_get_username(); +$error = 0; -if ($_SERVER['REQUEST_METHOD'] == "GET") +$fTable = escape_string (safeget('table') ); # see the if blocks below for valid values +$fDelete = escape_string (safeget('delete')); +$fDomain = escape_string (safeget('domain')); + +$error=0; + +if ($fTable == "admin") { - if (isset ($_GET['delete'])) $fDelete = escape_string ($_GET['delete']); - if (isset ($_GET['domain'])) $fDomain = escape_string ($_GET['domain']); + authentication_require_role('global-admin'); + $fWhere = 'username'; + $result_admin = db_delete ($table_admin,$fWhere,$fDelete); + $result_domain_admins = db_delete ($table_domain_admins,$fWhere,$fDelete); + + if (!($result_admin == 1) and ($result_domain_admins >= 0)) + { + $error = 1; + $tMessage = $PALANG['pAdminDelete_admin_error']; + } + else + { + $url = "list-admin.php"; + header ("Location: $url"); + } +} # ($fTable == "admin") +elseif ($fTable == "domain") +{ + authentication_require_role('global-admin'); + $fWhere = 'domain'; + $result_domain_admins = db_delete ($table_domain_admins,$fWhere,$fDelete); + $result_alias = db_delete ($table_alias,$fWhere,$fDelete); + $result_mailbox = db_delete ($table_mailbox,$fWhere,$fDelete); + $result_log = db_delete ($table_log,$fWhere,$fDelete); + if ($CONF['vacation'] == "YES") + { + $result_vacation = db_delete ($table_vacation,$fWhere,$fDelete); + } + $result_domain = db_delete ($table_domain,$fWhere,$fDelete); + + if (!$result_domain || !domain_postdeletion($fDelete)) + { + $error = 1; + $tMessage = $PALANG['pAdminDelete_domain_error']; + } + else + { + $url = "list-domain.php"; + header ("Location: $url"); + } +} # ($fTable == "domain") + +elseif ($fTable == "alias" or $fTable == "mailbox") +{ + if (!check_owner ($SESSID_USERNAME, $fDomain)) { $error = 1; @@ -58,7 +104,6 @@ else { if ($CONF['database_type'] == "pgsql") db_query('BEGIN'); - $result = db_query ("DELETE FROM $table_alias WHERE address='$fDelete' AND domain='$fDomain'"); if ($result['rows'] != 1) { @@ -70,46 +115,67 @@ db_log ($SESSID_USERNAME, $fDomain, 'delete_alias', $fDelete); } - $result = db_query ("SELECT * FROM $table_mailbox WHERE username='$fDelete' AND domain='$fDomain'"); - if ($result['rows'] == 1) + if (!$error) { - $result = db_query ("DELETE FROM $table_mailbox WHERE username='$fDelete' AND domain='$fDomain'"); - $postdel_res = mailbox_postdeletion($fDelete,$fDomain); - if ($result['rows'] != 1 || !$postdel_res) + $result = db_query ("SELECT * FROM $table_mailbox WHERE username='$fDelete' AND domain='$fDomain'"); + if ($result['rows'] == 1) { - $error = 1; - $tMessage = $PALANG['pDelete_delete_error'] . "<b>$fDelete</b> ("; - if ($result['rows']!=1) + $result = db_query ("DELETE FROM $table_mailbox WHERE username='$fDelete' AND domain='$fDomain'"); + $postdel_res=mailbox_postdeletion($fDelete,$fDomain); + if ($result['rows'] != 1 || !$postdel_res) { - $tMessage.='mailbox'; - if (!$postdel_res) $tMessage.=', '; + $error = 1; + $tMessage = $PALANG['pDelete_delete_error'] . "<b>$fDelete</b> ("; + if ($result['rows']!=1) + { + $tMessage.='mailbox'; + if (!$postdel_res) $tMessage.=', '; + } + if (!$postdel_res) + { + $tMessage.='post-deletion'; + } + $tMessage.=')</span>'; } - if (!$postdel_res) $tMessage.='post-deletion'; - $tMessage.=')</span>'; + else + { + db_query ("DELETE FROM $table_vacation WHERE email='$fDelete' AND domain='$fDomain'"); + db_log ($SESSID_USERNAME, $fDomain, 'delete_mailbox', $fDelete); + } } - else - { - db_query ("DELETE FROM $table_vacation WHERE email='$fDelete' AND domain='$fDomain'"); - db_log ($SESSID_USERNAME, $fDomain, 'delete_mailbox', $fDelete); - } } } if ($error != 1) { if ($CONF['database_type'] == "pgsql") db_query('COMMIT'); - header ("Location: overview.php?domain=$fDomain"); + $url = "overview.php"; + if (authentication_has_role('global-admin')) $url = "list-virtual.php"; + header ("Location: $url?domain=$fDomain"); exit; } else { $tMessage = $PALANG['pDelete_delete_error'] . "<b>$fDelete</b> (physical mail)!</span>"; if ($CONF['database_type'] == "pgsql") db_query('ROLLBACK'); } +} # ($fTable == "alias" or $fTable == "mailbox") + +else +{ + # unknown $fTable value + flash_error($PALANG['invalid_parameter']); } -include ("./templates/header.tpl"); -include ("./templates/menu.tpl"); -include ("./templates/message.tpl"); -include ("./templates/footer.tpl"); +include ("$incpath/templates/header.tpl"); + +if (authentication_has_role('global-admin')) { + include ("$incpath/templates/admin_menu.tpl"); +} else { + include ("$incpath/templates/menu.tpl"); +} + +include ("$incpath/templates/message.tpl"); +include ("$incpath/templates/footer.tpl"); + /* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ ?> Modified: trunk/templates/admin_list-admin.tpl =================================================================== --- trunk/templates/admin_list-admin.tpl 2007-10-26 06:13:46 UTC (rev 165) +++ trunk/templates/admin_list-admin.tpl 2007-10-30 00:18:53 UTC (rev 166) @@ -22,7 +22,7 @@ $active = ($admin_properties[$i]['active'] == 1) ? $PALANG['YES'] : $PALANG['NO']; print " <td><a href=\"edit-active-admin.php?username=" . $list_admins[$i] . "\">" . $active . "</a></td>"; print " <td><a href=\"edit-admin.php?username=" . $list_admins[$i] . "\">" . $PALANG['edit'] . "</a></td>"; - print " <td><a href=\"delete.php?table=admin&where=username&delete=" . $list_admins[$i] . "\" onclick=\"return confirm ('" . $PALANG['confirm'] . $PALANG['pAdminList_admin_username'] . ": " . $list_admins[$i] . "')\">" . $PALANG['del'] . "</a></td>"; + print " <td><a href=\"delete.php?table=admin&delete=" . $list_admins[$i] . "\" onclick=\"return confirm ('" . $PALANG['confirm'] . $PALANG['pAdminList_admin_username'] . ": " . $list_admins[$i] . "')\">" . $PALANG['del'] . "</a></td>"; print " </tr>\n"; } } Modified: trunk/templates/admin_list-domain.tpl =================================================================== --- trunk/templates/admin_list-domain.tpl 2007-10-26 06:13:46 UTC (rev 165) +++ trunk/templates/admin_list-domain.tpl 2007-10-30 00:18:53 UTC (rev 166) @@ -75,7 +75,7 @@ $active = ($domain_properties[$i]['active'] == 1) ? $PALANG['YES'] : $PALANG['NO']; print "<td><a href=\"edit-active-domain.php?domain=" . $list_domains[$i] . "\">" . $active . "</a></td>"; print "<td><a href=\"edit-domain.php?domain=" . $list_domains[$i] . "\">" . $PALANG['edit'] . "</a></td>"; - print "<td><a href=\"delete.php?table=domain&where=domain&delete=" . $list_domains[$i] . "\" onclick=\"return confirm ('" . $PALANG['confirm_domain'] . $PALANG['pAdminList_admin_domain'] . ": " . $list_domains[$i] . "')\">" . $PALANG['del'] . "</a></td>"; + print "<td><a href=\"delete.php?table=domain&delete=" . $list_domains[$i] . "\" onclick=\"return confirm ('" . $PALANG['confirm_domain'] . $PALANG['pAdminList_admin_domain'] . ": " . $list_domains[$i] . "')\">" . $PALANG['del'] . "</a></td>"; print "</tr>\n"; } } Modified: trunk/templates/overview.tpl =================================================================== --- trunk/templates/overview.tpl 2007-10-26 06:13:46 UTC (rev 165) +++ trunk/templates/overview.tpl 2007-10-30 00:18:53 UTC (rev 166) @@ -125,7 +125,7 @@ $active = ($tAlias[$i]['active'] == 1) ? $PALANG['YES'] : $PALANG['NO']; print " <td><a href=\"edit-active.php?alias=" . urlencode ($tAlias[$i]['address']) . "&domain=$fDomain" . "\">" . $active . "</a></td>\n"; print " <td><a href=\"edit-alias.php?address=" . urlencode ($tAlias[$i]['address']) . "&domain=$fDomain" . "\">" . $PALANG['edit'] . "</a></td>\n"; - print " <td><a href=\"delete.php?delete=" . urlencode ($tAlias[$i]['address']) . "&domain=$fDomain" . "\"onclick=\"return confirm ('" . $PALANG['confirm'] . $PALANG['pOverview_get_aliases'] . ": ". $tAlias[$i]['address'] . "')\">" . $PALANG['del'] . "</a></td>\n"; + print " <td><a href=\"delete.php?table=alias&delete=" . urlencode ($tAlias[$i]['address']) . "&domain=$fDomain" . "\"onclick=\"return confirm ('" . $PALANG['confirm'] . $PALANG['pOverview_get_aliases'] . ": ". $tAlias[$i]['address'] . "')\">" . $PALANG['del'] . "</a></td>\n"; } else { @@ -134,7 +134,7 @@ $active = ($tAlias[$i]['active'] == 1) ? $PALANG['YES'] : $PALANG['NO']; print " <td><a href=\"edit-active.php?alias=" . urlencode ($tAlias[$i]['address']) . "&domain=$fDomain" . "\">" . $active . "</a></td>\n"; print " <td><a href=\"edit-alias.php?address=" . urlencode ($tAlias[$i]['address']) . "&domain=$fDomain" . "\">" . $PALANG['edit'] . "</a></td>\n"; - print " <td><a href=\"delete.php?delete=" . urlencode ($tAlias[$i]['address']) . "&domain=$fDomain" . "\"onclick=\"return confirm ('" . $PALANG['confirm'] . $PALANG['pOverview_get_aliases'] . ": ". $tAlias[$i]['address'] . "')\">" . $PALANG['del'] . "</a></td>\n"; + print " <td><a href=\"delete.php?table=mailbox&delete=" . urlencode ($tAlias[$i]['address']) . "&domain=$fDomain" . "\"onclick=\"return confirm ('" . $PALANG['confirm'] . $PALANG['pOverview_get_aliases'] . ": ". $tAlias[$i]['address'] . "')\">" . $PALANG['del'] . "</a></td>\n"; } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-10-31 01:31:36
|
Revision: 167 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=167&view=rev Author: christian_boltz Date: 2007-10-30 18:31:37 -0700 (Tue, 30 Oct 2007) Log Message: ----------- stylesheet.css - added styles for CSS-based dropdown menu, based on "Son of Suckerfish" http://www.htmldog.com/articles/suckerfish/dropdowns/ menu.tpl - merged admin_menu.tpl into menu.tpl - changed menu layout: the "create ..." items are now submenu items Notes: - superadmins still see the old menu - dropdowns don't work in IE yet (requires some JS) Modified Paths: -------------- trunk/stylesheet.css trunk/templates/menu.tpl Modified: trunk/stylesheet.css =================================================================== --- trunk/stylesheet.css 2007-10-30 00:18:53 UTC (rev 166) +++ trunk/stylesheet.css 2007-10-31 01:31:37 UTC (rev 167) @@ -87,28 +87,66 @@ white-space: nowrap; } -#menu ul li { - display: inline; +#menu ul { + padding: 0; + margin: 0; + margin-left:auto; + margin-right:auto; + list-style: none; +} + +#menu li { + float: left; background: #efefef; - padding: 20px 5px 5px 5px; margin-right: 3px; border-top: 4px solid #aaaaaa; } -#menu ul li:hover { - background: #BFFF00; /* #F32121; */ - color: white; +#menu li:hover { + background: #BFFF00; } -#menu ul li a { +#menu li ul { + position: absolute; + width: auto; + left: -999em; + border:2px solid white; + border-top:none; +} +#menu li:hover ul { + left: auto; +} + + +#menu li ul li { + float: none; + margin-right: 0px; + border-top:2px solid white;; + text-align:left; +} + + + + +#menu a { + display: block; + width: auto; + padding: 20px 5px 5px 5px; color: #888888; } -#menu ul li a:hover { +#menu a:hover { color: #888888; } + +#menu li ul li a { + padding: 5px 5px 5px 5px; +} + + + #main_menu, #edit_form { width: 750px; margin: 0 auto; Modified: trunk/templates/menu.tpl =================================================================== --- trunk/templates/menu.tpl 2007-10-30 00:18:53 UTC (rev 166) +++ trunk/templates/menu.tpl 2007-10-31 01:31:37 UTC (rev 167) @@ -1,29 +1,84 @@ -<div id="menu"> -<ul> - <li><a target="_top" href="main.php"><?php print $PALANG['pMenu_main']; ?></a></li> - <li><a target="_top" href="overview.php"><?php print $PALANG['pMenu_overview']; ?></a></li> - <?php $url = "create-alias.php"; if (isset ($_GET['domain'])) $url .= "?domain=" . $_GET['domain']; ?> - <li><a target="_top" href="<?php print $url; ?>"><?php print $PALANG['pMenu_create_alias']; ?></a></li> - <?php $url = "create-mailbox.php"; if (isset ($_GET['domain'])) $url .= "?domain=" . $_GET['domain']; ?> - <li><a target="_top" href="<?php print $url; ?>"><?php print $PALANG['pMenu_create_mailbox']; ?></a></li> - <?php if ($CONF['fetchmail'] == "YES") { ?> - <li><a target="_top" href="fetchmail.php"><?php print $PALANG['pMenu_fetchmail']; ?></a></li> - <?php } ?> - <?php if ($CONF['sendmail'] == 'YES') { ?><li><a target="_top" href="sendmail.php"><?php print $PALANG['pMenu_sendmail']; ?></a></li><?php } ?> - <?php if ($CONF['vacation'] == "YES") { ?> - <li><a target="_top" href="edit-vacation.php"><?php print $PALANG['pUsersMenu_vacation']; ?></a></li> - <?php } ?> - <li><a target="_top" href="password.php"><?php print $PALANG['pMenu_password']; ?></a></li> - <li><a target="_top" href="viewlog.php"><?php print $PALANG['pMenu_viewlog']; ?></a></li> - <li><a target="_top" href="logout.php"><?php print $PALANG['pMenu_logout']; ?></a></li> -</ul> -</div> +<?php +function _menulink ($href, $title, $submenu = "") { + if ($submenu != "") $submenu = "<ul><li><a target='_top' href='$href'>$title</a>$submenu</li></ul>"; + return "<li><a target='_top' href='$href'>$title</a>$submenu</li>"; +} -<?php -if (file_exists (realpath ("motd.txt"))) +authentication_has_role('global-admin'); + +echo "<div id='menu'>\n"; +echo "<ul>\n"; + +$url = "create-mailbox.php"; if (isset ($_GET['domain'])) $url .= "?domain=" . $_GET['domain']; +$submenu_virtual = _menulink($url, $PALANG['pMenu_create_mailbox']); + +$url = "create-alias.php"; if (isset ($_GET['domain'])) $url .= "?domain=" . $_GET['domain']; +$submenu_virtual .= _menulink($url, $PALANG['pMenu_create_alias']); + +$submenu_admin = _menulink("create-admin.php", $PALANG['pAdminMenu_create_admin']); + +$submenu_fetchmail = _menulink("fetchmail.php?new=1", $PALANG['pFetchmail_new_entry']); + + +if (authentication_has_role('global-admin')) { + $submenu_domain = _menulink("create-domain.php", $PALANG['pAdminMenu_create_domain']); +} else { + $submenu_domain = ""; +} + +if (authentication_has_role('global-admin')) { + print _menulink("list-admin.php", $PALANG['pAdminMenu_list_admin'], $submenu_admin); + print _menulink("list-domain.php", $PALANG['pAdminMenu_list_domain'], $submenu_domain); + print _menulink("list-virtual.php", $PALANG['pAdminMenu_list_virtual'], $submenu_virtual); +} else { + print _menulink("main.php", $PALANG['pMenu_main']); + print _menulink("overview.php", $PALANG['pMenu_overview'], $submenu_virtual); +} + +if ($CONF['fetchmail'] == 'YES') { + print _menulink("fetchmail.php", $PALANG['pMenu_fetchmail'], $submenu_fetchmail); +} + +if ($CONF['sendmail'] == 'YES') { + print _menulink("sendmail.php", $PALANG['pMenu_sendmail']); +} + +# not really useful in the admin menu +#if ($CONF['vacation'] == 'YES') { +# print _menulink("edit-vacation.php", $PALANG['pUsersMenu_vacation']); +#} + +if (authentication_has_role('global-admin')) { + print _menulink("broadcast-message.php", $PALANG['pAdminMenu_broadcast_message']); +} + +print _menulink("password.php", $PALANG['pMenu_password']); + +if (authentication_has_role('global-admin') && 'pgsql'!=$CONF['database_type'] && $CONF['backup'] == 'YES') { + print _menulink("backup.php", $PALANG['pAdminMenu_backup']); +} + +print _menulink("viewlog.php", $PALANG['pMenu_viewlog']); + +print _menulink("logout.php", $PALANG['pMenu_logout']); + +echo "</ul>\n"; +echo "</div>\n"; + +print "<br clear='all' /><br>"; # TODO + +if (authentication_has_role('global-admin')) { + $motd_file = "motd-admin.txt"; +} else { + $motd_file = "motd.txt"; +} + +if (file_exists (realpath ($motd_file))) { print "<div id=\"motd\">\n"; - include ("motd.txt"); + include ($motd_file); print "</div>"; } + +/* vim: set ft=php expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-10-31 18:24:36
|
Revision: 168 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=168&view=rev Author: christian_boltz Date: 2007-10-31 11:24:40 -0700 (Wed, 31 Oct 2007) Log Message: ----------- Finally got rid of admin/ :-) - moved admin-only scripts from admin/ to / - removed all merged files ("require('../$file')") from admin/ - changed include paths - no more admin/superadmin switching needed - admin_menu.tpl is also gone - removed all menu.tpl / admin_menu.tpl switches - no more needed - admin/index.php still exists and redirects to / Modified Paths: -------------- trunk/admin/index.php trunk/create-alias.php trunk/create-mailbox.php trunk/delete.php trunk/edit-active.php trunk/edit-alias.php trunk/edit-mailbox.php trunk/edit-vacation.php trunk/login.php trunk/search.php trunk/viewlog.php Added Paths: ----------- trunk/backup.php trunk/broadcast-message.php trunk/create-admin.php trunk/create-domain.php trunk/edit-active-admin.php trunk/edit-active-domain.php trunk/edit-admin.php trunk/edit-domain.php trunk/list-admin.php trunk/list-domain.php trunk/list-virtual.php Removed Paths: ------------- trunk/admin/backup.php trunk/admin/broadcast-message.php trunk/admin/create-admin.php trunk/admin/create-alias.php trunk/admin/create-domain.php trunk/admin/create-mailbox.php trunk/admin/delete.php trunk/admin/edit-active-admin.php trunk/admin/edit-active-domain.php trunk/admin/edit-active.php trunk/admin/edit-admin.php trunk/admin/edit-alias.php trunk/admin/edit-domain.php trunk/admin/edit-mailbox.php trunk/admin/edit-vacation.php trunk/admin/list-admin.php trunk/admin/list-domain.php trunk/admin/list-virtual.php trunk/admin/main.php trunk/admin/search.php trunk/admin/viewlog.php trunk/templates/admin_menu.tpl Deleted: trunk/admin/backup.php =================================================================== --- trunk/admin/backup.php 2007-10-31 01:31:37 UTC (rev 167) +++ trunk/admin/backup.php 2007-10-31 18:24:40 UTC (rev 168) @@ -1,118 +0,0 @@ -<?php -/** - * Postfix Admin - * - * LICENSE - * This source file is subject to the GPL license that is bundled with - * this package in the file LICENSE.TXT. - * - * Further details on the project are available at : - * http://www.postfixadmin.com or http://postfixadmin.sf.net - * - * @version $Id$ - * @license GNU GPL v2 or later. - * - * File: backup.php - * Used to save all settings - but only works for MySQL databases. - * Template File: -none- - * - * Template Variables: -none- - * - * Form POST \ GET Variables: -none- - */ - -require_once('../common.php'); - -authentication_require_role('global-admin'); - -(($CONF['backup'] == 'NO') ? header("Location: " . $CONF['postfix_admin_url'] . "/main.php") && exit : '1'); - -// TODO: make backup supported for postgres -if ('pgsql'==$CONF['database_type']) -{ - print '<p>Sorry: Backup is currently not supported for your DBMS.</p>'; -} -/* - SELECT attnum,attname,typname,atttypmod-4,attnotnull,atthasdef,adsrc - AS def FROM pg_attribute,pg_class,pg_type,pg_attrdef - WHERE pg_class.oid=attrelid AND pg_type.oid=atttypid - AND attnum>0 AND pg_class.oid=adrelid AND adnum=attnum AND atthasdef='t' AND lower(relname)='admin' - UNION SELECT attnum,attname,typname,atttypmod-4,attnotnull,atthasdef,'' - AS def FROM pg_attribute,pg_class,pg_type - WHERE pg_class.oid=attrelid - AND pg_type.oid=atttypid - AND attnum>0 - AND atthasdef='f' - AND lower(relname)='admin' -$db = $_GET['db']; -$cmd = "pg_dump -c -D -f /tix/miner/miner.sql -F p -N -U postgres $db"; -$res = `$cmd`; -// Alternate: $res = shell_exec($cmd); -echo $res; -*/ - -if ($_SERVER['REQUEST_METHOD'] == "GET") -{ - umask (077); - $path = (ini_get('upload_tmp_dir') != '') ? ini_get('upload_tmp_dir') : '/tmp/'; - $filename = "postfixadmin-" . date ("Ymd") . "-" . getmypid() . ".sql"; - $backup = $path . $filename; - - $header = "#\n# Postfix Admin $version\n# Date: " . date ("D M j G:i:s T Y") . "\n#\n"; - - if (!$fh = fopen ($backup, 'w')) - { - $tMessage = "<div class=\"error_msg\">Cannot open file ($backup)</div>"; - include ("../templates/header.tpl"); - include ("../templates/admin_menu.tpl"); - include ("../templates/message.tpl"); - include ("../templates/footer.tpl"); - } - else - { - fwrite ($fh, $header); - - $tables = array('admin','alias','domain','domain_admins','log','mailbox','vacation'); - - for ($i = 0 ; $i < sizeof ($tables) ; ++$i) - { - $result = db_query ("SHOW CREATE TABLE ".table_by_pos($i)); - if ($result['rows'] > 0) - { - while ($row = db_array ($result['result'])) - { - fwrite ($fh, "$row[1];\n\n"); - } - } - } - - for ($i = 0 ; $i < sizeof ($tables) ; ++$i) - { - $result = db_query ("SELECT * FROM ".table_by_pos($i)); - if ($result['rows'] > 0) - { - while ($row = db_assoc ($result['result'])) - { - foreach ($row as $key=>$val) - { - $fields[] = $key; - $values[] = $val; - } - - fwrite ($fh, "INSERT INTO ". $tables[$i] . " (". implode (',',$fields) . ") VALUES ('" . implode ('\',\'',$values) . "');\n"); - $fields = ""; - $values = ""; - } - } - } - } - header ("Content-Type: application/octet-stream"); - header ("Content-Disposition: attachment; filename=\"$filename\""); - header ("Content-Transfer-Encoding: binary"); - header ("Content-Length: " . filesize("$backup")); - header ("Content-Description: Postfix Admin"); - $download_backup = fopen ("$backup", "r"); - unlink ("$backup"); - fpassthru ($download_backup); -} -?> Deleted: trunk/admin/broadcast-message.php =================================================================== --- trunk/admin/broadcast-message.php 2007-10-31 01:31:37 UTC (rev 167) +++ trunk/admin/broadcast-message.php 2007-10-31 18:24:40 UTC (rev 168) @@ -1,92 +0,0 @@ -<?php -/** - * Postfix Admin - * - * LICENSE - * This source file is subject to the GPL license that is bundled with - * this package in the file LICENSE.TXT. - * - * Further details on the project are available at : - * http://www.postfixadmin.com or http://postfixadmin.sf.net - * - * @version $Id$ - * @license GNU GPL v2 or later. - * - * File: broadcast-message.php - * Used to send a message to _ALL_ users with mailboxes on this server. - * - * Template File: broadcast-message.tpl - * - * Template Variables: -none- - * - * Form POST \ GET Variables: - * - * name - * subject - * message - */ - -require_once('../common.php'); - -authentication_require_role('global-admin'); - -$SESSID_USERNAME = authentication_get_username(); - -if ($_SERVER['REQUEST_METHOD'] == "POST") -{ - if (empty($_POST['subject']) || empty($_POST['message']) || empty($_POST['name'])) - { - $error = 1; - } - else - { - $q = 'select username from mailbox union '. - 'select goto from alias '. - 'where goto not in (select username from mailbox)'; - - $result = db_query ($q); - if ($result['rows'] > 0) - { - $b_name = mb_encode_mimeheader( $_POST['name'], 'UTF-8', 'Q'); - $b_subject = mb_encode_mimeheader( $_POST['subject'], 'UTF-8', 'Q'); - $b_message = encode_base64($_POST['message']); - - $i = 0; - while ($row = db_array ($result['result'])) { - $fTo = $row[0]; - $fHeaders = 'To: ' . $fTo . "\n"; - $fHeaders .= 'From: ' . $b_name . ' <' . $CONF['admin_email'] . ">\n"; - $fHeaders .= 'Subject: ' . $b_subject . "\n"; - $fHeaders .= 'MIME-Version: 1.0' . "\n"; - $fHeaders .= 'Content-Type: text/plain; charset=UTF-8' . "\n"; - $fHeaders .= 'Content-Transfer-Encoding: base64' . "\n"; - - $fHeaders .= $b_message; - - if (!smtp_mail ($fTo, $CONF['admin_email'], $fHeaders)) - { - $tMessage .= "<br />" . $PALANG['pSendmail_result_error'] . "<br />"; - } - else - { - $tMessage .= "<br />" . $PALANG['pSendmail_result_success'] . "<br />"; - } - } - } - include ("../templates/header.tpl"); - include ("../templates/admin_menu.tpl"); - echo '<p>'.$PALANG['pBroadcast_success'].'</p>'; - include ("../templates/footer.tpl"); - } -} - -if ($_SERVER['REQUEST_METHOD'] == "GET" || $error == 1) -{ - include ("../templates/header.tpl"); - include ("../templates/admin_menu.tpl"); - include ("../templates/broadcast-message.tpl"); - include ("../templates/footer.tpl"); -} - -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ -?> Deleted: trunk/admin/create-admin.php =================================================================== --- trunk/admin/create-admin.php 2007-10-31 01:31:37 UTC (rev 167) +++ trunk/admin/create-admin.php 2007-10-31 18:24:40 UTC (rev 168) @@ -1,73 +0,0 @@ -<?php -/** - * Postfix Admin - * - * LICENSE - * This source file is subject to the GPL license that is bundled with - * this package in the file LICENSE.TXT. - * - * Further details on the project are available at : - * http://www.postfixadmin.com or http://postfixadmin.sf.net - * - * @version $Id$ - * @license GNU GPL v2 or later. - * - * File: create-admin.php - * Used to create new administrators. - * Template File: admin_create-admin.tpl - * - * - * Template Variables: - * - * tMessage - * tUsername - * tDomains - * - * Form POST \ GET Variables: - * - * fUsername - * fPassword - * fPassword2 - * fDomains - */ - -require_once('../common.php'); - -authentication_require_role('global-admin'); - -$list_domains = list_domains (); -$tDomains = array(); - -if ($_SERVER['REQUEST_METHOD'] == "GET") -{ - $pAdminCreate_admin_username_text = $PALANG['pAdminCreate_admin_username_text']; - $tDomains = array (); - - include ("../templates/header.tpl"); - include ("../templates/admin_menu.tpl"); - include ("../templates/admin_create-admin.tpl"); - include ("../templates/footer.tpl"); -} - -if ($_SERVER['REQUEST_METHOD'] == "POST") -{ - if (isset ($_POST['fUsername'])) $fUsername = escape_string ($_POST['fUsername']); - if (isset ($_POST['fPassword'])) $fPassword = escape_string ($_POST['fPassword']); - if (isset ($_POST['fPassword2'])) $fPassword2 = escape_string ($_POST['fPassword2']); - $fDomains = array(); - if (!empty ($_POST['fDomains'])) $fDomains = $_POST['fDomains']; - - list ($error, $tMessage, $pAdminCreate_admin_username_text, $pAdminCreate_admin_password_text) = create_admin($fUsername, $fPassword, $fPassword2, $fDomains); - - if ($error != 0) { - if (isset ($_POST['fUsername'])) $tUsername = escape_string ($_POST['fUsername']); - if (isset ($_POST['fDomains'])) $tDomains = $_POST['fDomains']; - } - - include ("../templates/header.tpl"); - include ("../templates/admin_menu.tpl"); - include ("../templates/admin_create-admin.tpl"); - include ("../templates/footer.tpl"); -} -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ -?> Deleted: trunk/admin/create-alias.php =================================================================== --- trunk/admin/create-alias.php 2007-10-31 01:31:37 UTC (rev 167) +++ trunk/admin/create-alias.php 2007-10-31 18:24:40 UTC (rev 168) @@ -1,3 +0,0 @@ -<?php -require ("../create-alias.php"); -?> Deleted: trunk/admin/create-domain.php =================================================================== --- trunk/admin/create-domain.php 2007-10-31 01:31:37 UTC (rev 167) +++ trunk/admin/create-domain.php 2007-10-31 18:24:40 UTC (rev 168) @@ -1,129 +0,0 @@ -<?php -/** - * Postfix Admin - * - * LICENSE - * This source file is subject to the GPL license that is bundled with - * this package in the file LICENSE.TXT. - * - * Further details on the project are available at : - * http://www.postfixadmin.com or http://postfixadmin.sf.net - * - * @version $Id$ - * @license GNU GPL v2 or later. - * - * File: create-domain.php - * Allows administrators to create new domains. - * Template File: admin_create-domain.tpl - * - * Template Variables: - * - * tMessage - * tDomain - * tDescription - * tAliases - * tMailboxes - * tMaxquota - * tDefaultaliases - * - * Form POST \ GET Variables: - * - * fDomain - * fDescription - * fAliases - * fMailboxes - * fMaxquota - * fDefaultaliases - */ - -require_once('../common.php'); - -authentication_require_role('global-admin'); - - -if ($_SERVER['REQUEST_METHOD'] == "GET") -{ - $tAliases = $CONF['aliases']; - $tMailboxes = $CONF['mailboxes']; - $tMaxquota = $CONF['maxquota']; - $tTransport = $CONF['transport_default']; - - include ("../templates/header.tpl"); - include ("../templates/admin_menu.tpl"); - include ("../templates/admin_create-domain.tpl"); - include ("../templates/footer.tpl"); -} - -if ($_SERVER['REQUEST_METHOD'] == "POST") -{ - if (isset ($_POST['fDomain'])) $fDomain = escape_string ($_POST['fDomain']); - foreach(array('fDescription' => '', 'fAliases' => '0', 'fMailboxes' => '0', - 'fMaxquota' => '0', 'fTransport' => 'virtual', - 'fDefaultaliases' => '0', 'fBackupmx' => '0') as $key => $default) { - if(isset($_POST[$key]) && !empty($POST[$key])) { - $$key = escape_string($_POST[$key]); - } - $$key = $default; - } - - if (empty ($fDomain) or domain_exist ($fDomain) or !check_domain ($fDomain)) - { - $error = 1; - $tDomain = escape_string ($_POST['fDomain']); - $tDescription = escape_string ($_POST['fDescription']); - $tAliases = escape_string ($_POST['fAliases']); - $tMailboxes = escape_string ($_POST['fMailboxes']); - if (isset ($_POST['fMaxquota'])) $tMaxquota = escape_string ($_POST['fMaxquota']); - if (isset ($_POST['fTransport'])) $tTransport = escape_string ($_POST['fTransport']); - if (isset ($_POST['fDefaultaliases'])) $tDefaultaliases = escape_string ($_POST['fDefaultaliases']); - if (isset ($_POST['fBackupmx'])) $tBackupmx = escape_string ($_POST['fBackupmx']); - if (domain_exist ($fDomain)) $pAdminCreate_domain_domain_text = $PALANG['pAdminCreate_domain_domain_text_error']; - if (empty ($fDomain) or !check_domain ($fDomain)) $pAdminCreate_domain_domain_text = $PALANG['pAdminCreate_domain_domain_text_error2']; - } - - if ($error != 1) - { - $tAliases = $CONF['aliases']; - $tMailboxes = $CONF['mailboxes']; - $tMaxquota = $CONF['maxquota']; - - if ($fBackupmx == "on") - { - $fAliases = -1; - $fMailboxes = -1; - $fMaxquota = -1; - $fBackupmx = 1; - $sqlBackupmx = ('pgsql'==$CONF['database_type']) ? 'true' : 1; - } - else - { - $fBackupmx = 0; - $sqlBackupmx = ('pgsql'==$CONF['database_type']) ? 'false' : 0; - } - $sql_query = "INSERT INTO $table_domain (domain,description,aliases,mailboxes,maxquota,transport,backupmx,created,modified) VALUES ('$fDomain','$fDescription',$fAliases,$fMailboxes,$fMaxquota,'$fTransport',$sqlBackupmx,NOW(),NOW())"; - $result = db_query($sql_query); - if ($result['rows'] != 1) - { - $tMessage = $PALANG['pAdminCreate_domain_result_error'] . "<br />($fDomain)<br />"; - } - else - { - if ($fDefaultaliases == "on") - { - foreach ($CONF['default_aliases'] as $address=>$goto) - { - $address = $address . "@" . $fDomain; - $result = db_query ("INSERT INTO $table_alias (address,goto,domain,created,modified) VALUES ('$address','$goto','$fDomain',NOW(),NOW())"); - } - } - $tMessage = $PALANG['pAdminCreate_domain_result_success'] . "<br />($fDomain)</br />"; - } - } - - include ("../templates/header.tpl"); - include ("../templates/admin_menu.tpl"); - include ("../templates/admin_create-domain.tpl"); - include ("../templates/footer.tpl"); -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ -} -?> Deleted: trunk/admin/create-mailbox.php =================================================================== --- trunk/admin/create-mailbox.php 2007-10-31 01:31:37 UTC (rev 167) +++ trunk/admin/create-mailbox.php 2007-10-31 18:24:40 UTC (rev 168) @@ -1,3 +0,0 @@ -<?php -require ("../create-mailbox.php"); -?> Deleted: trunk/admin/delete.php =================================================================== --- trunk/admin/delete.php 2007-10-31 01:31:37 UTC (rev 167) +++ trunk/admin/delete.php 2007-10-31 18:24:40 UTC (rev 168) @@ -1,3 +0,0 @@ -<?php -require('../delete.php'); -?> Deleted: trunk/admin/edit-active-admin.php =================================================================== --- trunk/admin/edit-active-admin.php 2007-10-31 01:31:37 UTC (rev 167) +++ trunk/admin/edit-active-admin.php 2007-10-31 18:24:40 UTC (rev 168) @@ -1,69 +0,0 @@ -<?php -/** - * Postfix Admin - * - * LICENSE - * This source file is subject to the GPL license that is bundled with - * this package in the file LICENSE.TXT. - * - * Further details on the project are available at : - * http://www.postfixadmin.com or http://postfixadmin.sf.net - * - * @version $Id$ - * @license GNU GPL v2 or later. - * - * File: edit-active-admin.php - * Edit an active administrator. This is used as a 'toggle' page from list-admin. - * - * Template File: message.tpl - * - * Template Variables: - * - * tMessage - * - * Form POST \ GET Variables: - * - * fUsername - */ - -require_once('../common.php'); - -authentication_require_role('global-admin'); - -if ($_SERVER['REQUEST_METHOD'] == "GET") -{ - if (isset ($_GET['username'])) $fUsername = escape_string ($_GET['username']); - - $sqlSet='active=1-active'; - if ('pgsql'==$CONF['database_type']) $sqlSet='active=NOT active'; - - $result = db_query ("UPDATE $table_admin SET $sqlSet,modified=NOW() WHERE username='$fUsername'"); - if ($result['rows'] != 1) - { - $error = 1; - $tMessage = $PALANG['pAdminEdit_admin_result_error']; - } - - if ($error != 1) - { - header ("Location: list-admin.php"); - exit; - } - - include ("../templates/header.tpl"); - include ("../templates/admin_menu.tpl"); - include ("../templates/message.tpl"); - include ("../templates/footer.tpl"); -} - -if ($_SERVER['REQUEST_METHOD'] == "POST") -{ - include ("../templates/header.tpl"); - include ("../templates/admin_menu.tpl"); - include ("../templates/message.tpl"); - include ("../templates/footer.tpl"); -} - -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ - -?> Deleted: trunk/admin/edit-active-domain.php =================================================================== --- trunk/admin/edit-active-domain.php 2007-10-31 01:31:37 UTC (rev 167) +++ trunk/admin/edit-active-domain.php 2007-10-31 18:24:40 UTC (rev 168) @@ -1,67 +0,0 @@ -<?php -/** - * Postfix Admin - * - * LICENSE - * This source file is subject to the GPL license that is bundled with - * this package in the file LICENSE.TXT. - * - * Further details on the project are available at : - * http://www.postfixadmin.com or http://postfixadmin.sf.net - * - * @version $Id$ - * @license GNU GPL v2 or later. - * - * File: edit-active-domain.php - * Responsible for toggling the status of a domain - * Template File: message.tpl - * - * Template Variables: - * - * tMessage - * - * Form POST \ GET Variables: - * - * fDomain - */ - -require_once('../common.php'); - -authentication_require_role('global-admin'); - -if ($_SERVER['REQUEST_METHOD'] == "GET") -{ - if (isset ($_GET['domain'])) $fDomain = escape_string ($_GET['domain']); - - $sqlSet='active=1-active'; - if ('pgsql'==$CONF['database_type']) $sqlSet='active=NOT active'; - - $result = db_query ("UPDATE $table_domain SET $sqlSet,modified=NOW() WHERE domain='$fDomain'"); - if ($result['rows'] != 1) - { - $error = 1; - $tMessage = $PALANG['pAdminEdit_domain_result_error']; - } - - if ($error != 1) - { - header ("Location: list-domain.php"); - exit; - } - - include ("../templates/header.tpl"); - include ("../templates/admin_menu.tpl"); - include ("../templates/message.tpl"); - include ("../templates/footer.tpl"); -} - -if ($_SERVER['REQUEST_METHOD'] == "POST") -{ - include ("../templates/header.tpl"); - include ("../templates/admin_menu.tpl"); - include ("../templates/message.tpl"); - include ("../templates/footer.tpl"); -} - -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ -?> Deleted: trunk/admin/edit-active.php =================================================================== --- trunk/admin/edit-active.php 2007-10-31 01:31:37 UTC (rev 167) +++ trunk/admin/edit-active.php 2007-10-31 18:24:40 UTC (rev 168) @@ -1,3 +0,0 @@ -<?php -require("../edit-active.php"); -?> Deleted: trunk/admin/edit-admin.php =================================================================== --- trunk/admin/edit-admin.php 2007-10-31 01:31:37 UTC (rev 167) +++ trunk/admin/edit-admin.php 2007-10-31 18:24:40 UTC (rev 168) @@ -1,152 +0,0 @@ -<?php -/** - * Postfix Admin - * - * LICENSE - * This source file is subject to the GPL license that is bundled with - * this package in the file LICENSE.TXT. - * - * Further details on the project are available at : - * http://www.postfixadmin.com or http://postfixadmin.sf.net - * - * @version $Id$ - * @license GNU GPL v2 or later. - * - * File: edit-admin.php - * Edits a normal administrator's details. - * - * Template File: admin_edit-admin.tpl - * - * Template Variables: - * - * tAllDomains - * tDomains - * tActive - * tSadmin - * - * Form POST \ GET Variables: - * - * fDescription - * fAliases - * fMailboxes - * fMaxquota - * fActive - */ - -require_once('../common.php'); - -authentication_require_role('global-admin'); - -$error = 1; -if(isset($_GET['username'])) { - $username = escape_string ($_GET['username']); - $result = db_query("SELECT * FROM $table_admin WHERE username = '$username'"); - if($result['rows'] == 1) { - $admin_details = db_array($result['result']); - $error = 0; - } -} -if($error == 1){ - flash_error($PALANG['pAdminEdit_admin_result_error']); - header("Location: list-admin.php"); - exit(0); -} - -// we aren't ensuring the password is longer than x characters, should we? -if ($_SERVER['REQUEST_METHOD'] == "POST") -{ - $fPassword = ''; - $fPassword2 = ''; - if(isset ($_POST['fPassword'])) $fPassword = escape_string ($_POST['fPassword']); - if(isset ($_POST['fPassword2'])) $fPassword2 = escape_string ($_POST['fPassword2']); - - - $fActive=(isset($_POST['fActive'])) ? escape_string ($_POST['fActive']) : FALSE; - $fSadmin=(isset($_POST['fSadmin'])) ? escape_string ($_POST['fSadmin']) : FALSE; - - $fDomains = false; - if (isset ($_POST['fDomains'])) $fDomains = $_POST['fDomains']; - - $tAllDomains = list_domains (); - - // has the password changed? - $originalPassword = $admin_details['password']; - if($fPassword != '') { - if($fPassword != $originalPassword) { - // if it has, ensure both fields are the same... - if ($fPassword == $fPassword2) - { - if(strlen($fPassword) >= $CONF['min_password_length']) { - $fPassword = pacrypt($fPassword); - } - else { - $error = 1; - flash_error(sprintf($PALANG['pPasswordTooShort'], $CONF['min_password_length'])); - } - } - else { - $error = 1; - $pAdminEdit_admin_password_text = $PALANG['pAdminEdit_admin_password_text_error']; - } - } - } - $fDomains = array(); - if (array_key_exists('fDomains', $_POST)) $fDomains = escape_string ($_POST['fDomains']); - if ($error != 1) - { - if ($fActive == "on") { - $sqlActive = db_get_boolean(True); - } - else { - $sqlActive = db_get_boolean(False); - } - - $result = db_query ("UPDATE $table_admin SET modified=NOW(),active='$sqlActive',password='$fPassword' WHERE username='$username'"); - - if ($fSadmin == "on") $fSadmin = 'ALL'; - - // delete everything, and put it back later on.. - db_query("DELETE FROM $table_domain_admins WHERE username = '$username'"); - if($fSadmin == 'ALL') { - $fDomains = array('ALL'); - } - - foreach($fDomains as $domain) - { - $result = db_query ("INSERT INTO $table_domain_admins (username,domain,created) VALUES ('$username','$domain',NOW())"); - } - flash_info($PALANG['pAdminEdit_admin_result_success']); - header("Location: list-admin.php"); - exit(0); - } - else { - flash_error($PALANG['pAdminEdit_admin_result_error']); - } -} -if (isset($_GET['username'])) $username = escape_string ($_GET['username']); - -$tAllDomains = list_domains(); -$tDomains = list_domains_for_admin ($username); -$tActive = ''; -$tPassword = $admin_details['password']; - -if($admin_details['active'] == 't' || $admin_details['active'] == 1) { - $tActive = $admin_details['active']; -} -$tSadmin = '0'; -$result = db_query ("SELECT * FROM $table_domain_admins WHERE username='$username'"); -// could/should be multiple matches to query; -if ($result['rows'] >= 1) { - $result = $result['result']; - while($row = db_array($result)) { - if ($row['domain'] == 'ALL') { - $tSadmin = '1'; - $tDomains = array(); /* empty the list, they're an admin */ - } - } -} - -include ("../templates/header.tpl"); -include ("../templates/admin_menu.tpl"); -include ("../templates/admin_edit-admin.tpl"); -include ("../templates/footer.tpl"); Deleted: trunk/admin/edit-alias.php =================================================================== --- trunk/admin/edit-alias.php 2007-10-31 01:31:37 UTC (rev 167) +++ trunk/admin/edit-alias.php 2007-10-31 18:24:40 UTC (rev 168) @@ -1,3 +0,0 @@ -<?php -require("../edit-alias.php"); -?> Deleted: trunk/admin/edit-domain.php =================================================================== --- trunk/admin/edit-domain.php 2007-10-31 01:31:37 UTC (rev 167) +++ trunk/admin/edit-domain.php 2007-10-31 18:24:40 UTC (rev 168) @@ -1,118 +0,0 @@ -<?php -/** - * Postfix Admin - * - * LICENSE - * This source file is subject to the GPL license that is bundled with - * this package in the file LICENSE.TXT. - * - * Further details on the project are available at : - * http://www.postfixadmin.com or http://postfixadmin.sf.net - * - * @version $Id$ - * @license GNU GPL v2 or later. - * - * File: edit-domain.php - * Updates the properties of a domain. - * Template File: admin_edit-domain.tpl - * - * Template Variables: - * - * tDescription - * tAliases - * tMailboxes - * tMaxquota - * tActive - * - * Form POST \ GET Variables: - * - * fDescription - * fAliases - * fMailboxes - * fMaxquota - * fActive - */ - -require_once('../common.php'); - -authentication_require_role('global-admin'); - -if ($_SERVER['REQUEST_METHOD'] == "GET") -{ - if (isset ($_GET['domain'])) - { - $domain = escape_string ($_GET['domain']); - $domain_properties = get_domain_properties ($domain); - - $tDescription = $domain_properties['description']; - $tAliases = $domain_properties['aliases']; - $tMailboxes = $domain_properties['mailboxes']; - $tMaxquota = $domain_properties['maxquota']; - $tTransport = $domain_properties['transport']; - $tBackupmx = $domain_properties['backupmx']; - $tActive = $domain_properties['active']; - } - - include ("../templates/header.tpl"); - include ("../templates/admin_menu.tpl"); - include ("../templates/admin_edit-domain.tpl"); - include ("../templates/footer.tpl"); -} - -if ($_SERVER['REQUEST_METHOD'] == "POST") -{ - if (isset ($_GET['domain'])) $domain = escape_string ($_GET['domain']); - - if (isset ($_POST['fDescription'])) $fDescription = escape_string ($_POST['fDescription']); - if (isset ($_POST['fAliases'])) $fAliases = intval($_POST['fAliases']); - if (isset ($_POST['fMailboxes'])) $fMailboxes = intval($_POST['fMailboxes']); - if (isset ($_POST['fMaxquota'])) { - $fMaxquota = intval($_POST['fMaxquota']); - } else { - $fMaxquota = 0; - } - if (isset ($_POST['fTransport'])) $fTransport = escape_string ($_POST['fTransport']); - if (isset ($_POST['fBackupmx'])) $fBackupmx = escape_string ($_POST['fBackupmx']); - if (isset ($_POST['fActive'])) $fActive = escape_string ($_POST['fActive']); - - if ($fBackupmx == "on") - { - $fAliases = -1; - $fMailboxes = -1; - $fMaxquota = -1; - $fBackupmx = 1; - $sqlBackupmx = db_get_boolean(True); - } - else - { - $fBackupmx = 0; - $sqlBackupmx = db_get_boolean(False); - } - - if ($fActive == "on") { - $sqlActive = db_get_boolean(True); - } - else { - $sqlActive = db_get_boolean(False); - } - - - $result = db_query ("UPDATE $table_domain SET description='$fDescription',aliases=$fAliases,mailboxes=$fMailboxes,maxquota=$fMaxquota,transport='$fTransport',backupmx='$sqlBackupmx',active='$sqlActive',modified=NOW() WHERE domain='$domain'"); - if ($result['rows'] == 1) - { - header ("Location: list-domain.php"); - exit; - } - else - { - $tMessage = $PALANG['pAdminEdit_domain_result_error']; - } - - include ("../templates/header.tpl"); - include ("../templates/admin_menu.tpl"); - include ("../templates/admin_edit-domain.tpl"); - include ("../templates/footer.tpl"); -} - -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ -?> Deleted: trunk/admin/edit-mailbox.php =================================================================== --- trunk/admin/edit-mailbox.php 2007-10-31 01:31:37 UTC (rev 167) +++ trunk/admin/edit-mailbox.php 2007-10-31 18:24:40 UTC (rev 168) @@ -1,3 +0,0 @@ -<?php -require("../edit-mailbox.php"); -?> Deleted: trunk/admin/edit-vacation.php =================================================================== --- trunk/admin/edit-vacation.php 2007-10-31 01:31:37 UTC (rev 167) +++ trunk/admin/edit-vacation.php 2007-10-31 18:24:40 UTC (rev 168) @@ -1,3 +0,0 @@ -<?php -require ("../edit-vacation.php"); -?> Modified: trunk/admin/index.php =================================================================== --- trunk/admin/index.php 2007-10-31 01:31:37 UTC (rev 167) +++ trunk/admin/index.php 2007-10-31 18:24:40 UTC (rev 168) @@ -1,4 +1,4 @@ <?php -header ("Location: list-admin.php"); +header ("Location: ../login.php"); exit(0); ?> Deleted: trunk/admin/list-admin.php =================================================================== --- trunk/admin/list-admin.php 2007-10-31 01:31:37 UTC (rev 167) +++ trunk/admin/list-admin.php 2007-10-31 18:24:40 UTC (rev 168) @@ -1,50 +0,0 @@ -<?php -/** - * Postfix Admin - * - * LICENSE - * This source file is subject to the GPL license that is bundled with - * this package in the file LICENSE.TXT. - * - * Further details on the project are available at : - * http://www.postfixadmin.com or http://postfixadmin.sf.net - * - * @version $Id$ - * @license GNU GPL v2 or later. - * - * File: list-admin.php - * Lists all administrators - * Template File: list-admin.tpl - * - * Template Variables: -none- - * - * Form POST \ GET Variables: -none- - */ - -require_once("../common.php"); - -authentication_require_role('global-admin'); - -$list_admins = list_admins(); -if ((is_array ($list_admins) and sizeof ($list_admins) > 0)) { - for ($i = 0; $i < sizeof ($list_admins); $i++) { - $admin_properties[$i] = get_admin_properties ($list_admins[$i]); - } -} - -if ($_SERVER['REQUEST_METHOD'] == "GET") -{ - include ("../templates/header.tpl"); - include ("../templates/admin_menu.tpl"); - include ("../templates/admin_list-admin.tpl"); - include ("../templates/footer.tpl"); -} - -if ($_SERVER['REQUEST_METHOD'] == "POST") -{ - include ("../templates/header.tpl"); - include ("../templates/admin_menu.tpl"); - include ("../templates/admin_list-admin.tpl"); - include ("../templates/footer.tpl"); -} -?> Deleted: trunk/admin/list-domain.php =================================================================== --- trunk/admin/list-domain.php 2007-10-31 01:31:37 UTC (rev 167) +++ trunk/admin/list-domain.php 2007-10-31 18:24:40 UTC (rev 168) @@ -1,83 +0,0 @@ -<?php -/** - * Postfix Admin - * - * LICENSE - * This source file is subject to the GPL license that is bundled with - * this package in the file LICENSE.TXT. - * - * Further details on the project are available at : - * http://www.postfixadmin.com or http://postfixadmin.sf.net - * - * @version $Id$ - * @license GNU GPL v2 or later. - * - * File: list-domain.php - * List all domains as a quick overview. - * Template File: admin_list-domain.tpl - * - * Template Variables: - * - * -none- - * - * Form POST \ GET Variables: - * - * fUsername - */ - -require_once('../common.php'); - -authentication_require_role('global-admin'); - -$list_admins = list_admins (); - -if ($_SERVER['REQUEST_METHOD'] == "GET") { - if (isset ($_GET['username'])) { - $fUsername = escape_string ($_GET['username']); - $list_domains = list_domains_for_admin ($fUsername); - if ($list_domains != 0) - { - for ($i = 0; $i < sizeof ($list_domains); $i++) - { - $domain_properties[$i] = get_domain_properties ($list_domains[$i]); - } - } - } - else - { - $list_domains = list_domains (); - if ((is_array ($list_domains) and sizeof ($list_domains) > 0)) - for ($i = 0; $i < sizeof ($list_domains); $i++) - { - $domain_properties[$i] = get_domain_properties ($list_domains[$i]); - } - } - - include ("../templates/header.tpl"); - include ("../templates/admin_menu.tpl"); - include ("../templates/admin_list-domain.tpl"); - include ("../templates/footer.tpl"); -} - -if ($_SERVER['REQUEST_METHOD'] == "POST") -{ - if (isset ($_POST['fUsername'])) - { - $fUsername = escape_string ($_POST['fUsername']); - $list_domains = list_domains_for_admin ($fUsername); - } - - if (!empty ($list_domains)) - { - for ($i = 0; $i < sizeof ($list_domains); $i++) - { - $domain_properties[$i] = get_domain_properties ($list_domains[$i]); - } - } - - include ("../templates/header.tpl"); - include ("../templates/admin_menu.tpl"); - include ("../templates/admin_list-domain.tpl"); - include ("../templates/footer.tpl"); -} -?> Deleted: trunk/admin/list-virtual.php =================================================================== --- trunk/admin/list-virtual.php 2007-10-31 01:31:37 UTC (rev 167) +++ trunk/admin/list-virtual.php 2007-10-31 18:24:40 UTC (rev 168) @@ -1,164 +0,0 @@ -<?php -/** - * Postfix Admin - * - * LICENSE - * This source file is subject to the GPL license that is bundled with - * this package in the file LICENSE.TXT. - * - * Further details on the project are available at : - * http://www.postfixadmin.com or http://postfixadmin.sf.net - * - * @version $Id$ - * @license GNU GPL v2 or later. - * - * File: list-virtual.php - * List virtual users for a domain. - * - * Template File: overview.tpl - * - * Template Variables: - * - * tMessage - * tAlias - * tMailbox - * - * Form POST \ GET Variables: - * - * fDomain - * fDisplay - */ - -require_once('../common.php'); - -authentication_require_role('global-admin'); - -$list_domains = list_domains (); - - -$tAlias = array(); -$tMailbox = array(); -$fDisplay = 0; -$page_size = $CONF['page_size']; - -if ($_SERVER['REQUEST_METHOD'] == "GET") -{ - if (isset ($_GET['domain'])) $fDomain = escape_string ($_GET['domain']); - if (isset ($_GET['limit'])) $fDisplay = intval ($_GET['limit']); -} -else -{ - if (isset ($_POST['fDomain'])) $fDomain = escape_string ($_POST['fDomain']); - if (isset ($_POST['limit'])) $fDisplay = intval ($_POST['limit']); -} - - -if ((is_array ($list_domains) and sizeof ($list_domains) > 0)) if (empty ($fDomain)) $fDomain = $list_domains[0]; - - -if ((is_array ($list_domains) and sizeof ($list_domains) > 0)) if (empty ($fDomain)) $fDomain = $list_domains[1]; - -$query = "SELECT $table_alias.address,$table_alias.goto,$table_alias.modified,$table_alias.active FROM $table_alias LEFT JOIN $table_mailbox ON $table_alias.address=$table_mailbox.username WHERE $table_alias.domain='$fDomain' AND $table_mailbox.maildir IS NULL ORDER BY $table_alias.address LIMIT $fDisplay, $page_size"; -if ('pgsql'==$CONF['database_type']) -{ - $query = "SELECT address,goto,extract(epoch from modified) as modified,active FROM $table_alias WHERE domain='$fDomain' AND NOT EXISTS(SELECT 1 FROM $table_mailbox WHERE username=$table_alias.address) ORDER BY address LIMIT $page_size OFFSET $fDisplay"; -} - -$result = db_query ($query); -if ($result['rows'] > 0) -{ - while ($row = db_array ($result['result'])) - { - if ('pgsql'==$CONF['database_type']) - { - $row['modified']=gmstrftime('%c %Z',$row['modified']); - $row['active']=('t'==$row['active']) ? 1 : 0; - } - $tAlias[] = $row; - } -} - -if ($CONF['vacation_control_admin'] == 'YES') -{ - $query = ("SELECT $table_mailbox.*, $table_vacation.active AS v_active FROM $table_mailbox LEFT JOIN $table_vacation ON $table_mailbox.username=$table_vacation.email WHERE $table_mailbox.domain='$fDomain' ORDER BY $table_mailbox.username LIMIT $fDisplay, $page_size"); - if ('pgsql'==$CONF['database_type']) - { - $query = "SELECT *,extract(epoch from created) as uts_created,extract(epoch from modified) as uts_modified FROM $table_mailbox WHERE domain='$fDomain' ORDER BY username LIMIT $page_size OFFSET $fDisplay"; - } -} -else -{ - - $query = "SELECT * FROM $table_mailbox WHERE domain='$fDomain' ORDER BY username LIMIT $fDisplay, $page_size"; - if ('pgsql'==$CONF['database_type']) - { - $query = "SELECT *,extract(epoch from created) as uts_created,extract(epoch from modified) as uts_modified FROM $table_mailbox WHERE domain='$fDomain' ORDER BY username LIMIT $page_size OFFSET $fDisplay"; - } - -} -$result = db_query ($query); -if ($result['rows'] > 0) -{ - while ($row = db_array ($result['result'])) - { - if ('pgsql'==$CONF['database_type']) - { - $row['created']=gmstrftime('%c %Z',$row['uts_created']); - $row['modified']=gmstrftime('%c %Z',$row['uts_modified']); - $row['active']=('t'==$row['active']) ? 1 : 0; - $row['v_active'] = 1; // default to off... - if(isset($row['v_active'])) { /* key may not be present in results due to query from above */ - $row['v_active']=('t'==$row['v_active']) ? 1 : 0; - } - } - $tMailbox[] = $row; - } -} - -$tCanAddAlias = false; -$tCanAddMailbox = false; - -$limit = get_domain_properties($fDomain); -if (isset ($limit)) { - if ($fDisplay >= $page_size) { - $tDisplay_back_show = 1; - $tDisplay_back = $fDisplay - $page_size; - } - if (($limit['alias_count'] > $page_size) or ($limit['mailbox_count'] > $page_size)) { - $tDisplay_up_show = 1; - } - if ((($fDisplay + $page_size) < $limit['alias_count']) or - (($fDisplay + $page_size) < $limit['mailbox_count'])) - { - $tDisplay_next_show = 1; - $tDisplay_next = $fDisplay + $page_size; - } - - $active = $limit['active']; - if($active == 't' || $active == 1) { - $backup_mx = $limit['backupmx']; - if($backup_mx == 'f' || $backup_mx == 0) { - if($limit['aliases'] == 0) { - $tCanAddAlias = true; - } - elseif($limit['alias_count'] < $limit['aliases']) { - $tCanAddAlias = true; - } - if($limit['mailboxes'] == 0) { - $tCanAddMailbox = true; - } - elseif($limit['mailbox_count'] < $limit['mailboxes']) { - $tCanAddMailbox = true; - } - } - } -} - - -include ("../templates/header.tpl"); -include ("../templates/admin_menu.tpl"); -include ("../templates/overview.tpl"); -include ("../templates/footer.tpl"); - -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ -?> Deleted: trunk/admin/main.php =================================================================== --- trunk/admin/main.php 2007-10-31 01:31:37 UTC (rev 167) +++ trunk/admin/main.php 2007-10-31 18:24:40 UTC (rev 168) @@ -1,4 +0,0 @@ -<?php -header ("Location: list-admin.php"); -exit; -?> Deleted: trunk/admin/search.php =================================================================== --- trunk/admin/search.php 2007-10-31 01:31:37 UTC (rev 167) +++ trunk/admin/search.php 2007-10-31 18:24:40 UTC (rev 168) @@ -1,180 +0,0 @@ -<?php -/** - * Postfix Admin - * - * LICENSE - * This source file is subject to the GPL license that is bundled with - * this package in the file LICENSE.TXT. - * - * Further details on the project are available at : - * http://www.postfixadmin.com or http://postfixadmin.sf.net - * - * @version $Id$ - * @license GNU GPL v2 or later. - * - * File: search.php - * Allows for search by e.g. name, mailbox name etc. - * Template File: search.tpl - * - * Template Variables: - * - * tAlias - * tMailbox - * - * Form POST \ GET Variables: - * - * search - * fDomain - * fGo - */ - -require_once('../common.php'); - -require_once('../search.php'); - -/* -authentication_require_role('global-admin'); - -$tAlias = array(); -$tMailbox = array(); -$list_domains = list_domains (); - - -if ($_SERVER['REQUEST_METHOD'] == "GET") -{ - if (isset ($_GET['search'])) $fSearch = escape_string ($_GET['search']); - - if ($CONF['alias_control'] == "YES") - { - $query = "SELECT address,goto,modified,domain,active FROM $table_alias WHERE address LIKE '%$fSearch%' OR goto LIKE '%$fSearch%' ORDER BY address"; - if ('pgsql'==$CONF['database_type']) - { - $query = "SELECT address,goto,extract (epoch from modified) as modified,domain,active FROM $table_alias WHERE address LIKE '%$fSearch%' OR goto LIKE '%$fSearch%' ORDER BY address"; - } - } - else - { - $query = "SELECT $table_alias.address,$table_alias.goto,$table_alias.modified,$table_alias.domain,$table_alias.active FROM $table_alias LEFT JOIN $table_mailbox ON $table_alias.address=$table_mailbox.username WHERE $table_alias.address LIKE '%$fSearch%' AND $table_mailbox.maildir IS NULL ORDER BY $table_alias.address"; - if ('pgsql'==$CONF['database_type']) - { - $query = "SELECT address,goto,extract(epoch from modified) as modified,domain,active FROM $table_alias WHERE address LIKE '%$fSearch%' AND NOT EXISTS(SELECT 1 FROM $table_mailbox WHERE username=$table_alias.address) ORDER BY address"; - } - } - - $result = db_query ("$query"); - - if ($result['rows'] > 0) - { - while ($row = db_array ($result['result'])) - { - if ('pgsql'==$CONF['database_type']) - { - $row['modified'] = gmstrftime('%c %Z',$row['modified']); - $row['active']=('t'==$row['active']) ? 1 : 0; - } - $tAlias[] = $row; - } - } - - $query = "SELECT * FROM $table_mailbox WHERE username LIKE '%$fSearch%' OR name LIKE '%$fSearch%' ORDER BY username"; - if ('pgsql'==$CONF['database_type']) - { - $query = "SELECT *,extract(epoch from created) as uts_created,extract(epoch from modified) as uts_modified FROM $table_mailbox WHERE username LIKE '%$fSearch%' OR name LIKE '%$fSearch%' ORDER BY username"; - } - $result = db_query ($query); - if ($result['rows'] > 0) - { - while ($row = db_array ($result['result'])) - { - if ('pgsql'==$CONF['database_type']) - { - $row['created']=gmstrftime('%c %Z',$row['uts_created']); - $row['modified']=gmstrftime('%c %Z',$row['uts_modified']); - $row['active']=('t'==$row['active']) ? 1 : 0; - unset($row['uts_created']); - unset($row['uts_modified']); - } - $tMailbox[] = $row; - } - } - - include ("../templates/header.tpl"); - include ("../templates/admin_menu.tpl"); - include ("../templates/search.tpl"); - include ("../templates/footer.tpl"); -} - -if ($_SERVER['REQUEST_METHOD'] == "POST") -{ - if (isset ($_POST['search'])) $fSearch = escape_string ($_POST['search']); - if (isset ($_POST['fGo'])) $fGo = escape_string ($_POST['fGo']); - if (isset ($_POST['fDomain'])) $fDomain = escape_string ($_POST['fDomain']); - - if (empty ($fSearch) && !empty ($fGo)) - { - header("Location: list-virtual.php?domain=" . $fDomain ) && exit; - } - - - if ($CONF['alias_control'] == "YES") - { - $query = "SELECT address,goto,modified,domain,active FROM $table_alias WHERE address LIKE '%$fSearch%' OR goto LIKE '%$fSearch%' ORDER BY address"; - if ('pgsql'==$CONF['database_type']) - { - $query = "SELECT address,goto,extract (epoch from modified) as modified,domain,active FROM $table_alias WHERE address LIKE '%$fSearch%' OR goto LIKE '%$fSearch%' ORDER BY address"; - } - } - else - { - $query = "SELECT $table_alias.address,$table_alias.goto,$table_alias.modified,$table_alias.domain,$table_alias.active FROM $table_alias LEFT JOIN $table_mailbox ON $table_alias.address=$table_mailbox.username WHERE $table_alias.address LIKE '%$fSearch%' AND $table_mailbox.maildir IS NULL ORDER BY $table_alias.address"; - if ('pgsql'==$CONF['database_type']) - { - $query = "SELECT $table_alias.address,$table_alias.goto,extract(epoch from $table_alias.modified) as $table_modified,$table_alias.domain,$table_alias.active FROM $table_alias LEFT JOIN $table_mailbox ON $table_alias.address=$table_mailbox.username WHERE $table_alias.address LIKE '%$fSearch%' AND $table_mailbox.maildir IS NULL ORDER BY $table_alias.address"; - } - } - - $result = db_query ("$query"); - - if ($result['rows'] > 0) - { - while ($row = db_array ($result['result'])) - { - if ('pgsql'==$CONF['database_type']) - { - $row['modified'] = gmstrftime('%c %Z',$row['modified']); - $row['active']=('t'==$row['active']) ? 1 : 0; - } - $tAlias[] = $row; - } - } - - $query = "SELECT * FROM $table_mailbox WHERE username LIKE '%$fSearch%' OR name LIKE '%$fSearch%' ORDER BY username"; - if ('pgsql'==$CONF['database_type']) - { - $query = "SELECT *,extract(epoch from created) as uts_created,extract(epoch from modified) as uts_modified FROM $table_mailbox WHERE username LIKE '%$fSearch%' OR name LIKE '%$fSearch%' ORDER BY username"; - } - $result = db_query ("$query"); - if ($result['rows'] > 0) - { - while ($row = db_array ($result['result'])) - { - if ('pgsql'==$CONF['database_type']) - { - $row['created']=gmstrftime('%c %Z',$row['uts_created']); - $row['modified']=gmstrftime('%c %Z',$row['uts_modified']); - $row['active']=('t'==$row['active']) ? 1 : 0; - unset($row['uts_created']); - unset($row['uts_modified']); - } - $tMailbox[] = $row; - } - } - - include ("../templates/header.tpl"); - include ("../templates/admin_menu.tpl"); - include ("../templates/search.tpl"); - include ("../templates/footer.tpl"); -} -*/ -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ -?> Deleted: trunk/admin/viewlog.php =================================================================== --- trunk/admin/viewlog.php 2007-10-31 01:31:37 UTC (rev 167) +++ trunk/admin/viewlog.php 2007-10-31 18:24:40 UTC (rev 168) @@ -1,3 +0,0 @@ -<?php -require("../viewlog.php"); -?> Copied: trunk/backup.php (from rev 164, trunk/admin/backup.php) =================================================================== --- trunk/backup.php (rev 0) +++ trunk/backup.php 2007-10-31 18:24:40 UTC (rev 168) @@ -0,0 +1,118 @@ +<?php +/** + * Postfix Admin + * + * LICENSE + * This source file is subject to the GPL license that is bundled with + * this package in the file LICENSE.TXT. + * + * Further details on the project are available at : + * http://www.postfixadmin.com or http://postfixadmin.sf.net + * + * @version $Id$ + * @license GNU GPL v2 or later. + * + * File: backup.php + * Used to save all settings - but only works for MySQL databases. + * Template File: -none- + * + * Template Variables: -none- + * + * Form POST \ GET Variables: -none- + */ + +require_once('common.php'); + +authentication_require_role('global-admin'); + +(($CONF['backup'] == 'NO') ? header("Location: " . $CONF['postfix_admin_url'] . "/main.php") && exit : '1'); + +// TODO: make backup supported for postgres +if ('pgsql'==$CONF['database_type']) +{ + print '<p>Sorry: Backup is currently not supported for your DBMS.</p>'; +} +/* + SELECT attnum,attname,typname,atttypmod-4,attnotnull,atthasdef,adsrc + AS def FROM pg_attribute,pg_class,pg_type,pg_attrdef + WHERE pg_class.oid=attrelid AND pg_type.oid=atttypid + AND attnum>0 AND pg_class.oid=adrelid AND adnum=attnum AND atthasdef='t' AND lower(relname)='admin' + UNION SELECT attnum,attname,typname,atttypmod-4,attnotnull,atthasdef,'' + AS def FROM pg_attribute,pg_class,pg_type + WHERE pg_class.oid=attrelid + AND pg_type.oid=atttypid + AND attnum>0 + AND atthasdef='f' + AND lower(relname)='admin' +$db = $_GET['db']; +$cmd = "pg_dump -c -D -f /tix/miner/miner.sql -F p -N -U postgres $db"; +$res = `$cmd`; +// Alternate: $res = shell_exec($cmd); +echo $res; +*/ + +if ($_SERVER['REQUEST_METHOD'] == "GET") +{ + umask (077); + $path = (ini_get('upload_tmp_dir') != '') ? ini_get('upload_tmp_dir') : '/tmp/'; + $filename = "postfixadmin-" . date ("Ymd") . "-" . getmypid() . ".sql"; + $backup = $path . $filename; + + $header = "#\n# Postfix Admin $version\n# Date: " . date ("D M j G:i:s T Y") . "\n#\n"; + + if (!$fh = fopen ($backup, 'w')) + { + $tMessage = "<div class=\"error_msg\">Cannot open file ($backup)</div>"; + include ("templates/header.tpl"); + include ("templates/menu.tpl"); + include ("templates/message.tpl"); + include ("templates/footer.tpl"); + } + else + { + fwrite ($fh, $header); + + $tables = array('admin','alias','domain','domain_admins','log','mailbox','vacation'); + + for ($i = 0 ; $i < sizeof ($tables) ; ++$i) + { + $result = db_query ("SHOW CREATE TABLE ".table_by_pos($i)); + if ($result['rows'] > 0) + { + while ($row = db_array ($result['result'])) + { + fwrite ($fh, "$row[1];\n\n"); + } + } + } + + for ($i = 0 ; $i < sizeof ($tables) ; ++$i) + { + $result = db_query ("SELECT * FROM ".table_by_pos($i)); + if ($result['rows'] > 0) + { + while ($row = db_assoc ($result['result'])) + { + foreach ($row as $key=>$val) + { + $fields[] = $key; + $values[] = $val; + } + + fwrite ($fh, "INSERT INTO ". $tables[$i] . " (". implode (',',$fields) . ") VALUES ('" . implode ('\',\'',$values) . "');\n"); + $fields = ""; + $values = ""; + } + } + } + } + header ("Content-Type: application/octet-stream"); + header ("Content-Disposition: attachment; filename=\"$filename\""); + header ("Content-Transfer-Encoding: binary"); + header ("Content-Length: " . filesize("$backup")); + header ("Content-Description: Postfix Admin"); + $download_backup = fopen ("$backup", "r"); + unlink ("$backup"); + fpassthru ($download_backup); +} +?> Copied: trunk/broadcast-message.php (from rev 164, trunk/admin/broadcast-message.php) =================================================================== --- trunk/broadcast-message.php (rev 0) +++ trunk/broadcast-message.php 2007-10-31 18:24:40 UTC (rev 168) @@ -0,0 +1,92 @@ +<?php +/** + * Postfix Admin + * + * LICENSE + * This source file is subject to the GPL license that is bundled with + * this package in the file LICENSE.TXT. + * + * Further details on the project are available at : + * http://www.postfixadmin.com or http://postfixadmin.sf.net + * + * @version $Id$ + * @license GNU GPL v2 or later. + * + * File: broadcast-message.php + * Used to send a message to _ALL_ users with mailboxes on this server. + * + * Template File: broadcast-message.tpl + * + * Template Variables: -none- + * + * Form POST \ GET Variables: + * + * name + * subject + * message + */ + +require_once('common.php'); + +authentication_require_role('global-admin'); + +$SESSID_USERNAME = authentication_get_username(); + +if ($_SERVER['REQUEST_METHOD'] == "POST") +{ + if (empty($_POST['subject']) || empty($_POST['message']) || empty($_POST['name'])) + { + $error = 1; + } + else + { + $q = 'select username from mailbox union '. + 'select goto from alias '. + 'where goto not in (select username from mailbox)'; + + $result = db_query ($q); + if ($result['rows'] > 0) + { + $b_name = mb_encode_mimeheader( $_POST['name'], 'UTF-8', 'Q'); + $b_subject = mb_encode_mimeheader( $_POST['subject'], 'UTF-8', 'Q'); + $b_message = encode_base64($_POST['message']); + + $i = 0; + while ($row = db_array ($result['result'])) { + $fTo = $row[0]; + $fHeaders = 'To: ' . $fTo . "\n"; + $fHeaders .= 'From: ' . $b_name . ' <' . $CONF['admin_email'] . ">\n"; + $fHeaders .= 'Subject: ' . $b_subject . "\n"; + $fHeaders .= 'MIME-Version: 1.0' . "\n"; + $fHeaders .= 'Content-Type: text/plain; charset=UTF-8' . "\n"; + $fHeaders .= 'Content-Transfer-Encoding: base64' . "\n"; + + $fHeaders .= $b_message; + + if (!smtp_mail ($fTo, $CONF['admin_email'], $fHeaders)) + { + $tMessage .= "<br />" . $PALANG['pSendmail_result_error'] . "<br />"; + } + else + { + $tMessage .= "<br />" . $PALANG['pSendmail_result_success'] . "<br />"; + } + } + } + include ("templates/header.tpl"); + include ("templates/menu.tpl"); + echo '<p>'.$PALANG['pBroadcast_success'].'</p>'; + include ("templates/footer.tpl"); + } +} + +if ($_SERVER['REQUEST_METHOD'] == "GET" || $error == 1) +{ + include ("templates/header.tpl"); + include ("templates/menu.tpl"); + include ("templates/broadcast-message.tpl"); + include ("templates/footer.tpl"); +} + +/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ +?> Copied: trunk/create-admin.php (from rev 164, trunk/admin/create-admin.php) =================================================================== --- trunk/create-admin.php (rev 0) +++ trunk/create-admin.php 2007-10-31 18:24:40 UTC (rev 168) @@ -0,0 +1,69 @@ +<?php +/** + * Postfix Admin + * + * LICENSE + * This source file is subject to the GPL license that is bundled with + * this package in the file LICENSE.TXT. + * + * Further details on the project are available at : + * http://www.postfixadmin.com or http://postfixadmin.sf.net + * + * @version $Id$ + * @license GNU GPL v2 or later. + * + * File: create-admin.php + * Used to create new administrators. + * Template File: admin_create-admin.tpl + * + * + * Template Variables: + * + * tMessage + * tUsername + * tDomains + * + * Form POST \ GET Variables: + * + * fUsername + * fPassword + * fPassword2 + * fDomains + */ + +require_once('common.php'); + +authentication_require_role('global-admin'); + +$list_domains = list_domains (); +$tDomains = array(); + +if ($_SERVER['REQUEST_METHOD'] == "GET") +{ + $pAdminCreate_admin_username_text = $PALANG['pAdminCreate_admin_username_text']; + $tDomains = array (); +} + +if ($_SERVER['REQUEST_METHOD'] == "POST") +{ + if (isset ($_POST['fUsername'])) $fUsername = escape_string ($_POST['fUsername']); + if (isset ($_POST['fPassword'])) $fPassword = escape_string ($_POST['fPassword']); + if (isset ($_POST['fPassword2'])) $fPassword2 = escape_string ($_POST['fPassword2']); + $fDomains = array(); + if (!empty ($_POST['fDomains'])) $fDomains = $_POST['fDomains']; + + list ($error, $tMessage, $pAdminCreate_admin_username_text, $pAdminCreate_admin_password_text) = create_admin($fUsername, $fPassword, $fPassword2, $fDomains); + + if ($error != 0) { + if (isset ($_POST['fUsername'])) $tUsername = escape_string ($_POST['fUsername']); + if (isset ($_POST['fDomains'])) $tDomains = $_POST['fDomains']; + } +} + +include ("templates/header.tpl"); +include ("templates/menu.tpl"); +include ("templates/admin_create-admin.tpl"); +include ("templates/footer.tpl"); + +/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ +?> Modified: trunk/create-alias.php =================================================================== --- trunk/create-alias.php 2007-10-31 01:31:37 UTC (rev 167) +++ trunk/create-alias.php 2007-10-31 18:24:40 UTC (rev 168) @@ -153,13 +153,7 @@ } include ("$incpath/templates/header.tpl"); - -if (authentication_has_role('global-admin')) { - include ("$incpath/templates/admin_menu.tpl"); -} else { - include ("$incpath/templates/menu.tpl"); -} - +include ("$incpath/templates/menu.tpl"); include ("$incpath/templates/create-alias.tpl"); include ("$incpath/templates/footer.tpl"); ?> Copied: trunk/create-domain.php (from rev 164, trunk/admin/create-domain.php) =================================================================== --- trunk/create-domain.php (rev 0) +++ trunk/create-domain.php 2007-10-31 18:24:40 UTC (rev 168) @@ -0,0 +1,125 @@ +<?php +/** + * Postfix Admin + * + * LICENSE + * This source file is subject to the GPL license that is bundled with + * this package in the file LICENSE.TXT. + * + * Further details on the project are available at : + * http://www.postfixadmin.com or http://postfixadmin.sf.net + * + * @version $Id$ + * @license GNU GPL v2 or later. + * + * File: create-domain.php + * Allows administrators to create new domains. + * Template File: admin_create-domain.tpl + * + * Template Variables: + * + * tMessage + * tDomain + * tDescription + * tAliases + * tMailboxes + * tMaxquota + * tDefaultaliases + * + * Form POST \ GET Variables: + * + * fDomain + * fDescription + * fAliases + * fMailboxes + * fMaxquota + * fDefaultaliases + */ + +require_once('common.php'); + +authentication_require_role('global-admin'); + + +if ($_SERVER['REQUEST_METHOD'] == "GET") +{ + $tAliases = $CONF['aliases']; + $tMailboxes = $CONF['mailboxes']; + $tMaxquota = $CONF['maxquota']; + $tTransport = $CONF['transport_default']; +} + +if ($_SERVER['REQUEST_METHOD'] == "POST") +{ + if (isset ($_POST['fDomain'])) $fDomain = escape_string ($_POST['fDomain']); + foreach(array('fDescription' => '', 'fAliases' => '0', 'fMailboxes' => '0', + 'fMaxquota' => '0', 'fTransport' => 'virtual', + 'fDefaultaliases' => '0', 'fBackupmx' => '0') as $key => $default) { + if(isset($_POST[$key]) && !empty($POST[$key])) { + $$key = escape_string($_POST[$key]); + } + $$key = $default; + } + + if (empty ($fDomain) or domain_exist ($fDomain) or !check_domain ($fDomain)) + { + $error = 1; + $tDomain = escape_string ($_POST['fDomain']); + $tDescription = escape_string ($_POST['fDescription']); + $tAliases = escape_string ($_POST['fAliases']); + $tMailboxes = escape_string ($_POST['fMailboxes']); + if (isset ($_POST['fMaxquota'])) $tMaxquota = escape_string ($_POST['fMaxquota']); + if (isset ($_POST['fTransport'])) $tTransport = escape_string ($_POST['fTransport']); + if (isset ($_POST['fDefaultaliases'])) $tDefaultaliases = escape_string ($_POST['fDefaultaliases']); + if (isset ($_POST['fBackupmx'])) $tBackupmx = escape_string ($_POST['fBackupmx']); + if (domain_exist ($fDomain)) $pAdminCreate_domain_domain_text = $PALANG['pAdminCreate_domain_domain_text_error']; + if (empty ($fDoma... [truncated message content] |
From: <chr...@us...> - 2007-11-03 22:24:30
|
Revision: 181 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=181&view=rev Author: christian_boltz Date: 2007-11-03 15:24:34 -0700 (Sat, 03 Nov 2007) Log Message: ----------- merged overview.php into list-domain.php and list-virtual.php list-domain.php: - added several admin/superadmin switches and permission checks - merged GET and POST code - Note: still different templates for superadmins (admin_list-domain.tpl) and admins (overview-get.tpl) because of large layout difference list-virtual.php: - added several admin/superadmin switches and permission checks - added check for admins without any domains (redirects to domain list, which can handle this situation) - migrated FIXME from overview.php -> David, please review the query and remove the FIXME afterwards overview.php: - DELETED - no longer needed overview.tpl: - RENAMED overview.tpl to list-virtual.tpl - removed admin/superadmin filename switch - removed $incpath switch for images menu.tpl: - menu for domain admins now has "domain list" and "virtual list" instead of "overview" delete.php, edit-active.php, edit-alias.php, edit-mailbox.php, search.php: - changed redirect to list-virtual.php overview-get.tpl: - changed link to list-virtual.php main.tpl: - changed overview link to list-domain.php Modified Paths: -------------- trunk/delete.php trunk/edit-active.php trunk/edit-alias.php trunk/edit-mailbox.php trunk/list-domain.php trunk/list-virtual.php trunk/search.php trunk/templates/main.tpl trunk/templates/menu.tpl trunk/templates/overview-get.tpl Added Paths: ----------- trunk/templates/list-virtual.tpl Removed Paths: ------------- trunk/overview.php trunk/templates/overview.tpl Modified: trunk/delete.php =================================================================== --- trunk/delete.php 2007-11-03 19:21:27 UTC (rev 180) +++ trunk/delete.php 2007-11-03 22:24:34 UTC (rev 181) @@ -149,9 +149,7 @@ if ($error != 1) { if ($CONF['database_type'] == "pgsql") db_query('COMMIT'); - $url = "overview.php"; - if (authentication_has_role('global-admin')) $url = "list-virtual.php"; - header ("Location: $url?domain=$fDomain"); + header ("Location: list-virtual.php?domain=$fDomain"); exit; } else { $tMessage = $PALANG['pDelete_delete_error'] . "<b>$fDelete</b> (physical mail)!</span>"; Modified: trunk/edit-active.php =================================================================== --- trunk/edit-active.php 2007-11-03 19:21:27 UTC (rev 180) +++ trunk/edit-active.php 2007-11-03 22:24:34 UTC (rev 181) @@ -78,7 +78,6 @@ if ($error != 1) { if ( preg_match( "/^list-virtual.php.*/", $fReturn ) || - preg_match( "/^overview.php.*/", $fReturn ) || preg_match( "/^search.php.*/", $fReturn ) ) { //$fReturn appears OK, jump there @@ -86,11 +85,7 @@ } else { - if (authentication_has_role('global-admin')) { - header ("Location: list-virtual.php?domain=$fDomain"); - } else { - header ("Location: overview.php?domain=$fDomain"); - } + header ("Location: list-virtual.php?domain=$fDomain"); } exit; } Modified: trunk/edit-alias.php =================================================================== --- trunk/edit-alias.php 2007-11-03 19:21:27 UTC (rev 180) +++ trunk/edit-alias.php 2007-11-03 22:24:34 UTC (rev 181) @@ -118,11 +118,7 @@ { db_log ($SESSID_USERNAME, $fDomain, 'edit_alias', "$fAddress -> $goto"); - if (authentication_has_role('global-admin')) { - header ("Location: list-virtual.php?domain=$fDomain"); - } else { - header ("Location: overview.php?domain=$fDomain"); - } + header ("Location: list-virtual.php?domain=$fDomain"); exit; } } Modified: trunk/edit-mailbox.php =================================================================== --- trunk/edit-mailbox.php 2007-11-03 19:21:27 UTC (rev 180) +++ trunk/edit-mailbox.php 2007-11-03 22:24:34 UTC (rev 181) @@ -144,11 +144,7 @@ else { db_log ($SESSID_USERNAME, $fDomain, 'edit_mailbox', $fUsername); - if (authentication_has_role('global-admin')) { - header ("Location: list-virtual.php?domain=$fDomain"); - } else { - header ("Location: overview.php?domain=$fDomain"); - } + header ("Location: list-virtual.php?domain=$fDomain"); exit; } } Modified: trunk/list-domain.php =================================================================== --- trunk/list-domain.php 2007-11-03 19:21:27 UTC (rev 180) +++ trunk/list-domain.php 2007-11-03 22:24:34 UTC (rev 181) @@ -27,41 +27,28 @@ require_once('common.php'); -authentication_require_role('global-admin'); +authentication_require_role('admin'); -$list_admins = list_admins (); +if (authentication_has_role('global-admin')) { + $list_admins = list_admins (); + $is_superadmin = 1; +} else { + $list_admins = array(authentication_get_username()); + $is_superadmin = 0; +} -if ($_SERVER['REQUEST_METHOD'] == "GET") { - if (isset ($_GET['username'])) { - $fUsername = escape_string ($_GET['username']); - $list_domains = list_domains_for_admin ($fUsername); - if ($list_domains != 0) - { - for ($i = 0; $i < sizeof ($list_domains); $i++) - { - $domain_properties[$i] = get_domain_properties ($list_domains[$i]); - } - } - } - else - { - $list_domains = list_domains (); - if ((is_array ($list_domains) and sizeof ($list_domains) > 0)) - for ($i = 0; $i < sizeof ($list_domains); $i++) - { - $domain_properties[$i] = get_domain_properties ($list_domains[$i]); - } - } +if ($_SERVER['REQUEST_METHOD'] == "POST" && $is_superadmin && isset ($_POST['fUsername'])) { + $fUsername = escape_string ($_POST['fUsername']); + $list_domains = list_domains_for_admin ($fUsername); +} elseif ($_SERVER['REQUEST_METHOD'] == "GET" && $is_superadmin && isset ($_GET['username'])) { + $fUsername = escape_string ($_GET['username']); + $list_domains = list_domains_for_admin ($fUsername); +} elseif ($is_superadmin) { + $list_domains = list_domains (); +} else { + $list_domains = list_domains_for_admin(authentication_get_username()); } -if ($_SERVER['REQUEST_METHOD'] == "POST") -{ - if (isset ($_POST['fUsername'])) - { - $fUsername = escape_string ($_POST['fUsername']); - $list_domains = list_domains_for_admin ($fUsername); - } - if (!empty ($list_domains)) { for ($i = 0; $i < sizeof ($list_domains); $i++) @@ -69,10 +56,15 @@ $domain_properties[$i] = get_domain_properties ($list_domains[$i]); } } -} +#} include ("templates/header.tpl"); include ("templates/menu.tpl"); -include ("templates/admin_list-domain.tpl"); + +if ($is_superadmin) { + include ("templates/admin_list-domain.tpl"); +} else { + include ("templates/overview-get.tpl"); +} include ("templates/footer.tpl"); ?> Modified: trunk/list-virtual.php =================================================================== --- trunk/list-virtual.php 2007-11-03 19:21:27 UTC (rev 180) +++ trunk/list-virtual.php 2007-11-03 22:24:34 UTC (rev 181) @@ -15,7 +15,7 @@ * File: list-virtual.php * List virtual users for a domain. * - * Template File: overview.tpl + * Template File: list-virtual.tpl * * Template Variables: * @@ -31,11 +31,16 @@ require_once('common.php'); -authentication_require_role('global-admin'); +authentication_require_role('admin'); -$list_domains = list_domains (); +if (authentication_has_role('global-admin')) { + $list_domains = list_domains (); + $is_superadmin = 1; +} else { + $list_domains = list_domains_for_admin(authentication_get_username()); + $is_superadmin = 0; +} - $tAlias = array(); $tMailbox = array(); $fDisplay = 0; @@ -52,12 +57,21 @@ if (isset ($_POST['limit'])) $fDisplay = intval ($_POST['limit']); } +if (count($list_domains) == 0) { +# die("no domains"); + header("Location: list-domain.php"); # no domains (for this admin at least) - redirect to domain list +} if ((is_array ($list_domains) and sizeof ($list_domains) > 0)) if (empty ($fDomain)) $fDomain = $list_domains[0]; -if ((is_array ($list_domains) and sizeof ($list_domains) > 0)) if (empty ($fDomain)) $fDomain = $list_domains[1]; +if ((is_array ($list_domains) and sizeof ($list_domains) > 0)) if (empty ($fDomain)) $fDomain = $list_domains[1]; # TODO: should never happen?!? ($fDomain should already be filled by the line above) +if (!check_owner(authentication_get_username(), $fDomain)) { +# die($PALANG['invalid_parameter']); + header("Location: list-domain.php"); # domain not owned by this admin +} + $query = "SELECT $table_alias.address,$table_alias.goto,$table_alias.modified,$table_alias.active FROM $table_alias LEFT JOIN $table_mailbox ON $table_alias.address=$table_mailbox.username WHERE $table_alias.domain='$fDomain' AND $table_mailbox.maildir IS NULL ORDER BY $table_alias.address LIMIT $fDisplay, $page_size"; if ('pgsql'==$CONF['database_type']) { @@ -83,6 +97,7 @@ $query = ("SELECT $table_mailbox.*, $table_vacation.active AS v_active FROM $table_mailbox LEFT JOIN $table_vacation ON $table_mailbox.username=$table_vacation.email WHERE $table_mailbox.domain='$fDomain' ORDER BY $table_mailbox.username LIMIT $fDisplay, $page_size"); if ('pgsql'==$CONF['database_type']) { + //TODO/FIXME: postgres query needs to be rewrited $query = "SELECT *,extract(epoch from created) as uts_created,extract(epoch from modified) as uts_modified FROM $table_mailbox WHERE domain='$fDomain' ORDER BY username LIMIT $page_size OFFSET $fDisplay"; } } @@ -106,7 +121,7 @@ $row['created']=gmstrftime('%c %Z',$row['uts_created']); $row['modified']=gmstrftime('%c %Z',$row['uts_modified']); $row['active']=('t'==$row['active']) ? 1 : 0; - $row['v_active'] = 1; // default to off... + $row['v_active'] = 1; // default to off... TODO: 1 is NOT off if(isset($row['v_active'])) { /* key may not be present in results due to query from above */ $row['v_active']=('t'==$row['v_active']) ? 1 : 0; } @@ -157,7 +172,7 @@ include ("templates/header.tpl"); include ("templates/menu.tpl"); -include ("templates/overview.tpl"); +include ("templates/list-virtual.tpl"); include ("templates/footer.tpl"); /* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ Deleted: trunk/overview.php =================================================================== --- trunk/overview.php 2007-11-03 19:21:27 UTC (rev 180) +++ trunk/overview.php 2007-11-03 22:24:34 UTC (rev 181) @@ -1,249 +0,0 @@ -<?php -/** - * Postfix Admin - * - * LICENSE - * This source file is subject to the GPL license that is bundled with - * this package in the file LICENSE.TXT. - * - * Further details on the project are available at : - * http://www.postfixadmin.com or http://postfixadmin.sf.net - * - * @version $Id$ - * @license GNU GPL v2 or later. - * - * File: overview.php - * Shows an overview for admins. - * - * Template File: overview.tpl - * - * Template Variables: - * - * tAlias - * tDomain - * tMailbox - * tDisplay_back - * tDisplay_next - * - * Form POST \ GET Variables: - * - * domain - * fDomain - * limit - */ - -require_once('common.php'); - -authentication_require_role('admin'); - -$SESSID_USERNAME = authentication_get_username(); - -if(authentication_has_role('global-admin')) { - $list_domains = list_domains (); -} -else { - $list_domains = list_domains_for_admin ($SESSID_USERNAME); -} - -$tAlias = array(); -$tMailbox = array(); - -if ($_SERVER['REQUEST_METHOD'] == "GET") -{ - $fDisplay = 0; - $page_size = $CONF['page_size']; - - if (isset ($_GET['domain'])) $fDomain = escape_string ($_GET['domain']); - if (isset ($_GET['limit'])) $fDisplay = escape_string ($_GET['limit']); - - $limit = get_domain_properties ($fDomain); - - $limitSql=('pgsql'==$CONF['database_type']) ? "$page_size OFFSET $fDisplay" : "$fDisplay, $page_size"; - - if (check_owner ($SESSID_USERNAME, $fDomain)) - { - $tCanAddAlias = 1; # TODO: workaround for undefined variable - $tCanAddMailbox = 1; # TODO: workaround for undefined variable - - $query = "SELECT $table_alias.address,$table_alias.goto,$table_alias.modified,$table_alias.active FROM $table_alias LEFT JOIN $table_mailbox ON $table_alias.address=$table_mailbox.username WHERE $table_alias.domain='$fDomain' AND $table_mailbox.maildir IS NULL ORDER BY $table_alias.address LIMIT $limitSql"; - if ('pgsql'==$CONF['database_type']) - { - $query = "SELECT address,goto,extract(epoch from modified) as modified,active FROM $table_alias WHERE domain='$fDomain' AND NOT EXISTS(SELECT 1 FROM $table_mailbox WHERE username=$table_alias.address) ORDER BY address LIMIT $limitSql"; - } - - $result = db_query ($query); - if ($result['rows'] > 0) - { - while ($row = db_array ($result['result'])) - { - if ('pgsql'==$CONF['database_type']) - { - $row['modified']=gmstrftime('%c %Z',$row['modified']); - $row['active']=('t'==$row['active']) ? 1 : 0; - } - $tAlias[] = $row; - } - } - - if ($CONF['vacation_control_admin'] == 'YES') - { - $query = ("SELECT $table_mailbox.*, $table_vacation.active AS v_active FROM $table_mailbox LEFT JOIN $table_vacation ON $table_mailbox.username=$table_vacation.email WHERE $table_mailbox.domain='$fDomain' ORDER BY $table_mailbox.username LIMIT $limitSql"); - if ('pgsql'==$CONF['database_type']) - { - //FIXME: postgres query needs to be rewrited - $query = "SELECT *,extract(epoch from created) as uts_created,extract(epoch from modified) as uts_modified FROM $table_mailbox WHERE domain='$fDomain' ORDER BY username LIMIT $limitSql"; - } - } - else - { - $query = "SELECT * FROM $table_mailbox WHERE domain='$fDomain' ORDER BY username LIMIT $limitSql"; - if ('pgsql'==$CONF['database_type']) - { - $query = "SELECT *,extract(epoch from created) as uts_created,extract(epoch from modified) as uts_modified FROM $table_mailbox WHERE domain='$fDomain' ORDER BY username LIMIT $limitSql"; - } - } - - $result = db_query ($query); - if ($result['rows'] > 0) - { - while ($row = db_array ($result['result'])) - { - if ('pgsql'==$CONF['database_type']) - { - $row['created']=gmstrftime('%c %Z',$row['uts_created']); - $row['modified']=gmstrftime('%c %Z',$row['uts_modified']); - $row['active']=('t'==$row['active']) ? 1 : 0; - if(isset($row['v_active'])) { - $row['v_active']=('t'==$row['v_active']) ? 1 : 0; - } - else { - $row['v_active'] = -1 ; //unknown; broken query above.. - } - unset($row['uts_created']); - unset($row['uts_modified']); - } - $tMailbox[] = $row; - } - } - $template = "overview.tpl"; - } - else - { - $template = "overview-get.tpl"; - } - - $tDomain = $fDomain; - - if (isset ($limit)) - { - if ($fDisplay >= $page_size) - { - $tDisplay_back_show = 1; - $tDisplay_back = $fDisplay - $page_size; - } - if (($limit['alias_count'] > $page_size) or ($limit['mailbox_count'] > $page_size)) - { - $tDisplay_up_show = 1; - } - if ((($fDisplay + $page_size) < $limit['alias_count']) or (($fDisplay + $page_size) < $limit['mailbox_count'])) - { - $tDisplay_next_show = 1; - $tDisplay_next = $fDisplay + $page_size; - } - } - - include ("./templates/header.tpl"); - include ("./templates/menu.tpl"); - include ("./templates/$template"); - include ("./templates/footer.tpl"); -} - -if ($_SERVER['REQUEST_METHOD'] == "POST") -{ - $fDisplay = 0; - $page_size = $CONF['page_size']; - - if (isset ($_POST['limit'])) $fDisplay = escape_string ($_POST['limit']); - if (isset ($_POST['domain'])) $fDomain = escape_string ($_POST['fDomain']); - - if (check_owner ($SESSID_USERNAME, escape_string ($_POST['fDomain']))) - { - $limitSql=('pgsql'==$CONF['database_type']) ? "$page_size OFFSET $fDisplay" : "$fDisplay, $page_size"; - - if ($CONF['alias_control_admin'] == "YES") - { - $query = "SELECT address,goto,modified,active FROM $table_alias WHERE domain='$fDomain' ORDER BY address LIMIT $limitSql"; - if ('pgsql'==$CONF['database_type']) - { - $query = "SELECT address,goto,extract(epoch from modified) as modified,active FROM $table_alias WHERE domain='$fDomain' ORDER BY address LIMIT $limitSql"; - } - } - else - { - $query = "SELECT $table_alias.address,$table_alias.goto,$table_alias.modified,$table_alias.active FROM $table_alias LEFT JOIN $table_mailbox ON $table_alias.address=$table_mailbox.username WHERE $table_alias.domain='$fDomain' AND $table_mailbox.maildir IS NULL ORDER BY $table_alias.address LIMIT $limitSql"; - if ('pgsql'==$CONF['database_type']) - { - $query="SELECT address,goto,extract(epoch from modified) as modified,active FROM $table_alias WHERE domain='$fDomain' AND NOT EXISTS(SELECT 1 FROM $table_mailbox WHERE username=$table_alias.address) ORDER BY address LIMIT $limitSql"; - } - } - - $result = db_query ("$query"); - if ($result['rows'] > 0) - { - while ($row = db_array ($result['result'])) - { - if ('pgsql'==$CONF['database_type']) - { - $row['modified']=gmstrftime('%c %Z',$row['modified']); - $row['active']=('t'==$row['active']) ? 1 : 0; - } - $tAlias[] = $row; - } - } - - $query = "SELECT * FROM $table_mailbox WHERE domain='$fDomain' ORDER BY username LIMIT $limitSql"; - if ('pgsql'==$CONF['database_type']) - { - $query = "SELECT *,,extract(epoch from created) as uts_created,extract(epoch from modified) as uts_modified FROM $table_mailbox WHERE domain='$fDomain' ORDER BY username LIMIT $limitSql"; - } - $result = db_query ($query); - if ($result['rows'] > 0) - { - while ($row = db_array ($result['result'])) - { - if ('pgsql'==$CONF['database_type']) - { - $row['created']=gmstrftime('%c %Z',$row['uts_created']); - $row['modified']=gmstrftime('%c %Z',$row['uts_modified']); - $row['active']=('t'==$row['active']) ? 1 : 0; - } - $tMailbox[] = $row; - } - } - } - - if (isset ($limit)) - { - if ($fDisplay >= $page_size) - { - $tDisplay_back_show = 1; - $tDisplay_back = $fDisplay - $page_size; - } - if (($limit['alias_count'] > $page_size) or ($limit['mailbox_count'] > $page_size)) - { - $tDisplay_up_show = 1; - } - if ((($fDisplay + $page_size) < $limit['alias_count']) or (($fDisplay + $page_size) < $limit['mailbox_count'])) - { - $tDisplay_next_show = 1; - $tDisplay_next = $fDisplay + $page_size; - } - } - - include ("./templates/header.tpl"); - include ("./templates/menu.tpl"); - include ("./templates/overview.tpl"); - include ("./templates/footer.tpl"); -} -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ -?> Modified: trunk/search.php =================================================================== --- trunk/search.php 2007-11-03 19:21:27 UTC (rev 180) +++ trunk/search.php 2007-11-03 22:24:34 UTC (rev 181) @@ -59,14 +59,7 @@ if (empty ($fSearch) /* && !empty ($fGo) */) { - if (authentication_has_role('global-admin')) - { - header("Location: list-virtual.php?domain=" . $fDomain ) && exit; - } - else - { - header("Location: overview.php?domain=" . $fDomain ) && exit; - } + header("Location: list-virtual.php?domain=" . $fDomain ) && exit; } if ($CONF['alias_control_admin'] == "YES") Copied: trunk/templates/list-virtual.tpl (from rev 175, trunk/templates/overview.tpl) =================================================================== --- trunk/templates/list-virtual.tpl (rev 0) +++ trunk/templates/list-virtual.tpl 2007-11-03 22:24:34 UTC (rev 181) @@ -0,0 +1,317 @@ +<div id="overview"> +<form name="overview" method="post"> +<select name="fDomain" onChange="this.form.submit();"> +<?php + +$file = 'list-virtual.php'; + +if ($limit['aliases'] == 0) $limit['aliases'] = $PALANG['pOverview_unlimited']; +if ($limit['mailboxes'] == 0) $limit['mailboxes'] = $PALANG['pOverview_unlimited']; +if ($limit['maxquota'] == 0) $limit['maxquota'] = $PALANG['pOverview_unlimited']; +if ($limit['aliases'] < 0) $limit['aliases'] = $PALANG['pOverview_disabled']; +if ($limit['mailboxes'] < 0) $limit['mailboxes'] = $PALANG['pOverview_disabled']; +if ($limit['maxquota'] < 0) $limit['maxquota'] = $PALANG['pOverview_disabled']; + +for ($i = 0; $i < sizeof ($list_domains); $i++) +{ + if ($fDomain == $list_domains[$i]) + { + print "<option value=\"$list_domains[$i]\" selected>$list_domains[$i]</option>\n"; + } + else + { + print "<option value=\"$list_domains[$i]\">$list_domains[$i]</option>\n"; + } +} +?> +</select> +<input type="hidden" name="limit" value="0" /> +<input class="button" type="submit" name="go" value="<?php print $PALANG['pOverview_button']; ?>" /> +</form> +<h4><?php print $PALANG['pOverview_welcome'] . $fDomain; ?></h4> +<p><?php print $PALANG['pOverview_alias_alias_count'] . ": " . $limit['alias_count'] . " / " . $limit['aliases']; ?></p> +<p><?php print $PALANG['pOverview_alias_mailbox_count'] . ": " . $limit['mailbox_count'] . " / " . $limit['mailboxes']; ?></p> +<form name="search" method="post" action="search.php"><?php print $PALANG['pSearch']; ?>: +<input type="textbox" name="search" size="10" /> +</form> +</div> + +<div id="nav_bar"> + <table width=730><colgroup span="1"><col width="550"></col></colgroup> + <tr><td align=left > +<?php +if ($limit['alias_pgindex_count'] ) print "<b>".$PALANG['pOverview_alias_title']."</b>  "; +($tDisplay_back_show == 1) ? $highlight_at = $tDisplay_back / $CONF['page_size'] + 1 : $highlight_at = 0; +$current_limit=$highlight_at * $CONF['page_size']; +for ($i = 0; $i < $limit['alias_pgindex_count']; $i++) +{ + if ( $i == $highlight_at ) + { + print "<a href=\"$file?domain=$fDomain&limit=" . $i * $CONF['page_size'] . "\"><b>" . $limit['alias_pgindex'][$i] . "</b></a>\n"; + } + else + { + print "<a href=\"$file?domain=$fDomain&limit=" . $i * $CONF['page_size'] . "\">" . $limit['alias_pgindex'][$i] . "</a>\n"; + } +} +print "</td><td valign=middle align=right>"; + +if ($tDisplay_back_show == 1) +{ + print "<a href=\"$file?domain=$fDomain&limit=$tDisplay_back\"><img border=\"0\" src=\"images/arrow-l.png\" title=\"" . $PALANG['pOverview_left_arrow'] . "\" alt=\"" . $PALANG['pOverview_left_arrow'] . "\" /></a>\n"; +} +if ($tDisplay_up_show == 1) +{ + print "<a href=\"$file?domain=$fDomain&limit=0\"><img border=\"0\" src=\"images/arrow-u.png\" title=\"" . $PALANG['pOverview_up_arrow'] . "\" alt=\"" . $PALANG['pOverview_up_arrow'] . "\" /></a>\n"; +} +if ($tDisplay_next_show == 1) +{ + print "<a href=\"$file?domain=$fDomain&limit=$tDisplay_next\"><img border=\"0\" src=\"images/arrow-r.png\" title=\"" . $PALANG['pOverview_right_arrow'] . "\" alt=\"" . $PALANG['pOverview_right_arrow'] . "\" /></a>\n"; +} +print "</td></tr></table></div>\n"; + +if (sizeof ($tAlias) > 0) +{ + print "<table id=\"alias_table\">\n"; + print " <tr>\n"; + print " <td colspan=\"7\"><h3>" . $PALANG['pOverview_alias_title'] . "</h3></td>"; + print " </tr>"; + print " <tr class=\"header\">\n"; + if ($CONF['show_status'] == 'YES') { print "<td></td>\n"; } + print " <td>" . $PALANG['pOverview_alias_address'] . "</td>\n"; + print " <td>" . $PALANG['pOverview_alias_goto'] . "</td>\n"; + print " <td>" . $PALANG['pOverview_alias_modified'] . "</td>\n"; + print " <td>" . $PALANG['pOverview_alias_active'] . "</td>\n"; + print " <td colspan=\"2\"> </td>\n"; + print " </tr>\n"; + + for ($i = 0; $i < sizeof ($tAlias); $i++) + { + if ((is_array ($tAlias) and sizeof ($tAlias) > 0)) + { + print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n"; + if ($CONF['show_status'] == 'YES') + { + print " <td>" . gen_show_status($tAlias[$i]['address']) . "</td>\n"; + } + + print " <td>" . $tAlias[$i]['address'] . "</td>\n"; + if ($CONF['alias_goto_limit'] > 0) { + print " <td>" . ereg_replace (",", "<br>", preg_replace('/^(([^,]+,){'.$CONF['alias_goto_limit'].'})[^,]+,.*/','$1[and '. (substr_count ($tAlias[$i]['goto'], ',') - $CONF['alias_goto_limit'] + 1) .' more...]',$tAlias[$i]['goto'])) . "</td>\n"; + } else { + print " <td>" . ereg_replace (",", "<br>", $tAlias[$i]['goto']) . "</td>\n"; + } + print " <td>" . $tAlias[$i]['modified'] . "</td>\n"; + + +# TODO: merge superadmin / domain admin code + if (authentication_has_role('global-admin')) { +# superadmin code + $active = ($tAlias[$i]['active'] == 1) ? $PALANG['YES'] : $PALANG['NO']; + print " <td><a href=\"edit-active.php?alias=" . urlencode ($tAlias[$i]['address']) . "&domain=$fDomain&return=$file?domain=$fDomain" . urlencode ("&limit=" . $current_limit) . "\">" . $active . "</a></td>\n"; + print " <td><a href=\"edit-alias.php?address=" . urlencode ($tAlias[$i]['address']) . "&domain=$fDomain" . "\">" . $PALANG['edit'] . "</a></td>\n"; + print " <td><a href=\"delete.php?table=alias" . "&delete=" . urlencode ($tAlias[$i]['address']) . "&domain=$fDomain" . "\"onclick=\"return confirm ('" . $PALANG['confirm'] . $PALANG['pOverview_get_aliases'] . ": ". $tAlias[$i]['address'] . "')\">" . $PALANG['del'] . "</a></td>\n"; + + } else { +# domain admin code + if ($CONF['special_alias_control'] == 'YES') + { + $active = ($tAlias[$i]['active'] == 1) ? $PALANG['YES'] : $PALANG['NO']; + print " <td><a href=\"edit-active.php?alias=" . urlencode ($tAlias[$i]['address']) . "&domain=$fDomain" . "\">" . $active . "</a></td>\n"; + print " <td><a href=\"edit-alias.php?address=" . urlencode ($tAlias[$i]['address']) . "&domain=$fDomain" . "\">" . $PALANG['edit'] . "</a></td>\n"; + print " <td><a href=\"delete.php?table=alias&delete=" . urlencode ($tAlias[$i]['address']) . "&domain=$fDomain" . "\"onclick=\"return confirm ('" . $PALANG['confirm'] . $PALANG['pOverview_get_aliases'] . ": ". $tAlias[$i]['address'] . "')\">" . $PALANG['del'] . "</a></td>\n"; + } + else + { + if ( check_alias_owner ($SESSID_USERNAME, $tAlias[$i]['address'])) + { + $active = ($tAlias[$i]['active'] == 1) ? $PALANG['YES'] : $PALANG['NO']; + print " <td><a href=\"edit-active.php?alias=" . urlencode ($tAlias[$i]['address']) . "&domain=$fDomain" . "\">" . $active . "</a></td>\n"; + print " <td><a href=\"edit-alias.php?address=" . urlencode ($tAlias[$i]['address']) . "&domain=$fDomain" . "\">" . $PALANG['edit'] . "</a></td>\n"; + print " <td><a href=\"delete.php?table=mailbox&delete=" . urlencode ($tAlias[$i]['address']) . "&domain=$fDomain" . "\"onclick=\"return confirm ('" . $PALANG['confirm'] . $PALANG['pOverview_get_aliases'] . ": ". $tAlias[$i]['address'] . "')\">" . $PALANG['del'] . "</a></td>\n"; + } + else + { + //this is a special alias, show status only, don't allow changes + $active = ($tAlias[$i]['active'] == 1) ? $PALANG['YES'] : $PALANG['NO']; + print " <td>" . $active . "</td>\n"; + print " <td> </td>\n"; + print " <td> </td>\n"; + } + } +# end diff + } + + print " </tr>\n"; + } + } + print "</table>\n"; +} + +if($tCanAddAlias) { + print "<p><a href=\"create-alias.php?domain=$fDomain\">" . $PALANG['pMenu_create_alias'] . "</a>\n"; +} + + print "<div id=\"nav_bar\"><a name=\"MidArrow\"></a>\n<table width=730><colgroup span=\"1\"> <col width=\"550\"></col></colgroup> <tr><td align=left >"; + if ( $limit['mbox_pgindex_count'] ) print "<b>".$PALANG['pOverview_mailbox_title']."</b>  "; + ($tDisplay_back_show == 1) ? $highlight_at = $tDisplay_back / $CONF['page_size'] + 1 : $highlight_at = 0; + for ($i = 0; $i < $limit['mbox_pgindex_count']; $i++) + { + if ( $i == $highlight_at ) + { + print "<a href=\"$file?domain=$fDomain&limit=" . $i * $CONF['page_size'] . "#MidArrow\"><b>" . $limit['mbox_pgindex'][$i] . "</b></a>\n"; + } + else + { + print "<a href=\"$file?domain=$fDomain&limit=" . $i * $CONF['page_size'] . "#MidArrow\">" . $limit['mbox_pgindex'][$i] . "</a>\n"; + } + } + print "</td><td valign=middle align=right>"; + +if ($tDisplay_back_show == 1) +{ + print "<a href=\"$file?domain=$fDomain&limit=$tDisplay_back#MidArrow\"><img border=\"0\" src=\"images/arrow-l.png\" title=\"" . $PALANG['pOverview_left_arrow'] . "\" alt=\"" . $PALANG['pOverview_left_arrow'] . "\" /></a>\n"; +} +if ($tDisplay_up_show == 1) +{ + print "<a href=\"$file?domain=$fDomain&limit=0#MidArrow\"><img border=\"0\" src=\"images/arrow-u.png\" title=\"" . $PALANG['pOverview_up_arrow'] . "\" alt=\"" . $PALANG['pOverview_up_arrow'] . "\" /></a>\n"; +} +if ($tDisplay_next_show == 1) +{ + print "<a href=\"$file?domain=$fDomain&limit=$tDisplay_next#MidArrow\"><img border=\"0\" src=\"images/arrow-r.png\" title=\"" . $PALANG['pOverview_right_arrow'] . "\" alt=\"" . $PALANG['pOverview_right_arrow'] . "\" /></a>\n"; +} +print "</td></tr></table></div>\n"; + +if (sizeof ($tMailbox) > 0) +{ + $colspan=8; + if ($CONF['vacation_control_admin'] == 'YES') $colspan=$colspan+1; + if ($CONF['alias_control_admin'] == 'YES') $colspan=$colspan+1; + print "<table id=\"mailbox_table\">\n"; + print " <tr>\n"; + print " <td colspan=\"$colspan\"><h3>" . $PALANG['pOverview_mailbox_title'] . "</h3></td>"; + print " </tr>"; + print " <tr class=\"header\">\n"; + if ($CONF['show_status'] == 'YES') { print "<td></td>\n"; } + print " <td>" . $PALANG['pOverview_mailbox_username'] . "</td>\n"; + print " <td>" . $PALANG['pOverview_mailbox_name'] . "</td>\n"; + if ($CONF['quota'] == 'YES') print " <td>" . $PALANG['pOverview_mailbox_quota'] . "</td>\n"; + print " <td>" . $PALANG['pOverview_mailbox_modified'] . "</td>\n"; + print " <td>" . $PALANG['pOverview_mailbox_active'] . "</td>\n"; + $colspan = $colspan - 6; + print " <td colspan=\"$colspan\"> </td>\n"; + print " </tr>\n"; + + for ($i = 0; $i < sizeof ($tMailbox); $i++) + { + if ((is_array ($tMailbox) and sizeof ($tMailbox) > 0)) + { + print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n"; + + if ($CONF['show_status'] == 'YES') + { + print " <td>" . gen_show_status($tMailbox[$i]['username']) . "</td>\n"; + } + + print " <td>" . $tMailbox[$i]['username'] . "</td>\n"; + print " <td>" . $tMailbox[$i]['name'] . "</td>\n"; + if ($CONF['quota'] == 'YES') + { + print " <td>"; + if ($tMailbox[$i]['quota'] == 0) + { + print $PALANG['pOverview_unlimited']; + } + elseif ($tMailbox[$i]['quota'] < 0) + { + print $PALANG['pOverview_disabled']; + } + else + { + print divide_quota ($tMailbox[$i]['quota']); + } + print "</td>\n"; + } + print " <td>" . $tMailbox[$i]['modified'] . "</td>\n"; + $active = ($tMailbox[$i]['active'] == 1) ? $PALANG['YES'] : $PALANG['NO']; + print " <td><a href=\"edit-active.php?username=" . urlencode ($tMailbox[$i]['username']) . "&domain=$fDomain" . "\">" . $active . "</a></td>\n"; + + if ($CONF['vacation_control_admin'] == 'YES') + { + $v_active_int = $tMailbox[$i]['v_active']; + if($v_active_int !== -1) { + if($v_active_int == 1) { + $v_active = $PALANG['pOverview_vacation_edit']; + } + else { + $v_active = $PALANG['pOverview_vacation_option']; + } + print "<td><a href=\"edit-vacation.php?username=" . urlencode ($tMailbox[$i]['username']) . "&domain=$fDomain" . "\">" . $v_active . "</a></td>\n"; + } + else { + // can't tell vacation state - broken pgsql query + echo "<td> </td>\n"; + } + } + + $edit_aliases=0; + if ( authentication_has_role('global-admin') && $CONF['alias_control_admin'] == 'YES') $edit_aliases = 1; + if ( (! authentication_has_role('global-admin')) && $CONF['alias_control'] == 'YES') $edit_aliases = 1; + + if ($edit_aliases == 1) + { + print " <td><a href=\"edit-alias.php?address=" . urlencode ($tMailbox[$i]['username']) . "&domain=$fDomain" . "\">" . $PALANG['pOverview_alias_edit'] . "</a></td>\n"; + } + + print " <td><a href=\"edit-mailbox.php?username=" . urlencode ($tMailbox[$i]['username']) . "&domain=$fDomain" . "\">" . $PALANG['edit'] . "</a></td>\n"; + print " <td><a href=\"delete.php?table=mailbox" . "&delete=" . urlencode ($tMailbox[$i]['username']) . "&domain=$fDomain" . "\"onclick=\"return confirm ('" . $PALANG['confirm'] . $PALANG['pOverview_get_mailboxes'] . ": ". $tMailbox[$i]['username'] . "')\">" . $PALANG['del'] . "</a></td>\n"; + print " </tr>\n"; + } + } + print "</table>\n"; + print "<div id=\"nav_bar\"><a name=\"LowArrow\" /a>\n"; + if ($tDisplay_back_show == 1) + { + print "<a href=\"$file?domain=$fDomain&limit=$tDisplay_back#LowArrow\"><img border=\"0\" src=\"images/arrow-l.png\" title=\"" . $PALANG['pOverview_left_arrow'] . "\" alt=\"" . $PALANG['pOverview_left_arrow'] . "\" /></a>\n"; + } + if ($tDisplay_up_show == 1) + { + print "<a href=\"$file?domain=$fDomain&limit=0#LowArrow\"><img border=\"0\" src=\"images/arrow-u.png\" title=\"" . $PALANG['pOverview_up_arrow'] . "\" alt=\"" . $PALANG['pOverview_up_arrow'] . "\" /></a>\n"; + } + if ($tDisplay_next_show == 1) + { + print "<a href=\"$file?domain=$fDomain&limit=$tDisplay_next#LowArrow\"><img border=\"0\" src=\"images/arrow-r.png\" title=\"" . $PALANG['pOverview_right_arrow'] . "\" alt=\"" . $PALANG['pOverview_right_arrow'] . "\" /></a>\n"; + } + print "</div>\n"; + +} +if($tCanAddMailbox) { + print "<p><a href=\"create-mailbox.php?domain=$fDomain\">" . $PALANG['pMenu_create_mailbox'] . "</a>\n"; +} + +if ($CONF['show_status'] == 'YES' && $CONF['show_status_key'] == 'YES') +{ + print "<br><br>"; + if ($CONF['show_undeliverable'] == 'YES') + { + print " <span style='background-color:" . $CONF['show_undeliverable_color'] . + "'>" . $CONF['show_status_text'] . "</span>=" . $PALANG['pStatus_undeliverable'] . "\n"; + } + if ($CONF['show_popimap'] == 'YES') + { + print " <span style='background-color:" . $CONF['show_popimap_color'] . + "'>" . $CONF['show_status_text'] . "</span>=" . $PALANG['pStatus_popimap'] . "\n"; + } + if ( $CONF['show_custom_count'] > 0 ) + { + for ($i = 0; $i < sizeof ($CONF['show_custom_domains']); $i++) + { + print " <span style='background-color:" . $CONF['show_custom_colors'][$i] . "'>" . + $CONF['show_status_text'] . "</span>=" . $PALANG['pStatus_custom'] . + $CONF['show_custom_domains'][$i] . "\n"; + } + } +} + +/* vim: set ft=php expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ +?> Modified: trunk/templates/main.tpl =================================================================== --- trunk/templates/main.tpl 2007-11-03 19:21:27 UTC (rev 180) +++ trunk/templates/main.tpl 2007-11-03 22:24:34 UTC (rev 181) @@ -1,7 +1,7 @@ <div id="main_menu"> <table> <tr> - <td nowrap><a target="_top" href="overview.php"><?php print $PALANG['pMenu_overview']; ?></a></td> + <td nowrap><a target="_top" href="list-domain.php"><?php print $PALANG['pMenu_overview']; ?></a></td> <td><?php print $PALANG['pMain_overview']; ?></td> </tr> <tr> Modified: trunk/templates/menu.tpl =================================================================== --- trunk/templates/menu.tpl 2007-11-03 19:21:27 UTC (rev 180) +++ trunk/templates/menu.tpl 2007-11-03 22:24:34 UTC (rev 181) @@ -26,15 +26,16 @@ $submenu_domain = ""; } + if (authentication_has_role('global-admin')) { print _menulink("list-admin.php", $PALANG['pAdminMenu_list_admin'], $submenu_admin); - print _menulink("list-domain.php", $PALANG['pAdminMenu_list_domain'], $submenu_domain); - print _menulink("list-virtual.php", $PALANG['pAdminMenu_list_virtual'], $submenu_virtual); } else { print _menulink("main.php", $PALANG['pMenu_main']); - print _menulink("overview.php", $PALANG['pMenu_overview'], $submenu_virtual); } +print _menulink("list-domain.php", $PALANG['pAdminMenu_list_domain'], $submenu_domain); +print _menulink("list-virtual.php", $PALANG['pAdminMenu_list_virtual'], $submenu_virtual); + if ($CONF['fetchmail'] == 'YES') { print _menulink("fetchmail.php", $PALANG['pMenu_fetchmail'], $submenu_fetchmail); } Modified: trunk/templates/overview-get.tpl =================================================================== --- trunk/templates/overview-get.tpl 2007-11-03 19:21:27 UTC (rev 180) +++ trunk/templates/overview-get.tpl 2007-11-03 22:24:34 UTC (rev 181) @@ -48,7 +48,7 @@ if ($limit['maxquota'] < 0) $limit['maxquota'] = $PALANG['pOverview_disabled']; print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n"; - print " <td><a href=\"overview.php?domain=" . $list_domains[$i] . "\">" . $list_domains[$i] . "</a></td>\n"; + print " <td><a href=\"list-virtual.php?domain=" . $list_domains[$i] . "\">" . $list_domains[$i] . "</a></td>\n"; print " <td>" . $limit['alias_count'] . " / " . $limit['aliases'] . "</td>\n"; print " <td>" . $limit['mailbox_count'] . " / " . $limit['mailboxes'] . "</td>\n"; if ($CONF['quota'] == 'YES') print " <td>" . $limit['maxquota'] . "</td>\n"; Deleted: trunk/templates/overview.tpl =================================================================== --- trunk/templates/overview.tpl 2007-11-03 19:21:27 UTC (rev 180) +++ trunk/templates/overview.tpl 2007-11-03 22:24:34 UTC (rev 181) @@ -1,323 +0,0 @@ -<div id="overview"> -<form name="overview" method="post"> -<select name="fDomain" onChange="this.form.submit();"> -<?php - -if (authentication_has_role('global-admin')) { - $file = 'list-virtual.php'; - $incpath = '..'; # warning: overrides $incpath from common.php - TODO: fix common.php $incpath -} else { - $file = 'overview.php'; - $incpath = '.'; # warning: overrides $incpath from common.php - TODO: fix common.php $incpath -} - -if ($limit['aliases'] == 0) $limit['aliases'] = $PALANG['pOverview_unlimited']; -if ($limit['mailboxes'] == 0) $limit['mailboxes'] = $PALANG['pOverview_unlimited']; -if ($limit['maxquota'] == 0) $limit['maxquota'] = $PALANG['pOverview_unlimited']; -if ($limit['aliases'] < 0) $limit['aliases'] = $PALANG['pOverview_disabled']; -if ($limit['mailboxes'] < 0) $limit['mailboxes'] = $PALANG['pOverview_disabled']; -if ($limit['maxquota'] < 0) $limit['maxquota'] = $PALANG['pOverview_disabled']; - -for ($i = 0; $i < sizeof ($list_domains); $i++) -{ - if ($fDomain == $list_domains[$i]) - { - print "<option value=\"$list_domains[$i]\" selected>$list_domains[$i]</option>\n"; - } - else - { - print "<option value=\"$list_domains[$i]\">$list_domains[$i]</option>\n"; - } -} -?> -</select> -<input type="hidden" name="limit" value="0" /> -<input class="button" type="submit" name="go" value="<?php print $PALANG['pOverview_button']; ?>" /> -</form> -<h4><?php print $PALANG['pOverview_welcome'] . $fDomain; ?></h4> -<p><?php print $PALANG['pOverview_alias_alias_count'] . ": " . $limit['alias_count'] . " / " . $limit['aliases']; ?></p> -<p><?php print $PALANG['pOverview_alias_mailbox_count'] . ": " . $limit['mailbox_count'] . " / " . $limit['mailboxes']; ?></p> -<form name="search" method="post" action="search.php"><?php print $PALANG['pSearch']; ?>: -<input type="textbox" name="search" size="10" /> -</form> -</div> - -<div id="nav_bar"> - <table width=730><colgroup span="1"><col width="550"></col></colgroup> - <tr><td align=left > -<?php -if ($limit['alias_pgindex_count'] ) print "<b>".$PALANG['pOverview_alias_title']."</b>  "; -($tDisplay_back_show == 1) ? $highlight_at = $tDisplay_back / $CONF['page_size'] + 1 : $highlight_at = 0; -$current_limit=$highlight_at * $CONF['page_size']; -for ($i = 0; $i < $limit['alias_pgindex_count']; $i++) -{ - if ( $i == $highlight_at ) - { - print "<a href=\"$file?domain=$fDomain&limit=" . $i * $CONF['page_size'] . "\"><b>" . $limit['alias_pgindex'][$i] . "</b></a>\n"; - } - else - { - print "<a href=\"$file?domain=$fDomain&limit=" . $i * $CONF['page_size'] . "\">" . $limit['alias_pgindex'][$i] . "</a>\n"; - } -} -print "</td><td valign=middle align=right>"; - -if ($tDisplay_back_show == 1) -{ - print "<a href=\"$file?domain=$fDomain&limit=$tDisplay_back\"><img border=\"0\" src=\"$incpath/images/arrow-l.png\" title=\"" . $PALANG['pOverview_left_arrow'] . "\" alt=\"" . $PALANG['pOverview_left_arrow'] . "\" /></a>\n"; -} -if ($tDisplay_up_show == 1) -{ - print "<a href=\"$file?domain=$fDomain&limit=0\"><img border=\"0\" src=\"$incpath/images/arrow-u.png\" title=\"" . $PALANG['pOverview_up_arrow'] . "\" alt=\"" . $PALANG['pOverview_up_arrow'] . "\" /></a>\n"; -} -if ($tDisplay_next_show == 1) -{ - print "<a href=\"$file?domain=$fDomain&limit=$tDisplay_next\"><img border=\"0\" src=\"$incpath/images/arrow-r.png\" title=\"" . $PALANG['pOverview_right_arrow'] . "\" alt=\"" . $PALANG['pOverview_right_arrow'] . "\" /></a>\n"; -} -print "</td></tr></table></div>\n"; - -if (sizeof ($tAlias) > 0) -{ - print "<table id=\"alias_table\">\n"; - print " <tr>\n"; - print " <td colspan=\"7\"><h3>" . $PALANG['pOverview_alias_title'] . "</h3></td>"; - print " </tr>"; - print " <tr class=\"header\">\n"; - if ($CONF['show_status'] == 'YES') { print "<td></td>\n"; } - print " <td>" . $PALANG['pOverview_alias_address'] . "</td>\n"; - print " <td>" . $PALANG['pOverview_alias_goto'] . "</td>\n"; - print " <td>" . $PALANG['pOverview_alias_modified'] . "</td>\n"; - print " <td>" . $PALANG['pOverview_alias_active'] . "</td>\n"; - print " <td colspan=\"2\"> </td>\n"; - print " </tr>\n"; - - for ($i = 0; $i < sizeof ($tAlias); $i++) - { - if ((is_array ($tAlias) and sizeof ($tAlias) > 0)) - { - print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n"; - if ($CONF['show_status'] == 'YES') - { - print " <td>" . gen_show_status($tAlias[$i]['address']) . "</td>\n"; - } - - print " <td>" . $tAlias[$i]['address'] . "</td>\n"; - if ($CONF['alias_goto_limit'] > 0) { - print " <td>" . ereg_replace (",", "<br>", preg_replace('/^(([^,]+,){'.$CONF['alias_goto_limit'].'})[^,]+,.*/','$1[and '. (substr_count ($tAlias[$i]['goto'], ',') - $CONF['alias_goto_limit'] + 1) .' more...]',$tAlias[$i]['goto'])) . "</td>\n"; - } else { - print " <td>" . ereg_replace (",", "<br>", $tAlias[$i]['goto']) . "</td>\n"; - } - print " <td>" . $tAlias[$i]['modified'] . "</td>\n"; - - -# TODO: merge superadmin / domain admin code - if (authentication_has_role('global-admin')) { -# superadmin code - $active = ($tAlias[$i]['active'] == 1) ? $PALANG['YES'] : $PALANG['NO']; - print " <td><a href=\"edit-active.php?alias=" . urlencode ($tAlias[$i]['address']) . "&domain=$fDomain&return=$file?domain=$fDomain" . urlencode ("&limit=" . $current_limit) . "\">" . $active . "</a></td>\n"; - print " <td><a href=\"edit-alias.php?address=" . urlencode ($tAlias[$i]['address']) . "&domain=$fDomain" . "\">" . $PALANG['edit'] . "</a></td>\n"; - print " <td><a href=\"delete.php?table=alias" . "&delete=" . urlencode ($tAlias[$i]['address']) . "&domain=$fDomain" . "\"onclick=\"return confirm ('" . $PALANG['confirm'] . $PALANG['pOverview_get_aliases'] . ": ". $tAlias[$i]['address'] . "')\">" . $PALANG['del'] . "</a></td>\n"; - - } else { -# domain admin code - if ($CONF['special_alias_control'] == 'YES') - { - $active = ($tAlias[$i]['active'] == 1) ? $PALANG['YES'] : $PALANG['NO']; - print " <td><a href=\"edit-active.php?alias=" . urlencode ($tAlias[$i]['address']) . "&domain=$fDomain" . "\">" . $active . "</a></td>\n"; - print " <td><a href=\"edit-alias.php?address=" . urlencode ($tAlias[$i]['address']) . "&domain=$fDomain" . "\">" . $PALANG['edit'] . "</a></td>\n"; - print " <td><a href=\"delete.php?table=alias&delete=" . urlencode ($tAlias[$i]['address']) . "&domain=$fDomain" . "\"onclick=\"return confirm ('" . $PALANG['confirm'] . $PALANG['pOverview_get_aliases'] . ": ". $tAlias[$i]['address'] . "')\">" . $PALANG['del'] . "</a></td>\n"; - } - else - { - if ( check_alias_owner ($SESSID_USERNAME, $tAlias[$i]['address'])) - { - $active = ($tAlias[$i]['active'] == 1) ? $PALANG['YES'] : $PALANG['NO']; - print " <td><a href=\"edit-active.php?alias=" . urlencode ($tAlias[$i]['address']) . "&domain=$fDomain" . "\">" . $active . "</a></td>\n"; - print " <td><a href=\"edit-alias.php?address=" . urlencode ($tAlias[$i]['address']) . "&domain=$fDomain" . "\">" . $PALANG['edit'] . "</a></td>\n"; - print " <td><a href=\"delete.php?table=mailbox&delete=" . urlencode ($tAlias[$i]['address']) . "&domain=$fDomain" . "\"onclick=\"return confirm ('" . $PALANG['confirm'] . $PALANG['pOverview_get_aliases'] . ": ". $tAlias[$i]['address'] . "')\">" . $PALANG['del'] . "</a></td>\n"; - } - else - { - //this is a special alias, show status only, don't allow changes - $active = ($tAlias[$i]['active'] == 1) ? $PALANG['YES'] : $PALANG['NO']; - print " <td>" . $active . "</td>\n"; - print " <td> </td>\n"; - print " <td> </td>\n"; - } - } -# end diff - } - - print " </tr>\n"; - } - } - print "</table>\n"; -} - -if($tCanAddAlias) { - print "<p><a href=\"create-alias.php?domain=$fDomain\">" . $PALANG['pMenu_create_alias'] . "</a>\n"; -} - - print "<div id=\"nav_bar\"><a name=\"MidArrow\" /a>\n<table width=730><colgroup span=\"1\"> <col width=\"550\"></col></colgroup> <tr><td align=left >"; - if ( $limit['mbox_pgindex_count'] ) print "<b>".$PALANG['pOverview_mailbox_title']."</b>  "; - ($tDisplay_back_show == 1) ? $highlight_at = $tDisplay_back / $CONF['page_size'] + 1 : $highlight_at = 0; - for ($i = 0; $i < $limit['mbox_pgindex_count']; $i++) - { - if ( $i == $highlight_at ) - { - print "<a href=\"$file?domain=$fDomain&limit=" . $i * $CONF['page_size'] . "#MidArrow\"><b>" . $limit['mbox_pgindex'][$i] . "</b></a>\n"; - } - else - { - print "<a href=\"$file?domain=$fDomain&limit=" . $i * $CONF['page_size'] . "#MidArrow\">" . $limit['mbox_pgindex'][$i] . "</a>\n"; - } - } - print "</td><td valign=middle align=right>"; - -if ($tDisplay_back_show == 1) -{ - print "<a href=\"$file?domain=$fDomain&limit=$tDisplay_back#MidArrow\"><img border=\"0\" src=\"$incpath/images/arrow-l.png\" title=\"" . $PALANG['pOverview_left_arrow'] . "\" alt=\"" . $PALANG['pOverview_left_arrow'] . "\" /></a>\n"; -} -if ($tDisplay_up_show == 1) -{ - print "<a href=\"$file?domain=$fDomain&limit=0#MidArrow\"><img border=\"0\" src=\"$incpath/images/arrow-u.png\" title=\"" . $PALANG['pOverview_up_arrow'] . "\" alt=\"" . $PALANG['pOverview_up_arrow'] . "\" /></a>\n"; -} -if ($tDisplay_next_show == 1) -{ - print "<a href=\"$file?domain=$fDomain&limit=$tDisplay_next#MidArrow\"><img border=\"0\" src=\"$incpath/images/arrow-r.png\" title=\"" . $PALANG['pOverview_right_arrow'] . "\" alt=\"" . $PALANG['pOverview_right_arrow'] . "\" /></a>\n"; -} -print "</td></tr></table></div>\n"; - -if (sizeof ($tMailbox) > 0) -{ - $colspan=8; - if ($CONF['vacation_control_admin'] == 'YES') $colspan=$colspan+1; - if ($CONF['alias_control_admin'] == 'YES') $colspan=$colspan+1; - print "<table id=\"mailbox_table\">\n"; - print " <tr>\n"; - print " <td colspan=\"$colspan\"><h3>" . $PALANG['pOverview_mailbox_title'] . "</h3></td>"; - print " </tr>"; - print " <tr class=\"header\">\n"; - if ($CONF['show_status'] == 'YES') { print "<td></td>\n"; } - print " <td>" . $PALANG['pOverview_mailbox_username'] . "</td>\n"; - print " <td>" . $PALANG['pOverview_mailbox_name'] . "</td>\n"; - if ($CONF['quota'] == 'YES') print " <td>" . $PALANG['pOverview_mailbox_quota'] . "</td>\n"; - print " <td>" . $PALANG['pOverview_mailbox_modified'] . "</td>\n"; - print " <td>" . $PALANG['pOverview_mailbox_active'] . "</td>\n"; - $colspan = $colspan - 6; - print " <td colspan=\"$colspan\"> </td>\n"; - print " </tr>\n"; - - for ($i = 0; $i < sizeof ($tMailbox); $i++) - { - if ((is_array ($tMailbox) and sizeof ($tMailbox) > 0)) - { - print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n"; - - if ($CONF['show_status'] == 'YES') - { - print " <td>" . gen_show_status($tMailbox[$i]['username']) . "</td>\n"; - } - - print " <td>" . $tMailbox[$i]['username'] . "</td>\n"; - print " <td>" . $tMailbox[$i]['name'] . "</td>\n"; - if ($CONF['quota'] == 'YES') - { - print " <td>"; - if ($tMailbox[$i]['quota'] == 0) - { - print $PALANG['pOverview_unlimited']; - } - elseif ($tMailbox[$i]['quota'] < 0) - { - print $PALANG['pOverview_disabled']; - } - else - { - print divide_quota ($tMailbox[$i]['quota']); - } - print "</td>\n"; - } - print " <td>" . $tMailbox[$i]['modified'] . "</td>\n"; - $active = ($tMailbox[$i]['active'] == 1) ? $PALANG['YES'] : $PALANG['NO']; - print " <td><a href=\"edit-active.php?username=" . urlencode ($tMailbox[$i]['username']) . "&domain=$fDomain" . "\">" . $active . "</a></td>\n"; - - if ($CONF['vacation_control_admin'] == 'YES') - { - $v_active_int = $tMailbox[$i]['v_active']; - if($v_active_int !== -1) { - if($v_active_int == 1) { - $v_active = $PALANG['pOverview_vacation_edit']; - } - else { - $v_active = $PALANG['pOverview_vacation_option']; - } - print "<td><a href=\"edit-vacation.php?username=" . urlencode ($tMailbox[$i]['username']) . "&domain=$fDomain" . "\">" . $v_active . "</a></td>\n"; - } - else { - // can't tell vacation state - broken pgsql query - echo "<td> </td>\n"; - } - } - - $edit_aliases=0; - if ( authentication_has_role('global-admin') && $CONF['alias_control_admin'] == 'YES') $edit_aliases = 1; - if ( (! authentication_has_role('global-admin')) && $CONF['alias_control'] == 'YES') $edit_aliases = 1; - - if ($edit_aliases == 1) - { - print " <td><a href=\"edit-alias.php?address=" . urlencode ($tMailbox[$i]['username']) . "&domain=$fDomain" . "\">" . $PALANG['pOverview_alias_edit'] . "</a></td>\n"; - } - - print " <td><a href=\"edit-mailbox.php?username=" . urlencode ($tMailbox[$i]['username']) . "&domain=$fDomain" . "\">" . $PALANG['edit'] . "</a></td>\n"; - print " <td><a href=\"delete.php?table=mailbox" . "&delete=" . urlencode ($tMailbox[$i]['username']) . "&domain=$fDomain" . "\"onclick=\"return confirm ('" . $PALANG['confirm'] . $PALANG['pOverview_get_mailboxes'] . ": ". $tMailbox[$i]['username'] . "')\">" . $PALANG['del'] . "</a></td>\n"; - print " </tr>\n"; - } - } - print "</table>\n"; - print "<div id=\"nav_bar\"><a name=\"LowArrow\" /a>\n"; - if ($tDisplay_back_show == 1) - { - print "<a href=\"$file?domain=$fDomain&limit=$tDisplay_back#LowArrow\"><img border=\"0\" src=\"$incpath/images/arrow-l.png\" title=\"" . $PALANG['pOverview_left_arrow'] . "\" alt=\"" . $PALANG['pOverview_left_arrow'] . "\" /></a>\n"; - } - if ($tDisplay_up_show == 1) - { - print "<a href=\"$file?domain=$fDomain&limit=0#LowArrow\"><img border=\"0\" src=\"$incpath/images/arrow-u.png\" title=\"" . $PALANG['pOverview_up_arrow'] . "\" alt=\"" . $PALANG['pOverview_up_arrow'] . "\" /></a>\n"; - } - if ($tDisplay_next_show == 1) - { - print "<a href=\"$file?domain=$fDomain&limit=$tDisplay_next#LowArrow\"><img border=\"0\" src=\"$incpath/images/arrow-r.png\" title=\"" . $PALANG['pOverview_right_arrow'] . "\" alt=\"" . $PALANG['pOverview_right_arrow'] . "\" /></a>\n"; - } - print "</div>\n"; - -} -if($tCanAddMailbox) { - print "<p><a href=\"create-mailbox.php?domain=$fDomain\">" . $PALANG['pMenu_create_mailbox'] . "</a>\n"; -} - -if ($CONF['show_status'] == 'YES' && $CONF['show_status_key'] == 'YES') -{ - print "<br><br>"; - if ($CONF['show_undeliverable'] == 'YES') - { - print " <span style='background-color:" . $CONF['show_undeliverable_color'] . - "'>" . $CONF['show_status_text'] . "</span>=" . $PALANG['pStatus_undeliverable'] . "\n"; - } - if ($CONF['show_popimap'] == 'YES') - { - print " <span style='background-color:" . $CONF['show_popimap_color'] . - "'>" . $CONF['show_status_text'] . "</span>=" . $PALANG['pStatus_popimap'] . "\n"; - } - if ( $CONF['show_custom_count'] > 0 ) - { - for ($i = 0; $i < sizeof ($CONF['show_custom_domains']); $i++) - { - print " <span style='background-color:" . $CONF['show_custom_colors'][$i] . "'>" . - $CONF['show_status_text'] . "</span>=" . $PALANG['pStatus_custom'] . - $CONF['show_custom_domains'][$i] . "\n"; - } - } -} - -/* vim: set ft=php expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ -?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Gin...@us...> - 2007-11-04 16:46:41
|
Revision: 188 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=188&view=rev Author: GingerDog Date: 2007-11-04 08:46:43 -0800 (Sun, 04 Nov 2007) Log Message: ----------- debian: adding - initial support for creating .debs; run dpkg-buildpakcage -rfakeroot within the trunk dir Added Paths: ----------- trunk/debian/ trunk/debian/README.Debian trunk/debian/apache-conf trunk/debian/changelog trunk/debian/compat trunk/debian/conffiles trunk/debian/control trunk/debian/copyright trunk/debian/docs trunk/debian/files trunk/debian/postfixadmin.dirs trunk/debian/rules Added: trunk/debian/README.Debian =================================================================== --- trunk/debian/README.Debian (rev 0) +++ trunk/debian/README.Debian 2007-11-04 16:46:43 UTC (rev 188) @@ -0,0 +1,30 @@ +PostfixAdmin for Debian +======================= + +After installing the package, you should find that : + +http://youserver/postfixadmin/setup.php works. This should +guide you through the appropriate process. + +You will need to create a database (either MySQL or PostgreSQL) +and know the username and password for it. The Database does not need +to be on the same server as the Postfixadmin install. + + + +Recommended and Suggested Packages +================================== + + - Postfix + - MySQL or PostgreSQL + - Courier or Dovecot + +Where to get help +================= + +The first stop would be the Postfixadmin Website, Forum or IRC channel. + +See : + - http://postfixadmin.sf.net + - #postfixadmin on irc.freenode.net + Added: trunk/debian/apache-conf =================================================================== --- trunk/debian/apache-conf (rev 0) +++ trunk/debian/apache-conf 2007-11-04 16:46:43 UTC (rev 188) @@ -0,0 +1,6 @@ +# BEGIN FOR POSTFIXADMIN + +Alias /postfixadmin /usr/share/postfixadmin + + +# END FOR POSTFIXADMIN Added: trunk/debian/changelog =================================================================== --- trunk/debian/changelog (rev 0) +++ trunk/debian/changelog 2007-11-04 16:46:43 UTC (rev 188) @@ -0,0 +1,6 @@ +postfixadmin (2.2.0-1rc1) unstable; urgency=low + + * Initial Release (via dpkg) + + -- David Goodwin <da...@co...> Sun, 04 Nov 2007 15:36:00 +0000 + Added: trunk/debian/compat =================================================================== --- trunk/debian/compat (rev 0) +++ trunk/debian/compat 2007-11-04 16:46:43 UTC (rev 188) @@ -0,0 +1 @@ +5 Added: trunk/debian/conffiles =================================================================== --- trunk/debian/conffiles (rev 0) +++ trunk/debian/conffiles 2007-11-04 16:46:43 UTC (rev 188) @@ -0,0 +1,2 @@ +/etc/apache2/conf.d/postfixadmin +/etc/postfixadmin/config.inc.php Added: trunk/debian/control =================================================================== --- trunk/debian/control (rev 0) +++ trunk/debian/control 2007-11-04 16:46:43 UTC (rev 188) @@ -0,0 +1,25 @@ +Source: postfixadmin +Section: web +Priority: optional +Maintainer: David Goodwin <da...@co...> +Build-Depends: debhelper (>= 5) +Standards-Version: 3.7.2 + +Package: postfixadmin +Architecture: all +Depends: apache2 | httpd, libapache2-mod-php4 | libapache-mod-php4 | php4 | php4-cgi | libapache2-mod-php5 | libapache-mod-php5 | php5-cgi | php5, ${misc:Depends} +Recommends: squirrelmail-locales, ispell | aspell | aspell-bin, perl, postfix, postgresql-server, mysql-server +Suggests: +Description: Virtual mail hosting interface for Postfix + Postfixadmin is a web interface to managing virtual users and domains + for a Postfix mailserver. The web interface is written in PHP. + Postfixadmin allows administrators to delegate handling a domain to domain + administrators. + Postfixadmin allows users to login and change their own settings (e.g. forward, + vacation, password etc). + Postfixadmin also includes support for virtual vacation support - + this requires Perl and various CPAN modules to be installed. + See vacation.pl for further details. + . + Homepage: http://postfixadmin.sf.net/ + Added: trunk/debian/copyright =================================================================== --- trunk/debian/copyright (rev 0) +++ trunk/debian/copyright 2007-11-04 16:46:43 UTC (rev 188) @@ -0,0 +1,30 @@ +This package was debianized by David Goodwin <da...@co...> on +Sun, 04 Nov 2007 15:21:00 +0000. + +It was downloaded from subversion, via http://postfixadmin.sf.net + +Upstream Authors: The PostfixAdmin Development Team <pos...@li...> + +Copyright: + + Copyright (C) 2007 The Postfixadmin Project Team + + This program 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 2 of the License, or + (at your option) any later version. + + This program 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 this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + +On Debian GNU/Linux systems, the complete text of the GNU General Public +License can be found in the `/usr/share/common-licenses' directory. + +The Debian packaging of Postfixadmin is licensed under the same terms +as Postfixadmin itself. Added: trunk/debian/docs =================================================================== --- trunk/debian/docs (rev 0) +++ trunk/debian/docs 2007-11-04 16:46:43 UTC (rev 188) @@ -0,0 +1,6 @@ +VIRTUAL_VACATION +DOCUMENTS +ADDITIONS +LICENSE.TXT +INSTALL.TXT +GPL-LICENSE.TXT Property changes on: trunk/debian/docs ___________________________________________________________________ Name: svn:executable + * Added: trunk/debian/files =================================================================== --- trunk/debian/files (rev 0) +++ trunk/debian/files 2007-11-04 16:46:43 UTC (rev 188) @@ -0,0 +1 @@ +postfixadmin_2.2.0-1rc1_all.deb web optional Added: trunk/debian/postfixadmin.dirs =================================================================== --- trunk/debian/postfixadmin.dirs (rev 0) +++ trunk/debian/postfixadmin.dirs 2007-11-04 16:46:43 UTC (rev 188) @@ -0,0 +1,3 @@ +usr/share/postfixadmin +usr/share/doc/postfixadmin +etc/postfixadmin Added: trunk/debian/rules =================================================================== --- trunk/debian/rules (rev 0) +++ trunk/debian/rules 2007-11-04 16:46:43 UTC (rev 188) @@ -0,0 +1,57 @@ +#!/usr/bin/make -f +# debian/rules makefile for squirrelmail + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +build: build-stamp +build-stamp: + dh_testdir + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + dh_install + cp *.php debian/postfixadmin/usr/share/postfixadmin + mv debian/postfixadmin/usr/share/postfixadmin/config.inc.php debian/postfixadmin/etc/postfixadmin/config.inc.php + ln -s /etc/postfixadmin/config.inc.php debian/postfixadmin/usr/share/postfixadmin/config.inc.php + cp -a admin debian/postfixadmin/usr/share/postfixadmin + cp -a images debian/postfixadmin/usr/share/postfixadmin + cp -a languages debian/postfixadmin/usr/share/postfixadmin + cp -a templates debian/postfixadmin/usr/share/postfixadmin + cp -a users debian/postfixadmin/usr/share/postfixadmin + mkdir -p debian/postfixadmin/etc/apache2/conf.d + cp debian/apache-conf debian/postfixadmin/etc/apache2/conf.d/postfixadmin + find debian/postfixadmin -name .svn | xargs -r rm -r + +# Build architecture-independent files here. +binary-indep: build install + dh_testdir + dh_testroot + dh_installdebconf + dh_installdocs -X.svn + dh_installexamples + dh_installman + dh_installcron + dh_link + dh_compress + dh_fixperms -X/var + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +# Build architecture-dependent files here. +binary-arch: + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install Property changes on: trunk/debian/rules ___________________________________________________________________ Name: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-04 22:52:11
|
Revision: 199 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=199&view=rev Author: christian_boltz Date: 2007-11-04 14:52:16 -0800 (Sun, 04 Nov 2007) Log Message: ----------- functions.inc.php - encode_header(): made charset parameter optional, defaults to utf-8 - db_delete(): escape_string() $where and $delete create-mailbox.php: - always encode mail header and insert Content-Type etc. headers (previous code never did this, $PALANG['charset'] is not set in any language. so this code part was never used) sendmail.php: - always encode mail header and insert Content-Type etc. headers (had the same bug as create-mailbox.php) - merge GET and POST These changes fix http://sourceforge.net/tracker/index.php?func=detail&aid=1811214&group_id=191583&atid=937964 Modified Paths: -------------- trunk/create-mailbox.php trunk/functions.inc.php trunk/sendmail.php Modified: trunk/create-mailbox.php =================================================================== --- trunk/create-mailbox.php 2007-11-04 21:08:42 UTC (rev 198) +++ trunk/create-mailbox.php 2007-11-04 22:52:16 UTC (rev 199) @@ -210,7 +210,6 @@ Lines starting with /* were inserted to keep this section in commented mode. - $result = db_query ("INSERT INTO $table_mailbox (username,password,name,maildir,quota,domain,created,modified,active) VALUES ('$fUsername','$password','$fName','$maildir',$quota,'$fDomain',NOW(),NOW(),'$sqlActive')"); if ($result['rows'] != 1) { $tDomain = $fDomain; @@ -311,18 +310,11 @@ $fHeaders = "To: " . $fTo . "\n"; $fHeaders .= "From: " . $fFrom . "\n"; - if (!empty ($PALANG['charset'])) - { - $fHeaders .= "Subject: " . encode_header ($PALANG['pSendmail_subject_text'], $PALANG['charset']) . "\n"; - $fHeaders .= "MIME-Version: 1.0\n"; - $fHeaders .= "Content-Type: text/plain; charset=" . $PALANG['charset'] . "\n"; - $fHeaders .= "Content-Transfer-Encoding: 8bit\n"; - } - else - { - $fHeaders .= "Subject: " . $PALANG['pSendmail_subject_text'] . "\n\n"; - } - + $fHeaders .= "Subject: " . encode_header ($PALANG['pSendmail_subject_text']) . "\n"; + $fHeaders .= "MIME-Version: 1.0\n"; + $fHeaders .= "Content-Type: text/plain; charset=utf-8\n"; + $fHeaders .= "Content-Transfer-Encoding: 8bit\n"; + $fHeaders .= $CONF['welcome_text']; if (!smtp_mail ($fTo, $fFrom, $fHeaders)) Modified: trunk/functions.inc.php =================================================================== --- trunk/functions.inc.php 2007-11-04 21:08:42 UTC (rev 198) +++ trunk/functions.inc.php 2007-11-04 22:52:16 UTC (rev 199) @@ -900,7 +900,7 @@ // Action: Encode a string according to RFC 1522 for use in headers if it contains 8-bit characters. // Call: encode_header (string header, string charset) // -function encode_header ($string, $default_charset) +function encode_header ($string, $default_charset = "utf-8") { if (strtolower ($default_charset) == 'iso-8859-1') { @@ -1514,7 +1514,7 @@ // function db_delete ($table,$where,$delete) { - $result = db_query ("DELETE FROM $table WHERE $where='$delete'"); + $result = db_query ("DELETE FROM $table WHERE " . escape_string($where) . "='" . escape_string($delete) . "'"); if ($result['rows'] >= 1) { return $result['rows']; Modified: trunk/sendmail.php =================================================================== --- trunk/sendmail.php 2007-11-04 21:08:42 UTC (rev 198) +++ trunk/sendmail.php 2007-11-04 22:52:16 UTC (rev 199) @@ -37,43 +37,29 @@ (($CONF['sendmail'] == 'NO') ? header("Location: " . $CONF['postfix_admin_url'] . "/main.php") && exit : '1'); $SESSID_USERNAME = authentication_get_username(); -if ($_SERVER['REQUEST_METHOD'] == "GET") -{ - include ("./templates/header.tpl"); - include ("./templates/menu.tpl"); - include ("./templates/sendmail.tpl"); - include ("./templates/footer.tpl"); -} if ($_SERVER['REQUEST_METHOD'] == "POST") { - if (isset ($_POST['fTo'])) $fTo = escape_string ($_POST['fTo']); + $fTo = safepost('fTo'); $fFrom = $SESSID_USERNAME; - if (isset ($_POST['fTo'])) $fHeaders = "To: " . $fTo . "\n"; - if (isset ($_POST['fTo'])) $fHeaders .= "From: " . $fFrom . "\n"; + $fHeaders = "To: " . $fTo . "\n"; + $fHeaders .= "From: " . $fFrom . "\n"; - if (!empty ($PALANG['charset'])) - { - $fHeaders .= "Subject: " . encode_header (escape_string ($_POST['fSubject']), $PALANG['charset']) . "\n"; - $fHeaders .= "MIME-Version: 1.0\n"; - $fHeaders .= "Content-Type: text/plain; charset=" . $PALANG['charset'] . "\n"; - $fHeaders .= "Content-Transfer-Encoding: 8bit\n"; - } - else - { - $fHeaders .= "Subject: " . escape_string ($_POST['fSubject']) . "\n\n"; - } + $fHeaders .= "Subject: " . encode_header(safepost('fSubject')) . "\n"; + $fHeaders .= "MIME-Version: 1.0\n"; + $fHeaders .= "Content-Type: text/plain; charset=utf-8\n"; + $fHeaders .= "Content-Transfer-Encoding: 8bit\n"; $fHeaders .= escape_string ($_POST['fBody']); if (empty ($fTo) or !check_email ($fTo)) - { + { $error = 1; $tTo = escape_string ($_POST['fTo']); $tSubject = escape_string ($_POST['fSubject']); $tBody = escape_string ($_POST['fBody']); $tMessage = $PALANG['pSendmail_to_text_error']; - } + } if ($error != 1) { @@ -86,10 +72,12 @@ $tMessage .= $PALANG['pSendmail_result_success']; } } - - include ("./templates/header.tpl"); - include ("./templates/menu.tpl"); - include ("./templates/sendmail.tpl"); - include ("./templates/footer.tpl"); } + +include ("./templates/header.tpl"); +include ("./templates/menu.tpl"); +include ("./templates/sendmail.tpl"); +include ("./templates/footer.tpl"); + +/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-05 21:23:39
|
Revision: 200 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=200&view=rev Author: christian_boltz Date: 2007-11-05 13:23:37 -0800 (Mon, 05 Nov 2007) Log Message: ----------- edit-vacation.php - fix double-encoded special characters if language file contains entity-encoded strings by html_entity_decode'ing the string (will be encoded in template file later) edit-vacation.tpl: - encode tSubject with htmlentities() in template Modified Paths: -------------- trunk/edit-vacation.php trunk/templates/edit-vacation.tpl Modified: trunk/edit-vacation.php =================================================================== --- trunk/edit-vacation.php 2007-11-04 22:52:16 UTC (rev 199) +++ trunk/edit-vacation.php 2007-11-05 21:23:37 UTC (rev 200) @@ -76,8 +76,8 @@ $tUseremail = $fUsername; $tDomain = $fDomain; - if ($tSubject == '') { $tSubject = $PALANG['pUsersVacation_subject_text']; } - if ($tBody == '') { $tBody = $PALANG['pUsersVacation_body_text']; } + if ($tSubject == '') { $tSubject = html_entity_decode($PALANG['pUsersVacation_subject_text'], ENT_QUOTES, 'UTF-8'); } + if ($tBody == '') { $tBody = html_entity_decode($PALANG['pUsersVacation_body_text'], ENT_QUOTES, 'UTF-8'); } } @@ -103,8 +103,8 @@ } $tUseremail = $fUsername; - if ($tSubject == '') { $tSubject = $PALANG['pUsersVacation_subject_text']; } - if ($tBody == '') { $tBody = $PALANG['pUsersVacation_body_text']; } + if ($tSubject == '') { $tSubject = html_entity_decode($PALANG['pUsersVacation_subject_text'], ENT_QUOTES, 'UTF-8'); } + if ($tBody == '') { $tBody = html_entity_decode($PALANG['pUsersVacation_body_text'], ENT_QUOTES, 'UTF-8'); } //if change, remove old one, then perhaps set new one if (!empty ($fBack) || !empty ($fChange)) Modified: trunk/templates/edit-vacation.tpl =================================================================== --- trunk/templates/edit-vacation.tpl 2007-11-04 22:52:16 UTC (rev 199) +++ trunk/templates/edit-vacation.tpl 2007-11-05 21:23:37 UTC (rev 200) @@ -19,7 +19,7 @@ </tr> <tr> <td><?php print $PALANG['pUsersVacation_subject'] . ":"; ?></td> - <td><textarea class="flat" cols="60" name="fSubject" ><?php print $tSubject; ?></textarea></td> + <td><textarea class="flat" cols="60" name="fSubject" ><?php print htmlentities($tSubject, ENT_QUOTES, 'UTF-8'); ?></textarea></td> <td> </td> </tr> <tr> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-11 22:48:05
|
Revision: 208 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=208&view=rev Author: christian_boltz Date: 2007-11-11 14:48:07 -0800 (Sun, 11 Nov 2007) Log Message: ----------- list-virtual.tpl - made '[and x more...]' translatable *.lang: - added 'and_x_more' - added $Id$ keyword - enabled expansion of $Id$ and $Rev$ Modified Paths: -------------- trunk/languages/bg.lang trunk/languages/ca.lang trunk/languages/cn.lang trunk/languages/cs.lang trunk/languages/da.lang trunk/languages/de.lang trunk/languages/en.lang trunk/languages/es.lang trunk/languages/et.lang trunk/languages/eu.lang trunk/languages/fi.lang trunk/languages/fo.lang trunk/languages/fr.lang trunk/languages/hr.lang trunk/languages/hu.lang trunk/languages/is.lang trunk/languages/it.lang trunk/languages/lt.lang trunk/languages/mk.lang trunk/languages/nl.lang trunk/languages/nn.lang trunk/languages/pl.lang trunk/languages/pt-br.lang trunk/languages/ru.lang trunk/languages/sk.lang trunk/languages/sl.lang trunk/languages/sv.lang trunk/languages/tr.lang trunk/languages/tw.lang trunk/templates/list-virtual.tpl Property Changed: ---------------- trunk/languages/bg.lang trunk/languages/ca.lang trunk/languages/cn.lang trunk/languages/cs.lang trunk/languages/da.lang trunk/languages/de.lang trunk/languages/en.lang trunk/languages/es.lang trunk/languages/et.lang trunk/languages/eu.lang trunk/languages/fi.lang trunk/languages/fo.lang trunk/languages/fr.lang trunk/languages/hr.lang trunk/languages/hu.lang trunk/languages/is.lang trunk/languages/it.lang trunk/languages/lt.lang trunk/languages/mk.lang trunk/languages/nl.lang trunk/languages/nn.lang trunk/languages/pl.lang trunk/languages/pt-br.lang trunk/languages/ru.lang trunk/languages/sk.lang trunk/languages/sl.lang trunk/languages/sv.lang trunk/languages/tr.lang trunk/languages/tw.lang Modified: trunk/languages/bg.lang =================================================================== --- trunk/languages/bg.lang 2007-11-11 21:41:18 UTC (rev 207) +++ trunk/languages/bg.lang 2007-11-11 22:48:07 UTC (rev 208) @@ -1,4 +1,5 @@ <?php +# $Id$ // // Language file Bulgarian // by Plamen Tonev @@ -59,6 +60,7 @@ $PALANG['pOverview_alias_modified'] = 'Ïîñëåäíî ìîäèôèöèðàí'; $PALANG['pOverview_alias_active'] = 'Active'; # XXX $PALANG['pOverview_alias_edit'] = 'Alias'; # XXX +$PALANG['and_x_more'] = '[and %s more...]'; # XXX $PALANG['pOverview_mailbox_username'] = 'Å-ìåéë'; $PALANG['pOverview_mailbox_name'] = 'Èìå'; $PALANG['pOverview_mailbox_quota'] = 'Îáåì (MB)'; Property changes on: trunk/languages/bg.lang ___________________________________________________________________ Name: svn:keywords + Id Rev Modified: trunk/languages/ca.lang =================================================================== --- trunk/languages/ca.lang 2007-11-11 21:41:18 UTC (rev 207) +++ trunk/languages/ca.lang 2007-11-11 22:48:07 UTC (rev 208) @@ -1,4 +1,5 @@ <?php +# $Id$ // // Language file Catalan // by Jaume @@ -58,6 +59,7 @@ $PALANG['pOverview_alias_modified'] = 'Última modificació'; $PALANG['pOverview_alias_active'] = 'Active'; # XXX $PALANG['pOverview_alias_edit'] = 'Alias'; # XXX +$PALANG['and_x_more'] = '[and %s more...]'; # XXX $PALANG['pOverview_mailbox_username'] = 'E-mail'; $PALANG['pOverview_mailbox_name'] = 'Nom'; $PALANG['pOverview_mailbox_quota'] = 'Quota (MB)'; Property changes on: trunk/languages/ca.lang ___________________________________________________________________ Name: svn:keywords + Id Rev Modified: trunk/languages/cn.lang =================================================================== --- trunk/languages/cn.lang 2007-11-11 21:41:18 UTC (rev 207) +++ trunk/languages/cn.lang 2007-11-11 22:48:07 UTC (rev 208) @@ -1,4 +1,5 @@ <?php +# $Id$ // // Language file Simplified Chinese // by Matthew <matthew at cnfug dot org> @@ -59,6 +60,7 @@ $PALANG['pOverview_alias_modified'] = '最后修改日期'; $PALANG['pOverview_alias_active'] = 'Active'; # XXX $PALANG['pOverview_alias_edit'] = 'Alias'; # XXX +$PALANG['and_x_more'] = '[and %s more...]'; # XXX $PALANG['pOverview_mailbox_username'] = '邮件地址'; $PALANG['pOverview_mailbox_name'] = '姓名'; $PALANG['pOverview_mailbox_quota'] = '限制 (MB)'; Property changes on: trunk/languages/cn.lang ___________________________________________________________________ Name: svn:keywords + Id Rev Modified: trunk/languages/cs.lang =================================================================== --- trunk/languages/cs.lang 2007-11-11 21:41:18 UTC (rev 207) +++ trunk/languages/cs.lang 2007-11-11 22:48:07 UTC (rev 208) @@ -1,4 +1,5 @@ <?php +# $Id$ // // Language file Czech // by Jakub @@ -62,6 +63,7 @@ $PALANG['pOverview_alias_modified'] = 'Naposledy změněno'; $PALANG['pOverview_alias_active'] = 'Aktivní'; $PALANG['pOverview_alias_edit'] = 'Přesměrování'; +$PALANG['and_x_more'] = '[and %s more...]'; # XXX $PALANG['pOverview_mailbox_username'] = 'Email'; $PALANG['pOverview_mailbox_name'] = 'Jméno'; $PALANG['pOverview_mailbox_quota'] = 'Místo (MB)'; Property changes on: trunk/languages/cs.lang ___________________________________________________________________ Name: svn:keywords + Id Rev Modified: trunk/languages/da.lang =================================================================== --- trunk/languages/da.lang 2007-11-11 21:41:18 UTC (rev 207) +++ trunk/languages/da.lang 2007-11-11 22:48:07 UTC (rev 208) @@ -1,4 +1,5 @@ <?php +# $Id$ // // Language file Danish // by Lars @@ -61,6 +62,7 @@ $PALANG['pOverview_alias_modified'] = 'Senest ændret'; $PALANG['pOverview_alias_active'] = 'Aktiveret'; $PALANG['pOverview_alias_edit'] = 'Alias'; +$PALANG['and_x_more'] = '[and %s more...]'; # XXX $PALANG['pOverview_mailbox_username'] = 'Emailadresse'; $PALANG['pOverview_mailbox_name'] = 'Navn'; $PALANG['pOverview_mailbox_quota'] = 'Kvota (MB)'; Property changes on: trunk/languages/da.lang ___________________________________________________________________ Name: svn:keywords + Id Rev Modified: trunk/languages/de.lang =================================================================== --- trunk/languages/de.lang 2007-11-11 21:41:18 UTC (rev 207) +++ trunk/languages/de.lang 2007-11-11 22:48:07 UTC (rev 208) @@ -1,4 +1,5 @@ <?php +# $Id$ // // Language file German // by Tobias @@ -60,6 +61,7 @@ $PALANG['pOverview_alias_modified'] = 'Zuletzt verändert'; $PALANG['pOverview_alias_active'] = 'Aktiv'; $PALANG['pOverview_alias_edit'] = 'Alias'; +$PALANG['and_x_more'] = '[und %s weitere...]'; $PALANG['pOverview_mailbox_username'] = 'Email'; $PALANG['pOverview_mailbox_name'] = 'Name'; $PALANG['pOverview_mailbox_quota'] = 'Quota (MB)'; @@ -247,7 +249,7 @@ $PALANG['pAdminCreate_domain_transport'] = 'Transport'; $PALANG['pAdminCreate_domain_transport_text'] = 'Define transport'; $PALANG['pAdminCreate_domain_defaultaliases'] = 'Standard-Aliase hinzufügen'; -$PALANG['pAdminCreate_domain_defaultaliases_text'] = ''; # XXX +$PALANG['pAdminCreate_domain_defaultaliases_text'] = ''; $PALANG['pAdminCreate_domain_backupmx'] = 'Mail server is backup MX'; $PALANG['pAdminCreate_domain_button'] = 'Domain hinzufügen'; $PALANG['pAdminCreate_domain_result_error'] = '<span class="error_msg">Konnte Domain nicht anlegen!</span>'; Property changes on: trunk/languages/de.lang ___________________________________________________________________ Name: svn:keywords + Id Rev Modified: trunk/languages/en.lang =================================================================== --- trunk/languages/en.lang 2007-11-11 21:41:18 UTC (rev 207) +++ trunk/languages/en.lang 2007-11-11 22:48:07 UTC (rev 208) @@ -1,4 +1,5 @@ <?php +# $Id$ // // Language file English // by Mischa <mischa at high5 dot net> @@ -61,6 +62,7 @@ $PALANG['pOverview_alias_modified'] = 'Last Modified'; $PALANG['pOverview_alias_active'] = 'Active'; $PALANG['pOverview_alias_edit'] = 'Alias'; +$PALANG['and_x_more'] = '[and %s more...]'; $PALANG['pOverview_mailbox_username'] = 'Email'; $PALANG['pOverview_mailbox_name'] = 'Name'; $PALANG['pOverview_mailbox_quota'] = 'Quota (MB)'; Property changes on: trunk/languages/en.lang ___________________________________________________________________ Name: svn:keywords + Id Rev Modified: trunk/languages/es.lang =================================================================== --- trunk/languages/es.lang 2007-11-11 21:41:18 UTC (rev 207) +++ trunk/languages/es.lang 2007-11-11 22:48:07 UTC (rev 208) @@ -1,4 +1,5 @@ <?php +# $Id$ // // Language file Spanish // by Alvaro @@ -58,6 +59,7 @@ $PALANG['pOverview_alias_modified'] = 'Última modificación'; $PALANG['pOverview_alias_active'] = 'Active'; # XXX $PALANG['pOverview_alias_edit'] = 'Alias'; # XXX +$PALANG['and_x_more'] = '[and %s more...]'; # XXX $PALANG['pOverview_mailbox_username'] = 'E-mail'; $PALANG['pOverview_mailbox_name'] = 'Nombre'; $PALANG['pOverview_mailbox_quota'] = 'Cuota (MB)'; Property changes on: trunk/languages/es.lang ___________________________________________________________________ Name: svn:keywords + Id Rev Modified: trunk/languages/et.lang =================================================================== --- trunk/languages/et.lang 2007-11-11 21:41:18 UTC (rev 207) +++ trunk/languages/et.lang 2007-11-11 22:48:07 UTC (rev 208) @@ -1,4 +1,5 @@ <?php +# $Id$ // // Language file Estonian // by Peeter Partel <peeter at sigma dot ee> @@ -59,6 +60,7 @@ $PALANG['pOverview_alias_modified'] = 'Viimati muudetud'; $PALANG['pOverview_alias_active'] = 'Active'; # XXX $PALANG['pOverview_alias_edit'] = 'Alias'; # XXX +$PALANG['and_x_more'] = '[and %s more...]'; # XXX $PALANG['pOverview_mailbox_username'] = 'E-posti aadress'; $PALANG['pOverview_mailbox_name'] = 'Nimi'; $PALANG['pOverview_mailbox_quota'] = 'Kettaruumi piirang (MB)'; Property changes on: trunk/languages/et.lang ___________________________________________________________________ Name: svn:keywords + Id Rev Modified: trunk/languages/eu.lang =================================================================== --- trunk/languages/eu.lang 2007-11-11 21:41:18 UTC (rev 207) +++ trunk/languages/eu.lang 2007-11-11 22:48:07 UTC (rev 208) @@ -1,4 +1,5 @@ <?php +# $Id$ // // Language file Euskara // by Julen @@ -58,6 +59,7 @@ $PALANG['pOverview_alias_modified'] = 'Azken aldaketa'; $PALANG['pOverview_alias_active'] = 'Active'; # XXX $PALANG['pOverview_alias_edit'] = 'Alias'; # XXX +$PALANG['and_x_more'] = '[and %s more...]'; # XXX $PALANG['pOverview_mailbox_username'] = 'E-mail'; $PALANG['pOverview_mailbox_name'] = 'Izena'; $PALANG['pOverview_mailbox_quota'] = 'Kuota (MB)'; Property changes on: trunk/languages/eu.lang ___________________________________________________________________ Name: svn:keywords + Id Rev Modified: trunk/languages/fi.lang =================================================================== --- trunk/languages/fi.lang 2007-11-11 21:41:18 UTC (rev 207) +++ trunk/languages/fi.lang 2007-11-11 22:48:07 UTC (rev 208) @@ -1,4 +1,5 @@ <?php +# $Id$ // // Language file Finnish // by Palo @@ -62,6 +63,7 @@ $PALANG['pOverview_alias_modified'] = 'Viimeksi muokattu'; $PALANG['pOverview_alias_active'] = 'Active'; # XXX $PALANG['pOverview_alias_edit'] = 'Alias'; # XXX +$PALANG['and_x_more'] = '[and %s more...]'; # XXX $PALANG['pOverview_mailbox_username'] = 'Sähköposti'; $PALANG['pOverview_mailbox_name'] = 'Nimi'; $PALANG['pOverview_mailbox_quota'] = 'Kiintiö (MB)'; Property changes on: trunk/languages/fi.lang ___________________________________________________________________ Name: svn:keywords + Id Rev Modified: trunk/languages/fo.lang =================================================================== --- trunk/languages/fo.lang 2007-11-11 21:41:18 UTC (rev 207) +++ trunk/languages/fo.lang 2007-11-11 22:48:07 UTC (rev 208) @@ -1,4 +1,5 @@ <?php +# $Id$ // // Language file Faroese // by Danial @@ -59,6 +60,7 @@ $PALANG['pOverview_alias_modified'] = 'Síðst broytt'; $PALANG['pOverview_alias_active'] = 'Active'; # XXX $PALANG['pOverview_alias_edit'] = 'Alias'; # XXX +$PALANG['and_x_more'] = '[and %s more...]'; # XXX $PALANG['pOverview_mailbox_username'] = 'E-post'; $PALANG['pOverview_mailbox_name'] = 'Navn'; $PALANG['pOverview_mailbox_quota'] = 'Kvota (MB)'; Property changes on: trunk/languages/fo.lang ___________________________________________________________________ Name: svn:keywords + Id Rev Modified: trunk/languages/fr.lang =================================================================== --- trunk/languages/fr.lang 2007-11-11 21:41:18 UTC (rev 207) +++ trunk/languages/fr.lang 2007-11-11 22:48:07 UTC (rev 208) @@ -1,4 +1,5 @@ <?php +# $Id$ // // Language file French // by Kuthz @@ -61,6 +62,7 @@ $PALANG['pOverview_alias_modified'] = 'Dernière Modification'; $PALANG['pOverview_alias_active'] = 'Activé'; $PALANG['pOverview_alias_edit'] = 'Alias'; +$PALANG['and_x_more'] = '[and %s more...]'; # XXX $PALANG['pOverview_mailbox_username'] = 'courriel'; $PALANG['pOverview_mailbox_name'] = 'Nom'; $PALANG['pOverview_mailbox_quota'] = 'Limite (MB)'; Property changes on: trunk/languages/fr.lang ___________________________________________________________________ Name: svn:keywords + Id Rev Modified: trunk/languages/hr.lang =================================================================== --- trunk/languages/hr.lang 2007-11-11 21:41:18 UTC (rev 207) +++ trunk/languages/hr.lang 2007-11-11 22:48:07 UTC (rev 208) @@ -1,4 +1,5 @@ <?php +# $Id$ // // Language file Croatian // by Daniel Radetic <drade at boobah dot info> @@ -58,6 +59,7 @@ $PALANG['pOverview_alias_modified'] = 'Zadnja promjena'; $PALANG['pOverview_alias_active'] = 'Active'; # XXX $PALANG['pOverview_alias_edit'] = 'Alias'; # XXX +$PALANG['and_x_more'] = '[and %s more...]'; # XXX $PALANG['pOverview_mailbox_username'] = 'E-pota'; $PALANG['pOverview_mailbox_name'] = 'Ime'; $PALANG['pOverview_mailbox_quota'] = 'Kvota (MB)'; Property changes on: trunk/languages/hr.lang ___________________________________________________________________ Name: svn:keywords + Id Rev Modified: trunk/languages/hu.lang =================================================================== --- trunk/languages/hu.lang 2007-11-11 21:41:18 UTC (rev 207) +++ trunk/languages/hu.lang 2007-11-11 22:48:07 UTC (rev 208) @@ -1,4 +1,5 @@ <?php +# $Id$ // // Language file Hungarian // by Christian Hamar <krics at linuxforum dot hu> and Levente Farkas <lfarkas at lfarkas dot org> @@ -60,6 +61,7 @@ $PALANG['pOverview_alias_modified'] = 'Utolsó módosítás'; $PALANG['pOverview_alias_active'] = 'Aktív'; $PALANG['pOverview_alias_edit'] = 'Alias'; +$PALANG['and_x_more'] = '[and %s more...]'; # XXX $PALANG['pOverview_mailbox_username'] = 'Email'; $PALANG['pOverview_mailbox_name'] = 'Név'; $PALANG['pOverview_mailbox_quota'] = 'Quota (MB)'; Property changes on: trunk/languages/hu.lang ___________________________________________________________________ Name: svn:keywords + Id Rev Modified: trunk/languages/is.lang =================================================================== --- trunk/languages/is.lang 2007-11-11 21:41:18 UTC (rev 207) +++ trunk/languages/is.lang 2007-11-11 22:48:07 UTC (rev 208) @@ -1,4 +1,5 @@ <?php +# $Id$ // // Language file Icelandic // by Gestur @@ -59,6 +60,7 @@ $PALANG['pOverview_alias_modified'] = 'Síðast breytt'; $PALANG['pOverview_alias_active'] = 'Active'; # XXX $PALANG['pOverview_alias_edit'] = 'Alias'; # XXX +$PALANG['and_x_more'] = '[and %s more...]'; # XXX $PALANG['pOverview_mailbox_username'] = 'Póstfang'; $PALANG['pOverview_mailbox_name'] = 'Nafn notanda'; $PALANG['pOverview_mailbox_quota'] = 'Heimild kvóta (MB)'; Property changes on: trunk/languages/is.lang ___________________________________________________________________ Name: svn:keywords + Id Rev Modified: trunk/languages/it.lang =================================================================== --- trunk/languages/it.lang 2007-11-11 21:41:18 UTC (rev 207) +++ trunk/languages/it.lang 2007-11-11 22:48:07 UTC (rev 208) @@ -1,4 +1,5 @@ <?php +# $Id$ // // Language file Italian // by Massimiliano Stucchi <max at gufi dot org> @@ -59,6 +60,7 @@ $PALANG['pOverview_alias_modified'] = 'Ultima modifica'; $PALANG['pOverview_alias_active'] = 'Active'; # XXX $PALANG['pOverview_alias_edit'] = 'Alias'; # XXX +$PALANG['and_x_more'] = '[and %s more...]'; # XXX $PALANG['pOverview_mailbox_username'] = 'Email'; $PALANG['pOverview_mailbox_name'] = 'Nome'; $PALANG['pOverview_mailbox_quota'] = 'Quota (MB)'; Property changes on: trunk/languages/it.lang ___________________________________________________________________ Name: svn:keywords + Id Rev Modified: trunk/languages/lt.lang =================================================================== --- trunk/languages/lt.lang 2007-11-11 21:41:18 UTC (rev 207) +++ trunk/languages/lt.lang 2007-11-11 22:48:07 UTC (rev 208) @@ -1,4 +1,5 @@ <?php +# $Id$ // // Language file Lithuanian // by Giedrius <giedrius_balbieris at metalot dot com> @@ -58,6 +59,7 @@ $PALANG['pOverview_alias_modified'] = 'Paskutinis keitimas'; $PALANG['pOverview_alias_active'] = 'Active'; # XXX $PALANG['pOverview_alias_edit'] = 'Alias'; # XXX +$PALANG['and_x_more'] = '[and %s more...]'; # XXX $PALANG['pOverview_mailbox_username'] = 'El.paštas'; $PALANG['pOverview_mailbox_name'] = 'Vardas'; $PALANG['pOverview_mailbox_quota'] = 'Kvota (MB)'; Property changes on: trunk/languages/lt.lang ___________________________________________________________________ Name: svn:keywords + Id Rev Modified: trunk/languages/mk.lang =================================================================== --- trunk/languages/mk.lang 2007-11-11 21:41:18 UTC (rev 207) +++ trunk/languages/mk.lang 2007-11-11 22:48:07 UTC (rev 208) @@ -1,4 +1,5 @@ <?php +# $Id$ // // Language file Macedonian // by Damjan Georgiev <dame at mol dot com dot mk> @@ -59,6 +60,7 @@ $PALANG['pOverview_alias_modified'] = 'Последна промена'; $PALANG['pOverview_alias_active'] = 'Active'; # XXX $PALANG['pOverview_alias_edit'] = 'Alias'; # XXX +$PALANG['and_x_more'] = '[and %s more...]'; # XXX $PALANG['pOverview_mailbox_username'] = 'Адреса'; $PALANG['pOverview_mailbox_name'] = 'Име'; $PALANG['pOverview_mailbox_quota'] = 'Квота (MB)'; Property changes on: trunk/languages/mk.lang ___________________________________________________________________ Name: svn:keywords + Id Rev Modified: trunk/languages/nl.lang =================================================================== --- trunk/languages/nl.lang 2007-11-11 21:41:18 UTC (rev 207) +++ trunk/languages/nl.lang 2007-11-11 22:48:07 UTC (rev 208) @@ -1,4 +1,5 @@ <?php +# $Id$ // // Language file Dutch // by Mourik @@ -59,6 +60,7 @@ $PALANG['pOverview_alias_modified'] = 'Laatst Bewerkt'; $PALANG['pOverview_alias_active'] = 'Active'; # XXX $PALANG['pOverview_alias_edit'] = 'Alias'; # XXX +$PALANG['and_x_more'] = '[and %s more...]'; # XXX $PALANG['pOverview_mailbox_username'] = 'E-mail'; $PALANG['pOverview_mailbox_name'] = 'Naam'; $PALANG['pOverview_mailbox_quota'] = 'Quota (MB)'; Property changes on: trunk/languages/nl.lang ___________________________________________________________________ Name: svn:keywords + Id Rev Modified: trunk/languages/nn.lang =================================================================== --- trunk/languages/nn.lang 2007-11-11 21:41:18 UTC (rev 207) +++ trunk/languages/nn.lang 2007-11-11 22:48:07 UTC (rev 208) @@ -1,4 +1,5 @@ <?php +# $Id$ // // Language file Norwegian - Bokmål // by Jon Arve Wålberg @@ -59,6 +60,7 @@ $PALANG['pOverview_alias_modified'] = 'Sist endret'; $PALANG['pOverview_alias_active'] = 'Active'; # XXX $PALANG['pOverview_alias_edit'] = 'Alias'; # XXX +$PALANG['and_x_more'] = '[and %s more...]'; # XXX $PALANG['pOverview_mailbox_username'] = 'E-post'; $PALANG['pOverview_mailbox_name'] = 'Nann'; $PALANG['pOverview_mailbox_quota'] = 'Kvote (MB)'; Property changes on: trunk/languages/nn.lang ___________________________________________________________________ Name: svn:keywords + Id Rev Modified: trunk/languages/pl.lang =================================================================== --- trunk/languages/pl.lang 2007-11-11 21:41:18 UTC (rev 207) +++ trunk/languages/pl.lang 2007-11-11 22:48:07 UTC (rev 208) @@ -1,4 +1,5 @@ <?php +# $Id$ // // Language file Polish // by Jarek @@ -61,6 +62,7 @@ $PALANG['pOverview_alias_modified'] = 'Ostatnio zmodyfikowany'; $PALANG['pOverview_alias_active'] = 'Active'; # XXX $PALANG['pOverview_alias_edit'] = 'Alias'; # XXX +$PALANG['and_x_more'] = '[and %s more...]'; # XXX $PALANG['pOverview_mailbox_username'] = 'Email'; $PALANG['pOverview_mailbox_name'] = 'Name'; $PALANG['pOverview_mailbox_quota'] = 'Quota (MB)'; Property changes on: trunk/languages/pl.lang ___________________________________________________________________ Name: svn:keywords + Id Rev Modified: trunk/languages/pt-br.lang =================================================================== --- trunk/languages/pt-br.lang 2007-11-11 21:41:18 UTC (rev 207) +++ trunk/languages/pt-br.lang 2007-11-11 22:48:07 UTC (rev 208) @@ -1,4 +1,5 @@ <?php +# $Id$ // // Language file Portuguese - Brazil // by Roberto @@ -59,6 +60,7 @@ $PALANG['pOverview_alias_modified'] = 'Última modificação'; $PALANG['pOverview_alias_active'] = 'Active'; # XXX $PALANG['pOverview_alias_edit'] = 'Alias'; # XXX +$PALANG['and_x_more'] = '[and %s more...]'; # XXX $PALANG['pOverview_mailbox_username'] = 'Usuário'; $PALANG['pOverview_mailbox_name'] = 'Nome'; $PALANG['pOverview_mailbox_quota'] = 'Limite (MB)'; Property changes on: trunk/languages/pt-br.lang ___________________________________________________________________ Name: svn:keywords + Id Rev Modified: trunk/languages/ru.lang =================================================================== --- trunk/languages/ru.lang 2007-11-11 21:41:18 UTC (rev 207) +++ trunk/languages/ru.lang 2007-11-11 22:48:07 UTC (rev 208) @@ -1,4 +1,5 @@ <?php +# $Id$ // // Language file Russian // by Paul; updated by Pavel Usischev @@ -61,6 +62,7 @@ $PALANG['pOverview_alias_modified'] = 'Последнее изменение'; $PALANG['pOverview_alias_active'] = 'Активен'; $PALANG['pOverview_alias_edit'] = 'Алиас'; +$PALANG['and_x_more'] = '[and %s more...]'; # XXX $PALANG['pOverview_mailbox_username'] = 'Ящик'; $PALANG['pOverview_mailbox_name'] = 'Имя'; $PALANG['pOverview_mailbox_quota'] = 'Квота (МБ)'; Property changes on: trunk/languages/ru.lang ___________________________________________________________________ Name: svn:keywords + Id Rev Modified: trunk/languages/sk.lang =================================================================== --- trunk/languages/sk.lang 2007-11-11 21:41:18 UTC (rev 207) +++ trunk/languages/sk.lang 2007-11-11 22:48:07 UTC (rev 208) @@ -1,4 +1,5 @@ <?php +# $Id$ // // Language file Slovak // by bajk @@ -59,6 +60,7 @@ $PALANG['pOverview_alias_modified'] = 'Naposledy zmenené'; $PALANG['pOverview_alias_active'] = 'Active'; # XXX $PALANG['pOverview_alias_edit'] = 'Alias'; # XXX +$PALANG['and_x_more'] = '[and %s more...]'; # XXX $PALANG['pOverview_mailbox_username'] = 'Email'; $PALANG['pOverview_mailbox_name'] = 'Meno'; $PALANG['pOverview_mailbox_quota'] = 'Miesto (MB)'; Property changes on: trunk/languages/sk.lang ___________________________________________________________________ Name: svn:keywords + Id Rev Modified: trunk/languages/sl.lang =================================================================== --- trunk/languages/sl.lang 2007-11-11 21:41:18 UTC (rev 207) +++ trunk/languages/sl.lang 2007-11-11 22:48:07 UTC (rev 208) @@ -1,4 +1,5 @@ <?php +# $Id$ // // Language file Slovenian // by Nejc Skoberne <nejc at skoberne dot net> @@ -60,6 +61,7 @@ $PALANG['pOverview_alias_modified'] = 'Zadnjič spremenjeno'; $PALANG['pOverview_alias_active'] = 'Active'; # XXX $PALANG['pOverview_alias_edit'] = 'Alias'; # XXX +$PALANG['and_x_more'] = '[and %s more...]'; # XXX $PALANG['pOverview_mailbox_username'] = 'E-pošta'; $PALANG['pOverview_mailbox_name'] = 'Ime'; $PALANG['pOverview_mailbox_quota'] = 'Kvota (MB)'; Property changes on: trunk/languages/sl.lang ___________________________________________________________________ Name: svn:keywords + Id Rev Modified: trunk/languages/sv.lang =================================================================== --- trunk/languages/sv.lang 2007-11-11 21:41:18 UTC (rev 207) +++ trunk/languages/sv.lang 2007-11-11 22:48:07 UTC (rev 208) @@ -1,4 +1,5 @@ <?php +# $Id$ // // Language file Swedish // by Stefan Jakobsson <stefan at katrinet dot se> @@ -60,6 +61,7 @@ $PALANG['pOverview_alias_modified'] = 'Senast Ändrad'; $PALANG['pOverview_alias_active'] = 'Active'; # XXX $PALANG['pOverview_alias_edit'] = 'Alias'; # XXX +$PALANG['and_x_more'] = '[and %s more...]'; # XXX $PALANG['pOverview_mailbox_username'] = 'Epost'; $PALANG['pOverview_mailbox_name'] = 'Namn'; $PALANG['pOverview_mailbox_quota'] = 'Quota (MB)'; Property changes on: trunk/languages/sv.lang ___________________________________________________________________ Name: svn:keywords + Id Rev Modified: trunk/languages/tr.lang =================================================================== --- trunk/languages/tr.lang 2007-11-11 21:41:18 UTC (rev 207) +++ trunk/languages/tr.lang 2007-11-11 22:48:07 UTC (rev 208) @@ -1,4 +1,5 @@ <?php +# $Id$ // // Language file Türkçe // by Onuryalazi @@ -59,6 +60,7 @@ $PALANG['pOverview_alias_modified'] = 'Son Düzenleme'; $PALANG['pOverview_alias_active'] = 'Active'; # XXX $PALANG['pOverview_alias_edit'] = 'Alias'; # XXX +$PALANG['and_x_more'] = '[and %s more...]'; # XXX $PALANG['pOverview_mailbox_username'] = 'Eposta'; $PALANG['pOverview_mailbox_name'] = 'Ýsim'; $PALANG['pOverview_mailbox_quota'] = 'kota (MB)'; Property changes on: trunk/languages/tr.lang ___________________________________________________________________ Name: svn:keywords + Id Rev Modified: trunk/languages/tw.lang =================================================================== --- trunk/languages/tw.lang 2007-11-11 21:41:18 UTC (rev 207) +++ trunk/languages/tw.lang 2007-11-11 22:48:07 UTC (rev 208) @@ -1,4 +1,5 @@ <?php +# $Id$ // // Language file Traditional Chinese // by Bruce Chou <bruce at thumb dot cx> @@ -59,6 +60,7 @@ $PALANG['pOverview_alias_modified'] = '³Ì«á×§ï¤é´Á'; $PALANG['pOverview_alias_active'] = 'Active'; # XXX $PALANG['pOverview_alias_edit'] = 'Alias'; # XXX +$PALANG['and_x_more'] = '[and %s more...]'; # XXX $PALANG['pOverview_mailbox_username'] = '¶l¥ó¦ì§}'; $PALANG['pOverview_mailbox_name'] = '©m¦W'; $PALANG['pOverview_mailbox_quota'] = '«H½c¨î (MB)'; Property changes on: trunk/languages/tw.lang ___________________________________________________________________ Name: svn:keywords + Id Rev Modified: trunk/templates/list-virtual.tpl =================================================================== --- trunk/templates/list-virtual.tpl 2007-11-11 21:41:18 UTC (rev 207) +++ trunk/templates/list-virtual.tpl 2007-11-11 22:48:07 UTC (rev 208) @@ -97,7 +97,18 @@ print " <td>" . $tAlias[$i]['address'] . "</td>\n"; if ($CONF['alias_goto_limit'] > 0) { - print " <td>" . ereg_replace (",", "<br>", preg_replace('/^(([^,]+,){'.$CONF['alias_goto_limit'].'})[^,]+,.*/','$1[and '. (substr_count ($tAlias[$i]['goto'], ',') - $CONF['alias_goto_limit'] + 1) .' more...]',$tAlias[$i]['goto'])) . "</td>\n"; + print " <td>" . ereg_replace ( + ",", + "<br>", + preg_replace( + '/^(([^,]+,){'.$CONF['alias_goto_limit'].'})[^,]+,.*/', + '$1' . sprintf( + $PALANG['and_x_more'], + (substr_count ($tAlias[$i]['goto'], ',') - $CONF['alias_goto_limit'] + 1) + ), + $tAlias[$i]['goto'] + ) + ) . "</td>\n"; } else { print " <td>" . ereg_replace (",", "<br>", $tAlias[$i]['goto']) . "</td>\n"; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-11 23:08:53
|
Revision: 209 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=209&view=rev Author: christian_boltz Date: 2007-11-11 15:08:58 -0800 (Sun, 11 Nov 2007) Log Message: ----------- (basically the same as in r200, this time for users/vacation.php) users/vacation.php - fix double-encoded special characters if language file contains entity-encoded strings by html_entity_decode'ing the string (will be encoded in template file later) users_vacation.tpl: - encode tSubject with htmlentities() in template Modified Paths: -------------- trunk/templates/users_vacation.tpl trunk/users/vacation.php Property Changed: ---------------- trunk/templates/users_vacation.tpl trunk/users/vacation.php Modified: trunk/templates/users_vacation.tpl =================================================================== --- trunk/templates/users_vacation.tpl 2007-11-11 22:48:07 UTC (rev 208) +++ trunk/templates/users_vacation.tpl 2007-11-11 23:08:58 UTC (rev 209) @@ -6,7 +6,7 @@ </tr> <tr> <td><?php print $PALANG['pUsersVacation_subject'] . ":"; ?></td> - <td><input type="text" name="fSubject" value="<?php print $tSubject; ?>" /></td> + <td><input type="text" name="fSubject" value="<?php print htmlentities($tSubject, ENT_QUOTES, 'UTF-8'); ?>" /></td> <td> </td> </tr> <tr> @@ -31,3 +31,4 @@ </table> </form> </div> +<?php /* vim: set ft=php expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ ?> Property changes on: trunk/templates/users_vacation.tpl ___________________________________________________________________ Name: svn:keywords + Id Rev Modified: trunk/users/vacation.php =================================================================== --- trunk/users/vacation.php 2007-11-11 22:48:07 UTC (rev 208) +++ trunk/users/vacation.php 2007-11-11 23:08:58 UTC (rev 209) @@ -42,7 +42,7 @@ exit(0); } -$tmp = preg_split ('/@/', $USERID_USERNAME); +$tmp = preg_split ('/@/', $USERID_USERNAME); $USERID_DOMAIN = $tmp[1]; if ($_SERVER['REQUEST_METHOD'] == "GET") @@ -56,10 +56,10 @@ $tBody = $row['body']; } - if ($tSubject == '') { $tSubject = $PALANG['pUsersVacation_subject_text']; } - if ($tBody == '') { $tBody = $PALANG['pUsersVacation_body_text']; } + if ($tSubject == '') { $tSubject = html_entity_decode($PALANG['pUsersVacation_subject_text'], ENT_QUOTES, 'UTF-8'); } + if ($tBody == '') { $tBody = html_entity_decode($PALANG['pUsersVacation_body_text'], ENT_QUOTES, 'UTF-8'); } - $template = "users_vacation.tpl"; + $template = "users_vacation.tpl"; include ("../templates/header.tpl"); include ("../templates/users_menu.tpl"); @@ -85,8 +85,8 @@ if (isset ($_POST['fBack'])) $fBack = escape_string ($_POST['fBack']); //set a default, reset fields for coming back selection - if ($tSubject == '') { $tSubject = $PALANG['pUsersVacation_subject_text']; } - if ($tBody == '') { $tBody = $PALANG['pUsersVacation_body_text']; } + if ($tSubject == '') { $tSubject = html_entity_decode($PALANG['pUsersVacation_subject_text'], ENT_QUOTES, 'UTF-8'); } + if ($tBody == '') { $tBody = html_entity_decode($PALANG['pUsersVacation_body_text'], ENT_QUOTES, 'UTF-8'); } // if they've set themselves away OR back, delete any record of vacation emails. if (!empty ($fBack) || !empty ($fAway)) @@ -184,4 +184,6 @@ include ("../templates/users_vacation.tpl"); include ("../templates/footer.tpl"); } + +/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */ ?> Property changes on: trunk/users/vacation.php ___________________________________________________________________ Name: svn:keywords + Id Rev This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-11 23:36:42
|
Revision: 211 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=211&view=rev Author: christian_boltz Date: 2007-11-11 15:36:46 -0800 (Sun, 11 Nov 2007) Log Message: ----------- enabled expansion of $Id$ and $Rev$ on all non-binary files Modified Paths: -------------- trunk/ADDITIONS/mailbox_remover.pl Property Changed: ---------------- trunk/ADDITIONS/README.TXT trunk/ADDITIONS/cleanupdirs.pl trunk/ADDITIONS/convert-passwd-to-postfixadmin.pl trunk/ADDITIONS/fetchmail.pl trunk/ADDITIONS/mailbox_remover.pl trunk/ADDITIONS/mkeveryone.pl trunk/ADDITIONS/pfa_maildir_cleanup.pl trunk/ADDITIONS/postfixadmin-domain-postdeletion.sh trunk/ADDITIONS/postfixadmin-mailbox-postcreation.sh trunk/ADDITIONS/postfixadmin-mailbox-postdeletion.sh trunk/ADDITIONS/virtualmaildel.php trunk/CHANGELOG.TXT trunk/DATABASE_MYSQL.TXT trunk/DATABASE_PGSQL.TXT trunk/DOCUMENTS/BACKUP_MX.TXT trunk/DOCUMENTS/DOVECOT.TXT trunk/DOCUMENTS/LANGUAGE.TXT trunk/DOCUMENTS/POSTFIXADMIN.TXT trunk/DOCUMENTS/POSTFIX_CONF.TXT trunk/DOCUMENTS/SUPERADMIN.TXT trunk/DOCUMENTS/TABLE_BACKUP_MX.TXT trunk/DOCUMENTS/TABLE_CHANGES.TXT trunk/DOCUMENTS/UPGRADE.TXT trunk/DOCUMENTS/screenshots/README.txt trunk/GPL-LICENSE.TXT trunk/INSTALL.TXT trunk/LICENSE.TXT trunk/VIRTUAL_VACATION/FILTER_README trunk/VIRTUAL_VACATION/INSTALL.TXT trunk/VIRTUAL_VACATION/index.php trunk/VIRTUAL_VACATION/mail-filter trunk/VIRTUAL_VACATION/vacation.pl trunk/admin/index.php trunk/backup.php trunk/broadcast-message.php trunk/common.php trunk/create-admin.php trunk/create-alias.php trunk/create-domain.php trunk/create-mailbox.php trunk/delete.php trunk/edit-active-admin.php trunk/edit-active-domain.php trunk/edit-active.php trunk/edit-admin.php trunk/edit-alias.php trunk/edit-domain.php trunk/edit-mailbox.php trunk/edit-vacation.php trunk/fetchmail.php trunk/functions.inc.php trunk/images/index.php trunk/index.php trunk/languages/index.php trunk/languages/language-update.sh trunk/list-admin.php trunk/list-domain.php trunk/list-virtual.php trunk/login.php trunk/logout.php trunk/main.php trunk/motd-users.txt trunk/motd.txt trunk/password.php trunk/search.php trunk/sendmail.php trunk/setup.php trunk/stylesheet.css trunk/templates/admin_create-admin.tpl trunk/templates/admin_create-domain.tpl trunk/templates/admin_edit-admin.tpl trunk/templates/admin_edit-domain.tpl trunk/templates/admin_list-admin.tpl trunk/templates/admin_list-domain.tpl trunk/templates/admin_search.tpl trunk/templates/broadcast-message.tpl trunk/templates/create-alias.tpl trunk/templates/create-mailbox.tpl trunk/templates/edit-alias.tpl trunk/templates/edit-mailbox.tpl trunk/templates/edit-vacation.tpl trunk/templates/fetchmail.tpl trunk/templates/footer.tpl trunk/templates/header.tpl trunk/templates/index.php trunk/templates/list-virtual.tpl trunk/templates/login.tpl trunk/templates/main.tpl trunk/templates/menu.tpl trunk/templates/menu.tpl.orig trunk/templates/message.tpl trunk/templates/overview-get.tpl trunk/templates/password.tpl trunk/templates/search.tpl trunk/templates/sendmail.tpl trunk/templates/users_edit-alias.tpl trunk/templates/users_login.tpl trunk/templates/users_main.tpl trunk/templates/users_menu.tpl trunk/templates/users_password.tpl trunk/templates/viewlog.tpl trunk/upgrade.php trunk/users/edit-alias.php trunk/users/index.php trunk/users/login.php trunk/users/logout.php trunk/users/main.php trunk/users/password.php trunk/variables.inc.php trunk/viewlog.php Property changes on: trunk/ADDITIONS/README.TXT ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/ADDITIONS/cleanupdirs.pl ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/ADDITIONS/convert-passwd-to-postfixadmin.pl ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/ADDITIONS/fetchmail.pl ___________________________________________________________________ Name: svn:keywords + Id Rev Modified: trunk/ADDITIONS/mailbox_remover.pl =================================================================== --- trunk/ADDITIONS/mailbox_remover.pl 2007-11-11 23:23:53 UTC (rev 210) +++ trunk/ADDITIONS/mailbox_remover.pl 2007-11-11 23:36:46 UTC (rev 211) @@ -6,7 +6,7 @@ # # Added subdir support and pause --- Alan Batie 2007 # Lists directories to be deleted then pauses for 5 seconds for chance to abort -# $Id: mbox_remover,v 1.4 2007/07/12 22:11:09 alan Exp alan $ +# $Id$ # # All your maildirs or other directories could be accidentally removed. # Use it at own risk. No warranties! Property changes on: trunk/ADDITIONS/mailbox_remover.pl ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/ADDITIONS/mkeveryone.pl ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/ADDITIONS/pfa_maildir_cleanup.pl ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/ADDITIONS/postfixadmin-domain-postdeletion.sh ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/ADDITIONS/postfixadmin-mailbox-postcreation.sh ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/ADDITIONS/postfixadmin-mailbox-postdeletion.sh ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/ADDITIONS/virtualmaildel.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/CHANGELOG.TXT ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/DATABASE_MYSQL.TXT ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/DATABASE_PGSQL.TXT ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/DOCUMENTS/BACKUP_MX.TXT ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/DOCUMENTS/DOVECOT.TXT ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/DOCUMENTS/LANGUAGE.TXT ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/DOCUMENTS/POSTFIXADMIN.TXT ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/DOCUMENTS/POSTFIX_CONF.TXT ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/DOCUMENTS/SUPERADMIN.TXT ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/DOCUMENTS/TABLE_BACKUP_MX.TXT ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/DOCUMENTS/TABLE_CHANGES.TXT ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/DOCUMENTS/UPGRADE.TXT ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/DOCUMENTS/screenshots/README.txt ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/GPL-LICENSE.TXT ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/INSTALL.TXT ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/LICENSE.TXT ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/VIRTUAL_VACATION/FILTER_README ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/VIRTUAL_VACATION/INSTALL.TXT ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/VIRTUAL_VACATION/index.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/VIRTUAL_VACATION/mail-filter ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/VIRTUAL_VACATION/vacation.pl ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/admin/index.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/backup.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/broadcast-message.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/common.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/create-admin.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/create-alias.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/create-domain.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/create-mailbox.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/delete.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/edit-active-admin.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/edit-active-domain.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/edit-active.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/edit-admin.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/edit-alias.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/edit-domain.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/edit-mailbox.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/edit-vacation.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/fetchmail.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/functions.inc.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/images/index.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/index.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/languages/index.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/languages/language-update.sh ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/list-admin.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/list-domain.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/list-virtual.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/login.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/logout.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/main.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/motd-users.txt ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/motd.txt ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/password.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/search.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/sendmail.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/setup.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/stylesheet.css ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/templates/admin_create-admin.tpl ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/templates/admin_create-domain.tpl ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/templates/admin_edit-admin.tpl ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/templates/admin_edit-domain.tpl ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/templates/admin_list-admin.tpl ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/templates/admin_list-domain.tpl ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/templates/admin_search.tpl ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/templates/broadcast-message.tpl ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/templates/create-alias.tpl ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/templates/create-mailbox.tpl ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/templates/edit-alias.tpl ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/templates/edit-mailbox.tpl ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/templates/edit-vacation.tpl ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/templates/fetchmail.tpl ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/templates/footer.tpl ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/templates/header.tpl ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/templates/index.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/templates/list-virtual.tpl ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/templates/login.tpl ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/templates/main.tpl ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/templates/menu.tpl ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/templates/menu.tpl.orig ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/templates/message.tpl ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/templates/overview-get.tpl ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/templates/password.tpl ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/templates/search.tpl ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/templates/sendmail.tpl ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/templates/users_edit-alias.tpl ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/templates/users_login.tpl ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/templates/users_main.tpl ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/templates/users_menu.tpl ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/templates/users_password.tpl ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/templates/viewlog.tpl ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/upgrade.php ___________________________________________________________________ Name: svn:keywords - Revision + Id Rev Property changes on: trunk/users/edit-alias.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/users/index.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/users/login.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/users/logout.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/users/main.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/users/password.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/variables.inc.php ___________________________________________________________________ Name: svn:keywords + Id Rev Property changes on: trunk/viewlog.php ___________________________________________________________________ Name: svn:keywords + Id Rev This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-12 00:46:53
|
Revision: 213 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=213&view=rev Author: christian_boltz Date: 2007-11-11 16:46:52 -0800 (Sun, 11 Nov 2007) Log Message: ----------- users/password.php - merged GET and POST code - make cancel button working - redirect to main page on success - displaying success note with flash_info() templates/users_password.tpl: - rename cancel button to fCancel to make it work users/vacation.php - redirect to main page on success - displaying success note with flash_info() - merge GET and POST code Modified Paths: -------------- trunk/templates/users_password.tpl trunk/users/password.php trunk/users/vacation.php Modified: trunk/templates/users_password.tpl =================================================================== --- trunk/templates/users_password.tpl 2007-11-12 00:14:16 UTC (rev 212) +++ trunk/templates/users_password.tpl 2007-11-12 00:46:52 UTC (rev 213) @@ -27,7 +27,7 @@ <tr> <td colspan="3" class="hlp_center"> <input class="button" type="submit" name="submit" value="<?php print $PALANG['pPassword_button']; ?>" /> - <input class="button" type="submit" name="submit" value="<?php print $PALANG['exit']; ?>" action="main.php" > + <input class="button" type="submit" name="fCancel" value="<?php print $PALANG['exit']; ?>" /> </td> </tr> <tr> Modified: trunk/users/password.php =================================================================== --- trunk/users/password.php 2007-11-12 00:14:16 UTC (rev 212) +++ trunk/users/password.php 2007-11-12 00:46:52 UTC (rev 213) @@ -35,16 +35,13 @@ $tmp = preg_split ('/@/', $USERID_USERNAME); $USERID_DOMAIN = $tmp[1]; -if ($_SERVER['REQUEST_METHOD'] == "GET") +if ($_SERVER['REQUEST_METHOD'] == "POST") { - include ("../templates/header.tpl"); - include ("../templates/users_menu.tpl"); - include ("../templates/users_password.tpl"); - include ("../templates/footer.tpl"); -} + if(isset($_POST['fCancel'])) { + header("Location: main.php"); + exit(0); + } -if ($_SERVER['REQUEST_METHOD'] == "POST") -{ $fPassword_current = escape_string ($_POST['fPassword_current']); $fPassword = escape_string ($_POST['fPassword']); $fPassword2 = escape_string ($_POST['fPassword2']); @@ -82,18 +79,22 @@ $result = db_query ("UPDATE $table_mailbox SET password='$password',modified=NOW() WHERE username='$username'"); if ($result['rows'] == 1) { - $tMessage = $PALANG['pPassword_result_success']; + flash_info($PALANG['pPassword_result_success']); db_log ($USERID_USERNAME, $USERID_DOMAIN, 'edit_password', "$USERID_USERNAME"); + header("Location: main.php"); + exit(0); } else { $tMessage = $PALANG['pPassword_result_error']; } } +} - include ("../templates/header.tpl"); - include ("../templates/users_menu.tpl"); - include ("../templates/users_password.tpl"); - include ("../templates/footer.tpl"); -} +include ("../templates/header.tpl"); +include ("../templates/users_menu.tpl"); +include ("../templates/users_password.tpl"); +include ("../templates/footer.tpl"); + +/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */ ?> Modified: trunk/users/vacation.php =================================================================== --- trunk/users/vacation.php 2007-11-12 00:14:16 UTC (rev 212) +++ trunk/users/vacation.php 2007-11-12 00:46:52 UTC (rev 213) @@ -58,13 +58,6 @@ if ($tSubject == '') { $tSubject = html_entity_decode($PALANG['pUsersVacation_subject_text'], ENT_QUOTES, 'UTF-8'); } if ($tBody == '') { $tBody = html_entity_decode($PALANG['pUsersVacation_body_text'], ENT_QUOTES, 'UTF-8'); } - - $template = "users_vacation.tpl"; - - include ("../templates/header.tpl"); - include ("../templates/users_menu.tpl"); - include ("../templates/users_vacation.tpl"); - include ("../templates/footer.tpl"); } if ($_SERVER['REQUEST_METHOD'] == "POST") @@ -174,16 +167,25 @@ } else { + flash_info($PALANG['pVacation_result_added']); header ("Location: main.php"); exit; } } - include ("../templates/header.tpl"); - include ("../templates/users_menu.tpl"); - include ("../templates/users_vacation.tpl"); - include ("../templates/footer.tpl"); + if (!empty ($fBack)) { + if ($tMessage == '' || $tMessage = $PALANG['pUsersVacation_result_success']) { + flash_info($PALANG['pVacation_result_removed']); + header ("Location: main.php"); + exit; + } + } } +include ("../templates/header.tpl"); +include ("../templates/users_menu.tpl"); +include ("../templates/users_vacation.tpl"); +include ("../templates/footer.tpl"); + /* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */ ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-12 22:05:59
|
Revision: 220 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=220&view=rev Author: christian_boltz Date: 2007-11-12 14:06:01 -0800 (Mon, 12 Nov 2007) Log Message: ----------- fetchmail.php: - made edit form labels and descriptions translatable. This means that $fm_struct no longer holds the labels and descriptions - fixed HTML error (missing > for </span> - added some comments to document the main "if" block fetchmail.tpl: - changed button order and placement to make <enter> saving the entry - made save and cancel buttons translatable Thanks to Johan for the reminder https://sourceforge.net/tracker/?func=detail&atid=937964&aid=1830326&group_id=191583 - made edit form labels and descriptions translatable. This also means reworking of some list(...) = $fm_struct[$row] sections *.lang: - added translations for "Save" and "Cancel" buttons - added translations for edit form labels and descriptions de.lang: - translated fetchmail-related texts Modified Paths: -------------- trunk/fetchmail.php trunk/languages/bg.lang trunk/languages/ca.lang trunk/languages/cn.lang trunk/languages/cs.lang trunk/languages/da.lang trunk/languages/de.lang trunk/languages/en.lang trunk/languages/es.lang trunk/languages/et.lang trunk/languages/eu.lang trunk/languages/fi.lang trunk/languages/fo.lang trunk/languages/fr.lang trunk/languages/hr.lang trunk/languages/hu.lang trunk/languages/is.lang trunk/languages/it.lang trunk/languages/lt.lang trunk/languages/mk.lang trunk/languages/nl.lang trunk/languages/nn.lang trunk/languages/pl.lang trunk/languages/pt-br.lang trunk/languages/ru.lang trunk/languages/sk.lang trunk/languages/sl.lang trunk/languages/sv.lang trunk/languages/tr.lang trunk/languages/tw.lang trunk/templates/fetchmail.tpl Modified: trunk/fetchmail.php =================================================================== --- trunk/fetchmail.php 2007-11-12 13:09:51 UTC (rev 219) +++ trunk/fetchmail.php 2007-11-12 22:06:01 UTC (rev 220) @@ -73,27 +73,30 @@ $display_status = 1; if ($new || $edit) $display_status = 0; -$fm_struct=array( // list($editible,$view,$type,$title,$comment) - # first column: allow editing? - # second column: display field? - # the others: type title help text (in edit form) - "id" => array(0,0,'id', 'ID', 'Record ID'), - "mailbox" => array(1,1,'enum', 'Mailbox', 'Local mailbox'), - "src_server" => array(1,1,'text', 'Server', 'Remote Server'), - "src_auth" => array(1,1,'enum', 'Auth Type','Mostly password'), - "src_user" => array(1,1,'text', 'User', 'Remote User'), - "src_password" => array(1,0,'password', 'Password', 'Remote Password'), - "src_folder" => array(1,1,'text', 'Folder', 'Remote Folder'), - "poll_time" => array(1,1,'num', 'Poll', 'Poll Time (min)'), - "fetchall" => array(1,1,'bool', 'Fetch All','Retrieve both old (seen) and new messages'), - "keep" => array(1,1,'bool', 'Keep', 'Keep retrieved messages on the remote mailserver'), - "protocol" => array(1,1,'enum', 'Protocol', 'Protocol to use'), - "extra_options" => array($extra_options,$extra_options,'longtext', 'Extra Options','Extra fetchmail Options'), - "mda" => array($extra_options,$extra_options,'longtext', 'MDA', 'Mail Delivery Agent'), - "date" => array(0,$display_status, 'text', 'Date', 'Date of last polling/configuration change'), - "returned_text" => array(0,$display_status, 'longtext', 'Returned Text','Text message from last polling'), +$fm_struct=array( // list($editible,$view,$type) + # field name allow editing? display field? type + "id" => array(0, 0, 'id' ), + "mailbox" => array(1, 1, 'enum' ), + "src_server" => array(1, 1, 'text' ), + "src_auth" => array(1, 1, 'enum' ), + "src_user" => array(1, 1, 'text' ), + "src_password" => array(1, 0, 'password' ), + "src_folder" => array(1, 1, 'text' ), + "poll_time" => array(1, 1, 'num' ), + "fetchall" => array(1, 1, 'bool' ), + "keep" => array(1, 1, 'bool' ), + "protocol" => array(1, 1, 'enum' ), + "extra_options" => array($extra_options, $extra_options, 'longtext' ), + "mda" => array($extra_options, $extra_options, 'longtext' ), + "date" => array(0, $display_status, 'text' ), + "returned_text" => array(0, $display_status, 'longtext' ), ); +# labels and descriptions are taken from $PALANG['pFetchmail_field_xxx'] and $PALANG['pFetchmail_desc_xxx'] +# TODO: After pressing save or cancel in edit form, date and returned text are not displayed in list view. +# TODO: Reason: $display_status is set before $new and $edit are reset to 0. +# TODO: Fix: split the "display field?" column into "display in list" and "display in edit mode". + $SESSID_USERNAME = authentication_get_username(); if (!$SESSID_USERNAME ) exit; @@ -148,22 +151,22 @@ } -if ($cancel) { +if ($cancel) { # cancel $new or $edit $edit=0; $new=0; -} elseif ($delete) { +} elseif ($delete) { # delete an entry $result = db_query ("delete from fetchmail WHERE id=".$delete); if ($result['rows'] != 1) { - flash_error($PALANG['pDelete_delete_error']) . '</span'; + flash_error($PALANG['pDelete_delete_error']) . '</span>'; } else { flash_info(sprintf($PALANG['pDelete_delete_success'],$account)); } $delete=0; -} elseif ( ($edit || $new) && $save) { +} elseif ( ($edit || $new) && $save) { # $edit or $new AND save button pressed $formvars=array(); foreach($fm_struct as $key=>$row){ - list($editible,$view,$type,$title,$comment)=$row; + list($editible,$view,$type)=$row; if ($editible != 0){ $func="_inp_".$type; $val=safepost($key); @@ -213,10 +216,10 @@ $formvars['src_password'] = ''; # never display password } -} elseif ($edit) { +} elseif ($edit) { # edit entry form $formvars = $edit_row; $formvars['src_password'] = ''; -} elseif ($new) { +} elseif ($new) { # create entry form foreach (array_keys($fm_struct) as $value) { if (isset($fm_defaults[$value])) { $formvars[$value] = $fm_defaults[$value]; Modified: trunk/languages/bg.lang =================================================================== --- trunk/languages/bg.lang 2007-11-12 13:09:51 UTC (rev 219) +++ trunk/languages/bg.lang 2007-11-12 22:06:01 UTC (rev 220) @@ -10,6 +10,8 @@ $PALANG['edit'] = 'ðåäàêòèðàíå'; $PALANG['del'] = 'èçòðèâàíå'; $PALANG['exit'] = 'Exit'; # XXX +$PALANG['cancel'] = 'Cancel'; # XXX +$PALANG['save'] = 'Save'; # XXX $PALANG['confirm'] = 'Ñèãóðíè ëè ñòå, ÷å æåëàåòå äà èçòðèåòî òîâà?\n'; $PALANG['confirm_domain'] = 'Íàèñòèíà ëè èñêàòå äà èçòðèåòå âñè÷êè çàïèñè çà òîçè äîìåéí? Òîâà äåéñòâèå å íåîáðàòèìî!\n'; $PALANG['check_update'] = 'Check for update'; @@ -356,6 +358,36 @@ $PALANG['pFetchmail_server_missing'] = 'Please enter the remote server name!'; # XXX $PALANG['pFetchmail_user_missing'] = 'Please enter the remote username!'; # XXX $PALANG['pFetchmail_password_missing'] = 'Please enter the remote password!'; # XXX +$PALANG['pFetchmail_field_id'] = 'ID'; # XXX +$PALANG['pFetchmail_field_mailbox'] = 'Mailbox'; # XXX +$PALANG['pFetchmail_field_src_server'] = 'Server'; # XXX +$PALANG['pFetchmail_field_src_auth'] = 'Auth Type'; # XXX +$PALANG['pFetchmail_field_src_user'] = 'User'; # XXX +$PALANG['pFetchmail_field_src_password'] = 'Password'; # XXX +$PALANG['pFetchmail_field_src_folder'] = 'Folder'; # XXX +$PALANG['pFetchmail_field_poll_time'] = 'Poll'; # XXX +$PALANG['pFetchmail_field_fetchall'] = 'Fetch All'; # XXX +$PALANG['pFetchmail_field_keep'] = 'Keep'; # XXX +$PALANG['pFetchmail_field_protocol'] = 'Protocol'; # XXX +$PALANG['pFetchmail_field_extra_options'] = 'Extra Options'; # XXX +$PALANG['pFetchmail_field_mda'] = 'MDA'; # XXX +$PALANG['pFetchmail_field_date'] = 'Date'; # XXX +$PALANG['pFetchmail_field_returned_text'] = 'Returned Text'; # XXX +$PALANG['pFetchmail_desc_id'] = 'Record ID'; # XXX +$PALANG['pFetchmail_desc_mailbox'] = 'Local mailbox'; # XXX +$PALANG['pFetchmail_desc_src_server'] = 'Remote Server'; # XXX +$PALANG['pFetchmail_desc_src_auth'] = 'Mostly \'password\''; # Translators: Please do NOT translate 'password' here # XXX +$PALANG['pFetchmail_desc_src_user'] = 'Remote User'; # XXX +$PALANG['pFetchmail_desc_src_password'] = 'Remote Password'; # XXX +$PALANG['pFetchmail_desc_src_folder'] = 'Remote Folder'; # XXX +$PALANG['pFetchmail_desc_poll_time'] = 'Poll every ... minutes'; # XXX +$PALANG['pFetchmail_desc_fetchall'] = 'Retrieve both old (seen) and new messages'; # XXX +$PALANG['pFetchmail_desc_keep'] = 'Keep retrieved messages on the remote mailserver'; # XXX +$PALANG['pFetchmail_desc_protocol'] = 'Protocol to use'; # XXX +$PALANG['pFetchmail_desc_extra_options'] = 'Extra fetchmail Options'; # XXX +$PALANG['pFetchmail_desc_mda'] = 'Mail Delivery Agent'; # XXX +$PALANG['pFetchmail_desc_date'] = 'Date of last polling/configuration change'; # XXX +$PALANG['pFetchmail_desc_returned_text'] = 'Text message from last polling'; # XXX $PALANG['please_keep_this_as_last_entry'] = ''; # needed for language-check.sh /* vim: set expandtab ft=php softtabstop=3 tabstop=3 shiftwidth=3: */ Modified: trunk/languages/ca.lang =================================================================== --- trunk/languages/ca.lang 2007-11-12 13:09:51 UTC (rev 219) +++ trunk/languages/ca.lang 2007-11-12 22:06:01 UTC (rev 220) @@ -10,6 +10,8 @@ $PALANG['edit'] = 'editar'; $PALANG['del'] = 'esborrar'; $PALANG['exit'] = 'Exit'; # XXX +$PALANG['cancel'] = 'Cancel'; # XXX +$PALANG['save'] = 'Save'; # XXX $PALANG['confirm'] = '¿Segur que vols esborrar-lo?\n'; $PALANG['confirm_domain'] = 'Estas segur que vols borrar tots els registres d\'aquest domini? Això no podrà ser desfet!\n'; $PALANG['check_update'] = 'Check for update'; @@ -356,6 +358,36 @@ $PALANG['pFetchmail_server_missing'] = 'Please enter the remote server name!'; # XXX $PALANG['pFetchmail_user_missing'] = 'Please enter the remote username!'; # XXX $PALANG['pFetchmail_password_missing'] = 'Please enter the remote password!'; # XXX +$PALANG['pFetchmail_field_id'] = 'ID'; # XXX +$PALANG['pFetchmail_field_mailbox'] = 'Mailbox'; # XXX +$PALANG['pFetchmail_field_src_server'] = 'Server'; # XXX +$PALANG['pFetchmail_field_src_auth'] = 'Auth Type'; # XXX +$PALANG['pFetchmail_field_src_user'] = 'User'; # XXX +$PALANG['pFetchmail_field_src_password'] = 'Password'; # XXX +$PALANG['pFetchmail_field_src_folder'] = 'Folder'; # XXX +$PALANG['pFetchmail_field_poll_time'] = 'Poll'; # XXX +$PALANG['pFetchmail_field_fetchall'] = 'Fetch All'; # XXX +$PALANG['pFetchmail_field_keep'] = 'Keep'; # XXX +$PALANG['pFetchmail_field_protocol'] = 'Protocol'; # XXX +$PALANG['pFetchmail_field_extra_options'] = 'Extra Options'; # XXX +$PALANG['pFetchmail_field_mda'] = 'MDA'; # XXX +$PALANG['pFetchmail_field_date'] = 'Date'; # XXX +$PALANG['pFetchmail_field_returned_text'] = 'Returned Text'; # XXX +$PALANG['pFetchmail_desc_id'] = 'Record ID'; # XXX +$PALANG['pFetchmail_desc_mailbox'] = 'Local mailbox'; # XXX +$PALANG['pFetchmail_desc_src_server'] = 'Remote Server'; # XXX +$PALANG['pFetchmail_desc_src_auth'] = 'Mostly \'password\''; # Translators: Please do NOT translate 'password' here # XXX +$PALANG['pFetchmail_desc_src_user'] = 'Remote User'; # XXX +$PALANG['pFetchmail_desc_src_password'] = 'Remote Password'; # XXX +$PALANG['pFetchmail_desc_src_folder'] = 'Remote Folder'; # XXX +$PALANG['pFetchmail_desc_poll_time'] = 'Poll every ... minutes'; # XXX +$PALANG['pFetchmail_desc_fetchall'] = 'Retrieve both old (seen) and new messages'; # XXX +$PALANG['pFetchmail_desc_keep'] = 'Keep retrieved messages on the remote mailserver'; # XXX +$PALANG['pFetchmail_desc_protocol'] = 'Protocol to use'; # XXX +$PALANG['pFetchmail_desc_extra_options'] = 'Extra fetchmail Options'; # XXX +$PALANG['pFetchmail_desc_mda'] = 'Mail Delivery Agent'; # XXX +$PALANG['pFetchmail_desc_date'] = 'Date of last polling/configuration change'; # XXX +$PALANG['pFetchmail_desc_returned_text'] = 'Text message from last polling'; # XXX $PALANG['please_keep_this_as_last_entry'] = ''; # needed for language-check.sh /* vim: set expandtab ft=php softtabstop=3 tabstop=3 shiftwidth=3: */ Modified: trunk/languages/cn.lang =================================================================== --- trunk/languages/cn.lang 2007-11-12 13:09:51 UTC (rev 219) +++ trunk/languages/cn.lang 2007-11-12 22:06:01 UTC (rev 220) @@ -10,6 +10,8 @@ $PALANG['edit'] = '编辑'; $PALANG['del'] = '删除'; $PALANG['exit'] = 'Exit'; # XXX +$PALANG['cancel'] = 'Cancel'; # XXX +$PALANG['save'] = 'Save'; # XXX $PALANG['confirm'] = '是否确定删除?\n'; $PALANG['confirm_domain'] = '你是否确定要删除该域中的所有记录? 删除后不可恢复!\n'; $PALANG['check_update'] = '检查新版本'; @@ -356,6 +358,36 @@ $PALANG['pFetchmail_server_missing'] = 'Please enter the remote server name!'; # XXX $PALANG['pFetchmail_user_missing'] = 'Please enter the remote username!'; # XXX $PALANG['pFetchmail_password_missing'] = 'Please enter the remote password!'; # XXX +$PALANG['pFetchmail_field_id'] = 'ID'; # XXX +$PALANG['pFetchmail_field_mailbox'] = 'Mailbox'; # XXX +$PALANG['pFetchmail_field_src_server'] = 'Server'; # XXX +$PALANG['pFetchmail_field_src_auth'] = 'Auth Type'; # XXX +$PALANG['pFetchmail_field_src_user'] = 'User'; # XXX +$PALANG['pFetchmail_field_src_password'] = 'Password'; # XXX +$PALANG['pFetchmail_field_src_folder'] = 'Folder'; # XXX +$PALANG['pFetchmail_field_poll_time'] = 'Poll'; # XXX +$PALANG['pFetchmail_field_fetchall'] = 'Fetch All'; # XXX +$PALANG['pFetchmail_field_keep'] = 'Keep'; # XXX +$PALANG['pFetchmail_field_protocol'] = 'Protocol'; # XXX +$PALANG['pFetchmail_field_extra_options'] = 'Extra Options'; # XXX +$PALANG['pFetchmail_field_mda'] = 'MDA'; # XXX +$PALANG['pFetchmail_field_date'] = 'Date'; # XXX +$PALANG['pFetchmail_field_returned_text'] = 'Returned Text'; # XXX +$PALANG['pFetchmail_desc_id'] = 'Record ID'; # XXX +$PALANG['pFetchmail_desc_mailbox'] = 'Local mailbox'; # XXX +$PALANG['pFetchmail_desc_src_server'] = 'Remote Server'; # XXX +$PALANG['pFetchmail_desc_src_auth'] = 'Mostly \'password\''; # Translators: Please do NOT translate 'password' here # XXX +$PALANG['pFetchmail_desc_src_user'] = 'Remote User'; # XXX +$PALANG['pFetchmail_desc_src_password'] = 'Remote Password'; # XXX +$PALANG['pFetchmail_desc_src_folder'] = 'Remote Folder'; # XXX +$PALANG['pFetchmail_desc_poll_time'] = 'Poll every ... minutes'; # XXX +$PALANG['pFetchmail_desc_fetchall'] = 'Retrieve both old (seen) and new messages'; # XXX +$PALANG['pFetchmail_desc_keep'] = 'Keep retrieved messages on the remote mailserver'; # XXX +$PALANG['pFetchmail_desc_protocol'] = 'Protocol to use'; # XXX +$PALANG['pFetchmail_desc_extra_options'] = 'Extra fetchmail Options'; # XXX +$PALANG['pFetchmail_desc_mda'] = 'Mail Delivery Agent'; # XXX +$PALANG['pFetchmail_desc_date'] = 'Date of last polling/configuration change'; # XXX +$PALANG['pFetchmail_desc_returned_text'] = 'Text message from last polling'; # XXX $PALANG['please_keep_this_as_last_entry'] = ''; # needed for language-check.sh /* vim: set expandtab ft=php softtabstop=3 tabstop=3 shiftwidth=3: */ Modified: trunk/languages/cs.lang =================================================================== --- trunk/languages/cs.lang 2007-11-12 13:09:51 UTC (rev 219) +++ trunk/languages/cs.lang 2007-11-12 22:06:01 UTC (rev 220) @@ -12,6 +12,8 @@ $PALANG['edit'] = 'upravit'; $PALANG['del'] = 'smazat'; $PALANG['exit'] = 'Zrušit'; +$PALANG['cancel'] = 'Cancel'; # XXX +$PALANG['save'] = 'Save'; # XXX $PALANG['confirm'] = 'Jste si jistí?\n'; $PALANG['confirm_domain'] = 'Opravdu chcete smazat všechny záznamy v této doméně Tohle nelze vrátit!\n'; $PALANG['check_update'] = 'Zkontrolovat aktualizace'; @@ -366,6 +368,36 @@ $PALANG['pFetchmail_server_missing'] = 'Please enter the remote server name!'; # XXX $PALANG['pFetchmail_user_missing'] = 'Please enter the remote username!'; # XXX $PALANG['pFetchmail_password_missing'] = 'Please enter the remote password!'; # XXX +$PALANG['pFetchmail_field_id'] = 'ID'; # XXX +$PALANG['pFetchmail_field_mailbox'] = 'Mailbox'; # XXX +$PALANG['pFetchmail_field_src_server'] = 'Server'; # XXX +$PALANG['pFetchmail_field_src_auth'] = 'Auth Type'; # XXX +$PALANG['pFetchmail_field_src_user'] = 'User'; # XXX +$PALANG['pFetchmail_field_src_password'] = 'Password'; # XXX +$PALANG['pFetchmail_field_src_folder'] = 'Folder'; # XXX +$PALANG['pFetchmail_field_poll_time'] = 'Poll'; # XXX +$PALANG['pFetchmail_field_fetchall'] = 'Fetch All'; # XXX +$PALANG['pFetchmail_field_keep'] = 'Keep'; # XXX +$PALANG['pFetchmail_field_protocol'] = 'Protocol'; # XXX +$PALANG['pFetchmail_field_extra_options'] = 'Extra Options'; # XXX +$PALANG['pFetchmail_field_mda'] = 'MDA'; # XXX +$PALANG['pFetchmail_field_date'] = 'Date'; # XXX +$PALANG['pFetchmail_field_returned_text'] = 'Returned Text'; # XXX +$PALANG['pFetchmail_desc_id'] = 'Record ID'; # XXX +$PALANG['pFetchmail_desc_mailbox'] = 'Local mailbox'; # XXX +$PALANG['pFetchmail_desc_src_server'] = 'Remote Server'; # XXX +$PALANG['pFetchmail_desc_src_auth'] = 'Mostly \'password\''; # Translators: Please do NOT translate 'password' here # XXX +$PALANG['pFetchmail_desc_src_user'] = 'Remote User'; # XXX +$PALANG['pFetchmail_desc_src_password'] = 'Remote Password'; # XXX +$PALANG['pFetchmail_desc_src_folder'] = 'Remote Folder'; # XXX +$PALANG['pFetchmail_desc_poll_time'] = 'Poll every ... minutes'; # XXX +$PALANG['pFetchmail_desc_fetchall'] = 'Retrieve both old (seen) and new messages'; # XXX +$PALANG['pFetchmail_desc_keep'] = 'Keep retrieved messages on the remote mailserver'; # XXX +$PALANG['pFetchmail_desc_protocol'] = 'Protocol to use'; # XXX +$PALANG['pFetchmail_desc_extra_options'] = 'Extra fetchmail Options'; # XXX +$PALANG['pFetchmail_desc_mda'] = 'Mail Delivery Agent'; # XXX +$PALANG['pFetchmail_desc_date'] = 'Date of last polling/configuration change'; # XXX +$PALANG['pFetchmail_desc_returned_text'] = 'Text message from last polling'; # XXX $PALANG['please_keep_this_as_last_entry'] = ''; # needed for language-check.sh /* vim: set expandtab ft=php softtabstop=3 tabstop=3 shiftwidth=3: */ Modified: trunk/languages/da.lang =================================================================== --- trunk/languages/da.lang 2007-11-12 13:09:51 UTC (rev 219) +++ trunk/languages/da.lang 2007-11-12 22:06:01 UTC (rev 220) @@ -11,6 +11,8 @@ $PALANG['edit'] = 'redigere'; $PALANG['del'] = 'slet'; $PALANG['exit'] = 'Log af'; +$PALANG['cancel'] = 'Cancel'; # XXX +$PALANG['save'] = 'Save'; # XXX $PALANG['confirm'] = 'Er du sikker på du vil slette dette?\n'; $PALANG['confirm_domain'] = 'Vil du virkelig slette alle adresser for dette domæne? Dette kan ikke fortrydes!\n'; $PALANG['check_update'] = 'Søg efter opdateringer'; @@ -368,6 +370,36 @@ $PALANG['pFetchmail_server_missing'] = 'Angiv navnet på fjernserveren!'; $PALANG['pFetchmail_user_missing'] = 'Angiv brugernavnet til fjernserveren!'; $PALANG['pFetchmail_password_missing'] = 'Angiv adgangskoden til fjernserveren!'; +$PALANG['pFetchmail_field_id'] = 'ID'; # XXX +$PALANG['pFetchmail_field_mailbox'] = 'Mailbox'; # XXX +$PALANG['pFetchmail_field_src_server'] = 'Server'; # XXX +$PALANG['pFetchmail_field_src_auth'] = 'Auth Type'; # XXX +$PALANG['pFetchmail_field_src_user'] = 'User'; # XXX +$PALANG['pFetchmail_field_src_password'] = 'Password'; # XXX +$PALANG['pFetchmail_field_src_folder'] = 'Folder'; # XXX +$PALANG['pFetchmail_field_poll_time'] = 'Poll'; # XXX +$PALANG['pFetchmail_field_fetchall'] = 'Fetch All'; # XXX +$PALANG['pFetchmail_field_keep'] = 'Keep'; # XXX +$PALANG['pFetchmail_field_protocol'] = 'Protocol'; # XXX +$PALANG['pFetchmail_field_extra_options'] = 'Extra Options'; # XXX +$PALANG['pFetchmail_field_mda'] = 'MDA'; # XXX +$PALANG['pFetchmail_field_date'] = 'Date'; # XXX +$PALANG['pFetchmail_field_returned_text'] = 'Returned Text'; # XXX +$PALANG['pFetchmail_desc_id'] = 'Record ID'; # XXX +$PALANG['pFetchmail_desc_mailbox'] = 'Local mailbox'; # XXX +$PALANG['pFetchmail_desc_src_server'] = 'Remote Server'; # XXX +$PALANG['pFetchmail_desc_src_auth'] = 'Mostly \'password\''; # Translators: Please do NOT translate 'password' here # XXX +$PALANG['pFetchmail_desc_src_user'] = 'Remote User'; # XXX +$PALANG['pFetchmail_desc_src_password'] = 'Remote Password'; # XXX +$PALANG['pFetchmail_desc_src_folder'] = 'Remote Folder'; # XXX +$PALANG['pFetchmail_desc_poll_time'] = 'Poll every ... minutes'; # XXX +$PALANG['pFetchmail_desc_fetchall'] = 'Retrieve both old (seen) and new messages'; # XXX +$PALANG['pFetchmail_desc_keep'] = 'Keep retrieved messages on the remote mailserver'; # XXX +$PALANG['pFetchmail_desc_protocol'] = 'Protocol to use'; # XXX +$PALANG['pFetchmail_desc_extra_options'] = 'Extra fetchmail Options'; # XXX +$PALANG['pFetchmail_desc_mda'] = 'Mail Delivery Agent'; # XXX +$PALANG['pFetchmail_desc_date'] = 'Date of last polling/configuration change'; # XXX +$PALANG['pFetchmail_desc_returned_text'] = 'Text message from last polling'; # XXX $PALANG['please_keep_this_as_last_entry'] = ''; # needed for language-check.sh /* vim: set expandtab ft=php softtabstop=3 tabstop=3 shiftwidth=3: */ Modified: trunk/languages/de.lang =================================================================== --- trunk/languages/de.lang 2007-11-12 13:09:51 UTC (rev 219) +++ trunk/languages/de.lang 2007-11-12 22:06:01 UTC (rev 220) @@ -10,6 +10,8 @@ $PALANG['edit'] = 'editieren'; $PALANG['del'] = 'löschen'; $PALANG['exit'] = 'Verlassen'; +$PALANG['cancel'] = 'Abbrechen'; +$PALANG['save'] = 'Speichern'; $PALANG['confirm'] = 'Sind Sie sicher dass Sie das löschen wollen?\n'; $PALANG['confirm_domain'] = 'Wollen Sie wirklich alle Einträge dieser Domain löschen? Dies kann NICHT rückgängig gemacht werden!\n'; $PALANG['check_update'] = 'Auf Updates überprüfen'; @@ -367,6 +369,36 @@ $PALANG['pFetchmail_server_missing'] = 'Bitte geben Sie den Namen des Servers ein!'; $PALANG['pFetchmail_user_missing'] = 'Bitte geben Sie den Benutzernamen ein!'; $PALANG['pFetchmail_password_missing'] = 'Bitte geben Sie das Passwort ein!'; +$PALANG['pFetchmail_field_id'] = 'ID'; +$PALANG['pFetchmail_field_mailbox'] = 'Mailbox'; +$PALANG['pFetchmail_field_src_server'] = 'Server'; +$PALANG['pFetchmail_field_src_auth'] = 'Anmeldemethode'; +$PALANG['pFetchmail_field_src_user'] = 'Benutzername'; +$PALANG['pFetchmail_field_src_password'] = 'Passwort'; +$PALANG['pFetchmail_field_src_folder'] = 'Ordner'; +$PALANG['pFetchmail_field_poll_time'] = 'Abruf'; +$PALANG['pFetchmail_field_fetchall'] = 'Alle abholen'; +$PALANG['pFetchmail_field_keep'] = 'Behalten'; +$PALANG['pFetchmail_field_protocol'] = 'Protokoll'; +$PALANG['pFetchmail_field_extra_options'] = 'Zusätzliche Optionen'; +$PALANG['pFetchmail_field_mda'] = 'MDA'; +$PALANG['pFetchmail_field_date'] = 'Datum'; +$PALANG['pFetchmail_field_returned_text'] = 'Zurückgegebener Text'; +$PALANG['pFetchmail_desc_id'] = 'Eintrags-ID'; +$PALANG['pFetchmail_desc_mailbox'] = 'Lokales Postfach'; +$PALANG['pFetchmail_desc_src_server'] = 'Entfernter Server'; +$PALANG['pFetchmail_desc_src_auth'] = 'Normalerweise \'password\''; +$PALANG['pFetchmail_desc_src_user'] = 'Entfernter Benutzername'; +$PALANG['pFetchmail_desc_src_password'] = 'Entferntes Passwort'; +$PALANG['pFetchmail_desc_src_folder'] = 'Entfernter Ordner'; +$PALANG['pFetchmail_desc_poll_time'] = 'Mailabruf alle ... Minuten'; +$PALANG['pFetchmail_desc_fetchall'] = 'Sowohl alte (gelesene) als auch neue Nachrichten abholen'; +$PALANG['pFetchmail_desc_keep'] = 'Abgeholte Nachrichten auf dem entfernten Server lassen'; +$PALANG['pFetchmail_desc_protocol'] = 'Zu verwendendes Protokoll'; +$PALANG['pFetchmail_desc_extra_options'] = 'Zusätzliche fetchmail-Optionen'; +$PALANG['pFetchmail_desc_mda'] = 'Programm zur Mailauslieferung'; +$PALANG['pFetchmail_desc_date'] = 'Datum des letzten Mailabrufs/Konfigurationsänderung'; +$PALANG['pFetchmail_desc_returned_text'] = 'Textausgabe des letzten Mailabrufs'; $PALANG['please_keep_this_as_last_entry'] = ''; # needed for language-check.sh /* vim: set expandtab ft=php softtabstop=3 tabstop=3 shiftwidth=3: */ Modified: trunk/languages/en.lang =================================================================== --- trunk/languages/en.lang 2007-11-12 13:09:51 UTC (rev 219) +++ trunk/languages/en.lang 2007-11-12 22:06:01 UTC (rev 220) @@ -11,6 +11,8 @@ $PALANG['edit'] = 'edit'; $PALANG['del'] = 'del'; $PALANG['exit'] = 'Exit'; +$PALANG['cancel'] = 'Cancel'; +$PALANG['save'] = 'Save'; $PALANG['confirm'] = 'Are you sure you want to delete this?\n'; $PALANG['confirm_domain'] = 'Do you really want to delete all records for this domain? This can not be undone!\n'; $PALANG['check_update'] = 'Check for update'; @@ -368,6 +370,36 @@ $PALANG['pFetchmail_server_missing'] = 'Please enter the remote server name!'; $PALANG['pFetchmail_user_missing'] = 'Please enter the remote username!'; $PALANG['pFetchmail_password_missing'] = 'Please enter the remote password!'; +$PALANG['pFetchmail_field_id'] = 'ID'; +$PALANG['pFetchmail_field_mailbox'] = 'Mailbox'; +$PALANG['pFetchmail_field_src_server'] = 'Server'; +$PALANG['pFetchmail_field_src_auth'] = 'Auth Type'; +$PALANG['pFetchmail_field_src_user'] = 'User'; +$PALANG['pFetchmail_field_src_password'] = 'Password'; +$PALANG['pFetchmail_field_src_folder'] = 'Folder'; +$PALANG['pFetchmail_field_poll_time'] = 'Poll'; +$PALANG['pFetchmail_field_fetchall'] = 'Fetch All'; +$PALANG['pFetchmail_field_keep'] = 'Keep'; +$PALANG['pFetchmail_field_protocol'] = 'Protocol'; +$PALANG['pFetchmail_field_extra_options'] = 'Extra Options'; +$PALANG['pFetchmail_field_mda'] = 'MDA'; +$PALANG['pFetchmail_field_date'] = 'Date'; +$PALANG['pFetchmail_field_returned_text'] = 'Returned Text'; +$PALANG['pFetchmail_desc_id'] = 'Record ID'; +$PALANG['pFetchmail_desc_mailbox'] = 'Local mailbox'; +$PALANG['pFetchmail_desc_src_server'] = 'Remote Server'; +$PALANG['pFetchmail_desc_src_auth'] = 'Mostly \'password\''; # Translators: Please do NOT translate 'password' here +$PALANG['pFetchmail_desc_src_user'] = 'Remote User'; +$PALANG['pFetchmail_desc_src_password'] = 'Remote Password'; +$PALANG['pFetchmail_desc_src_folder'] = 'Remote Folder'; +$PALANG['pFetchmail_desc_poll_time'] = 'Poll every ... minutes'; +$PALANG['pFetchmail_desc_fetchall'] = 'Retrieve both old (seen) and new messages'; +$PALANG['pFetchmail_desc_keep'] = 'Keep retrieved messages on the remote mailserver'; +$PALANG['pFetchmail_desc_protocol'] = 'Protocol to use'; +$PALANG['pFetchmail_desc_extra_options'] = 'Extra fetchmail Options'; +$PALANG['pFetchmail_desc_mda'] = 'Mail Delivery Agent'; +$PALANG['pFetchmail_desc_date'] = 'Date of last polling/configuration change'; +$PALANG['pFetchmail_desc_returned_text'] = 'Text message from last polling'; $PALANG['please_keep_this_as_last_entry'] = ''; # needed for language-check.sh /* vim: set expandtab ft=php softtabstop=3 tabstop=3 shiftwidth=3: */ Modified: trunk/languages/es.lang =================================================================== --- trunk/languages/es.lang 2007-11-12 13:09:51 UTC (rev 219) +++ trunk/languages/es.lang 2007-11-12 22:06:01 UTC (rev 220) @@ -10,6 +10,8 @@ $PALANG['edit'] = 'editar'; $PALANG['del'] = 'borrar'; $PALANG['exit'] = 'Exit'; # XXX +$PALANG['cancel'] = 'Cancel'; # XXX +$PALANG['save'] = 'Save'; # XXX $PALANG['confirm'] = '¿Está seguro de que desea borrarlo?\n'; $PALANG['confirm_domain'] = '¿Está seguro de que desea borrar todos los registros de este dominio? ¡Esto no puede ser deshecho!\n'; $PALANG['check_update'] = 'Check for update'; @@ -357,6 +359,36 @@ $PALANG['pFetchmail_server_missing'] = 'Please enter the remote server name!'; # XXX $PALANG['pFetchmail_user_missing'] = 'Please enter the remote username!'; # XXX $PALANG['pFetchmail_password_missing'] = 'Please enter the remote password!'; # XXX +$PALANG['pFetchmail_field_id'] = 'ID'; # XXX +$PALANG['pFetchmail_field_mailbox'] = 'Mailbox'; # XXX +$PALANG['pFetchmail_field_src_server'] = 'Server'; # XXX +$PALANG['pFetchmail_field_src_auth'] = 'Auth Type'; # XXX +$PALANG['pFetchmail_field_src_user'] = 'User'; # XXX +$PALANG['pFetchmail_field_src_password'] = 'Password'; # XXX +$PALANG['pFetchmail_field_src_folder'] = 'Folder'; # XXX +$PALANG['pFetchmail_field_poll_time'] = 'Poll'; # XXX +$PALANG['pFetchmail_field_fetchall'] = 'Fetch All'; # XXX +$PALANG['pFetchmail_field_keep'] = 'Keep'; # XXX +$PALANG['pFetchmail_field_protocol'] = 'Protocol'; # XXX +$PALANG['pFetchmail_field_extra_options'] = 'Extra Options'; # XXX +$PALANG['pFetchmail_field_mda'] = 'MDA'; # XXX +$PALANG['pFetchmail_field_date'] = 'Date'; # XXX +$PALANG['pFetchmail_field_returned_text'] = 'Returned Text'; # XXX +$PALANG['pFetchmail_desc_id'] = 'Record ID'; # XXX +$PALANG['pFetchmail_desc_mailbox'] = 'Local mailbox'; # XXX +$PALANG['pFetchmail_desc_src_server'] = 'Remote Server'; # XXX +$PALANG['pFetchmail_desc_src_auth'] = 'Mostly \'password\''; # Translators: Please do NOT translate 'password' here # XXX +$PALANG['pFetchmail_desc_src_user'] = 'Remote User'; # XXX +$PALANG['pFetchmail_desc_src_password'] = 'Remote Password'; # XXX +$PALANG['pFetchmail_desc_src_folder'] = 'Remote Folder'; # XXX +$PALANG['pFetchmail_desc_poll_time'] = 'Poll every ... minutes'; # XXX +$PALANG['pFetchmail_desc_fetchall'] = 'Retrieve both old (seen) and new messages'; # XXX +$PALANG['pFetchmail_desc_keep'] = 'Keep retrieved messages on the remote mailserver'; # XXX +$PALANG['pFetchmail_desc_protocol'] = 'Protocol to use'; # XXX +$PALANG['pFetchmail_desc_extra_options'] = 'Extra fetchmail Options'; # XXX +$PALANG['pFetchmail_desc_mda'] = 'Mail Delivery Agent'; # XXX +$PALANG['pFetchmail_desc_date'] = 'Date of last polling/configuration change'; # XXX +$PALANG['pFetchmail_desc_returned_text'] = 'Text message from last polling'; # XXX $PALANG['please_keep_this_as_last_entry'] = ''; # needed for language-check.sh /* vim: set expandtab ft=php softtabstop=3 tabstop=3 shiftwidth=3: */ Modified: trunk/languages/et.lang =================================================================== --- trunk/languages/et.lang 2007-11-12 13:09:51 UTC (rev 219) +++ trunk/languages/et.lang 2007-11-12 22:06:01 UTC (rev 220) @@ -10,6 +10,8 @@ $PALANG['edit'] = 'Redigeeri'; $PALANG['del'] = 'Kustuta'; $PALANG['exit'] = 'Exit'; # XXX +$PALANG['cancel'] = 'Cancel'; # XXX +$PALANG['save'] = 'Save'; # XXX $PALANG['confirm'] = 'Oled kindel, et soovid seda kustutada?\n'; $PALANG['confirm_domain'] = 'Oled tõesti kindel, et tahad kustutada kõik kirjed sellele domeenile? Seda tegevust ei saa tagasi võtta!\n'; $PALANG['check_update'] = 'Check for update'; @@ -360,6 +362,36 @@ $PALANG['pFetchmail_server_missing'] = 'Please enter the remote server name!'; # XXX $PALANG['pFetchmail_user_missing'] = 'Please enter the remote username!'; # XXX $PALANG['pFetchmail_password_missing'] = 'Please enter the remote password!'; # XXX +$PALANG['pFetchmail_field_id'] = 'ID'; # XXX +$PALANG['pFetchmail_field_mailbox'] = 'Mailbox'; # XXX +$PALANG['pFetchmail_field_src_server'] = 'Server'; # XXX +$PALANG['pFetchmail_field_src_auth'] = 'Auth Type'; # XXX +$PALANG['pFetchmail_field_src_user'] = 'User'; # XXX +$PALANG['pFetchmail_field_src_password'] = 'Password'; # XXX +$PALANG['pFetchmail_field_src_folder'] = 'Folder'; # XXX +$PALANG['pFetchmail_field_poll_time'] = 'Poll'; # XXX +$PALANG['pFetchmail_field_fetchall'] = 'Fetch All'; # XXX +$PALANG['pFetchmail_field_keep'] = 'Keep'; # XXX +$PALANG['pFetchmail_field_protocol'] = 'Protocol'; # XXX +$PALANG['pFetchmail_field_extra_options'] = 'Extra Options'; # XXX +$PALANG['pFetchmail_field_mda'] = 'MDA'; # XXX +$PALANG['pFetchmail_field_date'] = 'Date'; # XXX +$PALANG['pFetchmail_field_returned_text'] = 'Returned Text'; # XXX +$PALANG['pFetchmail_desc_id'] = 'Record ID'; # XXX +$PALANG['pFetchmail_desc_mailbox'] = 'Local mailbox'; # XXX +$PALANG['pFetchmail_desc_src_server'] = 'Remote Server'; # XXX +$PALANG['pFetchmail_desc_src_auth'] = 'Mostly \'password\''; # Translators: Please do NOT translate 'password' here # XXX +$PALANG['pFetchmail_desc_src_user'] = 'Remote User'; # XXX +$PALANG['pFetchmail_desc_src_password'] = 'Remote Password'; # XXX +$PALANG['pFetchmail_desc_src_folder'] = 'Remote Folder'; # XXX +$PALANG['pFetchmail_desc_poll_time'] = 'Poll every ... minutes'; # XXX +$PALANG['pFetchmail_desc_fetchall'] = 'Retrieve both old (seen) and new messages'; # XXX +$PALANG['pFetchmail_desc_keep'] = 'Keep retrieved messages on the remote mailserver'; # XXX +$PALANG['pFetchmail_desc_protocol'] = 'Protocol to use'; # XXX +$PALANG['pFetchmail_desc_extra_options'] = 'Extra fetchmail Options'; # XXX +$PALANG['pFetchmail_desc_mda'] = 'Mail Delivery Agent'; # XXX +$PALANG['pFetchmail_desc_date'] = 'Date of last polling/configuration change'; # XXX +$PALANG['pFetchmail_desc_returned_text'] = 'Text message from last polling'; # XXX $PALANG['please_keep_this_as_last_entry'] = ''; # needed for language-check.sh /* vim: set expandtab ft=php softtabstop=3 tabstop=3 shiftwidth=3: */ Modified: trunk/languages/eu.lang =================================================================== --- trunk/languages/eu.lang 2007-11-12 13:09:51 UTC (rev 219) +++ trunk/languages/eu.lang 2007-11-12 22:06:01 UTC (rev 220) @@ -10,6 +10,8 @@ $PALANG['edit'] = 'aldatu'; $PALANG['del'] = 'ezabatu'; $PALANG['exit'] = 'Exit'; # XXX +$PALANG['cancel'] = 'Cancel'; # XXX +$PALANG['save'] = 'Save'; # XXX $PALANG['confirm'] = 'Ziur al zaude ezabatu nahi duzula?\n'; $PALANG['confirm_domain'] = 'Ziur al zaude domeinu honetako erregistro guztiak ezbatu nahi dituzula? Hau ezin izango da desegin!\n'; $PALANG['check_update'] = 'Check for update'; @@ -355,6 +357,36 @@ $PALANG['pFetchmail_server_missing'] = 'Please enter the remote server name!'; # XXX $PALANG['pFetchmail_user_missing'] = 'Please enter the remote username!'; # XXX $PALANG['pFetchmail_password_missing'] = 'Please enter the remote password!'; # XXX +$PALANG['pFetchmail_field_id'] = 'ID'; # XXX +$PALANG['pFetchmail_field_mailbox'] = 'Mailbox'; # XXX +$PALANG['pFetchmail_field_src_server'] = 'Server'; # XXX +$PALANG['pFetchmail_field_src_auth'] = 'Auth Type'; # XXX +$PALANG['pFetchmail_field_src_user'] = 'User'; # XXX +$PALANG['pFetchmail_field_src_password'] = 'Password'; # XXX +$PALANG['pFetchmail_field_src_folder'] = 'Folder'; # XXX +$PALANG['pFetchmail_field_poll_time'] = 'Poll'; # XXX +$PALANG['pFetchmail_field_fetchall'] = 'Fetch All'; # XXX +$PALANG['pFetchmail_field_keep'] = 'Keep'; # XXX +$PALANG['pFetchmail_field_protocol'] = 'Protocol'; # XXX +$PALANG['pFetchmail_field_extra_options'] = 'Extra Options'; # XXX +$PALANG['pFetchmail_field_mda'] = 'MDA'; # XXX +$PALANG['pFetchmail_field_date'] = 'Date'; # XXX +$PALANG['pFetchmail_field_returned_text'] = 'Returned Text'; # XXX +$PALANG['pFetchmail_desc_id'] = 'Record ID'; # XXX +$PALANG['pFetchmail_desc_mailbox'] = 'Local mailbox'; # XXX +$PALANG['pFetchmail_desc_src_server'] = 'Remote Server'; # XXX +$PALANG['pFetchmail_desc_src_auth'] = 'Mostly \'password\''; # Translators: Please do NOT translate 'password' here # XXX +$PALANG['pFetchmail_desc_src_user'] = 'Remote User'; # XXX +$PALANG['pFetchmail_desc_src_password'] = 'Remote Password'; # XXX +$PALANG['pFetchmail_desc_src_folder'] = 'Remote Folder'; # XXX +$PALANG['pFetchmail_desc_poll_time'] = 'Poll every ... minutes'; # XXX +$PALANG['pFetchmail_desc_fetchall'] = 'Retrieve both old (seen) and new messages'; # XXX +$PALANG['pFetchmail_desc_keep'] = 'Keep retrieved messages on the remote mailserver'; # XXX +$PALANG['pFetchmail_desc_protocol'] = 'Protocol to use'; # XXX +$PALANG['pFetchmail_desc_extra_options'] = 'Extra fetchmail Options'; # XXX +$PALANG['pFetchmail_desc_mda'] = 'Mail Delivery Agent'; # XXX +$PALANG['pFetchmail_desc_date'] = 'Date of last polling/configuration change'; # XXX +$PALANG['pFetchmail_desc_returned_text'] = 'Text message from last polling'; # XXX $PALANG['please_keep_this_as_last_entry'] = ''; # needed for language-check.sh /* vim: set expandtab ft=php softtabstop=3 tabstop=3 shiftwidth=3: */ Modified: trunk/languages/fi.lang =================================================================== --- trunk/languages/fi.lang 2007-11-12 13:09:51 UTC (rev 219) +++ trunk/languages/fi.lang 2007-11-12 22:06:01 UTC (rev 220) @@ -13,6 +13,8 @@ $PALANG['edit'] = 'muokkaa'; $PALANG['del'] = 'poista'; $PALANG['exit'] = 'Exit'; # XXX +$PALANG['cancel'] = 'Cancel'; # XXX +$PALANG['save'] = 'Save'; # XXX $PALANG['confirm'] = 'Oletko varma että haluat poistaa tämän?\n'; $PALANG['confirm_domain'] = 'Oletko varma että haluat poistaa kaikki tietueet tästä domainista? Tätä komentoa ei voi perua!\n'; $PALANG['check_update'] = 'Check for update'; @@ -358,6 +360,36 @@ $PALANG['pFetchmail_server_missing'] = 'Please enter the remote server name!'; # XXX $PALANG['pFetchmail_user_missing'] = 'Please enter the remote username!'; # XXX $PALANG['pFetchmail_password_missing'] = 'Please enter the remote password!'; # XXX +$PALANG['pFetchmail_field_id'] = 'ID'; # XXX +$PALANG['pFetchmail_field_mailbox'] = 'Mailbox'; # XXX +$PALANG['pFetchmail_field_src_server'] = 'Server'; # XXX +$PALANG['pFetchmail_field_src_auth'] = 'Auth Type'; # XXX +$PALANG['pFetchmail_field_src_user'] = 'User'; # XXX +$PALANG['pFetchmail_field_src_password'] = 'Password'; # XXX +$PALANG['pFetchmail_field_src_folder'] = 'Folder'; # XXX +$PALANG['pFetchmail_field_poll_time'] = 'Poll'; # XXX +$PALANG['pFetchmail_field_fetchall'] = 'Fetch All'; # XXX +$PALANG['pFetchmail_field_keep'] = 'Keep'; # XXX +$PALANG['pFetchmail_field_protocol'] = 'Protocol'; # XXX +$PALANG['pFetchmail_field_extra_options'] = 'Extra Options'; # XXX +$PALANG['pFetchmail_field_mda'] = 'MDA'; # XXX +$PALANG['pFetchmail_field_date'] = 'Date'; # XXX +$PALANG['pFetchmail_field_returned_text'] = 'Returned Text'; # XXX +$PALANG['pFetchmail_desc_id'] = 'Record ID'; # XXX +$PALANG['pFetchmail_desc_mailbox'] = 'Local mailbox'; # XXX +$PALANG['pFetchmail_desc_src_server'] = 'Remote Server'; # XXX +$PALANG['pFetchmail_desc_src_auth'] = 'Mostly \'password\''; # Translators: Please do NOT translate 'password' here # XXX +$PALANG['pFetchmail_desc_src_user'] = 'Remote User'; # XXX +$PALANG['pFetchmail_desc_src_password'] = 'Remote Password'; # XXX +$PALANG['pFetchmail_desc_src_folder'] = 'Remote Folder'; # XXX +$PALANG['pFetchmail_desc_poll_time'] = 'Poll every ... minutes'; # XXX +$PALANG['pFetchmail_desc_fetchall'] = 'Retrieve both old (seen) and new messages'; # XXX +$PALANG['pFetchmail_desc_keep'] = 'Keep retrieved messages on the remote mailserver'; # XXX +$PALANG['pFetchmail_desc_protocol'] = 'Protocol to use'; # XXX +$PALANG['pFetchmail_desc_extra_options'] = 'Extra fetchmail Options'; # XXX +$PALANG['pFetchmail_desc_mda'] = 'Mail Delivery Agent'; # XXX +$PALANG['pFetchmail_desc_date'] = 'Date of last polling/configuration change'; # XXX +$PALANG['pFetchmail_desc_returned_text'] = 'Text message from last polling'; # XXX $PALANG['please_keep_this_as_last_entry'] = ''; # needed for language-check.sh /* vim: set expandtab ft=php softtabstop=3 tabstop=3 shiftwidth=3: */ Modified: trunk/languages/fo.lang =================================================================== --- trunk/languages/fo.lang 2007-11-12 13:09:51 UTC (rev 219) +++ trunk/languages/fo.lang 2007-11-12 22:06:01 UTC (rev 220) @@ -10,6 +10,8 @@ $PALANG['edit'] = 'broyt'; $PALANG['del'] = 'strika'; $PALANG['exit'] = 'Exit'; # XXX +$PALANG['cancel'] = 'Cancel'; # XXX +$PALANG['save'] = 'Save'; # XXX $PALANG['confirm'] = 'Ert tú vís(ur) í at tú vilt strika hetta?\n'; $PALANG['confirm_domain'] = 'Vilt tú veruliga strika allar upplýsingar fyri hetta navnaøki? Her kann ikki vendast aftur!\n'; $PALANG['check_update'] = 'Check for update'; @@ -361,6 +363,36 @@ $PALANG['pFetchmail_server_missing'] = 'Please enter the remote server name!'; # XXX $PALANG['pFetchmail_user_missing'] = 'Please enter the remote username!'; # XXX $PALANG['pFetchmail_password_missing'] = 'Please enter the remote password!'; # XXX +$PALANG['pFetchmail_field_id'] = 'ID'; # XXX +$PALANG['pFetchmail_field_mailbox'] = 'Mailbox'; # XXX +$PALANG['pFetchmail_field_src_server'] = 'Server'; # XXX +$PALANG['pFetchmail_field_src_auth'] = 'Auth Type'; # XXX +$PALANG['pFetchmail_field_src_user'] = 'User'; # XXX +$PALANG['pFetchmail_field_src_password'] = 'Password'; # XXX +$PALANG['pFetchmail_field_src_folder'] = 'Folder'; # XXX +$PALANG['pFetchmail_field_poll_time'] = 'Poll'; # XXX +$PALANG['pFetchmail_field_fetchall'] = 'Fetch All'; # XXX +$PALANG['pFetchmail_field_keep'] = 'Keep'; # XXX +$PALANG['pFetchmail_field_protocol'] = 'Protocol'; # XXX +$PALANG['pFetchmail_field_extra_options'] = 'Extra Options'; # XXX +$PALANG['pFetchmail_field_mda'] = 'MDA'; # XXX +$PALANG['pFetchmail_field_date'] = 'Date'; # XXX +$PALANG['pFetchmail_field_returned_text'] = 'Returned Text'; # XXX +$PALANG['pFetchmail_desc_id'] = 'Record ID'; # XXX +$PALANG['pFetchmail_desc_mailbox'] = 'Local mailbox'; # XXX +$PALANG['pFetchmail_desc_src_server'] = 'Remote Server'; # XXX +$PALANG['pFetchmail_desc_src_auth'] = 'Mostly \'password\''; # Translators: Please do NOT translate 'password' here # XXX +$PALANG['pFetchmail_desc_src_user'] = 'Remote User'; # XXX +$PALANG['pFetchmail_desc_src_password'] = 'Remote Password'; # XXX +$PALANG['pFetchmail_desc_src_folder'] = 'Remote Folder'; # XXX +$PALANG['pFetchmail_desc_poll_time'] = 'Poll every ... minutes'; # XXX +$PALANG['pFetchmail_desc_fetchall'] = 'Retrieve both old (seen) and new messages'; # XXX +$PALANG['pFetchmail_desc_keep'] = 'Keep retrieved messages on the remote mailserver'; # XXX +$PALANG['pFetchmail_desc_protocol'] = 'Protocol to use'; # XXX +$PALANG['pFetchmail_desc_extra_options'] = 'Extra fetchmail Options'; # XXX +$PALANG['pFetchmail_desc_mda'] = 'Mail Delivery Agent'; # XXX +$PALANG['pFetchmail_desc_date'] = 'Date of last polling/configuration change'; # XXX +$PALANG['pFetchmail_desc_returned_text'] = 'Text message from last polling'; # XXX $PALANG['please_keep_this_as_last_entry'] = ''; # needed for language-check.sh /* vim: set expandtab ft=php softtabstop=3 tabstop=3 shiftwidth=3: */ Modified: trunk/languages/fr.lang =================================================================== --- trunk/languages/fr.lang 2007-11-12 13:09:51 UTC (rev 219) +++ trunk/languages/fr.lang 2007-11-12 22:06:01 UTC (rev 220) @@ -12,6 +12,8 @@ $PALANG['edit'] = 'Modifier'; $PALANG['del'] = 'Effacer'; $PALANG['exit'] = 'Quitter'; +$PALANG['cancel'] = 'Cancel'; # XXX +$PALANG['save'] = 'Save'; # XXX $PALANG['confirm'] = 'Etes vous sur de vouloir supprimer cet enregistrement\n'; $PALANG['confirm_domain'] = 'Etes-vous sur de vouloir effacer tous les enregistrements dans ce domaine ? Cette opération ne pourra pas être annulée.\n'; $PALANG['check_update'] = 'Vérifiez les mises à jour'; @@ -358,6 +360,36 @@ $PALANG['pFetchmail_server_missing'] = 'Please enter the remote server name!'; # XXX $PALANG['pFetchmail_user_missing'] = 'Please enter the remote username!'; # XXX $PALANG['pFetchmail_password_missing'] = 'Please enter the remote password!'; # XXX +$PALANG['pFetchmail_field_id'] = 'ID'; # XXX +$PALANG['pFetchmail_field_mailbox'] = 'Mailbox'; # XXX +$PALANG['pFetchmail_field_src_server'] = 'Server'; # XXX +$PALANG['pFetchmail_field_src_auth'] = 'Auth Type'; # XXX +$PALANG['pFetchmail_field_src_user'] = 'User'; # XXX +$PALANG['pFetchmail_field_src_password'] = 'Password'; # XXX +$PALANG['pFetchmail_field_src_folder'] = 'Folder'; # XXX +$PALANG['pFetchmail_field_poll_time'] = 'Poll'; # XXX +$PALANG['pFetchmail_field_fetchall'] = 'Fetch All'; # XXX +$PALANG['pFetchmail_field_keep'] = 'Keep'; # XXX +$PALANG['pFetchmail_field_protocol'] = 'Protocol'; # XXX +$PALANG['pFetchmail_field_extra_options'] = 'Extra Options'; # XXX +$PALANG['pFetchmail_field_mda'] = 'MDA'; # XXX +$PALANG['pFetchmail_field_date'] = 'Date'; # XXX +$PALANG['pFetchmail_field_returned_text'] = 'Returned Text'; # XXX +$PALANG['pFetchmail_desc_id'] = 'Record ID'; # XXX +$PALANG['pFetchmail_desc_mailbox'] = 'Local mailbox'; # XXX +$PALANG['pFetchmail_desc_src_server'] = 'Remote Server'; # XXX +$PALANG['pFetchmail_desc_src_auth'] = 'Mostly \'password\''; # Translators: Please do NOT translate 'password' here # XXX +$PALANG['pFetchmail_desc_src_user'] = 'Remote User'; # XXX +$PALANG['pFetchmail_desc_src_password'] = 'Remote Password'; # XXX +$PALANG['pFetchmail_desc_src_folder'] = 'Remote Folder'; # XXX +$PALANG['pFetchmail_desc_poll_time'] = 'Poll every ... minutes'; # XXX +$PALANG['pFetchmail_desc_fetchall'] = 'Retrieve both old (seen) and new messages'; # XXX +$PALANG['pFetchmail_desc_keep'] = 'Keep retrieved messages on the remote mailserver'; # XXX +$PALANG['pFetchmail_desc_protocol'] = 'Protocol to use'; # XXX +$PALANG['pFetchmail_desc_extra_options'] = 'Extra fetchmail Options'; # XXX +$PALANG['pFetchmail_desc_mda'] = 'Mail Delivery Agent'; # XXX +$PALANG['pFetchmail_desc_date'] = 'Date of last polling/configuration change'; # XXX +$PALANG['pFetchmail_desc_returned_text'] = 'Text message from last polling'; # XXX $PALANG['please_keep_this_as_last_entry'] = ''; # needed for language-check.sh /* vim: set expandtab ft=php softtabstop=3 tabstop=3 shiftwidth=3: */ Modified: trunk/languages/hr.lang =================================================================== --- trunk/languages/hr.lang 2007-11-12 13:09:51 UTC (rev 219) +++ trunk/languages/hr.lang 2007-11-12 22:06:01 UTC (rev 220) @@ -9,6 +9,8 @@ $PALANG['edit'] = 'uredi'; $PALANG['del'] = 'brii'; $PALANG['exit'] = 'Exit'; # XXX +$PALANG['cancel'] = 'Cancel'; # XXX +$PALANG['save'] = 'Save'; # XXX $PALANG['confirm'] = 'Da li ste sigurni da elite ovo pobrisati?\n'; $PALANG['confirm_domain'] = 'Da li ste sigurni da elite pobrisati sve zapise za tu domenu? Zapisi ce biti zauvijek pobrisani!\n'; $PALANG['check_update'] = 'Provjeri da li postoji novija inačica'; @@ -355,6 +357,36 @@ $PALANG['pFetchmail_user_missing'] = 'Please enter the remote username!'; # XXX $PALANG['pFetchmail_password_missing'] = 'Please enter the remote password!'; # XXX +$PALANG['pFetchmail_field_id'] = 'ID'; # XXX +$PALANG['pFetchmail_field_mailbox'] = 'Mailbox'; # XXX +$PALANG['pFetchmail_field_src_server'] = 'Server'; # XXX +$PALANG['pFetchmail_field_src_auth'] = 'Auth Type'; # XXX +$PALANG['pFetchmail_field_src_user'] = 'User'; # XXX +$PALANG['pFetchmail_field_src_password'] = 'Password'; # XXX +$PALANG['pFetchmail_field_src_folder'] = 'Folder'; # XXX +$PALANG['pFetchmail_field_poll_time'] = 'Poll'; # XXX +$PALANG['pFetchmail_field_fetchall'] = 'Fetch All'; # XXX +$PALANG['pFetchmail_field_keep'] = 'Keep'; # XXX +$PALANG['pFetchmail_field_protocol'] = 'Protocol'; # XXX +$PALANG['pFetchmail_field_extra_options'] = 'Extra Options'; # XXX +$PALANG['pFetchmail_field_mda'] = 'MDA'; # XXX +$PALANG['pFetchmail_field_date'] = 'Date'; # XXX +$PALANG['pFetchmail_field_returned_text'] = 'Returned Text'; # XXX +$PALANG['pFetchmail_desc_id'] = 'Record ID'; # XXX +$PALANG['pFetchmail_desc_mailbox'] = 'Local mailbox'; # XXX +$PALANG['pFetchmail_desc_src_server'] = 'Remote Server'; # XXX +$PALANG['pFetchmail_desc_src_auth'] = 'Mostly \'password\''; # Translators: Please do NOT translate 'password' here # XXX +$PALANG['pFetchmail_desc_src_user'] = 'Remote User'; # XXX +$PALANG['pFetchmail_desc_src_password'] = 'Remote Password'; # XXX +$PALANG['pFetchmail_desc_src_folder'] = 'Remote Folder'; # XXX +$PALANG['pFetchmail_desc_poll_time'] = 'Poll every ... minutes'; # XXX +$PALANG['pFetchmail_desc_fetchall'] = 'Retrieve both old (seen) and new messages'; # XXX +$PALANG['pFetchmail_desc_keep'] = 'Keep retrieved messages on the remote mailserver'; # XXX +$PALANG['pFetchmail_desc_protocol'] = 'Protocol to use'; # XXX +$PALANG['pFetchmail_desc_extra_options'] = 'Extra fetchmail Options'; # XXX +$PALANG['pFetchmail_desc_mda'] = 'Mail Delivery Agent'; # XXX +$PALANG['pFetchmail_desc_date'] = 'Date of last polling/configuration change'; # XXX +$PALANG['pFetchmail_desc_returned_text'] = 'Text message from last polling'; # XXX $PALANG['please_keep_this_as_last_entry'] = ''; # needed for language-check.sh /* vim: set expandtab ft=php softtabstop=3 tabstop=3 shiftwidth=3: */ Modified: trunk/languages/hu.lang =================================================================== --- trunk/languages/hu.lang 2007-11-12 13:09:51 UTC (rev 219) +++ trunk/languages/hu.lang 2007-11-12 22:06:01 UTC (rev 220) @@ -10,6 +10,8 @@ $PALANG['edit'] = 'szerkeszt'; $PALANG['del'] = 'töröl'; $PALANG['exit'] = 'Kilép'; +$PALANG['cancel'] = 'Cancel'; # XXX +$PALANG['save'] = 'Save'; # XXX $PALANG['confirm'] = 'Biztos vagy benne hogy törlöd ezt?\n'; $PALANG['confirm_domain'] = 'Biztos hogy törölni akarod az összes bejegyzést ez alól a domain alól? Nem lehet visszahozni késõbb!\n'; $PALANG['check_update'] = 'Check for update'; # XXX @@ -369,6 +371,36 @@ $PALANG['pFetchmail_server_missing'] = 'Please enter the remote server name!'; # XXX $PALANG['pFetchmail_user_missing'] = 'Please enter the remote username!'; # XXX $PALANG['pFetchmail_password_missing'] = 'Please enter the remote password!'; # XXX +$PALANG['pFetchmail_field_id'] = 'ID'; # XXX +$PALANG['pFetchmail_field_mailbox'] = 'Mailbox'; # XXX +$PALANG['pFetchmail_field_src_server'] = 'Server'; # XXX +$PALANG['pFetchmail_field_src_auth'] = 'Auth Type'; # XXX +$PALANG['pFetchmail_field_src_user'] = 'User'; # XXX +$PALANG['pFetchmail_field_src_password'] = 'Password'; # XXX +$PALANG['pFetchmail_field_src_folder'] = 'Folder'; # XXX +$PALANG['pFetchmail_field_poll_time'] = 'Poll'; # XXX +$PALANG['pFetchmail_field_fetchall'] = 'Fetch All'; # XXX +$PALANG['pFetchmail_field_keep'] = 'Keep'; # XXX +$PALANG['pFetchmail_field_protocol'] = 'Protocol'; # XXX +$PALANG['pFetchmail_field_extra_options'] = 'Extra Options'; # XXX +$PALANG['pFetchmail_field_mda'] = 'MDA'; # XXX +$PALANG['pFetchmail_field_date'] = 'Date'; # XXX +$PALANG['pFetchmail_field_returned_text'] = 'Returned Text'; # XXX +$PALANG['pFetchmail_desc_id'] = 'Record ID'; # XXX +$PALANG['pFetchmail_desc_mailbox'] = 'Local mailbox'; # XXX +$PALANG['pFetchmail_desc_src_server'] = 'Remote Server'; # XXX +$PALANG['pFetchmail_desc_src_auth'] = 'Mostly \'password\''; # Translators: Please do NOT translate 'password' here # XXX +$PALANG['pFetchmail_desc_src_user'] = 'Remote User'; # XXX +$PALANG['pFetchmail_desc_src_password'] = 'Remote Password'; # XXX +$PALANG['pFetchmail_desc_src_folder'] = 'Remote Folder'; # XXX +$PALANG['pFetchmail_desc_poll_time'] = 'Poll every ... minutes'; # XXX +$PALANG['pFetchmail_desc_fetchall'] = 'Retrieve both old (seen) and new messages'; # XXX +$PALANG['pFetchmail_desc_keep'] = 'Keep retrieved messages on the remote mailserver'; # XXX +$PALANG['pFetchmail_desc_protocol'] = 'Protocol to use'; # XXX +$PALANG['pFetchmail_desc_extra_options'] = 'Extra fetchmail Options'; # XXX +$PALANG['pFetchmail_desc_mda'] = 'Mail Delivery Agent'; # XXX +$PALANG['pFetchmail_desc_date'] = 'Date of last polling/configuration change'; # XXX +$PALANG['pFetchmail_desc_returned_text'] = 'Text message from last polling'; # XXX $PALANG['please_keep_this_as_last_entry'] = ''; # needed for language-check.sh /* vim: set expandtab ft=php softtabstop=3 tabstop=3 shiftwidth=3: */ Modified: trunk/languages/is.lang =================================================================== --- trunk/languages/is.lang 2007-11-12 13:09:51 UTC (rev 219) +++ trunk/languages/is.lang 2007-11-12 22:06:01 UTC (rev 220) @@ -10,6 +10,8 @@ $PALANG['edit'] = 'skrifa í'; $PALANG['del'] = 'eyða'; $PALANG['exit'] = 'Exit'; # XXX +$PALANG['cancel'] = 'Cancel'; # XXX +$PALANG['save'] = 'Save'; # XXX $PALANG['confirm'] = 'Ertu viss um að þú viljir eyða þessu?\n'; $PALANG['confirm_domain'] = 'Ertu viss um að þú viljir eyða öllu sem tengist þessu léni? Það er ekki hægt að bakka með aðgerðina!\n'; $PALANG['check_update'] = 'Check for update'; @@ -355,6 +357,36 @@ $PALANG['pFetchmail_server_missing'] = 'Please enter the remote server name!'; # XXX $PALANG['pFetchmail_user_missing'] = 'Please enter the remote username!'; # XXX $PALANG['pFetchmail_password_missing'] = 'Please enter the remote password!'; # XXX +$PALANG['pFetchmail_field_id'] = 'ID'; # XXX +$PALANG['pFetchmail_field_mailbox'] = 'Mailbox'; # XXX +$PALANG['pFetchmail_field_src_server'] = 'Server'; # XXX +$PALANG['pFetchmail_field_src_auth'] = 'Auth Type'; # XXX +$PALANG['pFetchmail_field_src_user'] = 'User'; # XXX +$PALANG['pFetchmail_field_src_password'] = 'Password'; # XXX +$PALANG['pFetchmail_field_src_folder'] = 'Folder'; # XXX +$PALANG['pFetchmail_field_poll_time'] = 'Poll'; # XXX +$PALANG['pFetchmail_field_fetchall'] = 'Fetch All'; # XXX +$PALANG['pFetchmail_field_keep'] = 'Keep'; # XXX +$PALANG['pFetchmail_field_protocol'] = 'Protocol'; # XXX +$PALANG['pFetchmail_field_extra_options'] = 'Extra Options'; # XXX +$PALANG['pFetchmail_field_mda'] = 'MDA'; # XXX +$PALANG['pFetchmail_field_date'] = 'Date'; # XXX +$PALANG['pFetchmail_field_returned_text'] = 'Returned Text'; # XXX +$PALANG['pFetchmail_desc_id'] = 'Record ID'; # XXX +$PALANG['pFetchmail_desc_mailbox'] = 'Local mailbox'; # XXX +$PALANG['pFetchmail_desc_src_server'] = 'Remote Server'; # XXX +$PALANG['pFetchmail_desc_src_auth'] = 'Mostly \'password\''; # Translators: Please do NOT translate 'password' here # XXX +$PALANG['pFetchmail_desc_src_user'] = 'Remote User'; # XXX +$PALANG['pFetchmail_desc_src_password'] = 'Remote Password'; # XXX +$PALANG['pFetchmail_desc_src_folder'] = 'Remote Folder'; # XXX +$PALANG['pFetchmail_desc_poll_time'] = 'Poll every ... minutes'; # XXX +$PALANG['pFetchmail_desc_fetchall'] = 'Retrieve both old (seen) and new messages'; # XXX +$PALANG['pFetchmail_desc_keep'] = 'Keep retrieved messages on the remote mailserver'; # XXX +$PALANG['pFetchmail_desc_protocol'] = 'Protocol to use'; # XXX +$PALANG['pFetchmail_desc_extra_options'] = 'Extra fetchmail Options'; # XXX +$PALANG['pFetchmail_desc_mda'] = 'Mail Delivery Agent'; # XXX +$PALANG['pFetchmail_desc_date'] = 'Date of last polling/configuration change'; # XXX +$PALANG['pFetchmail_desc_returned_text'] = 'Text message from last polling'; # XXX $PALANG['please_keep_this_as_last_entry'] = ''; # needed for language-check.sh /* vim: set expandtab ft=php softtabstop=3 tabstop=3 shiftwidth=3: */ Modified: trunk/languages/it.lang =================================================================== --- trunk/languages/it.lang 2007-11-12 13:09:51 UTC (rev 219) +++ trunk/languages/it.lang 2007-11-12 22:06:01 UTC (rev 220) @@ -10,6 +10,8 @@ $PALANG['edit'] = 'modifica'; $PALANG['del'] = 'cancella'; $PALANG['exit'] = 'Exit'; # XXX +$PALANG['cancel'] = 'Cancel'; # XXX +$PALANG['save'] = 'Save'; # XXX $PALANG['confirm'] = 'Sei sicuro di volerlo cancellare?\n'; $PALANG['confirm_domain'] = 'Sei sicuro di voler cancellare tutti gli indirizzi di questo dominio? Questa modifica sarà permanente!\n'; $PALANG['check_update'] = 'Check for update'; @@ -356,6 +358,36 @@ $PALANG['pFetchmail_server_missing'] = 'Please enter the remote server name!'; # XXX $PALANG['pFetchmail_user_missing'] = 'Please enter the remote username!'; # XXX $PALANG['pFetchmail_password_missing'] = 'Please enter the remote password!'; # XXX +$PALANG['pFetchmail_field_id'] = 'ID'; # XXX +$PALANG['pFetchmail_field_mailbox'] = 'Mailbox'; # XXX +$PALANG['pFetchmail_field_src_server'] = 'Server'; # XXX +$PALANG['pFetchmail_field_src_auth'] = 'Auth Type'; # XXX +$PALANG['pFetchmail_field_src_user'] = 'User'; # XXX +$PALANG['pFetchmail_field_src_password'] = 'Password'; # XXX +$PALANG['pFetchmail_field_src_folder'] = 'Folder'; # XXX +$PALANG['pFetchmail_field_poll_time'] = 'Poll'; # XXX +$PALANG['pFetchmail_field_fetchall'] = 'Fetch All'; # XXX +$PALANG['pFetchmail_field_keep'] = 'Keep'; # XXX +$PALANG['pFetchmail_field_protocol'] = 'Protocol'; # XXX +$PALANG['pFetchmail_field_extra_options'] = 'Extra Options'; # XXX +$PALANG['pFetchmail_field_mda'] = 'MDA'; # XXX +$PALANG['pFetchmail_field_date'] = 'Date'; # XXX +$PALANG['pFetchmail_field_return... [truncated message content] |