PageRenderTime 74ms CodeModel.GetById 57ms app.highlight 12ms RepoModel.GetById 1ms app.codeStats 1ms

/htdocs/wp-content/plugins/nextgen-gallery/admin/tinymce/window.php

https://bitbucket.org/dkrzos/phc
PHP | 152 lines | 141 code | 10 blank | 1 comment | 2 complexity | 71e3f941037337ef2190bd7af5a2dd23 MD5 | raw file
  1<?php
  2
  3if ( !defined('ABSPATH') )
  4    die('You are not allowed to call this page directly.');
  5
  6global $wpdb, $nggdb;
  7
  8@header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
  9
 10// Get WordPress scripts and styles
 11wp_enqueue_script('jquery-ui-core');
 12wp_enqueue_script('jquery-ui-widget');
 13wp_enqueue_script('jquery-ui-position');
 14global $wp_scripts;
 15if (!isset($wp_scripts->registered['jquery-ui-autocomplete'])) {
 16	wp_register_script( 'jquery-ui-autocomplete', NGGALLERY_URLPATH .'admin/js/jquery.ui.autocomplete.min.js', array('jquery-ui-core'), '1.8.15');
 17}
 18wp_enqueue_script('jquery-ui-autocomplete');
 19?>
 20<html xmlns="http://www.w3.org/1999/xhtml">
 21<head>
 22	<title>NextGEN Gallery</title>
 23	<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
 24	<script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/tiny_mce_popup.js"></script>
 25	<script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/utils/mctabs.js"></script>
 26	<script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/utils/form_utils.js"></script>
 27	<?php wp_print_scripts() ?>
 28    <script language="javascript" type="text/javascript" src="<?php echo NGGALLERY_URLPATH ?>admin/js/ngg.autocomplete.js"></script>
 29	<script language="javascript" type="text/javascript" src="<?php echo NGGALLERY_URLPATH ?>admin/tinymce/tinymce.js"></script>
 30    <link rel="stylesheet" type="text/css" href="<?php echo NGGALLERY_URLPATH ?>admin/css/jquery.ui.css" media="all" />
 31    <base target="_self" />
 32</head>
 33<script type="text/javascript">
 34jQuery(document).ready(function(){
 35    jQuery("#gallerytag").nggAutocomplete( {
 36        type: 'gallery',domain: "<?php echo home_url('index.php', is_ssl() ? 'https' : 'http'); ?>"
 37    });
 38    jQuery("#albumtag").nggAutocomplete( {
 39        type: 'album',domain: "<?php echo home_url('index.php', is_ssl() ? 'https' : 'http'); ?>"
 40    });
 41    jQuery("#singlepictag").nggAutocomplete( {
 42        type: 'image',domain: "<?php echo home_url('index.php', is_ssl() ? 'https' : 'http'); ?>"
 43    });
 44});
 45</script>
 46<body class="nextgen_tinymce_window" id="link" onload="tinyMCEPopup.executeOnLoad('init();');document.body.style.display='';" style="display: none">
 47<!-- <form onsubmit="insertLink();return false;" action="#"> -->
 48	<form name="NextGEN" action="#">
 49	<div class="tabs">
 50		<ul>
 51			<li id="gallery_tab" class="current"><span><a href="javascript:mcTabs.displayTab('gallery_tab','gallery_panel');" onmousedown="return false;"><?php echo _n( 'Gallery', 'Galleries', 1, 'nggallery' ) ?></a></span></li>
 52			<li id="album_tab"><span><a href="javascript:mcTabs.displayTab('album_tab','album_panel');" onmousedown="return false;"><?php echo _n( 'Album', 'Albums', 1, 'nggallery' ) ?></a></span></li>
 53			<li id="singlepic_tab"><span><a href="javascript:mcTabs.displayTab('singlepic_tab','singlepic_panel');" onmousedown="return false;"><?php _e('Picture', 'nggallery'); ?></a></span></li>
 54		</ul>
 55	</div>
 56
 57	<div class="panel_wrapper">
 58		<!-- gallery panel -->
 59		<div id="gallery_panel" class="panel current">
 60		<br />
 61		<table border="0" cellpadding="4" cellspacing="0">
 62         <tr>
 63            <td nowrap="nowrap"><label for="gallerytag"><?php _e("Gallery", 'nggallery'); ?></label></td>
 64            <td><select id="gallerytag" name="gallerytag" style="width: 200px">
 65                <option value="0" selected="selected"><?php _e("Select or enter gallery", 'nggallery'); ?></option>
 66                </select>
 67            </td>
 68          </tr>
 69          <tr>
 70            <td nowrap="nowrap" valign="top"><label for="showtype"><?php _e("Show as", 'nggallery'); ?></label></td>
 71            <td><label><input name="showtype" type="radio" value="nggallery" checked="checked" /> <?php _e('Image list', 'nggallery') ;?></label><br />
 72			<label><input name="showtype" type="radio" value="slideshow"  /> <?php _e('Slideshow', 'nggallery') ;?></label><br />
 73			<label><input name="showtype" type="radio" value="imagebrowser"  /> <?php _e('Imagebrowser', 'nggallery') ;?></label></td>
 74          </tr>
 75        </table>
 76		</div>
 77		<!-- gallery panel -->
 78
 79		<!-- album panel -->
 80		<div id="album_panel" class="panel">
 81		<br />
 82		<table border="0" cellpadding="4" cellspacing="0">
 83         <tr>
 84            <td nowrap="nowrap"><label for="albumtag"><?php _e("Album", 'nggallery'); ?></label></td>
 85            <td><select id="albumtag" name="albumtag" style="width: 200px">
 86                    <option value="0" selected="selected"><?php _e("Select or enter album", 'nggallery'); ?></option>
 87                </select>
 88            </td>
 89          </tr>
 90          <tr>
 91            <td nowrap="nowrap" valign="top"><label for="showtype"><?php _e("Show as", 'nggallery'); ?></label></td>
 92            <td><label><input name="albumtype" type="radio" value="extend" checked="checked" /> <?php _e('Extended version', 'nggallery') ;?></label><br />
 93			<label><input name="albumtype" type="radio" value="compact"  /> <?php _e('Compact version', 'nggallery') ;?></label></td>
 94          </tr>
 95        </table>
 96		</div>
 97		<!-- album panel -->
 98
 99		<!-- single pic panel -->
