Ignore:
Timestamp:
01/20/08 23:13:25 (12 years ago)
Author:
ray
Message:

#1132 [ExtendedFileManager?] new Version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/ExtendedFileManager/images.php

    r841 r937  
    66 * Version: Updated on 04-07-2006 by Krzysztof Kotowicz 
    77 * Version: Updated on 29-10-2006 by Raimund Meyer 
    8  * Package: ExtendedFileManager (EFM 1.1.3) 
     8 * Version: Updated on 20-01-2008 by Raimund Meyer 
     9 * Package: ExtendedFileManager (EFM 1.4) 
    910 * http://www.afrusoft.com/htmlarea 
    1011 */ 
     
    1516require_once('config.inc.php'); 
    1617require_once('Classes/ExtendedFileManager.php'); 
    17  
     18$backend_url_enc = htmlspecialchars( $IMConfig['backend_url'] ); 
    1819//default path is / 
    1920$relative = '/'; 
     
    6768function drawDirs_Files($list, &$manager)  
    6869{ 
    69         global $relative, $afruViewType, $IMConfig, $insertMode; 
     70        global $relative, $afruViewType, $IMConfig, $insertMode,$backend_url_enc; 
    7071 
    7172    switch ($afruViewType) { 
     
    7374                $maxNameLength = 30; 
    7475                ?> 
    75             <table class="listview"> 
     76            <table class="listview" id="listview"> 
    7677            <thead> 
    77             <tr><th colspan="2">Name</th><th>Size</th><th>Image Size</th><th>Date Modified</th><th>&nbsp;</th></tr></thead> 
     78            <tr><th>Name</th><th>Size</th><th>Image Size</th><th>Date Modified</th><th>&nbsp;</th></tr></thead> 
    7879            <tbody> 
    7980            <?php 
     
    8283                { ?> 
    8384                        <tr> 
    84                         <td><img src="<?php print $IMConfig['base_url'];?>icons/folder_small.gif" alt="" /></td> 
    85                         <th nowrap="nowrap"><a href="<?php print $IMConfig['backend_url']; ?>__function=images&amp;mode=<?php echo $insertMode;?>&amp;dir=<?php echo rawurlencode($path); ?>&amp;viewtype=<?php echo $afruViewType; ?>" onclick="updateDir('<?php echo $path; ?>')" title="<?php echo $dir['entry']; ?>"> 
     85                        <td><span width="20px"><img src="<?php print $IMConfig['base_url'];?>icons/folder_small.gif" alt="" /></span> 
     86                                <a href="<?php print $backend_url_enc; ?>__function=images&amp;mode=<?php echo $insertMode;?>&amp;dir=<?php echo rawurlencode($path); ?>&amp;viewtype=<?php echo $afruViewType; ?>" onclick="updateDir('<?php echo $path; ?>')" title="<?php echo $dir['entry']; ?>"> 
    8687                        <?php 
    8788                        if(strlen($dir['entry'])>$maxNameLength) echo substr($dir['entry'],0,$maxNameLength)."..."; else echo $dir['entry']; 
    8889                        ?> 
    8990                        </a></th> 
    90                         <td colspan="2" nowrap="nowrap">Folder</td> 
    91  
    92                         <td nowrap="nowrap"><?php echo date("d.m.y H:i",$dir['stat']['mtime']); ?></td> 
    93  
    94                         <td class="actions" nowrap="nowrap"> 
    95                                 <a href="<?php print $IMConfig['backend_url']; ?>__function=images&amp;mode=<?php echo $insertMode;?>&amp;dir=<?php echo $relative; ?>&amp;deld=<?php echo rawurlencode($path); ?>&amp;viewtype=<?php echo $afruViewType; ?>" title="Trash" onclick="return confirmDeleteDir('<?php echo $dir['entry']; ?>', <?php echo $dir['count']; ?>);" style="border:0px;"><img src="<?php print $IMConfig['base_url'];?>img/edit_trash.gif" height="15" width="15" alt="Trash" border="0" /></a> 
     91                        <td colspan="2" >Folder</td> 
     92 
     93                        <td ><?php echo date($IMConfig['date_format'],$dir['stat']['mtime']); ?></td> 
     94 
     95                        <td class="actions" > 
     96                                <a href="<?php print $backend_url_enc; ?>__function=images&amp;mode=<?php echo $insertMode;?>&amp;dir=<?php echo $relative; ?>&amp;deld=<?php echo rawurlencode($path); ?>&amp;viewtype=<?php echo $afruViewType; ?>" title="Trash" onclick="return confirmDeleteDir('<?php echo $dir['entry']; ?>', <?php echo $dir['count']; ?>);" style="border:0px;"><img src="<?php print $IMConfig['base_url'];?>img/edit_trash.gif" height="15" width="15" alt="Trash" border="0" /></a> 
    9697                                <?php if ($IMConfig['allow_rename']) { ?> 
    9798                                            <a href="#" title="Rename" onclick="renameDir('<?php echo rawurlencode($dir['entry']);?>'); return false;"><img src="<?php print $IMConfig['base_url'];?>img/edit_rename.gif" height="15" width="15" alt="Rename" border="0" /></a> 
     
    113114                        ?> 
    114115                <tr> 
    115                           <td><img src="<?php print $IMConfig['base_url']; if(is_file('icons/'.$file['ext'].'_small.gif')) echo "icons/".$file['ext']."_small.gif"; else echo $IMConfig['default_listicon']; ?>" alt="" /></td> 
    116                   <th><a href="#" class="thumb" style="cursor: pointer;" ondblclick="this.onclick();window.top.onOK();" onclick="selectImage('<?php echo $file['relative'];?>', '<?php echo preg_replace('#\..{3,4}$#', '', $entry); ?>', <?php echo $file['image'][0];?>, <?php echo $file['image'][1]; ?>);return false;" title="<?php echo $entry; ?> - <?php echo Files::formatSize($file['stat']['size']); ?>" <?php if ($insertMode == 'image') { ?> onmouseover="showPreview('<?php echo $file['relative'];?>')" onmouseout="showPreview(window.parent.document.getElementById('f_url').value)" <?php } ?> > 
     116                          <td><span width="20px"><img src="<?php print $IMConfig['base_url']; if(is_file('icons/'.$file['ext'].'_small.gif')) echo "icons/".$file['ext']."_small.gif"; else echo $IMConfig['default_listicon']; ?>" alt="" /></span> 
     117                                        <a href="#" class="thumb" style="cursor: pointer;" ondblclick="this.onclick();window.top.onOK();" onclick="selectImage('<?php echo $file['relative'];?>', '<?php echo preg_replace('#\..{3,4}$#', '', $entry); ?>', <?php echo $file['image'][0];?>, <?php echo $file['image'][1]; ?>);return false;" title="<?php echo $entry; ?> - <?php echo Files::formatSize($file['stat']['size']); ?>" <?php if ($insertMode == 'image') { ?> onmouseover="showPreview('<?php echo $file['relative'];?>')" onmouseout="showPreview(window.parent.document.getElementById('f_url').value)" <?php } ?> > 
    117118                                <?php 
    118119                                if(strlen($entry)>$maxNameLength) echo substr($entry,0,$maxNameLength)."..."; else echo $entry; 
    119120                                ?> 
    120                   </a></th> 
     121                  </a></td> 
    121122                  <td><?php echo Files::formatSize($file['stat']['size']); ?></td> 
    122123                  <td><?php if($file['image'][0] > 0){ echo $file['image'][0].'x'.$file['image'][1]; } ?></td> 
    123                           <td nowrap="nowrap"><?php echo date("d.m.y H:i",$file['stat']['mtime']); ?></td> 
     124                          <td ><?php echo date($IMConfig['date_format'],$file['stat']['mtime']); ?></td> 
    124125                  <td class="actions"> 
    125126                    <?php if($IMConfig['img_library'] && $IMConfig['allow_edit_image'] && $file['image'][0] > 0) { ?> 
    126127                    <a href="javascript:;" title="Edit" onclick="editImage('<?php echo rawurlencode($file['relative']);?>');"><img src="<?php print $IMConfig['base_url'];?>img/edit_pencil.gif" height="15" width="15" alt="Edit" border="0" /></a> 
    127128                    <?php }  ?>   
    128                     <a href="<?php print $IMConfig['backend_url']; ?>__function=images&amp;dir=<?php echo $relative; ?>&amp;delf=<?php echo rawurlencode($file['relative']);?>&amp;mode=<?php echo $insertMode;?>&amp;viewtype=<?php echo $afruViewType; ?>" title="Trash" onclick="return confirmDeleteFile('<?php echo $entry; ?>');"><img src="<?php print $IMConfig['base_url'];?>img/edit_trash.gif" height="15" width="15" alt="Trash" border="0" /></a> 
     129                    <a href="<?php print $backend_url_enc; ?>__function=images&amp;dir=<?php echo $relative; ?>&amp;delf=<?php echo rawurlencode($file['relative']);?>&amp;mode=<?php echo $insertMode;?>&amp;viewtype=<?php echo $afruViewType; ?>" title="Trash" onclick="return confirmDeleteFile('<?php echo $entry; ?>');"><img src="<?php print $IMConfig['base_url'];?>img/edit_trash.gif" height="15" width="15" alt="Trash" border="0" /></a> 
    129130                                <?php if ($IMConfig['allow_rename']) { ?> 
    130131                    <a href="#" title="Rename" onclick="renameFile('<?php echo rawurlencode($file['relative']);?>'); return false;"><img src="<?php print $IMConfig['base_url'];?>img/edit_rename.gif" height="15" width="15" alt="Rename" border="0" /></a> 
     
    151152                { ?> 
    152153    <div class="dir_holder"> 
    153       <a class="dir" href="<?php print $IMConfig['backend_url'];?>__function=images&amp;mode=<?php echo $insertMode;?>&amp;dir=<?php echo rawurlencode($path); ?>&amp;viewtype=<?php echo $afruViewType; ?>" onclick="updateDir('<?php echo $path; ?>')" title="<?php echo $dir['entry']; ?>"><img src="<?php print $IMConfig['base_url'];?>img/folder.gif" height="80" width="80" alt="<?php echo $dir['entry']; ?>" /></a> 
     154      <a class="dir" href="<?php print $backend_url_enc;?>__function=images&amp;mode=<?php echo $insertMode;?>&amp;dir=<?php echo rawurlencode($path); ?>&amp;viewtype=<?php echo $afruViewType; ?>" onclick="updateDir('<?php echo $path; ?>')" title="<?php echo $dir['entry']; ?>"><img src="<?php print $IMConfig['base_url'];?>img/folder.gif" height="80" width="80" alt="<?php echo $dir['entry']; ?>" /></a> 
    154155 
    155156      <div class="fileName"> 
     
    160161      </div> 
    161162      <div class="edit"> 
    162         <a href="<?php print $IMConfig['backend_url'];?>__function=images&amp;mode=<?php echo $insertMode;?>&amp;dir=<?php echo $relative; ?>&amp;deld=<?php echo rawurlencode($path); ?>&amp;viewtype=<?php echo $afruViewType; ?>" title="Trash" onclick="return confirmDeleteDir('<?php echo $dir['entry']; ?>', <?php echo $dir['count']; ?>);"><img src="<?php print $IMConfig['base_url'];?>img/edit_trash.gif" height="15" width="15" alt="Trash" /></a> 
     163        <a href="<?php print $backend_url_enc;?>__function=images&amp;mode=<?php echo $insertMode;?>&amp;dir=<?php echo $relative; ?>&amp;deld=<?php echo rawurlencode($path); ?>&amp;viewtype=<?php echo $afruViewType; ?>" title="Trash" onclick="return confirmDeleteDir('<?php echo $dir['entry']; ?>', <?php echo $dir['count']; ?>);"><img src="<?php print $IMConfig['base_url'];?>img/edit_trash.gif" height="15" width="15" alt="Trash" /></a> 
    163164        <?php if ($IMConfig['allow_rename']) { ?> 
    164165                    <a href="#" title="Rename" onclick="renameDir('<?php echo rawurlencode($dir['entry']);?>'); return false;"><img src="<?php print $IMConfig['base_url'];?>img/edit_rename.gif" height="15" width="15" alt="Rename" border="0" /></a> 
     
    194195                    <a href="javascript:;" title="Edit" onclick="editImage('<?php echo rawurlencode($file['relative']);?>');"><img src="<?php print $IMConfig['base_url'];?>img/edit_pencil.gif" height="15" width="15" alt="Edit" /></a> 
    195196                        <?php $thisFileNameLength -= 3; } ?> 
    196                     <a href="<?php print $IMConfig['backend_url']; ?>__function=images&amp;mode=<?php echo $insertMode;?>&amp;dir=<?php echo $relative; ?>&amp;delf=<?php echo rawurlencode($file['relative']);?>&amp;viewtype=<?php echo $afruViewType; ?>" title="Trash" onclick="return confirmDeleteFile('<?php echo $entry; ?>');"><img src="<?php print $IMConfig['base_url'];?>img/edit_trash.gif" height="15" width="15" alt="Trash" /></a> 
     197                    <a href="<?php print $backend_url_enc; ?>__function=images&amp;mode=<?php echo $insertMode;?>&amp;dir=<?php echo $relative; ?>&amp;delf=<?php echo rawurlencode($file['relative']);?>&amp;viewtype=<?php echo $afruViewType; ?>" title="Trash" onclick="return confirmDeleteFile('<?php echo $entry; ?>');"><img src="<?php print $IMConfig['base_url'];?>img/edit_trash.gif" height="15" width="15" alt="Trash" /></a> 
    197198                                <?php if ($IMConfig['allow_rename']) { ?> 
    198199                    <a href="#" title="Rename" onclick="renameFile('<?php echo rawurlencode($file['relative']);?>'); return false;"><img src="<?php print $IMConfig['base_url'];?>img/edit_rename.gif" height="15" width="15" alt="Rename" /></a> 
     
    264265                var topDoc = window.top.document; 
    265266                var messages = topDoc.getElementById('messages'); 
    266                 if(messages) 
     267                if (messages) 
     268                { 
    267269                        messages.style.display = "none"; 
     270                } 
     271                //window.parent.resize(); 
    268272        } 
    269273 
     
    273277         
    274278                hideMessage(); 
    275  
    276                 <?php 
     279                <?php if ($afruViewType == 'listview') 
     280                        print "var d = new dragTableCols('listview');"; 
     281                 
    277282                if(isset($uploadStatus) && !is_numeric($uploadStatus) && !is_bool($uploadStatus)) 
    278283                echo "alert(i18n('$uploadStatus'));"; 
     
    375380//--> 
    376381</script> 
    377  
     382<script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/dragTableCols.js"></script> 
    378383</head> 
    379384 
Note: See TracChangeset for help on using the changeset viewer.