<?
/*
| This file is part of the Igloo Weblog system.
| Igloo is available under the GNU General Public
| License. For details on the GNU General Public
| License, read the COPYING or the LICENSE file
| that you received with this distribution. If
| you did not receive one of these files with the
| distribution, you can find more information at
| http://www.gnu.org.
|
| Igloo is the creation of Brad Johnson. It is not
| based on any other works. Brad Johnson is the
| sole owner of the copyright, but he welcomes all
| to take the software, use it, modify it, change
| it, or to do whatever they can do with it under
| the provisions of the GNU General Public License.
|
| This software is provided as-is, with no warranty
| whatsoever. The author is not responsible for
| anything that may happen as a result of your
| using this software unless you have purchased an
| extended warranty. If you would like to
| purchase an extended warranty, please contact
| Brad Johnson via e-mail at hide@address.com
|
| This software may destroy your system, date your
| sister, drink your beer, eat the last of the
| potato chips, cause Democrats to get elected,
| kick your dog, burn your house, wreck your car,
| cause nuclear war, force you to kiss your
| grandmother, or make you eat brussel sprouts.
| You have been warned.
|
| If it breaks, you may feel free to keep both
| pieces.
*/
require "../config.inc";
require "$config[private]/local.inc";
common_header();
print "<tr>\n";
print " <th colspan=\"2\">\n";
print " Adding Links\n";
print " </th>\n";
print "</tr>\n";
print "<tr>\n";
print " <td colspan=\"2\">\n";
if ($submit) {
$Results = do_mysql_query("INSERT INTO links VALUES ('$section', '$name', '$address')")
or die("I could not INSERT INTO the database\n");
print " Link added\n";
}
print " </td>\n";
print "</tr>\n";
print "<form action=\"/admin/add_links.php\" method=\"post\">\n";
print "<tr>\n";
print " <td>\n";
print " Section:\n";
print " </td>\n";
print " <td>\n";
print " <select name=\"section\">\n";
$Results = do_mysql_query("SELECT * FROM link_sections");
while ($Row = mysql_fetch_array($Results)) {
print " <option value=\"$Row[short_name]\">$Row[long_name]</option>\n";
}
mysql_free_result($Results);
print " </select>\n";
print " </td>\n";
print "</tr>\n";
print "<tr>\n";
print " <td>\n";
print " Site Name:\n";
print " </td>\n";
print " <td>\n";
print " <input type=\"text\" name=\"name\">\n";
print " </td>\n";
print "</tr>\n";
print "<tr>\n";
print " <td>\n";
print " Address:\n";
print " </td>\n";
print " <td>\n";
print " <input type=\"text\" name=\"address\">\n";
print " </td>\n";
print "</tr>\n";
print "<tr>\n";
print " <td>\n";
print " \n";
print " </td>\n";
print " <td>\n";
print " <input type=\"submit\" name=\"submit\" value=\"Submit Link\">\n";
print " </td>\n";
print "</tr>\n";
common_footer();
?>