5 * Copyright 1999-2001 (c) VA Linux Systems
7 * This file is part of FusionForge. FusionForge is free software;
8 * you can redistribute it and/or modify it under the terms of the
9 * GNU General Public License as published by the Free Software
10 * Foundation; either version 2 of the Licence, or (at your option)
13 * FusionForge is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 require_once '../env.inc.php';
24 require_once $gfcommon.'include/pre.php';
25 require_once $gfwww.'include/bookmarks.php';
27 site_user_header(array("title"=>_('Add a new Bookmark')));
29 $bookmark_url = trim(getStringFromRequest('bookmark_url'));
30 $bookmark_title = trim(getStringFromRequest('bookmark_title'));
32 if (getStringFromRequest('submit') && $bookmark_url && $bookmark_title) {
34 printf(_('Added bookmark for <strong>%1$s</strong> with title <strong>%2$s</strong>'),
35 htmlspecialchars($bookmark_url),
36 htmlspecialchars($bookmark_title));
38 bookmark_add ($bookmark_url, $bookmark_title);
39 print "<a href=\"$bookmark_url\">"._('Visit the bookmarked page')."</a> - ";
40 print "<a href=\"/my/\">"._('Back to your homepage')."</a>";
44 <form action="<?php echo getStringFromServer('PHP_SELF'); ?>" method="post">
46 <label for="bookmark_url">
47 <?php echo _('Bookmark URL')._(':'); ?><br />
49 <input id="bookmark_url" required="required" type="url" name="bookmark_url" value="http://" />
52 <label for="bookmark_title">
53 <?php echo _('Bookmark Title')._(':'); ?><br />
55 <input id="bookmark_title" required="required" type="text" name="bookmark_title" value="" />
57 <p><input type="submit" name="submit" value="<?php echo _('Submit') ?>" /></p>
62 site_user_footer(array());