代码
1 2
3 function do_html_header($title)
4 {
5 // print an HTML header
6 ?>
7
8
9
10
16
17
18
19 align=left valign=bottom height = 55 width = 57 />
20
PHPbookmark
21
22 23 if($title)
24 do_html_heading($title);
25 }
26
27 function do_html_footer()
28 {
29 // print an HTML footer
30 ?>
31
32
33 34 }
35
36 function do_html_heading($heading)
37 {
38 // print heading
39 ?>
40
41 42 }
43
44 function do_html_URL($url, $name)
45 {
46 // output URL as link and br
47 ?>
48
"> 49 50 }
51
52 function display_site_info()
53 {
54 // display some marketing info
55 ?>
56
57 - Store your bookmarks online with us!
58 - See what other users use?
59 - Share your favorite links with others?
60
61 62 }
63
64 function display_login_form()
65 {
66 ?>
67
Not a member? 68
85 86 }
87
88 function display_registration_form()
89 {
90 ?>
91
111 112
113 }
114
115 function display_user_urls($url_array)
116 {
117 // display the table of URLs
118
119 // set global variable, so we can test later if this is on the page
120 global $bm_table;
121 $bm_table = true;
122 ?>
123
124
150 151 }
152
153 function display_user_menu()
154 {
155 // display the menu options on this page
156 ?>
157
158
Home |
159
Add BM |
160 161 // only offer the delete option if bookmark table is on this page
162 global $bm_table;
163 if($bm_table==true)
164 echo "
Delete BM | ";
165 else
166 echo "
Delete BM | ";
167 ?>
168
Change password 169
170
Recommend URLs to me |
171
Logout 172
173
174 175 }
176
177 function display_add_bm_form()
178 {
179 // display the form for people to ener a new bookmark in
180 ?>
181
188 189 }
190
191 function display_password_form()
192 {
193 // display html change password form
194 ?>
195
196