]>
Commit | Line | Data |
---|---|---|
1d3a17c7 | 1 | <?php |
bbefea90 | 2 | set_include_path(get_include_path() . PATH_SEPARATOR . |
f03a795d | 3 | dirname(__FILE__) . "/include"); |
107d0cf3 | 4 | |
fb074239 | 5 | require_once "functions.php"; |
1559e374 | 6 | require_once "sessions.php"; |
66581886 | 7 | require_once "sanity_check.php"; |
9a4506c8 | 8 | require_once "config.php"; |
8158c57a | 9 | require_once "db.php"; |
a0111294 | 10 | require_once "db-prefs.php"; |
9a4506c8 | 11 | |
0a13e84e | 12 | $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME); |
9f311df6 | 13 | |
5f0a3741 | 14 | if (!init_connection($link)) return; |
4e9f5c24 | 15 | |
80edb8b4 AD |
16 | function opml_import_domdoc($link, $owner_uid) { |
17 | ||
18 | if (is_file($_FILES['opml_file']['tmp_name'])) { | |
19 | $doc = DOMDocument::load($_FILES['opml_file']['tmp_name']); | |
20 | ||
21 | $result = db_query($link, "SELECT id FROM | |
22 | ttrss_feed_categories WHERE title = 'Imported feeds' AND | |
23 | owner_uid = '$owner_uid' LIMIT 1"); | |
24 | ||
25 | if (db_num_rows($result) == 1) { | |
26 | $default_cat_id = db_fetch_result($result, 0, "id"); | |
27 | } else { | |
28 | $default_cat_id = 0; | |
29 | } | |
30 | ||
31 | if ($doc) { | |
32 | $body = $doc->getElementsByTagName('body'); | |
33 | ||
34 | $xpath = new DOMXpath($doc); | |
35 | $query = "/opml/body//outline"; | |
36 | ||
37 | $outlines = $xpath->query($query); | |
38 | ||
39 | foreach ($outlines as $outline) { | |
40 | ||
bbefea90 | 41 | $attributes = $outline->attributes; |
80edb8b4 | 42 | |
bbefea90 AD |
43 | $feed_title = db_escape_string($attributes->getNamedItem('text')->nodeValue); |
44 | if (!$feed_title) $feed_title = db_escape_string($attributes->getNamedItem('title')->nodeValue); | |
80edb8b4 | 45 | |
bbefea90 AD |
46 | $cat_title = db_escape_string($attributes->getNamedItem('title')->nodeValue); |
47 | if (!$cat_title) $cat_title = db_escape_string($attributes->getNamedItem('text')->nodeValue); | |
80edb8b4 | 48 | |
bbefea90 AD |
49 | $feed_url = db_escape_string($attributes->getNamedItem('xmlUrl')->nodeValue); |
50 | if (!$feed_url) $feed_url = db_escape_string($attributes->getNamedItem('xmlURL')->nodeValue); | |
80edb8b4 | 51 | |
bbefea90 | 52 | $site_url = db_escape_string($attributes->getNamedItem('htmlUrl')->nodeValue); |
80edb8b4 | 53 | |
bbefea90 AD |
54 | $pref_name = db_escape_string($attributes->getNamedItem('pref-name')->nodeValue); |
55 | $label_name = db_escape_string($attributes->getNamedItem('label-name')->nodeValue); | |
f59928d7 | 56 | $filter_name = db_escape_string($attributes->getNamedItem('filter-name')->nodeValue); |
80edb8b4 AD |
57 | |
58 | if ($cat_title && !$feed_url) { | |
59 | ||
f59928d7 | 60 | if ($cat_title != "tt-rss-prefs" && $cat_title != 'tt-rss-labels' && $cat_title != 'tt-rss-filters') { |
80edb8b4 AD |
61 | |
62 | db_query($link, "BEGIN"); | |
63 | ||
64 | $result = db_query($link, "SELECT id FROM | |
65 | ttrss_feed_categories WHERE title = '$cat_title' AND | |
66 | owner_uid = '$owner_uid' LIMIT 1"); | |
67 | ||
68 | if (db_num_rows($result) == 0) { | |
69 | ||
70 | printf(__("<li>Adding category <b>%s</b>.</li>"), $cat_title); | |
71 | ||
72 | db_query($link, "INSERT INTO ttrss_feed_categories | |
73 | (title,owner_uid) | |
74 | VALUES ('$cat_title', '$owner_uid')"); | |
75 | } | |
76 | ||
77 | db_query($link, "COMMIT"); | |
78 | } | |
79 | } | |
80 | ||
81 | // print "$active_category : $feed_title : $feed_url<br>"; | |
82 | ||
83 | if ($pref_name) { | |
84 | $parent_node = $outline->parentNode; | |
85 | ||
86 | if ($parent_node && $parent_node->nodeName == "outline") { | |
87 | $cat_check = $parent_node->attributes->getNamedItem('title')->nodeValue; | |
88 | if ($cat_check == "tt-rss-prefs") { | |
89 | $pref_value = db_escape_string($outline->attributes->getNamedItem('value')->nodeValue); | |
90 | ||
91 | printf("<li>". | |
92 | __("Setting preference key %s to %s")."</li>", | |
93 | $pref_name, $pref_value); | |
94 | ||
95 | set_pref($link, $pref_name, $pref_value); | |
96 | ||
97 | } | |
98 | } | |
99 | } | |
100 | ||
bbefea90 | 101 | if ($label_name) { |
f59928d7 AD |
102 | $parent_node = $outline->parentNode; |
103 | ||
104 | if ($parent_node && $parent_node->nodeName == "outline") { | |
105 | $cat_check = $parent_node->attributes->getNamedItem('title')->nodeValue; | |
106 | if ($cat_check == "tt-rss-labels") { | |
bbefea90 | 107 | |
f59928d7 AD |
108 | $fg_color = db_escape_string($attributes->getNamedItem('label-fg-color')->nodeValue); |
109 | $bg_color = db_escape_string($attributes->getNamedItem('label-bg-color')->nodeValue); | |
bbefea90 | 110 | |
f59928d7 | 111 | if (!label_find_id($link, $label_name, $_SESSION['uid'])) { |
34aa9e20 | 112 | printf("<li>".__("Adding label %s")."</li>", htmlspecialchars($label_name)); |
f59928d7 AD |
113 | label_create($link, $label_name, $fg_color, $bg_color); |
114 | } else { | |
34aa9e20 AD |
115 | printf("<li>".__("Duplicate label: %s")."</li>", |
116 | htmlspecialchars($label_name)); | |
f59928d7 AD |
117 | } |
118 | } | |
119 | } | |
120 | } | |
bbefea90 | 121 | |
f59928d7 AD |
122 | if ($filter_name) { |
123 | $parent_node = $outline->parentNode; | |
124 | ||
125 | if ($parent_node && $parent_node->nodeName == "outline") { | |
126 | $cat_check = $parent_node->attributes->getNamedItem('title')->nodeValue; | |
127 | if ($cat_check == "tt-rss-filters") { | |
128 | $filter = json_decode($outline->nodeValue, true); | |
129 | ||
130 | if ($filter) { | |
34aa9e20 AD |
131 | $reg_exp = db_escape_string($filter['reg_exp']); |
132 | $filter_type = (int)$filter['filter_type']; | |
133 | $action_id = (int)$filter['action_id']; | |
134 | ||
135 | $result = db_query($link, "SELECT id FROM ttrss_filters WHERE | |
136 | reg_exp = '$reg_exp' AND | |
137 | filter_type = '$filter_type' AND | |
138 | action_id = '$action_id' AND | |
139 | owner_uid = " .$_SESSION['uid']); | |
140 | ||
141 | if (db_num_rows($result) == 0) { | |
142 | $enabled = bool_to_sql_bool($filter['enabled']); | |
143 | $action_param = db_escape_string($filter['action_param']); | |
144 | $inverse = bool_to_sql_bool($filter['inverse']); | |
145 | $filter_param = db_escape_string($filter['filter_param']); | |
146 | $cat_filter = bool_to_sql_bool($filter['cat_filter']); | |
147 | ||
148 | $feed_url = db_escape_string($filter['feed_url']); | |
149 | $cat_title = db_escape_string($filter['cat_title']); | |
150 | ||
151 | $result = db_query($link, "SELECT id FROM ttrss_feeds WHERE | |
152 | feed_url = '$feed_url' AND owner_uid = ".$_SESSION['uid']); | |
153 | ||
154 | if (db_num_rows($result) != 0) { | |
155 | $feed_id = db_fetch_result($result, 0, "id"); | |
156 | } else { | |
157 | $feed_id = "NULL"; | |
158 | } | |
159 | ||
160 | $result = db_query($link, "SELECT id FROM ttrss_feed_categories WHERE | |
161 | title = '$cat_title' AND owner_uid = ".$_SESSION['uid']); | |
162 | ||
163 | if (db_num_rows($result) != 0) { | |
164 | $cat_id = db_fetch_result($result, 0, "id"); | |
165 | } else { | |
166 | $cat_id = "NULL"; | |
167 | } | |
168 | ||
169 | printf("<li>".__("Adding filter %s")."</li>", htmlspecialchars($reg_exp)); | |
170 | ||
171 | $query = "INSERT INTO ttrss_filters (filter_type, action_id, | |
172 | enabled, inverse, action_param, filter_param, | |
173 | cat_filter, feed_id, | |
174 | cat_id, reg_exp, | |
175 | owner_uid) | |
176 | VALUES ($filter_type, $action_id, | |
177 | $enabled, $inverse, '$action_param', '$filter_param', | |
178 | $cat_filter, $feed_id, | |
179 | $cat_id, '$reg_exp', ". | |
180 | $_SESSION['uid'].")"; | |
181 | ||
182 | db_query($link, $query); | |
183 | ||
184 | } else { | |
185 | printf("<li>".__("Duplicate filter %s")."</li>", htmlspecialchars($reg_exp)); | |
186 | ||
187 | } | |
f59928d7 AD |
188 | } |
189 | } | |
bbefea90 AD |
190 | } |
191 | } | |
192 | ||
80edb8b4 AD |
193 | if (!$feed_title || !$feed_url) continue; |
194 | ||
195 | db_query($link, "BEGIN"); | |
196 | ||
197 | $cat_id = null; | |
198 | ||
199 | $parent_node = $outline->parentNode; | |
200 | ||
201 | if ($parent_node && $parent_node->nodeName == "outline") { | |
202 | $element_category = $parent_node->attributes->getNamedItem('title')->nodeValue; | |
203 | if (!$element_category) $element_category = $parent_node->attributes->getNamedItem('text')->nodeValue; | |
204 | ||
205 | } else { | |
206 | $element_category = ''; | |
207 | } | |
208 | ||
209 | if ($element_category) { | |
210 | ||
211 | $element_category = db_escape_string($element_category); | |
212 | ||
213 | $result = db_query($link, "SELECT id FROM | |
214 | ttrss_feed_categories WHERE title = '$element_category' AND | |
215 | owner_uid = '$owner_uid' LIMIT 1"); | |
216 | ||
217 | if (db_num_rows($result) == 1) { | |
218 | $cat_id = db_fetch_result($result, 0, "id"); | |
219 | } | |
220 | } | |
221 | ||
222 | $result = db_query($link, "SELECT id FROM ttrss_feeds WHERE | |
223 | feed_url = '$feed_url' | |
224 | AND owner_uid = '$owner_uid'"); | |
225 | ||
226 | print "<li><a target='_blank' href='$site_url'><b>$feed_title</b></a></b> | |
227 | (<a target='_blank' href=\"$feed_url\">rss</a>) "; | |
228 | ||
229 | if (db_num_rows($result) > 0) { | |
230 | print __('is already imported.'); | |
231 | } else { | |
232 | ||
233 | if ($cat_id) { | |
234 | $add_query = "INSERT INTO ttrss_feeds | |
235 | (title, feed_url, owner_uid, cat_id, site_url) VALUES | |
236 | ('$feed_title', '$feed_url', '$owner_uid', | |
237 | '$cat_id', '$site_url')"; | |
238 | ||
239 | } else { | |
240 | $add_query = "INSERT INTO ttrss_feeds | |
241 | (title, feed_url, owner_uid, cat_id, site_url) VALUES | |
242 | ('$feed_title', '$feed_url', '$owner_uid', '$default_cat_id', | |
243 | '$site_url')"; | |
244 | ||
245 | } | |
246 | ||
247 | //print $add_query; | |
248 | db_query($link, $add_query); | |
249 | ||
250 | print __('OK'); | |
251 | } | |
252 | ||
253 | print "</li>"; | |
254 | ||
255 | db_query($link, "COMMIT"); | |
256 | } | |
257 | ||
258 | } else { | |
259 | print_error(__('Error while parsing document.')); | |
260 | } | |
261 | ||
262 | } else { | |
263 | print_error(__('Error: please upload OPML file.')); | |
264 | } | |
265 | ||
266 | ||
267 | } | |
268 | ||
08ae2a5b | 269 | function opml_export($link, $name, $owner_uid, $hide_private_feeds=false, $include_settings=true) { |
e9558345 AD |
270 | if (!$_REQUEST["debug"]) { |
271 | header("Content-type: application/xml+opml"); | |
bbefea90 | 272 | header("Content-Disposition: attachment; filename=" . $name ); |
e9558345 AD |
273 | } else { |
274 | header("Content-type: text/xml"); | |
275 | } | |
08ae2a5b | 276 | |
981e8107 | 277 | print "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; |
4e9f5c24 | 278 | |
9a4506c8 | 279 | print "<opml version=\"1.0\">"; |
a90005e6 AD |
280 | print "<head> |
281 | <dateCreated>" . date("r", time()) . "</dateCreated> | |
282 | <title>Tiny Tiny RSS Feed Export</title> | |
0a13e84e | 283 | </head>"; |
9a4506c8 AD |
284 | print "<body>"; |
285 | ||
da49ccf5 | 286 | $cat_mode = false; |
0a13e84e | 287 | |
86e26f1a MK |
288 | $select = "SELECT * "; |
289 | $where = "WHERE owner_uid = '$owner_uid'"; | |
290 | $orderby = "ORDER BY title"; | |
291 | if ($hide_private_feeds){ | |
0a13e84e | 292 | $where = "WHERE owner_uid = '$owner_uid' AND private IS false AND |
c107797c | 293 | auth_login = '' AND auth_pass = ''"; |
86e26f1a | 294 | } |
da49ccf5 | 295 | |
fee909d5 MK |
296 | |
297 | ||
298 | if (get_pref($link, 'ENABLE_FEED_CATS', $owner_uid) == true) { | |
da49ccf5 | 299 | $cat_mode = true; |
0a13e84e | 300 | $select = "SELECT |
86e26f1a MK |
301 | title, feed_url, site_url, |
302 | (SELECT title FROM ttrss_feed_categories WHERE id = cat_id) as cat_title"; | |
303 | $orderby = "ORDER BY cat_title, title"; | |
304 | ||
da49ccf5 | 305 | } |
fee909d5 MK |
306 | else{ |
307 | $cat_feed = get_pref($link, 'ENABLE_FEED_CATS'); | |
308 | print "<!-- feeding cats is not enabled -->"; | |
309 | print "<!-- $cat_feed -->"; | |
310 | ||
311 | } | |
312 | ||
da49ccf5 | 313 | |
86e26f1a MK |
314 | $result = db_query($link, $select." FROM ttrss_feeds ".$where." ".$orderby); |
315 | ||
da49ccf5 | 316 | $old_cat_title = ""; |
9a4506c8 | 317 | |
8158c57a | 318 | while ($line = db_fetch_assoc($result)) { |
6e0584e9 AD |
319 | $title = htmlspecialchars($line["title"]); |
320 | $url = htmlspecialchars($line["feed_url"]); | |
fa7b8749 | 321 | $site_url = htmlspecialchars($line["site_url"]); |
9a4506c8 | 322 | |
da49ccf5 AD |
323 | if ($cat_mode) { |
324 | $cat_title = htmlspecialchars($line["cat_title"]); | |
325 | ||
326 | if ($old_cat_title != $cat_title) { | |
327 | if ($old_cat_title) { | |
0a13e84e | 328 | print "</outline>\n"; |
da49ccf5 AD |
329 | } |
330 | ||
5b9af2b9 | 331 | if ($cat_title) { |
fee909d5 | 332 | print "<outline title=\"$cat_title\" text=\"$cat_title\" >\n"; |
5b9af2b9 | 333 | } |
da49ccf5 AD |
334 | |
335 | $old_cat_title = $cat_title; | |
336 | } | |
337 | } | |
338 | ||
fa7b8749 AD |
339 | if ($site_url) { |
340 | $html_url_qpart = "htmlUrl=\"$site_url\""; | |
341 | } else { | |
342 | $html_url_qpart = ""; | |
343 | } | |
344 | ||
345 | print "<outline text=\"$title\" xmlUrl=\"$url\" $html_url_qpart/>\n"; | |
9a4506c8 AD |
346 | } |
347 | ||
da49ccf5 | 348 | if ($cat_mode && $old_cat_title) { |
0a13e84e | 349 | print "</outline>\n"; |
da49ccf5 AD |
350 | } |
351 | ||
e9558345 AD |
352 | # export tt-rss settings |
353 | ||
442f326b AD |
354 | if ($include_settings) { |
355 | print "<outline title=\"tt-rss-prefs\" schema-version=\"".SCHEMA_VERSION."\">"; | |
e9558345 | 356 | |
442f326b AD |
357 | $result = db_query($link, "SELECT pref_name, value FROM ttrss_user_prefs WHERE |
358 | profile IS NULL AND owner_uid = " . $_SESSION["uid"]); | |
e9558345 | 359 | |
442f326b | 360 | while ($line = db_fetch_assoc($result)) { |
e9558345 | 361 | |
442f326b AD |
362 | $name = $line["pref_name"]; |
363 | $value = htmlspecialchars($line["value"]); | |
0a13e84e | 364 | |
442f326b | 365 | print "<outline pref-name=\"$name\" value=\"$value\">"; |
e9558345 | 366 | |
442f326b | 367 | print "</outline>"; |
e9558345 | 368 | |
0a13e84e | 369 | } |
e9558345 | 370 | |
442f326b | 371 | print "</outline>"; |
bbefea90 | 372 | |
cfb665c0 | 373 | print "<outline title=\"tt-rss-labels\" schema-version=\"".SCHEMA_VERSION."\">"; |
bbefea90 AD |
374 | |
375 | $result = db_query($link, "SELECT * FROM ttrss_labels2 WHERE | |
376 | owner_uid = " . $_SESSION['uid']); | |
377 | ||
378 | while ($line = db_fetch_assoc($result)) { | |
379 | $name = htmlspecialchars($line['caption']); | |
380 | $fg_color = htmlspecialchars($line['fg_color']); | |
381 | $bg_color = htmlspecialchars($line['bg_color']); | |
382 | ||
383 | print "<outline label-name=\"$name\" label-fg-color=\"$fg_color\" label-bg-color=\"$bg_color\"/>"; | |
384 | ||
385 | } | |
386 | ||
7d926cfc AD |
387 | print "</outline>"; |
388 | ||
cfb665c0 | 389 | print "<outline title=\"tt-rss-filters\" schema-version=\"".SCHEMA_VERSION."\">"; |
7d926cfc AD |
390 | |
391 | $result = db_query($link, "SELECT filter_type, | |
392 | reg_exp, | |
393 | action_id, | |
394 | enabled, | |
395 | action_param, | |
396 | inverse, | |
397 | filter_param, | |
398 | cat_filter, | |
cfb665c0 | 399 | ttrss_feeds.feed_url AS feed_url, |
7d926cfc AD |
400 | ttrss_feed_categories.title AS cat_title |
401 | FROM ttrss_filters | |
402 | LEFT JOIN ttrss_feeds ON (feed_id = ttrss_feeds.id) | |
403 | LEFT JOIN ttrss_feed_categories ON (ttrss_filters.cat_id = ttrss_feed_categories.id) | |
404 | WHERE | |
405 | ttrss_filters.owner_uid = " . $_SESSION['uid']); | |
406 | ||
407 | while ($line = db_fetch_assoc($result)) { | |
408 | $name = htmlspecialchars($line['reg_exp']); | |
409 | ||
410 | foreach (array('enabled', 'inverse', 'cat_filter') as $b) { | |
411 | $line[$b] = sql_bool_to_bool($line[$b]); | |
412 | } | |
413 | ||
414 | $filter = json_encode($line); | |
415 | ||
416 | print "<outline filter-name=\"$name\">$filter</outline>"; | |
417 | ||
418 | } | |
419 | ||
420 | ||
bbefea90 | 421 | print "</outline>"; |
442f326b | 422 | } |
e9558345 | 423 | |
9a4506c8 AD |
424 | print "</body></opml>"; |
425 | } | |
426 | ||
30f782a2 AD |
427 | // FIXME there are some brackets issues here |
428 | ||
429 | $op = $_REQUEST["op"]; | |
08ae2a5b CM |
430 | if (!$op) $op = "Export"; |
431 | ||
432 | $output_name = $_REQUEST["filename"]; | |
433 | if (!$output_name) $output_name = "TinyTinyRSS.opml"; | |
0a13e84e | 434 | |
08ae2a5b | 435 | $show_settings = $_REQUEST["settings"]; |
0a13e84e | 436 | |
30f782a2 | 437 | if ($op == "Export") { |
0a13e84e | 438 | |
a4234239 MK |
439 | login_sequence($link); |
440 | $owner_uid = $_SESSION["uid"]; | |
08ae2a5b | 441 | return opml_export($link, $output_name, $owner_uid, false, ($show_settings == 1)); |
30f782a2 | 442 | } |
0a13e84e | 443 | |
442f326b | 444 | if ($op == "publish"){ |
86e26f1a MK |
445 | $key = db_escape_string($_REQUEST["key"]); |
446 | ||
2e7f046f AD |
447 | $result = db_query($link, "SELECT owner_uid |
448 | FROM ttrss_access_keys WHERE | |
449 | access_key = '$key' AND feed_id = 'OPML:Publish'"); | |
86e26f1a MK |
450 | |
451 | if (db_num_rows($result) == 1) { | |
2e7f046f | 452 | $owner_uid = db_fetch_result($result, 0, "owner_uid"); |
08ae2a5b | 453 | return opml_export($link, "", $owner_uid, true, false); |
86e26f1a MK |
454 | } else { |
455 | print "<error>User not found</error>"; | |
456 | } | |
457 | } | |
30f782a2 | 458 | |
e98a3f65 | 459 | if ($op == "Import") { |
8158c57a | 460 | |
a4234239 MK |
461 | login_sequence($link); |
462 | $owner_uid = $_SESSION["uid"]; | |
463 | ||
e9558345 AD |
464 | header('Content-Type: text/html; charset=utf-8'); |
465 | ||
e98a3f65 AD |
466 | print "<html> |
467 | <head> | |
ef59e6e8 | 468 | <link rel=\"stylesheet\" href=\"utility.css\" type=\"text/css\"> |
1025ad87 | 469 | <title>".__("OPML Utility")."</title> |
e9558345 | 470 | <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/> |
e98a3f65 | 471 | </head> |
04f6df27 | 472 | <body> |
0ae2bb2a | 473 | <div class=\"floatingLogo\"><img src=\"images/logo_wide.png\"></div> |
d1db26aa | 474 | <h1>".__('OPML Utility')."</h1>"; |
9f311df6 | 475 | |
c03cf250 AD |
476 | db_query($link, "BEGIN"); |
477 | ||
478 | /* create Imported feeds category just in case */ | |
479 | ||
480 | $result = db_query($link, "SELECT id FROM | |
481 | ttrss_feed_categories WHERE title = 'Imported feeds' AND | |
482 | owner_uid = '$owner_uid' LIMIT 1"); | |
483 | ||
484 | if (db_num_rows($result) == 0) { | |
485 | db_query($link, "INSERT INTO ttrss_feed_categories | |
0a13e84e | 486 | (title,owner_uid) |
c03cf250 AD |
487 | VALUES ('Imported feeds', '$owner_uid')"); |
488 | } | |
489 | ||
490 | db_query($link, "COMMIT"); | |
491 | ||
0a13e84e | 492 | print "<p>".__("Importing OPML...")."</p>"; |
0a13e84e | 493 | opml_import_domdoc($link, $owner_uid); |
9f311df6 | 494 | |
d7c848d9 | 495 | print "<br><form method=\"GET\" action=\"prefs.php\"> |
1025ad87 | 496 | <input type=\"submit\" value=\"".__("Return to preferences")."\"> |
d7c848d9 | 497 | </form>"; |
9f311df6 | 498 | |
30f782a2 | 499 | print "</body></html>"; |
9f311df6 AD |
500 | |
501 | } | |
502 | ||
3d477c2c | 503 | // if ($link) db_close($link); |
9f311df6 | 504 | |
9a4506c8 | 505 | ?> |