diff --git a/add_list.php b/add_list.php
deleted file mode 100644
index 07a02be..0000000
--- a/add_list.php
+++ /dev/null
@@ -1,46 +0,0 @@
- 30 )
- {
- // List name must not be longer than 30 characters
- $_SESSION["error_code"] = 6;
- header("Location: error.php");
- exit();
- }
-
- $domain = $_SESSION["domain"];
- shell_exec("cp -r misc/template_$language $lists_path/$domain/$list_name");
- file_put_contents("$lists_path/$domain/$list_name/control/listaddress", "$list_name@$domain");
- file_put_contents("$lists_path/$domain/$list_name/control/customheaders", "From: $list_name@$domain\nReply-To: $list_name@$domain\n");
- file_put_contents("$lists_path/$domain/$list_name/control/prefix", "[$list_name]");
- shell_exec("sed -i -e 's/_unsub_addr_/$list_name\+unsubscribe@$domain/g' $lists_path/$domain/$list_name/control/footer-*");
-}
-
-header("Location: index.php");
-exit();
-?>
diff --git a/del_list.php b/del_list.php
deleted file mode 100644
index 11021d9..0000000
--- a/del_list.php
+++ /dev/null
@@ -1,44 +0,0 @@
- 30 )
-{
- header("Location: error.php");
- exit();
-}
-
-// Test list existence
-if( !is_dir("$lists_path/$domain/$list_name") )
-{
- header("Location: error.php");
- exit();
-}
-
-if (!isset($_SESSION["auth"]) || $_SESSION["auth"] != 1)
-{
- // If not authenticated, then redirect to login page
- header("Location: login.php");
- exit();
-}
-
-if(!empty($list_name))
-{
- shell_exec("rm -rf $lists_path/$domain/$list_name");
- header("Location: index.php");
- exit();
-}
-?>
diff --git a/edit_list.php b/edit_list.php
index 2310ccb..18ab614 100644
--- a/edit_list.php
+++ b/edit_list.php
@@ -1,5 +1,7 @@
assign("headline", $headline);
$smarty->assign("subscribers", $subscribers);
$smarty->assign("list_name", $list_name);
$smarty->assign("domain", $domain);
-$smarty->assign("list_type_selected", $list_type_selected);
-$smarty->assign("footer", $footer);
$smarty->assign("moderators", $moderators);
$smarty->assign("prefix", $prefix);
-$smarty->assign("notmetoo_checked", $notmetoo_checked);
+$smarty->assign("username", $_SESSION["username"]);
$smarty->display("edit_list.tpl");
+
?>
diff --git a/error.php b/error.php
index d9b031d..93d4a66 100644
--- a/error.php
+++ b/error.php
@@ -1,7 +1,10 @@
assign("error_code", $error_code);
$smarty->display("error.tpl");
+
?>
diff --git a/index.php b/index.php
index 2cfab9e..c2ad8b4 100644
--- a/index.php
+++ b/index.php
@@ -1,4 +1,5 @@
assign("lists", $lists);
+$smarty->assign("headline", $headline);
+$smarty->assign("lists", $lists_new);
$smarty->assign("domain", $domain);
+$smarty->assign("username", $_SESSION["username"]);
$smarty->display("index.tpl");
+
?>
diff --git a/init.php b/init.php
index c9613ef..4022145 100644
--- a/init.php
+++ b/init.php
@@ -1,14 +1,103 @@
setCacheDir("misc/smarty/cache");
$smarty->setConfigDir("misc/smarty/configs");
session_start();
+
?>
diff --git a/login.php b/login.php
index fef121a..7fa2aae 100644
--- a/login.php
+++ b/login.php
@@ -1,79 +1,78 @@
display("login.tpl");
+ // If no submission, display login form
+ $smarty->assign("headline", $headline);
+ $smarty->display("login.tpl");
}
+
?>
diff --git a/logout.php b/logout.php
index 0f0f5ac..67a9c9a 100644
--- a/logout.php
+++ b/logout.php
@@ -1,8 +1,29 @@
diff --git a/misc/smarty/templates_c/0dee7916f2ab5d00e5d3cc848d789a3c9c535c34_0.file.index.tpl.php b/misc/smarty/templates_c/0dee7916f2ab5d00e5d3cc848d789a3c9c535c34_0.file.index.tpl.php
deleted file mode 100644
index b199078..0000000
--- a/misc/smarty/templates_c/0dee7916f2ab5d00e5d3cc848d789a3c9c535c34_0.file.index.tpl.php
+++ /dev/null
@@ -1,122 +0,0 @@
-_decodeProperties($_smarty_tpl, array (
- 'version' => '3.1.31',
- 'unifunc' => 'content_60fac2d08b3df8_25701302',
- 'has_nocache_code' => false,
- 'file_dependency' =>
- array (
- '0dee7916f2ab5d00e5d3cc848d789a3c9c535c34' =>
- array (
- 0 => '/home/pacs/ecg00/users/mlmmj/doms/list.ecogood.org/htdocs-ssl/mlmmj-light-web-ecg/misc/smarty/templates_en/index.tpl',
- 1 => 1627046606,
- 2 => 'file',
- ),
- ),
- 'includes' =>
- array (
- ),
-),false)) {
-function content_60fac2d08b3df8_25701302 (Smarty_Internal_Template $_smarty_tpl) {
-?>
-
-
-
-
->
- function validate_form()
- {
- var name = document.getElementById('add_list_input').value;
- var name = name.toLowerCase();
-
- if (name == "")
- {
- return false;
- }
-
- if (name.length > 30)
- {
- alert("Mailing list name must not be longer than 30 characters.");
- return false;
- }
-
- if ( name.match(/[^a-z0-9_]/) )
- {
- alert("Mailing list name must contain only english letters, digits and undercores.");
- return false;
- }
- }
-
- function confirm_delete()
- {
- return confirm("Are you really want to delete the mailing list?");
- }
-
->
-
-
-
- tpl_vars['domain']->value;?>
-
-
-
-
- smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['lists']->value, 'list');
-if ($_from !== null) {
-foreach ($_from as $_smarty_tpl->tpl_vars['list']->value) {
-?>
-
-
- •
-
-
- tpl_vars['list']->value;?>
-
-
-
-
- smarty->ext->_foreach->restore($_smarty_tpl, 1);
-?>
-
-
-
-
-
-
-_decodeProperties($_smarty_tpl, array (
- 'version' => '3.1.31',
- 'unifunc' => 'content_60fac21cabbde3_88848843',
- 'has_nocache_code' => false,
- 'file_dependency' =>
- array (
- '87eadf281c71f110fa4c4ea961640eb703d16d4a' =>
- array (
- 0 => '/home/pacs/ecg00/users/mlmmj/doms/list.ecogood.org/htdocs-ssl/mlmmj-light-web-ecg/misc/smarty/templates_en/error.tpl',
- 1 => 1485891660,
- 2 => 'file',
- ),
- ),
- 'includes' =>
- array (
- ),
-),false)) {
-function content_60fac21cabbde3_88848843 (Smarty_Internal_Template $_smarty_tpl) {
-?>
-
-
-
-
-
-
-
- tpl_vars['error_code']->value == 1) {?>
- Domain can contain only english letters, dots, hyphens and digits.
- tpl_vars['error_code']->value == 2) {?>
- Password can contain only english letters and digits.
- tpl_vars['error_code']->value == 3) {?>
- Incorrect password.
- tpl_vars['error_code']->value == 4) {?>
- There is no such domain.
- tpl_vars['error_code']->value == 5) {?>
- Mailing list name can contain only english letters, digits and undercores.
- tpl_vars['error_code']->value == 6) {?>
- The length of a list name can not exceed 30 characters.
- tpl_vars['error_code']->value == 7) {?>
- The length of a prefix can not exceed 128 characters.
- tpl_vars['error_code']->value == 8) {?>
- The length of a footer can not exceed 1024 characters.
- tpl_vars['error_code']->value == 9) {?>
- There is an incorrect email in the subscribers list.
- tpl_vars['error_code']->value == 10) {?>
- There is an incorrect email in the moderators list.
-
- Unknown error.
-
-
-
-
-_decodeProperties($_smarty_tpl, array (
- 'version' => '3.1.31',
- 'unifunc' => 'content_60fac0fc392119_19400816',
- 'has_nocache_code' => false,
- 'file_dependency' =>
- array (
- 'bebbc40e386876d1f34a8c037161406e34f7e878' =>
- array (
- 0 => '/home/pacs/ecg00/users/mlmmj/doms/list.ecogood.org/htdocs-ssl/mlmmj-light-web-ecg/misc/smarty/templates_en/login.tpl',
- 1 => 1485892620,
- 2 => 'file',
- ),
- ),
- 'includes' =>
- array (
- ),
-),false)) {
-function content_60fac0fc392119_19400816 (Smarty_Internal_Template $_smarty_tpl) {
-?>
-
-
-
-
->
- function validate_form()
- {
- var domain = document.getElementById('domain_input').value;
- var password = document.getElementById('password_input').value;
-
- if (domain == "")
- {
- alert("Enter domain.");
- return false;
- }
-
- if (password == "")
- {
- alert("Enter password.");
- return false;
- }
- if ( domain.match(/[^A-Za-z0-9\-\.]/) )
- {
- alert("Domain can contain only english letters, dots, hyphens and digits.");
- return false;
- }
- if ( password.match(/[^A-Za-z0-9]/) )
- {
- alert("Password can contain only english letters and digits.");
- return false;
- }
- }
-
->
-
-
-
-
-
-
-_decodeProperties($_smarty_tpl, array (
- 'version' => '3.1.31',
- 'unifunc' => 'content_60fac3b35e71a9_13035792',
- 'has_nocache_code' => false,
- 'file_dependency' =>
- array (
- 'd26886be440fe5530a216e22cdbebb3e8d3eb432' =>
- array (
- 0 => '/home/pacs/ecg00/users/mlmmj/doms/list.ecogood.org/htdocs-ssl/mlmmj-light-web-ecg/misc/smarty/templates_en/edit_list.tpl',
- 1 => 1627046833,
- 2 => 'file',
- ),
- ),
- 'includes' =>
- array (
- ),
-),false)) {
-function content_60fac3b35e71a9_13035792 (Smarty_Internal_Template $_smarty_tpl) {
-?>
-
-
-
-
->
- // Do not use Smarty here
- function switch_moderators_form()
- {
- // Get a selected value
- var select = document.getElementById("list_type");
- var selected_value = select.options[select.selectedIndex].value;
-
- // If selected conference list type, then disable moderators form
- if (selected_value == "2")
- {
- document.getElementById("moderators").disabled = true;
- document.getElementById("moderators_header").style.color = "#777777";
- }
- else
- {
- document.getElementById("moderators").disabled = false;
- document.getElementById("moderators_header").style.color = "#222222";
- }
- }
-
- function validate_form()
- {
- var prefix = document.getElementById('prefix').value;
- var footer = document.getElementById('footer').value;
- var subscribers = document.getElementById('subscribers').value;
- var moderators = document.getElementById('moderators').value;
-
- // Regex for a valid e-mail
- var re_email = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
-
- // Transform subscribers and moderators into array
- subscribers = subscribers.split("\n");
- moderators = moderators.split("\n");
-
- if (prefix.length > 128)
- {
- alert("A prefix length can not be longer than 128 characters.");
- return false;
- }
-
- if (footer.length > 1024)
- {
- alert("A footer length can not be longer than 1024 characters.");
- return false;
- }
-
- for(var i in subscribers)
- {
- if ( subscribers[i] != "" && !re_email.test(subscribers[i]) )
- {
- alert('Subscriber "' + subscribers[i] + '" (line #' + (parseFloat(i)+1) + ') have incorrect email.');
- return false;
- }
- }
-
- for(var i in moderators)
- {
- if ( moderators[i] != "" && !re_email.test(moderators[i]) )
- {
- alert('Moderator "' + moderators[i] + '" (line #' + (parseFloat(i)+1) + ') have incorrect email.');
- return false;
- }
- }
- }
- //
-
->
-
-
-
-
-
-
-
-
{$domain}
+
+
+ ★
+
+
+ Lists you own (editable)
+
+
+
{foreach $lists as $list}
-
-
- •
-
-
- {$list}
-
-
-
+ {if $list == 1}
+
+
+ ✓
+
+
+ {$list@key}
+
+
+ {/if}
+ {/foreach}
+
+
+
+
+
+
+
+
+
+
+
+ ★
+
+
+ All other lists (not editable)
+
+
+
+ {foreach $lists as $list}
+ {if $list == 0}
+
+
+ ✗
+
+
+ {$list@key}
+
+
+ {/if}
{/foreach}
-