Merge "Always set a title on images when provided"
[lhc/web/wiklou.git] / includes / skins / BaseTemplate.php
1 <?php
2 /**
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 * http://www.gnu.org/copyleft/gpl.html
17 *
18 * @file
19 */
20
21 /**
22 * New base template for a skin's template extended from QuickTemplate
23 * this class features helper methods that provide common ways of interacting
24 * with the data stored in the QuickTemplate
25 */
26 abstract class BaseTemplate extends QuickTemplate {
27
28 /**
29 * Get a Message object with its context set
30 *
31 * @param string $name Message name
32 * @return Message
33 */
34 public function getMsg( $name ) {
35 return $this->getSkin()->msg( $name );
36 }
37
38 function msg( $str ) {
39 echo $this->getMsg( $str )->escaped();
40 }
41
42 function msgHtml( $str ) {
43 echo $this->getMsg( $str )->text();
44 }
45
46 function msgWiki( $str ) {
47 echo $this->getMsg( $str )->parseAsBlock();
48 }
49
50 /**
51 * Create an array of common toolbox items from the data in the quicktemplate
52 * stored by SkinTemplate.
53 * The resulting array is built according to a format intended to be passed
54 * through makeListItem to generate the html.
55 * @return array
56 */
57 function getToolbox() {
58 wfProfileIn( __METHOD__ );
59
60 $toolbox = array();
61 if ( isset( $this->data['nav_urls']['whatlinkshere'] )
62 && $this->data['nav_urls']['whatlinkshere']
63 ) {
64 $toolbox['whatlinkshere'] = $this->data['nav_urls']['whatlinkshere'];
65 $toolbox['whatlinkshere']['id'] = 't-whatlinkshere';
66 }
67 if ( isset( $this->data['nav_urls']['recentchangeslinked'] )
68 && $this->data['nav_urls']['recentchangeslinked']
69 ) {
70 $toolbox['recentchangeslinked'] = $this->data['nav_urls']['recentchangeslinked'];
71 $toolbox['recentchangeslinked']['msg'] = 'recentchangeslinked-toolbox';
72 $toolbox['recentchangeslinked']['id'] = 't-recentchangeslinked';
73 }
74 if ( isset( $this->data['feeds'] ) && $this->data['feeds'] ) {
75 $toolbox['feeds']['id'] = 'feedlinks';
76 $toolbox['feeds']['links'] = array();
77 foreach ( $this->data['feeds'] as $key => $feed ) {
78 $toolbox['feeds']['links'][$key] = $feed;
79 $toolbox['feeds']['links'][$key]['id'] = "feed-$key";
80 $toolbox['feeds']['links'][$key]['rel'] = 'alternate';
81 $toolbox['feeds']['links'][$key]['type'] = "application/{$key}+xml";
82 $toolbox['feeds']['links'][$key]['class'] = 'feedlink';
83 }
84 }
85 foreach ( array( 'contributions', 'log', 'blockip', 'emailuser',
86 'userrights', 'upload', 'specialpages' ) as $special
87 ) {
88 if ( isset( $this->data['nav_urls'][$special] ) && $this->data['nav_urls'][$special] ) {
89 $toolbox[$special] = $this->data['nav_urls'][$special];
90 $toolbox[$special]['id'] = "t-$special";
91 }
92 }
93 if ( isset( $this->data['nav_urls']['print'] ) && $this->data['nav_urls']['print'] ) {
94 $toolbox['print'] = $this->data['nav_urls']['print'];
95 $toolbox['print']['id'] = 't-print';
96 $toolbox['print']['rel'] = 'alternate';
97 $toolbox['print']['msg'] = 'printableversion';
98 }
99 if ( isset( $this->data['nav_urls']['permalink'] ) && $this->data['nav_urls']['permalink'] ) {
100 $toolbox['permalink'] = $this->data['nav_urls']['permalink'];
101 if ( $toolbox['permalink']['href'] === '' ) {
102 unset( $toolbox['permalink']['href'] );
103 $toolbox['ispermalink']['tooltiponly'] = true;
104 $toolbox['ispermalink']['id'] = 't-ispermalink';
105 $toolbox['ispermalink']['msg'] = 'permalink';
106 } else {
107 $toolbox['permalink']['id'] = 't-permalink';
108 }
109 }
110 if ( isset( $this->data['nav_urls']['info'] ) && $this->data['nav_urls']['info'] ) {
111 $toolbox['info'] = $this->data['nav_urls']['info'];
112 $toolbox['info']['id'] = 't-info';
113 }
114
115 Hooks::run( 'BaseTemplateToolbox', array( &$this, &$toolbox ) );
116 wfProfileOut( __METHOD__ );
117 return $toolbox;
118 }
119
120 /**
121 * Create an array of personal tools items from the data in the quicktemplate
122 * stored by SkinTemplate.
123 * The resulting array is built according to a format intended to be passed
124 * through makeListItem to generate the html.
125 * This is in reality the same list as already stored in personal_urls
126 * however it is reformatted so that you can just pass the individual items
127 * to makeListItem instead of hardcoding the element creation boilerplate.
128 * @return array
129 */
130 function getPersonalTools() {
131 $personal_tools = array();
132 foreach ( $this->get( 'personal_urls' ) as $key => $plink ) {
133 # The class on a personal_urls item is meant to go on the <a> instead
134 # of the <li> so we have to use a single item "links" array instead
135 # of using most of the personal_url's keys directly.
136 $ptool = array(
137 'links' => array(
138 array( 'single-id' => "pt-$key" ),
139 ),
140 'id' => "pt-$key",
141 );
142 if ( isset( $plink['active'] ) ) {
143 $ptool['active'] = $plink['active'];
144 }
145 foreach ( array( 'href', 'class', 'text', 'dir' ) as $k ) {
146 if ( isset( $plink[$k] ) ) {
147 $ptool['links'][0][$k] = $plink[$k];
148 }
149 }
150 $personal_tools[$key] = $ptool;
151 }
152 return $personal_tools;
153 }
154
155 function getSidebar( $options = array() ) {
156 // Force the rendering of the following portals
157 $sidebar = $this->data['sidebar'];
158 if ( !isset( $sidebar['SEARCH'] ) ) {
159 $sidebar['SEARCH'] = true;
160 }
161 if ( !isset( $sidebar['TOOLBOX'] ) ) {
162 $sidebar['TOOLBOX'] = true;
163 }
164 if ( !isset( $sidebar['LANGUAGES'] ) ) {
165 $sidebar['LANGUAGES'] = true;
166 }
167
168 if ( !isset( $options['search'] ) || $options['search'] !== true ) {
169 unset( $sidebar['SEARCH'] );
170 }
171 if ( isset( $options['toolbox'] ) && $options['toolbox'] === false ) {
172 unset( $sidebar['TOOLBOX'] );
173 }
174 if ( isset( $options['languages'] ) && $options['languages'] === false ) {
175 unset( $sidebar['LANGUAGES'] );
176 }
177
178 $boxes = array();
179 foreach ( $sidebar as $boxName => $content ) {
180 if ( $content === false ) {
181 continue;
182 }
183 switch ( $boxName ) {
184 case 'SEARCH':
185 // Search is a special case, skins should custom implement this
186 $boxes[$boxName] = array(
187 'id' => 'p-search',
188 'header' => $this->getMsg( 'search' )->text(),
189 'generated' => false,
190 'content' => true,
191 );
192 break;
193 case 'TOOLBOX':
194 $msgObj = $this->getMsg( 'toolbox' );
195 $boxes[$boxName] = array(
196 'id' => 'p-tb',
197 'header' => $msgObj->exists() ? $msgObj->text() : 'toolbox',
198 'generated' => false,
199 'content' => $this->getToolbox(),
200 );
201 break;
202 case 'LANGUAGES':
203 if ( $this->data['language_urls'] ) {
204 $msgObj = $this->getMsg( 'otherlanguages' );
205 $boxes[$boxName] = array(
206 'id' => 'p-lang',
207 'header' => $msgObj->exists() ? $msgObj->text() : 'otherlanguages',
208 'generated' => false,
209 'content' => $this->data['language_urls'],
210 );
211 }
212 break;
213 default:
214 $msgObj = $this->getMsg( $boxName );
215 $boxes[$boxName] = array(
216 'id' => "p-$boxName",
217 'header' => $msgObj->exists() ? $msgObj->text() : $boxName,
218 'generated' => true,
219 'content' => $content,
220 );
221 break;
222 }
223 }
224
225 // HACK: Compatibility with extensions still using SkinTemplateToolboxEnd
226 $hookContents = null;
227 if ( isset( $boxes['TOOLBOX'] ) ) {
228 ob_start();
229 // We pass an extra 'true' at the end so extensions using BaseTemplateToolbox
230 // can abort and avoid outputting double toolbox links
231 Hooks::run( 'SkinTemplateToolboxEnd', array( &$this, true ) );
232 $hookContents = ob_get_contents();
233 ob_end_clean();
234 if ( !trim( $hookContents ) ) {
235 $hookContents = null;
236 }
237 }
238 // END hack
239
240 if ( isset( $options['htmlOnly'] ) && $options['htmlOnly'] === true ) {
241 foreach ( $boxes as $boxName => $box ) {
242 if ( is_array( $box['content'] ) ) {
243 $content = '<ul>';
244 foreach ( $box['content'] as $key => $val ) {
245 $content .= "\n " . $this->makeListItem( $key, $val );
246 }
247 // HACK, shove the toolbox end onto the toolbox if we're rendering itself
248 if ( $hookContents ) {
249 $content .= "\n $hookContents";
250 }
251 // END hack
252 $content .= "\n</ul>\n";
253 $boxes[$boxName]['content'] = $content;
254 }
255 }
256 } else {
257 if ( $hookContents ) {
258 $boxes['TOOLBOXEND'] = array(
259 'id' => 'p-toolboxend',
260 'header' => $boxes['TOOLBOX']['header'],
261 'generated' => false,
262 'content' => "<ul>{$hookContents}</ul>",
263 );
264 // HACK: Make sure that TOOLBOXEND is sorted next to TOOLBOX
265 $boxes2 = array();
266 foreach ( $boxes as $key => $box ) {
267 if ( $key === 'TOOLBOXEND' ) {
268 continue;
269 }
270 $boxes2[$key] = $box;
271 if ( $key === 'TOOLBOX' ) {
272 $boxes2['TOOLBOXEND'] = $boxes['TOOLBOXEND'];
273 }
274 }
275 $boxes = $boxes2;
276 // END hack
277 }
278 }
279
280 return $boxes;
281 }
282
283 /**
284 * @param string $name
285 */
286 protected function renderAfterPortlet( $name ) {
287 $content = '';
288 Hooks::run( 'BaseTemplateAfterPortlet', array( $this, $name, &$content ) );
289
290 if ( $content !== '' ) {
291 echo "<div class='after-portlet after-portlet-$name'>$content</div>";
292 }
293
294 }
295
296 /**
297 * Makes a link, usually used by makeListItem to generate a link for an item
298 * in a list used in navigation lists, portlets, portals, sidebars, etc...
299 *
300 * @param string $key Usually a key from the list you are generating this
301 * link from.
302 * @param array $item Contains some of a specific set of keys.
303 *
304 * The text of the link will be generated either from the contents of the
305 * "text" key in the $item array, if a "msg" key is present a message by
306 * that name will be used, and if neither of those are set the $key will be
307 * used as a message name.
308 *
309 * If a "href" key is not present makeLink will just output htmlescaped text.
310 * The "href", "id", "class", "rel", and "type" keys are used as attributes
311 * for the link if present.
312 *
313 * If an "id" or "single-id" (if you don't want the actual id to be output
314 * on the link) is present it will be used to generate a tooltip and
315 * accesskey for the link.
316 *
317 * The keys "context" and "primary" are ignored; these keys are used
318 * internally by skins and are not supposed to be included in the HTML
319 * output.
320 *
321 * If you don't want an accesskey, set $item['tooltiponly'] = true;
322 *
323 * @param array $options Can be used to affect the output of a link.
324 * Possible options are:
325 * - 'text-wrapper' key to specify a list of elements to wrap the text of
326 * a link in. This should be an array of arrays containing a 'tag' and
327 * optionally an 'attributes' key. If you only have one element you don't
328 * need to wrap it in another array. eg: To use <a><span>...</span></a>
329 * in all links use array( 'text-wrapper' => array( 'tag' => 'span' ) )
330 * for your options.
331 * - 'link-class' key can be used to specify additional classes to apply
332 * to all links.
333 * - 'link-fallback' can be used to specify a tag to use instead of "<a>"
334 * if there is no link. eg: If you specify 'link-fallback' => 'span' than
335 * any non-link will output a "<span>" instead of just text.
336 *
337 * @return string
338 */
339 function makeLink( $key, $item, $options = array() ) {
340 if ( isset( $item['text'] ) ) {
341 $text = $item['text'];
342 } else {
343 $text = $this->translator->translate( isset( $item['msg'] ) ? $item['msg'] : $key );
344 }
345
346 $html = htmlspecialchars( $text );
347
348 if ( isset( $options['text-wrapper'] ) ) {
349 $wrapper = $options['text-wrapper'];
350 if ( isset( $wrapper['tag'] ) ) {
351 $wrapper = array( $wrapper );
352 }
353 while ( count( $wrapper ) > 0 ) {
354 $element = array_pop( $wrapper );
355 $html = Html::rawElement( $element['tag'], isset( $element['attributes'] )
356 ? $element['attributes']
357 : null, $html );
358 }
359 }
360
361 if ( isset( $item['href'] ) || isset( $options['link-fallback'] ) ) {
362 $attrs = $item;
363 foreach ( array( 'single-id', 'text', 'msg', 'tooltiponly', 'context', 'primary' ) as $k ) {
364 unset( $attrs[$k] );
365 }
366
367 if ( isset( $item['id'] ) && !isset( $item['single-id'] ) ) {
368 $item['single-id'] = $item['id'];
369 }
370 if ( isset( $item['single-id'] ) ) {
371 if ( isset( $item['tooltiponly'] ) && $item['tooltiponly'] ) {
372 $title = Linker::titleAttrib( $item['single-id'] );
373 if ( $title !== false ) {
374 $attrs['title'] = $title;
375 }
376 } else {
377 $tip = Linker::tooltipAndAccesskeyAttribs( $item['single-id'] );
378 if ( isset( $tip['title'] ) && $tip['title'] !== false ) {
379 $attrs['title'] = $tip['title'];
380 }
381 if ( isset( $tip['accesskey'] ) && $tip['accesskey'] !== false ) {
382 $attrs['accesskey'] = $tip['accesskey'];
383 }
384 }
385 }
386 if ( isset( $options['link-class'] ) ) {
387 if ( isset( $attrs['class'] ) ) {
388 $attrs['class'] .= " {$options['link-class']}";
389 } else {
390 $attrs['class'] = $options['link-class'];
391 }
392 }
393 $html = Html::rawElement( isset( $attrs['href'] )
394 ? 'a'
395 : $options['link-fallback'], $attrs, $html );
396 }
397
398 return $html;
399 }
400
401 /**
402 * Generates a list item for a navigation, portlet, portal, sidebar... list
403 *
404 * @param string $key Usually a key from the list you are generating this link from.
405 * @param array $item Array of list item data containing some of a specific set of keys.
406 * The "id", "class" and "itemtitle" keys will be used as attributes for the list item,
407 * if "active" contains a value of true a "active" class will also be appended to class.
408 *
409 * @param array $options
410 *
411 * If you want something other than a "<li>" you can pass a tag name such as
412 * "tag" => "span" in the $options array to change the tag used.
413 * link/content data for the list item may come in one of two forms
414 * A "links" key may be used, in which case it should contain an array with
415 * a list of links to include inside the list item, see makeLink for the
416 * format of individual links array items.
417 *
418 * Otherwise the relevant keys from the list item $item array will be passed
419 * to makeLink instead. Note however that "id" and "class" are used by the
420 * list item directly so they will not be passed to makeLink
421 * (however the link will still support a tooltip and accesskey from it)
422 * If you need an id or class on a single link you should include a "links"
423 * array with just one link item inside of it. If you want to add a title
424 * to the list item itself, you can set "itemtitle" to the value.
425 * $options is also passed on to makeLink calls
426 *
427 * @return string
428 */
429 function makeListItem( $key, $item, $options = array() ) {
430 if ( isset( $item['links'] ) ) {
431 $links = array();
432 foreach ( $item['links'] as $linkKey => $link ) {
433 $links[] = $this->makeLink( $linkKey, $link, $options );
434 }
435 $html = implode( ' ', $links );
436 } else {
437 $link = $item;
438 // These keys are used by makeListItem and shouldn't be passed on to the link
439 foreach ( array( 'id', 'class', 'active', 'tag', 'itemtitle' ) as $k ) {
440 unset( $link[$k] );
441 }
442 if ( isset( $item['id'] ) && !isset( $item['single-id'] ) ) {
443 // The id goes on the <li> not on the <a> for single links
444 // but makeSidebarLink still needs to know what id to use when
445 // generating tooltips and accesskeys.
446 $link['single-id'] = $item['id'];
447 }
448 $html = $this->makeLink( $key, $link, $options );
449 }
450
451 $attrs = array();
452 foreach ( array( 'id', 'class' ) as $attr ) {
453 if ( isset( $item[$attr] ) ) {
454 $attrs[$attr] = $item[$attr];
455 }
456 }
457 if ( isset( $item['active'] ) && $item['active'] ) {
458 if ( !isset( $attrs['class'] ) ) {
459 $attrs['class'] = '';
460 }
461 $attrs['class'] .= ' active';
462 $attrs['class'] = trim( $attrs['class'] );
463 }
464 if ( isset( $item['itemtitle'] ) ) {
465 $attrs['title'] = $item['itemtitle'];
466 }
467 return Html::rawElement( isset( $options['tag'] ) ? $options['tag'] : 'li', $attrs, $html );
468 }
469
470 function makeSearchInput( $attrs = array() ) {
471 $realAttrs = array(
472 'type' => 'search',
473 'name' => 'search',
474 'placeholder' => wfMessage( 'searchsuggest-search' )->text(),
475 'value' => $this->get( 'search', '' ),
476 );
477 $realAttrs = array_merge( $realAttrs, Linker::tooltipAndAccesskeyAttribs( 'search' ), $attrs );
478 return Html::element( 'input', $realAttrs );
479 }
480
481 function makeSearchButton( $mode, $attrs = array() ) {
482 switch ( $mode ) {
483 case 'go':
484 case 'fulltext':
485 $realAttrs = array(
486 'type' => 'submit',
487 'name' => $mode,
488 'value' => $this->translator->translate(
489 $mode == 'go' ? 'searcharticle' : 'searchbutton' ),
490 );
491 $realAttrs = array_merge(
492 $realAttrs,
493 Linker::tooltipAndAccesskeyAttribs( "search-$mode" ),
494 $attrs
495 );
496 return Html::element( 'input', $realAttrs );
497 case 'image':
498 $buttonAttrs = array(
499 'type' => 'submit',
500 'name' => 'button',
501 );
502 $buttonAttrs = array_merge(
503 $buttonAttrs,
504 Linker::tooltipAndAccesskeyAttribs( 'search-fulltext' ),
505 $attrs
506 );
507 unset( $buttonAttrs['src'] );
508 unset( $buttonAttrs['alt'] );
509 unset( $buttonAttrs['width'] );
510 unset( $buttonAttrs['height'] );
511 $imgAttrs = array(
512 'src' => $attrs['src'],
513 'alt' => isset( $attrs['alt'] )
514 ? $attrs['alt']
515 : $this->translator->translate( 'searchbutton' ),
516 'width' => isset( $attrs['width'] ) ? $attrs['width'] : null,
517 'height' => isset( $attrs['height'] ) ? $attrs['height'] : null,
518 );
519 return Html::rawElement( 'button', $buttonAttrs, Html::element( 'img', $imgAttrs ) );
520 default:
521 throw new MWException( 'Unknown mode passed to BaseTemplate::makeSearchButton' );
522 }
523 }
524
525 /**
526 * Returns an array of footerlinks trimmed down to only those footer links that
527 * are valid.
528 * If you pass "flat" as an option then the returned array will be a flat array
529 * of footer icons instead of a key/value array of footerlinks arrays broken
530 * up into categories.
531 * @param string $option
532 * @return array|mixed
533 */
534 function getFooterLinks( $option = null ) {
535 $footerlinks = $this->get( 'footerlinks' );
536
537 // Reduce footer links down to only those which are being used
538 $validFooterLinks = array();
539 foreach ( $footerlinks as $category => $links ) {
540 $validFooterLinks[$category] = array();
541 foreach ( $links as $link ) {
542 if ( isset( $this->data[$link] ) && $this->data[$link] ) {
543 $validFooterLinks[$category][] = $link;
544 }
545 }
546 if ( count( $validFooterLinks[$category] ) <= 0 ) {
547 unset( $validFooterLinks[$category] );
548 }
549 }
550
551 if ( $option == 'flat' ) {
552 // fold footerlinks into a single array using a bit of trickery
553 $validFooterLinks = call_user_func_array(
554 'array_merge',
555 array_values( $validFooterLinks )
556 );
557 }
558
559 return $validFooterLinks;
560 }
561
562 /**
563 * Returns an array of footer icons filtered down by options relevant to how
564 * the skin wishes to display them.
565 * If you pass "icononly" as the option all footer icons which do not have an
566 * image icon set will be filtered out.
567 * If you pass "nocopyright" then MediaWiki's copyright icon will not be included
568 * in the list of footer icons. This is mostly useful for skins which only
569 * display the text from footericons instead of the images and don't want a
570 * duplicate copyright statement because footerlinks already rendered one.
571 * @param string $option
572 * @return string
573 */
574 function getFooterIcons( $option = null ) {
575 // Generate additional footer icons
576 $footericons = $this->get( 'footericons' );
577
578 if ( $option == 'icononly' ) {
579 // Unset any icons which don't have an image
580 foreach ( $footericons as &$footerIconsBlock ) {
581 foreach ( $footerIconsBlock as $footerIconKey => $footerIcon ) {
582 if ( !is_string( $footerIcon ) && !isset( $footerIcon['src'] ) ) {
583 unset( $footerIconsBlock[$footerIconKey] );
584 }
585 }
586 }
587 // Redo removal of any empty blocks
588 foreach ( $footericons as $footerIconsKey => &$footerIconsBlock ) {
589 if ( count( $footerIconsBlock ) <= 0 ) {
590 unset( $footericons[$footerIconsKey] );
591 }
592 }
593 } elseif ( $option == 'nocopyright' ) {
594 unset( $footericons['copyright']['copyright'] );
595 if ( count( $footericons['copyright'] ) <= 0 ) {
596 unset( $footericons['copyright'] );
597 }
598 }
599
600 return $footericons;
601 }
602
603 /**
604 * Get the suggested HTML for page status indicators: icons (or short text snippets) usually
605 * displayed in the top-right corner of the page, outside of the main content.
606 *
607 * Your skin may implement this differently, for example by handling some indicator names
608 * specially with a different UI. However, it is recommended to use a `<div class="mw-indicator"
609 * id="mw-indicator-<id>" />` as a wrapper element for each indicator, for better compatibility
610 * with extensions and user scripts.
611 *
612 * The raw data is available in `$this->data['indicators']` as an associative array (keys:
613 * identifiers, values: contents) internally ordered by keys.
614 *
615 * @return string HTML
616 * @since 1.25
617 */
618 public function getIndicators() {
619 $out = "<div class=\"mw-indicators\">\n";
620 foreach ( $this->data['indicators'] as $id => $content ) {
621 $out .= Html::rawElement(
622 'div',
623 array(
624 'id' => Sanitizer::escapeId( "mw-indicator-$id" ),
625 'class' => 'mw-indicator',
626 ),
627 $content
628 ) . "\n";
629 }
630 $out .= "</div>\n";
631 return $out;
632 }
633
634 /**
635 * Output the basic end-page trail including bottomscripts, reporttime, and
636 * debug stuff. This should be called right before outputting the closing
637 * body and html tags.
638 */
639 function printTrail() { ?>
640 <?php echo MWDebug::getDebugHTML( $this->getSkin()->getContext() ); ?>
641 <?php $this->html( 'bottomscripts' ); /* JS call to runBodyOnloadHook */ ?>
642 <?php $this->html( 'reporttime' ) ?>
643 <?php
644 }
645 }