本文整理匯總了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