A paging text-based PHP message board source code beginner PHP compiled a message board program. I feel good about myself, so I put it up with a thick face. please correct me. The source program is as follows:
N "; echo" alert ("Please enter at least the name and the message title. "); N"; echo "history. back ();"; echo "scriptN "; exit;} $ adddata = $ name. "t ". $ e_mail. "t ". $ url. "t ". $ title. "t ". $ data. "t ". $ icon. "t ". $ time. "n"; if (file_exists ($ guestfile) {$ filebuffer = file ($ guestfile); if (sizeof ($ filebuffer)> 100) {for ($ I = 0; $ I <100; $ I ++) $ newbuffer [I] = $ filebuffer [I];} else {$ newbuffer = $ filebuffer;} $ fp = fopen ($ guestfile, "w"); fputs ($ fp, $ adddata); fclose ($ fp); $ buffer = implode ("", $ newbuffer); $ fp = fopen ($ guestfile, "a"); fputs ($ fp, $ bu Ffer); fclose ($ fp);} else {$ fp = fopen ($ guestfile, "w"); fwrite ($ fp, $ adddata ); fclose ($ fp) ;}}?>
Message Board
N ";} else {echo"N ";}?>
Power supply 9901 online space message board |
"> [Back to homepage] |
No message
";}Else {$ filebuffer = file ($ guestfile); $ size = sizeof ($ filebuffer); $ pages = ceil ($ size/20); echo"
Total ". $ size." message no. ". $ page." page/total ". $ pages." page
"; If ($ page> 1) {$ prev = $ page-1; echo" <";}for ($ I = 1; $ I <=$ pages; $ I ++) {echo "". $ I. "";} if ($ page <$ pages) {$ next = $ page + 1; echo ">>";} echo"
"; For ($ I = ($ page-1) * 20; $ I <$ page * 20 & $ I <$ size; $ I ++) {$ buffer = explode ("t", $ filebuffer [$ I]); echo"
| "; Echo"
". $ Buffer [3]." | "; Echo"
(". $ Buffer [0].") | "; Echo"
"; If ($ buffer [2]! = "0") {echo "homepage";} else {echo "homepage";} echo" | "; Echo"
"; If ($ buffer [1]! = "0") {echo "E_Mail";} else {echo "E_Mail";} echo" | "; Echo"
". $ Buffer [6]." | "; Echo"
| "; Echo"
". $ Buffer [4]." |
|
";}}?>
This website is made by the crazy computer Studio 2000 |