PHP + DBM logging program (5 ). 10. member information display file show. php3? If ($ login) {require (common. php3); if (! Isset ($ id) error (why didn't I enter the user ID ?); Else {$ idchop ($ id); $ dbmdbmopen (class, r); if (! Db 10. member information display file show. php3
If ($ login ){
Require ("common. php3 ");
If (! Isset ($ id) error ("Why didn't I enter the user ID? ");
Else {
$ Id = chop ($ id );
$ Dbm = dbmopen ("class", "r ");
If (! Dbmexists ($ dbm, $ id) error ("this user id is not available! ");
Else {
$ Data = dbmfetch ($ dbm, $ id );
$ Info = explode ("|! :! | ", $ Data );
$ Name = $ info [0]; $ nickname = $ info [1]; $ mail = $ info [2]; $ home = $ info [3]; $ oicq = $ info [4];
$ Icq = $ info [5]; $ add = $ info [6]; $ tel = $ info [7]; $ birth = $ info [8]; $ job = $ info [9];
$ Intro = $ info [10]; $ sex = $ info [11];
}
Dbmclose ($ dbm );
}
?>
Check <? Echo $ name?> Resource
Width = "80%">
Detailed information |
Name |
|
Width = "34%"> NickName |
|
Gender |
|
Email address |
|
Personal Homepage |
> |
Current occupation |
|
OICQ number |
If ($ oicq = "") echo "don't tell you! "; Else { ?> "Target = _ blank title = The OICQ number is , Click to view information>/l/00/0/"width = 16> } ?> |
ICQ number |
If ($ oicq = "") echo "don't tell you! "; Else { ?> & Img = 7> }?> |
Birthday date |
|
Contact Address |
|
Contact number |
|
Personal Profile |
|
} Else header ("location: login. php3 ");
?>
11. css file:
A {text-decoration: none; color: #336699; font-family: ""; font-size: 9pt}
A: hover {text-decoration: underline; color: # FF0000; font-family: ""; font-size: 9pt}
Body {font-family: "", "serif"; font-size: 9pt}
Td {font-family: "", "serif"; font-size: 9pt}
Input {font-size: 9pt}
P {font-size: 9pt}
Br {font-size: 9pt}
Tr {font-size: 9pt}
Table {font-size: 9pt}
INPUT {FONT-FAMILY: arial,; FONT-SIZE: 9pt; PADDING-TOP: 3px}
INPUT. text {
BACKGROUND-COLOR: # f0f0f0; BORDER-BOTTOM: #101010 1px solid; BORDER-LEFT: #101010 1px solid; BORDER-RIGHT: #101010 1px solid; BORDER-TOP: #101010 1px solid; COLOR: #000000
}
INPUT. file {
BACKGROUND-COLOR: # f0f0f0; BORDER-BOTTOM: #101010 1px solid; BORDER-LEFT: #101010 1px solid; BORDER-RIGHT: #101010 1px solid; BORDER-TOP: #101010 1px solid; COLOR: #000000
}
SELECT {
BACKGROUND-COLOR: # f0f0f0; BORDER-BOTTOM: #101010 1px solid; BORDER-LEFT: #101010 1px solid; BORDER-RIGHT: #101010 1px solid; BORDER-TOP: #101010 1px solid; COLOR: #000000
}
TEXTAREA {
BACKGROUND-COLOR: # f0f0f0; BORDER-BOTTOM: #101010 1px solid; BORDER-LEFT: #101010 1px solid; BORDER-RIGHT: #101010 1px solid; BORDER-TOP: #101010 1px solid; COLOR: #000000
}
. Stedit {font-size: 9pt; border-left: 1px solid #4a00003;
Border-right: 1px solid #4a00003; border-top: 1px solid #4a00003;
Border-bottom: 1px solid #000066}
. Stbtm {background-color: # cococo; color: #000000; font-size: 9pt; height: 20px;
Border-left: 1px solid # ffffff; border-right: 1px solid # 665b8e;
Border-top: 1px solid # ffffff; border-bottom: 1px solid # 665b8e}
Okay, it's done.
Why? If ($ login) {require (common. php3); if (! Isset ($ id) error (why didn't I enter the user ID ?); Else {$ id = chop ($ id); $ dbm = dbmopen (class, r); if (! Db...