<?php
session_start();

/*
 * Scrapbook/selectFromScrapbook.php
 * 
 * Copyright 2009, 2018 Pedro Quaresma <pedro@mat.uc.pt>
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 * MA 02110-1301, USA.
 */


require_once('../servidor.php');
$pTipoUtilizador = $_SESSION['tipoUtilizador'];
if ($pTipoUtilizador=="anonymous" || $pTipoUtilizador=="regular") {// separa por tipo de utilizador
  require($entradaFILE.'headerUsers.php');
  require($entradaFILE.'menuUsers.php');
}
else {
  require($entradaFILE.'headerAdmins.php');
  require($entradaFILE.'menuAdmins.php');
}

// coloca o valor para a página de ajuda apropriada
$_SESSION['helpsection']='interaction';

require_once($entradaFILE.'dbLogin.php');

?>

<?php
// Trata-se de seleccionar uma das construções que está no Bloco de Notas


$URL = addslashes($_SERVER['HTTP_REFERER']);

$pCodeTmpIdName = $_POST['CodeTmpIdName'];
$completeNameCallingForm = "../".$_POST['nameCallingForm'];

// para poder passar para outros ficheiros PHP tem de ser colocado
// como variável de sessão

$_SESSION['CodeTmpIdName']=$pCodeTmpIdName;

echo "<p>info selected</p>";

echo "<meta http-equiv='refresh' content='1; url=\"$completeNameCallingForm\"' />";

?>

<?php
  require($entradaFILE.'footer.php');
?>
