Subversion Repositories computer_asset_manager_v1

Rev

Rev 58 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 58 Rev 59
Line 1... Line 1...
1
<?php
1
<?php
2
 
2
 
3
   include_once( '../../header.php' );
3
   include_once( '../../header.php' );
4
 
4
 
5
   if ( isset( $_REQUEST['document_id'] ) ) {
5
   if ( isset( $_REQUEST['file_id'] ) ) {
6
      $query =
6
      $query =
7
           "select
7
           "select
8
               concat( b.theValue, '/', a.theValue, '/', document.name_on_disk ) 
8
               concat( b.theValue, '/', a.theValue, '/', file.name_on_disk ) 
9
            from 
9
            from 
10
               document, _system a, _system b
10
               file, _system a, _system b
11
            where 
11
            where 
12
               document.document_id = $_REQUEST[document_id]
12
               file.file_id = $_REQUEST[file_id]
13
               and a.group_name = 'Documents' 
13
               and a.group_name = 'Files' 
14
               and a.key_name = 'root path'
14
               and a.key_name = 'root path'
15
               and b.group_name = 'System' 
15
               and b.group_name = 'System' 
16
               and b.key_name = 'root url'";
16
               and b.key_name = 'root url'";
17
      $path = getOneDBValue( $query );
17
      $path = getOneDBValue( $query );
18
      if ( $path )
18
      if ( $path )
19
         header( "Location: $path" );
19
         header( "Location: $path" );
20
   }
20
   }
21
   print "<html><body>Can not load document</body></html>";
21
   print "<html><body>Can not load file</body></html>";
22
?>
22
?>