epnadmin-fr
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Epnadmin-fr] CVS: epnadmin add_message.sh,NONE,1.1 add_message_file.sh


From: Loïc Dayot
Subject: [Epnadmin-fr] CVS: epnadmin add_message.sh,NONE,1.1 add_message_file.sh,NONE,1.1 en.lang.inc.php,NONE,1.1 fr.lang.inc.php,NONE,1.1 remove_message.sh,NONE,1.1 constantes.inc.php,1.16,1.17 header.inc.php,1.14,1.15 initiations.php,1.4,1.5 themes.php,1.3,1.4
Date: Thu, 23 Jan 2003 17:00:53 -0500

Update of /cvsroot/epnadmin/epnadmin
In directory subversions:/tmp/cvs-serv29481/epnadmin

Modified Files:
        constantes.inc.php header.inc.php initiations.php themes.php 
Added Files:
        add_message.sh add_message_file.sh en.lang.inc.php 
        fr.lang.inc.php remove_message.sh 
Log Message:
Encore la prise en charge des différents droits des visiteurs.
Un tout début de proposition de prise en charge multilingue.




--- NEW FILE ---
#!/bin/bash
#
# Shell script that adds a message to all message files (Lem9)
#
# Example:  add_message.sh '$strNewMessage' 'new message contents'
#
for file in *.lang.inc.php
do
        echo $file " "
        grep -v '?>' ${file} > ${file}.new
        echo "$1 = '"$2"';  //to translate" >> ${file}.new
        echo "?>" >> ${file}.new
        rm $file
        mv ${file}.new $file
done
echo " "
echo "This script also added the new message to en.lang.inc.php"

--- NEW FILE ---
#!/bin/bash
#
# Shell script that adds a message file to all message files
# adding "//to translate" on each line
#
# Example:  add_message_file.sh  xxx
#
for file in *.lang.inc.php
do
    echo $file " "
    grep -v '?>' ${file} > ${file}.new
    sed 's/;/;\/\/to translate/' <$1 >> ${file}.new
    echo "?>" >> ${file}.new
    rm $file
    mv ${file}.new $file
done
echo " "
echo "This script also added the new messages to en.lang.inc.php"

--- NEW FILE ---
<?
/*
    Copyright (C) 2003 Loïc Dayot

    EPNadmin - Version 0.6

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

    http://epnadmin.pierrefitte93.fr/
*/

$pasledroit="<p>Vous n'avez pas les autorisations suffisantes pour accéder à ce 
service.
             Adressez-vous à votre administrateur si vous pensez que c'est une 
erreur.</p>\n";
?>

--- NEW FILE ---
<?
/*
    Copyright (C) 2003 Loïc Dayot

    EPNadmin - Version 0.6

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

    http://epnadmin.pierrefitte93.fr/
*/

$pasledroit="<p>Vous n'avez pas les autorisations suffisantes pour accéder à ce 
service.
             Adressez-vous à votre administrateur si vous pensez que c'est une 
erreur.</p>
             <p><a href=\"/\">Retour</a></p>\n";

?>
--- NEW FILE ---
#!/bin/bash
#
# Shell script that removes a message from all message files (Lem9)
# it checks for the message, followed by a space
#
# Example:  remove_message.sh 'strMessageToRemove' 
#
for file in *.lang.inc.php
do
    echo "lines before:" `wc -l $file`
    grep -v "$1 " ${file} > ${file}.new
    rm $file
    mv ${file}.new $file
    echo " lines after:" `wc -l $file`
done
echo " "

Index: constantes.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/constantes.inc.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** constantes.inc.php  22 Jan 2003 21:24:08 -0000      1.16
--- constantes.inc.php  23 Jan 2003 22:00:50 -0000      1.17
***************
*** 24,27 ****
--- 24,30 ----
  //  Constantes de paramétrage de l'application
  
+ // Langage, language, idioma
+ $langage="fr";
+ 
  // Paramétrage de MySQL
  $mysql_serveur="localhost";
***************
*** 63,67 ****
  $administrateursitesweb="address@hidden"; // courriel de l'administrateur des 
sites web
                                                  // et des domaines de 
courriels
!               // utilisé dans courriel.(inc.)php et siteweb.(inc.)php
  $ip_serveur="192.168.0.253"; // sert dans courriel.inc.php
  
--- 66,70 ----
  $administrateursitesweb="address@hidden"; // courriel de l'administrateur des 
sites web
                                                  // et des domaines de 
courriels
! // utilisé dans courriel.(inc.)php et siteweb.(inc.)php
  $ip_serveur="192.168.0.253"; // sert dans courriel.inc.php
  
***************
*** 119,121 ****
--- 122,128 ----
    $rien="&nbsp;";
  }
+ 
+ // Chargement du fichier de langage
+ require_once($langage.".lang.inc.php");
+ 
  ?>

Index: header.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/header.inc.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** header.inc.php      22 Jan 2003 21:24:08 -0000      1.14
--- header.inc.php      23 Jan 2003 22:00:50 -0000      1.15
***************
*** 43,47 ****
    <title>identification - epnadmin</title>
    </head><body bgcolor=\"#FFFFFF\">
!   <h3><a href=\"http://arobase.pierrefitte93.fr\";><img src=\"$logo\" 
border=\"0\"></a>
    Identification pour accéder aux comptes personnels.</h3>
  
--- 43,47 ----
    <title>identification - epnadmin</title>
    </head><body bgcolor=\"#FFFFFF\">
!   <h3><a href=\"/\"><img src=\"$logo\" border=\"0\"></a>
    Identification pour accéder aux comptes personnels.</h3>
  

Index: initiations.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/initiations.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** initiations.php     5 Jan 2003 20:34:01 -0000       1.4
--- initiations.php     23 Jan 2003 22:00:51 -0000      1.5
***************
*** 23,27 ****
  
  require_once("header.inc.php");
! //require_once("constantes.inc.php");             // définition des constantes
  //require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
  require_once("mysql.inc.php");                  // concernant mysql
--- 23,27 ----
  
  require_once("header.inc.php");
! require_once("constantes.inc.php");             // définition des constantes
  //require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
  require_once("mysql.inc.php");                  // concernant mysql
***************
*** 43,47 ****
  <?
  $titr = "Base des initiations";
! $datemaj="5 janvier 2002";
  require("entete.inc.php");
  
--- 43,47 ----
  <?
  $titr = "Base des initiations";
! $datemaj="22 janvier 2003";
  require("entete.inc.php");
  
***************
*** 50,56 ****
  case 11 : // confirmation d'ajout ou mise à jour
  case 21 :
!    if (!$isadmin)
     {
!       echo "<p>Petit curieux, vous n'avez rien à faire là...</p>\n";
        break;
     }
--- 50,56 ----
  case 11 : // confirmation d'ajout ou mise à jour
  case 21 :
!    if (!defined("PEDAGOGIE") || PEDAGOGIE<"40")
     {
!       echo $pasledroit;
        break;
     }
***************
*** 122,128 ****
  case 2 : // formulaire d'édition
     // Saisie pour modification d'un enregistrement
!    if (!$isadmin)
     {
!       echo "<p>C'est un vrai labyrinthe, n'est-ce pas, ce site...</p>\n";
        break;
     }
--- 122,128 ----
  case 2 : // formulaire d'édition
     // Saisie pour modification d'un enregistrement
!    if (!defined("PEDAGOGIE") || PEDAGOGIE<"40")
     {
!       echo $pasledroit;
        break;
     }
***************
*** 133,140 ****
  
  case 1 : // formulaire d'ajout
! // Début du fomulaire de saisie d'enregistrement de logiciels
!    if (!$isadmin)
     {
!       echo "<p>Encore vous, mais que faites-vous là ?..</p>\n";
        break;
     }
--- 133,140 ----
  
  case 1 : // formulaire d'ajout
! // Début du fomulaire de saisie d'enregistrement d'initiation
!    if (!defined("INITIATIONS") || INITIATIONS<"20")
     {
!       echo $pasledroit;
        break;
     }
***************
*** 145,150 ****
     echo "  <input type=\"hidden\" name=\"operation\" value=\"21\">
             <table border=\"1\" align=\"center\">
!              <tr> 
!                <td>Th&egrave;me : 
                   <select name=\"id_theme\">\n";
     if ($id_theme)
--- 145,150 ----
     echo "  <input type=\"hidden\" name=\"operation\" value=\"21\">
             <table border=\"1\" align=\"center\">
!              <tr>
!                <td>Th&egrave;me :
                   <select name=\"id_theme\">\n";
     if ($id_theme)
***************
*** 163,167 ****
     echo "        </select>
                 </td>
!                <td rowspan=\"2\"> 
                   <div align=\"center\">Intitul&eacute; :<br>
                     <textarea name=\"initiation\" cols=\"40\" 
rows=\"2\">$initiation</textarea>
--- 163,167 ----
     echo "        </select>
                 </td>
