2003-05-23 04:29:51 -04:00
|
|
|
<?php
|
2003-06-01 07:43:03 -04:00
|
|
|
$mode = 'bookmarklet';
|
2004-10-19 12:01:13 -04:00
|
|
|
require_once('admin.php');
|
2003-05-23 04:29:51 -04:00
|
|
|
|
|
|
|
if ($user_level == 0)
|
2003-06-01 07:43:03 -04:00
|
|
|
die ("Cheatin' uh?");
|
2003-05-23 04:29:51 -04:00
|
|
|
|
2003-06-01 07:43:03 -04:00
|
|
|
if ('b' == $a) {
|
2003-05-23 04:29:51 -04:00
|
|
|
|
2004-08-01 04:04:16 -04: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">
|
2003-05-23 04:29:51 -04:00
|
|
|
<head>
|
2004-08-01 04:04:16 -04:00
|
|
|
<script type="text/javascript">
|
2003-05-23 04:29:51 -04:00
|
|
|
<!--
|
|
|
|
window.close()
|
|
|
|
-->
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body></body>
|
2004-10-05 02:59:13 -04:00
|
|
|
</html>
|
|
|
|
<?php
|
2003-05-23 04:29:51 -04:00
|
|
|
} else {
|
2004-12-12 15:41:19 -05:00
|
|
|
$popuptitle = wp_specialchars(stripslashes($popuptitle));
|
|
|
|
$text = wp_specialchars(stripslashes(urldecode($text)));
|
2004-01-02 19:13:11 -05:00
|
|
|
|
|
|
|
/* big funky fixes for browsers' javascript bugs */
|
|
|
|
|
|
|
|
if (($is_macIE) && (!isset($IEMac_bookmarklet_fix))) {
|
2004-12-22 10:46:06 -05:00
|
|
|
$popuptitle = preg_replace('/'.$wp_macIE_correction["in"].'/','/'.$wp_macIE_correction["out"].'/',$popuptitle);
|
|
|
|
$text = preg_replace('/'.$wp_macIE_correction["in"].'/','/'.$wp_macIE_correction["out"].'/',$text);
|
2004-01-02 19:13:11 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
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))) {
|
2004-12-22 10:46:06 -05:00
|
|
|
$popuptitle = preg_replace('/'.$wp_gecko_correction["in"].'/','/'.$wp_gecko_correction["out"].'/',$popuptitle);
|
|
|
|
$text = preg_replace('/'.$wp_gecko_correction["in"].'/','/'.$wp_gecko_correction["out"].'/',$text);
|
2004-01-02 19:13:11 -05:00
|
|
|
}
|
|
|
|
|
2004-12-12 15:41:19 -05:00
|
|
|
$post_title = wp_specialchars($_REQUEST['post_title']);
|
2004-01-02 19:13:11 -05:00
|
|
|
if (!empty($post_title)) {
|
|
|
|
$post_title = stripslashes($post_title);
|
|
|
|
} else {
|
|
|
|
$post_title = $popuptitle;
|
|
|
|
}
|
2004-12-12 15:41:19 -05:00
|
|
|
|
|
|
|
$edited_post_title = wp_specialchars($post_title);
|
2004-09-20 05:37:30 -04:00
|
|
|
|
|
|
|
// $post_pingback needs to be set in any file that includes edit-form.php
|
|
|
|
$post_pingback = get_settings('default_pingback_flag');
|
2004-01-02 19:13:11 -05:00
|
|
|
|
2004-12-12 15:41:19 -05:00
|
|
|
$content = wp_specialchars($_REQUEST['content']);
|
|
|
|
$popupurl = wp_specialchars($_REQUEST['popupurl']);
|
|
|
|
if ( !empty($content) ) {
|
|
|
|
$content = wp_specialchars( stripslashes($_REQUEST['content']) );
|
2004-01-02 19:13:11 -05:00
|
|
|
} else {
|
|
|
|
$content = '<a href="'.$popupurl.'">'.$popuptitle.'</a>'."\n$text";
|
|
|
|
}
|
|
|
|
|
|
|
|
/* /big funky fixes */
|
|
|
|
|
2003-05-23 04:29:51 -04: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>
|
2004-08-01 04:04:16 -04:00
|
|
|
<title><?php bloginfo('name') ?> › Bookmarklet — WordPress</title>
|
2004-03-01 01:13:32 -05:00
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo get_settings('blog_charset'); ?>" />
|
2004-01-03 00:12:32 -05:00
|
|
|
<link rel="stylesheet" href="wp-admin.css" type="text/css" />
|
2004-01-03 00:21:38 -05:00
|
|
|
<link rel="shortcut icon" href="../wp-images/wp-favicon.png" />
|
2003-05-23 04:29:51 -04:00
|
|
|
|
|
|
|
<style type="text/css">
|
|
|
|
<!--
|
2003-06-01 07:43:03 -04:00
|
|
|
|
2004-01-02 19:13:11 -05:00
|
|
|
#wpbookmarklet textarea,input,select {
|
2003-05-23 04:29:51 -04:00
|
|
|
border-width: 1px;
|
|
|
|
border-color: #cccccc;
|
|
|
|
border-style: solid;
|
|
|
|
padding: 2px;
|
|
|
|
margin: 1px;
|
|
|
|
}
|
2003-06-01 07:43:03 -04:00
|
|
|
|
2004-01-02 19:13:11 -05:00
|
|
|
#wpbookmarklet .checkbox {
|
2003-05-23 04:29:51 -04:00
|
|
|
background-color: #ffffff;
|
|
|
|
border-width: 0px;
|
|
|
|
padding: 0px;
|
|
|
|
margin: 0px;
|
|
|
|
}
|
2003-06-01 07:43:03 -04:00
|
|
|
|
2004-01-02 19:13:11 -05:00
|
|
|
#wpbookmarklet textarea {
|
2003-05-23 04:29:51 -04:00
|
|
|
font-family: Verdana, Geneva, Arial, Helvetica;
|
|
|
|
font-size: 0.9em;
|
|
|
|
}
|
|
|
|
|
2004-01-02 19:13:11 -05:00
|
|
|
#wpbookmarklet .wrap {
|
|
|
|
border: 0px;
|
2003-05-23 04:29:51 -04:00
|
|
|
}
|
|
|
|
|
2004-01-02 19:13:11 -05:00
|
|
|
#wpbookmarklet #postdiv {
|
|
|
|
margin-bottom: 0.5em;
|
2003-05-23 04:29:51 -04:00
|
|
|
}
|
|
|
|
|
2004-01-02 19:13:11 -05:00
|
|
|
#wpbookmarklet #titlediv {
|
|
|
|
margin-bottom: 1em;
|
2003-09-08 01:03:38 -04:00
|
|
|
}
|
2003-05-23 04:29:51 -04:00
|
|
|
|
2004-01-02 19:13:11 -05:00
|
|
|
-->
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body id="wpbookmarklet">
|
2004-08-01 04:04:16 -04:00
|
|
|
<div id="wphead">
|
|
|
|
<h1><?php bloginfo('name') ?></h1>
|
|
|
|
</div>
|
2003-05-23 04:29:51 -04:00
|
|
|
|
2004-01-02 19:13:11 -05:00
|
|
|
<?php require('edit-form.php'); ?>
|
2003-05-23 04:29:51 -04:00
|
|
|
|
|
|
|
</body>
|
|
|
|
</html><?php
|
|
|
|
}
|
2003-06-10 18:31:01 -04:00
|
|
|
?>
|