/adei/trunk

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

« back to all changes in this revision

Viewing changes to services/katrin.php

  • Committer: Suren A. Chilingaryan
  • Date: 2009-01-31 05:47:16 UTC
  • Revision ID: csa@dside.dyndns.org-20090131054716-jngbgoo8qyelv8dn
Demo implementation of KATRIN-run information

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
require("../adei.php");
 
3
require($ADEI_ROOTDIR . "/classes/aux/auxapplication.php");
 
4
 
 
5
header("Content-type: text/xml");
 
6
header("Cache-Control: no-cache, must-revalidate");
 
7
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
 
8
 
 
9
switch ($_GET['target']) {
 
10
    case 'runs':
 
11
        $cpp = new AUXApplication("kdblistruns");
 
12
        $cpp->Run();
 
13
        break;
 
14
    case 'info':
 
15
        if (isset($_GET['run'])) {
 
16
            $cpp = new AUXApplication("kdbgetrun");
 
17
            $args = array($_GET['run']);
 
18
            $cpp->Run($args);
 
19
        }
 
20
        else {
 
21
            $error = translate("No run specified");
 
22
        }
 
23
        break;
 
24
    default:
 
25
        if (isset($_GET['target']))
 
26
            $error = translate("Unknown target (%s) is specified",
 
27
                               $_GET['target']);
 
28
        else
 
29
            $error = translate("The target is not specified");
 
30
}
 
31
 
 
32
if ($error) {
 
33
    echo "<?xml version=\"1.0\"?>\n";
 
34
    echo "<result>\n";
 
35
    echo " <Error>$error</Error>\n";
 
36
    echo "</result>\n";
 
37
}
 
38
 
 
39
?>