Browse Source

php - set onload script before iamge load and add a local timestamp

master
kanoi 10 years ago
parent
commit
dbea35751d
  1. 10
      pool/page.php

10
pool/page.php

@ -205,8 +205,8 @@ function ni(e,o){if(e){if(o==0){e.defd=e.style.display;e.style.display='none'}el
function domin(o){var e=document.getElementById('minicb');if(e){if(o==0){e.checked=true}else{e.checked=false}};for(var i=0;i<10;i++){e=document.getElementById('mini'+i);ni(e,o)}}
function mini(){var hm=gcn('mini');if(hm==''){domin(1)}else{domin(0)}}
function md(e){var c='';if(e.checked){c='y'}scnv('mini',c);mini()}
function tim(){var e=document.getElementById('ftr');if(e){var now=new Date(),t=document.createTextNode(now.toLocaleString());e.appendChild(t)}}
function jst(){var e=document.getElementById('jst');if(e){e.style.visibility='hidden'}}
window.onpaint=jst();
</script>\n";
$head .= "<style type='text/css'>
input[type=checkbox] {vertical-align: -2px;}
@ -265,7 +265,7 @@ h1 {margin-top: 20px; float:middle; font-size: 20px;}
.ft {color:blue; font-size:7px; }
.ftl {text-align: left; color:blue; font-size:7px; display:inline-block; width:20%; white-space: nowrap; }
.ftm {text-align: middle; font-size:10pt; display:inline-block; width:60%; white-space: nowrap; }
.ftr {text-align: rigth; color:blue; font-size:7px; display:inline-block; width:20%; }
.ftr {text-align: rigth; color:blue; font-size:7px; display:inline-block; width:20%; white-space: nowrap; }
$css_marker
</style>\n";
@ -592,7 +592,7 @@ function pgmenu($menus)
#
function pgbody($info, $page, $menu, $dotop, $user, $douser)
{
$body = '<body onload="mini();jst()"';
$body = '<body';
if ($page == 'index')
$body .= ' background=/BTC20.png';
$body .= '><div class=page>';
@ -638,8 +638,8 @@ function pgfoot($info)
$now = date('Y');
if ($now != '2014')
$foot .= "-$now";
$foot .= '&nbsp;<span class=ft>Z/s</span></span><span class=ftr>&nbsp;</span></div>';
$foot .= "</body></html>\n";
$foot .= '&nbsp;<span class=ft>Z/s</span></span><span class=ftr id=ftr>&nbsp;</span></div>';
$foot .= "<script type='text/javascript'>jst();tim();mini();</script></body></html>\n";
return $foot;
}

Loading…
Cancel
Save