2003-05-23 10:29:51 +02:00
|
|
|
<?php
|
|
|
|
/* <Bookmarklet> */
|
|
|
|
|
2003-08-11 00:55:01 +02:00
|
|
|
// accepts 'post_title' and 'content' as vars passed in. Add-on from Alex King
|
|
|
|
|
2003-06-01 13:43:03 +02:00
|
|
|
$mode = 'bookmarklet';
|
2003-05-23 10:29:51 +02:00
|
|
|
|
|
|
|
$standalone = 1;
|
2003-12-11 01:22:36 +01:00
|
|
|
require_once('admin-header.php');
|
2003-05-23 10:29:51 +02:00
|
|
|
|
|
|
|
if ($user_level == 0)
|
2003-06-01 13:43:03 +02:00
|
|
|
die ("Cheatin' uh?");
|
2003-05-23 10:29:51 +02:00
|
|
|
|
2003-06-01 13:43:03 +02:00
|
|
|
if ('b' == $a) {
|
2003-05-23 10:29:51 +02:00
|
|
|
|
|
|
|
?><html>
|
|
|
|
<head>
|
2003-06-01 13:43:03 +02:00
|
|
|
<script language="javascript" type="text/javascript">
|
2003-05-23 10:29:51 +02:00
|
|
|
<!--
|
|
|
|
window.close()
|
|
|
|
-->
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body></body>
|
|
|
|
</html><?php
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
2004-01-03 01:13:11 +01:00
|
|
|
$popuptitle = stripslashes($popuptitle);
|
|
|
|
$text = stripslashes($text);
|
|
|
|
|
|
|
|
/* big funky fixes for browsers' javascript bugs */
|
|
|
|
|
|
|
|
if (($is_macIE) && (!isset($IEMac_bookmarklet_fix))) {
|
|
|
|
$popuptitle = preg_replace($wp_macIE_correction["in"],$wp_macIE_correction["out"],$popuptitle);
|
|
|
|
$text = preg_replace($wp_macIE_correction["in"],$wp_macIE_correction["out"],$text);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (($is_winIE) && (!isset($IEWin_bookmarklet_fix))) {
|
|
|
|
$popuptitle = preg_replace("/\%u([0-9A-F]{4,4})/e", "'&#'.base_convert('\\1',16,10).';'", $popuptitle);
|
|
|
|
$text = preg_replace("/\%u([0-9A-F]{4,4})/e", "'&#'.base_convert('\\1',16,10).';'", $text);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (($is_gecko) && (!isset($Gecko_bookmarklet_fix))) {
|
|
|
|
$popuptitle = preg_replace($wp_gecko_correction["in"],$wp_gecko_correction["out"],$popuptitle);
|
|
|
|
$text = preg_replace($wp_gecko_correction["in"],$wp_gecko_correction["out"],$text);
|
|
|
|
}
|
|
|
|
|
|
|
|
$post_title = $_REQUEST['post_title'];
|
|
|
|
if (!empty($post_title)) {
|
|
|
|
$post_title = stripslashes($post_title);
|
|
|
|
} else {
|
|
|
|
$post_title = $popuptitle;
|
|
|
|
}
|
|
|
|
|
|
|
|
$content = $_REQUEST['content'];
|
|
|
|
if (!empty($content)) {
|
|
|
|
$content = stripslashes($content);
|
|
|
|
} else {
|
|
|
|
$content = '<a href="'.$popupurl.'">'.$popuptitle.'</a>'."\n$text";
|
|
|
|
}
|
|
|
|
|
|
|
|
/* /big funky fixes */
|
|
|
|
|
2003-05-23 10:29:51 +02:00
|
|
|
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
|
|
<head>
|
|
|
|
<title>WordPress > Bookmarklet</title>
|
2004-01-03 01:13:11 +01:00
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $admin_area_charset ?>" />
|
2004-01-03 06:12:32 +01:00
|
|
|
<link rel="stylesheet" href="wp-admin.css" type="text/css" />
|
2004-01-03 06:21:38 +01:00
|
|
|
<link rel="shortcut icon" href="../wp-images/wp-favicon.png" />
|
2003-05-25 02:33:40 +02:00
|
|
|
<script type="text/javascript" language="javascript">
|
2003-05-23 10:29:51 +02:00
|
|
|
<!--
|
|
|
|
function launchupload() {
|
2003-12-16 02:58:39 +01:00
|
|
|
window.open ("upload.php", "wpupload", "width=380,height=360,location=0,menubar=0,resizable=1,scrollbars=yes,status=1,toolbar=0");
|
2003-05-23 10:29:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
//-->
|
|
|
|
</script>
|
|
|
|
<style type="text/css">
|
|
|
|
<!--
|
2003-06-01 13:43:03 +02:00
|
|
|
|
2004-01-03 01:13:11 +01:00
|
|
|
#wpbookmarklet textarea,input,select {
|
2003-05-23 10:29:51 +02:00
|
|
|
border-width: 1px;
|
|
|
|
border-color: #cccccc;
|
|
|
|
border-style: solid;
|
|
|
|
padding: 2px;
|
|
|
|
margin: 1px;
|
|
|
|
}
|
2003-06-01 13:43:03 +02:00
|
|
|
|
2004-01-03 01:13:11 +01:00
|
|
|
#wpbookmarklet .checkbox {
|
2003-05-23 10:29:51 +02:00
|
|
|
background-color: #ffffff;
|
|
|
|
border-width: 0px;
|
|
|
|
padding: 0px;
|
|
|
|
margin: 0px;
|
|
|
|
}
|
2003-06-01 13:43:03 +02:00
|
|
|
|
2004-01-03 01:13:11 +01:00
|
|
|
#wpbookmarklet textarea {
|
2003-05-23 10:29:51 +02:00
|
|
|
font-family: Verdana, Geneva, Arial, Helvetica;
|
|
|
|
font-size: 0.9em;
|
|
|
|
}
|
|
|
|
|
2004-01-03 01:13:11 +01:00
|
|
|
#wpbookmarklet .wrap {
|
|
|
|
border: 0px;
|
2003-05-23 10:29:51 +02:00
|
|
|
}
|
|
|
|
|
2004-01-03 01:13:11 +01:00
|
|
|
#wpbookmarklet #postdiv {
|
|
|
|
margin-bottom: 0.5em;
|
2003-05-23 10:29:51 +02:00
|
|
|
}
|
|
|
|
|
2004-01-03 01:13:11 +01:00
|
|
|
#wpbookmarklet #titlediv {
|
|
|
|
margin-bottom: 1em;
|
2003-09-08 07:03:38 +02:00
|
|
|
}
|
2003-05-23 10:29:51 +02:00
|
|
|
|
2004-01-03 01:13:11 +01:00
|
|
|
-->
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body id="wpbookmarklet">
|
|
|
|
<h1 id="wphead"><a href="http://wordpress.org" rel="external">WordPress</a></h1>
|
2003-05-23 10:29:51 +02:00
|
|
|
|
2004-01-03 01:13:11 +01:00
|
|
|
<?php require('edit-form.php'); ?>
|
2003-05-23 10:29:51 +02:00
|
|
|
|
|
|
|
</body>
|
|
|
|
</html><?php
|
|
|
|
}
|
2003-06-11 00:31:01 +02:00
|
|
|
?>
|