home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 April / CMCD0404.ISO / Software / Freeware / Programare / groupoffice-com-2.01 / modules / filesystem / shares.inc < prev    next >
Text File  |  2004-03-08  |  2KB  |  72 lines

  1. <?php
  2. /*
  3. Copyright Intermesh 2003
  4. Author: Merijn Schering <mschering@intermesh.nl>
  5. Version: 1.0 Release date: 08 July 2003
  6.  
  7. This program is free software; you can redistribute it and/or modify it
  8. under the terms of the GNU General Public License as published by the
  9. Free Software Foundation; either version 2 of the License, or (at your
  10. option) any later version.
  11. */
  12. ?>
  13.  
  14. <table border="0" cellpadding="0" cellspacing="0" class="TableBorder" width="400">
  15. <tr>
  16.     <td valign="top">
  17.     <table border="0" cellpadding="1" cellspacing="1" width="100%">
  18.     <tr>
  19.         <td colspan="99" class="TableHead"><?php echo $fbShares; ?></td>
  20.     </tr>
  21.     <tr>
  22.         <td class="TableInside">
  23.         <table border="0" cellpadding="4" cellspacing="0">
  24.         <tr>
  25.             <td colspan="2"><?php if(isset($feedback)) echo $feedback; ?> </td>
  26.         </tr>
  27.         <tr>
  28.             <td>
  29.             <table border="0" cellpadding="4" cellspacing="0">
  30.             <?php
  31.             if (isset($_REQUEST['delete_share']))
  32.             {
  33.                 $fs->delete_share(smartstrip($_REQUEST['delete_share']));
  34.             }
  35.             $count = $fs->get_shares($GO_SECURITY->user_id);
  36.  
  37.             while($fs->next_record())
  38.             {
  39.                 if (file_exists($fs->f('path')))
  40.                 {
  41.                     $display_path = '/'.str_replace($GO_CONFIG->file_storage_path,'',$fs->f('path'));
  42.                     echo '<tr><td><img width="16" height="16" border="0" src="'.$GO_THEME->images['folder'].'" /></td>';
  43.                     echo '<td><a href="'.$_SERVER['PHP_SELF'].'?task=properties&path='.urlencode($fs->f('path')).'">'.$display_path.'</a></td>';
  44.                     echo "<td><a href='javascript:confirm_action(\"".$_SERVER['PHP_SELF']."?task=shares&path=".urlencode($path)."&delete_share=".urlencode($fs->f('path'))."\",\"".rawurlencode($strDeletePrefix."'".$display_path."'".$strDeleteSuffix)."\")' title=\"".$strDeleteItem." '".$display_path."'\"><img src=\"".$GO_THEME->images['delete']."\" border=\"0\"></a></td></tr>\n";
  45.                 }else
  46.                 {
  47.                     $fs2 = new filesystem();
  48.                     $fs2->delete_share($fs->f('path'));
  49.                     $count--;
  50.                 }
  51.             }
  52.             $text = ($count == 1) ? $fbShare : $fbShares;
  53.             echo '<tr><td colspan="2"><i>'.$count.' '.$text.'</td></tr>';
  54.             ?>
  55.             </table>
  56.             </td>
  57.         </tr>
  58.         <tr>
  59.             <td colspan="2">
  60.             <br />
  61.             <?php
  62.             $button = new button($cmdBack, "javascript:document.location='".$_SERVER['PHP_SELF']."?path=".$urlencoded_path."';");
  63.             ?>
  64.             </td>
  65.         </tr>
  66.         </table>
  67.         </td>
  68.     </tr>
  69.     </table>
  70.     </td>
  71. </tr>
  72. </table>