-$url = clean_url($_GET['u']);
-$image = $_GET['i'];
-
-if($_REQUEST['ajax']) {
-switch ($_REQUEST['ajax']) {
- case 'video': ?>
- <script type="text/javascript" charset="utf-8">
- jQuery('.select').click(function() {
- append_editor(jQuery('#embed-code').val());
- jQuery('#extra_fields').hide();
- jQuery('#extra_fields').html('');
- });
- jQuery('.close').click(function() {
- jQuery('#extra_fields').hide();
- jQuery('#extra_fields').html('');
- });
- </script>
- <div class="postbox">
- <h2><label for="embed-code"><?php _e('Embed Code') ?></label></h2>
- <div class="inside">
- <textarea name="embed-code" id="embed-code" rows="8" cols="40"><?php echo format_to_edit($selection, true); ?></textarea>
- <p id="options"><a href="#" class="select button"><?php _e('Insert Video'); ?></a> <a href="#" class="close button"><?php _e('Cancel'); ?></a></p>
- </div>
- </div>
- <?php break;
-
- case 'photo_thickbox': ?>
- <script type="text/javascript" charset="utf-8">
- jQuery('.cancel').click(function() {
- tb_remove();
- });
- jQuery('.select').click(function() {
- image_selector();
- });
- </script>
- <h3 class="tb"><label for="this_photo_description"><?php _e('Description') ?></label></h3>
- <div class="titlediv">
- <div class="titlewrap">
- <input id="this_photo_description" name="photo_description" class="tbtitle text" onkeypress="if(event.keyCode==13) image_selector();" value="<?php echo attribute_escape($title);?>"/>
- </div>
- </div>
-
- <p class="centered"><input type="hidden" name="this_photo" value="<?php echo attribute_escape($image); ?>" id="this_photo" />
- <a href="#" class="select"><img src="<?php echo clean_url($image); ?>" alt="<?php echo attribute_escape(__('Click to insert.')); ?>" title="<?php echo attribute_escape(__('Click to insert.')); ?>" /></a></p>
-
- <p id="options"><a href="#" class="select button"><?php _e('Insert Image'); ?></a> <a href="#" class="cancel button"><?php _e('Cancel'); ?></a></p>
-