45 |
); |
); |
46 |
|
|
47 |
//------------------------------------------------------------------------------ |
//------------------------------------------------------------------------------ |
48 |
|
//- GET/POST variable encapsulation: |
49 |
|
|
50 |
//---------------------------------------------------------- |
if(isset($_GET['debug'])) |
51 |
|
$common_sessiondata['user_prefs']['debug'] = $_GET['debug']; |
52 |
|
|
53 |
|
if(isset($_GET['benchlist'])) |
54 |
|
$common_sessiondata['user_prefs']['benchlist'] = $_GET['benchlist']; |
55 |
|
|
56 |
|
//------------------------------------------------------------------------------ |
57 |
//- XMLCP callbacks setup: |
//- XMLCP callbacks setup: |
58 |
|
|
59 |
xmlcp_registertagcallbacks('b', 'otd_html1_cb_xmlcp_start_bold', 'otd_html1_cb_xmlcp_end_bold'); |
xmlcp_registertagcallbacks('b', 'otd_html1_cb_xmlcp_start_bold', 'otd_html1_cb_xmlcp_end_bold'); |
62 |
xmlcp_registertagcallbacks('p', 'otd_html1_cb_xmlcp_start_paragraph', 'otd_html1_cb_xmlcp_end_paragraph'); |
xmlcp_registertagcallbacks('p', 'otd_html1_cb_xmlcp_start_paragraph', 'otd_html1_cb_xmlcp_end_paragraph'); |
63 |
xmlcp_registertagcallbacks('link', 'otd_html1_cb_xmlcp_start_link', 'otd_html1_cb_xmlcp_end_link'); |
xmlcp_registertagcallbacks('link', 'otd_html1_cb_xmlcp_start_link', 'otd_html1_cb_xmlcp_end_link'); |
64 |
|
|
65 |
|
//---------------------------------------------------------- |
66 |
|
//- XMLCP callbacks: |
67 |
|
|
68 |
function otd_html1_cb_xmlcp_start_bold($h_parser, $tagname, $attribs) { |
function otd_html1_cb_xmlcp_start_bold($h_parser, $tagname, $attribs) { |
69 |
|
|
70 |
global $xmlcp_cdata; |
global $xmlcp_cdata; |
100 |
} |
} |
101 |
|
|
102 |
/* |
/* |
103 |
function otd_html1_cb_xmlcp_start_page($h_parser, $tagname, $attribs) { |
function otd_html1_cb_xmlcp_start_page($h_parser, $tagname, $attribs) { } |
104 |
|
|
105 |
} |
function otd_html1_cb_xmlcp_end_page($h_parser, $tagname) { } |
|
|
|
|
function otd_html1_cb_xmlcp_end_page($h_parser, $tagname) { |
|
|
|
|
|
} |
|
106 |
*/ |
*/ |
107 |
|
|
108 |
function otd_html1_cb_xmlcp_start_paragraph($h_parser, $tagname, $attribs) { |
function otd_html1_cb_xmlcp_start_paragraph($h_parser, $tagname, $attribs) { |
147 |
|
|
148 |
} |
} |
149 |
|
|
150 |
//---------------------------------------------------------- |
//------------------------------------------------------------------------------ |
151 |
//- Content render functions: |
//- Content render functions: |
152 |
|
|
153 |
function otd_html1_renderpage($keyname, $language_id = 0) { |
function otd_html1_renderpage($keyname, $language_id = 0) { |
170 |
|
|
171 |
common_benchmark_addstep('otd_html1: render: head'); |
common_benchmark_addstep('otd_html1: render: head'); |
172 |
|
|
173 |
otd_html1_pageheader(); |
otd_html1_pageheader('', '• <a href="' . common_get_baseurl() . 'pages/otd_html1/userinfo.php">User info</a>'); |
174 |
|
|
175 |
common_benchmark_addstep('otd_html1: render: header'); |
common_benchmark_addstep('otd_html1: render: header'); |
176 |
|
|
180 |
|
|
181 |
for($i = 0; $i < count($list); $i++) { |
for($i = 0; $i < count($list); $i++) { |
182 |
|
|
183 |
$imgtag = otd_html1_get_imgtag('icons/flags/' . $list[$i][3] . '.gif', $list[$i][4], 15, 20); |
$imgtag = otd_html1_get_imgtag('icons/flags/' . $list[$i][3] . '.gif', $list[$i][4], 14, 21); |
184 |
|
|
185 |
$titledata .= ($i ? ' |
$titledata .= (($language_id == $list[$i][3]) ? $imgtag : '<a href="?li=' . $list[$i][3] . '" title="' . $list[$i][4] . '">' . $imgtag . '</a>') . ' '; |
|
' : '') . (($language_id == $list[$i][3]) ? $imgtag : '<a href="?li=' . $list[$i][3] . '" title="' . $list[$i][4] . '">' . $imgtag . '</a>'); |
|
186 |
|
|
187 |
} |
} |
188 |
|
|
206 |
|
|
207 |
} |
} |
208 |
|
|
209 |
otd_html1_paragraph('<small> |
$extrapageinfocontents = 'Content item "<b>' . $contentdata['description'] . '</b>" (language: "<b>' . $contentdata['language_name'] . '</b>") created by <b>' . $contentdata['creator_name'] . '</b> on <b>' . date('Y/m/d, H:i:s', $contentdata['unixtime']) . '</b>. Last changes by <b>' . $contentdata['creator_name'] . '</b> on <b>' . date('d.m.Y, H:i:s', $contentdata['unixtime']) . '</b>.<br /> |
210 |
"<b>' . $contentdata['description'] . '</b>" (language: "<b>' . $contentdata['language_name'] . '</b>") created by <b>' . $contentdata['creator_name'] . '</b> on <b>' . date('d.m.Y, H:i:s', $contentdata['unixtime']) . '</b>.<br /> |
Page created by <b>rabit</b> on <b>2004/08/31, 21:23</b>. |
211 |
Last changes by <b>' . $contentdata['creator_name'] . '</b> on <b>' . date('d.m.Y, H:i:s', $contentdata['unixtime']) . '</b>. |
'; |
|
</small>', 'box1'); |
|
212 |
|
|
213 |
} else { |
} else { |
214 |
|
|
220 |
|
|
221 |
common_benchmark_addstep('otd_html1: render: content'); |
common_benchmark_addstep('otd_html1: render: content'); |
222 |
|
|
223 |
otd_html1_pagefooter(); |
otd_html1_pagefooter($extrapageinfocontents); |
224 |
|
|
225 |
common_benchmark_addstep('otd_html1: render: footer'); |
common_benchmark_addstep('otd_html1: render: footer'); |
226 |
|
|
|
// Only show the benchmark list when set as preference: |
|
|
if($common_sessiondata['user_prefs']['benchlist']) { |
|
|
|
|
|
otd_html1_benchmarkbox(); |
|
|
|
|
|
} |
|
|
|
|
227 |
otd_html1_pagefoot(); |
otd_html1_pagefoot(); |
228 |
|
|
229 |
} |
} |
230 |
|
|
231 |
//---------------------------------------------------------- |
//------------------------------------------------------------------------------ |
232 |
//- HTML return functions: |
//- HTML return functions: |
233 |
|
|
234 |
function otd_html1_get_imgtag($relativeurl, $alt, $height = '', $width = '') { |
function otd_html1_get_imgtag($relativeurl, $alt, $height = '', $width = '') { |
239 |
|
|
240 |
} |
} |
241 |
|
|
242 |
//---------------------------------------------------------- |
//------------------------------------------------------------------------------ |
243 |
//- HTML output functions: |
//- HTML output functions: |
244 |
|
|
245 |
function otd_html1_authbox() { |
function otd_html1_authbox() { |
335 |
|
|
336 |
function otd_html1_headline($caption) { |
function otd_html1_headline($caption) { |
337 |
|
|
338 |
echo '<big><u>' . $caption . '</u></big> |
global $otd_html1; |
339 |
|
|
340 |
|
echo '<p style="border-bottom:1px solid ' . $otd_html1['colours']['border1'] . '; padding-bottom:1px;"> |
341 |
|
<b>' . $caption . '</b> |
342 |
|
</p> |
343 |
'; |
'; |
344 |
|
|
345 |
} |
} |
346 |
|
|
347 |
function otd_html1_pagefoot() { |
function otd_html1_pagefoot() { |
348 |
|
|
349 |
|
global $common_sessiondata; |
350 |
|
|
351 |
|
// As last show the benchmark list when set as preference: |
352 |
|
if($common_sessiondata['user_prefs']['benchlist']) { |
353 |
|
|
354 |
|
otd_html1_benchmarkbox(); |
355 |
|
|
356 |
|
} |
357 |
|
|
358 |
echo '</body> |
echo '</body> |
359 |
|
|
360 |
</html> |
</html> |
362 |
|
|
363 |
} |
} |
364 |
|
|
365 |
function otd_html1_pagefooter() { |
function otd_html1_pagefooter($extrapageinfocontents = '') { |
366 |
|
|
367 |
global $common; |
global $common, $ID; |
368 |
|
|
369 |
$contentheight = 240; // Minimum height of content and navigation. |
$contentheight = 240; // Minimum height of content and navigation. |
370 |
|
|
373 |
$timediff = (float)($endmtimesegs[1] - $startmtimesegs[1]); |
$timediff = (float)($endmtimesegs[1] - $startmtimesegs[1]); |
374 |
$timediff += $endmtimesegs[0] - $startmtimesegs[0]; |
$timediff += $endmtimesegs[0] - $startmtimesegs[0]; |
375 |
|
|
376 |
|
otd_html1_paragraph('<small> |
377 |
|
' . ($extrapageinfocontents ? $extrapageinfocontents . '<br /> |
378 |
|
' : '') . 'CVS ID: "<b>' . $ID . '</b>" |
379 |
|
</small>', 'box1'); |
380 |
|
|
381 |
echo '</td> |
echo '</td> |
382 |
<td class="bg11" style="padding:0;"> |
<td class="bg11" style="padding:0;"> |
383 |
' . otd_html1_get_imgtag('blank.gif', '', $contentheight, 8) . ' |
' . otd_html1_get_imgtag('blank.gif', '', $contentheight, 8) . ' |
390 |
</small> |
</small> |
391 |
<code>' . round($timediff * 100000) / 100 . '</code> ms.<br /> |
<code>' . round($timediff * 100000) / 100 . '</code> ms.<br /> |
392 |
</td> |
</td> |
393 |
<td align="right" colspan="2"> |
<td align="center" colspan="2"> |
394 |
<a href="http://validator.w3.org/check?uri=referer" target="_blank"><img alt="This page is valid XHTML 1.0" src="http://www.w3.org/Icons/valid-xhtml10" style="border:0;width:88px;height:31px;" /></a> |
<a href="http://validator.w3.org/check?uri=referer" target="_blank"><img alt="This page is valid XHTML 1.0" src="http://www.w3.org/Icons/valid-xhtml10" style="border:0;width:88px;height:31px;" /></a> <a href="http://jigsaw.w3.org/css-validator/check/referer" target="_blank"><img style="border:0;width:88px;height:31px;" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" /></a> |
|
<a href="http://jigsaw.w3.org/css-validator/check/referer" target="_blank"><img style="border:0;width:88px;height:31px;" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" /></a> |
|
395 |
</td> |
</td> |
396 |
</tr> |
</tr> |
397 |
</table> |
</table> |
431 |
|
|
432 |
} |
} |
433 |
|
|
434 |
function otd_html1_pageheader() { |
function otd_html1_pageheader($extranavbarcontents = '', $extratoolbarcontents = '') { |
435 |
|
|
436 |
global $common_sessiondata, $otd_html1, $request_contentkey; |
global $common_sessiondata, $otd_html1, $request_contentkey; |
437 |
|
|
469 |
</tr> |
</tr> |
470 |
<tr> |
<tr> |
471 |
<td class="bg11" style="border-top:2px solid ' . $otd_html1['colours']['border1'] . ';" valign="top"> |
<td class="bg11" style="border-top:2px solid ' . $otd_html1['colours']['border1'] . ';" valign="top"> |
472 |
<div class="box2" style="margin-bottom:8px;"><big>Navigation:</big></div> |
<div class="box2" style="margin-bottom:16px;"><big><b>N</b>a<b>F</b>igati<b>o</b>n:</big></div> |
473 |
<div style="margin-bottom:32px;"> |
<div style="margin-bottom:32px;"> |
474 |
• <a href="">Home page</a><br /> |
• <a href="' . common_get_baseurl() . '">Home page</a><br /> |
475 |
' . otd_html1_get_imgtag('blank.gif', '', 1, $leftbarwidth) . ' |
' . otd_html1_get_imgtag('blank.gif', '', 1, $leftbarwidth) . ' |
476 |
</div> |
</div> |
477 |
<div class="box2" style="margin-bottom:8px;"><big>Tools:</big></div> |
<div class="box2" style="margin-bottom:16px;"><big>Info & tools:</big></div> |
478 |
• Benchmark list: [<a href="' . $urlprefix . 'benchlist=' . ($benchlist ? '0">off' : '1">on') . '</a>]<br /> |
' . ($extratoolbarcontents ? $extratoolbarcontents . '<br /> |
479 |
|
<br /> |
480 |
|
' : '') . '• Benchmark list: [<a href="' . $urlprefix . 'benchlist=' . ($benchlist ? '0">off' : '1">on') . '</a>]<br /> |
481 |
• Debug outputs: [<a href="' . $urlprefix . 'debug=' . ($debug ? '0">off' : '1">on') . '</a>]<br /> |
• Debug outputs: [<a href="' . $urlprefix . 'debug=' . ($debug ? '0">off' : '1">on') . '</a>]<br /> |
482 |
</td> |
</td> |
483 |
<td style="border:2px solid #3090a8; padding:8px;" valign="top"> |
<td style="border:2px solid #3090a8; padding:8px;" valign="top"> |
485 |
|
|
486 |
} |
} |
487 |
|
|
488 |
function otd_html1_pagetitle($title, $additionalcontents = '') { |
function otd_html1_pagetitle($title, $extracontents = '') { |
489 |
|
|
490 |
echo '<p class="box1"> |
echo '<table cellspacing="0" cellpadding="4" class="box1" style="width:100%;"> |
491 |
<big><b>• ' . $title . '</b> </big> |
<tr> |
492 |
' . ($additionalcontents ? $additionalcontents . ' |
<td><big><b>• ' . $title . '</b> </big></td> |
493 |
' : '') . '</p> |
<td align="right">' . ($extracontents ? $extracontents : '') . '</td> |
494 |
|
</tr> |
495 |
|
</table> |
496 |
'; |
'; |
497 |
|
|
498 |
} |
} |