[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/se3-internet/sources/www/se3/se3-internet/ -> charte_internet.php (source)

   1  <?php
   2  
   3  
   4  /**
   5     * Page pour autoriser la connexion internet aux eleves
   6     * @Version $Id: charte_internet.php 5740 2010-07-15 18:09:12Z plouf $
   7     
   8     * @Projet LCS-SE3
   9     * @auteurs Denis Bonnenfant
  10     * @Licence Distribue sous  la licence GPL
  11  */
  12  
  13  include "Internet.inc.php";
  14  include  "entete.inc.php";
  15  include  "ldap.inc.php";
  16  include  "ihm.inc.php";
  17  
  18  require_once  ("lang.inc.php");
  19  bindtextdomain('se3-core',"/var/www/se3/locale");
  20  textdomain ('se3-core');
  21  session_start();
  22  
  23  foreach ($_POST as $cle=>$val) {
  24      $$cle = $val;
  25  }
  26  
  27  if (!isset($etablissement)) $etablissement="lyc�e";
  28  
  29  
  30  if (is_admin("se3_is_admin",$login)=="Y") {
  31      $role="admin";
  32  } elseif (is_admin("sovajon_is_admin",$login)=="Y") {
  33      $role="prof";
  34  } else {    
  35      $role="eleve";
  36  }
  37  
  38  if ($role == "eleve")  {
  39  
  40      $action=$_POST['action'];
  41      echo "<H1> Charte informatique du $etablissement </H1>";
  42    
  43          if (isset($_POST['quitter']))
  44      {
  45          // Contr�le de l'acceptation et mise � jour de ldap si OK
  46      }
  47      else
  48      {
  49          if (!isset($action)) {
  50          $_SESSION['page']=1;
  51             }
  52          else if ($action == "suivant"){
  53          $_SESSION['page']=$_SESSION['page']+1;
  54          }
  55          else if ($action == "precedent")
  56            $_SESSION['page']--;
  57          else if ($action == "acceptation")
  58            $_SESSION['page']=0;
  59          
  60  
  61      
  62          echo "<FORM  method=\"post\" action=\"charte_internet.php\">\n";
  63          switch ($_SESSION['page'])
  64          {
  65          case 0 :
  66              echo "Acceptation effectu�e : <br>";
  67              exec ("/usr/share/se3/sbin/update-internet.sh $login intranet tous", $AllOutput, $ReturnValue);    
  68                  $message .= $AllOutput[0]."<br>";
  69                          $message .= $ReturnValue."<br>";
  70              echo " <a href=$urlse3>Retour</a>";
  71              break;
  72          case 1 :
  73              echo file_get_contents('./charte.txt');
  74              echo "<BR>";
  75              echo "<input type=\"submit\" name=\"action\" value=\"acceptation\">";
  76              break;
  77          }
  78          echo "</form>";
  79          echo "</DIV>";
  80      }
  81  } else {
  82      echo " <div class=erreur>Erreur, vous �tes $role, mais votre compte est mal configur�. Contactez un administrateur pour corriger le probl�me<br></div>";
  83      echo " <a href=$urlse3>Retour</a>";
  84  }     
  85  
  86  
  87  include ("pdp.inc.php");
  88  ?>


Generated: Tue Mar 17 22:47:18 2015 Cross-referenced by PHPXref 0.7.1