!                <td rowspan=\"2\">
                   <div align=\"center\">Intitul&eacute; :<br>
                     <textarea name=\"initiation\" cols=\"40\" 
rows=\"2\">$initiation</textarea>
***************
*** 184,188 ****
                 </td>
               </tr>
!              <tr> 
                 <td> 
                   <div align=\"center\">Objectifs :<br>
--- 184,188 ----
                 </td>
               </tr>
!              <tr>
                 <td> 
                   <div align=\"center\">Objectifs :<br>
***************
*** 230,234 ****
                 </td>
               </tr>
!              <tr> 
                 <td>Dur&eacute;e (hh:mm) :
                   <input type=\"text\" name=\"duree\" size=\"10\" 
maxlength=\"9\" value=\"$duree\">
--- 230,234 ----
                 </td>
               </tr>
!              <tr>
                 <td>Dur&eacute;e (hh:mm) :
                   <input type=\"text\" name=\"duree\" size=\"10\" 
maxlength=\"9\" value=\"$duree\">
***************
*** 259,263 ****
                 </td>
               </tr>
!              <tr> 
                 <td align=\"center\">Auteurs et versions :<br>(ajouter sans 
effacer les précédentes infos)<br>
                     <textarea name=\"auteurs_versions\" cols=\"40\" 
rows=\"8\">$auteurs_versions</textarea>
--- 259,263 ----
                 </td>
               </tr>
!              <tr>
                 <td align=\"center\">Auteurs et versions :<br>(ajouter sans 
effacer les précédentes infos)<br>
                     <textarea name=\"auteurs_versions\" cols=\"40\" 
rows=\"8\">$auteurs_versions</textarea>
***************
*** 282,286 ****
                 </td>
               </tr>
!              <tr> 
                 <td colspan=\"2\" align=\"center\">
                    <input type=\"submit\" name=\"Envoyer\" value=\"Envoyer les 
informations\">
--- 282,286 ----
                 </td>
               </tr>
!              <tr>
                 <td colspan=\"2\" align=\"center\">
                    <input type=\"submit\" name=\"Envoyer\" value=\"Envoyer les 
informations\">
***************
*** 293,297 ****
  
  case 3 : // formulaire de suppression
