gehe zur Dokumentation dieser Datei
52 $table_attr =
'border="1"';
56 $cols = $cols_count = 3;
65 if (!isset($params[
'loop'])) {
66 trigger_error(
"html_table: missing 'loop' parameter", E_USER_WARNING);
71 foreach ($params as $_key => $_value) {
74 $$_key = (array) $_value;
78 if (is_array($_value) && !empty($_value)) {
80 $cols_count = count($_value);
81 } elseif (!is_numeric($_value) && is_string($_value) && !empty($_value)) {
82 $cols = explode(
',', $_value);
83 $cols_count = count($cols);
84 } elseif (!empty($_value)) {
85 $cols_count = (int) $_value;
92 $$_key = (int) $_value;
101 $$_key = (string) $_value;
112 $loop_count = count($loop);
113 if (empty($params[
'rows'])) {
115 $rows = ceil($loop_count / $cols_count);
116 } elseif (empty($params[
'cols'])) {
117 if (!empty($params[
'rows'])) {
119 $cols_count = ceil($loop_count / $rows);
123 $output =
"<table $table_attr>\n";
125 if (!empty($caption)) {
126 $output .=
'<caption>' . $caption .
"</caption>\n";
129 if (is_array($cols)) {
130 $cols = ($hdir ==
'right') ? $cols : array_reverse($cols);
131 $output .=
"<thead><tr>\n";
133 for ($r = 0; $r < $cols_count; $r ++) {
135 $output .= $cols[$r];
136 $output .=
"</th>\n";
138 $output .=
"</tr></thead>\n";
141 $output .=
"<tbody>\n";
142 for ($r = 0; $r < $rows; $r ++) {
144 $rx = ($vdir ==
'down') ? $r * $cols_count : ($rows - 1 - $r) * $cols_count;
146 for ($c = 0; $c < $cols_count; $c ++) {
147 $x = ($hdir ==
'right') ? $rx + $c : $rx + $cols_count - 1 - $c;
148 if ($inner !=
'cols') {
150 $x = floor($x / $cols_count) + ($x % $cols_count) * $rows;
153 if ($x < $loop_count) {
159 $output .=
"</tr>\n";
161 $output .=
"</tbody>\n";
162 $output .=
"</table>\n";
169 if (!is_array($var)) {
172 $ret = $var[$no % count($var)];
175 return ($ret) ?
' ' . $ret :
'';
Sie sind hier: Home » MyOOS Benutzerhandbuch » Smarty
Korrekturen, Hinweise und Ergänzungen
Bitte scheuen Sie sich nicht und melden Sie, was auf dieser Seite sachlich falsch oder irreführend ist, was ergänzt werden sollte, was fehlt usw. Dazu bitte oben aus dem Menü Seite den Eintrag
Support Forum wählen. Es ist eine kostenlose Anmeldung erforderlich, um Anmerkungen zu posten. Unpassende Postings, Spam usw. werden kommentarlos entfernt.