当前位置: 首页>>代码示例>>PHP>>正文


PHP Pommo::init方法代码示例

本文整理汇总了PHP中Pommo::init方法的典型用法代码示例。如果您正苦于以下问题:PHP Pommo::init方法的具体用法?PHP Pommo::init怎么用?PHP Pommo::init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Pommo的用法示例。


在下文中一共展示了Pommo::init方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

 *  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 Pommo.  If not, see <http://www.gnu.org/licenses/>.
 * 
 *  This fork is from https://github.com/soonick/poMMo
 *  Please see docs/contribs for Contributors
 *
 */
/**********************************
	INITIALIZATION METHODS
*********************************/
require '../bootstrap.php';
Pommo::init();
$logger = Pommo::$_logger;
$dbo = Pommo::$_dbo;
/**********************************
	SETUP TEMPLATE, PAGE
 *********************************/
require_once Pommo::$_baseDir . 'classes/Pommo_Template.php';
$view = new Pommo_Template();
if (empty($_POST)) {
    // no validation for exchanger
    $vMsg = array();
    $vMsg['site_url'] = $vMsg['site_success'] = $vMsg['site_confirm'] = Pommo::_T('Must be a valid URL');
    $vMsg['list_name'] = $vMsg['site_name'] = Pommo::_T('Cannot be empty.');
    $view->assign('vMsg', $vMsg);
    // populate _POST with info from database (fills in form values...)
    $dbVals = Pommo_Api::configGet(array('site_success', 'site_confirm', 'list_exchanger', 'list_confirm'));
开发者ID:soonick,项目名称:poMMo,代码行数:31,代码来源:general.php

示例2: define

 * 
 * 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
 *********************************/
define('_poMMo_support', TRUE);
require 'bootstrap.php';
Pommo::init(array('install' => TRUE));
$logger =& Pommo::$_logger;
// start error logging
Pommo::logErrors();
// ignore user abort
ignore_user_abort(true);
require_once Pommo::$_baseDir . 'classes/Pommo_Mail_Ctl.php';
$code = empty($_GET['code']) ? null : $_GET['code'];
$spawn = !isset($_GET['spawn']) ? 0 : $_GET['spawn'] + 1;
trigger_error('Testing Log, Spawn #' . $spawn);
$fileContent = "<?php die(); ?>\n[code] = {$code}\n[spawn] = {$spawn}\n";
if (!($handle = fopen(Pommo::$_workDir . '/mailing.test.php', 'w'))) {
    die('Unable to write to test file');
}
if (fwrite($handle, $fileContent) === FALSE) {
    die('Unable to write to test file');
开发者ID:systemfirez,项目名称:poMMo,代码行数:31,代码来源:mailing.test2.php

示例3:

 * 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.
 */
// TODO -> Add auto firewalling [DOS protection] scripts here.. ie. if Bad/no code received by same IP 3 times, temp/perm ban.
//  If page is being bombed/DOSed... temp shutdown. should all be handled inside @ _IS_VALID or fireup(); ..
/**********************************
	INITIALIZATION METHODS
*********************************/
require 'bootstrap.php';
require_once Pommo::$_baseDir . 'classes/Pommo_Pending.php';
Pommo::init(array('authLevel' => 0, 'noSession' => true));
$logger =& Pommo::$_logger;
$dbo =& Pommo::$_dbo;
/**********************************
	SETUP TEMPLATE, PAGE
 *********************************/
require_once Pommo::$_baseDir . 'classes/Pommo_Template.php';
$view = new Pommo_Template();
if (empty($_GET['code'])) {
    $logger->addMsg(Pommo::_T('No code given.'));
    $view->display('user/confirm');
    Pommo::kill();
}
// lookup code
$pending = Pommo_Pending::get($_GET['code']);
if (!$pending) {
开发者ID:soonick,项目名称:poMMo,代码行数:31,代码来源:confirm.php

示例4:

 *  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 Pommo.  If not, see <http://www.gnu.org/licenses/>.
 *
 *  This fork is from https://github.com/soonick/poMMo
 *  Please see docs/contribs for Contributors
 *
 */
/**********************************
	INITIALIZATION METHODS
 *********************************/
require 'bootstrap.php';
Pommo::init(array('authLevel' => 0));
$logger = Pommo::$_logger;
/**********************************
	SETUP TEMPLATE, PAGE
 *********************************/
require_once Pommo::$_baseDir . 'classes/Pommo_Template.php';
$view = new Pommo_Template();
$fatal_error = null;
// Check we have the mysql module installed
if (!extension_loaded('mysql')) {
    $fatal_error[] = "Php mysql module is not installed.";
}
// Check if module is installed
if (!extension_loaded('gettext')) {
    $fatal_error[] = "Php gettext module is not installed.";
}
开发者ID:soonick,项目名称:poMMo,代码行数:31,代码来源:index.php

示例5: current

 *  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 Pommo.  If not, see <http://www.gnu.org/licenses/>.
 * 
 *  This fork is from https://github.com/soonick/poMMo
 *  Please see docs/contribs for Contributors
 *
 */
/**********************************
	INITIALIZATION METHODS
*********************************/
require '../bootstrap.php';
require_once Pommo::$_baseDir . 'classes/Pommo_Fields.php';
Pommo::init(array('keep' => TRUE));
$logger = Pommo::$_logger;
$dbo = Pommo::$_dbo;
/**********************************
	SETUP TEMPLATE, PAGE
 *********************************/
require_once Pommo::$_baseDir . 'classes/Pommo_Template.php';
$view = new Pommo_Template();
// validate field ID
$field = current(Pommo_Fields::get(array('id' => $_REQUEST['field_id'])));
if ($field['id'] != $_REQUEST['field_id']) {
    die('bad field ID');
}
if (empty($_POST)) {
    $vMsg = array();
    $vMsg['field_name'] = $vMsg['field_prompt'] = Pommo::_T('Cannot be empty.');
开发者ID:soonick,项目名称:poMMo,代码行数:31,代码来源:field_edit.php

示例6: define

 * 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
 *********************************/
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
 *********************************/
require_once Pommo::$_baseDir . 'classes/Pommo_Template.php';
$smarty = new Pommo_Template();
// subscription forms will be activated from this template
$smarty->prepareForSubscribeForm();
// assign referer since this is an embedded form
$smarty->assign('referer', htmlspecialchars($_SERVER['PHP_SELF']));
$smarty->display('subscribe/form.mini.tpl');
开发者ID:systemfirez,项目名称:poMMo,代码行数:31,代码来源:embed.miniform.php

示例7: empty

 * 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
*********************************/
$serial = empty($_GET['serial']) ? time() : addslashes($_GET['serial']);
require '../bootstrap.php';
require_once Pommo::$_baseDir . 'classes/Pommo_Mta.php';
Pommo::init(array('sessionID' => $serial, 'keep' => TRUE, 'authLevel' => 0));
$logger = Pommo::$_logger;
$dbo = Pommo::$_dbo;
// don't die on query so we can capture logs'
// NOTE: Be extra careful to check the success of queries/methods!
$dbo->dieOnQuery(FALSE);
// turn logging off unless verbosity is 1
if (Pommo::$_verbosity > 1) {
    $dbo->debug(FALSE);
}
// start error logging
Pommo::logErrors();
/**********************************
    STARTUP ROUTINES
 *********************************/
$config = Pommo_Api::configGet(array('list_exchanger', 'maxRuntime', 'smtp_1', 'smtp_2', 'smtp_3', 'smtp_4', 'throttle_SMTP', 'throttle_MPS', 'throttle_BPS', 'throttle_DP', 'throttle_DMPP', 'throttle_DBPP'));
开发者ID:soonick,项目名称:poMMo,代码行数:31,代码来源:mailings_send4.php

示例8:

 * 
 * 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';
require_once Pommo::$_baseDir . 'classes/Pommo_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
 *********************************/
require_once Pommo::$_baseDir . 'classes/Pommo_Template.php';
$smarty = new Pommo_Template();
$smarty->prepareForForm();
// Check to make sure poMMo is not already installed.
if (Pommo_Install::verify()) {
    $logger->addErr(Pommo::_T('poMMo is already installed.'));
    $smarty->assign('installed', TRUE);
开发者ID:systemfirez,项目名称:poMMo,代码行数:31,代码来源:install.php

示例9: define

 * 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
 *********************************/
define('_poMMo_support', TRUE);
$maxRunTime = 80;
if (ini_get('safe_mode')) {
    $maxRunTime = ini_get('max_execution_time') - 10;
} else {
    set_time_limit(0);
}
ignore_user_abort(true);
require 'bootstrap.php';
Pommo::init(array('noSession' => TRUE));
$code = empty($_GET['code']) ? null : $_GET['code'];
if (!($handle = fopen(Pommo::$_workDir . '/mailing.test.php', 'w'))) {
    die('Unable to write to test file');
}
for ($i = 0; $i <= 90; $i += 5) {
    $fileContent = "<?php die(); ?>\n[code] = {$code}\n[time] = {$i}\n";
    rewind($handle);
    if (fwrite($handle, $fileContent) === FALSE) {
        die('Unable to write to test file');
    }
    sleep(5);
}
fclose($handle);
die;
开发者ID:systemfirez,项目名称:poMMo,代码行数:31,代码来源:mailing.runtime2.php

示例10: array

 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Pommo.  If not, see <http://www.gnu.org/licenses/>.
 *
 *  This fork is from https://github.com/soonick/poMMo
 *  Please see docs/contribs for Contributors
 *
 */
/**********************************
  INITIALIZATION METHODS
 *********************************/
require '../bootstrap.php';
require_once Pommo::$_baseDir . 'classes/Pommo_Fields.php';
require_once Pommo::$_baseDir . 'classes/Pommo_Mailing.php';
Pommo::init(array('keep' => true));
$logger = Pommo::$_logger;
$dbo = Pommo::$_dbo;
/**********************************
  SETUP TEMPLATE, PAGE
 *********************************/
require_once Pommo::$_baseDir . 'classes/Pommo_Template.php';
$view = new Pommo_Template();
$current = Pommo_Mailing::isCurrent();
if (empty($_POST)) {
    // ___ USER HAS NOT SENT FORM ___
    $vMsg = array();
    $vMsg['email'] = Pommo::_T('Invalid email address');
    $view->assign('vMsg', $vMsg);
} else {
    // ___ USER HAS SENT FORM ___
开发者ID:soonick,项目名称:poMMo,代码行数:31,代码来源:ajax.mailingtest.php


注:本文中的Pommo::init方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。