Exemplo n.º 1
0
    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
        return strip_tags($_POST[$name]);
    }
}
if (count($_POST) > 0) {
    $uid = preg_replace('/[^0-9\\_]/', '', _INPUT("UID"));
    $service = preg_replace('/[^A-Za-z]/', '', _INPUT("SERVICE"));
    $version = preg_replace('/[^0-9\\.]/', '', _INPUT("VERSION"));
    if ($version != '') {
        # Adding dash to version
        $version = '-' . $version;
    }
    $wwwroot .= $service . $version . "/";
    //include $htdocs.$service.$version."/header.html"; # Header file
    # INCLUDE STANDARD HTML HEADER
    $CGE = new CGE();
    // Load the Class
    # INCLUDE CGE MENU
    # Format is: ServerName, "(Link/Path.html, 'NameOfLink'),(Link/Path.html, 'NameOfLink')"
    $CGE->std_header("", "(" . $wwwroot . "instructions.php,'Instructions'),(" . $wwwroot . "output.php,'Output'),(" . $wwwroot . "abstract.php,'Article abstract')");
    // Print the Menu
    if ($uid != "" and $service != "") {
        $fullPath = "/panfs1/cge-servers/" . $service . "/" . $service . $version . "/IO/" . $uid . "/final_output/" . $service . ".out.gz";
        #echo $fullPath;
        readgzfile($fullPath);
    }
    $CGE->Piwik(15);
    // Printing Piwik codes!!
    # INCLUDE STANDARD FOOTER
    # First a simple headline like: "Support"
    # Then a list of emails like this: "('Scientific problems','foo','*****@*****.**'),('Technical problems','bar','*****@*****.**')"
Exemplo n.º 2
0
/* This is the user manager, where the user can create, see, edit and delete
   his/her user details:
 *  'create'      -> Allows a new users to create a profile
 *  'edit'        -> Allows the users to edit and delete their profile
 *  'show'        -> Allows the users to see their profile details
 *  'pend_create' -> Waiting page while the user activates the profile
 *  'pend_delete' -> Waiting page while the user confirms the profile deletion
 *  'pend_delete' -> Waiting page while the user confirms the profile deletion
 */
$domain = 'https://cge.cbs.dtu.dk';
$serviceRoot = "/srv/www/htdocs/services/";
# STANDARD CBS PAGE TEMPLATES, always include this file
include_once '/srv/www/php-lib/cge_std_tools.php';
// Including CGE_std clases and functions
// Load the CGE class (title, meta_tags, banner_path, css_paths, js_paths) '' is default
$CGE = new CGE('Sample Overview', '<base href="' . $domain . '" target="_blank">', '', '/tools_new/client/platform/styles/isolate_manager.css', '/tools_new/client/platform/scripts/isolate_manager.js');
# CGE MENU
# Format is: ServerName, "(Link/Path.html, 'NameOfLink'),(Link/Path.html, 'NameOfLink')"
$CGE->std_header("Sample Overview", "(/tools_new/client/platform/sample/,'Home'),(/services/,'Services'),(/services/cge/index.php,'Batch Upload'),(/services/CGEpipeline-1.0/map.php,'MapViewer')", FALSE);
// Print the Menu
// REQUIRE THE USER TO LOGIN
if ($CGE->user_is_logged_in()) {
    $ACTION = _INPUT("action");
    if ($ACTION == "edit") {
        // SHOW EDITING FORM
        $iid = _INPUT("iid");
        ?>
<!-- START OF CONTENT -->
      <div id='edit'>
         <button onclick="delete_isolate(<?php 
        echo $iid;
Exemplo n.º 3
0
<?php

#! /usr/bin/php5 -q
################################################################################
#                       CGE SERVICE - User Overview                            #
################################################################################
$service = 'Userpages';
$version = '1.0';
include_once '/srv/www/php-lib/cge_std.php';
// Including CGE_std clases and functions
$CGE = new CGE();
// Load the Class
function runLink($service, $version, $runid, $name)
{
    $str = "<tr><td valign='middle' height='5'><form action='/cge/show_result.php' method='POST'>";
    $str .= " <input type='hidden' name='UID' value='{$runid}'>";
    $str .= " <input type='hidden' name='SERVICE' value='{$service}'>";
    $str .= " <input type='hidden' name='VERSION' value='{$version}'>";
    $str .= " <input type='submit' value='{$name}'>";
    $str .= "</form></td></tr>\n";
    return $str;
}
$serviceRoot = "/srv/www/htdocs/services/" . $service . "-" . $version . "/";
#SERVICE ROOT
# CGE MENU
# Format is: ServerName, "(Link/Path.html, 'NameOfLink'),(Link/Path.html, 'NameOfLink')"
$CGE->std_header("User Overview", "(./,'User Home'),(/services/,'Services')", FALSE);
// Print the Menu
?>
<!-- START CONTENT -->
<style type="text/css">
Exemplo n.º 4
0
#! /usr/bin/php5 -q
################################################################################
#                                CGE SERVICES                                  #
################################################################################
# CONFIG VARIABLE
$serviceRoot = "/srv/www/htdocs/services/";
# STANDARD CBS PAGE TEMPLATES, always include this file
include_once '/var/www/php/cge_std-2.0.php';
// Including CGE_std clases and functions
// $domain = 'https://cge.cbs.dtu.dk';
$meta_headers = "<base href=/>";
$banner = '';
// '' is default = red CGE banner
$java_scripts = '';
$styles_heets = '';
$CGE = new CGE('CGE Server', $meta_headers, $banner, $styles_heets, $java_scripts);
$CGE->std_header("File-Sharing Upload", "(/all.php,'Upload'),(/files.php,'Download')", FALSE);
if (substr($_SERVER['REMOTE_ADDR'], 0, 3) == '10.') {
    $cbsUser = TRUE;
} else {
    $cbsUser = FALSE;
}
// phpInfo();
// REQUIRE THE USER TO LOGIN
if ($CGE->user_is_logged_in()) {
    ?>
<!-- START INDHOLD -->
<style type="text/css">
   .pad{padding-left: 30px;}
</style>
Exemplo n.º 5
0
/* This is the user manager, where the user can create, see, edit and delete
   his/her user details:
 *  'create'      -> Allows a new users to create a profile
 *  'edit'        -> Allows the users to edit and delete their profile
 *  'show'        -> Allows the users to see their profile details
 *  'pend_create' -> Waiting page while the user activates the profile
 *  'pend_delete' -> Waiting page while the user confirms the profile deletion
 *  'pend_delete' -> Waiting page while the user confirms the profile deletion
 */
$domain = 'https://cge.cbs.dtu.dk';
$serviceRoot = "/srv/www/htdocs/services/";
# STANDARD CBS PAGE TEMPLATES, always include this file
include_once '/srv/www/php-lib/cge_std-2.0.php';
// Including CGE_std clases and functions
// Load the CGE class (title, meta_tags, banner_path, css_paths, js_paths) '' is default
$CGE = new CGE('Isolate Overview', '<base href="' . $domain . '" target="_blank">', '', '/cge/user/isolate/css/isolate_manager.css', '/cge/user/isolate/js/isolate_manager.js');
# CGE MENU
# Format is: ServerName, "(Link/Path.html, 'NameOfLink'),(Link/Path.html, 'NameOfLink')"
$CGE->std_header("Isolate Overview", "(/cge/user/login/user_manager.php?action=show,'User Home'),(/services/,'Services'),(/services/cge/batch.php,'Batch Upload'),(/services/cge/map.php,'MapViewer')", FALSE);
// Print the Menu
//function runLink($service, $version, $runid, $name){
//	$str = "<tr><td valign='middle' height='5'><form action='../show_result.php' method='POST'>";
//	$str .= " <input type='hidden' name='UID' value='$runid'>";
//	$str .= " <input type='hidden' name='SERVICE' value='$service'>";
//   $str .= " <input type='hidden' name='VERSION' value='$version'>";
//	$str .= " <input type='submit' value='$name'>";
//	$str .= "</form></td></tr>\n";
//   return $str;
//}
$ACTION = _INPUT("action");
if ($ACTION == "edit") {
Exemplo n.º 6
0
 *  'pend_create' -> Waiting page while the user activates the profile
 *  'pend_delete' -> Waiting page while the user confirms the profile deletion
 *  'pend_delete' -> Waiting page while the user confirms the profile deletion
 */
// $domain = 'https://cge.cbs.dtu.dk';
$domain = '';
// $meta_headers = "<base href='$domain'>";
$serviceRoot = "/srv/www/htdocs/services/";
error_reporting(E_ALL);
ini_set('error_log', '/srv/www/htdocs/services/error_log');
ini_set('log_errors', 'true');
# STANDARD CBS PAGE TEMPLATES, always include this file
include_once '/var/www/php/cge_std-2.0.php';
// Including CGE_std clases and functions
// Load the CGE class (title, meta_tags, banner_path, css_paths, js_paths) '' is default
$CGE = new CGE('CGE User-pages', "", '', '', "/cge/user/login/js/user_manager.js,/cge/user/login/js/user_actuator.js");
# CGE MENU
# Format is: ServerName, "(Link/Path.html, 'NameOfLink'),(Link/Path.html, 'NameOfLink')"
$CGE->std_header("User Overview", "(/cge/user/login/user_manager.php?action=show,'User Home'),(/services/,'Services')", FALSE);
// Print the Menu
//function _INPUT($name){
//   // QUERY HANDLER: Used to get form elements and queries in a simple manner
//   // AUTHOR: Martin Thomsen
//   // USAGE: $form_text = _INPUT('form_text_name');
//   if ($_SERVER['REQUEST_METHOD'] == 'POST' and isset($_POST[$name]))
//      return strip_tags($_POST[$name]);
//   elseif ($_SERVER['REQUEST_METHOD'] == 'GET' and isset($_GET[$name]))
//      return strip_tags($_GET[$name]);
//   else return NULL;
//}
$ACTION = _INPUT("action");
Exemplo n.º 7
0
function respond($status, $DATA, $EXIT = false, $template = false, $human = false)
{
    /* Tools Paths */
    //global $CGE;
    $domain = '';
    $toolspath = '/tools_new/client/platform';
    if ($template == true) {
        // Load the CGE Class :: ARGUMENTS=($title, $meta, $banner,$css,$js)
        $CGE = new CGE('CGE Server', '<base href="' . $domain . '">', '/images/cge_buttons/banner.gif', '', '');
        // CGE MENU
        $CGE->std_header("CGE Server", "({$toolspath}/user_settings.php,'User Home'),(/services/,'Services'),({$toolspath}/isolate_manager.php,'Sample Overview'),({$toolspath}/map.php,'Map')");
        // Print the Menu
    }
    if ($human == true) {
        /* PRINTING THE HUMAN RESPONSE */
        // REQUIRE THE USER TO LOGIN
        if (isset($CGE)) {
            if ($CGE->user_is_logged_in()) {
                // Write Message
                echo "<br><table style='margin:auto;'><tr><th>Server&nbsp;Response</th><th>Message</th></tr><tr><td style='text-align:center;'>{$status}</td><td>" . str_replace("\n", "<br>", $DATA['MESSAGE']) . "</td></tr></table>";
            }
        } else {
            echo "<br><table style='margin:auto;'><tr><th>Server&nbsp;Response</th><th>Message</th></tr><tr><td style='text-align:center;'>{$status}</td><td>" . str_replace("\n", "<br>", $DATA['MESSAGE']) . "</td></tr></table>";
        }
    } else {
        /* PRINTING THE XML RESPONSE */
        $xml = new SimpleXMLElement('<XML/>');
        $xml->addChild('STATUS', $status);
        arr2xml($DATA, $xml);
        print $xml->asXML();
    }
    if ($template == true) {
        // TRACK USER TRAFIC
        $CGE->Piwik(14);
        # STANDARD FOOTER
        $CGE->standard_foot("Support", "('Technical problems','CGE Support','cgehelp')");
    }
    if ($EXIT == true) {
        exit;
    }
}
Exemplo n.º 8
0
 // CLOSING CONNECTION
 $mysqli->close();
 if ($status == "ACCEPTED" and $sid != null and $sid != '') {
     $fullpath = "{$sfolder}/outputs/" . $service[0] . ".out";
     $wwwroot .= $service[0] . "-" . $service[1] . "/";
     $title = join("-", $service);
 } elseif ($status == "ACCEPTED" and $iid != null and $iid != '') {
     $fullpath = "{$ifolder}/logs/pipeline.out";
     $wwwroot .= "CGEpipeline/";
     $title = 'Pipeline';
 } else {
     $fullpath = null;
     $title = 'CGE';
 }
 // Load the CGE class (title, meta_tags, banner_path, css_paths, js_paths) '' is default
 $CGE = new CGE("{$title} Results", '', '', '', '');
 # INCLUDE CGE MENU
 # Format is: ServerName, "(Link/Path.html, 'NameOfLink'),(Link/Path.html, 'NameOfLink')"
 $CGE->std_header('', "(" . $wwwroot . "instructions.php,'Instructions'),(" . $wwwroot . "output.php,'Output'),(" . $wwwroot . "abstract.php,'Article abstract')");
 //"$service-$version Results"
 //	// Set path to output file
 //   if ($sid != ''){
 //      $fullpath = "/home/data1/isolates/$year/$month/$day/$iid/services/".$service."_$sid/outputs/$service.out";
 //   }else{
 //      $fullpath = "/home/data1/isolates/$year/$month/$day/$iid/logs/pipeline.out";
 //   }
 if ($fullpath != null) {
     // Check if file exists
     if (file_exists($fullpath)) {
         // Read File to standard out
         //respond("TEST", array('FULLPATH' => $fullpath), true);
Exemplo n.º 9
0
#! /usr/bin/php5 -q
################################################################################
#                             CGE USER SETTINGS                                #
################################################################################
# This is the script which:
#   -> Allows new users to create a profile
#   -> Allows current users to edit their profile
#   -> Allows current users to delete their profile
$serviceRoot = "/srv/www/htdocs/services/";
error_reporting(E_ALL);
ini_set('error_log', '/srv/www/htdocs/services/error_log');
ini_set('log_errors', 'true');
# STANDARD CBS PAGE TEMPLATES, always include this file
include_once '/srv/www/php-lib/cge_std.php';
// Including CGE_std clases and functions
$CGE = new CGE();
// Load the Class
# CGE MENU
# Format is: ServerName, "(Link/Path.html, 'NameOfLink'),(Link/Path.html, 'NameOfLink')"
$CGE->std_header("User Overview", "(./,'User Home'),(/services/,'Services')", FALSE);
// Print the Menu
function _INPUT($name)
{
    // QUERY HANDLER: Used to get form elements and queries in a simple manner
    // AUTHOR: Martin Thomsen
    // USAGE: $form_text = _INPUT('form_text_name');
    if ($_SERVER['REQUEST_METHOD'] == 'POST' and isset($_POST[$name])) {
        return strip_tags($_POST[$name]);
    } elseif ($_SERVER['REQUEST_METHOD'] == 'GET' and isset($_GET[$name])) {
        return strip_tags($_GET[$name]);
    } else {