* use images from style dir
[lhc/web/wiklou.git] / includes / SkinPHPTal.php
1 <?php
2 # Generic PHPTal (http://phptal.sourceforge.net/) skin
3 # Based on Brion's smarty skin
4 # Copyright (C) Gabriel Wicke -- http://www.aulinx.de/
5 #
6 # Todo: Needs some serious refactoring into functions that correspond
7 # to the computations individual esi snippets need. Most importantly no body
8 # parsing for most of those of course.
9 #
10 # Set this in LocalSettings to enable phptal:
11 # set_include_path(get_include_path() . ":" . $IP.'/PHPTAL-NP-0.7.0/libs');
12 # $wgUsePHPTal = true;
13 #
14 # This program is free software; you can redistribute it and/or modify
15 # it under the terms of the GNU General Public License as published by
16 # the Free Software Foundation; either version 2 of the License, or
17 # (at your option) any later version.
18 #
19 # This program is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU General Public License for more details.
23 #
24 # You should have received a copy of the GNU General Public License along
25 # with this program; if not, write to the Free Software Foundation, Inc.,
26 # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 # http://www.gnu.org/copyleft/gpl.html
28
29 require_once "PHPTAL.php";
30
31 class MediaWiki_I18N extends PHPTAL_I18N
32 {
33 var $_context = array();
34
35 function set($varName, $value)
36 {
37 $this->_context[$varName] = $value;
38 }
39
40 function translate($value)
41 {
42 $value = wfMsg( $value );
43
44 // interpolate variables
45 while (preg_match('/\$([0-9]*?)/sm', $value, $m)) {
46 list($src, $var) = $m;
47 $varValue = $this->_context[$var];
48 $value = str_replace($src, $varValue, $value);
49 }
50 return $value;
51 }
52 }
53
54 class SkinPHPTal extends Skin {
55 var $template;
56
57 function initPage( &$out ) {
58 parent::initPage( $out );
59 $this->skinname = "davinci";
60 $this->template = "xhtml_slim";
61 }
62
63 function outputPage( &$out ) {
64 global $wgTitle, $wgArticle, $wgUser, $wgLang, $wgOut;
65 global $wgScript, $wgStylePath, $wgLanguageCode, $wgUseNewInterlanguage;
66 global $wgMimeType, $wgOutputEncoding, $wgUseDatabaseMessages, $wgRequest;
67 global $wgDisableCounters, $wgLogo, $action, $wgFeedClasses;
68
69 extract( $wgRequest->getValues( 'oldid', 'diff' ) );
70
71 $this->thispage = $wgTitle->getPrefixedDbKey();
72 $this->thisurl = $wgTitle->getPrefixedURL();
73 $this->thisurle = urlencode($this->thisurl);
74 $this->loggedin = $wgUser->getID() != 0;
75 $this->username = $wgUser->getName();
76 $this->userpage = $wgLang->getNsText( Namespace::getUser() ) . ":" . $wgUser->getName();
77 $this->titletxt = $wgTitle->getPrefixedText();
78
79 $this->initPage( $out );
80 $tpl = new PHPTAL($this->template . '.pt', 'templates');
81
82 #if ( $wgUseDatabaseMessages ) { // uncomment this to fall back to GetText
83 $tpl->setTranslator(new MediaWiki_I18N());
84 #}
85
86 $tpl->set( "title", $wgOut->getPageTitle() );
87 $tpl->set( "pagetitle", $wgOut->getHTMLTitle() );
88
89 $tpl->setRef( "thispage", &$this->thispage );
90 $tpl->set( "subtitle", $out->getSubtitle() );
91 $tpl->set( 'catlinks', getCategories());
92 if( $wgOut->isSyndicated() ) {
93 $feeds = array();
94 foreach( $wgFeedClasses as $format => $class ) {
95 $feeds[$format] = array(
96 'text' => $format,
97 'href' => $wgRequest->appendQuery( "feed=$format" ),
98 'ttip' => wfMsg('tooltip-'.$format)
99 );
100 }
101 $tpl->setRef( 'feeds', &$feeds );
102 }
103 $tpl->setRef( 'mimetype', &$wgMimeType );
104 $tpl->setRef( 'charset', &$wgOutputEncoding );
105 $tpl->set( 'headlinks', $out->getHeadLinks() );
106 $tpl->setRef( 'skinname', &$this->skinname );
107 $tpl->setRef( "loggedin", &$this->loggedin );
108 /* XXX currently unused, might get useful later
109 $tpl->set( "editable", ($wgTitle->getNamespace() != NS_SPECIAL ) );
110 $tpl->set( "exists", $wgTitle->getArticleID() != 0 );
111 $tpl->set( "watch", $wgTitle->userIsWatching() ? "unwatch" : "watch" );
112 $tpl->set( "protect", count($wgTitle->getRestrictions()) ? "unprotect" : "protect" );
113 $tpl->set( "helppage", wfMsg('helppage'));
114 $tpl->set( "sysop", $wgUser->isSysop() );
115 */
116 $tpl->set( "searchaction", $this->escapeSearchLink() );
117 $tpl->setRef( "stylepath", &$wgStylePath );
118 $tpl->setRef( "logopath", &$wgLogo );
119 $tpl->setRef( "lang", &$wgLanguageCode );
120 $tpl->set( "dir", $wgLang->isRTL() ? "rtl" : "ltr" );
121 $tpl->set( "rtl", $wgLang->isRTL() );
122 $tpl->set( "langname", $wgLang->getLanguageName( $wgLanguageCode ) );
123 $tpl->setRef( "username", &$this->username );
124 $tpl->setRef( "userpage", &$this->userpage);
125 if( $wgUser->getNewtalk() ) {
126 $usertitle = Title::newFromText( $this->userpage );
127 $usertalktitle = $usertitle->getTalkPage();
128 if($usertalktitle->getPrefixedDbKey() != $this->thispage){
129
130 $ntl = wfMsg( "newmessages",
131 $this->makeKnownLink(
132 $wgLang->getNsText( Namespace::getTalk( Namespace::getUser() ) )
133 . ":" . $this->username,
134 wfMsg("newmessageslink") )
135 );
136 }
137 } else {
138 $ntl = "";
139 }
140
141 $tpl->setRef( "newtalk", &$ntl );
142 $tpl->setRef( "skin", &$this);
143 $tpl->set( "logo", $this->logoText() );
144 if ( $wgOut->isArticle() and (!isset( $oldid ) or isset( $diff )) and 0 != $wgArticle->getID() ) {
145 if ( !$wgDisableCounters ) {
146 $viewcount = $wgLang->formatNum( $wgArticle->getCount() );
147 if ( $viewcount ) {
148 $tpl->set('viewcount', wfMsg( "viewcount", $viewcount ));
149 }
150 }
151 $tpl->set('lastmod', $this->lastModified());
152 $tpl->set('copyright',$this->getCopyright());
153 }
154 $tpl->set( "copyrightico", $this->getCopyrightIcon() );
155 $tpl->set( "poweredbyico", $this->getPoweredBy() );
156 $tpl->set( "disclaimer", $this->disclaimerLink() );
157 $tpl->set( "about", $this->aboutLink() );
158
159 $tpl->setRef( "debug", &$out->mDebugtext );
160 $tpl->set( "reporttime", $out->reportTime() );
161
162 $tpl->setRef( "bodytext", &$out->mBodytext );
163
164 $language_urls = array();
165 foreach( $wgOut->getLanguageLinks() as $l ) {
166 $nt = Title::newFromText( $l );
167 $language_urls[] = array('href' => $nt->getFullURL(),
168 'text' => ($wgLang->getLanguageName( $nt->getInterwiki()) != ''?$wgLang->getLanguageName( $nt->getInterwiki()) : $l),
169 'class' => $wgLang->isRTL() ? 'rtl' : 'ltr');
170 }
171 if(count($language_urls)) {
172 $tpl->setRef( 'language_urls', &$language_urls);
173 } else {
174 $tpl->set('language_urls', false);
175 }
176 $tpl->set('personal_urls', $this->buildPersonalUrls());
177 $content_actions = $this->buildContentActionUrls();
178 $tpl->setRef('content_actions', &$content_actions);
179 // XXX: attach this from javascript, same with section editing
180 if(isset($content_actions['edit']['href']) &&
181 !(isset($content_actions['edit']['class']) && $content_actions['edit']['class'] != '') &&
182 $wgUser->getOption("editondblclick") )
183 {
184 $tpl->set('body-ondblclick', 'document.location = "' .$content_actions['edit']['href'] .'";');
185 } else {
186 $tpl->set('body-ondblclick', '');
187 }
188 $tpl->set( "nav_urls", $this->buildNavUrls() );
189
190 // execute template
191 $res = $tpl->execute();
192 // result may be an error
193 if (PEAR::isError($res)) {
194 echo $res->toString(), "\n";
195 } else {
196 echo $res;
197 }
198
199 }
200
201 # build array of urls for personal toolbar
202 function buildPersonalUrls() {
203 /* set up the default links for the personal toolbar */
204 global $wgShowIPinHeader;
205 $personal_urls = array();
206 if ($this->loggedin) {
207 $personal_urls['userpage'] = array(
208 'text' => $this->username,
209 'href' => $this->makeUrl($this->userpage),
210 'ttip' => wfMsg('tooltip-userpage'),
211 'akey' => wfMsg('accesskey-userpage')
212 );
213 $personal_urls['mytalk'] = array(
214 'text' => wfMsg('mytalk'),
215 'href' => $this->makeTalkUrl($this->userpage),
216 'ttip' => wfMsg('tooltip-mytalk'),
217 'akey' => wfMsg('accesskey-mytalk')
218 );
219 $personal_urls['preferences'] = array(
220 'text' => wfMsg('preferences'),
221 'href' => $this->makeSpecialUrl('Preferences'),
222 'ttip' => wfMsg('tooltip-preferences'),
223 'akey' => wfMsg('accesskey-preferences')
224 );
225 $personal_urls['watchlist'] = array(
226 'text' => wfMsg('watchlist'),
227 'href' => $this->makeSpecialUrl('Watchlist'),
228 'ttip' => wfMsg('tooltip-watchlist'),
229 'akey' => wfMsg('accesskey-watchlist')
230 );
231 $personal_urls['mycontris'] = array(
232 'text' => wfMsg('mycontris'),
233 'href' => $this->makeSpecialUrl('Contributions','target=' . $this->username),
234 'ttip' => wfMsg('tooltip-mycontris'),
235 'akey' => wfMsg('accesskey-mycontris')
236 );
237 $personal_urls['logout'] = array(
238 'text' => wfMsg('userlogout'),
239 'href' => $this->makeSpecialUrl('Userlogout','returnpage=' . $this->thisurle),
240 'ttip' => wfMsg('tooltip-logout'),
241 'akey' => wfMsg('accesskey-logout')
242 );
243 } else {
244 if( $wgShowIPinHeader && isset( $_COOKIE[ini_get("session.name")] ) ) {
245 $personal_urls['anonuserpage'] = array(
246 'text' => $this->username,
247 'href' => $this->makeUrl($this->userpage),
248 'ttip' => wfMsg('tooltip-anonuserpage'),
249 'akey' => wfMsg('accesskey-anonuserpage')
250 );
251 $personal_urls['anontalk'] = array(
252 'text' => wfMsg('anontalk'),
253 'href' => $this->makeTalkUrl($this->userpage),
254 'ttip' => wfMsg('tooltip-anontalk'),
255 'akey' => wfMsg('accesskey-anontalk')
256 );
257 $personal_urls['anonlogin'] = array(
258 'text' => wfMsg('userlogin'),
259 'href' => $this->makeSpecialUrl('Userlogin', 'return='.$this->thisurle),
260 'ttip' => wfMsg('tooltip-login'),
261 'akey' => wfMsg('accesskey-login')
262 );
263 } else {
264
265 $personal_urls['login'] = array(
266 'text' => wfMsg('userlogin'),
267 'href' => $this->makeSpecialUrl('Userlogin', 'return='.$this->thisurle),
268 'ttip' => wfMsg('tooltip-login'),
269 'akey' => wfMsg('accesskey-login')
270 );
271 }
272 }
273
274 return $personal_urls;
275 }
276
277 # an array of edit links by default used for the tabs
278 function buildContentActionUrls () {
279 global $wgTitle, $wgUser, $wgRequest;
280 $action = $wgRequest->getText( 'action' );
281 $oldid = $wgRequest->getVal( 'oldid' );
282 $diff = $wgRequest->getVal( 'diff' );
283 $content_actions = array();
284
285 $iscontent = ($wgTitle->getNamespace() != Namespace::getSpecial() );
286 if( $iscontent) {
287
288 $content_actions['article'] = array('class' => (!Namespace::isTalk( $wgTitle->getNamespace())) ? 'selected' : '',
289 'text' => wfMsg('article'),
290 'href' => $this->makeArticleUrl($this->thispage),
291 'ttip' => wfMsg('tooltip-article'),
292 'akey' => wfMsg('accesskey-article'));
293
294 /* set up the classes for the talk link */
295 $talk_class = (Namespace::isTalk( $wgTitle->getNamespace()) ? 'selected' : '');
296 $talktitle = Title::newFromText( $this->titletxt );
297 $talktitle = $talktitle->getTalkPage();
298 $this->checkTitle(&$talktitle, &$this->titletxt);
299 if($talktitle->getArticleId() != 0) {
300 $content_actions['talk'] = array(
301 'class' => $talk_class,
302 'text' => wfMsg('talk'),
303 'href' => $this->makeTalkUrl($this->titletxt),
304 'ttip' => wfMsg('tooltip-talk'),
305 'akey' => wfMsg('accesskey-talk')
306 );
307 } else {
308 $content_actions['talk'] = array(
309 'class' => $talk_class?$talk_class.' new':'new',
310 'text' => wfMsg('talk'),
311 'href' => $this->makeTalkUrl($this->titletxt,'action=edit'),
312 'ttip' => wfMsg('tooltip-talk'),
313 'akey' => wfMsg('accesskey-talk')
314 );
315 }
316
317 if ( $wgTitle->userCanEdit() ) {
318 $oid = ( $oldid && ! isset( $diff ) ) ? "&oldid={$oldid}" : '';
319 $content_actions['edit'] = array(
320 'class' => ($action == 'edit' or $action == 'submit') ? 'selected' : '',
321 'text' => wfMsg('edit'),
322 'href' => $this->makeUrl($this->thispage, 'action=edit'.$oid),
323 'ttip' => wfMsg('tooltip-edit'),
324 'akey' => wfMsg('accesskey-edit')
325 );
326 } else {
327 $oid = ( $oldid && ! isset( $diff ) ) ? "&oldid={$oldid}" : '';
328 $content_actions['edit'] = array('class' => ($action == 'edit') ? 'selected' : '',
329 'text' => wfMsg('viewsource'),
330 'href' => $this->makeUrl($this->thispage, 'action=edit'.$oid),
331 'ttip' => wfMsg('tooltip-viewsource'),
332 'akey' => wfMsg('accesskey-viewsource'));
333 }
334
335 if ( $wgTitle->getArticleId() ) {
336
337 $content_actions['history'] = array('class' => ($action == 'history') ? 'selected' : '',
338 'text' => wfMsg('history_short'),
339 'href' => $this->makeUrl($this->thispage, 'action=history'),
340 'ttip' => wfMsg('tooltip-history'),
341 'akey' => wfMsg('accesskey-history'));
342
343 # XXX: is there a rollback action anywhere or is it planned?
344 # Don't recall where i got this from...
345 /*if( $wgUser->getNewtalk() ) {
346 $content_actions['rollback'] = array('class' => ($action == 'rollback') ? 'selected' : '',
347 'text' => wfMsg('rollback_short'),
348 'href' => $this->makeUrl($this->thispage, 'action=rollback'),
349 'ttip' => wfMsg('tooltip-rollback'),
350 'akey' => wfMsg('accesskey-rollback'));
351 }*/
352
353 if($wgUser->isSysop()){
354 if(!$wgTitle->isProtected()){
355 $content_actions['protect'] = array(
356 'class' => ($action == 'protect') ? 'selected' : '',
357 'text' => wfMsg('protect'),
358 'href' => $this->makeUrl($this->thispage, 'action=protect'),
359 'ttip' => wfMsg('tooltip-protect'),
360 'akey' => wfMsg('accesskey-protect')
361 );
362
363 } else {
364 $content_actions['unprotect'] = array(
365 'class' => ($action == 'unprotect') ? 'selected' : '',
366 'text' => wfMsg('unprotect'),
367 'href' => $this->makeUrl($this->thispage, 'action=unprotect'),
368 'ttip' => wfMsg('tooltip-protect'),
369 'akey' => wfMsg('accesskey-protect')
370 );
371 }
372 $content_actions['delete'] = array(
373 'class' => ($action == 'delete') ? 'selected' : '',
374 'text' => wfMsg('delete'),
375 'href' => $this->makeUrl($this->thispage, 'action=delete'),
376 'ttip' => wfMsg('tooltip-delete'),
377 'akey' => wfMsg('accesskey-delete')
378 );
379 }
380 if ( $wgUser->getID() != 0 ) {
381 if ( $wgTitle->userCanEdit()) {
382 $content_actions['move'] = array('class' => ($wgTitle->getDbKey() == 'Movepage' and $wgTitle->getNamespace == Namespace::getSpecial()) ? 'selected' : '',
383 'text' => wfMsg('move'),
384 'href' => $this->makeSpecialUrl('Movepage', 'target='.$this->thispage),
385 'ttip' => wfMsg('tooltip-move'),
386 'akey' => wfMsg('accesskey-move'));
387 } else {
388 $content_actions['move'] = array('class' => 'inactive',
389 'text' => wfMsg('move'),
390 'href' => false,
391 'ttip' => wfMsg('tooltip-nomove'),
392 'akey' => false);
393
394 }
395 }
396 } else {
397 //article doesn't exist or is deleted
398 if($wgUser->isSysop()){
399 if( $n = $wgTitle->isDeleted() ) {
400 $content_actions['delete'] = array(
401 'class' => '',
402 'text' => wfMsg( "undelete_short", $n ),
403 'href' => $this->makeSpecialUrl('Undelete/'.$this->thispage),
404 'ttip' => wfMsg('tooltip-undelete', $n),
405 'akey' => wfMsg('accesskey-undelete')
406 );
407 }
408 }
409 }
410
411 if ( $wgUser->getID() != 0 and $action != 'edit' and $action != 'submit' ) {
412 if( !$wgTitle->userIsWatching()) {
413 $content_actions['watch'] = array('class' => ($action == 'watch' or $action == 'unwatch') ? 'selected' : '',
414 'text' => wfMsg('watch'),
415 'href' => $this->makeUrl($this->thispage, 'action=watch'),
416 'ttip' => wfMsg('tooltip-watch'),
417 'akey' => wfMsg('accesskey-watch'));
418 } else {
419 $content_actions['watch'] = array('class' => ($action == 'unwatch' or $action == 'watch') ? 'selected' : '',
420 'text' => wfMsg('unwatch'),
421 'href' => $this->makeUrl($this->thispage, 'action=unwatch'),
422 'ttip' => wfMsg('tooltip-unwatch'),
423 'akey' => wfMsg('accesskey-unwatch'));
424
425 }
426 }
427 } else {
428 /* show special page tab */
429
430 $content_actions['article'] = array('class' => 'selected',
431 'text' => wfMsg('specialpage'),
432 'href' => false,
433 'ttip' => wfMsg('tooltip-specialpage'),
434 'akey' => false);
435 }
436
437 return $content_actions;
438 }
439
440 # build array of common navigation links
441 function buildNavUrls () {
442 global $wgTitle, $wgUser, $wgRequest;
443 global $wgSiteSupportPage;
444
445 $action = $wgRequest->getText( 'action' );
446 $oldid = $wgRequest->getVal( 'oldid' );
447 $diff = $wgRequest->getVal( 'diff' );
448 // XXX: remove htmlspecialchars when tal:attributes works with i18n:attributes
449 $nav_urls = array();
450 $nav_urls['mainpage'] = array('href' => htmlspecialchars( $this->makeI18nUrl('mainpage')));
451 $nav_urls['randompage'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Randompage')));
452 $nav_urls['recentchanges'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Recentchanges')));
453 $nav_urls['whatlinkshere'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Whatlinkshere', 'target='.$this->thispage)));
454 $nav_urls['currentevents'] = (wfMsg('currentevents') != '') ? array('href' => htmlspecialchars( $this->makeI18nUrl('currentevents'))) : '';
455 $nav_urls['portal'] = (wfMsg('portal') != '') ? array('href' => htmlspecialchars( $this->makeI18nUrl('portal-url'))) : '';
456 $nav_urls['recentchangeslinked'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Recentchangeslinked', 'target='.$this->thispage)));
457 $nav_urls['bugreports'] = array('href' => htmlspecialchars( $this->makeI18nUrl('bugreportspage')));
458 // $nav_urls['sitesupport'] = array('href' => htmlspecialchars( $this->makeI18nUrl('sitesupportpage')));
459 $nav_urls['sitesupport'] = array('href' => htmlspecialchars( $wgSiteSupportPage));
460 $nav_urls['help'] = array('href' => htmlspecialchars( $this->makeI18nUrl('helppage')));
461 $nav_urls['upload'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Upload')));
462 $nav_urls['specialpages'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Specialpages')));
463
464
465 $id=User::idFromName($wgTitle->getText());
466 $ip=User::isIP($wgTitle->getText());
467
468 if($id || $ip) { # both anons and non-anons have contri list
469 $nav_urls['contributions'] = array(
470 'href' => htmlspecialchars( $this->makeSpecialUrl('Contributions', "target=" . $wgTitle->getPartialURL() ) )
471 );
472 }
473 if ( 0 != $wgUser->getID() ) { # show only to signed in users
474 if($id) { # can only email non-anons
475 $nav_urls['emailuser'] = array(
476 'href' => htmlspecialchars( $this->makeSpecialUrl('Emailuser', "target=" . $wgTitle->getPartialURL() ) )
477 );
478 }
479 }
480
481
482 return $nav_urls;
483 }
484
485 /*static*/ function makeSpecialUrl( $name, $urlaction='' ) {
486 $title = Title::makeTitle( NS_SPECIAL, $name );
487 $this->checkTitle(&$title, &$name);
488 return $title->getLocalURL( $urlaction );
489 }
490 /*static*/ function makeTalkUrl ( $name, $urlaction='' ) {
491 $title = Title::newFromText( $name );
492 $title = $title->getTalkPage();
493 $this->checkTitle(&$title, &$name);
494 return $title->getLocalURL( $urlaction );
495 }
496 /*static*/ function makeArticleUrl ( $name, $urlaction='' ) {
497 $title = Title::newFromText( $name );
498 $title= $title->getSubjectPage();
499 $this->checkTitle(&$title, &$name);
500 return $title->getLocalURL( $urlaction );
501 }
502 /*static*/ function makeI18nUrl ( $name, $urlaction='' ) {
503 $title = Title::newFromText( wfMsg($name) );
504 $this->checkTitle(&$title, &$name);
505 return $title->getLocalURL( $urlaction );
506 }
507 /*static*/ function makeUrl ( $name, $urlaction='' ) {
508 $title = Title::newFromText( $name );
509 $this->checkTitle(&$title, &$name);
510 return $title->getLocalURL( $urlaction );
511 }
512
513 # make sure we have some title to operate on, mind the '&'
514 /*static*/ function checkTitle ( &$title, &$name ) {
515 if(!is_object($title)) {
516 $title = Title::newFromText( $name );
517 if(!is_object($title)) {
518 $title = Title::newFromText( '<error: link target missing>' );
519 }
520 }
521 }
522
523
524 }
525
526 class SkinDaVinci extends SkinPHPTal {
527 function initPage( &$out ) {
528 SkinPHPTal::initPage( $out );
529 $this->skinname = "davinci";
530 }
531 }
532
533 class SkinMono extends SkinPHPTal {
534 function initPage( &$out ) {
535 SkinPHPTal::initPage( $out );
536 $this->skinname = "mono";
537 }
538 }
539
540 class SkinMonoBook extends SkinPHPTal {
541 function initPage( &$out ) {
542 SkinPHPTal::initPage( $out );
543 $this->skinname = "monobook";
544 }
545 }
546
547 ?>