Menu

[r146]: / trunk / php / GetUsers.php  Maximize  Restore  History

Download this file

75 lines (59 with data), 2.2 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
include_once "./config.inc.php";
include_once "./include/db_connect.php";
include_once "./portfolio_lib.php";
include_once "./include/vers.php";
if(!isset($_SESSION))
{
session_start();
}
if(isset($_REQUEST['stag']))
{ //un stagiaire a été sélectionné, il faut fermer cette fenetre après avoir rafraichi la fenêtre principale
print('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">');
echo "<html><head>";
print '<title>[FreePortfolio] '.$Version.'</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="'.$cfg['stylesheet_file'].'" rel="stylesheet" type="text/css">';
// echo "</head><body bgcolor=\"#D1E7D2\" onload=\"self.focus()\" onblur=\"self.focus()\">";
echo "</head><body bgcolor=\"#D1E7D2\" onload=\"self.focus()\" >";
// echo "</head><body bgcolor=\"#D1E7D2\" onblur=\"window.focus()\">";
$_SESSION['stag_id']=(int)$_REQUEST['stag'];
//au changement de stagiaire, on selectionne sa section principale
$tab_sections=get_user_section($_REQUEST['stag']);
if($tab_sections['prim']!=$_SESSION['section'])
{
// on a change de section, donc de referentiel
unset($_SESSION['num_fiche']);
// echo "<b></b>Changement de section</b>";
}
$_SESSION['section']=$tab_sections['prim'];
$_SESSION['sections']=$tab_sections;
$_SESSION['Liste_Stag_Section']=get_stagiaires($_SESSION['section'],true);
echo "<script language=\"JavaScript\">opener.history.go(0);window.close();</script>";
if (isset($_REQUEST['num']))
{
echo "<script language=\"JavaScript\">opener.location='{$cfg['PmaAbsoluteUri']}?num={$_REQUEST['num']}';window.close();</script>";
}
else
{
echo "<script language=\"JavaScript\">opener.location='{$cfg['PmaAbsoluteUri']}';</script>";
}
}
else
{
$selected_section="";
//on affiche les étudiants de la section selectionnée
if(isset($_POST["sec_nom_lb"]) && $_POST["sec_nom_lb"] != 'vide')
{
$selected_section=$_POST["sec_nom_lb"];
}
else
if(isset($_SESSION["section"]) && !empty($_SESSION["section"]))
{
$selected_section=$_SESSION["section"];
}
{
get_stag_list($selected_section,$_SESSION['user_id']);
}
}
?>