Exemplo n.º 1
0
require 'head.php';
if (empty($_REQUEST['exerc'])) {
    echo "Erro. Se você usou um link para chegar aqui, notifique o administrador";
    exit;
}
$X = new Exercicio($_REQUEST['exerc']);
?>
<h2><?php 
echo $X->getNome();
if ($USER->admin()) {
    echo "&nbsp;<a href='cadastra.php?exerc=" . $X->getId() . "'><img src='img/pen.png'></a>";
}
?>
</h2>
<?php 
echo $X->getHtml();
?>
<form name="notaR" action="#" method="post" enctype="multipart/form-data">
<input type="hidden" name="exerc" value="<?php 
echo $X->getId();
?>
">
<input type="hidden" name="MAX_FILE_SIZE" value="30000">
<input type="file" name="rfile" id="rfile" accept=".R">
<br><button type="submit" value="Submit">Submeter!</button>
<a href="https://github.com/lageIBUSP/notaR/wiki/Submetendo-respostas">ajuda?</a>
</form>
<div id="corretoR" >
<?php 
if (isset($_POST['exerc'])) {
    require_once 'Rserve-php/Connection.php';