Location: PHPKode > projects > Web Interface to Octave > weboctave-0.1.0/index.php
* This file is a part of Web Interface to Octave project.
* Copyright (C) 2008 Kolo Naukowe Numerykow Uniwersytetu Warszawskiego 
* (Students' Numerical Scientific Group of University of Warsaw)
* e-mail:hide@address.com
* Distributed under terms of GPL License

    // set absolute path
    set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] );

    // global variables

    // include necessary files
     // start session
    $session = new Session();
    $user = new User($session->GetUserID(), $session->GetSessionID());
    // log in user
    if (isset($_POST['login']) and isset($_POST['password'])) 
       if ($user->Login($_POST['login'], $_POST['password']))
            // reload page
            header("Location: index.php");
   // log out
   if ($user->IsAnonymous() == false)                  
    if (isset($_GET['logout']))
        // reload page
        header("Location: index.php");
    // load content file
    //verify whcih tab is active
    $c_tab_class_active = "";
    $ya_tab_class_active = "";
    $yf_tab_class_active = "";
    $yfiles_tab_class_active = "";
    $plots_tab_class_active = "";
     if (isset($_GET['p']))
            switch ($_GET['p'])
                case 'c': include('code/command.php');
                          $content = new Command($session, $user);
			  $c_tab_class_active = ' class="active"';
                case 'ya': include('your_account.php');
                           $content = new YourAccount($user);
			   $ya_tab_class_active = ' class="active"';
                case 'yf': include('your_functions.php');
                           $content = new YourFunctions($session, $user);
			   $yf_tab_class_active = ' class="active"';
                case 'plots': include('your_plots.php');
                           $content = new YourPlots($session, $user);
			   $plots_tab_class_active = ' class="active"';
                case 'yfiles': include('your_files.php');
                           $content = new YourFiles($session, $user);
			   $yfiles_tab_class_active = ' class="active"';
                case 'signup':
                        $content = new Singup($session, $user);
			$ya_tab_class_active = ' class="active"';
        else // if the page wasn't chosen load the default page
            $content = new Command($session, $user);
	    $c_tab_class_active = ' class="active"';
    // initialize content

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
	<title>Web interface to Octave</title>
	<meta NAME="description" CONTENT="Web interface to Octave">
	<meta NAME="author" CONTENT="Ko³o naukowe numeryków, Students' numerical research group">
	<meta NAME="keywords" CONTENT="scientific computing, obliczenia naukowe, Octave, 
	web interface, matematyka obliczeniowa, metody numeryczne, analiza numeryczna">
	<link href="weboctave.css" rel="stylesheet">
	<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-2">

	<div id="title"><h1>Web Interface to Octave</h1><p style="font-size: smaller">Version <?php echo WIO_VERSION;?></div>
	<h2>Try Octave in your browser!</h2>

	<p>Web Interface to Octave makes it possible to use <a 
	href="http://www.octave.org">Octave</a> remotely through your browser. Learn more <a href="http://knn.mimuw.edu.pl/weboctave-project">about the <cite>Web Interface to Octave</cite> project</a>.
	<div class="fineprint">
	<p><strong>Please do not submit codes that will run for a long time or take up a lot of memory.</strong> This service is intended for occasional, quick computations. Use "<kbd>Files -> Remove all files</kbd>" button to clear your workspace after you are done. All your activities are being logged. If you don't like this policy,  don't use this service.
	<p>If you are new to Octave, you may find it useful to read <a href='http://www.gnu.org/software/octave/doc/interpreter'>Octave's manual</a> prior to using it. If you like Octave, it is recommended to <a href='http://www.gnu.org/software/octave/download.html'>get your own copy</a> - it is all free! 
        <?php echo HT_GREETING; ?>
	<div id="menus">
	<ul class="xmenu">
	echo '<li><a href="?p=c#menus" '.$c_tab_class_active.'>Commands</a>';
	echo '<li><a href="?p=plots#menus" '.$plots_tab_class_active.'>Plots</a>';
	echo '<li><a href="?p=yfiles#menus" '.$yfiles_tab_class_active.'>Files</a>';
	echo '<li><a href="?p=yf#menus" '.$yf_tab_class_active.'>Functions</a>';
	echo '<li><a href="?p=ya#menus" '.$ya_tab_class_active.'>Account</a>';
		// load content


         echo HT_INFO_PANEL; 
	<p style="font-size: smaller">Last updated: 
	<?php echo date ("F d Y H:i:s.", getlastmod()); ?>
	<p style="font-size:xx-small">This page intentionally uses directly a <a href="http://www.gnu.org/software/octave/octave.css">stylesheet</a> from <a href="http://www.gnu.org/software/octave/about.html">Octave project</a> webpage for basic formatting.

Return current item: Web Interface to Octave