100		<div id="singlepic_panel" class="panel">
101		<br />
102		<table border="0" cellpadding="4" cellspacing="0">
103         <tr>
104            <td nowrap="nowrap"><label for="singlepictag"><?php _e("Picture", 'nggallery'); ?></label></td>
105            <td><select id="singlepictag" name="singlepictag" style="width: 200px">
106                <option value="0" selected="selected"><?php _e("Select or enter picture", 'nggallery'); ?></option>
107                </select>
108            </td>
109          </tr>
110          <tr>
111            <td nowrap="nowrap"><?php _e("Width x Height", 'nggallery'); ?></td>
112            <td><input type="text" size="5" id="imgWidth" name="imgWidth" value="320" /> x <input type="text" size="5" id="imgHeight" name="imgHeight" value="240" /></td>
113          </tr>
114          <tr>
115            <td nowrap="nowrap" valign="top"><?php _e("Effect", 'nggallery'); ?></td>
116            <td>
117				<label><select id="imgeffect" name="imgeffect">
118					<option value="none"><?php _e("No effect", 'nggallery'); ?></option>
119					<option value="watermark"><?php _e("Watermark", 'nggallery'); ?></option>
120					<option value="web20"><?php _e("Web 2.0", 'nggallery'); ?></option>
121				</select></label>
122			</td>
123          </tr>
124          <tr>
125            <td nowrap="nowrap" valign="top"><?php _e("Float", 'nggallery'); ?></td>
126            <td>
127				<label><select id="imgfloat" name="imgfloat">
128					<option value=""><?php _e("No float", 'nggallery'); ?></option>
129					<option value="left"><?php _e("Left", 'nggallery'); ?></option>
130					<option value="center"><?php _e("Center", 'nggallery'); ?></option>
131					<option value="right"><?php _e("Right", 'nggallery'); ?></option>
132				</select></label>
133			</td>
134          </tr>
135
136        </table>
137		</div>
138		<!-- single pic panel -->
139	</div>
140
141	<div class="mceActionPanel">
142		<div style="float: left">
143			<input type="button" id="cancel" name="cancel" value="<?php _e("Cancel", 'nggallery'); ?>" onclick="tinyMCEPopup.close();" />
144		</div>
145
146		<div style="float: right">
147			<input type="submit" id="insert" name="insert" value="<?php _e("Insert", 'nggallery'); ?>" onclick="insertNGGLink();" />
148		</div>
149	</div>
150</form>
151</body>
152</html>