stdupd.prg [source] :: ใช้แก้ไขข้อมูลนักศึกษาแต่ละคน
cls
_stdid = 0
@ 5,5 say "STDID : " get _stdid
read
if updated()
use std
locate for _stdid = stdid
if found()
@ 6,5 say "STDNAME : " get stdname
@ 7,5 say "STDSURNAME : " get stdsurname
@ 8,5 say "ADDR : " get addr
@ 9,5 say "URL : " get url
@ 10,5 say "E-Mail : " get email
@ 11,5 say "TEL : " get tel
@ 12,5 say "MOBILE : " get mobile
@ 13,5 say "SALARY : " get salary
@ 14,5 say "DREAM : " get dream
read
if updated()
repl stdname with stdname, stdsurname with stdsurname,;
addr with addr , url with url,;
tel with tel , mobile with mobile,;
salary with salary , dream with dream
endif
@ 15,5 say "Update completely .. bye"
else
@ 6,5 say "Oh! not found .. bye"
endif
endif
|
stdhtm.prg [source] :: ใช้สร้างแฟ้ม std.htm ขึ้นมา
cls
set printer to "std.htm"
set device to printer
use std
@ row(),1 say "<html><head><title>เว็บรุ่นของผม</title></head>"
@ row()+1,1 say "<body bgcolor=#ffffdd><center>"
i=1
while !eof()
if mod(i,2) = 0
@ row()+1,1 say "<table width=95% bgcolor=#dddddd>"
else
@ row()+1,1 say "<table width=95% bgcolor=#ffffff>"
endif
@ row(),col() say "<td width=200><a href=" + str(stdid) + ".jpg>"
@ row(),col() say "<img src=" + str(stdid) + ".jpg width=200 border=0></td><td>"
@ row(),col() say "<font size=4 face='ms sans serif'>"
@ row(),col() say "ID : " + str(stdid) + "<br>"
@ row(),col() say "Name : " + stdname + "<br>"
@ row(),col() say "Surname : " + stdsurname + "<br>"
@ row(),col() say "Addr : " + addr + "<br>"
@ row(),col() say "Url : <a href=" + url + ">" + url + "</a><br>"
@ row(),col() say "E-mail : " + email + "<br>"
@ row(),col() say "Tel : " + tel + "<br>"
@ row(),col() say "Mobile : " + mobile + "<br>"
@ row(),col() say "Salary : " + str(salary) + "<br>"
@ row(),col() say "Dream : " + dream + "</td></table><br>"
skip
i++
end
@ row()+1,1 say "</body></html>"
set device to screen
@ 5,5 say "Complete bye"
run explorer std.htm
|