/dev/trunk

To get this branch, use:
bzr branch http://darksoft.org/webbzr/dev/trunk

« back to all changes in this revision

Viewing changes to setups/katrin/services/katrin.php

  • Committer: Suren A. Chilingaryan
  • Date: 2010-02-24 03:02:44 UTC
  • Revision ID: csa@dside.dyndns.org-20100224030244-8lb5hmrvr777vcw5
Updated Katrin configuration

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?php
2
 
// $Id: katrin.php 1037 2009-09-23 13:54:51Z s_voec01 $
 
2
// $Id: katrin.php 6273 2010-01-18 15:44:27Z s_voec01 $
3
3
// Author: Sebastian Voecking <sebastian.voecking@uni-muenster.de>
4
4
 
5
5
//require("../adei.php");
7
7
 
8
8
ADEI::RequireClass("KDBFileIdentifier", true);
9
9
ADEI::RequireClass("KDBPhp", true);
10
 
ADEI::RequireClass("KDBRunIdentifier", "true");
 
10
ADEI::RequireClass("KDBRunIdentifier", true);
11
11
ADEI::RequireClass("INTERVAL");
12
12
 
13
13
function PrintXml($xml)
85
85
            break;
86
86
 
87
87
        case 'file':
88
 
            if (!isset($_GET['filename']))
89
 
                throw new ADEIException("No filename specified");
90
 
            $filename = $_GET['filename'];
 
88
            $file = new KDBFileIdentifier();
91
89
            if (isset($_GET['run'])) {
92
90
                $identifier = new KDBRunIdentifier($_GET['run']);
93
 
                $file = new KDBFileIdentifier($identifier, $filename);
94
 
                $path = $kdb->GetAbsolutePath($file);
95
 
            }
96
 
            else {
97
 
                $file = new KDBFileIdentifier($filename);
98
 
                $path = $kdb->GetAbsolutePath($file);
99
 
            }
100
 
 
101
 
            if (isset($_GET['download']) && $_GET['download'] == "yes") {
102
 
                $download = true;
103
 
            }
104
 
            else {
105
 
                $download = false;
106
 
            }
107
 
 
108
 
            PrintFile($path, $download);
 
91
                $file->SetRun($identifier);
 
92
            }
 
93
 
 
94
            if (isset($_GET['filename'])) {
 
95
                $file->SetFilename($_GET['filename']);
 
96
            }
 
97
 
 
98
            if (isset($_GET['type'])) {
 
99
                $type = $_GET['type'];
 
100
                if ($type == "orca") {
 
101
                    $file->SetFileType(kTypeOrca);
 
102
                }
 
103
                if ($type == "orcaroot") {
 
104
                    $file->SetFileType(kTypeOrcaRoot);
 
105
                }
 
106
                if ($type == "crun") {
 
107
                    $file->SetFileType(kTypeCrun);
 
108
                }
 
109
                if ($type == "header") {
 
110
                    $file->SetFileType(kTypeHeader);
 
111
                }
 
112
                if ($type == "plot") {
 
113
                    $file->SetFileType(kTypePlot);
 
114
                }
 
115
            }
 
116
 
 
117
            PrintFile($kdb->GetAbsolutePath($file), $download);
109
118
            break;
110
119
 
111
120
        default: