本文整理汇总了PHP中Report::html方法的典型用法代码示例。如果您正苦于以下问题:PHP Report::html方法的具体用法?PHP Report::html怎么用?PHP Report::html使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Report
的用法示例。
在下文中一共展示了Report::html方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: action_run
protected function action_run()
{
$stmt = $this->db->query('select * from query
where query_id = :query_id', array('query_id' => $_POST['query_id']));
if ($row = $stmt->fetch()) {
if (stripos($row['query'], 'file ') === 0) {
$this->transfer(substr($row['query'], 5), array('dest' => $_POST['dest']));
} else {
$stmt2 = $this->db->query($row['query']);
$r = new Report();
if ($_POST['dest'] == 'screen') {
$r->html($row['title'], $stmt2);
} else {
if ($_POST['dest'] == 'pdf') {
$r->pdf($row['title'], $stmt2);
} else {
if ($_POST['dest'] == 'csv') {
$r->csv($stmt2);
}
}
}
}
} else {
$this->message('Query not found');
}
}
示例2: action_report
protected function action_report()
{
$stmt = $this->db->query('select name,
count(specialty_id) as count
from member
join specialty using (specialty_id)
group by specialty_id order by name');
if ($stmt->rowCount() == 0) {
$this->message('No records found', true);
} else {
$r = new Report();
if ($_POST['dest'] == 'screen') {
$r->html('Speciaties', $stmt);
} else {
if ($_POST['dest'] == 'pdf') {
$r->pdf('Speciaties', $stmt);
}
}
}
}
示例3: action_report
protected function action_report()
{
$hdgs = array('Number', 'Date', 'Start', 'Stop', 'Title');
$ttl = "{$_POST['year']} Panels";
$stmt = $this->db->query('select number, date_held,
time_start, time_stop, title from panelcwa
where year = :year order by number', array('year' => $_POST['year']));
if ($stmt->rowCount() == 0) {
$this->message('No records found', true);
} else {
$r = new Report();
if ($_POST['dest'] == 'screen') {
$r->html($ttl, $stmt, $hdgs);
} else {
if ($_POST['dest'] == 'pdf') {
$r->pdf($ttl, $stmt, array(50, 50, 50, 50), $hdgs);
} else {
if ($_POST['dest'] == 'csv') {
$r->csv($stmt);
}
}
}
}
}
示例4: run
protected function run($title, $sql)
{
echo '<div class=run>';
$stmt = $this->db->query($sql);
$r = new Report();
$r->html($title, $stmt);
echo '</div>';
}