Ignore:
Timestamp:
05/04/05 07:08:32 (15 years ago)
Author:
niko
Message:

#225
several ImageManager? fixes, see #225 for details

File:
1 edited

Legend:

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

    r60 r111  
    6262                <td> 
    6363 
    64                 <? _ddt( __FILE__, __LINE__, "drawFiles(): relative is '" . $file['relative'] . "' thumbnail '" . $manager->getThumbnail($file['relative']) . "'" ); ?> 
     64                <?php _ddt( __FILE__, __LINE__, "drawFiles(): relative is '" . $file['relative'] . "' thumbnail '" . $manager->getThumbnail($file['relative']) . "'" ); ?> 
    6565 
    6666                <table width="100" cellpadding="0" cellspacing="0"><tr><td class="block"> 
    67  
    68                 <a href="javascript:;" onclick="selectImage('<? echo $file['relative'];?>', '<? echo $entry; ?>', <? echo $file['image'][0];?>, <? echo $file['image'][1]; ?>);"title="<? echo $entry; ?> - <? echo Files::formatSize($file['stat']['size']); ?>"><img src="<? print $manager->getThumbnail($file['relative']); ?>" alt="<? echo $entry; ?> - <? echo Files::formatSize($file['stat']['size']); ?>"/></a> 
     67        <table width="100" cellpadding="0" cellspacing="0"><tr><td class="block" style="cursor: pointer;" onclick="selectImage('<? echo $file['relative'];?>', '<? echo $entry; ?>', <? echo $file['image'][0];?>, <? echo $file['image'][1]; ?>);" title="<?php echo $entry; ?> - <?php echo Files::formatSize($file['stat']['size']); ?>"> 
     68 
     69                <img src="<?php print $manager->getThumbnail($file['relative']); ?>" alt="<?php echo $entry; ?> - <?php echo Files::formatSize($file['stat']['size']); ?>"/> 
    6970                </td></tr><tr><td class="edit"> 
    70                         <a href="<? print $IMConfig['backend_url']; ?>__function=images&dir=<? echo $relative; ?>&amp;delf=<? echo rawurlencode($file['relative']);?>" title="Trash" onclick="return confirmDeleteFile('<? echo $entry; ?>');"><img src="<? print $IMConfig['base_url'];?>img/edit_trash.gif" height="15" width="15" alt="Trash"/></a><a href="javascript:;" title="Edit" onclick="editImage('<? echo rawurlencode($file['relative']);?>');"><img src="<? print $IMConfig['base_url'];?>img/edit_pencil.gif" height="15" width="15" alt="Edit"/></a> 
    71                 <? if($file['image']){ echo $file['image'][0].'x'.$file['image'][1]; } else echo $entry;?> 
     71                        <a href="<?php print $IMConfig['backend_url']; ?>__function=images&dir=<?php echo $relative; ?>&amp;delf=<?php echo rawurlencode($file['relative']);?>" 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><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> 
     72                <?php if($file['image']){ echo $file['image'][0].'x'.$file['image'][1]; } else echo $entry;?> 
    7273                </td></tr></table></td>  
    73           <?  
     74          <?php  
    7475        }//foreach 
    7576}//function drawFiles 
     
    8788        { ?> 
    8889                <td><table width="100" cellpadding="0" cellspacing="0"><tr><td class="block"> 
    89                 <a href="images.php?dir=<? echo rawurlencode($path); ?>" onclick="updateDir('<? echo $path; ?>')" title="<? echo $dir['entry']; ?>"><img src="<? print $IMConfig['base_url'];?>img/folder.gif" height="80" width="80" alt="<? echo $dir['entry']; ?>" /></a> 
     90                <a href="images.php?dir=<?php echo rawurlencode($path); ?>" 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> 
    9091                </td></tr><tr> 
    9192                <td class="edit"> 
    92                         <a href="images.php?dir=<? echo $relative; ?>&amp;deld=<? echo rawurlencode($path); ?>" title="Trash" onclick="return confirmDeleteDir('<? echo $dir['entry']; ?>', <? echo $dir['count']; ?>);"><img src="<? print $IMConfig['base_url'];?>img/edit_trash.gif" height="15" width="15" alt="Trash"/></a> 
    93                         <? echo $dir['entry']; ?> 
     93                        <a href="images.php?dir=<?php echo $relative; ?>&amp;deld=<?php echo rawurlencode($path); ?>" 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> 
     94                        <?php echo $dir['entry']; ?> 
    9495                </td> 
    9596                </tr></table></td> 
    96           <?  
     97          <?php  
    9798        } //foreach 
    9899}//function drawDirs 
     
    121122<table width="100%"> 
    122123  <tr> 
    123     <td class="error">Invalid base directory: <? echo $manager->config['images_dir']; ?></td> 
     124    <td class="error">Invalid base directory: <?php echo $manager->config['images_dir']; ?></td> 
    124125  </tr> 
    125126</table> 
     
    134135        <title>Image List</title> 
    135136  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    136         <link href="<? print $IMConfig['base_url'];?>assets/imagelist.css" rel="stylesheet" type="text/css" /> 
     137        <link href="<?php print $IMConfig['base_url'];?>assets/imagelist.css" rel="stylesheet" type="text/css" /> 
    137138<script type="text/javascript"> 
    138 _backend_url = "<? print $IMConfig['backend_url']; ?>"; 
     139_backend_url = "<?php print $IMConfig['backend_url']; ?>"; 
    139140</script> 
    140141 
    141 <script type="text/javascript" src="<? print $IMConfig['base_url'];?>assets/dialog.js"></script> 
     142<script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/dialog.js"></script> 
    142143<script type="text/javascript"> 
    143144/*<![CDATA[*/ 
     
    159160                var topDoc = window.top.document; 
    160161 
    161 <?  
     162<?php  
    162163        //we need to refesh the drop directory list 
    163164        //save the current dir, delete all select options 
     
    173174                {       selection.remove(0); } 
    174175                 
    175                 selection.options[selection.length] = new Option("/","<? echo rawurlencode('/'); ?>");   
    176                 <? foreach($dirs as $relative=>$fullpath) { ?> 
    177                 selection.options[selection.length] = new Option("<? echo $relative; ?>","<? echo rawurlencode($relative); ?>");                 
    178                 <? } ?> 
     176                selection.options[selection.length] = new Option("/","<?php echo rawurlencode('/'); ?>");        
     177                <?php foreach($dirs as $relative=>$fullpath) { ?> 
     178                selection.options[selection.length] = new Option("<?php echo $relative; ?>","<?php echo rawurlencode($relative); ?>");           
     179                <?php } ?> 
    179180                 
    180181                for(var i = 0; i < selection.length; i++) 
     
    187188                        } 
    188189                }                
    189 <? } ?> 
     190<?php } ?> 
    190191        }        
    191192 
    192193        function editImage(image)  
    193194        { 
    194                 var url = "<? print $IMConfig['backend_url']; ?>__function=editor&img="+image; 
     195                var url = "<?php print $IMConfig['backend_url']; ?>__function=editor&img="+image; 
    195196                Dialog(url, function(param)  
    196197                { 
     
    206207/*]]>*/ 
    207208</script> 
    208 <script type="text/javascript" src="<? print $IMConfig['base_url'];?>assets/images.js"></script> 
     209<script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/images.js"></script> 
    209210</head> 
    210211 
    211212<body> 
    212 <? if ($manager->isValidBase() == false) { drawErrorBase($manager); }  
     213<?php if ($manager->isValidBase() == false) { drawErrorBase($manager); }  
    213214        elseif(count($list[0]) > 0 || count($list[1]) > 0) { ?> 
    214215<table> 
    215216        <tr> 
    216         <? drawDirs($list[0], $manager); ?> 
    217         <? drawFiles($list[1], $manager); ?> 
     217        <?php drawDirs($list[0], $manager); ?> 
     218        <?php drawFiles($list[1], $manager); ?> 
    218219        </tr> 
    219220</table> 
    220 <? } else { drawNoResults(); } ?> 
     221<?php } else { drawNoResults(); } ?> 
    221222</body> 
    222223</html> 
Note: See TracChangeset for help on using the changeset viewer.