download bookmarklet.php
Language: PHP
LOC: 85
Project Info
wordpress
Server: Automattic
Type: svn
...dpress\tags\1.5.1\wp‑admin\
   admin-footer.php
   admin-functions.php
   admin-header.php
   admin.php
   bookmarklet.php
   categories.php
   edit-comments.php
   edit-form-advanced.php
   edit-form-comment.php
   edit-form.php
   edit-page-form.php
   edit-pages.php
   edit.php
   import-b2.php
   import-blogger.php
   import-greymatter.php
   import-livejournal.php
   import-mt.php
   import-rss.php
   import-textpattern.php
   index.php
   install-helper.php
   install.php
   link-add.php
   link-categories.php
   link-import.php
   link-manager.php
   link-parse-opml.php
   menu-header.php
   menu.php
   moderation.php
   options-discussion.php
   options-general.php
   options-head.php
   options-misc.php
   options-permalink.php
   options-reading.php
   options-writing.php
   options.php
   page-new.php
   plugin-editor.php
   plugins.php
   post.php
   profile.php
   quicktags.js
   setup-config.php
   sidebar.php
   templates.php
   theme-editor.php
   themes.php
   update-links.php
   upgrade-functions.php
   upgrade-schema.php
   upgrade.php
   upload.php
   user-edit.php
   users.php
   wp-admin.css

<?php
$mode = 'bookmarklet';
require_once('admin.php');

if ($user_level == 0)
	die ("Cheatin' uh?");

if ('b' == $a) {

?><!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>
<script type="text/javascript">
<!--
window.close()
-->
</script>
</head>
<body></body>
</html>
<?php
} else {
	$popuptitle = wp_specialchars(stripslashes($popuptitle));
	$text       = wp_specialchars(stripslashes(urldecode($text)));
	
	$popuptitle = funky_javascript_fix($popuptitle);
	$text       = funky_javascript_fix($text);
	
	$post_title = wp_specialchars($_REQUEST['post_title']);
	if (!empty($post_title)) {
		$post_title =  stripslashes($post_title);
	} else {
		$post_title = $popuptitle;
	}
	
	$edited_post_title = wp_specialchars($post_title);

// $post_pingback needs to be set in any file that includes edit-form.php
    $post_pingback = get_settings('default_pingback_flag');
    
    $content  = wp_specialchars($_REQUEST['content']);
	$popupurl = wp_specialchars($_REQUEST['popupurl']);
    if ( !empty($content) ) {
        $content = wp_specialchars( stripslashes($_REQUEST['content']) );
    } else {
        $content = '<a href="'.$popupurl.'">'.$popuptitle.'</a>'."\n$text";
    }
    
    /* /big funky fixes */

?><!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><?php bloginfo('name') ?> &rsaquo; Bookmarklet &#8212; WordPress</title>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" />
<link rel="stylesheet" href="wp-admin.css" type="text/css" />

<style type="text/css">
<!--

#wpbookmarklet textarea,input,select {
	border-width: 1px;
	border-color: #cccccc;
	border-style: solid;
	padding: 2px;
	margin: 1px;
}

#wpbookmarklet .checkbox {
	background-color: #ffffff;
	border-width: 0px;
	padding: 0px;
	margin: 0px;
}

#wpbookmarklet textarea {
	font-family: Verdana, Geneva, Arial, Helvetica;
	font-size: 0.9em;
}

#wpbookmarklet .wrap {
    border: 0px;
}

#wpbookmarklet #postdiv {
    margin-bottom: 0.5em;
}

#wpbookmarklet #titlediv {
    margin-bottom: 1em;
}

-->
</style>
</head>
<body id="wpbookmarklet">
<div id="wphead">
<h1><?php bloginfo('name') ?></h1>
</div>

<?php require('edit-form.php'); ?>

<?php do_action('admin_footer', ''); ?>

</body>
</html><?php
}
?>

About Koders | Resources | Downloads | Support | Black Duck | Submit Project | Terms of Service | DMCA | Privacy Policy | Site Map| Contact Us