/[cvs]/nfo/site/htdocs/inc/otdef/otd_html1/otd_html1.php.inc
ViewVC logotype

Diff of /nfo/site/htdocs/inc/otdef/otd_html1/otd_html1.php.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by rabit, Sun Sep 5 00:08:43 2004 UTC revision 1.8 by rabit, Sun Sep 5 03:21:49 2004 UTC
# Line 45  $otd_html1['colours'] = array( Line 45  $otd_html1['colours'] = array(
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');
# Line 55  xmlcp_registertagcallbacks('h', 'otd_htm Line 62  xmlcp_registertagcallbacks('h', 'otd_htm
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;
# Line 90  global $xmlcp_cdata; Line 100  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) {
# Line 141  global $xmlcp_cdata; Line 147  global $xmlcp_cdata;
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) {
# Line 164  global $common, $common_sessiondata; Line 170  global $common, $common_sessiondata;
170    
171    common_benchmark_addstep('otd_html1: render: head');    common_benchmark_addstep('otd_html1: render: head');
172    
173    otd_html1_pageheader();    otd_html1_pageheader('', '&bull; <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    
# Line 174  global $common, $common_sessiondata; Line 180  global $common, $common_sessiondata;
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>') . '&nbsp;';
 ' : '') . (($language_id == $list[$i][3]) ? $imgtag : '<a href="?li=' . $list[$i][3] . '" title="' . $list[$i][4] . '">' . $imgtag . '</a>');  
186    
187      }      }
188    
# Line 201  global $common, $common_sessiondata; Line 206  global $common, $common_sessiondata;
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    
# Line 216  Last changes by <b>' . $contentdata['cre Line 220  Last changes by <b>' . $contentdata['cre
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 = '') {
# Line 242  global $common; Line 239  global $common;
239    
240  }  }
241    
242  //----------------------------------------------------------  //------------------------------------------------------------------------------
243  //- HTML output functions:  //- HTML output functions:
244    
245  function otd_html1_authbox() {  function otd_html1_authbox() {
# Line 338  function otd_html1_codeparagraph($conten Line 335  function otd_html1_codeparagraph($conten
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>
# Line 352  function otd_html1_pagefoot() { Line 362  function otd_html1_pagefoot() {
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    
# Line 363  global $common; Line 373  global $common;
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) . '
# Line 375  Page execution time:<br /> Line 390  Page execution time:<br />
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>&nbsp;&nbsp;&nbsp;<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>
# Line 417  input { border:1px; } Line 431  input { border:1px; }
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    
# Line 455  www.<span class="c2">n</span>et<span cla Line 469  www.<span class="c2">n</span>et<span cla
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  &bull; <a href="">Home page</a><br />  &bull; <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 &amp; tools:</big></div>
478  &bull; Benchmark list: [<a href="' . $urlprefix . 'benchlist=' . ($benchlist ? '0">off' : '1">on') . '</a>]<br />  ' . ($extratoolbarcontents ? $extratoolbarcontents . '<br />
479    <br />
480    ' : '') . '&bull; Benchmark list: [<a href="' . $urlprefix . 'benchlist=' . ($benchlist ? '0">off' : '1">on') . '</a>]<br />
481  &bull; Debug outputs: [<a href="' . $urlprefix . 'debug=' . ($debug ? '0">off' : '1">on') . '</a>]<br />  &bull; 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">
# Line 469  www.<span class="c2">n</span>et<span cla Line 485  www.<span class="c2">n</span>et<span cla
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>&bull; ' . $title . '</b>&nbsp;</big>  <tr>
492  ' . ($additionalcontents ? $additionalcontents . '  <td><big><b>&bull; ' . $title . '</b>&nbsp;</big></td>
493  ' : '') . '</p>  <td align="right">' . ($extracontents ? $extracontents : '') . '</td>
494    </tr>
495    </table>
496  ';  ';
497    
498  }  }

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed