2003-05-23 04:29:51 -04:00
|
|
|
<?php
|
|
|
|
/* <Bookmarklet> */
|
|
|
|
|
2003-06-10 18:31:01 -04:00
|
|
|
function selected($selected, $current) {
|
|
|
|
if ($selected == $current) echo ' selected="selected"';
|
|
|
|
}
|
|
|
|
|
2003-06-01 07:43:03 -04:00
|
|
|
$mode = 'bookmarklet';
|
2003-05-23 04:29:51 -04:00
|
|
|
|
|
|
|
$standalone = 1;
|
2003-06-01 07:43:03 -04:00
|
|
|
require('b2header.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
|
|
|
|
|
|
|
?><html>
|
|
|
|
<head>
|
2003-06-01 07:43:03 -04:00
|
|
|
<script language="javascript" type="text/javascript">
|
2003-05-23 04:29:51 -04:00
|
|
|
<!--
|
|
|
|
window.close()
|
|
|
|
-->
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body></body>
|
|
|
|
</html><?php
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
?><!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>
|
|
|
|
<link rel="stylesheet" href="b2.css" type="text/css" />
|
2003-05-24 20:33:40 -04:00
|
|
|
<script type="text/javascript" language="javascript">
|
2003-05-23 04:29:51 -04:00
|
|
|
<!--
|
|
|
|
function launchupload() {
|
|
|
|
window.open ("b2upload.php", "b2upload", "width=380,height=360,location=0,menubar=0,resizable=1,scrollbars=yes,status=1,toolbar=0");
|
|
|
|
}
|
|
|
|
|
|
|
|
//-->
|
|
|
|
</script>
|
|
|
|
<style type="text/css">
|
|
|
|
<!--
|
|
|
|
body {
|
|
|
|
}
|
2003-06-01 07:43:03 -04:00
|
|
|
|
2003-05-23 04:29:51 -04:00
|
|
|
textarea,input,select {
|
|
|
|
background-color: transparent;
|
|
|
|
background-color: #cccccc;
|
|
|
|
filter: alpha(opacity:80);
|
2003-06-01 07:43:03 -04:00
|
|
|
-moz-opacity: .8;
|
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
|
|
|
|
2003-05-23 04:29:51 -04:00
|
|
|
.checkbox {
|
|
|
|
background-color: #ffffff;
|
|
|
|
border-width: 0px;
|
|
|
|
padding: 0px;
|
|
|
|
margin: 0px;
|
|
|
|
}
|
2003-06-01 07:43:03 -04:00
|
|
|
|
2003-05-23 04:29:51 -04:00
|
|
|
textarea {
|
|
|
|
font-family: Verdana, Geneva, Arial, Helvetica;
|
|
|
|
font-size: 0.9em;
|
|
|
|
}
|
|
|
|
-->
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<form name="post" action="b2edit.php" method="POST">
|
|
|
|
<input type="hidden" name="action" value="post" />
|
|
|
|
<input type="hidden" name="user_ID" value="<?php echo $user_ID ?>" />
|
|
|
|
<input type="hidden" name="mode" value="bookmarklet" />
|
|
|
|
|
|
|
|
<div align="right">
|
|
|
|
<?php
|
|
|
|
|
|
|
|
$popuptitle = stripslashes($popuptitle);
|
|
|
|
$text = stripslashes($text);
|
|
|
|
|
|
|
|
|
|
|
|
/* big funky fixes for browsers' javascript bugs */
|
|
|
|
|
|
|
|
if (($is_macIE) && (!isset($IEMac_bookmarklet_fix))) {
|
|
|
|
$popuptitle = preg_replace($b2_macIE_correction["in"],$b2_macIE_correction["out"],$popuptitle);
|
|
|
|
$text = preg_replace($b2_macIE_correction["in"],$b2_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($b2_gecko_correction["in"],$b2_gecko_correction["out"],$popuptitle);
|
|
|
|
$text = preg_replace($b2_gecko_correction["in"],$b2_gecko_correction["out"],$text);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* /big funky fixes */
|
|
|
|
|
|
|
|
|
|
|
|
?>
|
|
|
|
<table width="100%" cellpadding="8" cellspacing="0" width="415">
|
2003-06-10 18:31:01 -04:00
|
|
|
<tr>
|
|
|
|
<td width="40"> </td>
|
|
|
|
<td align="left" width="415">
|
|
|
|
<table cellspacing="0" cellpadding="0">
|
|
|
|
<td height="50" width="250" align="left" valign="bottom"><label>Title<br />
|
|
|
|
<input type="text" name="post_title" size="20" tabindex="1" style="width: 215px;" value="<?php echo stripslashes($popuptitle) ?>" /></label></td>
|
|
|
|
<td width="165" align="left" valign="bottom"><b>Category</b><br /><?php dropdown_categories(); ?></td>
|
|
|
|
</table>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr height="40">
|
|
|
|
<td width="40"> </td>
|
|
|
|
<td align="left" width="415">
|
|
|
|
<table cellspacing="0" cellpadding="0">
|
|
|
|
<td height="50" width="150" align="left" valign="bottom">
|
|
|
|
<label for="post_status">Post Status:</label> <br />
|
|
|
|
<select name="post_status" id="post_status">
|
|
|
|
<option value="publish"<?php selected($post_status, 'publish'); ?>>Publish</option>
|
|
|
|
<option value="draft"<?php selected($post_status, 'draft'); ?>>Draft</option>
|
|
|
|
<option value="private"<?php selected($post_status, 'private'); ?>>Private</option>
|
|
|
|
</select>
|
|
|
|
</td>
|
|
|
|
<td height="50" width="250" align="left" valign="bottom">
|
|
|
|
<label for="comment_status">Comments:</label> <br />
|
|
|
|
<select name="comment_status" id="comment_status">
|
|
|
|
<option value="open"<?php selected($comment_status, 'open'); ?>>Open</option>
|
|
|
|
<option value="closed"<?php selected($comment_status, 'closed'); ?>>Closed</option>
|
|
|
|
</select>
|
|
|
|
</td>
|
|
|
|
</table>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr height="40">
|
|
|
|
<td width="40"> </td>
|
|
|
|
<td align="left" width="415">
|
|
|
|
<table cellspacing="0" cellpadding="0">
|
|
|
|
<td height="50" width="100" align="left" valign="bottom">
|
|
|
|
<label for="ping_status">Pings:</label><br />
|
|
|
|
<select name="ping_status" id="ping_status">
|
|
|
|
<option value="open"<?php selected($ping_status, 'open'); ?>>Open</option>
|
|
|
|
<option value="closed"<?php selected($ping_status, 'open'); ?>>Closed</option>
|
|
|
|
</select>
|
|
|
|
</td>
|
|
|
|
<td height="50" width="250" align="left" valign="bottom">
|
|
|
|
<label for="post_password">Post Password:</label><br />
|
|
|
|
<input name="post_password" type="text" id="post_password" value="<?php echo $post_password ?>" />
|
|
|
|
</td>
|
|
|
|
</table>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr height="40">
|
|
|
|
<td width="40"> </td>
|
|
|
|
<td width="415" align="left" height="40">
|
|
|
|
<table width="415" cellpadding="0" cellspacing="0">
|
|
|
|
<td align="left" valign="bottom"><b>Post</b></td>
|
|
|
|
<td align="right" valign="bottom"><?php if ($use_quicktags) include("b2quicktags.php"); ?></td>
|
|
|
|
</table>
|
2003-05-23 04:29:51 -04:00
|
|
|
<?php
|
|
|
|
if ((preg_match("/Nav/",$HTTP_USER_AGENT)) || (preg_match("/Mozilla\/4\.7/",$HTTP_USER_AGENT))) {
|
|
|
|
$rows="6";
|
|
|
|
} else {
|
|
|
|
$rows="8";
|
|
|
|
} ?>
|
|
|
|
<?php
|
2003-06-10 18:31:01 -04:00
|
|
|
// stuff to fix textism.com's WEIRD characters conflict with javascript on IE5Mac
|
2003-05-23 04:29:51 -04:00
|
|
|
preg_match("/\%u[1-9A-F][1-9A-F][1-9A-F][1-9A-F]/is", $text, $stufftofix);
|
|
|
|
// ... and so on. currently coding the fix
|
|
|
|
?>
|
2003-06-10 18:31:01 -04:00
|
|
|
<textarea rows="<?php echo $rows ?>" cols="48" style="width:415px;" name="content" tabindex="2" class="postform"><?php echo "<a href=\"$popupurl\">$popuptitle</a>\n$text" ?></textarea><br />
|
|
|
|
<table cellpadding="0" cellspacing="0">
|
|
|
|
<td align="left" width="90"></td>
|
2003-05-23 04:29:51 -04:00
|
|
|
<?php if ($pingback) { ?>
|
2003-06-10 18:31:01 -04:00
|
|
|
<td align="left">
|
|
|
|
<input type="checkbox" class="checkbox" name="post_pingback" value="1" checked="checked" tabindex="7" id="pingback" /><label for="pingback"> PingBack</label>
|
|
|
|
</td>
|
2003-05-23 04:29:51 -04:00
|
|
|
<?php } ?>
|
2003-06-10 18:31:01 -04:00
|
|
|
</table>
|
2003-05-23 04:29:51 -04:00
|
|
|
|
2003-05-24 20:33:40 -04:00
|
|
|
<?php if (0 /*$use_preview*/) { ?>
|
2003-06-10 18:31:01 -04:00
|
|
|
<input type="button" value="preview" onClick="preview(this.form);" class="search" tabindex="8" />
|
2003-05-23 04:29:51 -04:00
|
|
|
<?php } ?>
|
|
|
|
|
2003-06-10 18:31:01 -04:00
|
|
|
<input type="submit" name="submit" value="Blog this !" class="search" tabindex="3" />
|
2003-05-23 04:29:51 -04:00
|
|
|
|
|
|
|
|
|
|
|
<?php if ( ($use_fileupload) && ($user_level >= $fileupload_minlevel) && ((ereg(" ".$user_login." ", $fileupload_allowedusers)) || (trim($fileupload_allowedusers)=="")) ) { ?>
|
2003-06-10 18:31:01 -04:00
|
|
|
<input type="button" value="upload a file" onClick="launchupload();" class="search" />
|
2003-05-23 04:29:51 -04:00
|
|
|
<?php } ?>
|
|
|
|
|
2003-06-10 18:31:01 -04:00
|
|
|
<script language="JavaScript" type="text/javascript">
|
|
|
|
<!--
|
|
|
|
window.focus();
|
|
|
|
//document.blog.post_content.focus();
|
|
|
|
//-->
|
|
|
|
</script>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2003-05-23 04:29:51 -04:00
|
|
|
<?php if ($trackback) { ?>
|
2003-06-10 18:31:01 -04:00
|
|
|
<tr>
|
|
|
|
<td width="40"> </td>
|
|
|
|
<td width="415" align="left" height="40">
|
|
|
|
<label for="trackback"><strong>TrackBack</strong> an <acronym title="Uniform Resource Locator">URL</acronym>:</label> (Seperate multiple URLs with commas.)<br />
|
|
|
|
<input type="text" name="trackback" style="width: 415px" />
|
|
|
|
</td>
|
|
|
|
</tr>
|
2003-05-23 04:29:51 -04:00
|
|
|
<?php } ?>
|
|
|
|
</table>
|
2003-06-10 18:31:01 -04:00
|
|
|
|
2003-05-23 04:29:51 -04:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</form>
|
|
|
|
|
2003-05-24 18:25:39 -04:00
|
|
|
</div>
|
2003-05-23 04:29:51 -04:00
|
|
|
|
|
|
|
</body>
|
|
|
|
</html><?php
|
|
|
|
}
|
2003-06-10 18:31:01 -04:00
|
|
|
?>
|