PageRenderTime 70ms CodeModel.GetById 11ms RepoModel.GetById 0ms app.codeStats 0ms

/wp-content/plugins/ckeditor-for-wordpress/plugins/nggallery/window.php

https://bitbucket.org/mihteh/mihteh.com-wp
PHP | 145 lines | 133 code | 9 blank | 3 comment | 5 complexity | 216677cd9431a31bb6f21276e849fb09 MD5 | raw file
Possible License(s): AGPL-1.0, LGPL-2.1, GPL-2.0, GPL-3.0, Apache-2.0
  1. <?php
  2. // look up for the path
  3. //require_once( dirname( dirname( dirname(__FILE__) ) ) . '/ngg-config.php');
  4. require_once('../../../nextgen-gallery/ngg-config.php');
  5. // check for rights
  6. if ( !is_user_logged_in() || !current_user_can('edit_posts') )
  7. wp_die(__("You are not allowed to be here"));
  8. global $wpdb, $nggdb;
  9. ?>
  10. <html xmlns="http://www.w3.org/1999/xhtml">
  11. <head>
  12. <title>NextGEN Gallery</title>
  13. <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
  14. <script type="text/javascript">
  15. var tinyMCEPopup = window.parent.tinyMCEPopup;
  16. </script>
  17. <script language="javascript" type="text/javascript" src="<?php echo get_option('siteurl') ?>/wp-includes/js/tinymce/utils/mctabs.js"></script>
  18. <script language="javascript" type="text/javascript" src="<?php echo CKEDITOR_PLUGIN_URL ?>plugins/nggallery/tinymce.js"></script>
  19. <link rel="stylesheet" href="<?php echo get_option('siteurl') ?>/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/dialog.css?ver=327-1235100-vvq6.2.14line3" />
  20. <base target="_self" />
  21. </head>
  22. <body id="link">
  23. <!-- <form onsubmit="insertLink();return false;" action="#"> -->
  24. <form name="NextGEN" action="#">
  25. <div class="tabs">
  26. <ul>
  27. <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>
  28. <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>
  29. <li id="singlepic_tab"><span><a href="javascript:mcTabs.displayTab('singlepic_tab','singlepic_panel');" onmousedown="return false;"><?php _e('Picture', 'nggallery'); ?></a></span></li>
  30. </ul>
  31. </div>
  32. <div class="panel_wrapper">
  33. <!-- gallery panel -->
  34. <div id="gallery_panel" class="panel current">
  35. <br />
  36. <table border="0" cellpadding="4" cellspacing="0">
  37. <tr>
  38. <td nowrap="nowrap"><label for="gallerytag"><?php _e("Select gallery", 'nggallery'); ?></label></td>
  39. <td><select id="gallerytag" name="gallerytag" style="width: 200px">
  40. <option value="0"><?php _e("No gallery", 'nggallery'); ?></option>
  41. <?php
  42. $gallerylist = $nggdb->find_all_galleries('gid', 'DESC');
  43. if(is_array($gallerylist)) {
  44. foreach($gallerylist as $gallery) {
  45. $name = ( empty($gallery->title) ) ? $gallery->name : $gallery->title;
  46. echo '<option value="' . $gallery->gid . '" >' . $gallery->gid . ' - ' . $name . '</option>' . "\n";
  47. }
  48. }
  49. ?>
  50. </select></td>
  51. </tr>
  52. <tr>
  53. <td nowrap="nowrap" valign="top"><label for="showtype"><?php _e("Show as", 'nggallery'); ?></label></td>
  54. <td><label><input name="showtype" type="radio" value="nggallery" checked="checked" /> <?php _e('Image list', 'nggallery') ;?></label><br />
  55. <label><input name="showtype" type="radio" value="slideshow" /> <?php _e('Slideshow', 'nggallery') ;?></label><br />
  56. <label><input name="showtype" type="radio" value="imagebrowser" /> <?php _e('Imagebrowser', 'nggallery') ;?></label></td>
  57. </tr>
  58. </table>
  59. </div>
  60. <!-- gallery panel -->
  61. <!-- album panel -->
  62. <div id="album_panel" class="panel">
  63. <br />
  64. <table border="0" cellpadding="4" cellspacing="0">
  65. <tr>
  66. <td nowrap="nowrap"><label for="albumtag"><?php _e("Select album", 'nggallery'); ?></label></td>
  67. <td><select id="albumtag" name="albumtag" style="width: 200px">
  68. <option value="0"><?php _e("No album", 'nggallery'); ?></option>
  69. <?php
  70. $albumlist = $wpdb->get_results("SELECT * FROM $wpdb->nggalbum ORDER BY id DESC");
  71. if(is_array($albumlist)) {
  72. foreach($albumlist as $album) {
  73. echo '<option value="' . $album->id . '" >' . $album->id . ' - ' . $album->name . '</option>'."\n";
  74. }
  75. }
  76. ?>
  77. </select></td>
  78. </tr>
  79. <tr>
  80. <td nowrap="nowrap" valign="top"><label for="showtype"><?php _e("Show as", 'nggallery'); ?></label></td>
  81. <td><label><input name="albumtype" type="radio" value="extend" checked="checked" /> <?php _e('Extended version', 'nggallery') ;?></label><br />
  82. <label><input name="albumtype" type="radio" value="compact" /> <?php _e('Compact version', 'nggallery') ;?></label></td>
  83. </tr>
  84. </table>
  85. </div>
  86. <!-- album panel -->
  87. <!-- single pic panel -->
  88. <div id="singlepic_panel" class="panel">
  89. <br />
  90. <table border="0" cellpadding="4" cellspacing="0">
  91. <tr>
  92. <td nowrap="nowrap"><label for="singlepictag"><?php _e("Select picture", 'nggallery'); ?></label></td>
  93. <td><select id="singlepictag" name="singlepictag" style="width: 200px">
  94. <option value="0"><?php _e("No picture", 'nggallery'); ?></option>
  95. <?php
  96. $picturelist = $wpdb->get_results("SELECT * FROM $wpdb->nggpictures ORDER BY pid DESC");
  97. if(is_array($picturelist)) {
  98. foreach($picturelist as $picture) {
  99. echo '<option value="' . $picture->pid . '" >'. $picture->pid . ' - ' . $picture->filename.'</option>'."\n";
  100. }
  101. }
  102. ?>
  103. </select></td>
  104. </tr>
  105. <tr>
  106. <td nowrap="nowrap"><?php _e("Width x Height", 'nggallery'); ?></td>
  107. <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>
  108. </tr>
  109. <tr>
  110. <td nowrap="nowrap" valign="top"><?php _e("Effect", 'nggallery'); ?></td>
  111. <td>
  112. <label><select id="imgeffect" name="imgeffect">
  113. <option value="none"><?php _e("No effect", 'nggallery'); ?></option>
  114. <option value="watermark"><?php _e("Watermark", 'nggallery'); ?></option>
  115. <option value="web20"><?php _e("Web 2.0", 'nggallery'); ?></option>
  116. </select></label>
  117. </td>
  118. </tr>
  119. <tr>
  120. <td nowrap="nowrap" valign="top"><?php _e("Float", 'nggallery'); ?></td>
  121. <td>
  122. <label><select id="imgfloat" name="imgfloat">
  123. <option value=""><?php _e("No float", 'nggallery'); ?></option>
  124. <option value="left"><?php _e("Left", 'nggallery'); ?></option>
  125. <option value="center"><?php _e("Center", 'nggallery'); ?></option>
  126. <option value="right"><?php _e("Right", 'nggallery'); ?></option>
  127. </select></label>
  128. </td>
  129. </tr>
  130. </table>
  131. </div>
  132. <!-- single pic panel -->
  133. </div>
  134. </form>
  135. </body>
  136. </html>