2005-02-14 15:08:29 -05:00
|
|
|
<?php
|
|
|
|
@header('Content-type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
|
|
|
|
if (!isset($_GET["page"])) require_once('admin.php'); ?>
|
2004-10-18 23:03:06 -04: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 04:29:51 -04:00
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
2003-05-22 08:12:53 -04:00
|
|
|
<head>
|
2004-07-20 21:59:09 -04:00
|
|
|
<title><?php bloginfo('name') ?> › <?php echo $title; ?> — WordPress</title>
|
2005-03-04 14:43:30 -05:00
|
|
|
<link rel="stylesheet" href="<?php echo get_settings('siteurl') ?>/wp-admin/wp-admin.css?version=<?php bloginfo('version'); ?>" type="text/css" />
|
2005-02-13 23:36:57 -05:00
|
|
|
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" />
|
2003-05-23 04:29:51 -04:00
|
|
|
|
2004-08-01 04:04:39 -04:00
|
|
|
<script type="text/javascript">
|
2003-12-21 19:09:59 -05:00
|
|
|
//<![CDATA[
|
2004-12-08 23:12:20 -05:00
|
|
|
|
2005-08-07 21:13:22 -04:00
|
|
|
function addLoadEvent(func) {
|
2005-12-14 01:27:30 -05:00
|
|
|
if ( typeof wpOnload != 'function' ) {
|
|
|
|
wpOnload = func;
|
2005-08-07 21:13:22 -04:00
|
|
|
} else {
|
2005-12-14 01:27:30 -05:00
|
|
|
var oldonload = wpOnload;
|
|
|
|
wpOnload = function() {
|
2005-08-07 21:13:22 -04:00
|
|
|
oldonload();
|
|
|
|
func();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-12-08 23:12:20 -05:00
|
|
|
<?php if ( isset($xfn) ) : ?>
|
|
|
|
|
2004-02-05 00:40:25 -05:00
|
|
|
function GetElementsWithClassName(elementName, className) {
|
|
|
|
var allElements = document.getElementsByTagName(elementName);
|
|
|
|
var elemColl = new Array();
|
|
|
|
for (i = 0; i < allElements.length; i++) {
|
2004-12-08 23:12:20 -05:00
|
|
|
if (allElements[i].className == className) {
|
|
|
|
elemColl[elemColl.length] = allElements[i];
|
|
|
|
}
|
2004-02-05 00:40:25 -05:00
|
|
|
}
|
|
|
|
return elemColl;
|
|
|
|
}
|
|
|
|
|
2004-11-15 15:52:34 -05: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');
|
2005-12-02 12:30:49 -05:00
|
|
|
var results = document.getElementById('link_rel');
|
2004-11-15 15:52:34 -05:00
|
|
|
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 00:40:25 -05:00
|
|
|
function blurry() {
|
|
|
|
if (!document.getElementById) return;
|
2004-11-15 15:52:34 -05:00
|
|
|
|
2004-02-05 00:40:25 -05:00
|
|
|
var aInputs = document.getElementsByTagName('input');
|
2004-11-15 15:52:34 -05:00
|
|
|
|
|
|
|
for (var i = 0; i < aInputs.length; i++) {
|
|
|
|
aInputs[i].onclick = aInputs[i].onkeyup = upit;
|
2004-02-05 00:40:25 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-08-07 21:13:22 -04:00
|
|
|
addLoadEvent(blurry);
|
2004-12-08 23:12:20 -05:00
|
|
|
<?php endif; ?>
|
2003-12-21 19:09:59 -05:00
|
|
|
//]]>
|
2003-05-22 08:12:53 -04:00
|
|
|
</script>
|
2005-08-27 14:48:56 -04:00
|
|
|
<script type="text/javascript" src="../wp-includes/js/fat.js"></script>
|
2005-08-30 22:39:17 -04: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 04:16:29 -04:00
|
|
|
<?php if ( isset( $editing ) ) : ?>
|
2005-12-11 20:27:56 -05:00
|
|
|
<?php if ( $editing && user_can_richedit() ) : ?>
|
2005-12-13 03:47:55 -05:00
|
|
|
<script type="text/javascript" src="../wp-includes/js/tinymce/tiny_mce_gzip.php?ver=20051211"></script>
|
2005-08-07 23:28:37 -04:00
|
|
|
<?php endif; ?>
|
2005-08-27 14:48:56 -04:00
|
|
|
<script type="text/javascript" src="../wp-includes/js/dbx.js"></script>
|
2005-12-15 16:48:12 -05:00
|
|
|
<script type="text/javascript">
|
|
|
|
addLoadEvent( function() {
|
|
|
|
<?php switch ( $pagenow ) : case 'post.php' : ?>
|
|
|
|
var manager = new dbxManager('postmeta'); //session ID [/-_a-zA-Z0-9/]
|
|
|
|
<?php break; case 'page-new.php' : ?>
|
|
|
|
var manager = new dbxManager('pagemeta'); //session ID [/-_a-zA-Z0-9/]
|
|
|
|
<?php break; endswitch; ?>
|
|
|
|
});
|
|
|
|
</script>
|
2005-08-27 14:48:56 -04:00
|
|
|
<script type="text/javascript" src="../wp-includes/js/dbx-key.js"></script>
|
2005-08-10 19:39:15 -04:00
|
|
|
|
2005-12-15 16:48:12 -05:00
|
|
|
<?php if ( current_user_can('manage_categories') ) : ?>
|
2005-11-17 05:23:35 -05:00
|
|
|
<style type="text/css">
|
|
|
|
#newcat { width: 120px; margin-right: 5px; }
|
|
|
|
input#catadd { background: #a4a4a4;
|
|
|
|
border-bottom: 1px solid #898989;
|
|
|
|
border-left: 1px solid #bcbcbc;
|
|
|
|
border-right: 1px solid #898989;
|
|
|
|
border-top: 1px solid #bcbcbc;
|
|
|
|
color: #fff;
|
|
|
|
font-size: 10px;
|
|
|
|
padding: 0;
|
|
|
|
margin: 0;
|
|
|
|
font-weight: bold;
|
|
|
|
height: 20px;
|
|
|
|
margin-bottom: 2px;
|
|
|
|
text-align: center;
|
|
|
|
width: 37px; }
|
|
|
|
#howto {
|
|
|
|
font-size: 11px;
|
|
|
|
margin: 0 5px;
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
#jaxcat {
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
</style>
|
2005-08-09 04:16:29 -04:00
|
|
|
<script type="text/javascript">
|
|
|
|
var ajaxCat = new sack();
|
2005-08-10 19:39:15 -04:00
|
|
|
var newcat;
|
|
|
|
|
|
|
|
function newCatAddIn() {
|
2005-12-09 14:24:14 -05:00
|
|
|
if ( !document.getElementById('jaxcat') ) return false;
|
2005-08-10 19:39:15 -04:00
|
|
|
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-29 20:57:34 -04:00
|
|
|
newcat.onkeypress = ajaxNewCatKeyPress;
|
2005-08-10 19:39:15 -04:00
|
|
|
|
|
|
|
var newcatSub = document.createElement('input');
|
|
|
|
newcatSub.type = 'button';
|
|
|
|
newcatSub.name = 'Button';
|
2005-11-17 05:23:35 -05:00
|
|
|
newcatSub.id = 'catadd';
|
2005-12-12 17:48:30 -05:00
|
|
|
newcatSub.value = '<?php echo addslashes(__('Add')); ?>';
|
2005-11-17 05:23:35 -05:00
|
|
|
newcatSub.onclick = ajaxNewCat;
|
2005-08-10 19:39:15 -04:00
|
|
|
|
|
|
|
ajaxcat.appendChild(newcat);
|
|
|
|
ajaxcat.appendChild(newcatSub);
|
2005-11-17 05:23:35 -05:00
|
|
|
document.getElementById('jaxcat').appendChild(ajaxcat);
|
|
|
|
|
|
|
|
howto = document.createElement('span');
|
2005-12-12 17:48:30 -05:00
|
|
|
howto.innerHTML = '<?php echo addslashes(__('Separate multiple categories with commas.')); ?>';
|
2005-11-17 05:23:35 -05:00
|
|
|
howto.id = 'howto';
|
|
|
|
ajaxcat.appendChild(howto);
|
2005-08-10 19:39:15 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
addLoadEvent(newCatAddIn);
|
2005-08-09 04:16:29 -04:00
|
|
|
|
|
|
|
function getResponseElement() {
|
2005-08-10 19:39:15 -04:00
|
|
|
var p = document.getElementById('ajaxcatresponse');
|
2005-08-09 04:16:29 -04:00
|
|
|
if (!p) {
|
|
|
|
p = document.createElement('p');
|
2005-11-17 05:23:35 -05:00
|
|
|
document.getElementById('jaxcat').appendChild(p);
|
2005-08-09 04:16:29 -04:00
|
|
|
p.id = 'ajaxcatresponse';
|
|
|
|
}
|
|
|
|
return p;
|
|
|
|
}
|
|
|
|
|
|
|
|
function newCatLoading() {
|
|
|
|
var p = getResponseElement();
|
2005-12-12 17:48:30 -05:00
|
|
|
p.innerHTML = '<?php echo addslashes(__('Sending Data...')); ?>';
|
2005-08-09 04:16:29 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
function newCatLoaded() {
|
|
|
|
var p = getResponseElement();
|
2005-12-12 17:48:30 -05:00
|
|
|
p.innerHTML = '<?php echo addslashes(__('Data Sent...')); ?>';
|
2005-08-09 04:16:29 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
function newCatInteractive() {
|
|
|
|
var p = getResponseElement();
|
2005-12-12 17:48:30 -05:00
|
|
|
p.innerHTML = '<?php echo addslashes(__('Processing Request...')); ?>';
|
2005-08-09 04:16:29 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
function newCatCompletion() {
|
|
|
|
var p = getResponseElement();
|
2005-11-17 05:23:35 -05:00
|
|
|
// alert(ajaxCat.response);
|
|
|
|
var id = 0;
|
|
|
|
var ids = new Array();
|
|
|
|
var names = new Array();
|
|
|
|
|
|
|
|
ids = myPload( ajaxCat.response );
|
|
|
|
names = myPload( newcat.value );
|
|
|
|
for ( i = 0; i < ids.length; i++ ) {
|
|
|
|
id = ids[i];
|
|
|
|
// alert(id);
|
|
|
|
if ( id == '-1' ) {
|
2005-12-12 17:48:30 -05:00
|
|
|
p.innerHTML = "<?php echo addslashes(__("You don't have permission to do that.")); ?>";
|
2005-11-17 05:23:35 -05:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
if ( id == '0' ) {
|
2005-12-12 17:48:30 -05:00
|
|
|
p.innerHTML = "<?php echo addslashes(__('That category name is invalid. Try something else.')); ?>";
|
2005-11-17 05:23:35 -05:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
var exists = document.getElementById('category-' + id);
|
|
|
|
|
|
|
|
if (exists) {
|
|
|
|
var moveIt = exists.parentNode;
|
|
|
|
var container = moveIt.parentNode;
|
|
|
|
container.removeChild(moveIt);
|
|
|
|
container.insertBefore(moveIt, container.firstChild);
|
|
|
|
moveIt.id = 'new-category-' + id;
|
|
|
|
exists.checked = 'checked';
|
|
|
|
var nowClass = moveIt.className;
|
|
|
|
moveIt.className = nowClass + ' fade';
|
|
|
|
Fat.fade_all();
|
|
|
|
moveIt.className = nowClass;
|
|
|
|
} else {
|
|
|
|
var catDiv = document.getElementById('categorychecklist');
|
|
|
|
var newLabel = document.createElement('label');
|
|
|
|
newLabel.setAttribute('for', 'category-' + id);
|
|
|
|
newLabel.id = 'new-category-' + id;
|
|
|
|
newLabel.className = 'selectit fade';
|
|
|
|
|
|
|
|
var newCheck = document.createElement('input');
|
|
|
|
newCheck.type = 'checkbox';
|
|
|
|
newCheck.value = id;
|
|
|
|
newCheck.name = 'post_category[]';
|
|
|
|
newCheck.id = 'category-' + id;
|
|
|
|
newLabel.appendChild(newCheck);
|
|
|
|
|
|
|
|
var newLabelText = document.createTextNode(' ' + names[i]);
|
|
|
|
newLabel.appendChild(newLabelText);
|
|
|
|
|
|
|
|
catDiv.insertBefore(newLabel, catDiv.firstChild);
|
|
|
|
newCheck.checked = 'checked';
|
|
|
|
|
|
|
|
Fat.fade_all();
|
|
|
|
newLabel.className = 'selectit';
|
|
|
|
}
|
|
|
|
newcat.value = '';
|
2005-08-09 04:16:29 -04:00
|
|
|
}
|
|
|
|
p.parentNode.removeChild(p);
|
2005-11-17 05:23:35 -05:00
|
|
|
// var id = parseInt(ajaxCat.response, 10);
|
|
|
|
|
|
|
|
|
2005-08-09 04:16:29 -04:00
|
|
|
}
|
|
|
|
|
2005-08-10 19:39:15 -04:00
|
|
|
function ajaxNewCatKeyPress(e) {
|
2005-08-09 04:16:29 -04:00
|
|
|
if (!e) {
|
|
|
|
if (window.event) {
|
|
|
|
e = window.event;
|
|
|
|
} else {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (e.keyCode == 13) {
|
|
|
|
ajaxNewCat();
|
2005-08-10 19:39:15 -04:00
|
|
|
e.returnValue = false;
|
|
|
|
e.cancelBubble = true;
|
|
|
|
return false;
|
2005-08-09 04:16:29 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function ajaxNewCat() {
|
|
|
|
var newcat = document.getElementById('newcat');
|
2005-11-17 05:23:35 -05:00
|
|
|
var split_cats = new Array(1);
|
|
|
|
var catString = '';
|
|
|
|
|
|
|
|
catString = 'ajaxnewcat=' + encodeURIComponent(newcat.value);
|
2005-08-09 04:16:29 -04: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);
|
|
|
|
}
|
2005-11-17 05:23:35 -05:00
|
|
|
|
|
|
|
function myPload( str ) {
|
|
|
|
var fixedExplode = new Array();
|
|
|
|
var comma = new String(',');
|
|
|
|
var count = 0;
|
|
|
|
var currentElement = '';
|
|
|
|
|
|
|
|
for( x=0; x < str.length; x++) {
|
|
|
|
andy = str.charAt(x);
|
|
|
|
if ( comma.indexOf(andy) != -1 ) {
|
2005-11-18 04:30:19 -05:00
|
|
|
currentElement = currentElement.replace(new RegExp('^\\s*(.*?)\\s*$', ''), '$1'); // trim
|
2005-11-17 05:23:35 -05:00
|
|
|
fixedExplode[count] = currentElement;
|
|
|
|
currentElement = "";
|
|
|
|
count++;
|
|
|
|
} else {
|
2005-11-18 04:30:19 -05:00
|
|
|
currentElement += andy;
|
2005-11-17 05:23:35 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( currentElement != "" )
|
|
|
|
fixedExplode[count] = currentElement;
|
|
|
|
return fixedExplode;
|
|
|
|
}
|
2005-08-09 04:16:29 -04:00
|
|
|
</script>
|
2005-06-14 03:31:36 -04:00
|
|
|
<?php endif; ?>
|
|
|
|
|
2005-08-10 19:39:15 -04:00
|
|
|
<?php endif; ?>
|
|
|
|
|
2005-08-02 21:50:56 -04:00
|
|
|
<?php do_action('admin_head'); ?>
|
2003-05-22 08:12:53 -04:00
|
|
|
</head>
|
|
|
|
<body>
|
2004-08-01 04:04:39 -04:00
|
|
|
|
2004-04-28 15:49:27 -04:00
|
|
|
<div id="wphead">
|
2004-12-23 20:34:47 -05: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 15:49:27 -04:00
|
|
|
</div>
|
2004-04-28 01:34:50 -04:00
|
|
|
|
2005-08-07 04:14:41 -04: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 08:12:53 -04:00
|
|
|
<?php
|
2004-10-18 23:03:06 -04:00
|
|
|
require(ABSPATH . '/wp-admin/menu-header.php');
|
|
|
|
|
2005-11-18 05:10:53 -05:00
|
|
|
if ( $parent_file == 'options-general.php' ) {
|
2004-10-18 23:03:06 -04:00
|
|
|
require(ABSPATH . '/wp-admin/options-head.php');
|
|
|
|
}
|
2004-11-25 10:45:16 -05:00
|
|
|
?>
|