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

View File

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

View File

@ -32,7 +32,7 @@ switch ($step) {
<div class="wrap"> <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 name="blogroll" action="link-import.php" method="get"> -->
<form enctype="multipart/form-data" action="link-import.php" method="post" name="blogroll"> <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_cat_id = $HTTP_COOKIE_VARS["links_show_cat_id_".$cookiehash];
$links_show_order = $HTTP_COOKIE_VARS["links_show_order_".$cookiehash]; $links_show_order = $HTTP_COOKIE_VARS["links_show_order_".$cookiehash];
if ($action2 != '') if (!empty($action2))
$action = $action2; $action = $action2;
switch ($action) { 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"> <div class="wrap">
<table width="100%" cellpadding="3" cellspacing="3"> <table width="100%" cellpadding="3" cellspacing="3">
@ -580,8 +585,8 @@ LINKS;
if ($show_buttons) { if ($show_buttons) {
echo <<<LINKS 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><a href="link-manager.php?link_id=$link->link_id&amp;action=linkedit" class="edit">Edit</a></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=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> <td><input type="checkbox" name="linkcheck[]" value="$link->link_id" /><td>
LINKS; LINKS;
} else { } else {

View File

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