本文整理汇总了PHP中tform_actions::onShow方法的典型用法代码示例。如果您正苦于以下问题:PHP tform_actions::onShow方法的具体用法?PHP tform_actions::onShow怎么用?PHP tform_actions::onShow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tform_actions
的用法示例。
在下文中一共展示了tform_actions::onShow方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onShow
function onShow()
{
global $app;
// Translate the items, very bad trick... :( because the language file is not loaded yet when the form file gets parsed
foreach ($app->tform->formDef["tabs"]['remote_user']['fields']['remote_functions']['value'] as $key => $val) {
$app->tform->formDef["tabs"]['remote_user']['fields']['remote_functions']['value'][$key] = $app->tform->lng($val) . '<br>';
}
parent::onShow();
}
示例2: onShow
function onShow()
{
global $app;
//* Reset the page number of the list form for the dns
//* records to 0 if we are on the first tab of the soa form.
if ($app->tform->getNextTab() == 'dns_soa') {
$_SESSION['search']['dns_a']['page'] = 0;
}
parent::onShow();
}
示例3: onShow
function onShow()
{
global $app, $conf;
//* We do not want that messages get edited, so we switch to a
//* read only template if a existing message is loaded
if ($this->id > 0) {
$app->tform->formDef['tabs']['message']['template'] = 'templates/support_message_view.htm';
}
//* call the onShow function of the parent class
parent::onShow();
}
示例4: onShow
function onShow()
{
global $app, $conf;
//* We do not want that messages get edited, so we switch to a
//* read only template if a existing message is loaded
if ($this->id > 0) {
$app->tform->formDef['tabs']['message']['template'] = 'templates/support_message_view.htm';
$record = $app->db->queryOneRecord("SELECT * FROM support_message WHERE support_message_id = " . $this->id);
if ($record['tstamp'] > 0) {
// is value int?
if (preg_match("/^[0-9]+[\\.]?[0-9]*\$/", $record['tstamp'], $p)) {
$record['tstamp'] = date($app->lng('conf_format_datetime'), $record['tstamp']);
} else {
$record['tstamp'] = date($app->lng('conf_format_datetime'), strtotime($record['tstamp']));
}
}
$app->tpl->setVar("date", $record['tstamp']);
//die(print_r($this->dataRecord));
}
//* call the onShow function of the parent class
parent::onShow();
}
示例5: onShow
function onShow()
{
global $app;
$this->id = $app->functions->intval($_SESSION['s']['user']['mailuser_id']);
parent::onShow();
}
示例6: onShow
function onShow()
{
$this->id = $_SESSION['s']['user']['mailuser_id'];
parent::onShow();
}
示例7: onAfterUpdate
function onAfterUpdate()
{
if ($this->_theme_changed == true) {
// not the best way, but it works
header('Content-Type: text/html');
print '<script type="text/javascript">document.location.reload();</script>';
exit;
} else {
parent::onShow();
}
}