/[drupal]/contributions/sandbox/dikini/filebrowser/upload.inc
ViewVC logotype

Contents of /contributions/sandbox/dikini/filebrowser/upload.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Thu Nov 18 14:30:13 2004 UTC (5 years ago) by dikini
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/x-php

Initial Commit
A taxonomy browser specialised for file types - depends on filestore2 or flexinode
1 <?php
2 /*
3 * file browser for filestore
4 *
5 */
6 function filestore2_filebrowser($tid){
7 $result = pager_query('SELECT f.nid, n.title, n.teaser, f.version, f.downloads, fs.filename
8 FROM {filestore2} f, {fscache} fs, {node} n
9 INNER JOIN {term_node} r ON n.nid = r.nid ' . node_access_join_sql() .
10 ' WHERE f.fsid = fs.fsid AND f.nid = n.nid AND n.type = "filestore2" AND r.tid = %d AND ' . node_access_where_sql() .
11 ' ORDER BY f.downloads DESC', variable_get('files_per_page', 15), 0, NULL, $tid);
12
13 $i=0;
14 while($fitem = db_fetch_object($result)) {
15 $i++;
16 $rows[] = array($i .".", l($fitem->title, "node/". $fitem->nid,array("class"=>'file_node_title')),
17 l("<img src='/modules/filebrowser/file.gif' />", "filestore2/download/". $fitem->nid,array("title"=>$fitem->filename))
18 , $fitem->teaser, $fitem->version);
19 }
20 return $rows;
21 }
22 ?>

  ViewVC Help
Powered by ViewVC 1.1.2