[ Index ]

PHP Cross Reference of Mambo 4.6.5

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

title

Body

[close]

/mambots/editors/mostlyce/jscripts/tiny_mce/imagemanager/ -> editor.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 PHP Image Editor user interface.

  19   * @author $Author$

  20   * @version $Id$

  21   * @package ImageManager

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

  42      // window.resizeTo(673, 531);

  43      window.resizeTo(673, 555);
  44  //    if(window.opener)

  45  //        I18N = window.opener.I18N;

  46  /*]]>*/

  47  </script>
  48  <script type="text/javascript" src="assets/editor.js"></script>
  49  </head>
  50  
  51  <body>
  52  <div id="indicator">
  53  <img src="img/spacer.gif" id="indicator_image" height="20" width="20" alt="" />
  54  </div>
  55  <div id="tools">
  56      <div id="tools_crop" style="display:none;">
  57          <div id="tool_inputs">
  58              <label for="cx">Start X:</label><input type="text" id="cx"  class="textInput" onchange="updateMarker('crop')"/>
  59              <label for="cy">Start Y:</label><input type="text" id="cy" class="textInput" onchange="updateMarker('crop')"/>
  60              <label for="cw">Width:</label><input type="text" id="cw" class="textInput" onchange="updateMarker('crop')"/>
  61              <label for="ch">Height:</label><input type="text" id="ch" class="textInput" onchange="updateMarker('crop')"/>
  62              <img src="img/div.gif" height="30" width="2" class="div" alt="|" />
  63          </div>    
  64          <a href="javascript: editor.doSubmit('crop');" class="buttons" title="OK"><img src="img/btn_ok.gif" height="30" width="30" alt="OK" /></a>
  65          <a href="javascript: editor.reset();" class="buttons" title="Cancel"><img src="img/btn_cancel.gif" height="30" width="30" alt="Cancel" /></a>        
  66      </div>    
  67      <div id="tools_scale" style="display:none;">
  68          <div id="tool_inputs">
  69              <label for="sw">Width:</label><input type="text" id="sw" class="textInput" onchange="checkConstrains('width')"/>
  70              <a href="javascript:toggleConstraints();" title="Lock"><img src="img/islocked2.gif" id="scaleConstImg" height="14" width="8" alt="Lock" class="div" /></a><label for="sh">Height:</label>
  71              <input type="text" id="sh" class="textInput" onchange="checkConstrains('height')"/>
  72              <input type="checkbox" id="constProp" value="1" checked="checked" onclick="toggleConstraints()"/>
  73              <label for="constProp">Constrain Proportions</label>
  74              <img src="img/div.gif" height="30" width="2" class="div" alt="|" />
  75          </div>    
  76          <a href="javascript: editor.doSubmit('scale');" class="buttons" title="OK"><img src="img/btn_ok.gif" height="30" width="30" alt="OK" /></a>
  77          <a href="javascript: editor.reset();" class="buttons" title="Cancle"><img src="img/btn_cancel.gif" height="30" width="30" alt="Cancel" /></a>        
  78      </div>    
  79      <div id="tools_rotate" style="display:none;">
  80          <div id="tool_inputs">
  81              <select id="flip" name="flip" style="margin-left: 10px; vertical-align: middle;">
  82                <option selected>Flip Image</option>
  83                <option>-----------------</option>
  84                <option value="hoz">Flip Horizontal</option>
  85                <option value="ver">Flip Virtical</option>
  86           </select>
  87              <select name="rotate" onchange="rotatePreset(this)" style="margin-left: 20px; vertical-align: middle;">
  88                <option selected>Rotate Image</option>
  89                <option>-----------------</option>
  90  
  91                <option value="180">Rotate 180 &deg;</option>
  92                <option value="90">Rotate 90 &deg; CW</option>
  93                <option value="-90">Rotate 90 &deg; CCW</option>
  94           </select>
  95              <label for="ra">Angle:</label><input type="text" id="ra" class="textInput" />
  96              <img src="img/div.gif" height="30" width="2" class="div" alt="|" />
  97          </div>    
  98          <a href="javascript: editor.doSubmit('rotate');" class="buttons" title="OK"><img src="img/btn_ok.gif" height="30" width="30" alt="OK" /></a>
  99          <a href="javascript: editor.reset();" class="buttons" title="Cancle"><img src="img/btn_cancel.gif" height="30" width="30" alt="Cancel" /></a>        
 100      </div>        
 101      <div id="tools_measure" style="display:none;">
 102          <div id="tool_inputs">
 103              <label>X:</label><input type="text" class="measureStats" id="sx" />
 104              <label>Y:</label><input type="text" class="measureStats" id="sy" />
 105              <img src="img/div.gif" height="30" width="2" class="div" alt="|" />
 106              <label>W:</label><input type="text" class="measureStats" id="mw" />
 107              <label>H:</label><input type="text" class="measureStats" id="mh" />
 108              <img src="img/div.gif" height="30" width="2" class="div" alt="|" />
 109              <label>A:</label><input type="text" class="measureStats" id="ma" />        
 110              <label>D:</label><input type="text" class="measureStats" id="md" />        
 111              <img src="img/div.gif" height="30" width="2" class="div" alt="|" />
 112              <button type="button" onclick="editor.reset();" >Clear</button>
 113          </div>    
 114      </div>
 115      <div id="tools_save" style="display:none;">
 116          <div id="tool_inputs">
 117              <label for="save_filename">Filename:</label><input type="text" id="save_filename" value="<?php echo $editor->getDefaultSaveFile();?>"/>
 118              <select name="format" id="save_format" style="margin-left: 10px; vertical-align: middle;" onchange="updateFormat(this)">
 119              <option value="" selected>Image Format</option>
 120              <option value="">---------------------</option>
 121              <option value="jpeg,85">JPEG High</option>
 122              <option value="jpeg,60">JPEG Medium</option>
 123              <option value="jpeg,35">JPEG Low</option>
 124              <option value="png">PNG</option>
 125              <?php if($editor->isGDGIFAble() != -1) { ?>
 126              <option value="gif">GIF</option>
 127              <?php } ?>
 128           </select>
 129              <label>Quality:</label>
 130              <table style="display: inline; vertical-align: middle;" cellpadding="0" cellspacing="0">
 131                  <tr>
 132                  <td>
 133                      <div id="slidercasing"> 
 134                  <div id="slidertrack" style="width:100px"><img src="img/spacer.gif" width="1" height="1" border="0" alt="track"></div>
 135              <div id="sliderbar" style="left:85px" onmousedown="captureStart();"><img src="img/spacer.gif" width="1" height="1" border="0" alt="track"></div>
 136              </div>    
 137                  </td>
 138                  </tr>
 139              </table>                
 140              <input type="text" id="quality" onchange="updateSlider(this.value)" style="width: 2em;" value="85"/>
 141              <img src="img/div.gif" height="30" width="2" class="div" alt="|" />
 142          </div>    
 143          <a href="javascript: editor.doSubmit('save');window.opener.parent.location.reload();parent.close();" class="buttons" title="OK"><img src="img/btn_ok.gif" height="30" width="30" alt="OK" /></a>
 144          <a href="javascript: editor.reset();" class="buttons" title="Cancel"><img src="img/btn_cancel.gif" height="30" width="30" alt="Cancel" /></a>        
 145      </div>    
 146  </div>
 147  <div id="toolbar">
 148  <a href="javascript:toggle('crop')" id="icon_crop" title="Crop"><img src="img/crop.gif" height="20" width="20" alt="Crop" /><span>Crop</span></a>
 149  <a href="javascript:toggle('scale')" id="icon_scale" title="Resize"><img src="img/scale.gif" height="20" width="20" alt="Resize" /><span>Resize</span></a>
 150  <a href="javascript:toggle('rotate')" id="icon_rotate" title="Rotate"><img src="img/rotate.gif" height="20" width="20" alt="Rotate" /><span>Rotate</span></a>
 151  <a href="javascript:toggle('measure')" id="icon_measure" title="Measure"><img src="img/measure.gif" height="20" width="20" alt="Measure" /><span>Measure</span></a>
 152  <a href="javascript: toggleMarker();" title="Marker"><img id="markerImg" src="img/t_black.gif" height="20" width="20" alt="Marker" /><span>Marker</span></a>
 153  <a href="javascript:toggle('save')" id="icon_save" title="Save"><img src="img/save.gif" height="20" width="20" alt="Save" /><span>Save</span></a>
 154  </div>
 155  <div id="contents">
 156  <iframe src="editorFrame.php?img=<?php if(isset($_GET['img'])) echo rawurlencode($_GET['img']); ?>" name="editor" id="editor"  scrolling="auto" title="Image Editor" frameborder="0"></iframe>
 157  </div>
 158  <div id="bottom"></div>
 159  </body>
 160  </html>