1.guestbook.php(留言程序) <html> <head> <script language="javascript"> <!-- <!-- var hellotext="为了您的最佳浏览效果请您使用ie4.0以上的版本和800*600分辨率" var thetext="" var started=false var step=0 var times=1
function welcometext() { times-- if (times==0) { if (started==false) { started = true; window.status = hellotext; settimeout("anim()",1); } thetext = hellotext; } }
function showstatustext(txt) { thetext = txt; settimeout("welcometext()",4000) times++ }
function anim() { step++ if (step==7) {step=1} if (step==1) {window.status='>==='+thetext+'===<'} if (step==2) {window.status='=>=='+thetext+'==<='} if (step==3) {window.status='>=>='+thetext+'=<=<'} if (step==4) {window.status='=>=>'+thetext+'<=<='} if (step==5) {window.status='==>='+thetext+'=<=='} if (step==6) {window.status='===>'+thetext+'<==='} settimeout("anim()",200); } // --> welcometext();
function mm_jumpmenu(targ,selobj,restore){ //v3.0 eval(targ+".location='"+selobj.options[selobj.selectedindex].value+"'"); if (restore) selobj.selectedindex=0; } //--> </script> <title>天地网络留言版</title> <meta http-equiv="content-type" content="text/html; charset=gb2312"> </head> <style type="text/css"> <!-- a:link { font-size: 9pt; color: #ffffff} --> </style> <body> <? $pagesize=5; $db=mysql_connect("localhost","root",""); mysql_select_db("lyanban",$db); $result=mysql_query("select * from message order by date desc",$db); $rowcount=mysql_num_rows($result); $pages=ceil($rowcount/$pagesize); if($rowcount==0) {echo "目前没有留言!<a href=guestbook.htm>欢迎您留言!</a>";}