2005-02-14 21:08:29 +01:00
|
|
|
<?php
|
|
|
|
@header('Content-type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
|
|
|
|
if (!isset($_GET["page"])) require_once('admin.php'); ?>
|
2004-10-19 05:03:06 +02:00
|
|
|
<?php get_admin_page_title(); ?>
|
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2003-05-23 10:29:51 +02:00
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
2003-05-22 14:12:53 +02:00
|
|
|
<head>
|
2004-07-21 03:59:09 +02:00
|
|
|
<title><?php bloginfo('name') ?> › <?php echo $title; ?> — WordPress</title>
|
2005-03-04 20:43:30 +01:00
|
|
|
<link rel="stylesheet" href="<?php echo get_settings('siteurl') ?>/wp-admin/wp-admin.css?version=<?php bloginfo('version'); ?>" type="text/css" />
|
2005-02-14 05:36:57 +01:00
|
|
|
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" />
|
2003-05-23 10:29:51 +02:00
|
|
|
|
2004-08-01 10:04:39 +02:00
|
|
|
<script type="text/javascript">
|
2003-12-22 01:09:59 +01:00
|
|
|
//<![CDATA[
|
2004-12-09 05:12:20 +01:00
|
|
|
|
2005-08-08 03:13:22 +02:00
|
|
|
function addLoadEvent(func) {
|
|
|
|
var oldonload = window.onload;
|
|
|
|
if (typeof window.onload != 'function') {
|
|
|
|
window.onload = func;
|
|
|
|
} else {
|
|
|
|
window.onload = function() {
|
|
|
|
oldonload();
|
|
|
|
func();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-12-09 05:12:20 +01:00
|
|
|
<?php if ( isset($xfn) ) : ?>
|
|
|
|
|
2004-02-05 06:40:25 +01:00
|
|
|
function GetElementsWithClassName(elementName, className) {
|
|
|
|
var allElements = document.getElementsByTagName(elementName);
|
|
|
|
var elemColl = new Array();
|
|
|
|
for (i = 0; i < allElements.length; i++) {
|
2004-12-09 05:12:20 +01:00
|
|
|
if (allElements[i].className == className) {
|
|
|
|
elemColl[elemColl.length] = allElements[i];
|
|
|
|
}
|
2004-02-05 06:40:25 +01:00
|
|
|
}
|
|
|
|
return elemColl;
|
|
|
|
}
|
|
|
|
|
2004-11-15 21:52:34 +01:00
|
|
|
function meChecked() {
|
|
|
|
var undefined;
|
|
|
|
var eMe = document.getElementById('me');
|
|
|
|
if (eMe == undefined) return false;
|
|
|
|
else return eMe.checked;
|
|
|
|
}
|
|
|
|
|
|
|
|
function upit() {
|
|
|
|
var isMe = meChecked(); //document.getElementById('me').checked;
|
|
|
|
var inputColl = GetElementsWithClassName('input', 'valinp');
|
|
|
|
var results = document.getElementById('rel');
|
|
|
|
var linkText, linkUrl, inputs = '';
|
|
|
|
for (i = 0; i < inputColl.length; i++) {
|
|
|
|
inputColl[i].disabled = isMe;
|
|
|
|
inputColl[i].parentNode.className = isMe ? 'disabled' : '';
|
|
|
|
if (!isMe && inputColl[i].checked && inputColl[i].value != '') {
|
|
|
|
inputs += inputColl[i].value + ' ';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
inputs = inputs.substr(0,inputs.length - 1);
|
|
|
|
if (isMe) inputs='me';
|
|
|
|
results.value = inputs;
|
|
|
|
}
|
|
|
|
|
2004-02-05 06:40:25 +01:00
|
|
|
function blurry() {
|
|
|
|
if (!document.getElementById) return;
|
2004-11-15 21:52:34 +01:00
|
|
|
|
2004-02-05 06:40:25 +01:00
|
|
|
var aInputs = document.getElementsByTagName('input');
|
2004-11-15 21:52:34 +01:00
|
|
|
|
|
|
|
for (var i = 0; i < aInputs.length; i++) {
|
|
|
|
aInputs[i].onclick = aInputs[i].onkeyup = upit;
|
2004-02-05 06:40:25 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-08-08 03:13:22 +02:00
|
|
|
addLoadEvent(blurry);
|
2004-12-09 05:12:20 +01:00
|
|
|
<?php endif; ?>
|
2003-12-22 01:09:59 +01:00
|
|
|
//]]>
|
2003-05-22 14:12:53 +02:00
|
|
|
</script>
|
2005-08-27 20:48:56 +02:00
|
|
|
<script type="text/javascript" src="../wp-includes/js/fat.js"></script>
|
2005-08-31 04:39:17 +02:00
|
|
|
<script type="text/javascript" src="../wp-includes/js/tw-sack.js"></script>
|
|
|
|
<script type="text/javascript" src="list-manipulation.js"></script>
|
2005-08-09 10:16:29 +02:00
|
|
|
<?php if ( isset( $editing ) ) : ?>
|
2005-08-18 03:51:59 +02:00
|
|
|
<?php if ( 'true' == get_user_option('rich_editing') ) :?>
|
2005-11-06 04:30:11 +01:00
|
|
|
<script language="javascript" type="text/javascript" src="../wp-includes/js/tinymce/tiny_mce_gzip.php?index=0&theme=advanced&plugins=wordpress,autosave"></script>
|
2005-08-08 05:28:37 +02:00
|
|
|
<script type="text/javascript">
|
|
|
|
tinyMCE.init({
|
|
|
|
mode : "specific_textareas",
|
|
|
|
textarea_trigger : "title",
|
|
|
|
width : "100%",
|
|
|
|
theme : "advanced",
|
2005-10-26 01:10:14 +02:00
|
|
|
theme_advanced_buttons1 : "bold,italic,strikethrough,separator,bullist,numlist,outdent,indent,separator,justifyleft,justifycenter,justifyright,separator,link,unlink,image,emotions,separator,wordpress,separator,undo,redo,code",
|
2005-08-08 05:28:37 +02:00
|
|
|
theme_advanced_buttons2 : "",
|
|
|
|
theme_advanced_buttons3 : "",
|
|
|
|
theme_advanced_toolbar_location : "top",
|
|
|
|
theme_advanced_toolbar_align : "left",
|
|
|
|
theme_advanced_path_location : "bottom",
|
2005-08-18 02:13:08 +02:00
|
|
|
theme_advanced_resizing : true,
|
2005-09-26 09:13:48 +02:00
|
|
|
browsers : "msie,gecko",
|
|
|
|
dialog_type : "modal",
|
2005-08-23 09:52:47 +02:00
|
|
|
theme_advanced_resize_horizontal : false,
|
2005-08-08 05:28:37 +02:00
|
|
|
entity_encoding : "raw",
|
2005-09-13 00:42:32 +02:00
|
|
|
relative_urls : false,
|
2005-10-26 01:10:14 +02:00
|
|
|
remove_script_host : false,
|
2005-11-08 20:17:08 +01:00
|
|
|
valid_elements : "-a[href|title|rel],-strong/b,-em/i,-strike,-del,-u,p[class|align],-ol,-ul,-li,br,img[class|src|alt|title|width|height|align],-sub,-sup,-blockquote,-table[border=0|cellspacing|cellpadding|width|height|class|align],tr[class|rowspan|width|height|align|valign],td[dir|class|colspan|rowspan|width|height|align|valign],-div[dir|class|align],-span[class|align],-pre[class],address,-h1[class|align],-h2[class|align],-h3[class|align],-h4[class|align],-h5[class|align],-h6[class|align],hr",
|
2005-11-06 04:30:11 +01:00
|
|
|
plugins : "wordpress,autosave"
|
2005-08-08 05:28:37 +02:00
|
|
|
<?php do_action('mce_options'); ?>
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
<?php endif; ?>
|
2005-08-27 20:48:56 +02:00
|
|
|
<script type="text/javascript" src="../wp-includes/js/dbx.js"></script>
|
|
|
|
<script type="text/javascript" src="../wp-includes/js/dbx-key.js"></script>
|
2005-08-11 01:39:15 +02:00
|
|
|
|
|
|
|
<?php if ( current_user_can('manage_categories') ) : ?>
|
2005-08-09 10:16:29 +02:00
|
|
|
<script type="text/javascript">
|
|
|
|
var ajaxCat = new sack();
|
2005-08-11 01:39:15 +02:00
|
|
|
var newcat;
|
|
|
|
|
|
|
|
function newCatAddIn() {
|
|
|
|
var ajaxcat = document.createElement('p');
|
|
|
|
ajaxcat.id = 'ajaxcat';
|
|
|
|
|
|
|
|
newcat = document.createElement('input');
|
|
|
|
newcat.type = 'text';
|
|
|
|
newcat.name = 'newcat';
|
|
|
|
newcat.id = 'newcat';
|
|
|
|
newcat.size = '16';
|
|
|
|
newcat.setAttribute('autocomplete', 'off');
|
2005-08-30 02:57:34 +02:00
|
|
|
newcat.onkeypress = ajaxNewCatKeyPress;
|
2005-08-11 01:39:15 +02:00
|
|
|
|
|
|
|
var newcatSub = document.createElement('input');
|
|
|
|
newcatSub.type = 'button';
|
|
|
|
newcatSub.name = 'Button';
|
|
|
|
newcatSub.value = '+';
|
2005-08-30 02:57:34 +02:00
|
|
|
newcat.onkeypress = ajaxNewCatKeyPress;
|
2005-08-11 01:39:15 +02:00
|
|
|
|
|
|
|
ajaxcat.appendChild(newcat);
|
|
|
|
ajaxcat.appendChild(newcatSub);
|
|
|
|
document.getElementById('categorychecklist').parentNode.appendChild(ajaxcat);
|
|
|
|
}
|
|
|
|
|
|
|
|
addLoadEvent(newCatAddIn);
|
2005-08-09 10:16:29 +02:00
|
|
|
|
|
|
|
function getResponseElement() {
|
2005-08-11 01:39:15 +02:00
|
|
|
var p = document.getElementById('ajaxcatresponse');
|
2005-08-09 10:16:29 +02:00
|
|
|
if (!p) {
|
|
|
|
p = document.createElement('p');
|
|
|
|
document.getElementById('categorydiv').appendChild(p);
|
|
|
|
p.id = 'ajaxcatresponse';
|
|
|
|
}
|
|
|
|
return p;
|
|
|
|
}
|
|
|
|
|
|
|
|
function newCatLoading() {
|
|
|
|
var p = getResponseElement();
|
|
|
|
p.innerHTML = 'Sending Data...';
|
|
|
|
}
|
|
|
|
|
|
|
|
function newCatLoaded() {
|
|
|
|
var p = getResponseElement();
|
|
|
|
p.innerHTML = 'Data Sent...';
|
|
|
|
}
|
|
|
|
|
|
|
|
function newCatInteractive() {
|
|
|
|
var p = getResponseElement();
|
|
|
|
p.innerHTML = 'Processing Data...';
|
|
|
|
}
|
|
|
|
|
|
|
|
function newCatCompletion() {
|
|
|
|
var p = getResponseElement();
|
2005-08-30 02:57:34 +02:00
|
|
|
var id = parseInt(ajaxCat.response, 10);
|
2005-08-09 10:16:29 +02:00
|
|
|
if ( id == '-1' ) {
|
|
|
|
p.innerHTML = "You don't have permission to do that.";
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if ( id == '0' ) {
|
|
|
|
p.innerHTML = "That category name is invalid. Try something else.";
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
p.parentNode.removeChild(p);
|
|
|
|
var exists = document.getElementById('category-' + id);
|
|
|
|
if (exists) {
|
2005-08-30 02:57:34 +02:00
|
|
|
var moveIt = exists.parentNode;
|
|
|
|
var container = moveIt.parentNode;
|
|
|
|
container.removeChild(moveIt);
|
|
|
|
container.insertBefore(moveIt, container.firstChild);
|
|
|
|
moveIt.id = 'new-category-' + id;
|
2005-08-09 10:16:29 +02:00
|
|
|
exists.checked = 'checked';
|
2005-08-30 02:57:34 +02:00
|
|
|
var nowClass = moveIt.className;
|
|
|
|
moveIt.className = nowClass + ' fade';
|
2005-08-09 10:16:29 +02:00
|
|
|
Fat.fade_all();
|
2005-08-30 02:57:34 +02:00
|
|
|
moveIt.className = nowClass;
|
2005-08-09 10:16:29 +02:00
|
|
|
} else {
|
|
|
|
var catDiv = document.getElementById('categorychecklist');
|
|
|
|
var newLabel = document.createElement('label');
|
|
|
|
newLabel.setAttribute('for', 'category-' + id);
|
2005-08-30 02:57:34 +02:00
|
|
|
newLabel.id = 'new-category-' + id;
|
|
|
|
newLabel.className = 'selectit fade';
|
2005-08-09 10:16:29 +02:00
|
|
|
|
|
|
|
var newCheck = document.createElement('input');
|
|
|
|
newCheck.type = 'checkbox';
|
2005-08-30 02:57:34 +02:00
|
|
|
newCheck.value = id;
|
2005-08-09 10:16:29 +02:00
|
|
|
newCheck.name = 'post_category[]';
|
|
|
|
newCheck.id = 'category-' + id;
|
2005-08-30 02:57:34 +02:00
|
|
|
newLabel.appendChild(newCheck);
|
2005-08-09 10:16:29 +02:00
|
|
|
|
2005-08-11 01:39:15 +02:00
|
|
|
var newLabelText = document.createTextNode(' ' + newcat.value);
|
2005-08-09 10:16:29 +02:00
|
|
|
newLabel.appendChild(newLabelText);
|
2005-08-30 02:57:34 +02:00
|
|
|
|
|
|
|
catDiv.insertBefore(newLabel, catDiv.firstChild);
|
|
|
|
newCheck.checked = 'checked';
|
|
|
|
|
2005-08-09 10:16:29 +02:00
|
|
|
Fat.fade_all();
|
2005-08-30 02:57:34 +02:00
|
|
|
newLabel.className = 'selectit';
|
2005-08-09 10:16:29 +02:00
|
|
|
}
|
2005-08-11 01:39:15 +02:00
|
|
|
newcat.value = '';
|
2005-08-09 10:16:29 +02:00
|
|
|
}
|
|
|
|
|
2005-08-11 01:39:15 +02:00
|
|
|
function ajaxNewCatKeyPress(e) {
|
2005-08-09 10:16:29 +02:00
|
|
|
if (!e) {
|
|
|
|
if (window.event) {
|
|
|
|
e = window.event;
|
|
|
|
} else {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (e.keyCode == 13) {
|
|
|
|
ajaxNewCat();
|
2005-08-11 01:39:15 +02:00
|
|
|
e.returnValue = false;
|
|
|
|
e.cancelBubble = true;
|
|
|
|
return false;
|
2005-08-09 10:16:29 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function ajaxNewCat() {
|
|
|
|
var newcat = document.getElementById('newcat');
|
2005-08-30 02:57:34 +02:00
|
|
|
var catString = 'ajaxnewcat=' + encodeURIComponent(newcat.value);
|
2005-08-09 10:16:29 +02:00
|
|
|
ajaxCat.requestFile = 'edit-form-ajax-cat.php';
|
|
|
|
ajaxCat.method = 'GET';
|
|
|
|
ajaxCat.onLoading = newCatLoading;
|
|
|
|
ajaxCat.onLoaded = newCatLoaded;
|
|
|
|
ajaxCat.onInteractive = newCatInteractive;
|
|
|
|
ajaxCat.onCompletion = newCatCompletion;
|
|
|
|
ajaxCat.runAJAX(catString);
|
|
|
|
}
|
|
|
|
</script>
|
2005-06-14 09:31:36 +02:00
|
|
|
<?php endif; ?>
|
|
|
|
|
2005-08-11 01:39:15 +02:00
|
|
|
<?php endif; ?>
|
|
|
|
|
2005-08-03 03:50:56 +02:00
|
|
|
<?php do_action('admin_head'); ?>
|
2003-05-22 14:12:53 +02:00
|
|
|
</head>
|
|
|
|
<body>
|
2004-08-01 10:04:39 +02:00
|
|
|
|
2004-04-28 21:49:27 +02:00
|
|
|
<div id="wphead">
|
2004-12-24 02:34:47 +01:00
|
|
|
<h1><?php echo wptexturize(get_settings(('blogname'))); ?> <span>(<a href="<?php echo get_settings('home') . '/'; ?>"><?php _e('View site') ?> »</a>)</span></h1>
|
2004-04-28 21:49:27 +02:00
|
|
|
</div>
|
2004-04-28 07:34:50 +02:00
|
|
|
|
2005-08-07 10:14:41 +02:00
|
|
|
<div id="user_info"><p><?php printf(__('Howdy, <strong>%s</strong>.'), $user_identity) ?> [<a href="<?php echo get_settings('siteurl')
|
|
|
|
?>/wp-login.php?action=logout" title="<?php _e('Log out of this account') ?>"><?php _e('Sign Out'); ?></a>, <a href="profile.php"><?php _e('My Account'); ?></a>] </p></div>
|
|
|
|
|
2003-05-22 14:12:53 +02:00
|
|
|
<?php
|
2004-10-19 05:03:06 +02:00
|
|
|
require(ABSPATH . '/wp-admin/menu-header.php');
|
|
|
|
|
2005-09-05 22:32:11 +02:00
|
|
|
if ( $parent_file == 'options-personal.php' ) {
|
2004-10-19 05:03:06 +02:00
|
|
|
require(ABSPATH . '/wp-admin/options-head.php');
|
|
|
|
}
|
2004-11-25 16:45:16 +01:00
|
|
|
?>
|