本文整理汇总了PHP中MailForm::getValues方法的典型用法代码示例。如果您正苦于以下问题:PHP MailForm::getValues方法的具体用法?PHP MailForm::getValues怎么用?PHP MailForm::getValues使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MailForm
的用法示例。
在下文中一共展示了MailForm::getValues方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: assocify
if (isset($form->widgets['class'])) {
$form->widgets['class']->setValues(array_merge(array('' => '- ' . intl_get('SELECT') . ' -'), assocify($classes)));
}
$w =& $form->addWidget('hidden', 'ifname');
$w->setValue($cgi->ifname);
$w =& $form->addWidget('hidden', 'tag');
$w->setValue($cgi->tag);
$w =& $form->addWidget('template', 'tpl');
$w->template = 'properties.spt';
$w =& $form->addWidget('msubmit', 'submit_button');
$b1 =& $w->getButton();
$b1->setValues(intl_get('OK'));
//$b1->extra = 'onclick="return properties_ok (this.form)"';
$b2 =& $w->addButton('submit_button', intl_get('Cancel'));
$b2->extra = 'onclick="return properties_cancel (this.form)"';
page_title(intl_get('Editing Element') . ': ' . strtoupper($cgi->tag));
if ($form->invalid($cgi)) {
$form->setValues($cgi);
echo $form->show();
} else {
$form->setValues($cgi);
$vals = $form->getValues($cgi);
$ifname = $vals['ifname'];
unset($vals['ifname']);
$tag = $vals['tag'];
unset($vals['tag']);
unset($vals['tpl']);
unset($vals['submit_button']);
echo template_simple('properties_return.spt', array('ifname' => $ifname, 'vals' => $vals));
exit;
}
示例2: foreach
$val = false;
}
$w =& $form->createWidget($k, $v);
if ($val) {
$w->setValue($val);
}
}
$sub =& $form->addWidget('msubmit', 'submit_button');
$b1 =& $sub->getButton();
$b1->setValues(intl_get('Save'));
$b2 =& $sub->addbutton('submit_button', intl_get('Cancel'));
$b2->extra = 'onclick="window.location.href = \'' . site_prefix() . '/index/usradm-applications-action\'; return false"';
if ($form->invalid($cgi)) {
$form->setValues($cgi);
echo $form->show();
} else {
$vals = $form->getValues();
foreach ($vals as $k => $v) {
if ($k == 'appname' || $k == 'submit_button') {
continue;
}
if (isset($v)) {
$settings[$k]['value'] = $v;
}
}
loader_import('saf.File');
if (!file_overwrite(getcwd() . '/inc/app/' . $parameters['appname'] . '/conf/settings.ini.php', ini_write($settings))) {
die('Error writing to file: inc/app/' . $parameters['appname'] . '/conf/settings.ini.php');
}
echo '<p>' . intl_get('Application settings saved.') . ' <a href="' . site_prefix() . '/index/usradm-applications-action">' . intl_get('Continue') . '</a></p>';
}
示例3: editable
function editable($path, $types = array(), $template = '', $remember = array())
{
global $loader, $cgi, $intl;
$loader->import('saf.MailForm');
$form = new MailForm();
if (!empty($template)) {
$form->template = $template;
}
$res = $this->doc->query($path);
$res = array_shift($res);
if (!is_object($res)) {
$this->error = $this->doc->error;
return false;
}
$row = $res->makeObj();
foreach (get_object_vars($row) as $key => $value) {
if ($key == 'attrs') {
continue;
}
if (isset($types[$key])) {
$type = $types[$key];
} else {
$type = 'text';
}
$w =& $form->addWidget($type, $key);
$w->setValue($value);
}
foreach ($remember as $rem) {
$w =& $form->addWidget('hidden', $rem);
$w->setValue($cgi->{$rem});
}
$w =& $form->addWidget('msubmit', 'submit_button');
$b =& $w->getButton();
$b->setValues($intl->get('Update'));
$b =& $w->addButton('submit_button', $intl->get('Cancel'));
$b->extra = "onclick='window.history.go (-1); return false'";
if ($form->invalid($cgi)) {
$form->setValues($cgi);
return $form->show();
} else {
$form->setValues($cgi);
$vals = $form->getValues();
return $vals;
}
}