!    if (!$isadmin)
     {
        echo "<p>C'est une erreur, ou c'est volontaire...</p>\n";
--- 293,297 ----
  
  case 3 : // formulaire de suppression
!    if (!defined("PEDAGOGIE") || PEDAGOGIE<"40")
     {
        echo "<p>C'est une erreur, ou c'est volontaire...</p>\n";
***************
*** 306,312 ****
  
  case 31 : // confirmation de suppression
!    if (!$isadmin)
     {
!       echo "<p>Alors, on visite à où il ne faudrait pas ???</p>\n";
        break;
     }
--- 306,312 ----
  
  case 31 : // confirmation de suppression
!    if (!defined("PEDAGOGIE") || PEDAGOGIE<"40")
     {
!       echo $pasledroit;
        break;
     }
***************
*** 320,324 ****
  case 5 :
     // Affichage de la liste des initiations
!    if ($isadmin)
     {
        echo "<table>\n";
--- 320,324 ----
  case 5 :
     // Affichage de la liste des initiations
!    if (defined("PEDAGOGIE") && PEDAGOGIE>="10")
     {
        echo "<table>\n";
***************
*** 343,348 ****
              echo "<td><b>$initiation->initiation</b></td>\n";
              echo "<td width=21><a 
href=\"initiations.php?id_initiation=$initiation->id&$idu\">$info</a></td>\n";
!             echo "<td width=21><a 
href=\"initiations.php?operation=2&id_initiation=$initiation->id&$idu\">$modifier</a></td>\n";
!             echo "<td width=21><a 
href=\"initiations.php?operation=3&id_initiation=$initiation->id&$idu\">$supprimer</a></td>\n";
              echo "<td width=21><a 
href=\"questions.php?id_initiation=$initiation->id&$idu\">Questions</a></td>\n";
              $aucun=false;
--- 343,350 ----
              echo "<td><b>$initiation->initiation</b></td>\n";
              echo "<td width=21><a 
href=\"initiations.php?id_initiation=$initiation->id&$idu\">$info</a></td>\n";
!             if (PEDAGOGIE>="20")
!               echo "<td width=21><a 
href=\"initiations.php?operation=2&id_initiation=$initiation->id&$idu\">$modifier</a></td>\n";
!             if (PEDAGOGIE>="40")
!               echo "<td width=21><a 
href=\"initiations.php?operation=3&id_initiation=$initiation->id&$idu\">$supprimer</a></td>\n";
              echo "<td width=21><a 
href=\"questions.php?id_initiation=$initiation->id&$idu\">Questions</a></td>\n";
              $aucun=false;
***************
*** 358,362 ****
     }
     else
!       echo "<p>Vous vous êtes encore perdu là où il ne faut pas...</p>\n";
     break;
  
--- 360,364 ----
     }
     else
!       echo $pasledroit;
     break;
  
***************
*** 364,375 ****
     if ($id_initiation)
     {
!       afficheInitiation($id_initiation);
!       if ($isadmin)
!          echo "<table align=center border=1><tr>
!                <td width=21><a 
href=\"initiations.php?operation=2&id_initiation=$id_initiation&$idu\">$modifier</a></td>
!                <td width=21><a 
href=\"initiations.php?operation=3&id_initiation=$id_initiation&$idu\">$supprimer</a></td>
!                <td width=21><a 
href=\"questions.php?id_initiation=$id_initiation&$idu\">Questions</a></td>
!                </tr></table>\n";
!    }
     else
        echo "<p>Que faites-vous là, vous ne devriez pas vous y trouver 
!</p>\n";
--- 366,377 ----
     if ($id_initiation)
     {
!      afficheInitiation($id_initiation);
!      echo "<table align=center border=1><tr>\n";
!      if (defined("PEDAGOGIE") && PEDAGOGIE>="40")
!        echo "<td width=21><a 
href=\"initiations.php?operation=2&id_initiation=$id_initiation&$idu\">$modifier</a></td>
!              <td width=21><a 
href=\"initiations.php?operation=3&id_initiation=$id_initiation&$idu\">$supprimer</a></td>\n";
!      echo "<td width=21><a 
href=\"questions.php?id_initiation=$id_initiation&$idu\">Questions</a></td>
!              </tr></table>\n";
! }
     else
        echo "<p>Que faites-vous là, vous ne devriez pas vous y trouver 
!</p>\n";
***************
*** 378,388 ****
  } // switch
  
! if ($isadmin)
  {
!    echo "<p><a href=\"initiations.php?operation=1&$idu\">Ajouter une nouvelle 
initiation</a>.</p>\n";
!    echo "<p><a href=\"initiations.php?operation=5&$idu\">Voir la liste des 
initiations</a>.</p>\n";
  }
  else
!    echo "<p><a href=\"/\">Retour au bercail.</a>.</p>\n";
  
  require("basdepage.inc.php");
--- 380,392 ----
  } // switch
  
! if (defined("PEDAGOGIE"))
  {
!   if (PEDAGOGIE>"10")
!     echo "<p><a href=\"initiations.php?operation=1&$idu\">Ajouter une 
nouvelle initiation</a>.</p>\n";
!   if (PEDAGOGIE>"00")
!     echo "<p><a href=\"initiations.php?operation=5&$idu\">Voir la liste des 
initiations</a>.</p>\n";
  }
  else
!    echo $pasledroit;
  
  require("basdepage.inc.php");

Index: themes.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/themes.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** themes.php  5 Jan 2003 20:34:01 -0000       1.3
--- themes.php  23 Jan 2003 22:00:51 -0000      1.4
***************
*** 23,27 ****
  
  require_once("header.inc.php");
! //require_once("constantes.inc.php");             // définition des constantes
  //require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
  require_once("mysql.inc.php");                  // concernant mysql
--- 23,27 ----
  
  require_once("header.inc.php");
! require_once("constantes.inc.php");             // définition des constantes
  //require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
  require_once("mysql.inc.php");                  // concernant mysql
***************
*** 46,50 ****
  
  // Début du contenu de la page
! if($isadmin)
  {
    switch($operation)
--- 46,50 ----
  
  // Début du contenu de la page
! if (defined("PEDAGOGIE") && PEDAGOGIE>="10")
  {
    switch($operation)
***************
*** 131,138 ****
  } // if
  else
!   echo "<p>Mais, vous ne devriez pas être là. Qu'y faites-vous ?</p>\n";
  
  include("basdepage.inc.php");
  echo "</body></html>\n";
  require("footer.inc.php");
! ?>
\ No newline at end of file
--- 131,138 ----
  } // if
  else
!   echo $pasledroit;
  
  include("basdepage.inc.php");
  echo "</body></html>\n";
  require("footer.inc.php");
! ?>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]