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:
parent
cbc0bca320
commit
9756793f2a
|
@ -133,4 +133,4 @@ xmp { /* Just in case */
|
||||||
margin: 20px auto 10px auto;
|
margin: 20px auto 10px auto;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
form { margin: 0; padding: 0; } /* thanks #mozilla */
|
form { margin: 0; padding: 0; } /* thanks #mozilla */
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
<body>
|
<body>
|
||||||
<h1 id="header"><a href="<?php echo $siteurl; ?>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a></h1>
|
<h1 id="header"><a href="<?php echo $siteurl; ?>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a></h1>
|
||||||
|
|
||||||
|
|
||||||
<div id="content">
|
<div id="content">
|
||||||
|
|
||||||
<!-- // b2 loop start -->
|
<!-- // b2 loop start -->
|
||||||
|
@ -105,8 +104,8 @@
|
||||||
<li><a href="b2register.php">register</a></li>
|
<li><a href="b2register.php">register</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<?php include_once('links.php') ?>
|
<?php require_once('wp-links/links.php') ?>
|
||||||
<?php include_once('links.weblogs.com.php') ?>
|
<?php require_once('wp-links/links.weblogs.com.php') ?>
|
||||||
<li>Links:
|
<li>Links:
|
||||||
<ul>
|
<ul>
|
||||||
<?php get_links(-1, '<li>', '</li>', '', 0, '_updated', 0, 0, -1, 1 )?>
|
<?php get_links(-1, '<li>', '</li>', '', 0, '_updated', 0, 0, -1, 1 )?>
|
||||||
|
|
|
@ -27,8 +27,8 @@
|
||||||
// Mike Little (mike@zed1.com)
|
// Mike Little (mike@zed1.com)
|
||||||
// *****************************************************************
|
// *****************************************************************
|
||||||
|
|
||||||
include_once('links.config.php');
|
require_once('wp-links/links.config.php');
|
||||||
include_once('links.php');
|
require_once('wp-links/links.php');
|
||||||
|
|
||||||
$title = "Link Categories";
|
$title = "Link Categories";
|
||||||
|
|
||||||
|
@ -52,11 +52,11 @@ switch ($action) {
|
||||||
case "addcat":
|
case "addcat":
|
||||||
{
|
{
|
||||||
$standalone = 1;
|
$standalone = 1;
|
||||||
include_once("./b2header.php");
|
require_once("./b2header.php");
|
||||||
|
|
||||||
if ($user_level < $minadminlevel)
|
if ($user_level < $minadminlevel)
|
||||||
die ("Cheatin' uh ?");
|
die ("Cheatin' uh ?");
|
||||||
|
|
||||||
$cat_name=addslashes($HTTP_POST_VARS["cat_name"]);
|
$cat_name=addslashes($HTTP_POST_VARS["cat_name"]);
|
||||||
$auto_toggle = $HTTP_POST_VARS["auto_toggle"];
|
$auto_toggle = $HTTP_POST_VARS["auto_toggle"];
|
||||||
if ($auto_toggle != 'Y') {
|
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')";
|
$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());
|
$result=mysql_query($query) or die("Couldn't add category <b>$cat_name</b>".mysql_error());
|
||||||
|
|
||||||
header("Location: linkcategories.php");
|
header("Location: linkcategories.php");
|
||||||
break;
|
break;
|
||||||
} // end addcat
|
} // end addcat
|
||||||
case "Delete":
|
case "Delete":
|
||||||
{
|
{
|
||||||
$standalone = 1;
|
$standalone = 1;
|
||||||
include_once("./b2header.php");
|
require_once("./b2header.php");
|
||||||
include_once("./links.php");
|
|
||||||
|
|
||||||
$cat_id = $HTTP_POST_VARS["cat_id"];
|
$cat_id = $HTTP_POST_VARS["cat_id"];
|
||||||
$cat_name=get_linkcatname($cat_id);
|
$cat_name=get_linkcatname($cat_id);
|
||||||
|
@ -84,10 +83,10 @@ switch ($action) {
|
||||||
|
|
||||||
if ($user_level < $minadminlevel)
|
if ($user_level < $minadminlevel)
|
||||||
die ("Cheatin' uh ?");
|
die ("Cheatin' uh ?");
|
||||||
|
|
||||||
$query="DELETE FROM $tablelinkcategories WHERE cat_id=\"$cat_id\"";
|
$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());
|
$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'";
|
$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>");
|
$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
|
} // end delete
|
||||||
case "Edit":
|
case "Edit":
|
||||||
{
|
{
|
||||||
include_once ("./b2header.php");
|
require_once ("./b2header.php");
|
||||||
include_once("./links.php");
|
|
||||||
$cat_id = $HTTP_POST_VARS["cat_id"];
|
$cat_id = $HTTP_POST_VARS["cat_id"];
|
||||||
$cat_name=get_linkcatname($cat_id);
|
$cat_name=get_linkcatname($cat_id);
|
||||||
$cat_name=addslashes($cat_name);
|
//$cat_name=addslashes($cat_name);
|
||||||
$auto_toggle=get_autotoggle($cat_id);
|
$auto_toggle=get_autotoggle($cat_id);
|
||||||
?>
|
?>
|
||||||
<?php echo $blankline; ?>
|
<?php echo $blankline; ?>
|
||||||
|
@ -112,10 +110,11 @@ switch ($action) {
|
||||||
<input type="hidden" name="action" value="editedcat" />
|
<input type="hidden" name="action" value="editedcat" />
|
||||||
<input type="hidden" name="cat_id" value="<?php echo $HTTP_POST_VARS["cat_id"] ?>" />
|
<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="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" />
|
<input type="submit" name="submit" value="Edit it !" class="search" />
|
||||||
</form>
|
</form>
|
||||||
</p>
|
</p>
|
||||||
|
<p>Back to <a href="linkcategories.php">manage link categories</a></p>
|
||||||
<?php echo $tablebottom; ?>
|
<?php echo $tablebottom; ?>
|
||||||
<?php
|
<?php
|
||||||
break;
|
break;
|
||||||
|
@ -123,25 +122,25 @@ switch ($action) {
|
||||||
case "editedcat":
|
case "editedcat":
|
||||||
{
|
{
|
||||||
$standalone = 1;
|
$standalone = 1;
|
||||||
include_once("./b2header.php");
|
require_once("./b2header.php");
|
||||||
|
|
||||||
if ($user_level < $minadminlevel)
|
if ($user_level < $minadminlevel)
|
||||||
die ("Cheatin' uh ?");
|
die ("Cheatin' uh ?");
|
||||||
|
|
||||||
$cat_name=addslashes($HTTP_POST_VARS["cat_name"]);
|
$cat_name=addslashes($HTTP_POST_VARS["cat_name"]);
|
||||||
$cat_id=$HTTP_POST_VARS["cat_id"];
|
$cat_id=$HTTP_POST_VARS["cat_id"];
|
||||||
$auto_toggle=$HTTP_POST_VARS["auto_toggle"];
|
$auto_toggle=$HTTP_POST_VARS["auto_toggle"];
|
||||||
|
|
||||||
$query="UPDATE $tablelinkcategories SET cat_name='$cat_name', auto_toggle='$auto_toggle' WHERE cat_id=$cat_id";
|
$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());
|
$result=mysql_query($query) or die("Couldn't edit link category <b>$cat_name</b>: ".$query.mysql_error());
|
||||||
|
|
||||||
header("Location: linkcategories.php");
|
header("Location: linkcategories.php");
|
||||||
break;
|
break;
|
||||||
} // end edit
|
} // end editedcat
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
$standalone=0;
|
$standalone=0;
|
||||||
include_once ("./b2header.php");
|
require_once ("./b2header.php");
|
||||||
if ($user_level < $minadminlevel) {
|
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> :)");
|
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> :)");
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,8 +27,8 @@
|
||||||
// Mike Little (mike@zed1.com)
|
// Mike Little (mike@zed1.com)
|
||||||
// *****************************************************************
|
// *****************************************************************
|
||||||
|
|
||||||
include_once('links.config.php');
|
require_once('wp-links/links.config.php');
|
||||||
include_once("./links.php");
|
require_once("wp-links/links.php");
|
||||||
|
|
||||||
$title = "Manage Links";
|
$title = "Manage Links";
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ switch ($action) {
|
||||||
case "Add":
|
case "Add":
|
||||||
{
|
{
|
||||||
$standalone = 1;
|
$standalone = 1;
|
||||||
include_once("./b2header.php");
|
require_once("./b2header.php");
|
||||||
|
|
||||||
$link_url = $HTTP_POST_VARS["linkurl"];
|
$link_url = $HTTP_POST_VARS["linkurl"];
|
||||||
$link_name = $HTTP_POST_VARS["name"];
|
$link_name = $HTTP_POST_VARS["name"];
|
||||||
|
@ -124,7 +124,7 @@ switch ($action) {
|
||||||
$links_show_cat_id = $cat_id;
|
$links_show_cat_id = $cat_id;
|
||||||
|
|
||||||
$standalone = 1;
|
$standalone = 1;
|
||||||
include_once("./b2header.php");
|
require_once("./b2header.php");
|
||||||
|
|
||||||
$link_id = $HTTP_POST_VARS["link_id"];
|
$link_id = $HTTP_POST_VARS["link_id"];
|
||||||
$link_url = $HTTP_POST_VARS["linkurl"];
|
$link_url = $HTTP_POST_VARS["linkurl"];
|
||||||
|
@ -167,7 +167,7 @@ switch ($action) {
|
||||||
case "Delete":
|
case "Delete":
|
||||||
{
|
{
|
||||||
$standalone = 1;
|
$standalone = 1;
|
||||||
include_once("./b2header.php");
|
require_once("./b2header.php");
|
||||||
|
|
||||||
$link_id = $HTTP_POST_VARS["link_id"];
|
$link_id = $HTTP_POST_VARS["link_id"];
|
||||||
|
|
||||||
|
@ -192,7 +192,7 @@ switch ($action) {
|
||||||
case "linkedit":
|
case "linkedit":
|
||||||
{
|
{
|
||||||
$standalone=0;
|
$standalone=0;
|
||||||
include_once ("./b2header.php");
|
require_once ("./b2header.php");
|
||||||
if ($user_level < $minadminlevel) {
|
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> :)");
|
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';
|
$order_by = 'order_id';
|
||||||
setcookie('links_show_cat_id', $links_show_cat_id, time()+600);
|
setcookie('links_show_cat_id', $links_show_cat_id, time()+600);
|
||||||
$standalone=0;
|
$standalone=0;
|
||||||
include_once ("./b2header.php");
|
require_once ("./b2header.php");
|
||||||
if ($user_level < $minadminlevel) {
|
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> :)");
|
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> :)");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue