Link manager fixes and HTML cleanup.

git-svn-id: http://svn.automattic.com/wordpress/trunk@654 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2003-12-27 20:55:03 +00:00
parent 738be91fcd
commit 4aab651a88
6 changed files with 301 additions and 261 deletions

View File

@ -128,23 +128,7 @@ default:
die("You have no right to edit the categories for this blog.<br />Ask for a promotion to your <a href='mailto:$admin_email'>blog admin</a>. :)");
}
?>
<style type="text/css">
.edit, .delete, .edit:hover, .delete:hover {
display: block;
text-align: center;
border-bottom: none;
}
.edit:hover {
background-color: #ccc;
color: #fff;
}
.delete:hover {
background-color: #c00;
color: #fff;
}
</style>
<div class="wrap">
<h2>Current Categories</h2>
<table width="100%" cellpadding="3" cellspacing="3">

View File

@ -63,138 +63,172 @@ require('admin-header.php');
<li><a href="link-categories.php">Link Categories</a></li>
<li class="last"><a href="link-import.php">Import Blogroll</a></li>
</ul>
<style type="text/css" media="screen">
th { text-align: right; }
</style>
<div class="wrap">
<table width="100%" cellpadding="3" cellspacing="3">
<form name="addlink" method="post" action="link-manager.php">
<input type="hidden" name="action" value="Add" />
<tr><td colspan="2"><strong>Add</strong> a link:<?php echo gethelp_link($this_file,'add_a_link');?></td></tr>
<tr>
<td align="right">URL:</td>
<td><input type="text" name="linkurl" size="80" value="<?php echo $link_url; ?>"></td>
</tr>
<tr>
<td align="right">Display Name/Alt text:</td>
<td><input type="text" name="name" size="80" value="<?php echo $link_name; ?>"></td>
</tr>
<tr>
<td align="right">Image:</td>
<td><input type="text" name="image" size="80" value=""></td>
</tr>
<tr>
<td align="right">Description:</td>
<td><input type="text" name="description" size="80" value=""></td>
</tr>
<tr>
<td align="right">rel:</td>
<td><input type="text" name="rel" id="rel" size="80" value=""></td>
</tr>
<tr>
<td valign="top" align="right"><a href="http://gmpg.org/xfn/">XFN</a>:</td>
<td> <table cellspacing="0">
<tr>
<th scope="row">
friendship
</th>
<td>
<label for="friendship-aquaintance"><input class="valinp" type="radio" name="friendship" value="acquaintance" id="friendship-aquaintance" /> acquaintance</label> <label for="friendship-friend"><input class="valinp" type="radio" name="friendship" value="friend" id="friendship-friend" /> friend</label> <label for="friendship-none"><input class="valinp" type="radio" name="friendship" value="" id="friendship-none" /> none</label>
</td>
</tr>
<tr>
<th scope="row">
physical
</th>
<td>
<label for="met"><input class="valinp" type="checkbox" name="physical" value="met" id="met" /> met</label>
</td>
</tr>
<tr>
<th scope="row">
professional
</th>
<td>
<label for="co-worker"><input class="valinp" type="checkbox" name="professional" value="co-worker" id="co-worker" /> co-worker</label> <label for="colleague"><input class="valinp" type="checkbox" name="professional" value="colleague" id="colleague" /> colleague</label>
</td>
</tr>
<tr>
<th scope="row">
geographical
</th>
<td>
<label for="co-resident"><input class="valinp" type="radio" name="geographical" value="co-resident" id="co-resident" /> co-resident</label> <label for="neighbor"><input class="valinp" type="radio" name="geographical" value="neighbor" id="neighbor" /> neighbor</label> <label for="geographical-none"><input class="valinp" type="radio" name="geographical" value="" id="geographical-none" /> none</label>
</td>
</tr>
<tr>
<th scope="row">
family
</th>
<td>
<label for="family-child"><input class="valinp" type="radio" name="family" value="child" id="family-child" /> child</label> <label for="family-parent"><input class="valinp" type="radio" name="family" value="parent" id="family-parent" /> parent</label> <label for="family-sibling"><input class="valinp" type="radio" name="family" value="sibling" id="family-sibling" /> sibling</label> <label for="family-spouse"><input class="valinp" type="radio" name="family" value="spouse" id="family-spouse" /> spouse</label>
<label for="family-none"><input class="valinp" type="radio" name="family" value="" id="family-none" /> none</label>
</td>
</tr>
<tr>
<th scope="row">
romantic
</th>
<td>
<label for="muse"><input class="valinp" type="checkbox" name="romantic" value="muse" id="muse" /> muse</label> <label for="crush"><input class="valinp" type="checkbox" name="romantic" value="crush" id="crush" /> crush</label> <label for="date"><input class="valinp" type="checkbox" name="romantic" value="date" id="date" /> date</label> <label for="sweetheart"><input class="valinp" type="checkbox" name="romantic" value="sweetheart" id="sweetheart" /> sweetheart</label><label for="spouse"></label>
</td>
</tr>
</table></td>
</tr>
<tr>
<td valign="top" align="right">Notes:</td>
<td><textarea name="notes" cols="80" rows="10"></textarea></td>
</tr>
<tr>
<td align="right">Rating:</td>
<td>
<select name="rating" size="1">
<?php
<h3><strong>Add</strong> a link:<?php echo gethelp_link($this_file,'add_a_link');?></h3>
<form name="addlink" method="post" action="link-manager.php">
<table width="100%" border="0" cellspacing="0" cellpadding="4">
<tr>
<th scope="row">URI:</th>
<td><input type="text" name="linkurl" size="80" value="<?php echo $link_url; ?>"></td>
</tr>
<tr>
<th scope="row">Link Name:</th>
<td><input type="text" name="name" size="80" value="<?php echo $link_name; ?>"></td>
</tr>
<tr>
<th scope="row">Image</th>
<td><input type="text" name="image" size="80" value=""></td>
</tr>
<tr>
<th scope="row">Description</th>
<td><input type="text" name="description" size="80" value=""></td>
</tr>
<tr>
<th scope="row">rel:</th>
<td><input type="text" name="rel" id="rel2" size="80" value=""></td>
</tr>
<tr>
<th scope="row"><a href="http://gmpg.org/xfn/">XFN</a>:</th>
<td><table cellpadding="3" cellspacing="5">
<tr>
<th scope="row"> friendship </th>
<td>
<label for="label">
<input class="valinp" type="radio" name="friendship" value="acquaintance" id="label" />
acquaintance</label>
<label for="label2">
<input class="valinp" type="radio" name="friendship" value="friend" id="label2" />
friend</label>
<label for="label3">
<input class="valinp" type="radio" name="friendship" value="" id="label3" />
none</label>
</td>
</tr>
<tr>
<th scope="row"> physical </th>
<td>
<label for="label4">
<input class="valinp" type="checkbox" name="physical" value="met" id="label4" />
met</label>
</td>
</tr>
<tr>
<th scope="row"> professional </th>
<td>
<label for="label5">
<input class="valinp" type="checkbox" name="professional" value="co-worker" id="label5" />
co-worker</label>
<label for="label6">
<input class="valinp" type="checkbox" name="professional" value="colleague" id="label6" />
colleague</label>
</td>
</tr>
<tr>
<th scope="row"> geographical </th>
<td>
<label for="label7">
<input class="valinp" type="radio" name="geographical" value="co-resident" id="label7" />
co-resident</label>
<label for="label8">
<input class="valinp" type="radio" name="geographical" value="neighbor" id="label8" />
neighbor</label>
<label for="label9">
<input class="valinp" type="radio" name="geographical" value="" id="label9" />
none</label>
</td>
</tr>
<tr>
<th scope="row"> family </th>
<td>
<label for="label10">
<input class="valinp" type="radio" name="family" value="child" id="label10" />
child</label>
<label for="label11">
<input class="valinp" type="radio" name="family" value="parent" id="label11" />
parent</label>
<label for="label12">
<input class="valinp" type="radio" name="family" value="sibling" id="label12" />
sibling</label>
<label for="label13">
<input class="valinp" type="radio" name="family" value="spouse" id="label13" />
spouse</label>
<label for="label14">
<input class="valinp" type="radio" name="family" value="" id="label14" />
none</label>
</td>
</tr>
<tr>
<th scope="row"> romantic </th>
<td>
<label for="label15">
<input class="valinp" type="checkbox" name="romantic" value="muse" id="label15" />
muse</label>
<label for="label16">
<input class="valinp" type="checkbox" name="romantic" value="crush" id="label16" />
crush</label>
<label for="label17">
<input class="valinp" type="checkbox" name="romantic" value="date" id="label17" />
date</label>
<label for="label18">
<input class="valinp" type="checkbox" name="romantic" value="sweetheart" id="label18" />
sweetheart</label>
<label for="spouse"></label>
</td>
</tr>
</table></td>
</tr>
<tr>
<th scope="row">Notes:</th>
<td><textarea name="notes" cols="80" rows="10"></textarea></td>
</tr>
<tr>
<th scope="row">Rating:</th>
<td><select name="rating" size="1">
<?php
for ($r = 0; $r < 10; $r++) {
echo(' <option value="'.$r.'">'.$r.'</option>');
}
?>
</select>&nbsp;(Leave at 0 for no rating.)
</td>
</tr>
<tr>
<td align="right">Target:</td>
<td><label><input type="radio" name="target" value="_blank"> _blank</label>
&nbsp;<label><input type="radio" name="target" value="_top"> _top</label>
&nbsp;<label><input type="radio" name="target" value="" checked="checked"> none</label>
</td>
</tr>
<tr>
<td align="right">Visible:</td>
<td><label>
<input type="radio" name="visible" checked="checked" value="Y">
Yes</label>
&nbsp;<label>
<input type="radio" name="visible" value="N">
No</label>
</td>
</tr>
<tr>
<td align="right"><label for="category">Category</label>:</td>
<td>
<?php category_dropdown('category'); ?>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" name="submit" value="Add" class="search">
</td>
</tr>
</table>
</select>
&nbsp;(Leave at 0 for no rating.) </td>
</tr>
<tr>
<th scope="row">Target</th>
<td><label>
<input type="radio" name="target" value="_blank">
<code>_blank</code></label>
&nbsp;
<label>
<input type="radio" name="target" value="_top">
<code>_top</code></label>
&nbsp;
<label>
<input type="radio" name="target" value="" checked="checked">
none</label>
(Note that the <code>target</code> attribute is illegal in XHTML 1.1 and 1.0 Strict.)</td>
</tr>
<tr>
<th scope="row">Visible:</th>
<td><label>
<input type="radio" name="visible" checked="checked" value="Y">
Yes</label>
&nbsp;
<label>
<input type="radio" name="visible" value="N">
No</label></td>
</tr>
<tr>
<th scope="row">Category:</th>
<td><?php category_dropdown('category'); ?></td>
</tr>
</table>
<p style="text-align: center;">
<input type="submit" name="submit" value="Add Link" class="search"> <input type="hidden" name="action" value="Add" />
</p>
</form>
</div>
<div class="wrap">

View File

@ -2,7 +2,6 @@
// Links
// Copyright (C) 2002, 2003 Mike Little -- mike@zed1.com
$title = 'Link Categories';
$this_file='link-categories.php';
$parent_file = 'link-manager.php';
@ -24,51 +23,51 @@ for ($i=0; $i<count($wpvarstoreset); $i += 1) {
}
switch ($action) {
case "addcat":
case 'addcat':
{
$standalone = 1;
include_once("./admin-header.php");
include_once('admin-header.php');
if ($user_level < get_settings('links_minadminlevel'))
die ("Cheatin' uh ?");
$cat_name=addslashes($HTTP_POST_VARS["cat_name"]);
$auto_toggle = $HTTP_POST_VARS["auto_toggle"];
$cat_name = addslashes($HTTP_POST_VARS['cat_name']);
$auto_toggle = $HTTP_POST_VARS['auto_toggle'];
if ($auto_toggle != 'Y') {
$auto_toggle = 'N';
}
$show_images = $HTTP_POST_VARS["show_images"];
$show_images = $HTTP_POST_VARS['show_images'];
if ($show_images != 'Y') {
$show_images = 'N';
}
$show_description = $HTTP_POST_VARS["show_description"];
$show_description = $HTTP_POST_VARS['show_description'];
if ($show_description != 'Y') {
$show_description = 'N';
}
$show_rating = $HTTP_POST_VARS["show_rating"];
$show_rating = $HTTP_POST_VARS['show_rating'];
if ($show_rating != 'Y') {
$show_rating = 'N';
}
$show_updated = $HTTP_POST_VARS["show_updated"];
$show_updated = $HTTP_POST_VARS['show_updated'];
if ($show_updated != 'Y') {
$show_updated = 'N';
}
$sort_order = $HTTP_POST_VARS["sort_order"];
$sort_order = $HTTP_POST_VARS['sort_order'];
$sort_desc = $HTTP_POST_VARS["sort_desc"];
$sort_desc = $HTTP_POST_VARS['sort_desc'];
if ($sort_desc != 'Y') {
$sort_desc = 'N';
}
$text_before_link = addslashes($HTTP_POST_VARS["text_before_link"]);
$text_after_link = addslashes($HTTP_POST_VARS["text_after_link"]);
$text_after_all = addslashes($HTTP_POST_VARS["text_after_all"]);
$text_before_link = addslashes($HTTP_POST_VARS['text_before_link']);
$text_after_link = addslashes($HTTP_POST_VARS['text_after_link']);
$text_after_all = addslashes($HTTP_POST_VARS['text_after_all']);
$list_limit = $HTTP_POST_VARS["list_limit"];
$list_limit = $HTTP_POST_VARS['list_limit'];
if ($list_limit == '')
$list_limit = -1;
@ -78,20 +77,20 @@ switch ($action) {
" '$show_rating', '$show_updated', '$sort_order', '$sort_desc', '$text_before_link', '$text_after_link', \n" .
" '$text_after_all', $list_limit)");
header("Location: link-categories.php");
header('Location: link-categories.php');
break;
} // end addcat
case "Delete":
case 'Delete':
{
$standalone = 1;
include_once("./admin-header.php");
include_once('admin-header.php');
$cat_id = $HTTP_POST_VARS["cat_id"];
$cat_id = $HTTP_GET_VARS['cat_id'];
$cat_name=get_linkcatname($cat_id);
$cat_name=addslashes($cat_name);
if ($cat_id=="1")
die("Can't delete the <b>$cat_name</b> link category: this is the default one");
die("Can't delete the <strong>$cat_name</strong> link category: this is the default one");
if ($user_level < get_settings('links_minadminlevel'))
die ("Cheatin' uh ?");
@ -99,13 +98,13 @@ switch ($action) {
$wpdb->query("DELETE FROM $tablelinkcategories WHERE cat_id='$cat_id'");
$wpdb->query("UPDATE $tablelinks SET link_category=1 WHERE link_category='$cat_id'");
header("Location: link-categories.php");
header('Location: link-categories.php');
break;
} // end delete
case "Edit":
case 'Edit':
{
include_once ("./admin-header.php");
$cat_id = $HTTP_POST_VARS["cat_id"];
include_once ('admin-header.php');
$cat_id = $HTTP_GET_VARS['cat_id'];
$row = $wpdb->get_row("SELECT cat_id, cat_name, auto_toggle, show_images, show_description, "
. " show_rating, show_updated, sort_order, sort_desc, text_before_link, text_after_link, "
. " text_after_all, list_limit FROM $tablelinkcategories WHERE cat_id=$cat_id");
@ -123,28 +122,38 @@ switch ($action) {
</ul>
<div class="wrap">
<p>Edit Link Category '<b><?php echo $row->cat_name?></b>'</p>
<h3>Edit Link Category &#8220;<?php echo $row->cat_name?>&#8221;</h3>
<p>
<form name="editcat" method="post">
<form name="editcat" method="post">
<input type="hidden" name="action" value="editedcat" />
<input type="hidden" name="cat_id" value="<?php echo $row->cat_id ?>" />
<table border="0">
<tr>
<td align="right">Name:</td>
<td><input type="text" name="cat_name" size="25" value="<?php echo stripslashes($row->cat_name)?>" />&nbsp;&nbsp;&nbsp;
<input type="checkbox" name="auto_toggle" <?php echo ($row->auto_toggle == 'Y') ? 'checked' : '';?> value="Y" /> auto-toggle?</td>
<label for="auto_toggle">
<input type="checkbox" name="auto_toggle" id="auto_toggle" <?php echo ($row->auto_toggle == 'Y') ? 'checked' : '';?> value="Y" />
auto-toggle?</label></td>
</tr>
<tr>
<td align="right"><b>Show:</b></td>
<td align="right">Show:</td>
<td>
<input type="checkbox" name="show_images" <?php echo ($row->show_images == 'Y') ? 'checked' : '';?> value="Y" /> images&nbsp;&nbsp;
<input type="checkbox" name="show_description" <?php echo ($row->show_description == 'Y') ? 'checked' : '';?> value="Y" /> description&nbsp;&nbsp;
<input type="checkbox" name="show_rating" <?php echo ($row->show_rating == 'Y') ? 'checked' : '';?> value="Y" /> rating&nbsp;&nbsp;
<input type="checkbox" name="show_updated" <?php echo ($row->show_updated == 'Y') ? 'checked' : '';?> value="Y" /> updated
<label for="show_images">
<input type="checkbox" name="show_images" id="show_images" <?php echo ($row->show_images == 'Y') ? 'checked' : '';?> value="Y" />
images</label>&nbsp;
<label for="show_description">
<input type="checkbox" name="show_description" id="show_description" <?php echo ($row->show_description == 'Y') ? 'checked' : '';?> value="Y" />
description</label> &nbsp;
<label for="show_rating">
<input type="checkbox" name="show_rating" id="show_rating" <?php echo ($row->show_rating == 'Y') ? 'checked' : '';?> value="Y" />
rating</label> &nbsp;
<label for="show_updated">
<input type="checkbox" name="show_updated" id="show_updated" <?php echo ($row->show_updated == 'Y') ? 'checked' : '';?> value="Y" />
updated</label>
</td>
</tr>
<tr>
<td align="right">Sort order:</td>
<td align="right">Sort by:</td>
<td>
<select name="sort_order" size="1">
<option value="name" <?php echo ($row->sort_order == 'name') ? 'selected' : ''?>>Name</option>
@ -159,24 +168,24 @@ switch ($action) {
</td>
</tr>
<tr>
<td align="center"><b>Text/HTML</b></td>
<td align="center">Text/HTML</td>
<td>&nbsp;</td>
</tr>
<tr>
<td align="right">before:</td>
<td align="right">Before:</td>
<td><input type="text" name="text_before_link" size="45" value="<?php echo stripslashes($row->text_before_link)?>" /></td>
</tr>
<tr>
<td align="right">between:</td>
<td align="right">Between:</td>
<td><input type="text" name="text_after_link" size="45" value="<?php echo stripslashes($row->text_after_link)?>" /></td>
</tr>
<tr>
<td align="right">after:</td>
<td align="right">After:</td>
<td><input type="text" name="text_after_all" size="45" value="<?php echo stripslashes($row->text_after_all)?>" /></td>
</tr>
<tr>
<td align="right">limit:</td>
<td><input type="text" name="list_limit" size="5" value="<?php echo $row->list_limit?>"/> (leave empty for no limit)</td>
<td align="right">Limit:</td>
<td><input type="text" name="list_limit" size="5" value="<?php echo $row->list_limit?>"/> (How many links are shown. Empty for unlimited.)</td>
</tr>
<tr>
<td align="center" colspan="2">
@ -185,7 +194,7 @@ switch ($action) {
</td>
</tr>
</table>
</form>
</form>
</p>
</div>
<?php
@ -281,31 +290,29 @@ switch ($action) {
<li class="last"><a href="link-import.php">Import Blogroll</a></li>
</ul>
<div class="wrap">
<table width="" cellpadding="5" cellspacing="0" border="0">
<tr>
<td>
<form name="cats" method="post">
<b>Edit</b> a link category:<?php echo gethelp_link($this_file,'edit_link_category');?><br />
<table width="" cellpadding="5" cellspacing="0" border="0">
<tr style="background-color: #ddd;">
<th rowspan="2" valign="bottom" style="border-bottom: 1px dotted #9C9A9C;" >Id</th>
<th rowspan="2" valign="bottom" style="border-bottom: 1px dotted #9C9A9C;" >Name</th>
<th rowspan="2" valign="bottom" style="border-bottom: 1px dotted #9C9A9C;" >Auto<br />Toggle?</th>
<th colspan="4" valign="bottom" style="border-left: 1px dotted #9C9A9C; border-right: 1px dotted #9C9A9C;">Show</th>
<th rowspan="2" valign="bottom" style="border-bottom: 1px dotted #9C9A9C;" >Sort Order</th>
<th rowspan="2" valign="bottom" style="border-bottom: 1px dotted #9C9A9C;" >Desc?</th>
<th colspan="3" valign="bottom" style="border-left: 1px dotted #9C9A9C; border-right: 1px dotted #9C9A9C;">Text/HTML</th>
<th rowspan="2" valign="bottom" style="border-bottom: 1px dotted #9C9A9C;" >Limit</th>
<th rowspan="2" colspan="2" style="border-bottom: 1px dotted #9C9A9C;" >&nbsp;</th>
<form name="cats" method="post" action="link-categories.php">
<strong>Edit</strong> a link category:<?php echo gethelp_link($this_file,'edit_link_category');?><br />
<table width="100%" cellpadding="5" cellspacing="0" border="0">
<tr>
<th rowspan="2" valign="bottom">Name</th>
<th rowspan="2" valign="bottom">Id</th>
<th rowspan="2" valign="bottom">Auto<br />Toggle?</th>
<th colspan="4" valign="bottom">Show</th>
<th rowspan="2" valign="bottom">Sort Order</th>
<th rowspan="2" valign="bottom">Desc?</th>
<th colspan="3" valign="bottom">Text/HTML</th>
<th rowspan="2" valign="bottom">Limit</th>
<th rowspan="2" colspan="2">&nbsp;</th>
</tr>
<tr style="background-color: #ddd;">
<th valign="top" style="border-bottom: 1px dotted #9C9A9C; border-left: 1px dotted #9C9A9C;" >images?</th>
<th valign="top" style="border-bottom: 1px dotted #9C9A9C;" >desc?</th>
<th valign="top" style="border-bottom: 1px dotted #9C9A9C;" >rating?</th>
<th valign="top" style="border-bottom: 1px dotted #9C9A9C; border-right: 1px dotted #9C9A9C;" >updated?</th>
<th valign="top" style="border-bottom: 1px dotted #9C9A9C; border-left: 1px dotted #9C9A9C;" >before</th>
<th valign="top" style="border-bottom: 1px dotted #9C9A9C;" >between</th>
<th valign="top" style="border-bottom: 1px dotted #9C9A9C; border-right: 1px dotted #9C9A9C;" >after</th>
<tr>
<th valign="top">images?</th>
<th valign="top">desc?</th>
<th valign="top">rating?</th>
<th valign="top">updated?</th>
<th valign="top">before</th>
<th valign="top">between</th>
<th valign="top">after</th>
</tr>
<input type="hidden" name="cat_id" value="" />
<input type="hidden" name="action" value="" />
@ -319,22 +326,22 @@ foreach ($results as $row) {
}
$style = ($i % 2) ? ' class="alternate"' : '';
?>
<tr valign="middle" <?php echo $style ?>>
<td style="border-bottom: 1px dotted #9C9A9C;"><?php echo $row->cat_id?></td>
<td style="border-bottom: 1px dotted #9C9A9C;"><?php echo stripslashes($row->cat_name)?></td>
<td style="border-bottom: 1px dotted #9C9A9C;"><?php echo $row->auto_toggle?></td>
<td style="border-bottom: 1px dotted #9C9A9C;"><?php echo $row->show_images?></td>
<td style="border-bottom: 1px dotted #9C9A9C;"><?php echo $row->show_description?></td>
<td style="border-bottom: 1px dotted #9C9A9C;"><?php echo $row->show_rating?></td>
<td style="border-bottom: 1px dotted #9C9A9C;"><?php echo $row->show_updated?></td>
<td style="border-bottom: 1px dotted #9C9A9C;"><?php echo $row->sort_order?></td>
<td style="border-bottom: 1px dotted #9C9A9C;"><?php echo $row->sort_desc?></td>
<td style="border-bottom: 1px dotted #9C9A9C;" nowrap><?php echo htmlentities($row->text_before_link)?>&nbsp;</td>
<td style="border-bottom: 1px dotted #9C9A9C;" nowrap><?php echo htmlentities($row->text_after_link)?>&nbsp;</td>
<td style="border-bottom: 1px dotted #9C9A9C;" nowrap><?php echo htmlentities($row->text_after_all)?></td>
<td style="border-bottom: 1px dotted #9C9A9C;"><?php echo $row->list_limit?></td>
<td style="border-bottom: 1px dotted #9C9A9C;"><input type="submit" name="edit" onclick="forms['cats'].cat_id.value='<?php echo $row->cat_id?>'; forms['cats'].action.value='Edit'; " value="Edit" class="search" /></td>
<td style="border-bottom: 1px dotted #9C9A9C;"><input type="submit" name="delete" onclick="forms['cats'].cat_id.value='<?php echo $row->cat_id?>'; forms['cats'].action.value='Delete'; return confirm('You are about to delete this category.\\n \'Cancel\' to stop, \'OK\' to delete.'); " value="Delete" class="search" /></td>
<tr valign="middle" align="center" <?php echo $style ?> style="border-bottom: 1px dotted #9C9A9C;">
<td><?php echo stripslashes($row->cat_name)?></td>
<td ><?php echo $row->cat_id?></td>
<td><?php echo $row->auto_toggle?></td>
<td><?php echo $row->show_images?></td>
<td><?php echo $row->show_description?></td>
<td><?php echo $row->show_rating?></td>
<td><?php echo $row->show_updated?></td>
<td><?php echo $row->sort_order?></td>
<td><?php echo $row->sort_desc?></td>
<td nowrap="nowrap"><?php echo htmlentities($row->text_before_link)?>&nbsp;</td>
<td nowrap="nowrap"><?php echo htmlentities($row->text_after_link)?>&nbsp;</td>
<td nowrap="nowrap"><?php echo htmlentities($row->text_after_all)?></td>
<td><?php echo $row->list_limit?></td>
<td><a href="link-categories.php?cat_id=<?php echo $row->cat_id?>&amp;action=Edit" class="edit">Edit</a></td>
<td><a href="link-categories.php?cat_id=<?php echo $row->cat_id?>&amp;action=Delete" onclick="return confirm('You are about to delete this category.\n \'Cancel\' to stop, \'OK\' to delete.');" class="delete">Delete</a></td>
</tr>
<?php
++$i;
@ -342,18 +349,14 @@ foreach ($results as $row) {
?>
</table>
</form>
</td>
</tr>
</table>
</div>
<div class="wrap">
<form name="addcat" method="post">
<input type="hidden" name="action" value="addcat" />
<table border="0">
<tr>
<th>Add a Link Category:<?php echo gethelp_link($this_file,'add_link_category');?></th>
</tr>
<h3>Add a Link Category:<?php echo gethelp_link($this_file,'add_link_category');?></h3>
<table width="100%" cellpadding="5" cellspacing="0" border="0">
<tr>
<td align="right">Name:</td>
<td><input type="text" name="cat_name" size="25" />&nbsp;&nbsp;&nbsp;
@ -407,15 +410,16 @@ foreach ($results as $row) {
</table>
</form>
</div>
<div class="wrap">
<b>Note:</b><br />
Deleting a link category does not delete links from that category.<br />It will
<h3>Note:</h3>
<p>Deleting a link category does not delete links from that category.<br />
It will
just set them back to the default category <b><?php echo get_linkcatname(1) ?></b>.
</p>
</div>
<?php
break;
} // end default
} // end case
?>
<?php include('admin-footer.php'); ?>
<?php include('admin-footer.php'); ?>

View File

@ -32,7 +32,7 @@ switch ($step) {
<div class="wrap">
<h3>On this page you can import your blogroll.</h3>
<h3>Import your blogroll from another system </h3>
<!-- <form name="blogroll" action="link-import.php" method="get"> -->
<form enctype="multipart/form-data" action="link-import.php" method="post" name="blogroll">

View File

@ -62,7 +62,7 @@ for ($i=0; $i<count($wpvarstoreset); $i += 1) {
$links_show_cat_id = $HTTP_COOKIE_VARS["links_show_cat_id_".$cookiehash];
$links_show_order = $HTTP_COOKIE_VARS["links_show_order_".$cookiehash];
if ($action2 != '')
if (!empty($action2))
$action = $action2;
switch ($action) {
@ -294,7 +294,12 @@ switch ($action) {
}
?>
<ul id="adminmenu2">
<li><a href="link-manager.php" class="current">Manage Links</a></li>
<li><a href="link-add.php">Add Link</a></li>
<li><a href="link-categories.php">Link Categories</a></li>
<li class="last"><a href="link-import.php">Import Blogroll</a></li>
</ul>
<div class="wrap">
<table width="100%" cellpadding="3" cellspacing="3">
@ -580,8 +585,8 @@ LINKS;
if ($show_buttons) {
echo <<<LINKS
<td><input type="submit" name="edit" onclick="document.forms['links'].link_id.value='$link->link_id'; document.forms['links'].action.value='linkedit';" value="Edit" class="search" /></td>
<td><input type="submit" name="delete" onclick="document.forms['links'].link_id.value='$link->link_id'; document.forms['links'].action.value='Delete'; return confirm('You are about to delete this link.\\n \'Cancel\' to stop, \'OK\' to delete.'); " value="Delete" class="search" /></td>
<td><a href="link-manager.php?link_id=$link->link_id&amp;action=linkedit" class="edit">Edit</a></td>
<td><a href="link-manager.php?link_id=$link->link_id&amp;action=Delete" onclick="return confirm('You are about to delete this link.\\n \'Cancel\' to stop, \'OK\' to delete.');" class="delete">Delete</a></td>
<td><input type="checkbox" name="linkcheck[]" value="$link->link_id" /><td>
LINKS;
} else {

View File

@ -1,9 +1,30 @@
* html #poststuff {
height: 100%; /* kill peekaboo bug in IE */
}
a {
border-bottom: 1px solid #69c;
color: #00019b;
text-decoration: none;
}
a.delete:hover {
background: #c00;
color: #fff;
}
a.edit, a.delete, a.edit:hover, a.delete:hover {
border-bottom: none;
display: block;
padding: 5px 0;
text-align: center;
}
a.edit:hover {
background: #ccc;
color: #036;
}
a:visited {
color: #006;
}
@ -73,8 +94,8 @@ p, dl, dd, dt {
}
textarea, input, select {
background: #f0f0f0;
border: 1px solid #ccc;
background: #f4f4f4;
border: 1px solid #d8d8d8;
font-family: Georgia, "Times New Roman", Times, serif;
margin: 1px;
padding: 2px;
@ -101,7 +122,7 @@ textarea, input, select {
padding: 0;
}
.post-categories li {
.post-categories li, #ed_toolbar {
display: inline;
}
@ -138,6 +159,10 @@ textarea, input, select {
margin: 6px 0;
}
#adminmenu .current, #adminmenu2 .current {
font-weight: bold;
}
#adminmenu .last, #adminmenu2 .last {
border-right: none;
}
@ -158,10 +183,6 @@ textarea, input, select {
color: #171717;
}
#adminmenu .current, #adminmenu2 .current {
font-weight: bold;
}
#adminmenu li, #adminmenu2 li {
display: inline;
line-height: 2.0em;
@ -214,10 +235,6 @@ textarea, input, select {
width: 25px;
}
#ed_toolbar {
display: inline;
}
#login {
background: url(http://wordpress.org/images/wp-small.png) #fff no-repeat top center;
border: 2px solid #333;
@ -254,10 +271,6 @@ textarea, input, select {
margin-right: 11em;
}
* html #poststuff {
height: 100%; /* kill peekaboo bug in IE */
}
#poststuff textarea {
width: 99%;
}
@ -290,24 +303,24 @@ textarea, input, select {
#titlediv, #poststatusdiv, #commentstatusdiv, #pingstatusdiv, #postpassworddiv {
float: left;
margin-right: 5px;
height: 6em;
margin-right: 5px;
}
#wphead {
background: url(../wp-images/header-shadow.png) repeat-x #f2f2f2;
height: 42px;
margin: 0;
background: repeat-x url(../wp-images/header-shadow.png) #f2f2f2;
}
#wphead a {
display: block;
background: url(../wp-images/wp-small.png) no-repeat;
border-bottom: none;
display: block;
height: 42px;
line-height: 30px;
margin: 3px 0 0 5px;
text-decoration: none;
text-indent: -1000px;
line-height: 30px;
width: 200px;
border-bottom: none;
margin: 3px 0 0 5px;
}