diff --git a/.gitignore b/.gitignore index f9acfcb..64d1398 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,4 @@ virtual.db checkupdate conf.php test* -var/database.sdb +var/database* diff --git a/conf-dist.php b/conf-dist.php index d38c63f..96a064e 100644 --- a/conf-dist.php +++ b/conf-dist.php @@ -14,7 +14,6 @@ define('INC', '../lib'); // include function include_once(INC.'/ep_function.php'); -include_once(INC.'/ep_admin.php'); define('DEBUG', false); @@ -30,6 +29,8 @@ define('DOMAIN', 'exemple.fr'); // Exemple pour Sqlite : // define('DB', 'sqlite:./data/emailPoubelle.sqlite'); define('DB', 'sqlite:'.DATA.'/database.sdb'); +// table prefix +define('DBTABLEPREFIX', 'ep_'); // Use cron (true/false) for life expire email (recomanded) // If use true add in crontab : @@ -65,12 +66,14 @@ if (CHECKMX) { // A indiquer si vous utiliser les URL's rewriting // Exemple avec un htaccess -// RewriteRule ^EmailPoubell-([0-9]+)\.html$ folder/emailPoubelle.php?&Validemail=$1 [L] -//define('URLREWRITE_DEBUT', 'http://www.zici.fr/EmailPoubell-'); -//define('URLREWRITE_FIN', '.html'); +// RewriteRule ^ep-([a-z]+)-([a-zA-Z0-9+/=]+)\.html$ switch.php?page=emailPoubelle&act=$1&value=$2 [L] +//define('URLREWRITE_START', 'http://poubelle.zici.fr/ep-'); +//define('URLREWRITE_MIDDLE', '-'); +//define('URLREWRITE_END', '.html'); // Désactiver -define('URLREWRITE_DEBUT', false); -define('URLREWRITE_FIN', false); +define('URLREWRITE_START', false); +define('URLREWRITE_MIDDLE', false); +define('URLREWRITE_END', false); // check update : // enable : in seconds diff --git a/lib/ep_function.php b/lib/ep_function.php index 23fc570..76cadee 100644 --- a/lib/ep_function.php +++ b/lib/ep_function.php @@ -265,8 +265,8 @@ function SendEmail($recipient, $sujet, $message) { function urlGen($act,$id,$alias_full) { $idUrl=base64_encode($id.';'.$alias_full); - if (URLREWRITE_DEBUT && URLREWRITE_FIN) { - return URLREWRITE_DEBUT.$idUrl.URLREWRITE_FIN; + if (URLREWRITE_START && URLREWRITE_MIDDLE && URLREWRITE_END) { + return URLREWRITE_START.$act.URLREWRITE_MIDDLE.$idUrl.URLREWRITE_END; } else { return URLPAGE."?act=".$act."&value=".$idUrl; }