[ Index ]

PHP Cross Reference of Joomla 1.5.26 DE

title

Body

[close]

/administrator/components/com_media/views/images/tmpl/ -> default.php (source)

   1  <?php defined('_JEXEC') or die('Restricted access'); ?>
   2  <script type='text/javascript'>
   3  var image_base_path = '<?php $params =& JComponentHelper::getParams('com_media');
   4  echo $params->get('image_path', 'images/stories');?>/';
   5  </script>
   6  <form action="index.php" id="imageForm" method="post" enctype="multipart/form-data">
   7      <div id="messages" style="display: none;">
   8          <span id="message"></span><img src="<?php echo JURI::base() ?>components/com_media/images/dots.gif" width="22" height="12" alt="..." />
   9      </div>
  10      <fieldset>
  11          <div style="float: left">
  12              <label for="folder"><?php echo JText::_('Directory') ?></label>
  13              <?php echo $this->folderList; ?>
  14              <button type="button" id="upbutton" title="<?php echo JText::_('Directory Up') ?>"><?php echo JText::_('Up') ?></button>
  15          </div>
  16          <div style="float: right">
  17              <button type="button" onclick="ImageManager.onok();window.parent.document.getElementById('sbox-window').close();"><?php echo JText::_('Insert') ?></button>
  18              <button type="button" onclick="window.parent.document.getElementById('sbox-window').close();"><?php echo JText::_('Cancel') ?></button>
  19          </div>
  20      </fieldset>
  21      <iframe id="imageframe" name="imageframe" src="index.php?option=com_media&amp;view=imagesList&amp;tmpl=component&amp;folder=<?php echo $this->state->folder?>"></iframe>
  22  
  23      <fieldset>
  24          <table class="properties">
  25              <tr>
  26                  <td><label for="f_url"><?php echo JText::_('Image URL') ?></label></td>
  27                  <td><input type="text" id="f_url" value="" /></td>
  28                  <td><label for="f_align"><?php echo JText::_('Align') ?></label></td>
  29                  <td>
  30                      <select size="1" id="f_align" title="Positioning of this image">
  31                          <option value="" selected="selected"><?php echo JText::_('Not Set') ?></option>
  32                          <option value="left"><?php echo JText::_('Left') ?></option>
  33                          <option value="right"><?php echo JText::_('Right') ?></option>
  34                      </select>
  35                  </td>
  36              </tr>
  37              <tr>
  38                  <td><label for="f_alt"><?php echo JText::_('Image description') ?></label></td>
  39                  <td><input type="text" id="f_alt" value="" /></td>
  40              </tr>
  41              <tr>
  42                  <td><label for="f_title"><?php echo JText::_('Title') ?></label></td>
  43                  <td><input type="text" id="f_title" value="" /></td>
  44                  <td><label for="f_caption"><?php echo JText::_('Caption') ?></label></td>
  45                  <td><input type="checkbox" id="f_caption" /></td>
  46              </tr>
  47          </table>
  48      </fieldset>
  49      <input type="hidden" id="dirPath" name="dirPath" />
  50      <input type="hidden" id="f_file" name="f_file" />
  51      <input type="hidden" id="tmpl" name="component" />
  52  </form>
  53  <?php    $params =& JComponentHelper::getParams('com_media');
  54          $acl = & JFactory::getACL();
  55          switch ($params->get('allowed_media_usergroup')) 
  56          {
  57              case '1':
  58                  $acl->addACL( 'com_media', 'upload', 'users', 'publisher' );
  59                  break;
  60              case '2':
  61                  $acl->addACL( 'com_media', 'upload', 'users', 'publisher' );
  62                  $acl->addACL( 'com_media', 'upload', 'users', 'editor' );
  63                  break;
  64              case '3': 
  65                  $acl->addACL( 'com_media', 'upload', 'users', 'publisher' );
  66                  $acl->addACL( 'com_media', 'upload', 'users', 'editor' );                
  67                  $acl->addACL( 'com_media', 'upload', 'users', 'author' );
  68                  break;                                
  69              case '4':
  70                  $acl->addACL( 'com_media', 'upload', 'users', 'publisher' );                
  71                  $acl->addACL( 'com_media', 'upload', 'users', 'editor' );
  72                  $acl->addACL( 'com_media', 'upload', 'users', 'author' );
  73                  $acl->addACL( 'com_media', 'upload', 'users', 'registered' );
  74                  break;
  75          } ?>
  76  <?php $user = & JFactory::getUser(); ?>
  77  <?php $canUpload= ($user->authorize('com_media', 'upload')); ?>     
  78  <?php if ($canUpload) : ?>            
  79      <form action="<?php echo JURI::base(); ?>index.php?option=com_media&amp;task=file.upload&amp;tmpl=component&amp;<?php echo $this->session->getName().'='.$this->session->getId(); ?>&amp;pop_up=1&amp;<?php echo JUtility::getToken();?>=1" id="uploadForm" method="post" enctype="multipart/form-data">
  80          <fieldset>
  81              <legend><?php echo JText::_('Upload'); ?></legend>
  82              <fieldset class="actions">
  83                  <input type="file" id="file-upload" name="Filedata" />
  84                  <input type="submit" id="file-upload-submit" value="<?php echo JText::_('Start Upload'); ?>"/>
  85                  <span id="upload-clear"></span>
  86              </fieldset>
  87              <ul class="upload-queue" id="upload-queue">
  88                  <li style="display: none" />
  89              </ul>
  90          </fieldset>
  91          <input type="hidden" name="return-url" value="<?php echo base64_encode('index.php?option=com_media&view=images&tmpl=component&e_name='.JRequest::getCmd('e_name')); ?>" />
  92  </form>
  93  <?php endif; ?>


Generated: Wed Mar 28 15:54:07 2012 Cross-referenced by PHPXref 0.7.1