IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Langage PHP Discussion :

mauvaises valeurs de $_SESSION


Sujet :

Langage PHP

  1. #1
    Membre du Club
    Homme Profil pro
    Administrateur de base de données
    Inscrit en
    Mars 2013
    Messages
    121
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Essonne (Île de France)

    Informations professionnelles :
    Activité : Administrateur de base de données
    Secteur : High Tech - Matériel informatique

    Informations forums :
    Inscription : Mars 2013
    Messages : 121
    Points : 51
    Points
    51
    Par défaut mauvaises valeurs de $_SESSION
    bonjour,
    j'essais de synthétiser les données d'une base de données a l'aide d'une application que j'ai créé...
    mon application fonctionne bien, seulement je veux l'avoir sous format PDF.

    1) j'ai créé une page de garde qui donne une première partie par défaut.
    sous cette partie j'ai mis 3 listes déroulantes permettant a l'utilisateur de choisir l'équipement sur lequel il veut synthétiser des données.

    2)après avoir choisi un équipement dans la liste déroulante, ça nous renvois sur une page de traitement.
    sur cette page de traitement il y a le résultat choisi par l'utilisateur:
    un camembert (fait avec JPGRAPH) et un tableau récapitulatf.
    Pour avoir le fichier PDF, j'ai créé un bouton qui le génère.

    3)c'est lors de la génération du fichier PDF que j'ai un problème avec $_SESSION car ça ne récupère pas bien le choix que l'utilisateur a fait dans la liste déroulante. Du cou je me retrouve qu'avec la partie par défaut et je n'ai pas le plus important (le choix de l'utilisateur)

    page de garde:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    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
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    <?php
    session_start();
    //----------------------------------------------------------------------------------------------------------------------------------
    $sql_camembert =
    'SELECT
            Release_gsm 											AS "Release"
    	  , Sub_release_gsm											AS "Sub_Release"
    	  , FORMAT(100*COUNT(*)/(SELECT COUNT(*) FROM customer), 1) AS "Pourcentage"
    	  , COUNT(*) 												AS "Total"
    FROM
    	customer
    WHERE
    	network_status = "active"			 				        -- réseau actif
    	AND NOT Release_gsm = "/"
      GROUP BY
       	  Release_gsm
      	, Sub_release_gsm
    --   WITH ROLLUP'
    ;
     
    $data=array();
    $data_legend=array();
     
    $result = mysql_query($sql_camembert) or die('Erreur SQL : <br />' . $sql_camembert . '<br />' . mysql_error());
    // On affiche le contenu si la table n'est pas vide 
    if (mysql_num_rows($result) > 0) 
    	{
    	//echo "<hr>Début de test<br>";
    while ($donnees = mysql_fetch_assoc($result))
    	{
    	if ($donnees['Pourcentage']>='0.01')
    		{
    		$data[] = (float)$donnees['Pourcentage'];
    		$data_legend[] = $donnees['Release'].(" ").(string)$donnees['Sub_Release'];
    		//echo "Valeur : ".$donnees['Regions']." légende : ".$donnees['Sous Region']."<br>";
    		//echo $ns;
    		}
    	//echo "<hr>Milieu de test<br>";
    	$indice=0;
    	//echo "données<br>";
    	foreach($data as $val)
    		{
    		//echo "$indice : ".$val."<br>";
    		$indice+=1;
    		}
    	$indice=0;
    	//echo "Légendes<br>";
    	foreach($data_legend as $val)
    		{
    		//echo "$indice : ".$val."<br>";
    		$indice+=1;
    		}
    	//echo "<br>Fin de test<hr>";
    	}
    	}
    //echo "<hr>Fin de test<br>";
    // var_dump($data);
    //var_dump($data_legend);
    //echo "<hr>";
     
     
    $data_serialized=base64_encode(serialize($data));
    $data_legend_serialized=base64_encode(serialize($data_legend));
    echo "<img src='jpgraph/graph_pdg.php?data_serialized=$data_serialized&data_legend_serialized=$data_legend_serialized'>";
     
    unset($data);
    unset($data_legend);
    ?>
    <html>
    <head>
    <title>latest TPM updates</title>
    </head>
    <body>
    <?php
    $req = mysql_query($sql_camembert) or die('Erreur SQL !<br />'.$sql_camembert.'<br />'.mysql_error()); 
    ?> 
    <div style="float:right; top; width:400px; margin-top:-350px;">
    <TABLE border="4" cellspacing="2" cellpadding="2" width="30%">
    <tr>
      <th>Network Per Release</th>
      <th>Sub_Release</th>
      <th>Total</th>
    </tr>
    <?php
    while ($data1y = mysql_fetch_array($req)) {
    //	if ($data1y['Pourcentage']>='0.01')
    //	{
    	?>
        <tr><td><I><B>
    		<?php echo $data1y['Release']; ?>
    	</B></I></td><td><I>
    		<?php echo $data1y['Sub_Release']; ?>
    	</I></td><td><I>
    		<?php echo $data1y['Total']; ?>
    	</I></td>	
    <?php
    }
    //---------------------------------------------------------------------------------------------------------------------------------
    ?>
    </br></td>
    </tr></table>
    </div>
    <h1>
    <?php
     // Connexion au serveur de base de données
      $link = mysql_connect("127.0.0.1","root","npidb");
      if (!$link) 
      {
        die('Connexion impossible : ' . mysql_error());
      }
      //echo 'Connecté correctement';
      // Sélection de la base de données
      $db_selected = mysql_select_db('npidb',$link);
      if (!$db_selected) 
      {
         die ('Impossible de sélectionner la base de données : ' . mysql_error());
      }
      // On va chercher les enregistrements disponibles 
     
     
     
       $sql_bts = "SELECT
    				  Name
    				, Name_To_Show
    			FROM
    				  bts_family
    			GROUP BY
    				  Name";
    ?>
    <?php			
       $req=mysql_query($sql_bts) or die('Erreur SQL !<br />'.$sql_bts.'<br />'.mysql_error());
    ?>
    <!--
    <form name="formulaire" action="http://127.0.0.1/npi/npi/jpgraph/pourcentage1.php?nom="+$nom; method="send" onsubmit="return verifier();">
    <p>
     
    -->
     
    <script language="javascript">
    function send($nom){
    window.location.href="jpgraph/pourcentage1.php?nom="+$nom;
    <!--window.location.href="jpgraph/pdf1.php?nom="+$nom;-->
    }
    </script>
     
    <b>BTS:</b>
    <select name="name_bts" style="background-color:white;color:black;" onchange="send(this.options[this.selectedIndex].value);">
    <option>Choose</option> 
    <?php 	
     
    while ($data = mysql_fetch_array($req)) {  
    ?> 
    <option value="<?php echo $data['Name'];?>">
    <?php	 echo $data['Name_To_Show'];?>
    </option>
    <?php	if(isset($_REQUEST['name_bts'])&&!empty($_REQUEST['name_bts'])){
    echo $_REQUEST['name_bts'];
    }}
    unset ($data);
    ?>
    </select>
     
     
     
    <?php
    // On va chercher les enregistrements disponibles                                                                       //
       $sql_bsc = "SELECT
    				Name
    				, Name_To_Show
    			FROM
    				bsc_family
    			GROUP BY
    				Name"
    			;
    ?>
    <?php			
       $req = mysql_query($sql_bsc) or die('Erreur SQL !<br />'.$sql_bsc.'<br />'.mysql_error());
    ?>
     
    <b>BSC:</b>
    <select name="name_bsc" style="background-color:white;color:black;" onchange="send(this.options[this.selectedIndex].value);">
    <option>Choose</option> 
    <?php 	
     
    while ($data = mysql_fetch_array($req)) {  
    ?> 
    <option value="<?php echo $data['Name'];?>">
    <?php	 echo $data['Name_To_Show'];?>
    </option>
    <?php	if(isset($_REQUEST['name_bsc'])&&!empty($_REQUEST['name_bsc'])){
    echo $_REQUEST['name_bsc'];
    }}
    unset ($data);
    ?>
    </select>
     
     
     
    <?php
    // On va chercher les enregistrements disponibles                                                                    //
       $sql_mfs = "SELECT
    				Name
    				, Name_To_Show
    			FROM
    				mfs_family
    			GROUP BY
    				Name"
    			;
    ?>
    <?php			
       $req = mysql_query($sql_mfs) or die('Erreur SQL !<br />'.$sql_mfs.'<br />'.mysql_error());
    ?>
     
    <b>MFS:</b>
    <select name="name_mfs" style="background-color:white;color:black;" onchange="send(this.options[this.selectedIndex].value);">
    <option>Choose</option> 
     
    <?php 	
     
    while ($data = mysql_fetch_array($req)) {  ?> 
    <option value="<?php echo $data['Name'];?>">
    <?php	 echo $data['Name_To_Show'];?>
    </option>
    <?php	if(isset($_REQUEST['name_mfs'])&&!empty($_REQUEST['name_mfs'])){
    echo $_REQUEST['name_mfs'];
    }}
    unset ($data);
    mysql_free_result ($req);  
    mysql_close ();
    ?>
    page de traitement:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    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
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    <?php 
    if(isset($_REQUEST['nom'])){
    $ns =$_REQUEST['nom'];
    $_SESSION['famille_equipement']=$ns;
    echo "<hr>valeur de session : ".$_SESSION['famille_equipement']."<hr>";
    $sql_camembert =
    'SELECT
           Release_gsm 												AS "Release"
    	  , Sub_release_gsm											AS "Sub_Release"
    	  , SUM(' . $ns . ') 										AS "Qty"
    	  , FORMAT(100*SUM(' . $ns . ')/(SELECT SUM(' . $ns . ') FROM customer), 1) AS "Pourcentage"
    	  , COUNT(*) 												AS "Total"
    -- 	  , SUM(	)
    FROM
    	customer
    WHERE
    	network_status = "active"			 				        -- réseau actif
    	AND NOT Release_gsm = "/"
      GROUP BY
       	  Release_gsm
      	, Sub_release_gsm
    --   WITH ROLLUP'
    ;
    }
     // Connexion au serveur de base de données
      $link = mysql_connect("127.0.0.1","root","npidb");
      if (!$link) 
      {
        die('Connexion impossible : ' . mysql_error());
      }
      //echo 'Connecté correctement';
      // Sélection de la base de données
      $db_selected = mysql_select_db('npidb',$link);
      if (!$db_selected) 
      {
         die ('Impossible de sélectionner la base de données : ' . mysql_error());
      }  
    $data=array();
    $data_legend=array();
    $result = mysql_query($sql_camembert) or die('Erreur SQL : <br />' . $sql_camembert . '<br />' . mysql_error());
    // On affiche le contenu si la table n'est pas vide 
    if (mysql_num_rows($result) > 0) 
    	{
    	//echo "<hr>Début de test<br>";
    while ($donnees = mysql_fetch_assoc($result))
    	{
    	if ($donnees['Pourcentage']>='0.01')
    		{
    		$data[] = (float)$donnees['Pourcentage'];
    		$data_legend[] = $donnees['Release'].(" ").(string)$donnees['Sub_Release'];
    		//echo "Valeur : ".$donnees['Pourcentage']." légende : ".$donnees['Sub_Release']."<br>";
    		//echo $ns;
    		}
    	//echo "<hr>Milieu de test<br>";
    	$indice=0;
    	//echo "données<br>";
    	foreach($data as $val)
    		{
    		//echo "$indice : ".$val."<br>";
    		$indice+=1;
    		}
    	$indice=0;
    	//echo "Légendes<br>";
    	foreach($data_legend as $val)
    		{
    		//echo "$indice : ".$val."<br>";
    		$indice+=1;
    		}
    	//echo "<br>Fin de test<hr>";
    	}
    	}
    //echo "<hr>Fin de test<br>";
    //var_dump($data);
    //var_dump($data_legend);
    //echo "<hr>";
     
    $data_serialized=base64_encode(serialize($data));
    $data_legend_serialized=base64_encode(serialize($data_legend));
    echo"<img src='./graph1.php?data_serialized=$data_serialized&data_legend_serialized=$data_legend_serialized'>";
    unset($data);
    unset($data_legend);
    ?>
    <html>
    <head>
    <title>latest TPM updates</title>
    </head>
    <body>
    <?php
    $result = mysql_query($sql_camembert) or die('Erreur SQL !<br />'.$sql_camembert.'<br />'.mysql_error());  
    ?> 
    <div style="float:right; top; width:400px; margin-top:-370px;">
    <b style="font-size:14px;">YOUR SELECTION :</b><input type="text" value="<?php echo $ns ?>" style="font-size:14px;" />
    <TABLE border="4" cellspacing="2" cellpadding="2" width="30%">
    <tr>
      <th>Distribution Per Release</th>
      <th>Sub_Release</th>
      <th>Qty</th>
    </tr>
    <?php
     
    while ($donnees = mysql_fetch_assoc($result)) {
    	//if ($donnees['Pourcentage']>='0.01')
    		//{
    	?>
    	<tr><td><I><B>
    		<?php echo $donnees['Release']; ?>
    	</B></I></td><td><I>
    		<?php echo $donnees['Sub_Release'];?>
    	</I></td><td><I>
    		<?php echo $donnees['Qty']; ?>
    	</I></td>
    <?php
    //}
    }
    //echo $ns;
    mysql_free_result ($result);  
    mysql_close (); 
    ?>
    </table>
    </div>
    <br>
    </select>
    <div class="divnoprint">
    <input name="btncopy" type="button" value="Print this report" onclick="print();" class="btn0" style="width:120px;">
    <a href="http://127.0.0.1/npi/npi/page_de_garde.php"><span class="btn0" style="width:120px; text-align:center; text-decoration:none;">New</span></a>
    <a href="http://127.0.0.1/npi/npi/page_de_garde2.php"><span class="btn0" style="width:140px; text-align:center; text-decoration:none;">Distribution Per Regions</span></a>
    <a href="http://127.0.0.1/npi/npi/jpgraph/pdftest.php"><span class="btn0" style="width:140px; text-align:center; text-decoration:none;">PDF File</span></a>
    </div>
    création d'un fichier PDF:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    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
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    <?php
    include("graph_pdf.php");
    include("graph_pdf1.php");
     
    /*		GENERATION D'UN FICHIER PDF              */
     // Connexion au serveur de base de données
      $link = mysql_connect("127.0.0.1","root","npidb");
      if (!$link) 
      {
        die('Connexion impossible : ' . mysql_error());
      }
      //echo 'Connecté correctement';
      // Sélection de la base de données
      $db_selected = mysql_select_db('npidb',$link);
      if (!$db_selected) 
      {
         die ('Impossible de sélectionner la base de données : ' . mysql_error());
      }
      // On va chercher les enregistrements disponibles 
    ob_start();
    ?>
    <page backtop="5%"  backbottom="5%"  backleft="5%"  backright="5%">
        <page_header> 
            <p align="center"><img src="alu_logo.jpg"></p>
            _____________________________________________________________________________________________________
     
           <b><?php //echo date('l jS \of F Y h:i:s A'); ?></b>
        </page_header> 
     
        <page_footer>
          _____________________________________________________________________________________________________
          All rights reserved. 
          Passing on and copying of this document, use and communication of its contents not permitted without written authorization.
        </page_footer> 
        <h1 style="text-align:center">Release Per Network</h1>
        <table style="width:100%; border: 1px dashed">
            <tr>
                <th style="width: 20%">Release</th>
                <th style="width: 20%">Sub_Release</th>
                <th style="width: 20%">Total</th>
            </tr>
            <?php 
    /*if(isset($_REQUEST['nom'])){
    $ns =$_REQUEST['nom'];
    echo $ns;*/
    if(isset($_SESSION['famille_equipement'])){
    $ns =$_SESSION['famille_equipement'];
    echo "<hr>valeur de ns: $ns<hr>";
    $sql_camembert =
    'SELECT
            Release_gsm 															AS "Release"
    	  , Sub_release_gsm															AS "Sub_Release"
    	  , SUM(' . $ns . ') 														AS "Qty"
    	  , FORMAT(100*SUM(' . $ns . ')/(SELECT SUM(' . $ns . ') FROM customer), 1) AS "Pourcentage"
    	  , COUNT(*) 																AS "Total"
    FROM
    	customer
    WHERE
    	network_status = "active"			 				        -- réseau actif
    	AND NOT Release_gsm = "/"
      GROUP BY
       	  Release_gsm
      	, Sub_release_gsm
    --   WITH ROLLUP'
    ;
    }
    //echo "<hr>$sql_camembert<hr>";    
    $data=array();
    $data_legend=array();
    $result = mysql_query($sql_camembert) or die('Erreur SQL : <br />' . $sql_camembert . '<br />' . mysql_error());
    // On affiche le contenu si la table n'est pas vide 
    if (mysql_num_rows($result) > 0) 
    	{
    	//echo "<hr>Début de test<br>";
    while ($donnees = mysql_fetch_assoc($result))
    	{
    	if ($donnees['Pourcentage']>='0.01')
    		{
    		$data[] = (float)$donnees['Pourcentage'];
    		$data_legend[] = $donnees['Release'].(" ").(string)$donnees['Sub_Release'];
    		//echo "Valeur : ".$donnees['Release']." légende : ".$donnees['Sub_Release']."<br>";
    		//echo $ns;
    		}
    	//echo "<hr>Milieu de test<br>";
    	$indice=0;
    	//echo "données<br>";
    	foreach($data as $val)
    		{
    		//echo "$indice : ".$val."<br>";
    		$indice+=1;
    		}
    	$indice=0;
    	//echo "Légendes<br>";
    	foreach($data_legend as $val)
    		{
    		//echo "$indice : ".$val."<br>";
    		$indice+=1;
    		}
    	//echo "<br>Fin de test<hr>";
    	}
    	}
    //echo "<hr>Fin de test<br>";
    //var_dump($data);
    //var_dump($data_legend);
    //echo "<hr>";      
    unset($data);
    unset($data_legend);
    //echo "<hr>$sql_camembert<hr>"; 
    $req = mysql_query($sql_camembert) or die('Erreur SQL !<br />'.$sql_camembert.'<br />'.mysql_error()); 
     
    while ($data1y = mysql_fetch_array($req)) {
    ?>
            <tr>
                <td><?php echo $data1y['Release'];?></td>
                <td><?php echo $data1y['Sub_Release'];?></td>
                <td><?php echo $data1y['Total'];?></td>
            </tr>
     
        <?php 
    }
        ?>
        </table>
     
        <table><tr><td><img src="camembert.png"></td></tr></table>
     
     
    	<TABLE border="1" cellspacing="1" cellpadding="1" width="10%">
    <tr>
                <th style="width: 20%">Release</th>
                <th style="width: 20%">Sub_Release</th>
                <th style="width: 20%">Qty</th>
            </tr>
    <?php
    $req = mysql_query($sql_camembert) or die('Erreur SQL !<br />'.$sql_camembert.'<br />'.mysql_error()); 
    while ($data2y = mysql_fetch_array($req)) {
    	//if ($donnees['Pourcentage']>='0.01')
    		//{
    	?>
    	<tr>
    	<td><?php echo $data2y['Release']; ?></td>
    	<td><?php echo $data2y['Sub_Release'];?></td>
    	<td><?php echo $data2y['Qty']; ?></td>
    	</tr>
    <?php
    }
    ?>
    </table>
    <table><tr><td><img src="camembert1.png"></td></tr></table>
    </page>
     
    <?php
        $content = ob_get_clean();
     
        require_once(dirname(__FILE__).'/html2pdf/html2pdf.class.php');
        $html2pdf = new HTML2PDF('P','A4','fr');
        $html2pdf->WriteHTML($content);
        $html2pdf->Output('exemple.pdf');
    ?>

  2. #2
    Membre éprouvé
    Avatar de amoiraud
    Homme Profil pro
    Développeur Web
    Inscrit en
    Octobre 2006
    Messages
    606
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Octobre 2006
    Messages : 606
    Points : 1 057
    Points
    1 057
    Par défaut
    Salut,

    Il manque le session_start() sur la page de traitement et sur la page de création du PDF


    Les boutons et existent, servez-vous en

  3. #3
    Membre du Club
    Homme Profil pro
    Administrateur de base de données
    Inscrit en
    Mars 2013
    Messages
    121
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Essonne (Île de France)

    Informations professionnelles :
    Activité : Administrateur de base de données
    Secteur : High Tech - Matériel informatique

    Informations forums :
    Inscription : Mars 2013
    Messages : 121
    Points : 51
    Points
    51
    Par défaut
    bonsoir,

    c'est a dire que quand je met session_start, ça génère une erreur:
    Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\npi\npi\jpgraph\graph_pdf1.php:26) in C:\xampp\htdocs\npi\npi\jpgraph\html2pdf\_tcpdf_5.0.002\tcpdf.php on line 6122
    TCPDF ERROR: Some data has already been output to browser, can't send PDF file

  4. #4
    Membre éprouvé
    Avatar de amoiraud
    Homme Profil pro
    Développeur Web
    Inscrit en
    Octobre 2006
    Messages
    606
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Octobre 2006
    Messages : 606
    Points : 1 057
    Points
    1 057
    Par défaut
    Le session_start doit être placé au tout début du fichier avant les includes


    Les boutons et existent, servez-vous en

  5. #5
    Membre du Club
    Homme Profil pro
    Administrateur de base de données
    Inscrit en
    Mars 2013
    Messages
    121
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Essonne (Île de France)

    Informations professionnelles :
    Activité : Administrateur de base de données
    Secteur : High Tech - Matériel informatique

    Informations forums :
    Inscription : Mars 2013
    Messages : 121
    Points : 51
    Points
    51
    Par défaut
    oui, ça a été fait après ton post, d'ou l'erreur:
    Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\npi\npi\jpgraph\graph_pdf1.php:26) in C:\xampp\htdocs\npi\npi\jpgraph\html2pdf\_tcpdf_5.0.002\tcpdf.php on line 6122
    TCPDF ERROR: Some data has already been output to browser, can't send PDF file

  6. #6
    Membre du Club
    Homme Profil pro
    Administrateur de base de données
    Inscrit en
    Mars 2013
    Messages
    121
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Essonne (Île de France)

    Informations professionnelles :
    Activité : Administrateur de base de données
    Secteur : High Tech - Matériel informatique

    Informations forums :
    Inscription : Mars 2013
    Messages : 121
    Points : 51
    Points
    51
    Par défaut
    voici le code entier de mes pages :
    page de garde: le plus important commence a la ligne 436
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    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
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    454
    455
    456
    457
    458
    459
    460
    461
    462
    463
    464
    465
    466
    467
    468
    469
    470
    471
    472
    473
    474
    475
    476
    477
    478
    479
    480
    481
    482
    483
    484
    485
    486
    487
    488
    489
    490
    491
    492
    493
    494
    495
    496
    497
    498
    499
    500
    501
    502
    503
    504
    505
    506
    507
    508
    509
    510
    511
    512
    513
    514
    515
    516
    517
    518
    519
    520
    521
    522
    523
    524
    525
    526
    527
    528
    529
    530
    531
    532
    533
    534
    535
    536
    537
    538
    539
    540
    541
    542
    543
    544
    545
    546
    547
    548
    549
    550
    551
    552
    553
    554
    555
    556
    557
    558
    559
    560
    561
    562
    563
    564
    565
    566
    567
    568
    569
    570
    571
    572
    573
    574
    575
    576
    577
    578
    579
    580
    581
    582
    583
    584
    585
    586
    587
    588
    589
    590
    591
    592
    593
    594
    595
    596
    597
    598
    599
    600
    601
    602
    603
    604
    605
    606
    607
    608
    609
    610
    611
    612
    613
    614
    615
    616
    617
    618
    619
    620
    621
    622
    623
    624
    625
    626
    627
    628
    629
    630
    631
    632
    633
    634
    635
    636
    637
    638
    639
    640
    641
    642
    643
    644
    645
    646
    647
    648
    649
    650
    651
    652
    653
    654
    655
    656
    657
    658
    659
    660
    661
    662
    663
    664
    665
    666
    667
    668
    669
    670
    671
    672
    673
    674
    675
    676
    677
    678
    679
    680
    681
    682
    683
    684
    685
    686
    687
    688
    689
    690
    691
    692
    693
    694
    695
    696
    697
    698
    699
    700
    701
    702
    703
    704
    705
    706
    707
    <?php
    session_start();
    include("../biblio/fonctions.npi.php");
    include("../biblio/npi.sqlquery.php");
     
    if ( isset($HTTP_COOKIE_VARS["npi"]) )
    {
           $cooki_deja_init = $HTTP_COOKIE_VARS["npi"];
           list ( $pseudo, $passmot ) = split ('###', $cooki_deja_init);
           $pseudo = trim($pseudo);
           $passmot = trim($passmot);
           $rsc=$HTTP_COOKIE_VARS["rsc"];
           $Net=$HTTP_COOKIE_VARS["Net"];
     
     
           //récup les valeurs du cookie dans les variables sessions
           $_SESSION["login_cookie"] = $pseudo;
           $_SESSION["pass_cookie"] = $passmot;
           $_SESSION["adresse_ip"] = $REMOTE_ADDR;
           $_SESSION["id_session"] = $session_idi;
           $_SESSION["rsc"] = $rsc;
           $_SESSION["Net"] = $Net;
     
     
    if (!file_exists("../logs/$pseudo.php")) {
    header("Location: ../index.php?kickoff");
    echo ("erreur");
    exit;
    }
     
     
    include("../logs/$pseudo.php");
     
           /*
           if($_SESSION["login_cookie"] != $_SESSION["login_connexion"] && $_SESSION["pass_cookie"] != $_SESSION["pass_connexion"])
           {
                $_SESSION["error_connexion"]="..........";
                header("Location: ../index.php");
                exit();
           }
            */
     
     
     
            if(isset($HTTP_GET_VARS["nav"]))
               {
     
                  $rubrik = $HTTP_GET_VARS["nav"];
     
               }elseif(isset($_POST['nav']) )
               {
                  $rubrik = $_POST['nav'];
     
               }else
               {
                $rubrik="";
     
               }
     
     
    //EFFACE LES TEMPS DE PLUS DE 1H
    $now=time();
    $eff=$now-(1*3600);
    $handle=opendir("../temp/");
    while ($fichier = readdir($handle))
    	{
    	if($fichier!="." && $fichier!="..") 
    		{		
    		$tmp = filemtime("../temp/$fichier");
    		if($tmp<$eff) {unlink("../temp/$fichier");}
    		}
    	}
    closedir($handle);
     
     
    // EFFACE LES LOGS DE PLUS DE 2H
    $now=time();
    $eff=$now-(2*3600);
    $handle=opendir("../logs/");
    while ($fichier = readdir($handle))
    	{
    	if($fichier!="." && $fichier!="..") 
    		{		
    		$tmp = filemtime("../logs/$fichier");
    		if($tmp<$eff) {unlink("../logs/$fichier");}
    		}
    	}
    closedir($handle);
     
     
            $query_GetFav = "Select * from users Where Name ='$pseudo'";
            $bdd_userfavo = securised_SQLquery($query_GetFav);
             while ($user_favo = mysql_fetch_array($bdd_userfavo))  
          {
     
     
           $USER_FAV1_ID=$user_favo["fav1"];
           if ($USER_FAV1_ID!="/") {
                   $query_tempo = "Select * from customer Where Customer_ID ='$USER_FAV1_ID'";
                   $bdd_tempo = securised_SQLquery($query_tempo);
                            while ($field_tempo = mysql_fetch_array($bdd_tempo))  
                            {
                            $USER_FAV1_NAME=$field_tempo["Name"];
                            $USER_FAV1_NETW=$field_tempo["Network"];
                            $USER_FAV1_COUN=$field_tempo["Country"];
                            }
                   }
     
           $USER_FAV2_ID=$user_favo["fav2"];
           if ($USER_FAV2_ID!="/") {
                   $query_tempo = "Select * from customer Where Customer_ID ='$USER_FAV2_ID'";
                   $bdd_tempo = securised_SQLquery($query_tempo);
                            while ($field_tempo = mysql_fetch_array($bdd_tempo))  
                            {
                            $USER_FAV2_NAME=$field_tempo["Name"];
                            $USER_FAV2_NETW=$field_tempo["Network"];
                            $USER_FAV2_COUN=$field_tempo["Country"];
                            }
                   }
     
           $USER_FAV3_ID=$user_favo["fav3"];
           if ($USER_FAV3_ID!="/") {
                   $query_tempo = "Select * from customer Where Customer_ID ='$USER_FAV3_ID'";
                   $bdd_tempo = securised_SQLquery($query_tempo);
                            while ($field_tempo = mysql_fetch_array($bdd_tempo))  
                            {
                            $USER_FAV3_NAME=$field_tempo["Name"];
                            $USER_FAV3_NETW=$field_tempo["Network"];
                            $USER_FAV3_COUN=$field_tempo["Country"];
                            }
                   }               
     
           $USER_FAV4_ID=$user_favo["fav4"];
           if ($USER_FAV4_ID!="/") {
                   $query_tempo = "Select * from customer Where Customer_ID ='$USER_FAV4_ID'";
                   $bdd_tempo = securised_SQLquery($query_tempo);
                            while ($field_tempo = mysql_fetch_array($bdd_tempo))  
                            {
                            $USER_FAV4_NAME=$field_tempo["Name"];
                            $USER_FAV4_NETW=$field_tempo["Network"];
                            $USER_FAV4_COUN=$field_tempo["Country"];
                            }
                   }         
     
           $USER_FAV5_ID=$user_favo["fav5"];
           if ($USER_FAV5_ID!="/") {
                   $query_tempo = "Select * from customer Where Customer_ID ='$USER_FAV5_ID'";
                   $bdd_tempo = securised_SQLquery($query_tempo);
                            while ($field_tempo = mysql_fetch_array($bdd_tempo))  
                            {
                            $USER_FAV5_NAME=$field_tempo["Name"];
                            $USER_FAV5_NETW=$field_tempo["Network"];
                            $USER_FAV5_COUN=$field_tempo["Country"];
                            }
                   } 
          }
     
    ?>
     
     
    <head>
    <title>Alcatel NPI Database</title>
    <link rel="stylesheet" type="text/css" href="../biblio/npi.css">
     
    <link rel="stylesheet" type="text/css" href="../biblio/newstyle.php<?php echo("?rcss=$rubrik"); ?>">
    <script src="../biblio/spmenu.js"></script>
     
    </head>
     
     
    <script>
     
    function NewWindow(){window.open(window.location.href);}
     
    function LaunchOMCTool(){window.open("../omc_m/start.php","OMC_Manager","height=450, width=1200, scrollbars =yes, status=1");}
     
    function LaunchDataSaver(){window.open("./save/pop.php",null,"height=450, width=600; status=1");}
     
    function LaunchNPIComment(){window.open("./global_comment.php");}
     
    function Go_Home(){window.location.replace("index.php?home");}
    function Logout(){window.location.replace("../logout.php");}
    function Go_ReviewOneNetwork(){window.location.replace("index.php?nav=review&navtype=one");}
    function Go_ReviewSeveralNetwork(){window.location.replace("index.php?nav=review&navtype=several");}
    function Go_StandardStats(){window.location.replace("index.php?nav=stats");}
    function Go_FilterGSM(){window.location.replace("index.php?nav=filter&all=all&network=gsm");}
    function Go_FilterUMTS(){window.location.replace("index.php?nav=filter&all=all&network=umts");}
     
     
    function Go_StatusUMTS(){window.location.replace("index.php?nav=status&all=all&network=umts");}
    function Go_StatusGSM(){window.location.replace("index.php?nav=status&all=all&network=gsm");}
     
    function Go_GlobalStatusSheet(){window.location.replace("index.php?nav=globalstatus");}
    function Go_GlobalStatusTable(){window.location.replace("index.php?nav=globalstatustable");}
     
    function Go_ModifyOneNetwork(){window.location.replace("index.php?nav=dat1");}
    function Go_ModifySeveralNetwork(){window.location.replace("index.php?nav=datmany");}
    function Go_ModifySeveralNetworkwimax(){window.location.replace("index.php?nav=datmanywimax");}
    function Go_DisplayLog(){window.location.replace("index.php?nav=log&navtype=show");}
    function Go_DownloadLog(){window.location.replace("index.php?nav=log&navtype=download");}
    function Go_ManageCusto(){window.location.replace("index.php?nav=manage");}
    function Go_ReloadCusto(){window.location.replace("index.php?nav=reload");}
    function Go_Rights(){window.location.replace("index.php?nav=access");}
    function Go_LstValMan(){window.location.replace("index.php?nav=list");}
    function Go_reportmanage(){window.location.replace("index.php?nav=list");}
     
    function Go_ChangeNews(){window.location.replace("index.php?nav=changenews");}
     
    function OpenMyProfile(){window.open("myaccount/myac.php",null,"height=450, width=600; status=NO");}
    function OpenHelp(){window.open("http://aww-npi.alcatel.fr/npi/wdoc/",null);}
     
    function OpenMonitor(){window.open("monitor/",null);}
    	function OpenMonitor_2(){window.open("http://aww-npi.alcatel.fr/npi/newHisto.php",null);}
     
    function RedirReview(a) {
    document.write("<form name='Frm_FavReview' method='POST' action='index.php?nav=redir'>");
    document.write("        <input type='hidden' name='cust' value='"+a+"'>");
    document.write("        <input type='hidden' name='action' value='review'>");
    document.write("</form>");
    document.Frm_FavReview.submit();
    }
     
     
    function RedirModify(a) {
    document.write("<form name='Frm_FavModify' method='POST' action='index.php?nav=redir'>");
    document.write("        <input type='hidden' name='cust' value='"+a+"'>");
    document.write("        <input type='hidden' name='action' value='modify'>");
    document.write("</form>");
    document.Frm_FavModify.submit();
    }
     
    function RedirStatus(a) {
    document.write("<form name='Frm_FavModify' method='POST' action='index.php?nav=redir'>");
    document.write("        <input type='hidden' name='cust' value='"+a+"'>");
    document.write("        <input type='hidden' name='action' value='status'>");
    document.write("</form>");
    document.Frm_FavModify.submit();
    }
     
     
    function CloseAll(){
    document.getElementById('OMainMenu').style.display='none';
    document.getElementById('OMainMenu2').style.display='none';
    document.getElementById('OMainMenu3').style.display='none';
    document.getElementById('OMainMenu4').style.display='none';
    document.getElementById('OMainMenu5').style.display='none';
    }
    </script>
    <body onclick="CheckDoc()" topmargin="0" <?php if ($BrowseType=="NPIExplorer") { echo("oncontextmenu=\"return false;\" onselectstart=\"return false;\""); } ?>>
     
    <!-- 
    <div style="background-color:#F5E8E0; color:#D29875; height:20px;"><center><b><font face="Arial" size="1">BETA VERSION | BETA VERSION | BETA VERSION | BETA VERSION | BETA VERSION | BETA VERSION | BETA VERSION | BETA VERSION | BETA VERSION | BETA VERSION | BETA VERSION</font></b></center></div>
     //-->
     
    <?php
     
    if ($BrowseType!="NPIExplorer") {
    ?>
     
    <div style="position:absolute; top:0; left:0; width:100%; height:100%; z-index:-2; background-color:#ffffff" class="divnoprint">
    <table width="100%" height="100%"><tr><td align="center" style="font-size:30pt; color:#c0c0c0; cursor:default;" onselectstart="return false;">
     
    <table border="0" cellpadding="1" cellspacing="2">
    	<tr>
    		<td style="font-size:30pt; color:#c0c0c0; cursor:default;"><u>Loading...</u></td>
    	</tr>
    	<tr>
    		<td><font size="2" color="#c0c0c0"><b><center>Alcatel NPI Database V2</center></b></font></td>
    	</tr>
    </table>
     
     
     
    </td></tr></table>
    </div>
    <?php
    }
    ?>
     
    <?php
    if ($root=="local") {echo("<div style=\"background-color:#ff0000; color:white;\"><b>BASE DE TEST</b></div>");}
    ?>
     
     
     
    <table width="100%" height="100%" cellpadding="0" cellspacing="0">
    <tr>
    <td valign="top">
     
     
     
     
    <table border="0" cellpadding="0" cellspacing="0" id="OHorBar" name="OHorBar" onselectstart="return false;">
    <tr>
    <td width="110" style="padding:2;">
    <a href="./" target="_self"><img src="../biblio/logo_al.gif" width="200" height="70" alt="Alcatel" border="0"></a><br>
    <div class="small" align="center" style="width:198px">NPI DATABASE</div>
    <iframe src="about:blank" name="BlankFrame" id="BlankFrame" height="0" width="0" frameborder="0" border="0"></iframe>
    </td>
    <td width="85">           
    <script>
    CreateMenu('Main','OMainMenu');
    AddMenuItem('javascript:Go_Home()','Go Home');
    AddMenuItem('javascript:NewWindow()','New window');
    AddSeperator();
    AddMenuItem('javascript:OpenMyProfile()','Manage your profile');
    AddMenuItem('javascript:OpenHelp();','Online Documentation');
    AddSeperator();
    AddMenuItem('javascript:Logout()','Logout');
    <?php
    if ($BrowseType=="NPIExplorer") {
    ?>
    AddSeperator();
    AddMenuItem('javascript:close()','Close');
    <?php
    }
    ?>
    CloseMenu();
    </script>        
    </td>
    <td width="85">           
    <script>
    CreateMenu('Review','OMainMenu2');
    AddMenuItem('javascript:Go_ReviewOneNetwork()','Review One Network');
    AddMenuItem('javascript:Go_ReviewSeveralNetwork()','Review Several Networks');
    AddSeperator();
    <?php
    $isfav=0;
    if ($USER_FAV1_ID!="/") {$isfav=1; echo "AddMenuItem(\"javascript:RedirReview($USER_FAV1_ID)\",\"$USER_FAV1_NAME\");";}
    if ($USER_FAV2_ID!="/") {$isfav=1; echo "AddMenuItem(\"javascript:RedirReview($USER_FAV2_ID)\",\"$USER_FAV2_NAME\");";}
    if ($USER_FAV3_ID!="/") {$isfav=1; echo "AddMenuItem(\"javascript:RedirReview($USER_FAV3_ID)\",\"$USER_FAV3_NAME\");";}
    if ($USER_FAV4_ID!="/") {$isfav=1; echo "AddMenuItem(\"javascript:RedirReview($USER_FAV4_ID)\",\"$USER_FAV4_NAME\");";}
    if ($USER_FAV5_ID!="/") {$isfav=1; echo "AddMenuItem(\"javascript:RedirReview($USER_FAV5_ID)\",\"$USER_FAV5_NAME\");";}
    if ($isfav==0) {
    echo ("AddMenuItemD('javascript:void(0)','No favorite');");
    }
    ?>
    CloseMenu();
    </script>        
    </td>
    <td width="85">           
    <script>
    CreateMenu('Statistics','OMainMenu4');
    AddMenuItem('javascript:Go_StandardStats()','Standard Statistics');
    AddSeperator();
    AddMenuItem('javascript:Go_FilterGSM()','Filters for GSM');
    AddSeperator();
    <?php
    $isfav=0;
    if ($USER_FAV1_ID!="/") {$isfav=1; echo "AddMenuItem(\"javascript:RedirStatus($USER_FAV1_ID)\",\"$USER_FAV1_NAME\");";}
    if ($USER_FAV2_ID!="/") {$isfav=1; echo "AddMenuItem(\"javascript:RedirStatus($USER_FAV2_ID)\",\"$USER_FAV2_NAME\");";}
    if ($USER_FAV3_ID!="/") {$isfav=1; echo "AddMenuItem(\"javascript:RedirStatus($USER_FAV3_ID)\",\"$USER_FAV3_NAME\");";}
    if ($USER_FAV4_ID!="/") {$isfav=1; echo "AddMenuItem(\"javascript:RedirStatus($USER_FAV4_ID)\",\"$USER_FAV4_NAME\");";}
    if ($USER_FAV5_ID!="/") {$isfav=1; echo "AddMenuItem(\"javascript:RedirStatus($USER_FAV5_ID)\",\"$USER_FAV5_NAME\");";}
    if ($isfav==0) {
    echo ("AddMenuItemD('javascript:void(0)','No favorite');");
    }
    ?>
    CloseMenu();
    </script>        
    </td>
    <td width="85">           
    <script>
    CreateMenu('Modify','OMainMenu3');
    AddMenuItem('javascript:Go_ModifyOneNetwork()','Modify One Network');
    AddMenuItem('javascript:Go_ModifySeveralNetwork()','Using CSV');
    AddSeperator();
    <?php
    $isfav=0;
    if ($USER_FAV1_ID!="/") {$isfav=1; echo "AddMenuItem(\"javascript:RedirModify($USER_FAV1_ID)\",\"$USER_FAV1_NAME\");";}
    if ($USER_FAV2_ID!="/") {$isfav=1; echo "AddMenuItem(\"javascript:RedirModify($USER_FAV2_ID)\",\"$USER_FAV2_NAME\");";}
    if ($USER_FAV3_ID!="/") {$isfav=1; echo "AddMenuItem(\"javascript:RedirModify($USER_FAV3_ID)\",\"$USER_FAV3_NAME\");";}
    if ($USER_FAV4_ID!="/") {$isfav=1; echo "AddMenuItem(\"javascript:RedirModify($USER_FAV4_ID)\",\"$USER_FAV4_NAME\");";}
    if ($USER_FAV5_ID!="/") {$isfav=1; echo "AddMenuItem(\"javascript:RedirModify($USER_FAV5_ID)\",\"$USER_FAV5_NAME\");";}
    if ($isfav==0) {
    echo ("AddMenuItemD('javascript:void(0)','No favorite');");
    }
    ?>
    CloseMenu();
    </script>        
    </td>
    <td width="85">           
    <script>
    CreateMenu('Administration','OMainMenu5');
    AddMenuItem('javascript:Go_ChangeNews()','Change News Text');
    AddSeperator();
    AddMenuItem('javascript:LaunchDataSaver()','<font color=#004080><b>Save and Export the whole Database</b></font>');
    AddSeperator();
    AddMenuItem('javascript:Go_DisplayLog()','Display the log');
    AddMenuItem('javascript:Go_DownloadLog()','Download the log');
    AddSeperator();
    AddMenuItem('javascript:OpenMonitor()','Monitoring');
    AddSeperator();
    	AddMenuItem('javascript:OpenMonitor_2()','Monitoring 2');
    	AddSeperator();
    AddMenuItem('javascript:Go_GlobalStatusSheet()','Database Satus Graph');
    AddMenuItem('javascript:Go_GlobalStatusTable()','Database Satus Table');
    AddSeperator();
    AddMenuItem('javascript:Go_ManageCusto()','Manage Customers');
    AddMenuItem('javascript:Go_ReloadCusto()','Reload Customer Data');
    AddMenuItem('javascript:Go_Rights()','Users and Rights');
    AddMenuItem('javascript:Go_LstValMan()','List Value Management');
    AddSeperator();
    AddMenuItem('javascript:LaunchOMCTool()','Launch OMC Tool');
    AddSeperator();
    AddMenuItem('javascript:LaunchNPIComment()','NPI Comment');
    AddSeperator();
    AddMenuItem('javascript:Go_reportmanage()','Report Management');
     
    CloseMenu();
    </script>        
    </td>
     
    <td style="font-family:Verdana; font-size:8pt;" align="right">
    Welcome&nbsp;<br>
    <a href="javascript:OpenMyProfile()"><?php echo $pseudo; ?></a>&nbsp;  
    </td>
    <td style="padding-left:3px;padding-right:0px" width="8">
    <div style="width:1; height:20; padding-top:2; padding-bottom:2; margin-top:2; margin-bottom:2; border-right:1 solid #FFFFFF; border-left:1 solid #C0C0C0;"></div>
    </td>
    <td width="24">
    <a href="javascript:Logout()"><img src="../biblio/logout.jpg" border="0" alt="Click here to log out"></a>
    </td>
    </tr>
    </table>
     
     
      	<table  width="100%" height="80%">
    	<tr>
    	<td valign="top" style="padding-top:15px;">
    	<div class="RubTitle">
    <table width="100%" height="100%" cellpadding="0" cellspacing="0">
    <tr>
    <td>
    <b> NPI Online Database > Statistics Report > Distribution per Release </b><br>
    <?php
     
    //----------------------------------------------------------------------------------------------------------------------------------
    $sql_camembert =
    'SELECT
            Release_gsm 											AS "Release"
    	  , Sub_release_gsm											AS "Sub_Release"
    	  , FORMAT(100*COUNT(*)/(SELECT COUNT(*) FROM customer), 1) AS "Pourcentage"
    	  , COUNT(*) 												AS "Total"
    FROM
    	customer
    WHERE
    	network_status = "active"			 				        -- réseau actif
    	AND NOT Release_gsm = "/"
      GROUP BY
       	  Release_gsm
      	, Sub_release_gsm
    --   WITH ROLLUP'
    ;
     
    $data=array();
    $data_legend=array();
     
    $result = mysql_query($sql_camembert) or die('Erreur SQL : <br />' . $sql_camembert . '<br />' . mysql_error());
    // On affiche le contenu si la table n'est pas vide 
    if (mysql_num_rows($result) > 0) 
    	{
    	//echo "<hr>Début de test<br>";
    while ($donnees = mysql_fetch_assoc($result))
    	{
    	if ($donnees['Pourcentage']>='0.01')
    		{
    		$data[] = (float)$donnees['Pourcentage'];
    		$data_legend[] = $donnees['Release'].(" ").(string)$donnees['Sub_Release'];
    		//echo "Valeur : ".$donnees['Regions']." légende : ".$donnees['Sous Region']."<br>";
    		//echo $ns;
    		}
    	//echo "<hr>Milieu de test<br>";
    	$indice=0;
    	//echo "données<br>";
    	foreach($data as $val)
    		{
    		//echo "$indice : ".$val."<br>";
    		$indice+=1;
    		}
    	$indice=0;
    	//echo "Légendes<br>";
    	foreach($data_legend as $val)
    		{
    		//echo "$indice : ".$val."<br>";
    		$indice+=1;
    		}
    	//echo "<br>Fin de test<hr>";
    	}
    	}
    //echo "<hr>Fin de test<br>";
    // var_dump($data);
    //var_dump($data_legend);
    //echo "<hr>";
     
     
    $data_serialized=base64_encode(serialize($data));
    $data_legend_serialized=base64_encode(serialize($data_legend));
    echo "<img src='jpgraph/graph_pdg.php?data_serialized=$data_serialized&data_legend_serialized=$data_legend_serialized'>";
     
    unset($data);
    unset($data_legend);
    ?>
    <html>
    <head>
    <title>latest TPM updates</title>
    </head>
    <body>
    <?php
    $req = mysql_query($sql_camembert) or die('Erreur SQL !<br />'.$sql_camembert.'<br />'.mysql_error()); 
    ?> 
    <div style="float:right; top; width:400px; margin-top:-350px;">
    <TABLE border="4" cellspacing="2" cellpadding="2" width="30%">
    <tr>
      <th>Network Per Release</th>
      <th>Sub_Release</th>
      <th>Total</th>
    </tr>
    <?php
    while ($data1y = mysql_fetch_array($req)) {
    //	if ($data1y['Pourcentage']>='0.01')
    //	{
    	?>
        <tr><td><I><B>
    		<?php echo $data1y['Release']; ?>
    	</B></I></td><td><I>
    		<?php echo $data1y['Sub_Release']; ?>
    	</I></td><td><I>
    		<?php echo $data1y['Total']; ?>
    	</I></td>	
    <?php
    }
    //---------------------------------------------------------------------------------------------------------------------------------
    ?>
    </br></td>
    </tr></table>
    </div>
    <h1>
    <?php
     // Connexion au serveur de base de données
      $link = mysql_connect("127.0.0.1","root","npidb");
      if (!$link) 
      {
        die('Connexion impossible : ' . mysql_error());
      }
      //echo 'Connecté correctement';
      // Sélection de la base de données
      $db_selected = mysql_select_db('npidb',$link);
      if (!$db_selected) 
      {
         die ('Impossible de sélectionner la base de données : ' . mysql_error());
      }
      // On va chercher les enregistrements disponibles 
     
     
     
       $sql_bts = "SELECT
    				  Name
    				, Name_To_Show
    			FROM
    				  bts_family
    			GROUP BY
    				  Name";
    ?>
    <?php			
       $req=mysql_query($sql_bts) or die('Erreur SQL !<br />'.$sql_bts.'<br />'.mysql_error());
    ?>
    <!--
    <form name="formulaire" action="http://127.0.0.1/npi/npi/jpgraph/pourcentage1.php?nom="+$nom; method="send" onsubmit="return verifier();">
    <p>
     
    -->
     
    <script language="javascript">
    function send($nom){
    window.location.href="jpgraph/pourcentage1.php?nom="+$nom;
    <!--window.location.href="jpgraph/pdf1.php?nom="+$nom;-->
    }
    </script>
     
    <b>BTS:</b>
    <select name="name_bts" style="background-color:white;color:black;" onchange="send(this.options[this.selectedIndex].value);">
    <option>Choose</option> 
    <?php 	
     
    while ($data = mysql_fetch_array($req)) {  
    ?> 
    <option value="<?php echo $data['Name'];?>">
    <?php	 echo $data['Name_To_Show'];?>
    </option>
    <?php	if(isset($_REQUEST['name_bts'])&&!empty($_REQUEST['name_bts'])){
    echo $_REQUEST['name_bts'];
    }}
    unset ($data);
    ?>
    </select>
     
     
     
    <?php
    // On va chercher les enregistrements disponibles                                                                       //
       $sql_bsc = "SELECT
    				Name
    				, Name_To_Show
    			FROM
    				bsc_family
    			GROUP BY
    				Name"
    			;
    ?>
    <?php			
       $req = mysql_query($sql_bsc) or die('Erreur SQL !<br />'.$sql_bsc.'<br />'.mysql_error());
    ?>
     
    <b>BSC:</b>
    <select name="name_bsc" style="background-color:white;color:black;" onchange="send(this.options[this.selectedIndex].value);">
    <option>Choose</option> 
    <?php 	
     
    while ($data = mysql_fetch_array($req)) {  
    ?> 
    <option value="<?php echo $data['Name'];?>">
    <?php	 echo $data['Name_To_Show'];?>
    </option>
    <?php	if(isset($_REQUEST['name_bsc'])&&!empty($_REQUEST['name_bsc'])){
    echo $_REQUEST['name_bsc'];
    }}
    unset ($data);
    ?>
    </select>
     
     
     
    <?php
    // On va chercher les enregistrements disponibles                                                                    //
       $sql_mfs = "SELECT
    				Name
    				, Name_To_Show
    			FROM
    				mfs_family
    			GROUP BY
    				Name"
    			;
    ?>
    <?php			
       $req = mysql_query($sql_mfs) or die('Erreur SQL !<br />'.$sql_mfs.'<br />'.mysql_error());
    ?>
     
    <b>MFS:</b>
    <select name="name_mfs" style="background-color:white;color:black;" onchange="send(this.options[this.selectedIndex].value);">
    <option>Choose</option> 
     
    <?php 	
     
    while ($data = mysql_fetch_array($req)) {  ?> 
    <option value="<?php echo $data['Name'];?>">
    <?php	 echo $data['Name_To_Show'];?>
    </option>
    <?php	if(isset($_REQUEST['name_mfs'])&&!empty($_REQUEST['name_mfs'])){
    echo $_REQUEST['name_mfs'];
    }}
    unset ($data);
    mysql_free_result ($req);  
    mysql_close ();
    ?>
    </h1>
    </td>
    </tr>
    </table>
     
     
    </td>
    </tr>
    <tr>
    <td valign="bottom" height="35">
    <br><br><form name="formulaire" action="http://127.0.0.1/npi/npi/page_de_garde2.php" method="send" onsubmit="return verifier();">
    <input type="submit" value="Distribution Per Regions" style="width:150px; height:20px; box-shadow:10px 10px 10px #333; font-family:Times Roman; font-size: 12px;"/></div>
    <p style="margin-bottom: 20"><br>
            <table border="0" cellpadding="0" cellspacing="0" id="OHorBarBot" name="OHorBarBot" onselectstart="return false;">
            <tr>
            <td style="font-family:Verdana; font-size:8pt;" align="right">
            Optimized for Internet Explorer | <b>For internal use only</b> | NPI Database V2.1 &nbsp;
            </td>
            </tr>
            </table>
     
    </td>
    </tr>
    </table>
    <div style="position:absolute; top:0; left:0; width:100%; height:100%; z-index:-1; background-color:#ffffff" class="divnoprint">
    <table width="100%" height="100%"><tr><td align="center" style="font-size:150pt; color:#f9f9f9; cursor:default;" onselectstart="return false;">
    <u>NPI Database</u>
    </td></tr></table>
    </div>
    			</body>
    			</html>
     <?php
     
     
    }else{
          $_SESSION["error_connexion"]="..."; //Connex° échouée
          header("Location: ../index.php");
          exit();
    }
     
     
     ?>
    page de traitement: le plus important commence à la ligne 420
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    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
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    454
    455
    456
    457
    458
    459
    460
    461
    462
    463
    464
    465
    466
    467
    468
    469
    470
    471
    472
    473
    474
    475
    476
    477
    478
    479
    480
    481
    482
    483
    484
    485
    486
    487
    488
    489
    490
    491
    492
    493
    494
    495
    496
    497
    498
    499
    500
    501
    502
    503
    504
    505
    506
    507
    508
    509
    510
    511
    512
    513
    514
    515
    516
    517
    518
    519
    520
    521
    522
    523
    524
    525
    526
    527
    528
    529
    530
    531
    532
    533
    534
    535
    536
    537
    538
    539
    540
    541
    542
    543
    544
    545
    546
    547
    548
    549
    550
    551
    552
    553
    554
    555
    556
    557
    558
    559
    560
    561
    562
    563
    564
    565
    566
    567
    568
    569
    570
    571
    572
    573
    574
    575
    576
    577
    578
    579
    580
    581
    582
    583
    584
    585
    586
    587
    588
    589
    590
    591
    592
    593
    594
    595
    <?php
    session_start(); // Création de la session
    include("../../biblio/fonctions.npi.php");
    include("../../biblio/npi.sqlquery.php");
     
    if ( isset($HTTP_COOKIE_VARS["npi"]) )
    {
           $cooki_deja_init = $HTTP_COOKIE_VARS["npi"];
           list ( $pseudo, $passmot ) = split ('###', $cooki_deja_init);
           $pseudo = trim($pseudo);
           $passmot = trim($passmot);
           $rsc=$HTTP_COOKIE_VARS["rsc"];
           $Net=$HTTP_COOKIE_VARS["Net"];
     
     
           //récup les valeurs du cookie dans les variables sessions
           $_SESSION["login_cookie"] = $pseudo;
           $_SESSION["pass_cookie"] = $passmot;
           $_SESSION["adresse_ip"] = $REMOTE_ADDR;
           $_SESSION["id_session"] = $session_idi;
           $_SESSION["rsc"] = $rsc;
           $_SESSION["Net"] = $Net;
     
     
    if (!file_exists("../../logs/$pseudo.php")) {
    header("Location: ../../index.php?kickoff");
    echo ("erreur");
    exit;
    }
     
    include("../../logs/$pseudo.php");
     
           /*
           if($_SESSION["login_cookie"] != $_SESSION["login_connexion"] && $_SESSION["pass_cookie"] != $_SESSION["pass_connexion"])
           {
                $_SESSION["error_connexion"]="..........";
                header("Location: ../index.php");
                exit();
           }
            */
     
     
     
            if(isset($HTTP_GET_VARS["nav"]))
               {
     
                  $rubrik = $HTTP_GET_VARS["nav"];
     
               }elseif(isset($_POST['nav']) )
               {
                  $rubrik = $_POST['nav'];
     
               }else
               {
                $rubrik="";
     
               }
     
    //EFFACE LES TEMPS DE PLUS DE 1H
    $now=time();
    $eff=$now-(1*3600);
    $handle=opendir("../../temp/");
    while ($fichier = readdir($handle))
    	{
    	if($fichier!="." && $fichier!="..") 
    		{		
    		$tmp = filemtime("../../temp/$fichier");
    		if($tmp<$eff) {unlink("../../temp/$fichier");}
    		}
    	}
    closedir($handle);
     
     
    // EFFACE LES LOGS DE PLUS DE 2H
    $now=time();
    $eff=$now-(2*3600);
    $handle=opendir("../../logs/");
    while ($fichier = readdir($handle))
    	{
    	if($fichier!="." && $fichier!="..") 
    		{		
    		$tmp = filemtime("../../logs/$fichier");
    		if($tmp<$eff) {unlink("../../logs/$fichier");}
    		}
    	}
    closedir($handle);
     
     
            $query_GetFav = "Select * from users Where Name ='$pseudo'";
            $bdd_userfavo = securised_SQLquery($query_GetFav);
             while ($user_favo = mysql_fetch_array($bdd_userfavo))  
          {
     
     
           $USER_FAV1_ID=$user_favo["fav1"];
           if ($USER_FAV1_ID!="/") {
                   $query_tempo = "Select * from customer Where Customer_ID ='$USER_FAV1_ID'";
                   $bdd_tempo = securised_SQLquery($query_tempo);
                            while ($field_tempo = mysql_fetch_array($bdd_tempo))  
                            {
                            $USER_FAV1_NAME=$field_tempo["Name"];
                            $USER_FAV1_NETW=$field_tempo["Network"];
                            $USER_FAV1_COUN=$field_tempo["Country"];
                            }
                   }
     
           $USER_FAV2_ID=$user_favo["fav2"];
           if ($USER_FAV2_ID!="/") {
                   $query_tempo = "Select * from customer Where Customer_ID ='$USER_FAV2_ID'";
                   $bdd_tempo = securised_SQLquery($query_tempo);
                            while ($field_tempo = mysql_fetch_array($bdd_tempo))  
                            {
                            $USER_FAV2_NAME=$field_tempo["Name"];
                            $USER_FAV2_NETW=$field_tempo["Network"];
                            $USER_FAV2_COUN=$field_tempo["Country"];
                            }
                   }
     
           $USER_FAV3_ID=$user_favo["fav3"];
           if ($USER_FAV3_ID!="/") {
                   $query_tempo = "Select * from customer Where Customer_ID ='$USER_FAV3_ID'";
                   $bdd_tempo = securised_SQLquery($query_tempo);
                            while ($field_tempo = mysql_fetch_array($bdd_tempo))  
                            {
                            $USER_FAV3_NAME=$field_tempo["Name"];
                            $USER_FAV3_NETW=$field_tempo["Network"];
                            $USER_FAV3_COUN=$field_tempo["Country"];
                            }
                   }               
     
           $USER_FAV4_ID=$user_favo["fav4"];
           if ($USER_FAV4_ID!="/") {
                   $query_tempo = "Select * from customer Where Customer_ID ='$USER_FAV4_ID'";
                   $bdd_tempo = securised_SQLquery($query_tempo);
                            while ($field_tempo = mysql_fetch_array($bdd_tempo))  
                            {
                            $USER_FAV4_NAME=$field_tempo["Name"];
                            $USER_FAV4_NETW=$field_tempo["Network"];
                            $USER_FAV4_COUN=$field_tempo["Country"];
                            }
                   }         
     
           $USER_FAV5_ID=$user_favo["fav5"];
           if ($USER_FAV5_ID!="/") {
                   $query_tempo = "Select * from customer Where Customer_ID ='$USER_FAV5_ID'";
                   $bdd_tempo = securised_SQLquery($query_tempo);
                            while ($field_tempo = mysql_fetch_array($bdd_tempo))  
                            {
                            $USER_FAV5_NAME=$field_tempo["Name"];
                            $USER_FAV5_NETW=$field_tempo["Network"];
                            $USER_FAV5_COUN=$field_tempo["Country"];
                            }
                   } 
          }
     
    ?>
     
     
    <head>
    <title>Alcatel NPI Database</title>
    <link rel="stylesheet" type="text/css" href="../../biblio/npi.css">
     
    <link rel="stylesheet" type="text/css" href="../../biblio/newstyle.php<?php echo("?rcss=$rubrik"); ?>">
    <script src="../../biblio/spmenu.js"></script>
     
    </head>
     
     
    <script>
     
    function NewWindow(){window.open(window.location.href);}
     
    function LaunchOMCTool(){window.open("../../omc_m/start.php","OMC_Manager","height=450, width=1200, scrollbars =yes, status=1");}
     
    function LaunchDataSaver(){window.open("../../save/pop.php",null,"height=450, width=600; status=1");}
     
    function LaunchNPIComment(){window.open("../../global_comment.php");}
     
    function Go_Home(){window.location.replace("../index.php?home");}
    function Logout(){window.location.replace("../../logout.php");}
    function Go_ReviewOneNetwork(){window.location.replace("../index.php?nav=review&navtype=one");}
    function Go_ReviewSeveralNetwork(){window.location.replace("../index.php?nav=review&navtype=several");}
    function Go_StandardStats(){window.location.replace("../index.php?nav=stats");}
    function Go_FilterGSM(){window.location.replace("../index.php?nav=filter&all=all&network=gsm");}
    function Go_FilterUMTS(){window.location.replace("../index.php?nav=filter&all=all&network=umts");}
     
     
    function Go_StatusUMTS(){window.location.replace("../index.php?nav=status&all=all&network=umts");}
    function Go_StatusGSM(){window.location.replace("../index.php?nav=status&all=all&network=gsm");}
     
    function Go_GlobalStatusSheet(){window.location.replace("../index.php?nav=globalstatus");}
    function Go_GlobalStatusTable(){window.location.replace("../index.php?nav=globalstatustable");}
     
    function Go_ModifyOneNetwork(){window.location.replace("../index.php?nav=dat1");}
    function Go_ModifySeveralNetwork(){window.location.replace("../index.php?nav=datmany");}
    function Go_ModifySeveralNetworkwimax(){window.location.replace("../index.php?nav=datmanywimax");}
    function Go_DisplayLog(){window.location.replace("../index.php?nav=log&navtype=show");}
    function Go_DownloadLog(){window.location.replace("../index.php?nav=log&navtype=download");}
    function Go_ManageCusto(){window.location.replace("../index.php?nav=manage");}
    function Go_ReloadCusto(){window.location.replace("../index.php?nav=reload");}
    function Go_Rights(){window.location.replace("../index.php?nav=access");}
    function Go_LstValMan(){window.location.replace("../index.php?nav=list");}
    function Go_reportmanage(){window.location.replace("../index.php?nav=list");}
     
    function Go_ChangeNews(){window.location.replace("../index.php?nav=changenews");}
     
    function OpenMyProfile(){window.open("../myaccount/myac.php",null,"height=450, width=600; status=NO");}
    function OpenHelp(){window.open("http://aww-npi.alcatel.fr/npi/wdoc/",null);}
     
    function OpenMonitor(){window.open("monitor/",null);}
    	function OpenMonitor_2(){window.open("http://aww-npi.alcatel.fr/npi/newHisto.php",null);}
     
    function RedirReview(a) {
    document.write("<form name='Frm_FavReview' method='POST' action='index.php?nav=redir'>");
    document.write("        <input type='hidden' name='cust' value='"+a+"'>");
    document.write("        <input type='hidden' name='action' value='review'>");
    document.write("</form>");
    document.Frm_FavReview.submit();
    }
     
     
    function RedirModify(a) {
    document.write("<form name='Frm_FavModify' method='POST' action='index.php?nav=redir'>");
    document.write("        <input type='hidden' name='cust' value='"+a+"'>");
    document.write("        <input type='hidden' name='action' value='modify'>");
    document.write("</form>");
    document.Frm_FavModify.submit();
    }
     
    function RedirStatus(a) {
    document.write("<form name='Frm_FavModify' method='POST' action='index.php?nav=redir'>");
    document.write("        <input type='hidden' name='cust' value='"+a+"'>");
    document.write("        <input type='hidden' name='action' value='status'>");
    document.write("</form>");
    document.Frm_FavModify.submit();
    }
     
     
    function CloseAll(){
    document.getElementById('OMainMenu').style.display='none';
    document.getElementById('OMainMenu2').style.display='none';
    document.getElementById('OMainMenu3').style.display='none';
    document.getElementById('OMainMenu4').style.display='none';
    document.getElementById('OMainMenu5').style.display='none';
    }
    </script>
    <body onclick="CheckDoc()" topmargin="0" <?php if ($BrowseType=="NPIExplorer") { echo("oncontextmenu=\"return false;\" onselectstart=\"return false;\""); } ?>>
     
    <!-- 
    <div style="background-color:#F5E8E0; color:#D29875; height:20px;"><center><b><font face="Arial" size="1">BETA VERSION | BETA VERSION | BETA VERSION | BETA VERSION | BETA VERSION | BETA VERSION | BETA VERSION | BETA VERSION | BETA VERSION | BETA VERSION | BETA VERSION</font></b></center></div>
     //-->
     
    <?php
     
    if ($BrowseType!="NPIExplorer") {
    ?>
     
    <div style="position:absolute; top:0; left:0; width:100%; height:100%; z-index:-2; background-color:#ffffff" class="divnoprint">
    <table width="100%" height="100%"><tr><td align="center" style="font-size:30pt; color:#c0c0c0; cursor:default;" onselectstart="return false;">
     
    <table border="0" cellpadding="1" cellspacing="2">
    	<tr>
    		<td style="font-size:30pt; color:#c0c0c0; cursor:default;"><u>Loading...</u></td>
    	</tr>
    	<tr>
    		<td><font size="2" color="#c0c0c0"><b><center>Alcatel NPI Database V2</center></b></font></td>
    	</tr>
    </table>
    </td></tr></table>
    </div>
    <?php
    }
    ?>
    <?php
    if ($root=="local") {echo("<div style=\"background-color:#ff0000; color:white;\"><b>BASE DE TEST</b></div>");}
    ?>
    <table width="100%" height="100%" cellpadding="0" cellspacing="0">
    <tr>
    <td valign="top">
    <table border="0" cellpadding="0" cellspacing="0" id="OHorBar" name="OHorBar" onselectstart="return false;">
    <tr>
    <td width="110" style="padding:2;">
    <a href="./" target="_self"><img src="../../biblio/logo_al.gif" width="200" height="70" alt="Alcatel" border="0"></a><br>
    <div class="small" align="center" style="width:198px">NPI DATABASE</div>
    <iframe src="about:blank" name="BlankFrame" id="BlankFrame" height="0" width="0" frameborder="0" border="0"></iframe>
    </td>
    <td width="85">           
    <script>
    CreateMenu('Main','OMainMenu');
    AddMenuItem('javascript:Go_Home()','Go Home');
    AddMenuItem('javascript:NewWindow()','New window');
    AddSeperator();
    AddMenuItem('javascript:OpenMyProfile()','Manage your profile');
    AddMenuItem('javascript:OpenHelp();','Online Documentation');
    AddSeperator();
    AddMenuItem('javascript:Logout()','Logout');
    <?php
    if ($BrowseType=="NPIExplorer") {
    ?>
    AddSeperator();
    AddMenuItem('javascript:close()','Close');
    <?php
    }
    ?>
    CloseMenu();
    </script>        
    </td>
    <td width="85">           
    <script>
    CreateMenu('Review','OMainMenu2');
    AddMenuItem('javascript:Go_ReviewOneNetwork()','Review One Network');
    AddMenuItem('javascript:Go_ReviewSeveralNetwork()','Review Several Networks');
    AddSeperator();
    <?php
    $isfav=0;
    if ($USER_FAV1_ID!="/") {$isfav=1; echo "AddMenuItem(\"javascript:RedirReview($USER_FAV1_ID)\",\"$USER_FAV1_NAME\");";}
    if ($USER_FAV2_ID!="/") {$isfav=1; echo "AddMenuItem(\"javascript:RedirReview($USER_FAV2_ID)\",\"$USER_FAV2_NAME\");";}
    if ($USER_FAV3_ID!="/") {$isfav=1; echo "AddMenuItem(\"javascript:RedirReview($USER_FAV3_ID)\",\"$USER_FAV3_NAME\");";}
    if ($USER_FAV4_ID!="/") {$isfav=1; echo "AddMenuItem(\"javascript:RedirReview($USER_FAV4_ID)\",\"$USER_FAV4_NAME\");";}
    if ($USER_FAV5_ID!="/") {$isfav=1; echo "AddMenuItem(\"javascript:RedirReview($USER_FAV5_ID)\",\"$USER_FAV5_NAME\");";}
    if ($isfav==0) {
    echo ("AddMenuItemD('javascript:void(0)','No favorite');");
    }
    ?>
    CloseMenu();
    </script>        
    </td>
    <td width="85">           
    <script>
    CreateMenu('Statistics','OMainMenu4');
    AddMenuItem('javascript:Go_StandardStats()','Standard Statistics');
    AddSeperator();
    AddMenuItem('javascript:Go_FilterGSM()','Filters for GSM');
    AddSeperator();
    <?php
    $isfav=0;
    if ($USER_FAV1_ID!="/") {$isfav=1; echo "AddMenuItem(\"javascript:RedirStatus($USER_FAV1_ID)\",\"$USER_FAV1_NAME\");";}
    if ($USER_FAV2_ID!="/") {$isfav=1; echo "AddMenuItem(\"javascript:RedirStatus($USER_FAV2_ID)\",\"$USER_FAV2_NAME\");";}
    if ($USER_FAV3_ID!="/") {$isfav=1; echo "AddMenuItem(\"javascript:RedirStatus($USER_FAV3_ID)\",\"$USER_FAV3_NAME\");";}
    if ($USER_FAV4_ID!="/") {$isfav=1; echo "AddMenuItem(\"javascript:RedirStatus($USER_FAV4_ID)\",\"$USER_FAV4_NAME\");";}
    if ($USER_FAV5_ID!="/") {$isfav=1; echo "AddMenuItem(\"javascript:RedirStatus($USER_FAV5_ID)\",\"$USER_FAV5_NAME\");";}
    if ($isfav==0) {
    echo ("AddMenuItemD('javascript:void(0)','No favorite');");
    }
    ?>
    CloseMenu();
    </script>        
    </td>
    <td width="85">           
    <script>
    CreateMenu('Modify','OMainMenu3');
    AddMenuItem('javascript:Go_ModifyOneNetwork()','Modify One Network');
    AddMenuItem('javascript:Go_ModifySeveralNetwork()','Using CSV');
    AddSeperator();
    <?php
    $isfav=0;
    if ($USER_FAV1_ID!="/") {$isfav=1; echo "AddMenuItem(\"javascript:RedirModify($USER_FAV1_ID)\",\"$USER_FAV1_NAME\");";}
    if ($USER_FAV2_ID!="/") {$isfav=1; echo "AddMenuItem(\"javascript:RedirModify($USER_FAV2_ID)\",\"$USER_FAV2_NAME\");";}
    if ($USER_FAV3_ID!="/") {$isfav=1; echo "AddMenuItem(\"javascript:RedirModify($USER_FAV3_ID)\",\"$USER_FAV3_NAME\");";}
    if ($USER_FAV4_ID!="/") {$isfav=1; echo "AddMenuItem(\"javascript:RedirModify($USER_FAV4_ID)\",\"$USER_FAV4_NAME\");";}
    if ($USER_FAV5_ID!="/") {$isfav=1; echo "AddMenuItem(\"javascript:RedirModify($USER_FAV5_ID)\",\"$USER_FAV5_NAME\");";}
    if ($isfav==0) {
    echo ("AddMenuItemD('javascript:void(0)','No favorite');");
    }
    ?>
    CloseMenu();
    </script>        
    </td>
    <td width="85">           
    <script>
    CreateMenu('Administration','OMainMenu5');
    AddMenuItem('javascript:Go_ChangeNews()','Change News Text');
    AddSeperator();
    AddMenuItem('javascript:LaunchDataSaver()','<font color=#004080><b>Save and Export the whole Database</b></font>');
    AddSeperator();
    AddMenuItem('javascript:Go_DisplayLog()','Display the log');
    AddMenuItem('javascript:Go_DownloadLog()','Download the log');
    AddSeperator();
    AddMenuItem('javascript:OpenMonitor()','Monitoring');
    AddSeperator();
    	AddMenuItem('javascript:OpenMonitor_2()','Monitoring 2');
    	AddSeperator();
    AddMenuItem('javascript:Go_GlobalStatusSheet()','Database Satus Graph');
    AddMenuItem('javascript:Go_GlobalStatusTable()','Database Satus Table');
    AddSeperator();
    AddMenuItem('javascript:Go_ManageCusto()','Manage Customers');
    AddMenuItem('javascript:Go_ReloadCusto()','Reload Customer Data');
    AddMenuItem('javascript:Go_Rights()','Users and Rights');
    AddMenuItem('javascript:Go_LstValMan()','List Value Management');
    AddSeperator();
    AddMenuItem('javascript:LaunchOMCTool()','Launch OMC Tool');
    AddSeperator();
    AddMenuItem('javascript:LaunchNPIComment()','NPI Comment');
    AddSeperator();
    AddMenuItem('javascript:Go_reportmanage()','Report Management');
     
    CloseMenu();
    </script>        
    </td>
    <td style="font-family:Verdana; font-size:8pt;" align="right">
    Welcome&nbsp;<br>
    <a href="javascript:OpenMyProfile()"><?php echo $pseudo; ?></a>&nbsp;  
    </td>
    <td style="padding-left:3px;padding-right:0px" width="8">
    <div style="width:1; height:20; padding-top:2; padding-bottom:2; margin-top:2; margin-bottom:2; border-right:1 solid #FFFFFF; border-left:1 solid #C0C0C0;"></div>
    </td>
    <td width="24">
    <a href="javascript:Logout()"><img src="../../biblio/logout.jpg" border="0" alt="Click here to log out"></a>
    </td>
    </tr>
    </table>
    <table  width="100%" height="80%">
    <tr>
    <td valign="top" style="padding-top:15px;">
    <div class="RubTitle">
    <table><tr>
    <td><b> NPI Online Database > Statistics Report > Distribution per Releases </b></td>
    </tr></table>
    </div>  
    <?php 
    if(isset($_REQUEST['nom'])){
    $ns =$_REQUEST['nom'];
    $_SESSION['famille_equipement']=$ns;
    echo "<hr>valeur de session : ".$_SESSION['famille_equipement']."<hr>";
    $sql_camembert =
    'SELECT
           Release_gsm 												AS "Release"
    	  , Sub_release_gsm											AS "Sub_Release"
    	  , SUM(' . $ns . ') 										AS "Qty"
    	  , FORMAT(100*SUM(' . $ns . ')/(SELECT SUM(' . $ns . ') FROM customer), 1) AS "Pourcentage"
    	  , COUNT(*) 												AS "Total"
    -- 	  , SUM(	)
    FROM
    	customer
    WHERE
    	network_status = "active"			 				        -- réseau actif
    	AND NOT Release_gsm = "/"
      GROUP BY
       	  Release_gsm
      	, Sub_release_gsm
    --   WITH ROLLUP'
    ;
    }
     // Connexion au serveur de base de données
      $link = mysql_connect("127.0.0.1","root","npidb");
      if (!$link) 
      {
        die('Connexion impossible : ' . mysql_error());
      }
      //echo 'Connecté correctement';
      // Sélection de la base de données
      $db_selected = mysql_select_db('npidb',$link);
      if (!$db_selected) 
      {
         die ('Impossible de sélectionner la base de données : ' . mysql_error());
      }  
    $data=array();
    $data_legend=array();
    $result = mysql_query($sql_camembert) or die('Erreur SQL : <br />' . $sql_camembert . '<br />' . mysql_error());
    // On affiche le contenu si la table n'est pas vide 
    if (mysql_num_rows($result) > 0) 
    	{
    	//echo "<hr>Début de test<br>";
    while ($donnees = mysql_fetch_assoc($result))
    	{
    	if ($donnees['Pourcentage']>='0.01')
    		{
    		$data[] = (float)$donnees['Pourcentage'];
    		$data_legend[] = $donnees['Release'].(" ").(string)$donnees['Sub_Release'];
    		//echo "Valeur : ".$donnees['Pourcentage']." légende : ".$donnees['Sub_Release']."<br>";
    		//echo $ns;
    		}
    	//echo "<hr>Milieu de test<br>";
    	$indice=0;
    	//echo "données<br>";
    	foreach($data as $val)
    		{
    		//echo "$indice : ".$val."<br>";
    		$indice+=1;
    		}
    	$indice=0;
    	//echo "Légendes<br>";
    	foreach($data_legend as $val)
    		{
    		//echo "$indice : ".$val."<br>";
    		$indice+=1;
    		}
    	//echo "<br>Fin de test<hr>";
    	}
    	}
    //echo "<hr>Fin de test<br>";
    //var_dump($data);
    //var_dump($data_legend);
    //echo "<hr>";
     
    $data_serialized=base64_encode(serialize($data));
    $data_legend_serialized=base64_encode(serialize($data_legend));
    echo"<img src='./graph1.php?data_serialized=$data_serialized&data_legend_serialized=$data_legend_serialized'>";
    unset($data);
    unset($data_legend);
    ?>
    <html>
    <head>
    <title>latest TPM updates</title>
    </head>
    <body>
    <?php
    $result = mysql_query($sql_camembert) or die('Erreur SQL !<br />'.$sql_camembert.'<br />'.mysql_error());  
    ?> 
    <div style="float:right; top; width:400px; margin-top:-370px;">
    <b style="font-size:14px;">YOUR SELECTION :</b><input type="text" value="<?php echo $ns ?>" style="font-size:14px;" />
    <TABLE border="4" cellspacing="2" cellpadding="2" width="30%">
    <tr>
      <th>Distribution Per Release</th>
      <th>Sub_Release</th>
      <th>Qty</th>
    </tr>
    <?php
     
    while ($donnees = mysql_fetch_assoc($result)) {
    	//if ($donnees['Pourcentage']>='0.01')
    		//{
    	?>
    	<tr><td><I><B>
    		<?php echo $donnees['Release']; ?>
    	</B></I></td><td><I>
    		<?php echo $donnees['Sub_Release'];?>
    	</I></td><td><I>
    		<?php echo $donnees['Qty']; ?>
    	</I></td>
    <?php
    //}
    }
    //echo $ns;
    mysql_free_result ($result);  
    mysql_close (); 
    ?>
    </table>
    </div>
    <br>
    </select>
    <div class="divnoprint">
    <input name="btncopy" type="button" value="Print this report" onclick="print();" class="btn0" style="width:120px;">
    <a href="http://127.0.0.1/npi/npi/page_de_garde.php"><span class="btn0" style="width:120px; text-align:center; text-decoration:none;">New</span></a>
    <a href="http://127.0.0.1/npi/npi/page_de_garde2.php"><span class="btn0" style="width:140px; text-align:center; text-decoration:none;">Distribution Per Regions</span></a>
    <a href="http://127.0.0.1/npi/npi/jpgraph/pdftest.php"><span class="btn0" style="width:140px; text-align:center; text-decoration:none;">PDF File</span></a>
    </div>
     
    <script type="text/javascript">
     function copyToClipboard() {
     
    var fullText = document.getElementById('text');
     
    fullText.focus();
    var textRange = fullText.createTextRange();
    textRange.execCommand("Copy");
    //parent.frames['details'].location.href='done.php';
    }
    </td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <td valign="bottom" height="35">
     
            <table border="0" cellpadding="0" cellspacing="0" id="OHorBarBot" name="OHorBarBot" onselectstart="return false;">
            <tr>
            <td style="font-family:Verdana; font-size:8pt;" align="right">
            Optimized for Internet Explorer | <b>For internal use only</b> | NPI Database V2.1 &nbsp;
            </td>
            </tr>
            </table>
     
    </td>
    </tr>
    </table>
    <div style="position:absolute; top:0; left:0; width:100%; height:100%; z-index:-1; background-color:#ffffff" class="divnoprint">
    <table width="100%" height="100%"><tr><td align="center" style="font-size:150pt; color:#f9f9f9; cursor:default;" onselectstart="return false;">
    <u>NPI Database</u>
    </td></tr></table>
    </div>
    			</body>
    			</html>
     <?php
     
     
    }else{
          $_SESSION["error_connexion"]="..."; //Connex° échouée
          header("Location: ../../index.php");
          exit();
    }
     
     
     ?>
    création du fichier PDF:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    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
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    <?php
    session_start();
    include("graph_pdf.php");
    include("graph_pdf1.php");
     
    /*		GENERATION D'UN FICHIER PDF              */
     // Connexion au serveur de base de données
      $link = mysql_connect("127.0.0.1","root","npidb");
      if (!$link) 
      {
        die('Connexion impossible : ' . mysql_error());
      }
      //echo 'Connecté correctement';
      // Sélection de la base de données
      $db_selected = mysql_select_db('npidb',$link);
      if (!$db_selected) 
      {
         die ('Impossible de sélectionner la base de données : ' . mysql_error());
      }
      // On va chercher les enregistrements disponibles 
    ob_start();
    ?>
    <page backtop="5%"  backbottom="5%"  backleft="5%"  backright="5%">
        <page_header> 
            <p align="center"><img src="alu_logo.jpg"></p>
            _____________________________________________________________________________________________________
     
           <b><?php //echo date('l jS \of F Y h:i:s A'); ?></b>
        </page_header> 
     
        <page_footer>
          _____________________________________________________________________________________________________
          All rights reserved. 
          Passing on and copying of this document, use and communication of its contents not permitted without written authorization.
        </page_footer> 
        <h1 style="text-align:center">Release Per Network</h1>
        <table style="width:100%; border: 1px dashed">
            <tr>
                <th style="width: 20%">Release</th>
                <th style="width: 20%">Sub_Release</th>
                <th style="width: 20%">Total</th>
            </tr>
            <?php 
    /*if(isset($_REQUEST['nom'])){
    $ns =$_REQUEST['nom'];
    echo $ns;*/
    if(isset($_SESSION['famille_equipement'])){
    $ns =$_SESSION['famille_equipement'];
    echo "<hr>valeur de ns: $ns<hr>";
    $sql_camembert =
    'SELECT
            Release_gsm 															AS "Release"
    	  , Sub_release_gsm															AS "Sub_Release"
    	  , SUM(' . $ns . ') 														AS "Qty"
    	  , FORMAT(100*SUM(' . $ns . ')/(SELECT SUM(' . $ns . ') FROM customer), 1) AS "Pourcentage"
    	  , COUNT(*) 																AS "Total"
    FROM
    	customer
    WHERE
    	network_status = "active"			 				        -- réseau actif
    	AND NOT Release_gsm = "/"
      GROUP BY
       	  Release_gsm
      	, Sub_release_gsm
    --   WITH ROLLUP'
    ;
    }
    //echo "<hr>$sql_camembert<hr>";    
    $data=array();
    $data_legend=array();
    $result = mysql_query($sql_camembert) or die('Erreur SQL : <br />' . $sql_camembert . '<br />' . mysql_error());
    // On affiche le contenu si la table n'est pas vide 
    if (mysql_num_rows($result) > 0) 
    	{
    	//echo "<hr>Début de test<br>";
    while ($donnees = mysql_fetch_assoc($result))
    	{
    	if ($donnees['Pourcentage']>='0.01')
    		{
    		$data[] = (float)$donnees['Pourcentage'];
    		$data_legend[] = $donnees['Release'].(" ").(string)$donnees['Sub_Release'];
    		//echo "Valeur : ".$donnees['Release']." légende : ".$donnees['Sub_Release']."<br>";
    		//echo $ns;
    		}
    	//echo "<hr>Milieu de test<br>";
    	$indice=0;
    	//echo "données<br>";
    	foreach($data as $val)
    		{
    		//echo "$indice : ".$val."<br>";
    		$indice+=1;
    		}
    	$indice=0;
    	//echo "Légendes<br>";
    	foreach($data_legend as $val)
    		{
    		//echo "$indice : ".$val."<br>";
    		$indice+=1;
    		}
    	//echo "<br>Fin de test<hr>";
    	}
    	}
    //echo "<hr>Fin de test<br>";
    //var_dump($data);
    //var_dump($data_legend);
    //echo "<hr>";      
    unset($data);
    unset($data_legend);
    //echo "<hr>$sql_camembert<hr>"; 
    $req = mysql_query($sql_camembert) or die('Erreur SQL !<br />'.$sql_camembert.'<br />'.mysql_error()); 
     
    while ($data1y = mysql_fetch_array($req)) {
    ?>
            <tr>
                <td><?php echo $data1y['Release'];?></td>
                <td><?php echo $data1y['Sub_Release'];?></td>
                <td><?php echo $data1y['Total'];?></td>
            </tr>
     
        <?php 
    }
        ?>
        </table>
     
        <table><tr><td><img src="camembert.png"></td></tr></table>
     
     
    	<TABLE border="1" cellspacing="1" cellpadding="1" width="10%">
    <tr>
                <th style="width: 20%">Release</th>
                <th style="width: 20%">Sub_Release</th>
                <th style="width: 20%">Qty</th>
            </tr>
    <?php
    $req = mysql_query($sql_camembert) or die('Erreur SQL !<br />'.$sql_camembert.'<br />'.mysql_error()); 
    while ($data2y = mysql_fetch_array($req)) {
    	//if ($donnees['Pourcentage']>='0.01')
    		//{
    	?>
    	<tr>
    	<td><?php echo $data2y['Release']; ?></td>
    	<td><?php echo $data2y['Sub_Release'];?></td>
    	<td><?php echo $data2y['Qty']; ?></td>
    	</tr>
    <?php
    }
    ?>
    </table>
    <table><tr><td><img src="camembert1.png"></td></tr></table>
    </page>
     
    <?php
        $content = ob_get_clean();
     
        require_once(dirname(__FILE__).'/html2pdf/html2pdf.class.php');
        $html2pdf = new HTML2PDF('P','A4','fr');
        $html2pdf->WriteHTML($content);
        $html2pdf->Output('exemple.pdf');
    ?>

  7. #7
    Membre du Club
    Homme Profil pro
    Administrateur de base de données
    Inscrit en
    Mars 2013
    Messages
    121
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Essonne (Île de France)

    Informations professionnelles :
    Activité : Administrateur de base de données
    Secteur : High Tech - Matériel informatique

    Informations forums :
    Inscription : Mars 2013
    Messages : 121
    Points : 51
    Points
    51
    Par défaut
    c'est bon il me manquait juste un ptit truc pour la récupération de la valeur de page en page:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    $ns=$_SESSION ['famille_equipement'];

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [Tableaux] Mauvaises valeurs renvoyées
    Par Jeren dans le forum Langage
    Réponses: 5
    Dernier message: 05/05/2008, 09h49
  2. LAST_INSERT_ID mauvaises valeurs
    Par Linio dans le forum Requêtes
    Réponses: 10
    Dernier message: 31/03/2008, 00h32
  3. mauvaises valeurs en sortie
    Par emprex dans le forum Débuter
    Réponses: 9
    Dernier message: 07/02/2008, 19h25
  4. Réponses: 8
    Dernier message: 17/07/2007, 11h33
  5. Fonction Get() renvoyant les mauvaises valeurs
    Par jairbubbles dans le forum XML
    Réponses: 1
    Dernier message: 20/11/2006, 12h33

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo