session_start();
define('INCLUDE_CHECK',true);
require 'login/connect.php';
if(!defined('INCLUDE_CHECK')) die('You are not allowed to execute this file directly');
/* Database config */
$db_host = 'localhost';
$db_user = 'gmap-users';
$db_pass = 'Globe-expert-01';
$db_database1 = 'gmap2019';
/* End config */
$link = mysql_connect($db_host,$db_user,$db_pass) or die('Unable to establish a DB connection');
mysql_query("SET names UTF8");
require 'login/functions.php';
#
if ($_GET['id'] != "")
{
$_SESSION['dashboard'] = $_GET['id'];
}
if ($_SESSION['usr'] == "")
{
header("Location: accueil.php");
}
if ($_SESSION['dashboard'] == "")
{
header("Location: accueil.php");
exit;
}
mysql_select_db($db_database1,$link);
$dash_req = $_SESSION['dashboard'];
$sql = "SELECT dash_id, dash_name, dash_desc, dash_freq, dash_ref, dash_quest, dash_maj, dash_req, dash_datedeb, dash_datefin, dash_status FROM Dashboard where dash_req = '".$dash_req."'";
$result = mysql_query($sql);
if (!$result) {
echo "Impossible d'exÈcuter la requÍte ($sql) dans la base : " . mysql_error();
exit;
}
#if ($row['dash_status'] <> "2")
#{
# header("Location: Choice.php");
# exit;
#}
#if (mysql_num_rows($result) == 0) {
# echo "Aucune ligne trouvÈe, rien ‡ afficher.";
# exit;
#}
$row = mysql_fetch_assoc($result);
if($row['dash_name'])
{
$_SESSION['dash_id']=$row["dash_id"];
$_SESSION['ref']=$row["dash_ref"];
$_SESSION['name']=$row["dash_name"];
$_SESSION['desc']=$row["dash_desc"];
$_SESSION['req']=$row["dash_quest"];
$_SESSION['plage']="beetween ".$row["dash_dashdeb"]." and ".$row["dash_datefin"];
$sql1 = "SELECT Issue_id, Issue_value FROM Issue where Issue_id = '".$_SESSION['req']."'";
$result = mysql_query($sql1);
if (!$result) {
echo "Impossible d'exÈcuter la requÍte ($sql1) dans la base : " . mysql_error();
exit;
}
if (mysql_num_rows($result) == 0) {
# echo "Aucune ligne trouvÈe, rien ‡ afficher.";
# echo $sql1;
# exit;
}
$row1 = mysql_fetch_assoc($result);
if($row1['Issue_value'])
{
$_SESSION['req']=$row1['Issue_value'];
}
}
$ref = $row["dash_ref"];
$req = $row["dash_quest"];
$name = $row["dash_name"];
$reqid = $row["dash_req"];
?>
Referential ()
$sql = "SELECT Ref_id, Ref_name FROM Referential where Ref_id='".$ref."'";
$result2 = mysql_query($sql);
if (!$result2)
{
echo "Impossible d'exécuter la requête ($sql) dans la base : " . mysql_error();
exit;
}
$row2 = mysql_fetch_assoc($result2);
?>
A referential is an analytic framework defining a context that is coupled with a question.
$chaine = "Dashboard name : ".$_SESSION['name']." - Description : ".$_SESSION['desc']." ";
print $chaine;
?>
Axe
Segment
Keywords
$sql1 = "SELECT Ref_id, Axe_id, Seg_id, Key_id FROM sk where Ref_id='".$row2["Ref_name"]."' ORDER BY Axe_id, Seg_id, Key_id";
$result = mysql_query($sql1);
if (!$result)
{
echo "Impossible d'exécuter la requête ($sql) dans la base : " . mysql_error();
exit;
}
$i=0;
$axe = "";
$seg = "";
$mots = "";
while ($row = mysql_fetch_assoc($result))
{
if ($row["Seg_id"] != $seg && $i>0)
{
echo "".$axe." ";#non éditable
echo "".$seg." ";#éditable
echo "".$mots." ";#éditable ==> voir algo de creation login
$seg = $row["Seg_id"];
$mots = '"'.$row["Key_id"].'"';
$mots=str_replace("AND ", "", $mots);
$mots=str_replace(' AND', "", $mots);
}
else
{
$axe = $row["Axe_id"];
$seg = $row["Seg_id"];
if ($i > 0)
{
$mots = $mots.', "'.$row["Key_id"].'"';
$mots=str_replace("AND ", "", $mots);
}
else
{
$mots = $mots.'"'.$row["Key_id"].'"';
$mots=str_replace("AND ", "", $mots);
}
$i++;
}
}
if ($i>0)
{
echo "".$axe." ";#non éditable
echo "".$seg." ";#éditable
echo "".$mots." ";#éditable ==> voir algo de creation login
}
?>
include("glossaire.inc")?>