* You should have received a copy of the GNU General Public License * along with program; see the file docs/LICENSE. If not, write to the * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */ /********************************** INITIALIZATION METHODS *********************************/ require 'bootstrap.php'; $pommo->init(array('authLevel' => 0)); $logger =& $pommo->_logger; $dbo =& $pommo->_dbo; /********************************** SETUP TEMPLATE, PAGE *********************************/ Pommo::requireOnce($pommo->_baseDir . 'inc/classes/template.php'); $smarty = new PommoTemplate(); // log the user out if requested if (isset($_GET['logout'])) { $pommo->_auth->logout(); header('Location: ' . $pommo->_http . $pommo->_baseUrl . 'index.php'); } // check if user is already logged in if ($pommo->_auth->isAuthenticated()) { // If user is authenticated (has logged in), redirect to admin.php Pommo::redirect($pommo->_http . $pommo->_baseUrl . 'admin/admin.php'); } elseif (isset($_POST['submit']) && !empty($_POST['username']) && !empty($_POST['password'])) { $auth = PommoAPI::configGet(array('admin_username', 'admin_password')); if ($_POST['username'] == $auth['admin_username'] && md5($_POST['password']) == $auth['admin_password']) { // don't perform maintenance if accessing support area if (!isset($_GET['referer']) || !basename($_GET['referer']) == 'support.php') { // LOGIN SUCCESS -- PERFORM MAINTENANCE, SET AUTH, REDIRECT TO REFERER
* You should have received a copy of the GNU General Public License * along with program; see the file docs/LICENSE. If not, write to the * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */ /********************************** INITIALIZATION METHODS *********************************/ require '../../../bootstrap.php'; $pommo->init(); $logger =& $pommo->_logger; $dbo =& $pommo->_dbo; /********************************** SETUP TEMPLATE, PAGE *********************************/ Pommo::requireOnce($pommo->_baseDir . 'inc/classes/template.php'); $smarty = new PommoTemplate(); // Read user requested changes if (!empty($_POST['throttle_restore'])) { $input = array('throttle_MPS' => 3, 'throttle_BPS' => 0, 'throttle_DP' => 10, 'throttle_DBPP' => 0, 'throttle_DMPP' => 0); PommoAPI::configUpdate($input, TRUE); $smarty->assign('output', Pommo::_T('Configuration Updated.')); } elseif (!empty($_POST['throttle-submit'])) { $input = array(); $input['throttle_MPS'] = is_numeric($_POST['mps']) && $_POST['mps'] >= 0 && $_POST['mps'] <= 5 ? $_POST['mps'] : 3; $input['throttle_BPS'] = is_numeric($_POST['bps']) && $_POST['bps'] >= 0 && $_POST['bps'] <= 400 ? $_POST['bps'] * 1024 : 0; $input['throttle_DP'] = is_numeric($_POST['dp']) && $_POST['dp'] >= 5 && $_POST['dp'] <= 20 ? $_POST['dp'] : 10; $input['throttle_DMPP'] = is_numeric($_POST['dmpp']) && $_POST['dmpp'] >= 0 && $_POST['dmpp'] <= 5 ? $_POST['dmpp'] : 0; $input['throttle_DBPP'] = is_numeric($_POST['dbpp']) && $_POST['dbpp'] >= 0 && $_POST['dbpp'] <= 200 ? $_POST['dbpp'] * 1024 : 0; if (!empty($input)) { PommoAPI::configUpdate($input, TRUE); $smarty->assign('output', Pommo::_T('Configuration Updated.'));
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */ /********************************** INITIALIZATION METHODS *********************************/ require '../../../bootstrap.php'; $pommo->init(); $logger =& $pommo->_logger; $dbo =& $pommo->_dbo; Pommo::requireOnce($pommo->_baseDir . 'inc/lib/phpmailer/class.phpmailer.php'); Pommo::requireOnce($pommo->_baseDir . 'inc/lib/phpmailer/class.smtp.php'); /********************************** SETUP TEMPLATE, PAGE *********************************/ Pommo::requireOnce($pommo->_baseDir . 'inc/classes/template.php'); $smarty = new PommoTemplate(); $smarty->prepareForForm(); $smarty->assign('returnStr', Pommo::_T('Configure')); // Read user requested changes if (!empty($_POST['addSmtpServer'])) { $server = array('host' => 'mail.localhost', 'port' => '25', 'auth' => 'off', 'user' => '', 'pass' => ''); $input['smtp_' . key($_POST['addSmtpServer'])] = serialize($server); PommoAPI::configUpdate($input, TRUE); $update = true; } elseif (!empty($_POST['updateSmtpServer'])) { $key = key($_POST['updateSmtpServer']); $server = array('host' => $_POST['host'][$key], 'port' => $_POST['port'][$key], 'auth' => $_POST['auth'][$key], 'user' => $_POST['user'][$key], 'pass' => $_POST['pass'][$key]); $input['smtp_' . $key] = serialize($server); PommoAPI::configUpdate($input, TRUE); $update = true; } elseif (!empty($_POST['deleteSmtpServer'])) {
* Copyright (C) 2005, 2006, 2007, 2008 Brice Burgess <*****@*****.**> * * This file is part of poMMo (http://www.pommo.org) * * poMMo 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 any later version. * * poMMo 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 program; see the file docs/LICENSE. If not, write to the * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */ /********************************** INITIALIZATION METHODS *********************************/ require '../../bootstrap.php'; $pommo->init(); $logger =& $pommo->_logger; $dbo =& $pommo->_dbo; /********************************** SETUP TEMPLATE, PAGE *********************************/ Pommo::requireOnce($pommo->_baseDir . 'inc/classes/template.php'); $smarty = new PommoTemplate(); $smarty->display('admin/setup/setup_form.tpl'); Pommo::kill();
* This file is part of poMMo (http://www.pommo.org) * * poMMo 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 any later version. * * poMMo 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 program; see the file docs/LICENSE. If not, write to the * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */ /********************************** INITIALIZATION METHODS *********************************/ require '../../../bootstrap.php'; Pommo::requireOnce($pommo->_baseDir . 'inc/helpers/fields.php'); $pommo->init(); $logger =& $pommo->_logger; $dbo =& $pommo->_dbo; /********************************** SETUP TEMPLATE, PAGE *********************************/ Pommo::requireOnce($pommo->_baseDir . 'inc/classes/template.php'); $smarty = new PommoTemplate(); $smarty->assign('fields', PommoField::get()); $smarty->display('admin/subscribers/ajax/subscriber_edit.tpl'); Pommo::kill();
* by the Free Software Foundation; either version 2, or any later version. * * poMMo 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 program; see the file docs/LICENSE. If not, write to the * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */ /********************************** INITIALIZATION METHODS *********************************/ header('Content-Type: text/html; charset=UTF-8'); define('_poMMo_embed', TRUE); require dirname(__FILE__) . '/bootstrap.php'; $pommo->init(array('authLevel' => 0, 'noSession' => TRUE)); $logger =& $pommo->_logger; $dbo =& $pommo->_dbo; /********************************** SETUP TEMPLATE, PAGE *********************************/ Pommo::requireOnce($pommo->_baseDir . 'inc/classes/template.php'); $smarty = new PommoTemplate(); // subscription forms will be activated from this template // Function $smarty->prepareForSubscribeForm(); // assign referer since this is an embedded form $smarty->assign('referer', htmlspecialchars($_SERVER['PHP_SELF'])); $smarty->display('subscribe/form.subscribe.tpl');
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */ /********************************** INITIALIZATION METHODS *********************************/ require '../../bootstrap.php'; Pommo::requireOnce($pommo->_baseDir . 'inc/helpers/mailings.php'); $config = PommoAPI::configGet('public_history'); if ($config['public_history'] == 'on') { $pommo->init(array('authLevel' => 0)); } else { Pommo::redirect('login.php'); } $logger =& $pommo->_logger; $dbo =& $pommo->_dbo; if (isset($_REQUEST['mailings'])) { if (is_array($_REQUEST['mailings'])) { $_REQUEST['mailings'] = $_REQUEST['mailings'][0]; } $mailing = current(PommoMailing::get(array('id' => $_REQUEST['mailings']))); } else { die; } /********************************** SETUP TEMPLATE, PAGE *********************************/ Pommo::requireOnce($pommo->_baseDir . 'inc/classes/template.php'); $smarty = new PommoTemplate(); $smarty->assign($mailing); $smarty->display('inc/mailing.tpl'); Pommo::kill();
/** * Mod Tracking - Pommo V0.1 G.Lengy - www.artaban.fr - * Modifications par Ariel Elyah - www.mailingfr.com - */ /********************************** INITIALIZATION METHODS *********************************/ require '../../bootstrap.php'; $pommo->init(); $logger =& $pommo->_logger; $dbo =& $pommo->_dbo; /********************************** SETUP TEMPLATE, PAGE *********************************/ Pommo::requireOnce($pommo->_baseDir . 'inc/classes/template.php'); $smarty = new PommoTemplate(); /********************************** PARAMÈTRES DE CONNEXION À LA BASE **********************************/ include '../../specific/inc/inc-connex-PDO.php'; $titre_page = ""; /************************************ CONDITION D'AFFICHAGE DES RESULTATS *************************************/ if (isset($_GET['mailing_id'])) { $mailing_id = $_GET['mailing_id']; $visitesparcampagne = $_GET['visitesparcampagne']; /****************************************** AFFICHAGE DES RACCOURCIS VERS LES GROUPES *******************************************/ $requetegroupe = "\r\nSELECT DISTINCT mailgroup \r\nFROM " . $prefix . "mailings AS m \r\nJOIN " . $prefix . "opentracking AS o \r\nON m.mailing_id = o.mailing_id \r\nORDER BY mailgroup ASC\r\n";
* You should have received a copy of the GNU General Public License * along with program; see the file docs/LICENSE. If not, write to the * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */ /********************************** INITIALIZATION METHODS *********************************/ require '../../../bootstrap.php'; Pommo::requireOnce($pommo->_baseDir . 'inc/helpers/mailings.php'); $pommo->init(); $logger =& $pommo->_logger; /********************************** SETUP TEMPLATE, PAGE *********************************/ Pommo::requireOnce($pommo->_baseDir . 'inc/classes/template.php'); $smarty = new PommoTemplate(); // fetch the mailing IDs $mailingIDS = $_REQUEST['mailings']; if (!is_array($mailingIDS)) { $mailingIDS = array($mailingIDS); } /********************************** JSON OUTPUT INITIALIZATION *********************************/ Pommo::requireOnce($pommo->_baseDir . 'inc/classes/json.php'); $json = new PommoJSON(false); // do not toggle escaping // EXAMINE CALL switch ($_REQUEST['call']) { case 'notice': foreach ($mailingIDS as $id) {
* 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 program; see the file docs/LICENSE. If not, write to the * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */ /********************************** INITIALIZATION METHODS *********************************/ $lang = false; if (isset($_POST['lang'])) { define('_poMMo_lang', $_POST['lang']); $lang = true; } require '../bootstrap.php'; $pommo->init(); $logger =& $pommo->_logger; $dbo =& $pommo->_dbo; /********************************** SETUP TEMPLATE, PAGE *********************************/ Pommo::requireOnce($pommo->_baseDir . 'inc/classes/template.php'); $smarty = new PommoTemplate(); $smarty->assign('header', array('main' => 'poMMo ' . $pommo->_config['version'], 'sub' => sprintf(Pommo::_T('Powerful mailing list software for %s'), $pommo->_config['list_name']))); if ($lang) { $logger->addErr(Pommo::_T('You have changed the language for this session. To make this the default language, you must update your config.php file.')); } $smarty->assign('lang', $pommo->_slanguage ? $pommo->_slanguage : $pommo->_language); $smarty->display('admin/admin.tpl'); Pommo::kill();
* Copyright (C) 2005, 2006, 2007, 2008 Brice Burgess <*****@*****.**> * * This file is part of poMMo (http://www.pommo.org) * * poMMo 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 any later version. * * poMMo 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 program; see the file docs/LICENSE. If not, write to the * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */ /********************************** INITIALIZATION METHODS *********************************/ require '../../../bootstrap.php'; $pommo->init(); $logger =& $pommo->_logger; $dbo =& $pommo->_dbo; /********************************** SETUP TEMPLATE, PAGE *********************************/ Pommo::requireOnce($pommo->_baseDir . 'inc/classes/template.php'); $smarty = new PommoTemplate(); $smarty->display('admin/subscribers/ajax/subscriber_export.tpl'); Pommo::kill();
* This file is part of poMMo (http://www.pommo.org) * * poMMo 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 any later version. * * poMMo 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 program; see the file docs/LICENSE. If not, write to the * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */ /********************************** INITIALIZATION METHODS *********************************/ require '../../../bootstrap.php'; $pommo->init(); $logger =& $pommo->_logger; $dbo =& $pommo->_dbo; /********************************** SETUP TEMPLATE, PAGE *********************************/ Pommo::requireOnce($pommo->_baseDir . 'inc/classes/template.php'); $smarty = new PommoTemplate(); @($status = is_numeric($_REQUEST['status']) ? $_REQUEST['status'] : 1); $smarty->assign('status', $status); $smarty->display('admin/subscribers/ajax/subscriber_del.tpl'); Pommo::kill();
* along with program; see the file docs/LICENSE. If not, write to the * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */ /********************************** INITIALIZATION METHODS *********************************/ require '../../bootstrap.php'; Pommo::requireOnce($pommo->_baseDir . 'inc/helpers/import.php'); $pommo->init(); $logger =& $pommo->_logger; $dbo =& $pommo->_dbo; /********************************** SETUP TEMPLATE, PAGE *********************************/ Pommo::requireOnce($pommo->_baseDir . 'inc/classes/template.php'); $smarty = new PommoTemplate(); //Pommo::kill('Importing and Exporting is temporarily disabled until PR15'); // Maximum File Size (in MB) $max_file_size = 2; $smarty->assign('maxSize', $max_file_size * 1024 * 1024); // Filename (in $_FILES array) $fname = "csvfile"; if (isset($_POST['submit'])) { // POST exists -- set pointer to content $fp = false; $box = false; if (!empty($_FILES[$fname]['tmp_name'])) { $fp =& fopen($_FILES[$fname]['tmp_name'], "r"); } elseif (!empty($_POST['box'])) { $str =& $_POST['box']; // wrap $c as a file stream -- requires PHP 4.3.2
require '../bootstrap.php'; Pommo::requireOnce($pommo->_baseDir . 'inc/helpers/mailings.php'); Pommo::requireOnce($pommo->_baseDir . 'inc/helpers/subscribers.php'); $config = PommoAPI::configGet('public_history'); if ($config['public_history'] == 'on') { $pommo->init(array('authLevel' => 0)); } else { Pommo::redirect('login.php'); } $logger =& $pommo->_logger; $dbo =& $pommo->_dbo; /********************************** SETUP TEMPLATE, PAGE *********************************/ Pommo::requireOnce($pommo->_baseDir . 'inc/classes/template.php'); $smarty = new PommoTemplate(); $smarty->assign('title', $pommo->_config['site_name'] . ' - ' . Pommo::_T('Mailing History')); /** SET PAGE STATE * limit - # of mailings per page * sort - Sorting of Mailings [subject, started] * order - Order Type (ascending - ASC /descending - DESC) */ // Initialize page state with default values overriden by those held in $_REQUEST $state =& PommoAPI::stateInit('mailings_history', array('limit' => 100, 'sort' => 'finished', 'order' => 'asc', 'page' => 1), $_REQUEST); // if mail_id is passed, display the mailing. if (isset($_GET['mail_id']) && is_numeric($_GET['mail_id'])) { $input = current(PommoMailing::get(array('id' => $_GET['mail_id']))); // attempt personalizations of body/subject if (isset($_GET['email']) && isset($_GET['code'])) { $subscriber = current(PommoSubscriber::get(array('email' => $_GET['email'], 'status' => 1))); if ($_GET['code'] == PommoSubscriber::getActCode($subscriber)) {
* along with program; see the file docs/LICENSE. If not, write to the * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */ /********************************** INITIALIZATION METHODS *********************************/ require '../../bootstrap.php'; Pommo::requireOnce($pommo->_baseDir . 'inc/helpers/fields.php'); $pommo->init(); $logger =& $pommo->_logger; $dbo =& $pommo->_dbo; /********************************** SETUP TEMPLATE, PAGE *********************************/ Pommo::requireOnce($pommo->_baseDir . 'inc/classes/template.php'); $smarty = new PommoTemplate(); $smarty->prepareForForm(); // add field if requested, redirect to its edit page on success if (!empty($_POST['field_name'])) { $field = PommoField::make(array('name' => $_POST['field_name'], 'type' => $_POST['field_type'], 'prompt' => 'Field Prompt', 'required' => 'off', 'active' => 'off')); $id = PommoField::add($field); if ($id) { $smarty->assign('added', $id); } else { $logger->addMsg(Pommo::_T('Error with addition.')); } } // check for a deletion request if (!empty($_GET['delete'])) { $field = PommoField::get(array('id' => $_GET['field_id'])); $field =& current($field);
function kill($msg = NULL, $backtrace = FALSE) { global $pommo; // output passed message if ($msg || !ob_get_length()) { if (empty($pommo->_workDir)) { echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">'; echo '<title>poMMo - Erreur</title>'; // Very basics added for valid output echo '<div><img src="' . $pommo->_baseUrl . 'themes/shared/images/icons/alert.png" alt="alert icon" style="vertical-align: middle; margin-right: 20px;"/> ' . $msg . '</div>'; } else { $logger =& $pommo->_logger; $logger->addErr($msg); Pommo::requireOnce($pommo->_baseDir . 'inc/classes/template.php'); $smarty = new PommoTemplate(); $smarty->assign('fatalMsg', TRUE); $smarty->display('message.tpl'); } } // output debugging info if enabled (in config.php) if ($pommo->_debug) { if (is_object($pommo)) { Pommo::requireOnce($pommo->_baseDir . 'inc/helpers/debug.php'); $debug = new PommoHelperDebug(); $debug->bmDebug(); } } if ($backtrace) { $backtrace = debug_backtrace(); echo @'<h2>BACKTRACE</h2>' . '<p>' . @str_ireplace($pommo->_baseDir, '', $backtrace[1]['file']) . ':' . $backtrace[1]['line'] . ' ' . $backtrace[1]['function'] . '()</p>' . '<p>' . @str_ireplace($pommo->_baseDir, '', $backtrace[2]['file']) . ' ' . $backtrace[2]['function'] . '()</p>' . '<p>' . @str_ireplace($pommo->_baseDir, '', $backtrace[3]['file']) . ' ' . $backtrace[3]['function'] . '()</p>'; } // print and clear output buffer ob_end_flush(); // kill script die; }
/** * Mod Tracking - Pommo V0.1 G.Lengy - www.artaban.fr - * Modifications par Ariel Elyah - www.mailingfr.com - */ /********************************** INITIALIZATION METHODS *********************************/ require '../../bootstrap.php'; $pommo->init(); $logger =& $pommo->_logger; $dbo =& $pommo->_dbo; /********************************** SETUP TEMPLATE, PAGE *********************************/ Pommo::requireOnce($pommo->_baseDir . 'inc/classes/template.php'); $smarty = new PommoTemplate(); /********************************* PARAMÈTRES DE CONNEXION À LA BASE **********************************/ include '../../specific/inc/inc-connex-PDO.php'; /****************************************** AFFICHAGE DES RACCOURCIS VERS LES GROUPES *******************************************/ $requetegroupe = "\r\nSELECT DISTINCT mailgroup \r\nFROM " . $prefix . "mailings AS m \r\nJOIN " . $prefix . "opentracking AS o \r\nON m.mailing_id = o.mailing_id \r\nORDER BY mailgroup ASC\r\n"; $executionrequetegroupe = $id_connex->query($requetegroupe); while ($arraygroupes = $executionrequetegroupe->fetch()) { $listegroupes[] = "<option value=\"" . utf8_encode($arraygroupes[mailgroup]) . "\">" . $arraygroupes[mailgroup] . "</option>"; } if ($listegroupes) { $groupes = implode("", $listegroupes); }
* along with program; see the file docs/LICENSE. If not, write to the * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */ /********************************** INITIALIZATION METHODS *********************************/ require '../../../bootstrap.php'; Pommo::requireOnce($pommo->_baseDir . 'inc/helpers/templates.php'); $pommo->init(); $logger =& $pommo->_logger; $dbo =& $pommo->_dbo; /********************************** SETUP TEMPLATE, PAGE *********************************/ Pommo::requireOnce($pommo->_baseDir . 'inc/classes/template.php'); $smarty = new PommoTemplate(); $smarty->prepareForForm(); /********************************** JSON OUTPUT INITIALIZATION *********************************/ Pommo::requireOnce($pommo->_baseDir . 'inc/classes/json.php'); $json = new PommoJSON(); $success = false; if (isset($_POST['skip']) || isset($_POST['template']) && !is_numeric($_POST['template'])) { $success = true; } elseif (isset($_POST['load'])) { $template = current(PommoMailingTemplate::get(array('id' => $_POST['template']))); $pommo->_session['state']['mailing']['body'] = $template['body']; $pommo->_session['state']['mailing']['altbody'] = $template['altbody']; $success = true; } elseif (isset($_POST['delete'])) {
* along with program; see the file docs/LICENSE. If not, write to the * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */ /********************************** INITIALIZATION METHODS *********************************/ require '../bootstrap.php'; Pommo::requireOnce($pommo->_baseDir . 'inc/helpers/pending.php'); $pommo->init(array('authLevel' => 0, 'noSession' => true)); $logger =& $pommo->_logger; $dbo =& $pommo->_dbo; /********************************** SETUP TEMPLATE, PAGE *********************************/ Pommo::requireOnce($pommo->_baseDir . 'inc/classes/template.php'); $smarty = new PommoTemplate(); $input = isset($_GET['input']) ? unserialize($_GET['input']) : array('Email' => NULL); $pending = isset($input['adminID']) ? PommoPending::getBySubID(0) : PommoPending::getByEmail($input['Email']); if (!$pending) { Pommo::redirect('login.php'); } switch ($pending['type']) { case "add": $msg = Pommo::_T('subscription request'); $pending['type'] = 'confirm'; // normalize for PommoHelperMessages::sendMessage break; case "change": $msg = Pommo::_T('record update request'); $pending['type'] = 'update'; // normalize for PommoHelperMessages::sendMessage
* This file is part of poMMo (http://www.pommo.org) * * poMMo 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 any later version. * * poMMo 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 program; see the file docs/LICENSE. If not, write to the * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */ /********************************** INITIALIZATION METHODS *********************************/ require '../../bootstrap.php'; $pommo->init(); $logger =& $pommo->_logger; $dbo =& $pommo->_dbo; /********************************** SETUP TEMPLATE, PAGE *********************************/ Pommo::requireOnce($pommo->_baseDir . 'inc/classes/template.php'); $smarty = new PommoTemplate(); // subscription forms will be activated from this template $smarty->prepareForSubscribeForm(); $smarty->display('admin/setup/form_embed.tpl'); Pommo::kill();
* Copyright (C) 2005, 2006, 2007, 2008 Brice Burgess <*****@*****.**> * * This file is part of poMMo (http://www.pommo.org) * * poMMo 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 any later version. * * poMMo 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 program; see the file docs/LICENSE. If not, write to the * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */ /********************************** INITIALIZATION METHODS *********************************/ require '../../bootstrap.php'; $pommo->init(); $logger =& $pommo->_logger; $dbo =& $pommo->_dbo; /********************************** SETUP TEMPLATE, PAGE *********************************/ Pommo::requireOnce($pommo->_baseDir . 'inc/classes/template.php'); $smarty = new PommoTemplate(); $smarty->display('admin/subscribers/admin_subscribers.tpl'); Pommo::kill();
/********************************** INITIALIZATION METHODS *********************************/ require '../../bootstrap.php'; Pommo::requireOnce($pommo->_baseDir . 'inc/classes/sql.gen.php'); Pommo::requireOnce($pommo->_baseDir . 'inc/helpers/groups.php'); Pommo::requireOnce($pommo->_baseDir . 'inc/helpers/fields.php'); Pommo::requireOnce($pommo->_baseDir . 'inc/helpers/rules.php'); $pommo->init(); $logger =& $pommo->_logger; $dbo =& $pommo->_dbo; /********************************** SETUP TEMPLATE, PAGE *********************************/ Pommo::requireOnce($pommo->_baseDir . 'inc/classes/template.php'); $smarty = new PommoTemplate(); $smarty->assign('returnStr', Pommo::_T('Groups Page')); // Initialize page state with default values overriden by those held in $_REQUEST $state =& PommoAPI::stateInit('groups_edit', array('group' => 0), $_REQUEST); $groups =& PommoGroup::get(); $fields =& PommoField::get(); $group =& $groups[$state['group']]; if (empty($group)) { Pommo::redirect('subscribers_groups.php'); } $rules = PommoSQL::sortRules($group['rules']); $rules['and'] = PommoSQL::sortLogic($rules['and']); $rules['or'] = PommoSQL::sortLogic($rules['or']); foreach ($rules as $key => $a) { if ($key == 'include' || $key == 'exclude') { foreach ($a as $k => $gid) {
/** * Mod Tracking - Pommo V0.1 G.Lengy - www.artaban.fr - * Modifications par Ariel Elyah - www.mailingfr.com - */ /********************************** INITIALIZATION METHODS *********************************/ require '../../bootstrap.php'; $pommo->init(); $logger =& $pommo->_logger; $dbo =& $pommo->_dbo; /********************************** SETUP TEMPLATE, PAGE *********************************/ Pommo::requireOnce($pommo->_baseDir . 'inc/classes/template.php'); $smarty = new PommoTemplate(); /********************************** PARAMÈTRES DE CONNEXION À LA BASE **********************************/ include '../../specific/inc/inc-connex-PDO.php'; $titre_page = ""; /************************************ CONDITION D'AFFICHAGE DES RESULTATS *************************************/ $sql = "SELECT DISTINCT mailing_id\r\n FROM " . $prefix . "opentracking\r\n ORDER BY mailing_id ASC\r\n"; //echo $sql; $result = $id_connex->query($sql); if (!$result) { exit('<p><strong>Erreur: Votre requête comporte des erreurs... Revenez sur la <a href="tracking_menu.php" title="Statistiques/Tracking">page principale des statistiques</a> et précisez votre requête.</strong><br /><br /> (' . mysql_error() . ')</p>'); } // Nombre de résultats
*/ /********************************** INITIALIZATION METHODS *********************************/ require '../../../bootstrap.php'; Pommo::requireOnce($pommo->_baseDir . 'inc/helpers/groups.php'); Pommo::requireOnce($pommo->_baseDir . 'inc/classes/mailctl.php'); Pommo::requireOnce($pommo->_baseDir . 'inc/helpers/mailings.php'); $pommo->init(); $logger =& $pommo->_logger; $dbo =& $pommo->_dbo; /********************************** SETUP TEMPLATE, PAGE *********************************/ Pommo::requireOnce($pommo->_baseDir . 'inc/classes/template.php'); $smarty = new PommoTemplate(); $smarty->prepareForForm(); if (PommoMailing::isCurrent()) { Pommo::kill(sprintf(Pommo::_T('A Mailing is currently processing. Visit the %sStatus%s page to check its progress.'), '<a href="mailing_status.php">', '</a>')); } // TODO -- fix stateInit so we don't NEED to supply the defaults that have already been defined $dbvalues = PommoAPI::configGet(array('list_fromname', 'list_fromemail', 'list_frombounce', 'list_charset', 'list_wysiwyg')); // Initialize page state with default values overriden by those held in $_REQUEST $state =& PommoAPI::stateInit('mailing', array('fromname' => $dbvalues['list_fromname'], 'fromemail' => $dbvalues['list_fromemail'], 'frombounce' => $dbvalues['list_frombounce'], 'list_charset' => $dbvalues['list_charset'], 'wysiwyg' => $dbvalues['list_wysiwyg'], 'mailgroup' => 'all', 'subject' => '', 'body' => '', 'altbody' => ''), $_POST); $state['charset'] = $state['list_charset']; // validate composition $tempbody = trim($state['body']); $tempalt = trim($state['altbody']); if (empty($tempbody) && empty($tempalt) || empty($state['subject'])) { $logger->addErr(Pommo::_T('Subject or Message cannot be empty!')); $smarty->assign($state);
* You should have received a copy of the GNU General Public License * along with program; see the file docs/LICENSE. If not, write to the * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */ /********************************** INITIALIZATION METHODS *********************************/ require '../../../bootstrap.php'; $pommo->init(); $logger =& $pommo->_logger; $dbo =& $pommo->_dbo; /********************************** SETUP TEMPLATE, PAGE *********************************/ Pommo::requireOnce($pommo->_baseDir . 'inc/classes/template.php'); $smarty = new PommoTemplate(); $smarty->prepareForForm(); /********************************** JSON OUTPUT INITIALIZATION *********************************/ Pommo::requireOnce($pommo->_baseDir . 'inc/classes/json.php'); $json = new PommoJSON(); // Check if user requested to restore defaults if (isset($_POST['restore'])) { Pommo::requireOnce($pommo->_baseDir . 'inc/helpers/messages.php'); switch (key($_POST['restore'])) { case 'subscribe': $messages = PommoHelperMessages::ResetDefault('subscribe'); break; case 'activate': $messages = PommoHelperMessages::resetDefault('activate');
*/ /********************************** INITIALIZATION METHODS *********************************/ require '../bootstrap.php'; Pommo::requireOnce($pommo->_baseDir . 'inc/helpers/pending.php'); $pommo->init(array('authLevel' => 0, 'noSession' => true)); $logger =& $pommo->_logger; $dbo =& $pommo->_dbo; session_start(); // required by smartyValidate. TODO -> move to prepareForForm() ?? /********************************** SETUP TEMPLATE, PAGE *********************************/ Pommo::requireOnce($pommo->_baseDir . 'inc/classes/template.php'); $smarty = new PommoTemplate(); $smarty->assign('title', $pommo->_config['site_name'] . ' - ' . Pommo::_T('subscriber logon')); $smarty->prepareForForm(); if (!SmartyValidate::is_registered_form() || empty($_POST)) { // ___ USER HAS NOT SENT FORM ___ SmartyValidate::connect($smarty, true); SmartyValidate::register_validator('email', 'Email', 'isEmail', false, false, 'trim'); $formError = array(); $formError['email'] = Pommo::_T('Invalid email address'); $smarty->assign('formError', $formError); // Assign email to form if pre-provided if (isset($_REQUEST['Email'])) { $smarty->assign('Email', $_REQUEST['Email']); } elseif (isset($_REQUEST['email'])) { $smarty->assign('Email', $_REQUEST['email']); }
/********************************** INITIALIZATION METHODS *********************************/ require '../bootstrap.php'; Pommo::requireOnce($pommo->_baseDir . 'inc/classes/install.php'); $pommo->init(array('authLevel' => 0, 'install' => TRUE)); session_start(); // required by smartyValidate. TODO -> move to prepareForForm() ?? $logger =& $pommo->_logger; $dbo =& $pommo->_dbo; $dbo->dieOnQuery(FALSE); /********************************** SETUP TEMPLATE, PAGE *********************************/ Pommo::requireOnce($pommo->_baseDir . 'inc/classes/template.php'); $smarty = new PommoTemplate(); $smarty->prepareForForm(); // Check to make sure poMMo is not already installed. if (PommoInstall::verify()) { $logger->addErr(Pommo::_T('poMMo is already installed.')); $smarty->assign('installed', TRUE); $smarty->display('install.tpl'); Pommo::kill(); } if (isset($_REQUEST['disableDebug'])) { unset($_REQUEST['debugInstall']); } elseif (isset($_REQUEST['debugInstall'])) { $smarty->assign('debug', TRUE); } if (!SmartyValidate::is_registered_form() || empty($_POST)) { // ___ USER HAS NOT SENT FORM ___
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */ /********************************** INITIALIZATION METHODS *********************************/ require '../bootstrap.php'; Pommo::requireOnce($pommo->_baseDir . 'inc/helpers/subscribers.php'); Pommo::requireOnce($pommo->_baseDir . 'inc/helpers/messages.php'); $pommo->init(array('authLevel' => 0, 'noSession' => true)); $logger =& $pommo->_logger; $dbo =& $pommo->_dbo; /********************************** SETUP TEMPLATE, PAGE *********************************/ Pommo::requireOnce($pommo->_baseDir . 'inc/classes/template.php'); $smarty = new PommoTemplate(); // make sure email/login is valid $subscriber = current(PommoSubscriber::get(array('email' => empty($_REQUEST['email']) ? '0' : $_REQUEST['email'], 'status' => 1))); if (empty($subscriber)) { Pommo::redirect('login.php'); } // see if an anctivation email was sent to this subscriber in the last 2 minutes; $query = "\n\tSELECT \n\t\t*\n\tFROM \n\t\t" . $dbo->table['scratch'] . "\n\tWHERE\n\t\t`type`=1\n\t\tAND `int`=%i\n\t\tAND `time` > (NOW() - INTERVAL 2 MINUTE)\n\tLIMIT 1"; $query = $dbo->prepare($query, array($subscriber['id'])); $test = $dbo->query($query, 0); // attempt to send activation code if once has not recently been sent if (empty($test)) { $code = PommoSubscriber::getActCode($subscriber); if (PommoHelperMessages::sendMessage(array('to' => $subscriber['email'], 'code' => $code, 'type' => 'activate'))) { $smarty->assign('sent', true); // timestamp this activation email
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */ /********************************** INITIALIZATION METHODS *********************************/ require '../../bootstrap.php'; Pommo::requireOnce($pommo->_baseDir . 'inc/helpers/groups.php'); Pommo::requireOnce($pommo->_baseDir . 'inc/helpers/fields.php'); $pommo->init(); $logger =& $pommo->_logger; $dbo =& $pommo->_dbo; /********************************** SETUP TEMPLATE, PAGE *********************************/ Pommo::requireOnce($pommo->_baseDir . 'inc/classes/template.php'); $smarty = new PommoTemplate(); $smarty->assign('returnStr', Pommo::_T('Subscribers Page')); /** SET PAGE STATE * limit - The Maximum # of subscribers to show per page * sort - The subscriber field to sort by (email, ip, time_registered, time_touched, status, or field_id) * order - Order Type (ascending - ASC /descending - DESC) * info - (hide/show) Time Registered/Updated, IP address * * status - Filter by subscriber status (active, inactive, pending, all) * group - Filter by group members (groupID or 'all') */ // Initialize page state with default values overriden by those held in $_REQUEST $state =& PommoAPI::stateInit('subscribers_manage', array('limit' => 150, 'sort' => $pommo->_default_subscriber_sort, 'order' => 'asc', 'status' => 1, 'group' => 'all', 'page' => 1, 'search' => false), $_REQUEST); /********************************** VALIDATION ROUTINES *********************************/
*/ /********************************** INITIALIZATION METHODS *********************************/ require '../../bootstrap.php'; Pommo::requireOnce($pommo->_baseDir . 'inc/helpers/import.php'); Pommo::requireOnce($pommo->_baseDir . 'inc/helpers/subscribers.php'); Pommo::requireOnce($pommo->_baseDir . 'inc/helpers/fields.php'); $pommo->init(array('keep' => TRUE)); $logger =& $pommo->_logger; $dbo =& $pommo->_dbo; /********************************** SETUP TEMPLATE, PAGE *********************************/ Pommo::requireOnce($pommo->_baseDir . 'inc/classes/template.php'); $smarty = new PommoTemplate(); $emails =& $pommo->get('emails'); $dupes =& $pommo->get('dupes'); $fields =& PommoField::get(); $flag = FALSE; foreach ($fields as $field) { if ($field['required'] == 'on') { $flag = TRUE; } } if (isset($_GET['continue'])) { foreach ($emails as $email) { $subscriber = array('email' => $email, 'registered' => time(), 'ip' => $_SERVER['REMOTE_ADDR'], 'status' => 1, 'data' => array()); if ($flag) { $subscriber['flag'] = 9; }