本文整理匯總了PHP中Pommo::get方法的典型用法代碼示例。如果您正苦於以下問題:PHP Pommo::get方法的具體用法?PHP Pommo::get怎麽用?PHP Pommo::get使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Pommo
的用法示例。
在下文中一共展示了Pommo::get方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Pommo_Template
INITIALIZATION METHODS
*********************************/
require 'bootstrap.php';
require_once Pommo::$_baseDir . 'classes/Pommo_Csv_Stream.php';
require_once Pommo::$_baseDir . 'classes/Pommo_Subscribers.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();
$emails = Pommo::get('emails');
$dupes = Pommo::get('dupes');
$fields = Pommo_Fields::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;
}
if (!Pommo_Subscribers::add($subscriber)) {
die('Error importing subscriber');
示例2: Pommo_Template
*/
/**********************************
INITIALIZATION METHODS
*********************************/
require 'bootstrap.php';
require_once Pommo::$_baseDir . 'classes/Pommo_Csv_Stream.php';
require_once Pommo::$_baseDir . 'classes/Pommo_Subscribers.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();
$view->assign('returnStr', _('Import'));
$preview = Pommo::get('preview');
// find the most columns in a row
$cols = 0;
foreach ($preview as $row) {
$c = count($row);
if ($c > $cols) {
$cols = $c;
}
}
$view->assign('excludeUnsubscribed', isset($_REQUEST['excludeUnsubscribed']) ? true : false);
$view->assign('preview', $preview);
$view->assign('colNum', $cols);
$view->assign('fields', Pommo_Fields::get());
$view->display('admin/subscribers/import_csv');