[ Index ]

PHP Cross Reference of Mambo 4.6.5

[ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/mambots/editors/mostlyce/jscripts/tiny_mce/imagemanager/ -> manager.php (source)

   1  <?php
   2  //Custom MOStlyCE code

   3  require('../../../../../../configuration.php');
   4  require ($mosConfig_absolute_path.'mambots/editors/mostlyce/jscripts/tiny_mce/auth_check.php');
   5  $result = externalCallCheck($mosConfig_absolute_path, $mosConfig_secret);
   6  if (!$result) {
   7      die('Direct Access to this location is not allowed.');
   8  }
   9  require ($mosConfig_absolute_path.'/mambots/editors/mostlyce/jscripts/tiny_mce/mostlyce_config.php');
  10  //If the Image Manager is not enabled stop them here

  11  if ($editor_plugin_img_mgr!=='true') {
  12      die('Direct Access to this location is not allowed.');
  13  }
  14  //End custom MOStlyCE code

  15  ?>
  16  <?php
  17  /**

  18   * The main GUI for the ImageManager.

  19   * @author $Author$

  20   * @version $Id$

  21   * @package ImageManager

  22   */
  23  
  24      require_once ('config.inc.php');
  25      require_once ('Classes/ImageManager.php');
  26      
  27      $manager = new ImageManager($IMConfig);
  28      $dirs = $manager->getDirs();
  29  
  30  ?>
  31  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  32  
  33  <html>
  34  <head>
  35      <title>Insert Image</title>
  36    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  37   <link href="assets/manager.css" rel="stylesheet" type="text/css" />    
  38  <script type="text/javascript" src="assets/popup.js"></script>
  39  <script type="text/javascript" src="assets/dialog.js"></script>
  40  <script type="text/javascript">
  41  /*<![CDATA[*/

  42      window.resizeTo(600, 460);
  43  
  44      if(window.opener)
  45          I18N = window.opener.ImageManager.I18N;
  46  
  47      var thumbdir = "<?php echo $IMConfig['thumbnail_dir']; ?>";
  48      var base_url = "<?php echo $manager->getBaseURL(); ?>";
  49  /*]]>*/

  50  </script>
  51  <script type="text/javascript" src="assets/manager.js"></script>
  52  </head>
  53  <body>
  54  <div class="title">Insert Image</div>
  55  <form action="images.php" id="uploadForm" method="post" enctype="multipart/form-data">
  56  <fieldset><legend>Image Manager</legend>
  57  <div class="dirs">
  58      <label for="dirPath">Directory</label>
  59      <select name="dir" class="dirWidth" id="dirPath" onchange="updateDir(this)">
  60      <option value="/">/</option>
  61  <?php foreach($dirs as $relative=>$fullpath) { ?>
  62          <option value="<?php echo rawurlencode($relative); ?>"><?php echo $relative; ?></option>
  63  <?php } ?>
  64      </select>
  65      <a href="#" onclick="javascript: goUpDir();" title="Directory Up"><img src="img/btnFolderUp.gif" height="15" width="15" alt="Directory Up" /></a>
  66  <?php if($IMConfig['safe_mode'] == false && $IMConfig['allow_new_dir']) { ?>
  67      <a href="#" onclick="newFolder();" title="New Folder"><img src="img/btnFolderNew.gif" height="15" width="15" alt="New Folder" /></a>
  68  <?php } ?>
  69      <div id="messages" style="display: none;"><span id="message"></span><img SRC="img/dots.gif" width="22" height="12" alt="..." /></div>
  70      <iframe src="images.php" name="imgManager" id="imgManager" class="imageFrame" scrolling="auto" title="Image Selection" frameborder="0"></iframe>
  71  </div>
  72  </fieldset>
  73  <!-- image properties -->
  74      <table class="inputTable">
  75          <tr>
  76              <td align="right"><label for="f_url">Image File</label></td>
  77              <td><input type="text" id="f_url" class="largelWidth" value="" /></td>
  78              <td rowspan="3" align="right">&nbsp;</td>
  79              <td align="right"><label for="f_width">Width</label></td>
  80              <td><input type="text" id="f_width" class="smallWidth" value="" onchange="javascript:checkConstrains('width');"/></td>
  81              <td rowspan="2" align="right"><img src="img/locked.gif" id="imgLock" width="25" height="32" alt="Constrained Proportions" /></td>
  82              <td rowspan="3" align="right">&nbsp;</td>
  83              <td align="right"><label for="f_vert">V Space</label></td>
  84              <td><input type="text" id="f_vert" class="smallWidth" value="" /></td>
  85          </tr>        
  86          <tr>
  87              <td align="right"><label for="f_alt">Alt</label></td>
  88              <td><input type="text" id="f_alt" class="largelWidth" value="" /></td>
  89              <td align="right"><label for="f_height">Height</label></td>
  90              <td><input type="text" id="f_height" class="smallWidth" value="" onchange="javascript:checkConstrains('height');"/></td>
  91              <td align="right"><label for="f_horiz">H Space</label></td>
  92              <td><input type="text" id="f_horiz" class="smallWidth" value="" /></td>
  93          </tr>
  94          <tr>
  95  <?php if($IMConfig['allow_upload'] == true) { ?>
  96              <td align="right"><label for="upload">Upload</label></td>
  97              <td>
  98                  <table cellpadding="0" cellspacing="0" border="0">
  99                    <tr>
 100                      <td><input type="file" name="upload" id="upload"/></td>
 101                      <td>&nbsp;<button type="submit" name="submit" onclick="doUpload();"/>Upload</button></td>
 102                    </tr>
 103                  </table>
 104              </td>
 105  <?php } else { ?>
 106              <td colspan="2"></td>
 107  <?php } ?>
 108              <td align="right"><label for="f_align">Align</label></td>
 109              <td colspan="2">
 110                  <select size="1" id="f_align"  title="Positioning of this image">
 111                    <option value=""                             >Not Set</option>
 112                    <option value="left"                         >Left</option>
 113                    <option value="right"                        >Right</option>
 114                    <option value="texttop"                      >Texttop</option>
 115                    <option value="absmiddle"                    >Absmiddle</option>
 116                    <option value="baseline" selected="selected" >Baseline</option>
 117                    <option value="absbottom"                    >Absbottom</option>
 118                    <option value="bottom"                       >Bottom</option>
 119                    <option value="middle"                       >Middle</option>
 120                    <option value="top"                          >Top</option>
 121                  </select>
 122              </td>
 123              <td align="right"><label for="f_border">Border</label></td>
 124              <td><input type="text" id="f_border" class="smallWidth" value="" /></td>
 125          </tr>
 126          <tr> 
 127           <td colspan="4" align="right">
 128                  <input type="hidden" id="orginal_width" />
 129                  <input type="hidden" id="orginal_height" />
 130              <input type="checkbox" id="constrain_prop" checked="checked" onclick="javascript:toggleConstrains(this);" />
 131            </td>
 132            <td colspan="5"><label for="constrain_prop">Constrain Proportions</label></td>
 133        </tr>
 134      </table>
 135  <!--// image properties -->    
 136      <div style="text-align: right;"> 
 137            <hr />
 138            <button type="button" class="buttons" onclick="return refresh();">Refresh</button>
 139            <button type="button" class="buttons" onclick="return onOK();">OK</button>
 140            <button type="button" class="buttons" onclick="return onCancel();">Cancel</button>
 141      </div>
 142      <input type="hidden" id="f_file" name="f_file" />
 143  </form>
 144  </body>
 145  </html>