Esempio n. 1
0
<?php

if (isset($this->title)) {
    ?>

	  <?php 
    wtk_txt_data($this->title, $_indent, $_width);
    $title = $this->title->render();
    if ($level == 1) {
        echo "\n";
        $title = wtk_txt_center(mb_strtoupper($title), $_width) . "\n";
    } else {
        $title = $_indent . ' ' . $title;
    }
    echo $title;
    ?>


<?php 
}
wtk_txt_children_data($this, $_indent, $_width);
$this->outputChildren();
echo "\n";
Esempio n. 2
0
ob_start();
if ($show_header) {
    $cells = array();
    $j = 0;
    foreach ($columns as $col) {
        $cells[] = wtk_txt_center($col->getTitle(), $largeurs[$j], true);
        $j++;
    }
    echo $_indent . implode(' | ', $cells) . "\n";
    echo $_indent . wtk_txt_pad('', array_sum($largeurs) + 3 * (count($largeurs) - 1), '—') . "\n";
}
for ($i = 0; $i < $rows; $i++) {
    $cells = array();
    for ($j = 0; $j < $cols; $j++) {
        $id = 'cell-' . $i . '-' . $j;
        wtk_txt_data($this->{$id}, '', $largeurs[$j]);
        $td = $this->{$id}->render();
        $cells[] = explode("\n", $td);
    }
    for ($k = 0; $k < $hauteurs[$i]; $k++) {
        $cs = array();
        for ($j = 0; $j < $cols; $j++) {
            $td = isset($cells[$j][$k]) ? $cells[$j][$k] : "";
            $cs[] = wtk_txt_pad($td, $largeurs[$j]);
        }
        echo $_indent . implode(' | ', $cs) . "\n";
    }
}
$table = ob_get_contents();
ob_end_clean();
echo wtk_txt_center($table, $_width);
Esempio n. 3
0
<?php

foreach ($this as $child) {
    wtk_txt_data($child, $_indent, $_width);
    $child->output();
}
Esempio n. 4
0
function wtk_txt_children_data($parent, $indent, $width)
{
    foreach ($parent as $child) {
        wtk_txt_data($child, $indent, $width);
    }
}
Esempio n. 5
0
<?php

$creation = $metas->creation;
$year = date('Y');
wtk_txt_data($this->content, '', 72);
$this->content->output();