34 lines
811 B
PHP
34 lines
811 B
PHP
<?php
|
|
/*
|
|
* A advanced subscribe/unsubscibe form for mlmmj mailing list software
|
|
* 2020 by leinelab members https://leinelab.org
|
|
*/
|
|
|
|
define('SMARTY_DIR', './libs/');
|
|
require_once(SMARTY_DIR . 'Smarty.class.php');
|
|
|
|
$smarty = new Smarty();
|
|
$smarty->setTemplateDir('./templates/');
|
|
$smarty->setCompileDir('./templates_c/');
|
|
$smarty->setConfigDir('./configs/');
|
|
$smarty->setCacheDir('./cache/');
|
|
$smarty->debugging = true;
|
|
|
|
// get informations from Server, Path and GET-Parameter
|
|
// eg. https://lists.leinelab.org/subscribe/listname?email=yourname@example.com
|
|
|
|
$smarty->assign('server', $_SERVER['SERVER_NAME']);
|
|
|
|
if ($_GET['email']) {
|
|
$smarty->assign('email', $_GET['email']);
|
|
}
|
|
|
|
if ($_GET['listname']) {
|
|
$smarty->assign('listname', $_GET['listname']);
|
|
}
|
|
|
|
|
|
$smarty->display('tpl-form.tpl');
|
|
|
|
?>
|