[ Index ]
 

Code source de eGroupWare 1.2.106-2

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

title

Body

[fermer]

/mydms/out/ -> out.ViewFolder.php (source)

   1  <?php
   2  include ("../inc/inc.Settings.php");
   3  include ("../inc/inc.AccessUtils.php");
   4  include ("../inc/inc.ClassAccess.php");
   5  include ("../inc/inc.ClassDocument.php");
   6  include ("../inc/inc.ClassFolder.php");
   7  include ("../inc/inc.ClassGroup.php");
   8  include ("../inc/inc.ClassUser.php");
   9  
  10  include ("../inc/inc.DBAccess.php");
  11  include ("../inc/inc.FileUtils.php");
  12  include ("../inc/inc.Language.php");
  13  include ("../inc/inc.OutUtils.php");
  14  
  15  include ("../inc/inc.Authentication.php");
  16  
  17  $folderid = (isset($_GET['folderid'])) ? (int) $_GET['folderid'] : 1;
  18  if(!$folder = getFolder($folderid)) {
  19      die ("Access to folder denied!");
  20  }
  21  
  22  if ($folder->getAccessMode($user) < M_READ) {
  23      die ("Access to folder denied!");
  24  }
  25  
  26  
  27  printHTMLHead( getMLText("folder_title", array("foldername" => $folder->getName()) ) );
  28  printTitleBar($folder);
  29  printFolderPageStart($folder);
  30  
  31  printStartBox(getMLText("document_list"));
  32  ?>
  33      <div id="rightClickMenu" style="border:1px solid grey; position:absolute; display:none; background-color:silver; z-index:40;">the next big thing...</div>
  34      <table cellspacing="5" cellpadding="0" border="0">
  35      <?php
  36          $documents = $folder->getDocuments();
  37          $documents = filterAccess($documents, $user, M_READ);
  38          if (count($documents) > 0)
  39          {
  40              $rownum = (count($documents)*2)+1;
  41              print "<tr>\n";
  42              print "<td></td>\n";
  43              print "<td class=\"filelist\" style=\"border-bottom: 1pt solid #000080;\"><i>".getMLText("name")."</i></td>\n";
  44              print "<td rowspan=".$rownum." style=\"border-left: 1pt solid #000080;\">&nbsp;</td>\n";
  45              print "<td class=\"filelist\" style=\"border-bottom: 1pt solid #000080;\"><i>".getMLText("comment")."</i></td>\n";
  46              print "<td rowspan=".$rownum." style=\"border-left: 1pt solid #000080;\">&nbsp;</td>\n";
  47              print "<td class=\"filelist\" style=\"border-bottom: 1pt solid #000080;\"><i>".getMLText("owner")."</i></td>\n";
  48              print "</tr>\n";
  49              foreach($documents as $document)
  50              {
  51                  $owner = $document->getOwner();
  52                  $comment = $document->getComment();
  53                  if (strlen($comment) > 25) $comment = substr($comment, 0, 22) . "...";
  54                  
  55                  $linkData = array
  56                  (
  57                      'documentid'    => $document->getID(),
  58                      'menuaction'    => 'mydms.uimydms.viewDocument'
  59                  );
  60                  $editURL = $GLOBALS['egw']->link('/index.php',$linkData);
  61                  
  62                  // the old code
  63                  #print "<tr>";
  64                  #print "<td><img src=\"images/file.gif\" width=18 height=18 border=0></td>";
  65                  #print "<td class=\"filelist\"><a class=\"filelist\" href=\"out.ViewDocument.php?documentid=".$document->getID()."\">" . $document->getName() . "</a></td>\n";
  66                  #print "<td class=\"filelist\">" . $comment . "</td>";
  67                  #print "<td class=\"filelist\">".$owner->getFullName()."</td>";
  68                  #print "</tr>";
  69                  
  70                  // the new code
  71                  // onclick="window.open(this.href,this.target,'dependent=yes,width=750,height=400,scrollbars=yes,status=yes'); return false;"
  72                  print "<tr>";
  73                  print "<td><img src=\"images/file.gif\" width=18 height=18 border=0></td>";
  74                  print "<td class=\"filelist\"><a class=\"filelist\" href=\"#\" onclick=\"javascript:egw_openWindowCentered('$editURL','editDocument','680','630');\">" . $document->getName() . "</a></td>\n";
  75                  print "<td class=\"filelist\">" . $comment . "</td>";
  76                  print "<td class=\"filelist\">".$owner->getFullName()."</td>";
  77                  print "</tr>";
  78              }
  79          } else {
  80              print "<tr><td class=\"filelist\">".getMLText("no_documents")."</td></tr>";
  81          }
  82      ?>
  83      </table>
  84          
  85  <?php
  86  
  87  printEndBox();
  88  
  89  printFolderPageEnd($folder);
  90  
  91  ?>


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