[ Index ]
 

Code source de eGroupWare 1.2.106-2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/phpgwapi/js/tinymce/jscripts/tiny_mce/plugins/filemanager/InsertFile/ -> view_icon.php (source)

   1  <?php
   2      /**************************************************************************\
   3      * eGroupWare - Insert File Dialog, File Manager -plugin for tinymce        *
   4      * http://www.eGroupWare.org                                                *
   5      * Authors Al Rashid <alrashid@klokan.sk>                                   *
   6      *     and Xiang Wei ZHUO <wei@zhuo.org>                                    *
   7      * Modified for eGW by Cornelius Weiss <egw@von-und-zu-weiss.de>            *
   8      * --------------------------------------------                             *
   9      * This program is free software; you can redistribute it and/or modify it  *
  10      * under the terms of the GNU General Public License as published by the    *
  11      * Free Software Foundation; version 2 of the License.                      *
  12      \**************************************************************************/
  13  ?>
  14  
  15  <script language="JavaScript" type="text/JavaScript">
  16  
  17  function pviiClassNew(obj, new_style) { //v2.6 by PVII
  18      obj.className=new_style;
  19  }
  20  
  21  function deleteImage(file) 
  22  {
  23      if(confirm("Delete image \""+file+"\"?")) 
  24      return true;
  25  
  26      return false;
  27  }
  28  </script>
  29  
  30  <?php
  31  class view_icon {
  32  
  33  	function view_icon()
  34      {
  35          require_once  'Transform.php';
  36      }
  37      
  38  	function dir_name($dir) 
  39      {
  40          $lastSlash = intval(strrpos($dir, '/'));
  41          if($lastSlash == strlen($dir)-1){
  42              return substr($dir, 0, $lastSlash);
  43          }
  44          else
  45          return dirname($dir);
  46      }
  47      
  48  	function folder_item($params)
  49      {
  50  //         $num_files = num_files($params['absolutePath']);
  51          return '<td>
  52          <table width="102" border="0" cellpadding="0" cellspacing="2">
  53              <tr> 
  54                  <td align="center" class="imgBorder" onMouseOver="pviiClassNew(this,\'imgBorderHover\')" onMouseOut="pviiClassNew(this,\'imgBorder\')">
  55                      <a href="javascript:changeDir('.$params['folderNb'].');" title="'.$params['entry'].'">
  56                      <img src="img/folder.gif" width="80" height="80" border=0 alt="'. $params['entry'].'">
  57                      </a>
  58                  </td>
  59              </tr>
  60              <tr> 
  61                  <td><table width="100%" border="0" cellspacing="1" cellpadding="2">
  62                      <tr> 
  63                          <td width="1%" class="buttonOut" onMouseOver="pviiClassNew(this,\'buttonHover\')" onMouseOut="pviiClassNew(this,\'buttonOut\')">
  64                          <!-- <a href="files.php?delFolder='. $params['absolutePath']. '&dir='. $newPath. '" onClick="return deleteFolder(\''. $dir.'\','.
  65                          $num_files. ')"><img src="img/edit_trash.gif" width="15" height="15" border="0"></a></td> -->
  66                          <td width="99%" class="imgCaption">'. $params['entry']. '</td>
  67                      </tr>
  68                  </table></td>
  69              </tr>
  70          </table>
  71          </td>';
  72      }
  73      
  74  	function files_item($params)
  75      {
  76          
  77          
  78          $img_url = $params['MY_BASE_URL']. $params['relativePath'];
  79          $thumb_image = 'thumbs.php?img='.urlencode($params['relativePath']);//$params['absolutePath']);
  80          $filesize = $params['parsed_size'];
  81          $file = $params['entry'];
  82          $ext = $params['ext'];
  83          $info = $params['info'];
  84          return '    
  85          <td>
  86              <table width="102" border="0" cellpadding="0" cellspacing="2">
  87                  <tr> 
  88                  <td align="center" class="imgBorder" onMouseOver="pviiClassNew(this,\'imgBorderHover\')" onMouseOut="pviiClassNew(this,\'imgBorder\')">
  89                      <a href="javascript:;" onClick="javascript:fileSelected(\''. $img_url. '\',\''. $file. '\',\''. $ext. '\','.  $info[0]. ','. $info[1]. ');">
  90                      <img src="'. $thumb_image. '" alt="'. $file. ' - '. $filesize. '" border="0"></a></td>
  91                  </tr>
  92                  <tr>
  93                  <td><table width="100%" border="0" cellspacing="0" cellpadding="2">
  94                          <tr> 
  95                              <!-- <td width="1%" class="buttonOut" onMouseOver="pviiClassNew(this,\'buttonHover\')" onMouseOut="pviiClassNew(this,\'buttonOut\')">
  96                              <a href="javascript:;" onClick="javascript:preview(\''. $img_url. '\',\''. $file. '\',\''. $filesize. '\','.
  97                              $info[0].','.$info[1]. ');"><img src="img/edit_pencil.gif" width="15" height="15" border="0"></a></td> 
  98                              <td width="1%" class="buttonOut" onMouseOver="pviiClassNew(this,\'buttonHover\')" onMouseOut="pviiClassNew(this,\'buttonOut\')">
  99                              <a href="files.php?delFile='. $file.' &dir='. $newPath. '" onClick="return deleteImage(\''. $file. '\');"><img src="img/edit_trash.gif" width="15" height="15" border="0"></a></td> -->
 100                              <td colspan="3" width="98%" class="imgCaption">'. $info[0].'x'.$info[1]. '</td>
 101                          </tr>
 102                  </table></td>
 103                  </tr>
 104              </table>
 105          </td>';
 106      }
 107      
 108  	function files_header($param)
 109      {
 110          return "";
 111      }
 112      
 113  	function files_footer($param)
 114      {
 115          return "";
 116      }
 117      
 118  	function folders_header($param)
 119      {
 120          return "";
 121      }
 122  
 123  	function folders_footer($param)
 124      {
 125          return "";
 126      }
 127  
 128  	function table_header($param) 
 129      {
 130          return '<table class="sort-table" id="tableHeader" border="0" cellpadding="0" cellspacing="2"><tr id="sortmefirst">';
 131      }
 132      
 133  	function table_footer($param) 
 134      {
 135          return '</tr></table>';
 136      }
 137  }
 138  ?>


Généré le : Sun Feb 25 17:20:01 2007 par Balluche grâce à PHPXref 0.7