本文整理汇总了PHP中Pommo_Template::prepareForForm方法的典型用法代码示例。如果您正苦于以下问题:PHP Pommo_Template::prepareForForm方法的具体用法?PHP Pommo_Template::prepareForForm怎么用?PHP Pommo_Template::prepareForForm使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pommo_Template
的用法示例。
在下文中一共展示了Pommo_Template::prepareForForm方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: current
* 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
*********************************/
require_once Pommo::$_baseDir . 'classes/Pommo_Template.php';
$smarty = new Pommo_Template();
$smarty->prepareForForm();
$exchanger = current(Pommo_Api::configGet(array('list_exchanger')));
SmartyValidate::connect($smarty);
if (!SmartyValidate::is_registered_form('exchanger') || empty($_POST)) {
// ___ USER HAS NOT SENT FORM ___
SmartyValidate::register_form('exchanger', true);
SmartyValidate::register_validator('email', 'email', 'isEmail', false, false, false, 'exchanger');
$vMsg = array();
$vMsg['email'] = Pommo::_T('Invalid email address');
$smarty->assign('vMsg', $vMsg);
$dbvals = array('exchanger' => $exchanger, 'email' => Pommo::$_config['admin_email']);
$smarty->assign($dbvals);
} else {
// ___ USER HAS SENT FORM ___
/**********************************
JSON OUTPUT INITIALIZATION