Assorted changes, plus moved most of the links files to subdir wp-links.

git-svn-id: http://svn.automattic.com/wordpress/trunk@36 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
mikelittle 2003-05-22 01:28:49 +00:00
parent cbc0bca320
commit 9756793f2a
4 changed files with 27 additions and 29 deletions

View File

@ -133,4 +133,4 @@ xmp { /* Just in case */
margin: 20px auto 10px auto;
padding: 10px;
}
form { margin: 0; padding: 0; } /* thanks #mozilla */
form { margin: 0; padding: 0; } /* thanks #mozilla */

View File

@ -22,7 +22,6 @@
<body>
<h1 id="header"><a href="<?php echo $siteurl; ?>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a></h1>
<div id="content">
<!-- // b2 loop start -->
@ -105,8 +104,8 @@
<li><a href="b2register.php">register</a></li>
</ul>
</li>
<?php include_once('links.php') ?>
<?php include_once('links.weblogs.com.php') ?>
<?php require_once('wp-links/links.php') ?>
<?php require_once('wp-links/links.weblogs.com.php') ?>
<li>Links:
<ul>
<?php get_links(-1, '<li>', '</li>', '', 0, '_updated', 0, 0, -1, 1 )?>

View File

@ -27,8 +27,8 @@
// Mike Little (mike@zed1.com)
// *****************************************************************
include_once('links.config.php');
include_once('links.php');
require_once('wp-links/links.config.php');
require_once('wp-links/links.php');
$title = "Link Categories";
@ -52,11 +52,11 @@ switch ($action) {
case "addcat":
{
$standalone = 1;
include_once("./b2header.php");
require_once("./b2header.php");
if ($user_level < $minadminlevel)
die ("Cheatin' uh ?");
$cat_name=addslashes($HTTP_POST_VARS["cat_name"]);
$auto_toggle = $HTTP_POST_VARS["auto_toggle"];
if ($auto_toggle != 'Y') {
@ -65,15 +65,14 @@ switch ($action) {
$query="INSERT INTO $tablelinkcategories (cat_id,cat_name, auto_toggle) VALUES ('0', '$cat_name', '$auto_toggle')";
$result=mysql_query($query) or die("Couldn't add category <b>$cat_name</b>".mysql_error());
header("Location: linkcategories.php");
break;
} // end addcat
case "Delete":
{
$standalone = 1;
include_once("./b2header.php");
include_once("./links.php");
require_once("./b2header.php");
$cat_id = $HTTP_POST_VARS["cat_id"];
$cat_name=get_linkcatname($cat_id);
@ -84,10 +83,10 @@ switch ($action) {
if ($user_level < $minadminlevel)
die ("Cheatin' uh ?");
$query="DELETE FROM $tablelinkcategories WHERE cat_id=\"$cat_id\"";
$result=mysql_query($query) or die("Couldn't delete link category <b>$cat_name</b>".mysql_error());
$query="UPDATE $tablelinks SET link_category=1 WHERE link_category='$cat_id'";
$result=mysql_query($query) or die("Couldn't reset category on links where category was <b>$cat_name</b>");
@ -96,11 +95,10 @@ switch ($action) {
} // end delete
case "Edit":
{
include_once ("./b2header.php");
include_once("./links.php");
require_once ("./b2header.php");
$cat_id = $HTTP_POST_VARS["cat_id"];
$cat_name=get_linkcatname($cat_id);
$cat_name=addslashes($cat_name);
//$cat_name=addslashes($cat_name);
$auto_toggle=get_autotoggle($cat_id);
?>
<?php echo $blankline; ?>
@ -112,10 +110,11 @@ switch ($action) {
<input type="hidden" name="action" value="editedcat" />
<input type="hidden" name="cat_id" value="<?php echo $HTTP_POST_VARS["cat_id"] ?>" />
<input type="text" name="cat_name" value="<?php echo $cat_name ?>" /><br />
<input type="checkbox" name="auto_toggle" value="Y" <?php echo $auto_toggle = "Y" ? '"checked"' : ''; ?>/> auto-toggle?<br />
<input type="checkbox" name="auto_toggle" value="Y" <?php echo $auto_toggle == "Y" ? '"checked"' : ''; ?>/> auto-toggle?<br />
<input type="submit" name="submit" value="Edit it !" class="search" />
</form>
</p>
<p>Back to <a href="linkcategories.php">manage link categories</a></p>
<?php echo $tablebottom; ?>
<?php
break;
@ -123,25 +122,25 @@ switch ($action) {
case "editedcat":
{
$standalone = 1;
include_once("./b2header.php");
require_once("./b2header.php");
if ($user_level < $minadminlevel)
die ("Cheatin' uh ?");
$cat_name=addslashes($HTTP_POST_VARS["cat_name"]);
$cat_id=$HTTP_POST_VARS["cat_id"];
$auto_toggle=$HTTP_POST_VARS["auto_toggle"];
$query="UPDATE $tablelinkcategories SET cat_name='$cat_name', auto_toggle='$auto_toggle' WHERE cat_id=$cat_id";
$result=mysql_query($query) or die("Couldn't edit link category <b>$cat_name</b>: ".$query.mysql_error());
header("Location: linkcategories.php");
break;
} // end edit
} // end editedcat
default:
{
$standalone=0;
include_once ("./b2header.php");
require_once ("./b2header.php");
if ($user_level < $minadminlevel) {
die("You have no right to edit the link categories for this blog.<br>Ask for a promotion to your <a href=\"mailto:$admin_email\">blog admin</a> :)");
}

View File

@ -27,8 +27,8 @@
// Mike Little (mike@zed1.com)
// *****************************************************************
include_once('links.config.php');
include_once("./links.php");
require_once('wp-links/links.config.php');
require_once("wp-links/links.php");
$title = "Manage Links";
@ -75,7 +75,7 @@ switch ($action) {
case "Add":
{
$standalone = 1;
include_once("./b2header.php");
require_once("./b2header.php");
$link_url = $HTTP_POST_VARS["linkurl"];
$link_name = $HTTP_POST_VARS["name"];
@ -124,7 +124,7 @@ switch ($action) {
$links_show_cat_id = $cat_id;
$standalone = 1;
include_once("./b2header.php");
require_once("./b2header.php");
$link_id = $HTTP_POST_VARS["link_id"];
$link_url = $HTTP_POST_VARS["linkurl"];
@ -167,7 +167,7 @@ switch ($action) {
case "Delete":
{
$standalone = 1;
include_once("./b2header.php");
require_once("./b2header.php");
$link_id = $HTTP_POST_VARS["link_id"];
@ -192,7 +192,7 @@ switch ($action) {
case "linkedit":
{
$standalone=0;
include_once ("./b2header.php");
require_once ("./b2header.php");
if ($user_level < $minadminlevel) {
die("You have no right to edit the links for this blog.<br>Ask for a promotion to your <a href=\"mailto:$admin_email\">blog admin</a> :)");
}
@ -326,7 +326,7 @@ switch ($action) {
$order_by = 'order_id';
setcookie('links_show_cat_id', $links_show_cat_id, time()+600);
$standalone=0;
include_once ("./b2header.php");
require_once ("./b2header.php");
if ($user_level < $minadminlevel) {
die("You have no right to edit the links for this blog.<br>Ask for a promotion to your <a href=\"mailto:$admin_email\">blog admin</a> :)");
}