From: <ag...@us...> - 2008-03-06 11:38:08
|
Revision: 44 http://panda-admin.svn.sourceforge.net/panda-admin/?rev=44&view=rev Author: agrassi Date: 2008-03-06 03:38:15 -0800 (Thu, 06 Mar 2008) Log Message: ----------- Tagged release candidate 2 for 1.0 This is a release candidate. Not like previous. Added Paths: ----------- tags/panda-admin-1.0rc2/ tags/panda-admin-1.0rc2/config.php tags/panda-admin-1.0rc2/doc/TODO tags/panda-admin-1.0rc2/extra/scripts/compile-po.sh tags/panda-admin-1.0rc2/extra/scripts/update-po.sh tags/panda-admin-1.0rc2/index.php tags/panda-admin-1.0rc2/locale/ tags/panda-admin-1.0rc2/modules/domain.php tags/panda-admin-1.0rc2/modules/domainalias.php tags/panda-admin-1.0rc2/modules/email/add.php tags/panda-admin-1.0rc2/modules/email/modifynwl/chpw.php tags/panda-admin-1.0rc2/modules/email.php tags/panda-admin-1.0rc2/modules/users/add.php tags/panda-admin-1.0rc2/modules/users.php tags/panda-admin-1.0rc2/tpl/email/listmails.php tags/panda-admin-1.0rc2/tpl/header.php tags/panda-admin-1.0rc2/tpl/users/modify.php Removed Paths: ------------- tags/panda-admin-1.0rc2/config.php tags/panda-admin-1.0rc2/doc/TODO tags/panda-admin-1.0rc2/extra/scripts/gettextize.sh tags/panda-admin-1.0rc2/index.php tags/panda-admin-1.0rc2/modules/domain.php tags/panda-admin-1.0rc2/modules/domainalias.php tags/panda-admin-1.0rc2/modules/email/add.php tags/panda-admin-1.0rc2/modules/email/modifynwl/chpw.php tags/panda-admin-1.0rc2/modules/email.php tags/panda-admin-1.0rc2/modules/users/add.php tags/panda-admin-1.0rc2/modules/users.php tags/panda-admin-1.0rc2/tpl/email/listmails.php tags/panda-admin-1.0rc2/tpl/header.php tags/panda-admin-1.0rc2/tpl/users/modify.php Copied: tags/panda-admin-1.0rc2 (from rev 41, trunk) Deleted: tags/panda-admin-1.0rc2/config.php =================================================================== --- trunk/config.php 2008-02-28 11:31:35 UTC (rev 41) +++ tags/panda-admin-1.0rc2/config.php 2008-03-06 11:38:15 UTC (rev 44) @@ -1,41 +0,0 @@ -<? -/* - Copyright (C) 2007 - Marco Nenciarini <mn...@gr...> - - 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -// Database connection string -define('DSN', 'pgsql://vmail:vpass@dbserver:5432/vmail'); - -// How many emails are to be displayed in the lists? -define('EMAIL_PER_PAGE', 20); - -// Are the domain to be linked as bar.com -> foo.com (FALSE) or b -> f (TRUE)? -define('DOMAIN_ONLY_FIRST_LETTER',TRUE); - -// Separator for the domain list (bar.com [separator] foo.com) -define('DOMAIN_SEPARATOR', " -> "); - -// Stuff related to newsletter [un]subscription email to be sent -define('MAIL_FROM','new...@gr...'); -define('SMTP_HOST','smtp.fastweb.it'); - -// Encryption algorythm for mailboxes passwords -// currently 'crypt-md5' and 'crypt-des' are supported -define('CRYPT_ALGO','crypt-md5'); - -?> Copied: tags/panda-admin-1.0rc2/config.php (from rev 43, trunk/config.php) =================================================================== --- tags/panda-admin-1.0rc2/config.php (rev 0) +++ tags/panda-admin-1.0rc2/config.php 2008-03-06 11:38:15 UTC (rev 44) @@ -0,0 +1,50 @@ +<? +/* + Copyright (C) 2007 - Marco Nenciarini <mn...@gr...> + + 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +*/ + +// Database connection string +define('DSN', 'pgsql://vmail:vpass@dbserver:5432/vmail'); + +// How many emails are to be displayed in the lists? +define('EMAIL_PER_PAGE', 20); + +// Are the domain to be linked as bar.com -> foo.com (FALSE) or b -> f (TRUE)? +define('DOMAIN_ONLY_FIRST_LETTER',TRUE); + +// Separator for the domain list (bar.com [separator] foo.com) +define('DOMAIN_SEPARATOR', " -> "); + +// Stuff related to newsletter [un]subscription email to be sent +define('MAIL_FROM','new...@gr...'); +define('SMTP_HOST','smtp.fastweb.it'); + +// Encryption algorythm for mailboxes passwords +// currently 'crypt-md5' and 'crypt-des' are supported +define('CRYPT_ALGO','crypt-md5'); + +// Language +// Currently supported are it_IT/C +// Warning: To use a locale, you need the right locale support on the server. +// it_IT, for example could be either "it", "it_IT", "it_IT.UTF-8", "it_IT@euro".. +// Make a few tests before production deployment. +// If you don't know what to write here, just type "C", and you'll have an english interface. +// example: define('PANDA_LANG','it_IT.UTF-8'); +define('PANDA_LANG','C'); + +?> Deleted: tags/panda-admin-1.0rc2/doc/TODO =================================================================== --- trunk/doc/TODO 2008-02-28 11:31:35 UTC (rev 41) +++ tags/panda-admin-1.0rc2/doc/TODO 2008-03-06 11:38:15 UTC (rev 44) @@ -1,20 +0,0 @@ - - Things that need to be done: - - - Sometime mkpath results in unreadable directory from mailserver, - investigate. - - - Let users have the ability to enable/disable newsletter support - - - E-mails listed should be differenced from each other (email,alias,newsletter etc) - with a better heuristic, and a better (more clear) graphic way (currently it uses bold/italic) - - - When users change their own password, we should verify the old password, and possibly - have a form with a "password" field with double insert - - - Anything else you may want to implement - - - If you have ideas, patches, questions to tell us, feel free to contact - (see CREDITS) - \ No newline at end of file Copied: tags/panda-admin-1.0rc2/doc/TODO (from rev 42, trunk/doc/TODO) =================================================================== --- tags/panda-admin-1.0rc2/doc/TODO (rev 0) +++ tags/panda-admin-1.0rc2/doc/TODO 2008-03-06 11:38:15 UTC (rev 44) @@ -0,0 +1,17 @@ + + Things that need to be done: + + - Sometime mkpath results in unreadable directory from mailserver, + investigate. + + - Let users have the ability to enable/disable newsletter support + + - When users change their own password, we should verify the old password, and possibly + have a form with a "password" field with double insert + + - Anything else you may want to implement + + + If you have ideas, patches, questions to tell us, feel free to contact + (see CREDITS) + \ No newline at end of file Copied: tags/panda-admin-1.0rc2/extra/scripts/compile-po.sh (from rev 42, trunk/extra/scripts/compile-po.sh) =================================================================== --- tags/panda-admin-1.0rc2/extra/scripts/compile-po.sh (rev 0) +++ tags/panda-admin-1.0rc2/extra/scripts/compile-po.sh 2008-03-06 11:38:15 UTC (rev 44) @@ -0,0 +1,15 @@ +#!/bin/sh + +if [ ! -d "locale" ]; then + echo "You must launch this from the top source directory" + exit +fi + +echo -n "Updating language:" +for lang in locale/*; do + lcpath="${lang}/LC_MESSAGES" + echo -n " ${lang#locale/}" + msgfmt ${lcpath}/messages.po -o ${lcpath}/messages.mo +done + +echo . Deleted: tags/panda-admin-1.0rc2/extra/scripts/gettextize.sh =================================================================== --- trunk/extra/scripts/gettextize.sh 2008-02-28 11:31:35 UTC (rev 41) +++ tags/panda-admin-1.0rc2/extra/scripts/gettextize.sh 2008-03-06 11:38:15 UTC (rev 44) @@ -1,11 +0,0 @@ -#!/bin/sh - -lang=$1 - -[ -z $lang ] && echo "Usage: $0 <lang>\n(e.g. $0 fr)" && exit - -lcpath="./locale/${lang}/LC_MESSAGES" -mkdir -p ${lcpath} - -find -not -type 'd' -name \*.php | xgettext -L php -D . -f - -o ${lcpath}/messages.po - Copied: tags/panda-admin-1.0rc2/extra/scripts/update-po.sh (from rev 42, trunk/extra/scripts/update-po.sh) =================================================================== --- tags/panda-admin-1.0rc2/extra/scripts/update-po.sh (rev 0) +++ tags/panda-admin-1.0rc2/extra/scripts/update-po.sh 2008-03-06 11:38:15 UTC (rev 44) @@ -0,0 +1,19 @@ +#!/bin/sh + +lang=$1 + +[ -z $lang ] && echo "Usage: $0 <lang>\n(e.g. $0 fr)" && exit + +lcpath="./locale/${lang}/LC_MESSAGES" + +if [ ! -d "locale" ]; then + echo "You must launch this from the top source directory" + exit +fi + +mkdir -p ${lcpath} + +touch ${lcpath}/messages.po + +find . -iname "*.php" -exec xgettext --omit-header -j -o ${lcpath}/messages.po --keyword=_ {} \; + Deleted: tags/panda-admin-1.0rc2/index.php =================================================================== --- trunk/index.php 2008-02-28 11:31:35 UTC (rev 41) +++ tags/panda-admin-1.0rc2/index.php 2008-03-06 11:38:15 UTC (rev 44) @@ -1,57 +0,0 @@ -<? -/* - Copyright (C) 2007 - Marco Nenciarini <mn...@gr...> - - 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -require_once ('config.php'); -require_once ('includes/functions.php'); - - -// Fill $status with command line -$status = decode_status(); - -if(!is_loggedin()){ - if($_POST['username'] && $_POST['password']){ - do_login($_POST['username'],$_POST['password']); - } - else{ - require('tpl/login.php'); - exit; - } -} - -switch ($status->mode) { - case 'logout': - case 'email' : - case 'domain' : - case 'domainalias' : - case 'users' : - case 'chmypw' : - case 'newsletters' : - break; - default : - $status = new_status(); - $status->mode = 'email'; -} - -require ("modules/$status->mode.php"); - -include ('tpl/header.php'); -include ("tpl/$status->body.php"); -include ('tpl/footer.php'); -?> Copied: tags/panda-admin-1.0rc2/index.php (from rev 42, trunk/index.php) =================================================================== --- tags/panda-admin-1.0rc2/index.php (rev 0) +++ tags/panda-admin-1.0rc2/index.php 2008-03-06 11:38:15 UTC (rev 44) @@ -0,0 +1,64 @@ +<? +/* + Copyright (C) 2007 - Marco Nenciarini <mn...@gr...> + + 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +*/ + +require_once ('config.php'); +require_once ('includes/functions.php'); + +if(setlocale(LC_ALL, PANDA_LANG)) { + bindtextdomain("messages","locale"); + textdomain("messages"); +} else { + echo "Unsupported locale: " . PANDA_LANG; + die; +} + +// Fill $status with command line +$status = decode_status(); + +if(!is_loggedin()){ + if($_POST['username'] && $_POST['password']){ + do_login($_POST['username'],$_POST['password']); + } + else{ + require('tpl/login.php'); + exit; + } +} + +switch ($status->mode) { + case 'logout': + case 'email' : + case 'domain' : + case 'domainalias' : + case 'users' : + case 'chmypw' : + case 'newsletters' : + break; + default : + $status = new_status(); + $status->mode = 'email'; +} + +require ("modules/$status->mode.php"); + +include ('tpl/header.php'); +include ("tpl/$status->body.php"); +include ('tpl/footer.php'); +?> Copied: tags/panda-admin-1.0rc2/locale (from rev 42, trunk/locale) Deleted: tags/panda-admin-1.0rc2/modules/domain.php =================================================================== --- trunk/modules/domain.php 2008-02-28 11:31:35 UTC (rev 41) +++ tags/panda-admin-1.0rc2/modules/domain.php 2008-03-06 11:38:15 UTC (rev 44) @@ -1,56 +0,0 @@ -<? -/* - Copyright (C) 2007 - Marco Nenciarini <mn...@gr...> - - 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - -// Load virtual domains -$virtual_domains = load_domain_list(); - -add_navigation_link('domain management', - make_link(array ('mode')) . "&op=listdomains"); - -// If the specified domain doesn't exist, or user doesn't have rights, fall back to domain list -if ($status->domain) { - check_permission('domain',$status->domain); - if ($status->domain_id = search_array_field($virtual_domains, "name", $status->domain)) { - add_navigation_link($status->domain, make_link(array ( - 'mode', - 'domain' - ))); - } else { - $status->op = 'listdomains'; - } -} - -switch ($status->op) { - case 'delete' : - case 'add' : - if (!is_administrator()) { - forbidden(); - } - case 'modify' : - require ("modules/".$status->mode."/".$status->op.".php"); - break; - default : - $status->op = 'listdomains'; -} - -if ($status->op == 'listdomains') { - require ("modules/".$status->mode."/".$status->op.".php"); -} - -?> Copied: tags/panda-admin-1.0rc2/modules/domain.php (from rev 42, trunk/modules/domain.php) =================================================================== --- tags/panda-admin-1.0rc2/modules/domain.php (rev 0) +++ tags/panda-admin-1.0rc2/modules/domain.php 2008-03-06 11:38:15 UTC (rev 44) @@ -0,0 +1,56 @@ +<? +/* + Copyright (C) 2007 - Marco Nenciarini <mn...@gr...> + + 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +// Load virtual domains +$virtual_domains = load_domain_list(); + +add_navigation_link(_('domain management'), + make_link(array ('mode')) . "&op=listdomains"); + +// If the specified domain doesn't exist, or user doesn't have rights, fall back to domain list +if ($status->domain) { + check_permission('domain',$status->domain); + if ($status->domain_id = search_array_field($virtual_domains, "name", $status->domain)) { + add_navigation_link($status->domain, make_link(array ( + 'mode', + 'domain' + ))); + } else { + $status->op = 'listdomains'; + } +} + +switch ($status->op) { + case 'delete' : + case 'add' : + if (!is_administrator()) { + forbidden(); + } + case 'modify' : + require ("modules/".$status->mode."/".$status->op.".php"); + break; + default : + $status->op = 'listdomains'; +} + +if ($status->op == 'listdomains') { + require ("modules/".$status->mode."/".$status->op.".php"); +} + +?> Deleted: tags/panda-admin-1.0rc2/modules/domainalias.php =================================================================== --- trunk/modules/domainalias.php 2008-02-28 11:31:35 UTC (rev 41) +++ tags/panda-admin-1.0rc2/modules/domainalias.php 2008-03-06 11:38:15 UTC (rev 44) @@ -1,55 +0,0 @@ -<? -/* - Copyright (C) 2007 - Marco Nenciarini <mn...@gr...> - - 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - -$alias_domains = load_alias_domain_list(); - -add_navigation_link('alias domain management', - make_link(array ('mode')) . "&op=listdomains"); - -// If specified domain doesn't exist or user doesn't have rights, fall back to domain list -if ($status->domain) { - check_permission('aliasdomain',$status->domain); - if (array_key_exists($status->domain, $alias_domains)) { - add_navigation_link($status->domain, make_link(array ( - 'mode', - 'domain' - ))); - } else { - $status->op = 'listdomains'; - } -} - -switch ($status->op) { - case 'add' : - case 'delete' : - if (!is_administrator()) { - forbidden(); - } - case 'modify' : - require ("modules/".$status->mode."/".$status->op.".php"); - break; - default : - $status->op = 'listdomains'; -} - -if ($status->op == 'listdomains') { - require ("modules/".$status->mode."/".$status->op.".php"); -} - -?> Copied: tags/panda-admin-1.0rc2/modules/domainalias.php (from rev 42, trunk/modules/domainalias.php) =================================================================== --- tags/panda-admin-1.0rc2/modules/domainalias.php (rev 0) +++ tags/panda-admin-1.0rc2/modules/domainalias.php 2008-03-06 11:38:15 UTC (rev 44) @@ -0,0 +1,55 @@ +<? +/* + Copyright (C) 2007 - Marco Nenciarini <mn...@gr...> + + 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +$alias_domains = load_alias_domain_list(); + +add_navigation_link(_('alias domain management'), + make_link(array ('mode')) . "&op=listdomains"); + +// If specified domain doesn't exist or user doesn't have rights, fall back to domain list +if ($status->domain) { + check_permission('aliasdomain',$status->domain); + if (array_key_exists($status->domain, $alias_domains)) { + add_navigation_link($status->domain, make_link(array ( + 'mode', + 'domain' + ))); + } else { + $status->op = 'listdomains'; + } +} + +switch ($status->op) { + case 'add' : + case 'delete' : + if (!is_administrator()) { + forbidden(); + } + case 'modify' : + require ("modules/".$status->mode."/".$status->op.".php"); + break; + default : + $status->op = 'listdomains'; +} + +if ($status->op == 'listdomains') { + require ("modules/".$status->mode."/".$status->op.".php"); +} + +?> Deleted: tags/panda-admin-1.0rc2/modules/email/add.php =================================================================== --- trunk/modules/email/add.php 2008-02-28 11:31:35 UTC (rev 41) +++ tags/panda-admin-1.0rc2/modules/email/add.php 2008-03-06 11:38:15 UTC (rev 44) @@ -1,58 +0,0 @@ -<?php -/* - Copyright (C) 2007 - Marco Nenciarini <mn...@gr...> - - 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - -add_navigation_link('nuovo indirizzo', make_link('mode', 'op', 'domain')); - -// If no user has been specified, display -// the add page -if (!$status->subop || !$status->user) { - $status->body = 'email/add'; - return; -} - -// Check if user already exists -if (isset ($emails[$status->user])) { - $status->title = _("Error"); - $status->message = _("Address already existing"); - unset ($status->user); - $status->body = 'message'; - return; -} - -// check if user is valid -if (!is_email("$status->user@$status->domain")) { - $status->title = _("Error"); - $status->message = _("The name '") . $status->user . _("' is not valid."); - unset ($status->user); - $status->body = 'message'; -} - -// Select the right operation from the user type -switch ($status->subop) { - case "local" : - case "remote" : - case "newsletter" : - require ("modules/email/add/" . $status->subop . ".php"); - break; - default : - $status->body = 'email/add'; - break; -} -?> Copied: tags/panda-admin-1.0rc2/modules/email/add.php (from rev 42, trunk/modules/email/add.php) =================================================================== --- tags/panda-admin-1.0rc2/modules/email/add.php (rev 0) +++ tags/panda-admin-1.0rc2/modules/email/add.php 2008-03-06 11:38:15 UTC (rev 44) @@ -0,0 +1,58 @@ +<?php +/* + Copyright (C) 2007 - Marco Nenciarini <mn...@gr...> + + 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +add_navigation_link(_("new address"), make_link('mode', 'op', 'domain')); + +// If no user has been specified, display +// the add page +if (!$status->subop || !$status->user) { + $status->body = 'email/add'; + return; +} + +// Check if user already exists +if (isset ($emails[$status->user])) { + $status->title = _("Error"); + $status->message = _("Address already existing"); + unset ($status->user); + $status->body = 'message'; + return; +} + +// check if user is valid +if (!is_email("$status->user@$status->domain")) { + $status->title = _("Error"); + $status->message = _("The name '") . $status->user . _("' is not valid."); + unset ($status->user); + $status->body = 'message'; +} + +// Select the right operation from the user type +switch ($status->subop) { + case "local" : + case "remote" : + case "newsletter" : + require ("modules/email/add/" . $status->subop . ".php"); + break; + default : + $status->body = 'email/add'; + break; +} +?> Deleted: tags/panda-admin-1.0rc2/modules/email/modifynwl/chpw.php =================================================================== --- trunk/modules/email/modifynwl/chpw.php 2008-02-28 11:31:35 UTC (rev 41) +++ tags/panda-admin-1.0rc2/modules/email/modifynwl/chpw.php 2008-03-06 11:38:15 UTC (rev 44) @@ -1,41 +0,0 @@ -<?php -/* - Copyright (C) 2007 - Marco Nenciarini <mn...@gr...> - - 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - -// If no password has been given, ask for it -if (empty ($status->data) || !check_scookie()) { - create_scookie(); - $status->title = _("Password change"); - $status->message = _("Insert the new password for te newsletter ")."$status->user@$status->domain"; - $status->ask = true; - $status->cancel_to = make_link(array('mode','domain','user','op')); - $status->body = 'input'; - return; -} - -// Password has been supplied, scookie is ok -if (changeNWLPassword("$status->user@$status->domain", $status->data)) { - $status->title = _("Operation successful."); - $status->message = _("The password for the newsletter "). "$status->user@$status->domain" . _(" has been updated."); -} else { - $status->title = _("Error"); - $status->message = _("Error while updating the password for the newsletter") . "$status->user@$status->domain"; -} -$status->body = 'message'; - -?> Copied: tags/panda-admin-1.0rc2/modules/email/modifynwl/chpw.php (from rev 42, trunk/modules/email/modifynwl/chpw.php) =================================================================== --- tags/panda-admin-1.0rc2/modules/email/modifynwl/chpw.php (rev 0) +++ tags/panda-admin-1.0rc2/modules/email/modifynwl/chpw.php 2008-03-06 11:38:15 UTC (rev 44) @@ -0,0 +1,41 @@ +<?php +/* + Copyright (C) 2007 - Marco Nenciarini <mn...@gr...> + + 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +// If no password has been given, ask for it +if (empty ($status->data) || !check_scookie()) { + create_scookie(); + $status->title = _("Password change"); + $status->message = _("Insert the new password for the newsletter ")."$status->user@$status->domain"; + $status->ask = true; + $status->cancel_to = make_link(array('mode','domain','user','op')); + $status->body = 'input'; + return; +} + +// Password has been supplied, scookie is ok +if (changeNWLPassword("$status->user@$status->domain", $status->data)) { + $status->title = _("Operation successful."); + $status->message = _("The password for the newsletter "). "$status->user@$status->domain" . _(" has been updated."); +} else { + $status->title = _("Error"); + $status->message = _("Error while updating the password for the newsletter") . "$status->user@$status->domain"; +} +$status->body = 'message'; + +?> Deleted: tags/panda-admin-1.0rc2/modules/email.php =================================================================== --- trunk/modules/email.php 2008-02-28 11:31:35 UTC (rev 41) +++ tags/panda-admin-1.0rc2/modules/email.php 2008-03-06 11:38:15 UTC (rev 44) @@ -1,56 +0,0 @@ -<? -/* - Copyright (C) 2007 - Marco Nenciarini <mn...@gr...> - - 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - -$virtual_domains = load_domain_list(); - -add_navigation_link('e-mail management', - make_link(array ('mode')) . "&op=listdomains"); - -// If specified domain doesn't exist or user doesn't have rights, fall back to domain list -if ($status->domain) { - check_permission('domain',$status->domain); - if (search_array_field($virtual_domains, "name", $status->domain)) { - add_navigation_link($status->domain, make_link(array ( - 'mode', - 'domain' - )) . "&op=listmails"); - $emails = load_domain($status->domain); - } else { - $status->op = 'listdomains'; - } -} - -switch ($status->op) { - case 'add' : - case 'modify' : - case 'modifynwl' : - case 'delete' : - case 'deletenwl' : - case 'listmails' : - require ("modules/".$status->mode."/".$status->op.".php"); - break; - default : - $status->op = 'listdomains'; -} - -if ($status->op == 'listdomains') { - require ("modules/".$status->mode."/".$status->op.".php"); -} - -?> Copied: tags/panda-admin-1.0rc2/modules/email.php (from rev 42, trunk/modules/email.php) =================================================================== --- tags/panda-admin-1.0rc2/modules/email.php (rev 0) +++ tags/panda-admin-1.0rc2/modules/email.php 2008-03-06 11:38:15 UTC (rev 44) @@ -0,0 +1,56 @@ +<? +/* + Copyright (C) 2007 - Marco Nenciarini <mn...@gr...> + + 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +$virtual_domains = load_domain_list(); + +add_navigation_link(_('e-mail management'), + make_link(array ('mode')) . "&op=listdomains"); + +// If specified domain doesn't exist or user doesn't have rights, fall back to domain list +if ($status->domain) { + check_permission('domain',$status->domain); + if (search_array_field($virtual_domains, "name", $status->domain)) { + add_navigation_link($status->domain, make_link(array ( + 'mode', + 'domain' + )) . "&op=listmails"); + $emails = load_domain($status->domain); + } else { + $status->op = 'listdomains'; + } +} + +switch ($status->op) { + case 'add' : + case 'modify' : + case 'modifynwl' : + case 'delete' : + case 'deletenwl' : + case 'listmails' : + require ("modules/".$status->mode."/".$status->op.".php"); + break; + default : + $status->op = 'listdomains'; +} + +if ($status->op == 'listdomains') { + require ("modules/".$status->mode."/".$status->op.".php"); +} + +?> Deleted: tags/panda-admin-1.0rc2/modules/users/add.php =================================================================== --- trunk/modules/users/add.php 2008-02-28 11:31:35 UTC (rev 41) +++ tags/panda-admin-1.0rc2/modules/users/add.php 2008-03-06 11:38:15 UTC (rev 44) @@ -1,92 +0,0 @@ -<?php -/* - Copyright (C) 2007 - Marco Nenciarini <mn...@gr...> - - 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - -add_navigation_link('nuovo utente', make_link('mode', 'op')); - -// If no user or action has been specified, show main add page -if (!$status->data[4]|| !$status->data[0]) { - $status->body = 'users/add'; - return; -} - -// Check for a valid unix name -if(!is_user($status->data[0])) { - $status->title = _("Error"); - $status->message = _("The supplied user is not valid"); - $status->body = 'message'; - return; -} - -if(empty($status->data[3]) || empty($status->data[2])) { - $status->title = _("Error"); - $status->message = _("The supplied password is not valid"); - $status->body = 'message'; - return; -} - - -// Check if user already exists -if (isset ($users[$status->data[0]])) { - $status->title = _("Error"); - $status->message = _("User already existing"); - unset ($status->data[0]); - $status->body = 'message'; - return; -} - -if(empty($status->data[1])) { - $status->data[1] = NULL; -} - -// Check if passwords are equal -if($status->data[2] != $status->data[3]) { - $status->title = _("Error"); - $status->message = _("Supplied passwords don't match"); - $status->body = 'message'; - return; -} - - -switch ($status->data[4]) { - case "admin" : - $user_admin = 'TRUE'; - break; - case "normal" : - $user_admin = 'FALSE'; - break; - default : - $status->body = 'users/add'; - break; -} - -// Finally create the user -if(create_user($status->data[0],md5($status->data[2]),$status->data[1],$user_admin)){ - $status->title = _("Operation successful."); - $status->message = _("Successfully created user ") . $status->data[0]; -} else{ - $status->title = _("Error"); - $status->message = _("Error while creating user ") . $status->data[0]; -} - -$status->body = 'message'; - -unset($status->op); - -?> Copied: tags/panda-admin-1.0rc2/modules/users/add.php (from rev 42, trunk/modules/users/add.php) =================================================================== --- tags/panda-admin-1.0rc2/modules/users/add.php (rev 0) +++ tags/panda-admin-1.0rc2/modules/users/add.php 2008-03-06 11:38:15 UTC (rev 44) @@ -0,0 +1,92 @@ +<?php +/* + Copyright (C) 2007 - Marco Nenciarini <mn...@gr...> + + 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +add_navigation_link(_("new user"), make_link('mode', 'op')); + +// If no user or action has been specified, show main add page +if (!$status->data[4]|| !$status->data[0]) { + $status->body = 'users/add'; + return; +} + +// Check for a valid unix name +if(!is_user($status->data[0])) { + $status->title = _("Error"); + $status->message = _("The supplied user is not valid"); + $status->body = 'message'; + return; +} + +if(empty($status->data[3]) || empty($status->data[2])) { + $status->title = _("Error"); + $status->message = _("The supplied password is not valid"); + $status->body = 'message'; + return; +} + + +// Check if user already exists +if (isset ($users[$status->data[0]])) { + $status->title = _("Error"); + $status->message = _("User already existing"); + unset ($status->data[0]); + $status->body = 'message'; + return; +} + +if(empty($status->data[1])) { + $status->data[1] = NULL; +} + +// Check if passwords are equal +if($status->data[2] != $status->data[3]) { + $status->title = _("Error"); + $status->message = _("Supplied passwords don't match"); + $status->body = 'message'; + return; +} + + +switch ($status->data[4]) { + case "admin" : + $user_admin = 'TRUE'; + break; + case "normal" : + $user_admin = 'FALSE'; + break; + default : + $status->body = 'users/add'; + break; +} + +// Finally create the user +if(create_user($status->data[0],md5($status->data[2]),$status->data[1],$user_admin)){ + $status->title = _("Operation successful."); + $status->message = _("Successfully created user ") . $status->data[0]; +} else{ + $status->title = _("Error"); + $status->message = _("Error while creating user ") . $status->data[0]; +} + +$status->body = 'message'; + +unset($status->op); + +?> Deleted: tags/panda-admin-1.0rc2/modules/users.php =================================================================== --- trunk/modules/users.php 2008-02-28 11:31:35 UTC (rev 41) +++ tags/panda-admin-1.0rc2/modules/users.php 2008-03-06 11:38:15 UTC (rev 44) @@ -1,42 +0,0 @@ -<? -/* - Copyright (C) 2007 - Marco Nenciarini <mn...@gr...> - - 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - -$users = load_users(); - -add_navigation_link('user management', - make_link(array ('mode')) . "&op=listusers"); - -switch ($status->op) { - case 'add' : - case 'modify' : - case 'delete' : - case 'listusers' : - case 'assign' : - case 'aliassign' : - require ("modules/".$status->mode."/".$status->op.".php"); - break; - default : - $status->op = 'listusers'; -} - -if ($status->op == 'listusers') { - require ("modules/".$status->mode."/".$status->op.".php"); -} - -?> Copied: tags/panda-admin-1.0rc2/modules/users.php (from rev 42, trunk/modules/users.php) =================================================================== --- tags/panda-admin-1.0rc2/modules/users.php (rev 0) +++ tags/panda-admin-1.0rc2/modules/users.php 2008-03-06 11:38:15 UTC (rev 44) @@ -0,0 +1,42 @@ +<? +/* + Copyright (C) 2007 - Marco Nenciarini <mn...@gr...> + + 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +$users = load_users(); + +add_navigation_link(_('user management'), + make_link(array ('mode')) . "&op=listusers"); + +switch ($status->op) { + case 'add' : + case 'modify' : + case 'delete' : + case 'listusers' : + case 'assign' : + case 'aliassign' : + require ("modules/".$status->mode."/".$status->op.".php"); + break; + default : + $status->op = 'listusers'; +} + +if ($status->op == 'listusers') { + require ("modules/".$status->mode."/".$status->op.".php"); +} + +?> Deleted: tags/panda-admin-1.0rc2/tpl/email/listmails.php =================================================================== --- trunk/tpl/email/listmails.php 2008-02-28 11:31:35 UTC (rev 41) +++ tags/panda-admin-1.0rc2/tpl/email/listmails.php 2008-03-06 11:38:15 UTC (rev 44) @@ -1,83 +0,0 @@ -<? -/* - Copyright (C) 2007 - Marco Nenciarini <mn...@gr...> - - 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ -?> - <h4><?= _("Domain management for ") ?> <?= $status->domain ?></h4> - <p> - <?= _("Mailbox list from ") ?> <?= $ids[$begin]."@$status->domain" ?> <?= _(" to ") ?><?= $ids[$end - 1]."@$status->domain" ?>.<br /> - <?= _("Press 'M' to modify, 'X' to delete.") ?> - </p> - <p> -<? - - -for ($i = $begin; $i < $end; $i++) { -$tmp = $ids[$i]; - -?> -<? if(!empty($emails[$tmp]['id'])) { ?> - [<a href='<?= make_link(array('mode','domain'))."&op=modifynwl&user=$ids[$i]" ?>'>M</a>] - [<a href='<?= make_link(array('mode','domain'))."&op=deletenwl&user=$ids[$i]" ?>'>X</a>] -<? } else { ?> - [<a href='<?= make_link(array('mode','domain'))."&op=modify&user=$ids[$i]" ?>'>M</a>] - [<a href='<?= make_link(array('mode','domain'))."&op=delete&user=$ids[$i]" ?>'>X</a>] -<? } ?> -<? -if (!empty($emails[$tmp]['maildir'])) { -?> - <b><?= $ids[$i] ?></b> -<? } elseif (!empty($emails[$tmp]['id'])) { ?> - <i><u><?= $ids[$i] ?></u></i> -<? } else { ?> - <?= $ids[$i] . '*' ?> -<? } ?> - <br /> -<? } ?> - </p> - <p> - [<a href='<?= make_link(array('mode','domain'))."&op=add" ?>'>aggiungi</a>] - </p> -<? - - - if (numPages(count($ids)) > 1) { -?> - <p> - <?= _("Other mailboxes in the domain ") ?><?= $status->domain ?>: - </p> - <ul> -<? - - - for ($i = 0; $i < numPages(count($ids)); $i++) { - if ($i == $status->page) { -?> - <li><?=$ids[beginPage($i)] . " -> " . $ids[endPage($i, count($ids)) - 1] ?></li> -<? - } - else { -?> - <li><a href='<?= make_link(array('mode','op','domain'))."&page=$i" ?>'><?= - $ids[beginPage($i)] . " -> " . $ids[endPage($i, count($ids)) - 1] ?></a></li> -<? - } - } - } -?> - </ul> Copied: tags/panda-admin-1.0rc2/tpl/email/listmails.php (from rev 42, trunk/tpl/email/listmails.php) =================================================================== --- tags/panda-admin-1.0rc2/tpl/email/listmails.php (rev 0) +++ tags/panda-admin-1.0rc2/tpl/email/listmails.php 2008-03-06 11:38:15 UTC (rev 44) @@ -0,0 +1,84 @@ +<? +/* + Copyright (C) 2007 - Marco Nenciarini <mn...@gr...> + + 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +*/ +?> + <h4><?= _("Domain management for ") ?> <?= $status->domain ?></h4> + <p> + <?= _("Mailbox list from ") ?> <?= $ids[$begin]."@$status->domain" ?> <?= _(" to ") ?><?= $ids[$end - 1]."@$status->domain" ?>.<br /> + <?= _("<b>Bold</b> mailboxes are stored locally, starred* mailboxes contain aliases, <i>italic</i> are newsletters.") ?> <br /> + <?= _("Press 'M' to modify, 'X' to delete.") ?> + </p> + <p> +<? + + +for ($i = $begin; $i < $end; $i++) { +$tmp = $ids[$i]; + +?> +<? if(!empty($emails[$tmp]['id'])) { ?> + [<a href='<?= make_link(array('mode','domain'))."&op=modifynwl&user=$ids[$i]" ?>'>M</a>] + [<a href='<?= make_link(array('mode','domain'))."&op=deletenwl&user=$ids[$i]" ?>'>X</a>] +<? } else { ?> + [<a href='<?= make_link(array('mode','domain'))."&op=modify&user=$ids[$i]" ?>'>M</a>] + [<a href='<?= make_link(array('mode','domain'))."&op=delete&user=$ids[$i]" ?>'>X</a>] +<? } ?> +<? +if (!empty($emails[$tmp]['maildir'])) { +?> + <b><?= $ids[$i] ?></b> +<? } elseif (!empty($emails[$tmp]['id'])) { ?> + <i><u><?= $ids[$i] ?></u></i> +<? } else { ?> + <?= $ids[$i] . '*' ?> +<? } ?> + <br /> +<? } ?> + </p> + <p> + [<a href='<?= make_link(array('mode','domain'))."&op=add" ?>'>aggiungi</a>] + </p> +<? + + + if (numPages(count($ids)) > 1) { +?> + <p> + <?= _("Other mailboxes in the domain ") ?><?= $status->domain ?>: + </p> + <ul> +<? + + + for ($i = 0; $i < numPages(count($ids)); $i++) { + if ($i == $status->page) { +?> + <li><?=$ids[beginPage($i)] . " -> " . $ids[endPage($i, count($ids)) - 1] ?></li> +<? + } + else { +?> + <li><a href='<?= make_link(array('mode','op','domain'))."&page=$i" ?>'><?= + $ids[beginPage($i)] . " -> " . $ids[endPage($i, count($ids)) - 1] ?></a></li> +<? + } + } + } +?> + </ul> Deleted: tags/panda-admin-1.0rc2/tpl/header.php =================================================================== --- trunk/tpl/header.php 2008-02-28 11:31:35 UTC (rev 41) +++ tags/panda-admin-1.0rc2/tpl/header.php 2008-03-06 11:38:15 UTC (rev 44) @@ -1,81 +0,0 @@ -<? -/* - Copyright (C) 2007 - Marco Nenciarini <mn...@gr...> - - 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ -?> -<?= '<?xml version="1.0"?>' ?> - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" - xml:lang="it" - lang="it"> -<SCRIPT TYPE="text/javascript"> -<!-- -function popup(mylink, windowname) -{ -if (! window.focus)return true; -var href; -if (typeof(mylink) == 'string') - href=mylink; -else - href=mylink.href; -window.open(href, windowname, 'toolbar=0,menubar=0,directories=0,location=0,scrollbars=yes,status=0,resizable=1'); -return false; -} -//--> -</SCRIPT> - <head> - <title>PaNDA - <?= key($status->path[0]) ?></title> - <link title="Default Stilesheet" media="all" rel="stylesheet" href="default.css" type="text/css" /> - </head> - <body> - <div class="header">PaNDA Administration</div> - <div class="middle"> - <div class="menu"> - <h3><?= _("Menu") ?></h3> - <div class="insidemenu"> - <a href='<?= make_link(array()).'?mode=email' ?>'>e-mail</a> - <a href='<?= make_link(array()).'?mode=domain' ?>'><?= _("domains") ?></a> - <a href='<?= make_link(array()).'?mode=domainalias' ?>'><?= _("alias domains") ?></a> - <a href='<?= "http://" . $_SERVER['SERVER_NAME'] . dirname($_SERVER['PHP_SELF']) . "/nwadmin" ?>' onClick="return popup('/nwadmin','newsletter')">newsletter</a> -<? if(is_administrator()) { ?> - <br /> - <a href='<?= make_link(array()).'?mode=users' ?>'><?= _("users") ?></a> -<? } ?> - <br /> - <a href='<?= make_link(array()).'?mode=chmypw' ?>'>password</a> - <a href='<?= make_link(array()).'?mode=logout' ?>'>logout</a> - </div> - </div> - <div class="content"> - <div class="insidecontent"> - <div class="location"><? - -$deepth = count($status->path) - 1; -for ($i = 0; $i <= $deepth; $i++) { - $item = $status->path[$i]; - if ($i != 0) - print (" -> "); - if ($i != $deepth) - print ("<a href='" . current($item) . "'>"); - print (key($item)); - if ($i != $deepth) - print ("</a>"); -} -?></div> Copied: tags/panda-admin-1.0rc2/tpl/header.php (from rev 42, trunk/tpl/header.php) =================================================================== --- tags/panda-admin-1.0rc2/tpl/header.php (rev 0) +++ tags/panda-admin-1.0rc2/tpl/header.php 2008-03-06 11:38:15 UTC (rev 44) @@ -0,0 +1,66 @@ +<? +/* + Copyright (C) 2007 - Marco Nenciarini <mn...@gr...> + + 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +*/ +?> +<?= '<?xml version="1.0"?>' ?> + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" + xml:lang="it" + lang="it"> + <head> + <title>PaNDA - <?= key($status->path[0]) ?></title> + <link title="Default Stilesheet" media="all" rel="stylesheet" href="default.css" type="text/css" /> + </head> + <body> + <div class="header">PaNDA Administration</div> + <div class="middle"> + <div class="menu"> + <h3><?= _("Menu") ?></h3> + <div class="insidemenu"> + <a href='<?= make_link(array()).'?mode=email' ?>'>e-mail</a> + <a href='<?= make_link(array()).'?mode=domain' ?>'><?= _("domains") ?></a> + <a href='<?= make_link(array()).'?mode=domainalias' ?>'><?= _("alias domains") ?></a> + <a href='<?= "http://" . $_SERVER['SERVER_NAME'] . dirname($_SERVER['PHP_SELF']) . "/nwadmin" ?>' target="_blank">newsletter</a> +<? if(is_administrator()) { ?> + <br /> + <a href='<?= make_link(array()).'?mode=users' ?>'><?= _("users") ?></a> +<? } ?> + <br /> + <a href='<?= make_link(array()).'?mode=chmypw' ?>'>password</a> + <a href='<?= make_link(array()).'?mode=logout' ?>'>logout</a> + </div> + </div> + <div class="content"> + <div class="insidecontent"> + <div class="location"><? + +$deepth = count($status->path) - 1; +for ($i = 0; $i <= $deepth; $i++) { + $item = $status->path[$i]; + if ($i != 0) + print (" -> "); + if ($i != $deepth) + print ("<a href='" . current($item) . "'>"); + print (key($item)); + if ($i != $deepth) + print ("</a>"); +} +?></div> Deleted: tags/panda-admin-1.0rc2/tpl/users/modify.php =================================================================== --- trunk/tpl/users/modify.php 2008-02-28 11:31:35 UTC (rev 41) +++ tags/panda-admin-1.0rc2/tpl/users/modify.php 2008-03-06 11:38:15 UTC (rev 44) @@ -1,48 +0,0 @@ -<? -/* - Copyright (C) 2007 - Marco Nenciarini <mn...@gr...> - - 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ -?> - <h4><?= _("Modify user") ?></h4> - <form name="newuser" method="get" action="#"> - <p> - <?= make_hidden_fields(array('mode','op')) ?> - <?= _("User name: ") ?>:<br /> - <input type="text" name="user" value="<?= $status->user ?>" /> <br /> - <?= _("E-mail address: ") ?>:<br /> - <input type="text" name="data[1]" value="<?= $users[$status->user][email] ?>" /><br /><br /> - <?= _("New password: ") ?><br /> - <input type="password" name="data[2]" value="<?= $status->data[2] ?>" /> <br /> - <?= _("Repeat new password: ") ?><br /> - <input type="password" name="data[3]" value="<?= $status->data[3] ?>" /> - </p> - <p> - <?= _("Select user's access level: ") ?><br /><br /> -<? if($users[$status->user][is_administrator] == 't') { ?> - <input type="radio" name="data[4]" value="normal"/><?= _("normal") ?> - <input type="radio" name="data[4]" value="admin" CHECKED/><?= _("administrator") ?><br /> -<? } else { ?> - <input type="radio" name="data[4]" value="normal" CHECKED/><?= _("normal") ?> - <input type="radio" name="data[4]" value="admin"/><?= _("administrator") ?><br /> -<? } ?> - </p> - <p> - [<a href='<?= make_link(array('mode'))."&op=listusers" ?>'><?= _("cancel") ?></a>] - [<a href="#" onclick="newuser.submit()"><?= _("submit") ?> >></a>] - </p> - </form> Copied: tags/panda-admin-1.0rc2/tpl/users/modify.php (from rev 42, trunk/tpl/users/modify.php) =================================================================== --- tags/panda-admin-1.0rc2/tpl/users/modify.php (rev 0) +++ tags/panda-admin-1.0rc2/tpl/users/modify.php 2008-03-06 11:38:15 UTC (rev 44) @@ -0,0 +1,48 @@ +<? +/* + Copyright (C) 2007 - Marco Nenciarini <mn...@gr...> + + 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +*/ +?> + <h4><?= _("Modify user") ?></h4> + <form name="newuser" method="get" action="#"> + <p> + <?= make_hidden_fields(array('mode','op')) ?> + <?= _("User name: ") ?><br /> + <input type="text" name="user" value="<?= $status->user ?>" /> <br /> + <?= _("E-mail address: ") ?><br /> + <input type="text" name="data[1]" value="<?= $users[$status->user][email] ?>" /><br /><br /> + <?= _("New password: ") ?><br /> + <input type="password" name="data[2]" value="<?= $status->data[2] ?>" /> <br /> + <?= _("Repeat new password: ") ?><br /> + <input type="password" name="data[3]" value="<?= $status->data[3] ?>" /> + </p> + <p> + <?= _("Select user's access level: ") ?><br /><br /> +<? if($users[$status->user][is_administrator] == 't') { ?> + <input type="radio" name="data[4]" value="normal"/><?= _("normal") ?> + <input type="radio" name="data[4]" value="admin" CHECKED/><?= _("administrator") ?><br /> +<? } else { ?> + <input type="radio" name="data[4]" value="normal" CHECKED/><?= _("normal") ?> + <input type="radio" name="data[4]" value="admin"/><?= _("administrator") ?><br /> +<? } ?> + </p> + <p> + [<a href='<?= make_link(array('mode'))."&op=listusers" ?>'><?= _("cancel") ?></a>] + [<a href="#" onclick="newuser.submit()"><?= _("submit") ?> >></a>] + </p> + </form> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |