Add Script of the site

This commit is contained in:
jb
2009-09-15 21:08:20 +00:00
parent 5a607545a9
commit b6564df50a
46 changed files with 11408 additions and 0 deletions

242
Scripts/AdminStats.php Normal file
View File

@@ -0,0 +1,242 @@
<?
/*
*********************************************************************
* File : $RCSfile: AdminStats.php,v $
* Version : $Revision: 1.2 $
* Modified by : $Author: jb $ ($Date: 2003/06/28 22:19:43 $)
*********************************************************************
Page Principale pour l'administration des statistiques
V.1.00 : 23-12-2001 : Mise en forme générale
*/
require "conf.php";
require "Archi.php";
include "cadre.php";
require "ErreurConnect.php";
require "msg_french.inc.php3";
// On vérifie avant d'afficher quoi que ce soit que la requete est valide
?>
<link rel="stylesheet" href="style1.css">
<script language="JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
<body bgcolor="#FFFFFF">
<script language="JavaScript">
window.name = "original"
</script>
<table width="200" border="1" cellspacing="0" cellpadding="2" bordercolor="#636563" class="normal">
<tr bordercolor="#666666">
<td colspan="2" bgcolor="#666666" class="titre" height="60">
<div align="center" class="titre"><font color="#FFFFFF">&gt;&gt; <? echo $msgAdminPanel ?>
&lt;&lt; </font></div>
</td>
</tr>
<tr bordercolor="#FFFFFF" valign="top">
<td colspan="3" bordercolor="#666666" height="200">
<p align="right"><?
function AL_Date( ) {
require "msg_french.inc.php3";
echo $msgDaysArray[date("w")] ." ";
echo date("j")." ";
echo $msgMonthsArray[date("n")-1]." ".date("Y");
}
AL_Date( );
?></p>
<p align="right"></p>
<table border="0" cellspacing="0" cellpadding="3" align="center" bgcolor="#FFCCCC">
<tr>
<td width="314" class="titre" height="106">
<p class="titre" align="left"><b><? echo "<a href=\"http://www.ohmj.fr.st\" target=\"_blank\">www.ohmj.fr.st</a>"; ?><br>
</b><span class="normal"><span class="normal"><span class="normal">...</span>
</span><br>
<?
$today = date("Y-m-d" , $reqdate);
switch ($period) {
case "jour":
// echo $msgDay." ".date("d-m-Y" , $reqdate);
echo date("d " , $reqdate).$msgMonthsArray[date("n", $reqdate)-1].date(" Y" , $reqdate);
break;
case "semaine":
$weeklowreqdate = ($reqdate-(86400*date("w" , $reqdate)));
$weekhighreqdate = ($reqdate+(86400*(6-date("w" , $reqdate)) ));
echo "<b>".$msgFrom."</b>".date("d " , $weeklowreqdate).$msgMonthsArray[date("n", $weeklowreqdate)-1].date(" Y" , $weeklowreqdate);
echo " <b>".$msgTo."</b>".date("d " , $weekhighreqdate ).$msgMonthsArray[date("n", $weekhighreqdate)-1].date(" Y" , $weekhighreqdate);
break;
case "mois":
echo $msgMonthsArray[date("n", $reqdate)-1].date(" Y", $reqdate);
break;
}
?> </span></p>
</td>
<td width="424" class="normal" height="106">
<div align="right">
<p><a href="#" onClick="MM_openBrWindow('calendar.php3?table=<? echo $table."&period=$period" ?>','','width=300,height=300')"><? echo $msgCalendar ?></a><br>
<a href="<? echo basename($PHP_SELF)."?id=$id&table=$table&reqdate=$reqdate&reset=1" ?>"></a><br>
<a href="<? echo "read.php3?id=$id&table=$table&period=$period&reqdate=$reqdate"; ?>"><? echo $msgShowRowLogs ?></a></p>
<p> <?
if ($period==jour) {
$ysreqdate = $reqdate - 86400;
$PHP_SELF2 = basename($PHP_SELF);
echo "<a href='$PHP_SELF2?id=$id&table=$table&reqdate=$ysreqdate&reset=0&period=$period'>$msgPreviousDay <b>&lt;&lt;</b></a>";
echo "<br>";
$tmreqdate = $reqdate + 86400;
echo "<a href='$PHP_SELF2?id=$id&table=$table&reqdate=$tmreqdate&reset=0&period=$period'>$msgNextDay <b>&gt;&gt;</b></a>";
echo "<br>";
}
if ($period==semaine) {
$ysreqdate = $reqdate - 7*86400;
$PHP_SELF2 = basename($PHP_SELF);
echo "<a href='$PHP_SELF2?id=$id&table=$table&reqdate=$ysreqdate&reset=0&period=$period'>$msgPreviousWeek <b>&lt;&lt;</b></a>";
echo "<br>";
$tmreqdate = $reqdate + 7*86400;
echo "<a href='$PHP_SELF2?id=$id&table=$table&reqdate=$tmreqdate&reset=0&period=$period'>$msgNextWeek <b>&gt;&gt;</b></a>";
echo "<br>";
}
?> </p>
</div>
</td>
</tr>
<tr>
<td colspan="2" class="normal" bgcolor="#CCCCCC">[ <? echo "<a href=\"$PHP_SELF?id=$id&table=$table&amp;reqdate=".time()."&reset=0"."&period=jour"; ?>"><? echo $msgDay ?></a>
]&nbsp;&nbsp; [<? echo "<a href=\"$PHP_SELF?id=$id&table=$table&amp;reqdate=".time()."&reset=0"."&period=semaine"; ?>"><? echo $msgWeek ?></a>
] &nbsp;&nbsp;[ <? echo "<a href=\"$PHP_SELF?id=$id&table=$table&amp;reqdate=".time()."&reset=0"."&period=mois"; ?>"><? echo $msgMonth ?></a>
]</td>
</tr>
</table>
<p>&nbsp; </p>
<p align="center"><?php
require ("log_func.php3");
$table_log = $table;
Archive($table_log);
print("<table width=\"750\" border=\"0\" cellspacing=\"3\" cellpadding=\"0\" class=\"normal\">");
print("<tr valign=\"top\"> ");
print("<td> ");
print("<div align=\"center\">");
if ($reset) { ClearAll($table_log); } # clear fields: "country provider os wb" to take into acount modif in log_func (ie: new browser new NIC extention ...)
ProcessEmptyEntry($table_log);
$today = date("Y-m-d" , $reqdate);
$today_2 = getdate($reqdate);
if ($period == "jour") {
$valjour = HourSort($table_log, $reqdate );
$title = $msgDaysArray[$today_2[wday]]." ".$today_2[mday]." ".$msgMonthsArray[$today_2[mon]-1]." ".$today_2[year];
ProcessBarGraph($title,$valjour);
echo "<br>";
}
if ($period != "jour") {
$val = DaySort($table_log, $reqdate, $period );
ProcessBarGraph($msgDaySort,$val);
echo "<br>";
}
// $val = MonthSort($table_log, $today );
$val = MonthSort($table_log, $reqdate );
ProcessBarGraph($msgMonthSort,$val);
echo "<br>";
// $val = ClassAndCountField($table_log, "country",$today,$period);
$val = ClassAndCountField($table_log, "country",$reqdate,$period);
ProcessBarGraph($msgCountrySort,$val);
echo "<br>";
// $val = ClassAndCountField($table_log, "os",$today,$period);
$val = ClassAndCountField($table_log, "os",$reqdate,$period);
ProcessBarGraph($msgOsSort,$val);
echo "<br>";
// $val = ClassAndCountField($table_log, "wb",$today,$period);
$val = ClassAndCountField($table_log, "wb",$reqdate,$period);
ProcessBarGraph($msgBrowserSort,$val);
echo "<br>";
print("</div> ");
print("</td>");
print("<td> ");
print("<div align=\"center\">");
if ( ($period == "jour") and ($valjour["Total"]>0) ) {
$title = $msgDaysArray[$today_2[wday]]." ".$today_2[mday]." ".$msgMonthsArray[$today_2[mon]-1]." ".$today_2[year];
if ($valjour["0 h"] =="") $valjour["0 h"]="0";
if ($valjour["1 h"] =="") $valjour["1 h"]="0";
if ($valjour["2 h"] =="") $valjour["2 h"]="0";
if ($valjour["3 h"] =="") $valjour["3 h"]="0";
if ($valjour["4 h"] =="") $valjour["4 h"]="0";
if ($valjour["5 h"] =="") $valjour["5 h"]="0";
if ($valjour["6 h"] =="") $valjour["6 h"]="0";
if ($valjour["7 h"] =="") $valjour["7 h"]="0";
if ($valjour["8 h"] =="") $valjour["8 h"]="0";
if ($valjour["9 h"] =="") $valjour["9 h"]="0";
if ($valjour["10 h"] =="") $valjour["10 h"]="0";
if ($valjour["11 h"] =="") $valjour["11 h"]="0";
if ($valjour["12 h"] =="") $valjour["12 h"]="0";
if ($valjour["13 h"] =="") $valjour["13 h"]="0";
if ($valjour["14 h"] =="") $valjour["14 h"]="0";
if ($valjour["15 h"] =="") $valjour["15 h"]="0";
if ($valjour["16 h"] =="") $valjour["16 h"]="0";
if ($valjour["17 h"] =="") $valjour["17 h"]="0";
if ($valjour["18 h"] =="") $valjour["18 h"]="0";
if ($valjour["19 h"] =="") $valjour["19 h"]="0";
if ($valjour["20 h"] =="") $valjour["20 h"]="0";
if ($valjour["21 h"] =="") $valjour["21 h"]="0";
if ($valjour["22 h"] =="") $valjour["22 h"]="0";
if ($valjour["23 h"] =="") $valjour["23 h"]="0";
$sval = $valjour["0 h"].";".$valjour["1 h"].";".$valjour["2 h"].";".$valjour["3 h"].";".$valjour["4 h"].";".$valjour["5 h"].";".$valjour["6 h"].";".$valjour["7 h"].";".$valjour["8 h"].";".$valjour["9 h"].";".$valjour["10 h"].";".$valjour["11 h"].";".$valjour["12 h"].";".$valjour["13 h"].";".$valjour["14 h"].";".$valjour["15 h"].";".$valjour["16 h"].";".$valjour["17 h"].";".$valjour["18 h"].";".$valjour["19 h"].";".$valjour["20 h"].";".$valjour["21 h"].";".$valjour["22 h"].";".$valjour["23 h"];
echo "<img src=\"img2.php3?title=$title&sval=$sval\" >";
echo "<br>";
echo "<br>";
}
$val = ClassAndCountField($table_log, "request",$reqdate,$period);
ProcessBarGraph($msgRequestPage,$val);
echo "<br>";
$val = ClassAndCountField($table_log, "referer",$reqdate,$period);
ProcessBarGraph($msgRefererSort,$val);
echo "<br>";
$val = ClassAndCountField($table_log, "provider",$reqdate,$period);
ProcessBarGraph($msgProviderSort,$val);
print("</div> ");
print("</td>");
print("</tr>");
print("</table>");
?>
<center>
<? echo $msgStatBy ?> <a href="http://www.ezboo.com" target="_blank">ezBOO</a>
<? echo $msgVersion ?> </p>
</center>
</td>
</tr>
</table>
<p>&nbsp;</p>
</body>
</html>

867
Scripts/AlbumPhotos.php Normal file
View File

@@ -0,0 +1,867 @@
<?php
/*
*********************************************************************
* File : $RCSfile: AlbumPhotos.php,v $
* Version : $Revision: 1.7 $
* Modified by : $Author: jb $ ($Date: 2005/04/17 16:44:32 $)
*********************************************************************
Classe Cadre
V 0.01 : NADAL Jean-Baptiste : 02 03 2001
V 2.0: : rewrite the module to administrat it trought the web site.
*/
class AlbumPhotos {
/* Déclaraion of the members variables. */
var $root;
var $albumDir;
var $nOrdre;
var $nJour;
var $nMois;
var $nAnnee;
var $szName;
var $szPlace;
var $szDep;
/**************************************************************************
* Constructeur
**************************************************************************/
function AlbumPhotos ($Page, $SiteRoot, $AlbmDir, $numAlbum)
{
global $table_APhotos, $KeyAdmAlbm, $sql_bdd;
$this->root = $SiteRoot."/".$AlbmDir;
$this->albumDir = $AlbmDir;
$this->szNomBase = $table_APhotos;
$this->szPage = $Page;
/* How many column of image are printed. */
$this->nbImgCol = 2;
if ($numAlbum != "") {
$connect_db = jb_sql_connect (false);
$requete = "select * from $this->szNomBase where id='".
$numAlbum."'";
$resultat = mysql_db_query ($sql_bdd, $requete, $connect_db);
$row = mysql_fetch_row ($resultat);
$this->title = $row[1]." ".$row[2];
$this->Date = $row[4];
}
}
/**************************************************************************
* Retourne under a normal form the date of the album.
**************************************************************************/
function getDate()
{
return $this->Date;
}
/**************************************************************************
* Retourne the title.
**************************************************************************/
function getTitre()
{
return $this->title;
}
/**************************************************************************
* ListerAlbumPlusRecent:
* - Liste all the album of the colection.
* - The first on the top is the more recent one.
**************************************************************************/
function ListerAlbumPlusRecent ()
{
global $sql_serveur, $sql_bdd;
global $racine, $page_index;
/* on affiche l"entete du tableau. */
echo "<center><table border=0 width=\"95%\">
<tr>
<th bgcolor=\"#d5dee6\">".
"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;".
"Nom".
"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;".
"</th>
<th bgcolor=\"#d5dee6\">".
"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;".
"Place".
"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;".
"</th>
<th bgcolor=\"#d5dee6\"> d&eacute;part. </th>
<th bgcolor=\"#d5dee6\"> Date </th>
<th bgcolor=\"#d5dee6\"> Ordre </th>
<th bgcolor=\"#d5dee6\" colspan=3> Action</th>
</tr>\n";
/* On se connecte sur la base de la gallerie. */
$connect_db = jb_sql_connect (false);
$requete = "select * from $this->szNomBase order by ordre";
$resultat = mysql_db_query ($sql_bdd, $requete, $connect_db);
$i = 0;
while ($row = mysql_fetch_row ($resultat))
{
if (($i % 2) == 0)
echo"<tr bgcolor=\"#DDDDDD\" align=\"center\">\n";
else
echo "<tr bgcolor=\"#CCCCCC\" align=\"center\">\n";
/* name. */
if (strlen ($row[1]) > 13)
$nom = substr($row[1], 0, 13)."...";
else
$nom = $row[1];
echo "<td>".$nom ."</td>\n";
/* place. */
if (strlen ($row[2]) > 13)
$place = substr($row[2], 0, 13)."...";
else
$place = $row[2];
echo "<td>".$place ."</td>\n";
/* dep. */
echo "<td>".$row[3] ."</td>\n";
/* date_text. */
echo "<td>".$row[4] ."</td>\n";
/* ordre. */
echo "<td>".$row[5] ."</td>\n";
echo "<td>";
echo "
<a href=$racine/$page_index?page=$this->szPage&".
"action=modifier&elem=$row[0]>Modifier</a>
</td>
<td><a href=$racine/$page_index?page=$this->szPage&".
"action=supprimer&elem=$row[0]>Supprimer</a>".
"</td>
<td><a href=$racine/$page_index?page=$this->szPage&".
"action=afficher&elem=$row[0]>Afficher</a>";
echo "</td> </tr>\n";
$i++;
}
mysql_free_result ($resultat);
MYSQL_CLOSE;
echo "</table> </center><br><br>";
}
/**************************************************************************
* AjouterAlbumPlusRecent:
* - Add a new album photos.
*
**************************************************************************/
function AjouterAlbumPlusRecent ()
{
echo "<center><h1> Ajout d'un nouvel Album.</h1></center><br>\n";
$this->debutFormulaire ("ValideAjouter", 0);
}
/**************************************************************************
* InputJavaScript:
* - This function add javascripts functions to create a formated
* Date.
*
**************************************************************************/
function InputJavaScript ()
{
echo "<script language=\"JavaScript1.1\">
<!--
var min_year = 2000; // defines lowest year in year menu
var max_year = 2010; // defines highest year in the year menu
// make this false to prevent the weekday element from being displayed
var weekday_showing = false;
// make this true to make dayofweek return a number (0-6)
var dayofweek_returned_as_number = false;
// make this true to make month return a number (0-11)
var month_returned_as_number = true;
if (min_year <= 400)
alert(\"Minimum year must be higher than 400 for".
" this algorithm to work.\");
function changeDays(numb,date_form)
{
mth = date_form.month.selectedIndex;
sel = date_form.year.selectedIndex;
yr = date_form.year.options[sel].text;
if (numb != 1)
{
numDays = numDaysIn(mth,yr);
date_form.day.options.length = numDays;
for (i=27;i<numDays;i++) {
date_form.day.options[i].text = i+1; }
}
day = date_form.day.selectedIndex+1;
if (weekday_showing)
date_form.dayofweek.selectedIndex = ".
"getWeekDay(mth,day,yr);
}
function numDaysIn(mth,yr)
{
if (mth==3 || mth==5 || mth==8 || mth==10) return 30;
else if ((mth==1) && leapYear(yr)) return 29;
else if (mth==1) return 28;
else return 31;
}
function leapYear(yr)
{
if (((yr % 4 == 0) && yr % 100 != 0) || yr % 400 == 0)
return true;
else
return false;
}
function arr()
{
this.length=arr.arguments.length;
for (n=0;n<arr.arguments.length;n++)
this[n] = arr.arguments[n];
}
weekdays = new arr(\"Sun.\",\"Mon.\",\"Tues.\",\"Wed.\",\"Thurs.\",".
"\"Fri.\",\"Sat.\");
// *** comment out the one you don't want to use ***
//weekdays = new arr(\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",
// \"Thursday\",\"Friday\",\"Saturday\");
months = new arr(\"01\",\"02\",\"03\",\"04\",\"05\", \"06\",\"07\",".
"\"08\",\"09\",\"10\",\"11\",\"12\");
// *** comment out the one you don't want to use ***
//months = new arr(\"January\",\"February\",\"March\",\"April\",".
"\"May\",
// \"June\",\"July\",\"August\",\"September\",\"October\",".
"\"November\",\"December\");
var cur = new Date();
function getWeekDay(mth,day,yr)
{
first_day = firstDayOfYear(yr);
for (num=0;num<mth;num++)
first_day += numDaysIn(num,yr);
first_day += day-1;
return first_day%7;
}
function firstDayOfYear(yr)
{
diff = yr - 401;
return parseInt((1 + diff + (diff / 4) - (diff / 100) + ".
"(diff / 400)) % 7);
}
// fixes a Netscape 2 and 3 bug
function getFullYear(d)
{ // d is a date object
yr = d.getYear();
if (yr < 1000)
yr+=1900;
return yr;
}
function modNBtracks(pForm)
{
pForm.nAction.value = \"modifier\";
    //alert('Vous avez oublié de saisir votre nom !');
pForm.submit();
}
// -->
</script>\n";
}
// =================================================
function CreateDate()
{
echo"<select name=day size=1 onChange='changeDays(1,this.form)'>\n";
for ($i = 1; $i < 32; $i++)
if ($this->nJour == $i)
echo " <option value = $i selected> $i";
else
echo " <option value = $i> $i";
echo"</select>\n";
echo "</select><select name=month onChange='changeDays(0,this.form)'
size=1>\n";
for ($i = 1; $i < 13; $i++)
if ($this->nMois == $i)
echo "<option value = $i selected> $i";
else
echo " <option value = $i> $i";
echo"</select>\n";
echo "<select name=year onChange='changeDays(0,this.form)' size=1>\n";
for ($i = 2000; $i < 2011; $i++)
if ($this->nAnnee == $i)
echo "<option value = $i selected> $i";
else
echo " <option value = $i> $i";
echo"</select>\n";
}
// =================================================
// Cette fonction Creer un formulaire pour la création d'un nouvel élément
function debutFormulaire ($valide, $naction)
{
global $racine, $page_index;
global $sql_serveur, $sql_bdd;
$this->InputJavaScript();
//echo "nid vaut ici :$this->nID<br>";
echo "<form method=post action=$racine/$page_index?page=$this->szPage>
<input type=hidden name=elem size=32 value=\"$this->nID\" />
<input type=hidden name=action value=$valide />
<table border=\"0\" align=\"center\">
<tr>";
if ($naction == 0) {
$this->nJour = 1;
$this->nMois = 1;
$this->nAnnee = 2002;
$this->szName = "";
$this->szPlace = "";
$this->szDep = " ";
$connect_db = jb_sql_connect (false);
$requete = "select * from $this->szNomBase";
$resultat = mysql_db_query ($sql_bdd, $requete, $connect_db);
$nbElem = mysql_num_rows ($resultat);
MYSQL_CLOSE;
$this->nOrdre = $nbElem + 1;
}
// On creer les trois boites permettant de sélectionner la date
echo"<tr>\n<td> Nom : </td>\n<td>
<input type=text name='name' value=\"".$this->szName."\"".
" style='width:300px;' maxlength=50 /></td>\n</tr>";
echo"<tr>\n<td> Place : </td>\n<td>
<input type=text name='place' value=\"".$this->szPlace."\"".
" style='width:300px;' maxlength=50 /></td>\n</tr>";
echo"<tr>\n<td> D&eacute;partement : </td>\n<td>
<input type=text name='dep' value=\"".$this->szDep."\"".
" style='width:30px;' maxlength=2 /></td>\n</tr>";
echo"<tr>\n<td> Date : </td>\n<td>";
$this->CreateDate ();
echo "</td>\n</tr>";
echo"<tr>\n<td> Position : </td>\n<td>
<input type=text name='ordre' value=\"".$this->nOrdre."\"".
" style='width:30px;' maxlength=2 /></td>\n</tr>";
echo "</table><br><center><input type=submit value=valider />
</center><br></form>";
} // fin debutFormulaire
// =================================================
function InsertNewAlbum ($name, $place, $dep, $ordre,
$jour, $mois, $annee)
{
global $sql_bdd, $racine, $page_index;
/* DEbug information:
print "name: ".$name."</br>";
print "place: ".$place."</br>";
print "ordre: ".$ordre."</br>";
print "dep: ".$dep."</br>";
print "jour: ".$jour."</br>";
print "mois: ".$mois."</br>";
print "annee: ".$annee."</br>";*/
if (($name == '') || ($place == "") ||
($dep == ""))
echo "<br/><br/><center> <font size=6 color=red>
<b>Erreur !!! L'Album $name n'a pas été ajouté</b></font><br/>
certains champs sont vides</center><br><br>\n";
else {
if ($jour < 10)
$jour = "0".$jour;
if ($mois < 10)
$mois = "0".$mois;
$date = $jour."/".$mois."/".$annee;
/* On se connecte sur la base de l'album. */
$connect_db = jb_sql_connect (false);
/* Check if a previous entry had is ordrer. order should be unique.*/
$requete = "select * from ".$this->szNomBase." where ordre='$ordre'";
$resultat = mysql_db_query ($sql_bdd, $requete, $connect_db);
$nbElem = mysql_num_rows ($resultat);
if ($nbElem > 0) {
echo "<br/><br/><center> <font size=6 color=red>
<b>Erreur !!! L'Album $name n'a pas été ajouté</b>".
"</font><br/>".
"Un autre album est deja a la position: ".$ordre.
"</center><br><br>\n";
}
else {
$requete = "insert into ".$this->szNomBase .
"(name,place,ordre,dep,date_texte)".
" values ('$name','$place','$ordre','$dep','$date' )";
$resultat = mysql_db_query ($sql_bdd, $requete, $connect_db);
if ($resultat == 1) {
echo "<br><br><center><font size=4 color=red>".
"<b>L'Album $name a été Ajouté</b></font>".
"</center><br/><br/>\n";
}
else {
echo "<br><br><center><font size=6 color=red>".
"<b>BUG !!! L'Album $name n'a pas été ajouté</b>".
"</font></center><br/><br/>\n";
}
/* Get the ID of the Album. */
$requete = "select * from ".$this->szNomBase.
" where ordre='$ordre'";
$resultat = mysql_db_query ($sql_bdd, $requete, $connect_db);
$row = mysql_fetch_row ($resultat);
$id = $row[0];
/* Finaly, create root directory, where, the album store his
image. */
mkdir ($this->root."/album-".$id, 0750);
/* Create the directory for the mini images .*/
mkdir ($this->root."/album-".$id."/mini", 0750);
/* Create the directory for the normal images. */
mkdir ($this->root."/album-".$id."/normal", 0750);
MYSQL_CLOSE;
}
echo "<br/><br/>
<center><a href=$racine/$page_index?page=$this->szPage>
Retour à la page d'administration des Albums</a></center>\n";
}
}
// =================================================
// Cette fonction supprime l'élement de base passé en paramètre
function Supprimer ($num_elem)
{
global $racine, $page_index, $sql_bdd;
/* On se connecte sur la base. */
$connect_db = jb_sql_connect (false);
return -1;
$resultat = mysql_db_query ($sql_bdd,
"delete from $this->szNomBase where ".
"id=$num_elem",$connect_db);
/* Remove the images in the normal directory. */
$rootDir = $this->root."/album-".$num_elem."/normal";
if ($dh = opendir ($rootDir)) {
while (($file = readdir($dh)) !== false)
if (($file != ".") && ($file != ".."))
unlink ($rootDir."/".$file);
}
closedir($dh);
/* Remove the normal directory. */
rmdir ($rootDir);
/* Remove the mini directory. */
$rootDir = $this->root."/album-".$num_elem."/mini";
if ($dh = opendir ($rootDir)) {
while (($file = readdir($dh)) !== false)
if (($file != ".") && ($file != ".."))
unlink ($rootDir."/".$file);
}
closedir($dh);
/* Remove the mini directory. */
rmdir ($rootDir);
/* Remove the album directory. */
$rootDir = $this->root."/album-".$num_elem;
rmdir ($rootDir);
if ($resultat == 1)
echo "<br><br><center><font size=4 color=red>
<b>L' élement message $num_elem a été effacé</b>
</font></center><br/><br/>\n";
else
echo "<br><br><center><font size=6 color=red>
<b>BUG !!! suppression Impossible</b></font></center>
<br/><br/>\n";
MYSQL_CLOSE;
/* Remove all the file off this album. */
echo "<br/><br/>
<center><a href=$racine/$page_index?page=$this->szPage>
Retour à la page d'administration des Albums.</a></center>\n";
}
// =================================================
// Cette fonction supprime l'élement de base passé en paramètre
function Afficher ($num_elem)
{
global $racine, $racine, $page_index;
$rootDir = $this->root."/album-".$num_elem."/normal";
/* Print the form to add a new image on this album.*/
echo "<font size =\"-1\" face=\"arial, helvetica\">Ajouter une image:".
"</font>";
echo "<center><form enctype=\"multipart/form-data\" method=\"post\" ".
"action=\"$PHP_SELF?page=$this->szPage\">";
echo "<input type=\"hidden\" name=\"elem\" size=\"32\" ".
"value=\"$num_elem\" />";
echo "<input type=\"hidden\" name=\"action\" value=\"upload\" />";
echo "<input name=\"imgfile\" type=\"file\" size=\"40\">";
echo "<input type=\"submit\" upload=\"upload\" value=\"Go!\">";
echo "</form></center>";
echo "<hr><center><table border=2><tr>";
$numImg = 0;
/* Get the list of all the file in this directory. */
if (is_dir ($rootDir)) {
if ($dh = opendir ($rootDir)) {
while (($file = readdir($dh)) !== false) {
if (($file != ".") && ($file != "..")) {
if ($numImg == 2) {
echo "<tr>";
$numImg = 0;
}
echo "<td align=\"center\"><table><tr><td>".
"<img src=\"".$racine."/".$this->albumDir.
"/album-".$num_elem."/mini/".$file."\"></td></tr>".
"<tr><td align=\"center\">".
"<a href=$racine/$page_index?page=".
$this->szPage."&action=".
"suppImage&elem=".$num_elem."&file=".$file.">".
"Supprimer</a></td></tr></table></td>";
$numImg += 1;
}
}
closedir($dh);
}
}
echo "</tr></table></center>";
}
// =================================================
// Cette fonction transfert dans le repertoire root des images
function upload ($num_elem, $ImgFile, $File_name)
{
/* Sizes:
- normal image: 800
- mini: 170
*/
$SizeNormalized = 800;
$sizeMini = 170;
$rootDir = $this->root."/album-".$num_elem."/";
/*echo "copy de : " .$ImgFile."</br>";
echo ", vers: ".$rootDir.$File_name."</br>";*/
/* Only managed JPEG type file. */
$size = getimagesize($ImgFile);
if (($size[2] == 2) && (imagetypes() & IMG_JPG)) {
/* Get image. */
$src = imagecreatefromjpeg ($ImgFile);
$worig = $size[0];
$horig = $size[1];
//print "Size orig: worig: $worig, horig: $horig";
/* The image is a rectangle with W bigger than the H. */
if ($worig > $horig) {
/* the width will be resized to 800.*/
if ($worig > 800) {
/* we resize the image.*/
$wNew = $SizeNormalized;
$hNew = intval ($horig / ($worig / $SizeNormalized));
}
else {
$wNew = $worig;
$hNew = $horig;
}
//print "new size: $wNew, $hNew";
/* we resize the mini image.*/
$wMini = $sizeMini;
$hMini = intval ($horig / ($worig / $sizeMini));
//print "new size: $wMin, $hMin";
}
else {
/* The image is vertical. */
/* The height will be resized to 800. */
if ($horig > 800) {
/* We resize the image. */
$wNew = intval ($worig / ($horig / $SizeNormalized));
$hNew = $SizeNormalized;
}
else {
$wNew = $worig;
$hNew = $horig;
}
//print "new size: $wNew, $hNew";
/* we resize the mini image.*/
$wMini = intval ($worig / ($horig / $sizeMini));
$hMini = $sizeMini;
}
}
else {
echo "Only JPEG photos are supported sorry !!";
return;
}
/* Create the normal image resized. */
$Normal = imagecreatetruecolor ($wNew, $hNew);
imagecopyresized ($Normal, $src, 0, 0, 0, 0,
$wNew, $hNew, $worig, $horig);
/* Write the new resized file.*/
/* Get the nb photos present actualy to */
if ($handle = opendir($rootDir."/normal/")) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
$nbFiles++;
}
}
closedir($handle);
}
/* Increment the nb of files for the new one. */
$nbFiles++;
if ($nbFiles < 10)
$nbFiles = "0".$nbFiles;
$file = $rootDir."/normal/".$nbFiles.".jpg";
imagejpeg ($Normal, $file);
/* Create the Thumb image resized. */
$Mini = imagecreatetruecolor ($wMini, $hMini);
imagecopyresized ($Mini, $src, 0, 0, 0, 0,
$wMini, $hMini, $worig, $horig);
/* Write the new resized file.*/
$file = $rootDir."/mini/".$nbFiles.".jpg";
/*print "Add (mini): " . $file;*/
imagejpeg ($Mini, $file);
/* Remove the uploaded file. */
unlink ($ImgFile);
//copy ($ImgFile, $rootDir.$File_name);
/* Then print the list of the images. */
$this->Afficher ($num_elem);
}
// =================================================
// Cette fonction remove from the hard Drive of an image.
function SuppImage ($elem, $file)
{
print "Suppression de l'image: $file (gallerie: $elem)<br><br>";
$rootDir = $this->root."/album-".$elem."/";
$fileNormal = $rootDir."normal/".$file;
$fileMini = $rootDir."mini/".$file;
unlink ($fileNormal);
unlink ($fileMini);
/* Then print the list of the images. */
$this->Afficher ($elem);
}
// =================================================
// This function allow the possibility of modify the album parameters.
function Modifier ($elem)
{
global $sql_bdd;
// On se connecte sur la base de Download
$connect_db = jb_sql_connect (false);
$requete = "select * from $this->szNomBase where id='$elem'";
$resultat = mysql_db_query ($sql_bdd, $requete, $connect_db);
$this->nID = mysql_result ($resultat, 0, "id");
$this->szName = mysql_result ($resultat, 0, "name");
$this->szPlace = mysql_result ($resultat, 0, "place");
$this->szDep = mysql_result ($resultat, 0, "dep");
$this->nOrdre = mysql_result ($resultat, 0, "ordre");
/* Split the date, to get the differents fields. */
$dateTexte = mysql_result ($resultat, 0, "date_texte");
list ($this->nJour, $this->nMois, $this->nAnnee) = split('/',
$dateTexte);
echo "<center><h1> Modification de l'album: $this->szName </h1>
</center><br/>\n";
$this->debutFormulaire ("ValideModifier", 1);
mysql_free_result ($resultat);
MYSQL_CLOSE;
}
// =================================================
// This function allow the possibility of modify the album parameters.
function ValideModifierAlbum ($elem, $name, $place, $dep, $ordre,
$jour, $mois, $annee)
{
global $racine, $page_index, $sql_bdd;
if ($jour < 10)
$jour = "0".$jour;
if ($mois < 10)
$mois = "0".$mois;
$date = $jour."/".$mois."/".$annee;
/* On se connecte sur la base de l'album photos. */
$connect_db = jb_sql_connect (false);
$requete = "update $this->szNomBase set name='$name' ,place=".
"'$place',dep='$dep',ordre='$ordre',date_texte='$date' ".
"where id='$elem'";
$resultat = mysql_db_query($sql_bdd, $requete, $connect_db);
if ($resultat == 1)
echo "<br/><br/><center><font size=4 color=red>
<b>L'album $name a été Modifié</b></font>
</center><br/><br/>\n";
else
echo "<br/><br/><center><font size=6 color=red>
<b>BUG !!! L'album $name n'a pas été Modifié</b></font>
</center><br/><br/>\n";
MYSQL_CLOSE;
echo "<br/><br/>
<center><a href=$racine/$page_index?page=$this->szPage>
Retour à la page d'administration de l'album photos".
"</a></center>\n";
}
function AfficheAbumRacine ($Rep)
{
global $sql_bdd, $AlbumRoot, $racine;
$connect_db = jb_sql_connect (false);
$requete = "select * from $this->szNomBase order by ordre desc";
$resultat = mysql_db_query ($sql_bdd, $requete, $connect_db);
$i = 0;
echo "<br><center><table border=2 width=\"75%\"><tr>\n";
while ($row = mysql_fetch_row ($resultat)) {
$fichier = $racine ."/".$AlbumRoot."/album-".$row[0].
"/mini/01.jpg";
echo "<td align=\"center\">
<a href=\"$page_index?page=".
$this->szPage."&palb=$row[0]\">\n";
$commentaire = $row[1]." ".$row[2]." (".$row[3].")<br>".
"le ".$row[4];
echo "<img src=$fichier alt=$array[$i] border=0></a><br>\n
<table width=\"180\" height=\"61\">
<tr>
<td background=\"$racine/Imgs/raye10.gif\"
bgcolor=\"#5b8cc1\" valign=center>\n
<br><font color=\"white\">
<center>$commentaire</center>
</font>
</td>
</tr>
</table> </td>";
if ($i == 1) {
echo "</tr><tr>";
$i = 0;
}
else
$i = $i + 1;
}
echo "</tr></table>\n";
echo "</center> \n";
}
function AfficheAbum ($Rep)
{
global $racine, $AlbumRoot;
$monRepertoire = opendir($this->root."/album-".$Rep."/normal");
$precedent ="";
$suivant = "";
$bTrouve =false;
echo "<br><center><table border=2 width=\"75%\"><tr>\n";
$i = 0;
while ($entryName = readdir ($monRepertoire)) {
if (($entryName != ".") && ($entryName != "..")) {
$fichier = $racine ."/".$AlbumRoot."/album-".$Rep.
"/mini/".$entryName;
echo "<td align=\"center\">
<a href=\"$page_index?page=".$this->szPage.
"&palb=$Rep&img=".$entryName."\">\n
<img src=$fichier alt=$array[$i] border=0></a>";
if ($i == 1) {
echo "</tr><tr>";
$i = 0;
}
else
$i = $i + 1;
}
}
echo "</tr></table>\n";
echo "<br /><br />
<b>Clicker sur l'image pour voir la collection</b><br><br>\n";
echo "<table border=1><tr>\n";
echo "<td><a href=$page_index?page=$this->szPage&palb=racine >\n";
echo "<img src=$racine/Imgs/home.gif alt=home border=0></a></td>\n";
/*
if ($precedent == "")
echo "<td><a href=$page_index?page=album_photo&palb=racine >\n";
else
echo "<td><a href=$page_index?page=album_photo&palb=$precedent>\n";
echo "<img src=$racine/Imgs/back.gif alt=back border=0></a></td>\n";
echo "<td><a href=$page_index?page=$this->szPage&palb=racine >\n";
echo "<img src=$racine/Imgs/home.gif alt=home border=0></a></td>\n";
if ( $suivant =="")
echo "<td><a href=$page_index?page=album_photo&palb=racine >\n";
else
echo "<td><a href=$page_index?page=album_photo&palb=$suivant>\n";
echo "<img src=$racine/Imgs/forward.gif alt=suivant border=0></a></td>\n";
*/
echo "</tr></table>\n";
}
/* Affiche a specific image of a specific album. */
function AfficheImage ($Rep, $NumImg)
{
global $page_index, $racine;
global $racine, $AlbumRoot;
$ImgPath = $this->root."/album-".$Rep."/normal";
$ImgPathWeb = $racine ."/".$AlbumRoot."/album-".$Rep."/normal";
$fichier ="\"$ImgPathWeb/$NumImg\"";
echo "<img src=$fichier alt=$NumImg>\n";
$chemin = "$this->szCheminAlbum/$Rep/normal";
$monRepertoire = opendir($ImgPath);
$precedent ="";
$suivant = "";
$bTrouve =false;
while ($entryName = readdir ($monRepertoire)) {
if (($entryName !=".") && ($entryName !="..")) {
if ($bTrouve == true) {
$suivant = $entryName;
break;
}
if ($entryName == $NumImg)
$bTrouve = true;
if ($bTrouve == false)
$precedent =$entryName;
}
}
echo "<br><br><center><table border=1><tr>\n";
if ( $precedent =="")
echo "<td><a href=$page_index?page=$this->szPage&palb=$Rep>\n";
else
echo "<td><a href=$page_index?page=$this->szPage&palb=$Rep&img=$precedent >\n";
echo "<img src=$racine/Imgs/back.gif alt=back border=0></a></td>\n";
echo "<td><a href=$page_index?page=$this->szPage&palb=$Rep>\n";
echo "<img src=$racine/Imgs/home.gif alt=home border=0></a></td>\n";
if ( $suivant=="")
echo "<td><a href=$page_index?page=$this->szPage&palb=$Rep>\n";
else
echo "<td><a href=$page_index?page=$this->szPage&palb=$Rep&img=$suivant >\n";
echo "<img src=$racine/Imgs/forward.gif alt=suivant border=0></a></td>\n";
echo "</tr></table></center>\n";
}
};
?>

529
Scripts/AnnuAgenda.php Normal file
View File

@@ -0,0 +1,529 @@
<?
/***************************************************************************
AnnuAgenda.php - Classe Annu Agenda
-------------------
begin : Septembre UTC 2002
copyright : (C) 2002 by NADAL Jean-Baptiste
email : jbnadal@ifrance.com
***************************************************************************
*
* Cette classe permet de gerer les concerts sur
* le site de l'Harmonie de Montpellier-Jacou
*
***************************************************************************
* *
* 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. *
* *
***************************************************************************
* $Id: AnnuAgenda.php,v 1.7 2005/03/10 18:08:46 jb Exp $
***************************************************************************/
if (file_exists ("conf.php"))
require ("conf.php");
else
require ("./Scripts/conf.php");
class AnnuAgenda
{
// =============================================================
// Les Variables
var $szNomBase; /* nom de la base de travail. */
var $szPage; /* Nom de la page courante dans le site. */
var $nNbMorceaux;
var $tab_Morceau;
var $tab_list_select;
var $taille_tab_Morceau;
var $nID;
var $nHeure;
var $nMin;
var $nMois;
var $nJour;
var $nAnnee;
var $szVille;
var $szLieu;
var $szCommentaire;
var $szListeMorceaux;
// =============================================================
// Constructeur
function AnnuAgenda ($nomB, $page)
{
$this->szNomBase = $nomB;
$this->szPage = $page;
}
// =================================================
// Cette fonction permet de lister tous les downloads présent dans la base
function Lister ()
{
global $racine, $page_index, $sql_bdd;
/* on affiche l"entete du tablo. */
echo "<center><table border=0 width=\"95%\">
<tr>
<th bgcolor=\"#d5dee6\"> Date </th>
<th bgcolor=\"#d5dee6\"> Ville </th>
<th bgcolor=\"#d5dee6\" colspan=2>Action</th>
</tr>\n";
/* On se connecte sur la base de Annuaire. */
$connect_db = jb_sql_connect (false);
$resultat = mysql_db_query ($sql_bdd,
"select * from $this->szNomBase order by".
" date_php", $connect_db);
$i = 0;
while ($row = mysql_fetch_row ($resultat)) {
if (($i % 2) == 0)
echo"<tr bgcolor=\"#DDDDDD\">\n";
else
echo "<tr bgcolor=\"#CCCCCC\">\n";
echo "<td>$row[1] </td>\n";
echo "<td>$row[4] </td>\n";
echo "<td><a href=$racine/$page_index?page=$this->szPage".
"&nAction=modifier&elem=$row[0]>Modifier
</a></td> \n";
echo " <td><a href=$racine/$page_index?page=$this->szPage".
"&nAction=supprimer&elem=$row[0]>Supprimer
</a></td> </tr>\n";
$i++;
}
mysql_free_result ($resultat);
MYSQL_CLOSE;
echo "</table> </center><br/><br/>";
}
// =================================================
// Cette fonction supprime l'élement de base passé en paramètre
function AjouterConcert ($nbMorceaux)
{
$this->nNbMorceaux = $nbMorceaux;
echo "<center><h1> Ajout d'un nouveau Concert</h1></center><br>\n";
$this->debutFormulaire ("ValideAjouter", 0);
}
// =================================================
// Cette fonction permet de modifier un download présent dans la base
function ModifierConcert ($elem, $nbmorceaux)
{
// Les variables locales
global $sql_bdd;
// Fin des variables locales
// On se connecte sur la base de Download
$connect_db = jb_sql_connect (false);
$resultat = mysql_db_query ($sql_bdd, "select * from $this->szNomBase".
" where id='$elem'", $connect_db);
$this->nID = $elem;
$datephp = mysql_result ($resultat, 0, "date_php");
$dateFOR = getdate ($datephp);
$this->nJour = $dateFOR["mday"];
$this->nMois = $dateFOR["mon"];
$this->nAnnee = $dateFOR["year"];
$this->nHeure = $dateFOR["hours"];
$this->nMin = $dateFOR["minutes"];
if ($this->nMin < 9)
$this->nMin = "0$this->nMin";
$this->szVille = mysql_result ($resultat, 0, "ville");
$this->szLieu = mysql_result ($resultat, 0, "lieu");
$this->szCommentaire = mysql_result ($resultat, 0, "commentaire");
$this->szListeMorceaux = mysql_result ($resultat, 0, "liste_morceaux");
if ($nbmorceaux != "")
$this->nNbMorceaux = $nbmorceaux;
echo "<center><h1> Modification du Concert à $this->szVille </h1>
</center><br>\n";
$this->debutFormulaire ("ValideModifier", 2);
mysql_free_result ($resultat);
MYSQL_CLOSE;
}
// =================================================
// Cette fonction Creer un formulaire pour la création d'un nouvel élément
function debutFormulaire ($valide, $naction)
{
global $racine, $page_index;
$this->InputJavaScript();
//echo "nid vaut ici :$this->nID<br>";
echo "<form method=post action=$racine/$page_index?page=$this->szPage>
<input type=hidden name=elem size=32 value=\"$this->nID\" />
<input type=hidden name=nAction value=$valide />
<table border=\"0\" align=\"center\">
<tr>
<td align=left>Date : </td>
<td>\n";
if ($naction == 0) {
$this->nJour = 1;
$this->nMois = 1;
$this->nAnnee = 2002;
$this->nHeure = 21;
$this->nMin = "00";
$this->szVille = "";
$this->szLieu = "";
$this->szCommentaire = " ";
$this->szListeMorceaux = "";
}
// On creer les trois boites permettant de sélectionner la date
$this->CreateDate ();
echo"</td>\n</tr><tr>\n<td> Heure : </td>\n<td>
<input type=text name=heure value=$this->nHeure
style='width:30px;' maxlength=2 /> h
<input type=text name=Mins value='$this->nMin'
style='width:30px;' maxlength=2 />
</td>\n</tr><tr>\n<td> Ville : </td>\n<td>
<input type=text name=ville value='$this->szVille'
style='width:300px;' maxlength=250 />
</td>\n</tr><tr>\n<td> Lieu : </td>\n<td>
<input type=text name=lieu value='$this->szLieu'
style='width:300px;' maxlength=250 />
</td>\n</tr>\n";
if ($naction == 2) {
// Si la fonction est applelé par le mode modification
echo "<tr>\n<td> Commentaire : </td>\n<td>
<textarea name=commentaire wrap=virtual cols=40 rows=10>
$this->szCommentaire</textarea>
</td>\n</tr>\n";
$tablo = explode(";", $this->szListeMorceaux);
$cpt = 0;
foreach ($tablo as $elem) {
$this->tab_list_select[$cpt] = $elem;
$cpt++;
}
//$this->nNbMorceaux =$cpt;
if ( $this->nNbMorceaux == "")
$this->nNbMorceaux = $cpt;
echo "<tr><td colspan=2>
<br><br>
<u> Nombre de morceaux du Concert</u>&nbsp; : &nbsp;
<input type=text name=Forcenb value=$this->nNbMorceaux
style='width:30px;' maxlength=2 /> &nbsp;&nbsp;
<input type=\"button\" value=\"Modifier\"
onClick=\"modNBtracks(this.form)\" />";
echo "<br>\n<input type=hidden name=nbmorceaux
value='$this->nNbMorceaux' />";
$this->CreateTabloMorceaux ();
for ($i = 1; $i <= $this->nNbMorceaux; $i++) {
echo "<tr>\n<td> Morceau $i : </td>\n<td>\n";
$this->CreateListeMorceaux ($i, $this->tab_list_select[$i-1]);
echo "</td></tr>\n";
}
}
echo "</table><br><center><input type=submit value=valider />
</center><br></form>";
} // fin debutFormulaire
function CreateTabloMorceaux ()
{
// Les variables locales
global $sql_serveur;
global $sql_bdd;
global $sql_user;
global $sql_passwd;
global $table_repertoire;
// Fin des variables locales
// On se connecte sur la base
$connect_db = jb_sql_connect (false);
$resultat = mysql_db_query ($sql_bdd, "select * from ".
"$table_repertoire order by numero",
$connect_db);
$this->taille_tab_Morceau = 0;
while($row = mysql_fetch_array ($resultat)) {
$col_id = $row["id"];
$col_num = $row["numero"];
$col_nom = $row["nom"];
$this->tab_Morceau[] = array ($col_id, "$col_num-$col_nom");
$this->taille_tab_Morceau++;
}
}
function CreateListeMorceaux ($num, $elem)
{
echo "<select name='morceau_$num' >\n";
for ($i = 0; $i < $this->taille_tab_Morceau; $i++) {
list ($list_id, $list_nomMorceau) = $this->tab_Morceau[$i];
if ($list_id==$elem)
echo "<option value =$list_id selected> $list_nomMorceau ";
else echo "<option value = $list_id > $list_nomMorceau";
}
echo "</select>\n";
}
function CreateDate()
{
echo"<select name=day size=1 onChange='changeDays(1,this.form)'>\n";
for ($i = 1; $i < 32; $i++)
if ($this->nJour == $i)
echo " <option value = $i selected> $i";
else
echo " <option value = $i> $i";
echo"</select>\n";
echo "</select><select name=month onChange='changeDays(0,this.form)'
size=1>\n";
for ($i = 1; $i < 13; $i++)
if ($this->nMois == $i)
echo "<option value = $i selected> $i";
else
echo " <option value = $i> $i";
echo"</select>\n";
echo "<select name=year onChange='changeDays(0,this.form)' size=1>\n";
for ($i = 2000; $i < 2011; $i++)
if ($this->nAnnee == $i)
echo "<option value = $i selected> $i";
else
echo " <option value = $i> $i";
echo"</select>\n";
}
function InputJavaScript ()
{
echo "<script language=\"JavaScript1.1\">
<!--
var min_year = 2004; // defines lowest year in year menu
var max_year = 2010; // defines highest year in the year menu
// make this false to prevent the weekday element from being displayed
var weekday_showing = false;
// make this true to make dayofweek return a number (0-6)
var dayofweek_returned_as_number = false;
// make this true to make month return a number (0-11)
var month_returned_as_number = true;
if (min_year <= 400)
alert(\"Minimum year must be higher than 400 for".
" this algorithm to work.\");
function changeDays(numb,date_form)
{
mth = date_form.month.selectedIndex;
sel = date_form.year.selectedIndex;
yr = date_form.year.options[sel].text;
if (numb != 1)
{
numDays = numDaysIn(mth,yr);
date_form.day.options.length = numDays;
for (i=27;i<numDays;i++) {
date_form.day.options[i].text = i+1; }
}
day = date_form.day.selectedIndex+1;
if (weekday_showing)
date_form.dayofweek.selectedIndex = ".
"getWeekDay(mth,day,yr);
}
function numDaysIn(mth,yr)
{
if (mth==3 || mth==5 || mth==8 || mth==10) return 30;
else if ((mth==1) && leapYear(yr)) return 29;
else if (mth==1) return 28;
else return 31;
}
function leapYear(yr)
{
if (((yr % 4 == 0) && yr % 100 != 0) || yr % 400 == 0)
return true;
else
return false;
}
function arr()
{
this.length=arr.arguments.length;
for (n=0;n<arr.arguments.length;n++)
this[n] = arr.arguments[n];
}
weekdays = new arr(\"Sun.\",\"Mon.\",\"Tues.\",\"Wed.\",\"Thurs.\",".
"\"Fri.\",\"Sat.\");
// *** comment out the one you don't want to use ***
//weekdays = new arr(\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",
// \"Thursday\",\"Friday\",\"Saturday\");
months = new arr(\"01\",\"02\",\"03\",\"04\",\"05\", \"06\",\"07\",".
"\"08\",\"09\",\"10\",\"11\",\"12\");
// *** comment out the one you don't want to use ***
//months = new arr(\"January\",\"February\",\"March\",\"April\",".
"\"May\",
// \"June\",\"July\",\"August\",\"September\",\"October\",".
"\"November\",\"December\");
var cur = new Date();
function getWeekDay(mth,day,yr)
{
first_day = firstDayOfYear(yr);
for (num=0;num<mth;num++)
first_day += numDaysIn(num,yr);
first_day += day-1;
return first_day%7;
}
function firstDayOfYear(yr)
{
diff = yr - 401;
return parseInt((1 + diff + (diff / 4) - (diff / 100) + ".
"(diff / 400)) % 7);
}
// fixes a Netscape 2 and 3 bug
function getFullYear(d)
{ // d is a date object
yr = d.getYear();
if (yr < 1000)
yr+=1900;
return yr;
}
function modNBtracks(pForm)
{
pForm.nAction.value = \"modifier\";
    //alert('Vous avez oublié de saisir votre nom !');
pForm.submit();
}
// -->
</script>\n";
}
// =================================================
// Cette fonction supprime l'élement de base passé en paramètre
function Supprimer ($num_elem)
{
global $racine, $page_index, $sql_bdd;
// On se connecte sur la base
$connect_db = jb_sql_connect(false);
$resultat = mysql_db_query($sql_bdd, "delete from $this->szNomBase".
" where id=$num_elem", $connect_db);
if ($resultat == 1)
echo "<br><br><center><font size=4 color=red>
<b>L' élement message $num_elem a été effacé</b>
</font></center><br><br>\n";
else
echo "<br><br><center><font size=6 color=red>
<b>BUG !!! suppression Impossible</b></font></center>
<br><br>\n";
MYSQL_CLOSE;
echo "<br><br>
<center><a href=$racine/$page_index?page=$this->szPage>
Retour à la page d'administration de l'Agenda
</a> </center> \n";
}
// =================================================
// Cette fonction Rajoute une entree dans la base de données
function InsertConcert ($date_texte, $date_php, $heure_deb, $ville,
$lieu, $liste_morceaux, $commentaire)
{
global $racine, $page_index, $sql_bdd;
/*
echo "
date_texte : $date_texte <br>
date_php : $date_php <br>
heure_deb : $heure_deb <br>
ville : $ville <br>
lieu : $lieu <br>
liste_morceaux : $liste_morceaux <br>
commentaire : $commentaire <br>";
echo " nom : $nom <br> compo : $compositeur <br> style : $Style <br>
numero : $num<br> id : $elem";
*/
if (($date_php == '') || ($ville == "") || ($lieu == ""))
echo "<br><br><center><font size=6 color=red>
<b>BUG !!! Le Concert à $ville n'a pas été ajouté</b>
</font><br> certains champs sont vides</center><br><br>\n";
else {
// On se connecte sur la base de Download
$connect_db = jb_sql_connect(false);
$resultat = mysql_db_query($sql_bdd,"insert into $this->szNomBase".
" (date_texte, date_php, heure_deb,".
"ville,lieu, liste_morceaux,".
"commentaire ) values ('$date_texte',".
"'$date_php', '$heure_deb', '$ville',".
"'$lieu', '$liste_morceaux',".
" '$commentaire' )", $connect_db);
if ($resultat == 1)
echo "<br><br><center><font size=4 color=red>
<b>Le Concert à $ville a été Ajouté</b></font></center>
<br><br>\n";
else
echo "<br><br><center><font size=6 color=red>
<b>BUG !!! LeConcert à $ville n'a pas été ajouté</b>
</font></center><br><br>\n";
MYSQL_CLOSE;
}
echo "<br/><br/>
<center><a href=$racine/$page_index?page=$this->szPage>
Retour à la page d'administration de l'Agenda</a>
</center> \n";
}
// =================================================
// Cette fonction Rajoute une entree dans la base de données
function ValideModifierConcert ($elem, $date_texte, $date_php, $heure_deb,
$ville, $lieu, $liste_morceaux,
$commentaire)
{
global $racine, $page_index, $sql_bdd;
/* echo " nom : $nom <br> compo : $compositeur <br> style :
* $Style <br> numero : $num<br> id : $elem";
*
* On se connecte sur la base de Download
*/
$connect_db = jb_sql_connect(false);
$requete = "update $this->szNomBase".
" set date_texte='$date_texte' ,date_php=".
"'$date_php', heure_deb='$heure_deb',".
" ville='$ville', lieu='$lieu',".
"liste_morceaux='$liste_morceaux',".
" commentaire='$commentaire' where ".
"id='$elem'";
$resultat = mysql_db_query($sql_bdd, $requete, $connect_db);
if ($resultat == 1)
echo "<br><br><center><font size=4 color=red>
<b>L' élement $elem a été Modifié</b></font></center>
<br><br>\n";
else
echo "<br><br><center><font size=6 color=red>
<b>BUG !!! L' élement $elem n'a pas été Modifié</b></font>
</center><br><br>\n";
MYSQL_CLOSE;
echo "<br><br>
<center><a href=$racine/$page_index?page=$this->szPage>
Retour à la page d'administration de
l'Agenda</a> </center> \n";
}
}
?>

296
Scripts/AnnuRepertoire.php Normal file
View File

@@ -0,0 +1,296 @@
<?
/***************************************************************************
AnnuRepertoire.php - Classe Annu Repertoire
-------------------
begin : Septembre UTC 2002
copyright : (C) 2002 by NADAL Jean-Baptiste
email : jbnadal@ifrance.com
***************************************************************************
*
* Cette classe permet de gerer le répertoire de morceaux pour
* le site de l'Harmonie de Montpellier-Jacou
*
***************************************************************************
* *
* 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. *
* *
***************************************************************************
* $Id: AnnuRepertoire.php,v 1.3 2002/12/15 20:22:29 jb Exp $
***************************************************************************/
if (file_exists ("conf.php") )
require ("conf.php");
else
require ("./Scripts/conf.php");
class AnnuRepertoire
{
// =============================================================
// Les Variables
var $szNomBase; /* nom de la base de travail. */
var $szPage; /* Nom de la page courante dans le site. */
var $szNom;
var $szCompositeur;
var $nStyle;
var $nNumero;
var $nID;
// =============================================================
// Constructeur
function AnnuRepertoire ($nomB, $page)
{
$this->szNomBase = $nomB;
$this->szPage = $page;
}
// =================================================
// Cette fonction supprime l'élement de base passé en paramètre
function Supprimer ($num_elem)
{
global $racine, $page_index, $sql_bdd;
/* On se connecte sur la base. */
$connect_db = jb_sql_connect (false);
$resultat = mysql_db_query ($sql_bdd,
"delete from $this->szNomBase where ".
"id=$num_elem",$connect_db);
if ($resultat == 1)
echo "<br><br><center><font size=4 color=red>
<b>L' élement message $num_elem a été effacé</b>
</font></center><br/><br/>\n";
else
echo "<br><br><center><font size=6 color=red>
<b>BUG !!! suppression Impossible</b></font></center>
<br/><br/>\n";
MYSQL_CLOSE;
echo "<br/><br/>
<center><a href=$racine/$page_index?page=$this->szPage>
Retour à la page d'administration des Morceaux</a></center>\n";
}
// =================================================
// Cette fonction Creer un formulaire pour la création d'un nouvel élément
function debutFormulaire ($valide)
{
global $racine, $page_index;
echo "<form method=post action=$racine/$page_index?page=$this->szPage".
"&action=$valide>";
echo "<input type=hidden name=elem size=32 value=\"$this->nID\" />";
echo "Numéro : <input type=text name=num style='width:50px;'
maxlength=3 value=\"$this->nNumero\" /><br/>\n";
echo "Style : <select name=style>\n";
if ($this->nStyle == 1)
echo "<option value = 1 selected> Middle Jazz\n";
else
echo "<option value = 1> Middle Jazz\n";
if ($this->nStyle == 2)
echo "<option value = 2 selected> Variétés Françaises et ".
"Internationales\n";
else
echo "<option value = 2> Variétés Françaises et Internationales\n";
if ($this->nStyle == 20)
echo "<option value = 20 selected> Danses et Musiques ".
"Traditionnelles-Pasos-dobles et Tangos\n";
else
echo "<option value = 20> Danses et Musiques Traditionnelles-".
"Pasos-dobles et Tangos\n";
if ($this->nStyle == 21)
echo "<option value = 21 selected> Danses et Musiques ".
"Traditionnelles-Rythmes Latins\n";
else
echo "<option value = 21> Danses et Musiques Traditionnelles-".
"Rythmes Latins\n";
if ($this->nStyle == 22)
echo "<option value = 22 selected> Danses et Musiques ".
"Traditionnelles-Chansons du monde\n";
else
echo "<option value = 22> Danses et Musiques Traditionnelles-".
"Chansons du monde\n";
if ($this->nStyle == 4)
echo "<option value = 4 selected> Musique de Film, Comédie ".
"Musicale et Rock Opera\n";
else
echo "<option value = 4> Musique de Film, Comédie Musicale ".
"et Rock Opera\n";
if ($this->nStyle == 5)
echo "<option value = 5 selected> Musique Classique\n";
else
echo "<option value = 5> Musique Classique\n";
if ($this->nStyle == 10)
echo "<option value = 10 selected> Musique originale pour ".
"Orchestre d'Harmonie - Suites\n";
else
echo "<option value = 10> Musique originale pour Orchestre ".
"d'Harmonie - Suites\n";
if ($this->nStyle == 11)
echo "<option value = 11 selected> Musique originale pour ".
"Orchestre d'Harmonie - Marches et Polkas\n";
else
echo "<option value = 11> Musique originale pour Orchestre ".
"d'Harmonie - Marches et Polkas\n";
if ($this->nStyle == 12)
echo "<option value = 12 selected> Musique originale pour ".
"Orchestre d\'Harmonie - Pièces calmes\n";
else
echo "<option value = 12> Musique originale pour Orchestre ".
"d'Harmonie - Pièces calmes\n";
echo "</select><br>\n";
echo "Nom du morceau : <input type=text name=nom size=32 value=\"".
$this->szNom."\" /><br>\n";
echo "Compositeur : <input type=text name=compositeur size=32 value=\"".
$this->szCompositeur."\" /><br>\n";
}
// =================================================
// Cette fonction Ferme le Formulaire
function FinFormulaire ()
{
echo "<center><input type=submit value=valider /></center><br></form>";
}
// =================================================
// Cette fonction supprime l'élement de base passé en paramètre
function AjouterMorceau ()
{
echo " <center><h1> Ajoute d'un nouveau morceau</h1></center><br/>\n";
$this->debutFormulaire ("ValideAjouter");
$this->FinFormulaire ();
}
// =================================================
// Cette fonction permet de lister tous les downloads présent dans la base
function ListerMorceaux ()
{
global $racine, $page_index, $sql_serveur;
global $sql_bdd, $sql_user, $sql_passwd;
/* on affiche l"entete du tablo. */
echo "<center>
<table border=0 width=\"95%\">
<tr>
<th bgcolor=\"#d5dee6\"> num </th>
<th bgcolor=\"#d5dee6\">Nom</th>
<th bgcolor=\"#d5dee6\" colspan=2>Action</th>
</tr>\n";
/* On se connecte sur la base de Morceaux. */
$connect_db = jb_sql_connect (false);
$resultat = mysql_db_query ($sql_bdd,
"select * from $this->szNomBase ".
"order by numero", $connect_db);
$i = 0;
while ($row = mysql_fetch_row ($resultat)) {
if (($i%2) == 0)
echo"<tr bgcolor=\"#DDDDDD\">\n";
else
echo "<tr bgcolor=\"#CCCCCC\">\n";
echo "<td>$row[1] </td>\n";
echo "<td>$row[2] </td>\n";
echo "<td><a href=$racine/$page_index?page=$this->szPage&".
"action=modifier&elem=$row[0]>Modifier</a></td>\n";
echo " <td><a href=$racine/$page_index?page=$this->szPage&".
"action=supprimer&elem=$row[0]>Supprimer</a></td> </tr>\n";
$i++;
}
mysql_free_result ($resultat);
MYSQL_CLOSE;
echo "</table> </center><br><br>";
}
// =================================================
// Cette fonction Rajoute une entree dans la base de données
function InsertMorceau ($elem, $num, $nom, $compositeur, $Style)
{
global $racine, $page_index, $sql_bdd;
if (($nom == '') || ($compositeur == "") ||
($Style == "") || ($num == ""))
echo "<br/><br/><center> <font size=6 color=red>
<b>BUG !!! Le morceau $nom n'a pas été ajouté</b></font><br/>
certains champs sont vides</center><br><br>\n";
else {
// On se connecte sur la base de Download
$connect_db = jb_sql_connect (false);
$requete = "insert into $this->szNomBase (numero,nom,compo,style )".
" values ('$num','$nom','$compositeur','$Style' )";
$resultat = mysql_db_query ($sql_bdd, $requete, $connect_db);
if ($resultat == 1)
echo "<br><br><center><font size=4 color=red>
<b>Le morceau $nom a été Ajouté</b></font>
</center><br/><br/>\n";
else
echo "<br><br><center><font size=6 color=red>
<b>BUG !!! Le morceau $nom n'a pas été ajouté</b>
</font></center><br/><br/>\n";
MYSQL_CLOSE;
}
echo "<br/><br/>
<center><a href=$racine/$page_index?page=$this->szPage>
Retour à la page d'administration des Morceaux</a></center>\n";
}
// =================================================
// Cette fonction permet de modifier un download présent dans la base
function ModifierRepertoire ($elem)
{
global $sql_bdd;
// On se connecte sur la base de Download
$connect_db = jb_sql_connect (false);
$requete = "select * from $this->szNomBase where id='$elem'";
$resultat = mysql_db_query ($sql_bdd, $requete, $connect_db);
$this->nID = mysql_result ($resultat, 0, "id");
$this->nNumero = mysql_result ($resultat, 0, "numero");
$this->szNom = mysql_result ($resultat, 0, "nom");
$this->szCompositeur = mysql_result ($resultat, 0, "compo");
$this->nStyle = mysql_result ($resultat, 0, "style");
echo "<center><h1> Modification du morceau : $this->szNom </h1>
</center><br/>\n";
$this->debutFormulaire ("ValideModifier");
$this->FinFormulaire ();
mysql_free_result ($resultat);
MYSQL_CLOSE;
}
// =================================================
// Cette fonction Rajoute une entree dans la base de données
function ValideModifierMorceau ($elem, $num, $nom, $compositeur, $Style)
{
global $racine, $page_index, $sql_bdd;
/* On se connecte sur la base de REpertoire. */
$connect_db = jb_sql_connect (false);
$requete = "update $this->szNomBase set nom='$nom' ,compo=".
"'$compositeur',style='$Style', numero='$num' where id='$elem'";
$resultat = mysql_db_query($sql_bdd, $requete, $connect_db);
if ($resultat == 1)
echo "<br/><br/><center><font size=4 color=red>
<b>L' élement $nom a été Modifié</b></font>
</center><br/><br/>\n";
else
echo "<br/><br/><center><font size=6 color=red>
<b>BUG !!! L' élement $nom n'a pas été Modifié</b></font>
</center><br/><br/>\n";
MYSQL_CLOSE;
echo "<br/><br/>
<center><a href=$racine/$page_index?page=$this->szPage>
Retour à la page d'administration des Morceaux</a></center>\n";
}
}
?>

354
Scripts/AnnuUsers.php Normal file
View File

@@ -0,0 +1,354 @@
<?
/***************************************************************************
AnnuUsers.php - Annuaire des utilisateurs.
-------------------
begin : 13 Juillet UTC 2002
copyright : (C) 2002 by NADAL Jean-Baptiste
email : jbnadal@ifrance.com
***************************************************************************
*
* Cette classe permet de gerer la liste des utilisateur ainsi que la
* gestion de leur niveau.
*
***************************************************************************
* *
* 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. *
* *
***************************************************************************
* $Id: AnnuUsers.php,v 1.1 2002/12/15 20:51:51 jb Exp $
***************************************************************************/
if (file_exists ("conf.php"))
require ("conf.php");
else
require ("./Scripts/conf.php");
class AnnuUsers
{
/**************************************************************************
* Les Variables
**************************************************************************/
var $szNomBase; /* Nom de la base de travail. */
var $szPage; /* Nom de la page courante dans le site. */
var $nID;
var $szPseudo;
var $szPassword;
var $szemail;
var $nState;
/**************************************************************************
* Constructeur
**************************************************************************/
function AnnuUsers ($nomB, $page)
{
$this->szNomBase = $nomB;
$this->szPage = $page;
$this->nState = 0;
}
/**************************************************************************
* List all the users.
**************************************************************************/
function ListerUsers ()
{
global $sql_serveur, $sql_bdd, $sql_user, $sql_passwd;
global $USER_ADMIN, $MODERATOR;
global $racine, $page_index, $state, $pseudo;
/* on affiche l"entete du tableau. */
echo "<center><table border=0 width=\"95%\">
<tr>
<th bgcolor=\"#d5dee6\"> Pseudo </th>
<th bgcolor=\"#d5dee6\" colspan=2>Status </th>
<th bgcolor=\"#d5dee6\" colspan=2> Action</th>
</tr>\n";
/* On se connecte sur la base de Users. */
$connect_db = jb_sql_connect (false);
$requete = "select * from $this->szNomBase order by pseudo";
$resultat = mysql_db_query ($sql_bdd, $requete, $connect_db);
$i = 0;
while ($row = mysql_fetch_row ($resultat))
{
if (($i % 2) == 0)
echo"<tr bgcolor=\"#DDDDDD\" align=\"center\">\n";
else
echo "<tr bgcolor=\"#CCCCCC\" align=\"center\">\n";
echo "<td>$row[2] </td>\n";
echo "<td>Admin: ".(($row[5] & $USER_ADMIN)?"OUI":"NON")."</td>\n";
echo "<td>Modérateur: ".(($row[5]&$MODERATOR)?"OUI":"NON")."</td>\n";
echo "<td>";
if (($state & $USER_ADMIN) ||
(($state & $MODERATOR) && ($row[5] == 0)) ||
($pseudo == $row[2])) {
echo "
<a href=$racine/$page_index?page=$this->szPage&".
"action=modifier&elem=$row[0]>Modifier</a>
</td>
<td><a href=$racine/$page_index?page=$this->szPage&".
"action=supprimer&elem=$row[0]>Supprimer</a>";
}
else {
echo "--
</td><td>--";
}
echo "</td> </tr>\n";
$i++;
}
mysql_free_result ($resultat);
MYSQL_CLOSE;
echo "</table> </center><br><br>";
}
/**************************************************************************
* Add a new user.
**************************************************************************/
function AjouterUser ()
{
echo " <center><h1> Ajoute d'un nouvel utilisateur</h1></center><br/>\n";
$this->debutFormulaire ("ValideAjouter");
$this->FinFormulaire ();
}
/**************************************************************************
* Insert a new user in the database.
**************************************************************************/
function InsertUser ($elem, $pseudo, $password, $email, $state)
{
global $racine, $page_index, $sql_bdd;
if (($pseudo == '') || ($password == "") ||
($state == ""))
echo "<br/><br/><center> <font size=6 color=red>
<b>BUG !!! L'utilisateur $pseudo n'a pas été ajouté</b>
</font><br/>
certains champs sont vides</center><br><br>\n";
else {
// On se connecte sur la base de Download
$connect_db = jb_sql_connect (false);
$requete = "insert into $this->szNomBase (pseudo,password,".
"email,state) values ('$pseudo','$password','$email','$state')";
$resultat = mysql_db_query ($sql_bdd, $requete, $connect_db);
if ($resultat == 1)
echo "<br><br><center><font size=4 color=red>
<b>L'utilisateur $pseudo a été Ajouté</b></font>
</center><br/><br/>\n";
else
echo "<br><br><center><font size=6 color=red>
<b>BUG !!! L'utilisateur $pseudo n'a pas été ajouté</b>
</font></center><br/><br/>\n";
MYSQL_CLOSE;
}
echo "<br/><br/>
<center><a href=$racine/$page_index?page=$this->szPage>
Retour à la page d'administration des utilisateurs</a>
</center>\n";
}
/**************************************************************************
* Modify a user in the database.
**************************************************************************/
function ModifierUser ($elem)
{
global $sql_bdd;
/* On se connecte sur la base des Utilisaterus. */
$connect_db = jb_sql_connect (false);
$requete = "select * from $this->szNomBase where id_membre='$elem'";
$resultat = mysql_db_query ($sql_bdd, $requete, $connect_db);
$this->nID = mysql_result ($resultat, 0, "id_membre");
$this->szPseudo = mysql_result ($resultat, 0, "pseudo");
$this->szPassword = mysql_result ($resultat, 0, "password");
$this->szemail = mysql_result ($resultat, 0, "email");
$this->nState = mysql_result ($resultat, 0, "state");
echo "<center><h1> Modification de l'utilisateur : $this->szNom </h1>
</center><br/>\n";
$this->debutFormulaire ("ValideModifier");
$this->FinFormulaire ();
mysql_free_result ($resultat);
MYSQL_CLOSE;
}
/**************************************************************************
* Valid the Modification for a user in the database.
**************************************************************************/
function ValideModifierUser ($elem, $pseudo, $password,
$email, $state)
{
global $racine, $page_index, $sql_bdd;
/* On se connecte sur la base de REpertoire. */
$connect_db = jb_sql_connect (false);
$requete = "update $this->szNomBase set pseudo='$pseudo' ,password=".
"'$password',email='$email', state='$state' where id_membre='$elem'";
$resultat = mysql_db_query($sql_bdd, $requete, $connect_db);
if ($resultat == 1)
echo "<br/><br/><center><font size=4 color=red>
<b>L'utilisateur $pseudo a été Modifié</b></font>
</center><br/><br/>\n";
else
echo "<br/><br/><center><font size=6 color=red>
<b>BUG !!! L'utilisateur $pseudo n'a pas été Modifié</b></font>
</center><br/><br/>\n";
MYSQL_CLOSE;
echo "<br/><br/>
<center><a href=$racine/$page_index?page=$this->szPage>
Retour à la page d'administration des Utilisateurs</a>
</center>\n";
}
/**************************************************************************
* Erase an user in the database.
**************************************************************************/
function Supprimer ($num_elem)
{
global $racine, $page_index, $sql_bdd;
/* On se connecte sur la base. */
$connect_db = jb_sql_connect (false);
$resultat = mysql_db_query ($sql_bdd,
"delete from $this->szNomBase where ".
"id_membre=$num_elem",$connect_db);
if ($resultat == 1)
echo "<br><br><center><font size=4 color=red>
<b>L' utilisateur $num_elem a été effacé</b>
</font></center><br/><br/>\n";
else
echo "<br><br><center><font size=6 color=red>
<b>BUG !!! suppression Impossible</b></font></center>
<br/><br/>\n";
MYSQL_CLOSE;
echo "<br/><br/>
<center><a href=$racine/$page_index?page=$this->szPage>
Retour à la page d'administration des Utilisateurs</a>
</center>\n";
}
/**************************************************************************
* This function create an addition form.
**************************************************************************/
function debutFormulaire ($valide)
{
global $racine, $page_index, $state;
global $USER_ADMIN, $MODERATOR;
$this->InputJavaScript();
echo "<form method=post action=$racine/$page_index?page=$this->szPage".
"&action=$valide>
<input type=hidden name=elem size=32 value=\"$this->nID\" />
<input type=hidden name=userstate value=\"$this->nState\" />
<center>
<table width=\"60%\">
<tr>
<td width=\"50%\">
pseudo:
</td>
<td>
<input type=text name=userpseudo style='width:100px;'
maxlength=19 value=\"$this->szPseudo\" />
</td>
<tr>
<td>
password:
</td>
<td>
<input type=text name=userpassword style='width:100px;'
maxlength=19 value=\"$this->szPassword\" />
</td>
</tr>
<tr>
<td>
email:
</td>
<td>
<input type=text name=useremail style='width:200px;'
maxlength=49 value=\"$this->szemail\" />
</td>
</tr>
";
if ($state & $USER_ADMIN) {
echo "
<tr>
<td>
Niveau:
</td>
<td>
<table><tr><td witdth=\"50%\">
Administrateur: </td><td>
<input type=\"checkbox\" name=\"admin\"
value=\"$USER_ADMIN\" onClick='changeState(this.form)'";
if ($this->nState & $USER_ADMIN)
echo " checked ";
echo " />
</td></tr><tr><td>
Mod&eacute;rateur: </td><td>
<input type=\"checkbox\" name=\"moderateur\"
value=\"$MODERATOR\" onClick='changeState(this.form)'";
if ($this->nState & $MODERATOR)
echo " checked ";
echo " />
</td></tr></table>
</td>
</tr>
";
}
echo "
</table>
</center>
<br/>
";
}
/**************************************************************************
* This function close the form.
**************************************************************************/
function FinFormulaire ()
{
echo "<center><input type=submit value=valider /></center><br></form>";
}
/**************************************************************************
* JavaScript function used to set the state variable.
**************************************************************************/
function InputJavaScript ()
{
echo "<script language=\"JavaScript1.1\">
<!--
function changeState(user_form)
{
var state = 0;
var mod = 0, adm = 0;
if (user_form.moderateur.checked)
mod = Number (user_form.moderateur.value);
if (user_form.admin.checked)
adm = Number (user_form.admin.value);
state = adm + mod;
user_form.userstate.value = state;
//alert(user_form.state.value);
}
// -->
</script>\n";
}
}
?>

470
Scripts/Annuaire.php Normal file
View File

@@ -0,0 +1,470 @@
<?
/***************************************************************************
Annuaire.php - library of admin functions
-------------------
begin : 05 Aout UTC 2001
copyright : (C) 2002 by NADAL Jean-Baptiste
email : jbnadal@ifrance.com
***************************************************************************
*
* Cette classe permet de gerer un livre d'or pour le site de l'Harmonie
* de Montpellier-Jacou
*
***************************************************************************
* *
* 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. *
* *
***************************************************************************
* $Id: Annuaire.php,v 1.4 2002/12/15 20:22:29 jb Exp $
***************************************************************************/
if (file_exists("conf.php"))
require("conf.php");
else
require("./Scripts/conf.php");
class Annuaire
{
// =============================================================
// Les Variables
var $szNomBase; /* Nom de la base de travail. */
var $szPage; /* Nom de la page courante dans le site */
var $szNom;
var $szURL;
var $szDescription;
var $nbHits;
var $nID;
// =============================================================
// Constructeur
function Annuaire($nomB, $page)
{
$this->szNomBase = $nomB;
$this->szPage = $page;
}
// =================================================
// Cette fonction supprime l'élement de base passé en paramètre
function Supprimer ($num_elem)
{
global $sql_bdd;
// On se connecte sur la base
$connect_db = jb_sql_connect (false);
$resultat = mysql_db_query ($sql_bdd,"delete from $this->szNomBase".
" where id=$num_elem",$connect_db);
if ($resultat == 1)
echo "<br><br><center><font size=4 color=red>
<b>L' élement message $num_elem a été effacé</b></font>
</center><br><br>\n";
else
echo "<br><br><center><font size=6 color=red>
<b>BUG !!! suppression Impossible</b></font></center><br>
<br>\n";
MYSQL_CLOSE;
}
// =================================================
// Cette fonction Creer un formulaire pour la création d'un nouvel élément
function debutFormulaire ($valide)
{
global $racine, $page_index;
echo "<form method=post action=$racine/$page_index?page=$this->szPage&".
"action=$valide>";
echo "<script language=\"javascript\">\n";
echo "document.write(\"<input type=hidden name=datecourante ".
"value=\"+datelo+\" />\")\n";
echo "</script>\n";
echo "<input type=hidden name=elem size=32 value=\"$this->nID\" />";
}
// =================================================
// Cette fonction Ferme le Formulaire
function FinFormulaire ()
{
echo "<center><input type=submit value=valider /></center><br></form>";
}
// =================================================
// Cette fonction retourn les champs input pour un ajout
function GetChampsInputAnnuaire ()
{
echo "Nom : <input type=text name=nom size=32 value=\"$this->szNom\" />".
"<br>\n";
echo "Url : <input type=text name=url size=32 value=\"$this->szURL\" />".
"<br>\n";
echo "Description : <br><textarea name=description wrap=virtual ".
"cols=40 rows=3>$this->szDescription</textarea><br><br>";
}
// =================================================
// Cette fonction permet de lister tous les élément présents dans la base
function Lister ()
{
global $racine, $page_index, $sql_bdd;
// on affiche l"entete du tablo
echo "<center><table border=0 width=\"95%\">
<tr>
<th bgcolor=\"#d5dee6\"> ID </th>
<th bgcolor=\"#d5dee6\">Nom</th>
<th bgcolor=\"#d5dee6\" colspan=2>Action</th>
</tr>\n";
// On se connecte sur la base de Download
$connect_db = jb_sql_connect (false);
$resultat = mysql_db_query ($sql_bdd,"select * from $this->szNomBase ",
$connect_db);
$i = 0;
while ($row = mysql_fetch_row ($resultat)) {
if (($i % 2) == 0)
echo"<tr bgcolor=\"#DDDDDD\">\n";
else
echo "<tr bgcolor=\"#CCCCCC\">\n";
echo "<td>$row[0] </td>\n";
echo "<td>$row[1] </td>\n";
echo "<td><a href=$racine/$page_index?page=$this->szPage&".
"action=modifier&elem=$row[0]>Modifier</a></td>\n";
echo " <td><a href=$racine/$page_index?page=$this->szPage&".
"action=supprimer&elem=$row[0]>Supprimer</a></td>
</tr>\n";
$i++;
}
echo "</table> </center><br><br>";
mysql_free_result ($resultat);
}
} /* fin de la class Annuaire */
/**************************************************************************
*
*
**************************************************************************/
class AnnuDownload extends Annuaire
{
// =============================================================
// Les Variables
var $szURLmini;
var $nbHitsmini;
var $szSizeUrl;
var $szSizeUrl_mini;
// =============================================================
// Constructeur
function AnnuDownload ($nomBase, $page)
{
$this->Annuaire ($nomBase, $page);
}
// =================================================
// Cette fonction retourn les champs input pour un ajout
function GetChampsInputDownload ()
{
$this->GetChampsInputAnnuaire ();
echo "URL du mini <input type=text name=urlmini size=32 ".
"value=\"$this->szURLmini\" /><br/>\n";
echo "Taille de l'URL <input type=text name=sizeurl size=32".
" value=\"$this->szSizeUrl\" /><br>\n";
echo "Taille de l'URL mini <input type=text name=sizeurlmini".
" size=32 value=\" $this->szSizeUrl_mini\" /><br>\n";
}
// =================================================
// Cette fonction supprime l'élement de base passé en paramètre
function AjouterDownload ()
{
echo " <center><h1> Ajoute d'un nouveau download</h1></center><br>\n";
$this->debutFormulaire ("ValideAjouter");
echo "<center>\n";
$this->GetChampsInputDownload ();
echo "</center>\n";
$this->FinFormulaire ();
}
// =================================================
// Cette fonction Rajoute une entree dans la base de données
function InsertDownload ($nom, $url, $description, $urlmini, $sizeurl,
$sizeurlmini)
{
global $sql_serveur, $sql_bdd, $sql_user, $sql_passwd;
global $racine, $page_index;
if (($nom == '') || ($url == ""))
echo "<br><br><center><font size=6 color=red>
<b>BUG !!! Le morceau $nom n'a pas été ajouté</b></font>
<br> certains champs sont vides</center><br><br>\n";
else {
// On se connecte sur la base de Download
$requete = "insert into $this->szNomBase (nom,url,commentaire,".
"url_mini, sizeUrl,sizeUrlMini ) values ('$nom','$url',".
"'$description','$urlmini','$sizeurl','$sizeurlmini')";
$connect_db = jb_sql_connect (false);
$resultat = mysql_db_query ($sql_bdd, $requete, $connect_db);
if ($resultat == 1)
echo "<br><br><center><font size=4 color=red>
<b>L' élement $nom a été Ajouté</b></font></center><br>
<br>\n";
else
echo "<br><br><center><font size=6 color=red>
<b>BUG !!! L' élement $nom n'a pas été ajouté</b></font>
</center><br><br>\n";
MYSQL_CLOSE;
}
echo "<br><br> <center><a href=$racine/$page_index?page=$this->szPage>".
"Retour à la page d'administration des downloads
</a></center> \n";
}
// =================================================
// Cette fonction Rajoute une entree dans la base de données
function ValideModifierDownload ($nom, $url, $description, $urlmini,
$sizeurl, $sizeurlmini, $id)
{
global $racine, $page_index, $sql_bdd;
/* On se connecte sur la base de Download. */
$requete = "update $this->szNomBase set nom='$nom' ,url='$url',".
"commentaire='$description',url_mini='$urlmini', sizeUrl=".
"'$sizeurl',sizeUrlMini='$sizeurlmini'  where id='$id' ";
$connect_db = jb_sql_connect (false);
$resultat = mysql_db_query ($sql_bdd, $requete, $connect_db);
if ($resultat == 1)
echo "<br><br><center><font size=4 color=red>
<b>L' élement $nom a été Modifié</b></font></center><br>
<br>\n";
else
echo "<br><br><center><font size=6 color=red>
<b>BUG !!! L' élement $nom n'a pas été Modifié</b></font>
</center><br><br>\n";
MYSQL_CLOSE;
echo "<br><br>
<center><a href=$racine/$page_index?page=$this->szPage>".
"Retour à la page d'administration des".
" download</a></center> \n";
}
// =================================================
// Cette fonction permet de modifier un download présent dans la base
function ModifierDownload ($elem)
{
global $sql_bdd;
// On se connecte sur la base de Download
$requete = "select * from $this->szNomBase where id='$elem' ";
$connect_db = jb_sql_connect (false);
$resultat = mysql_db_query ($sql_bdd, $requete, $connect_db);
$this->nID = mysql_result ($resultat, 0, "id");
$this->szNom = mysql_result ($resultat, 0, "nom");
$this->szURL = mysql_result ($resultat, 0, "url");
$this->szDescription = mysql_result ($resultat, 0, "commentaire");
$this->szURLmini = mysql_result ($resultat, 0, "url_mini");
$this->szSizeUrl = mysql_result ($resultat, 0, "sizeurl");
$this->szSizeUrl_mini = mysql_result ($resultat, 0, "sizeurlmini");
echo "<center><h1> Modification du download : $this->szNom </h1>
</center><br>\n";
$this->debutFormulaire ("ValideModifier");
echo "<center>\n";
$this->GetChampsInputDownload ();
echo "</center>\n";
$this->FinFormulaire ();
mysql_free_result ($resultat);
}
// =================================================
// Cette fonction permet d'afficher sous forme de tablo les downloads
function AfficheDownload($intro)
{
// Les variables locales
global $sql_bdd;
global $racine;
// Fin des variables locales
// On se connecte sur la base de Annuaire
$connect_db = jb_sql_connect(false);
// on affiche l"entete du tablo
echo "$intro\n <center><table width=\"95%\" border=0>
<tr>
<th bgcolor=\"#d5dee6\">Nom du morceau </th>
<th bgcolor=\"#d5dee6\">Lieu d'enregistrement<br>du concert</th>
<th bgcolor=\"#d5dee6\" colspan=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Morceaux&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br><font size=-1>
complet &nbsp;&nbsp;&nbsp; extrait</font></th>
</tr>\n";
$resultat = mysql_db_query($sql_bdd,"select * from $this->szNomBase ",
$connect_db);
$i = 0;
while ($row = mysql_fetch_row($resultat))
{
if (($i % 2) == 0)
echo"<tr bgcolor=\"#DDDDDD\">\n";
else
echo "<tr bgcolor=\"#CCCCCC\">\n";
echo "<td>$row[1] </td>\n";
echo "<td>$row[3] </td>\n";
echo "<td align=center><a href=\"$racine/Scripts/download.php?".
"id=$row[0]&mode=normal\"> <img src=Imgs/download_small.gif ".
"alt=download border=0> </a> <br> ($row[7]) </td> \n";
echo "<td align=center><a href=\"$racine/Scripts/download.php?".
"id=$row[0]&mode=extrait\"> <img src=Imgs/download_small.gif ".
"alt=download border=0> </a><br> ($row[8])</td> </tr>\n";
echo "<td bgcolor=\"#d5dee6\">&nbsp; </td>\n <td ".
"bgcolor=\"#d5dee6\" align=right><b> <font size=-1> ".
"nb téléchargement </font> : </b> </td>\n";
echo "<td bgcolor=\"#d5dee6\" align=center>$row[4] </td>\n ".
"<td bgcolor=\"#d5dee6\" align=center> $row[6] </td>\n";
$i++;
} // fin while
echo "</table> </center><br><br>";
mysql_free_result($resultat);
}
} // fin de la class AnnuDownload
/**************************************************************************
*
*
**************************************************************************/
class AnnuLinks extends Annuaire
{
// =============================================================
// Les Variables
var $nType;
// =============================================================
// Constructeur
function AnnuLinks ($nomB,$page)
{
$this->szNomBase = $nomB;
$this->szPage = $page;
}
// =============================================================
function ValideModifierLiens ($elem, $nom, $url, $description, $type)
{
global $sql_serveur, $sql_bdd, $sql_user, $sql_passwd;
global $racine, $page_index;
/* On se connecte sur la base de Download. */
$connect_db = mysql_connect ($sql_serveur, $sql_user, $sql_passwd)
or die("Impossible de se connecter");
$requete = "update $this->szNomBase set nom='$nom' ,url='$url',".
"commentaire='$description',type='$type'  where id='$elem' ";
$resultat = mysql_db_query ($sql_bdd, $requete, $connect_db);
if ($resultat == 1)
echo "<br><br><center><font size=4 color=red>
<b>L' élement $nom a été Modifié</b></font></center><br>
<br>\n";
else
echo "<br><br><center><font size=6 color=red>
<b>BUG !!! L' élement $nom n'a pas été Modifié</b></font>
</center><br><br>\n";
MYSQL_CLOSE;
echo "<br><br>
<center><a href=$racine/$page_index?page=$this->szPage>".
"Retour à la page d'administration des liens</a>
</center> \n";
}
// =============================================================
function ModifierLiens ($elem)
{
global $sql_bdd;
/* On se connecte sur la base de Download. */
$connect_db = jb_sql_connect (false);
$requete = "select * from $this->szNomBase where id='$elem' ";
$resultat = mysql_db_query ($sql_bdd, $requete, $connect_db);
$this->nID = mysql_result ($resultat, 0, "id");
$this->szNom = mysql_result ($resultat, 0, "nom");
$this->szURL = mysql_result ($resultat, 0, "url");
$this->szDescription = mysql_result ($resultat,0, "commentaire");
$this->nType = mysql_result ($resultat, 0, "type");
echo "<center><h1> Modification du liens : $this->szNom </h1>
</center><br>\n";
$this->debutFormulaire ("ValideModifier");
echo "<center>\n";
$this->GetChampsInputAnnuaire ();
$this->GetChampsInputLiens ();
echo "</center>\n";
$this->FinFormulaire ();
mysql_free_result ($resultat);
}
// =============================================================
function InsertLiens ($nom, $url, $description, $type)
{
global $racine, $page_index, $sql_bdd;
if (($nom == '') || ($url == ""))
echo "<br/><br/><center><font size=6 color=red>
<b>BUG !!! Le morceau $nom n'a pas été ajouté</b>
</font><br> certains champs sont vides</center><br><br>\n";
else {
/* On se connecte sur la base de Download. */
$connect_db = jb_sql_connect (false);
$requete = "insert into $this->szNomBase (nom,url,commentaire,".
"type) values ('$nom','$url','$description','$type')";
$resultat = mysql_db_query ($sql_bdd, $requete, $connect_db);
if ($resultat == 1)
echo "<br><br><center><font size=4 color=red>
<b>L' élement $nom a été Ajouté</b></font></center>
<br><br>\n";
else
echo "<br><br><center><font size=6 color=red>
<b>BUG !!! L' élement $nom n'a pas été ajouté</b>
</font></center><br><br>\n";
MYSQL_CLOSE;
}
echo "<br><br>
<center><a href=$racine/$page_index?page=$this->szPage>".
"Retour à la page d'administration des liens</a>
</center> \n";
}
// =============================================================
function AjouterLiens ()
{
echo "<center><h1> Ajout d'un nouveau Lien</h1></center><br>\n";
$this->debutFormulaire ("ValideAjouter");
echo "<center>\n";
$this->GetChampsInputAnnuaire ();
$this->GetChampsInputLiens ();
echo "</center>\n";
$this->FinFormulaire ();
}
// =============================================================
function GetChampsInputLiens ()
{
echo "Type : <select name=type>\n";
if ($this->nType == 1)
echo "<option value = 1 selected> Orchestres d'Harmonie\n";
else echo "<option value = 1> Orchestres d'Harmonie\n";
if ($this->nType == 2)
echo "<option value = 2 selected> Sites sur la musique\n";
else echo "<option value = 2> Sites sur la musique\n";
if ($this->nType == 3)
echo "<option value = 3 selected> Autour de Montpellier\n";
else echo "<option value = 3>Autour de Montpellier\n";
echo "</select><br><br>\n";
}
}
?>

208
Scripts/Archi.php Normal file
View File

@@ -0,0 +1,208 @@
<?
/***************************************************************************
Archi.php - Classe Cadre
-------------------
begin : Septembre UTC 2000
copyright : (C) 2002 by NADAL Jean-Baptiste
email : jbnadal@ifrance.com
***************************************************************************
*
* Cette classe est l'ossature du Site. elle se charge de
* dessiner la structure du site.
*
***************************************************************************
* *
* 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. *
* *
***************************************************************************
* $Id: Archi.php,v 1.6 2002/12/14 19:59:27 jb Exp $
***************************************************************************/
$topdir = "./";
class Archi {
// Variables
var $pCompteur;
var $szDateduJour;
var $version;
var $FichierHaut;
// =============================================================
// Les Fonctions
// =============================================================
// Constructeur de la classe
function Archi ($nomF, $szCpt, $szDate)
{
$this->FichierHaut = $nomF;
$this->pCompteur = $szCpt;
$this->szDateduJour = $szDate;
}
// =============================================================
// Cette fonction affiche la partie ghaute du document Html
// c'est a dire les fonction en JavaScript, ainsi que le bandeau du haaut
// et la barre des menus.
function AffichePartieHaut($nTypeCompteur, $nAudebut)
{
global $racine;
echo "
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\"/>
<meta http-equiv=\"Content-Language\" content=\"fr-FR\" />
<meta name=\"robots\" content=\"index, nofollow\" />
<meta name=\"rating\" content=\"General\" />
<meta name=\"distribution\" content=\"Global\" />
<meta name=\"revisit-after\" content=\"1 month\" />
<meta name=\"owner\" content=\"ohmj@fr.st\" />
<meta name=\"copyright\" content=\"2002\" />
<meta name=\"description\" content=\"Site de l'Harmonie de
Montpellier-Jacou dans l'hérault (FRANCE)\" />
<meta name=\"keywords\" content=\"musique, harmonie, ajem, jacou,
montpellier, hautbois, basson, instrument\" />
<link rel=\"shortcut icon\"
href=\"http://ohmj.mad-troll.com/ohmj/ohmj.gif\"/>
<title>Site de l'Harmonie de Montpellier-Jacou</title>
<link rel=\"stylesheet\" type=\"text/css\"
href=\"./themes/ohmj1/ohmj1.css\" />
<!--<script language=\"Javascript\" src=\"./themes/ohmj1/ohmj1.js\"
type=\"text/javascript\" />-->";
echo "<script language=\"Javascript\" type=\"text/javascript\">\n";
echo "
<!--
function DonneDate()
{
// On recupere les donnees sur la date courante qui nous interresse
var pMaintenant = new Date();
var pJour = pMaintenant.getDate();
pJour = pJour > 9?pJour:\"0\" + pJour;
var pMois = pMaintenant.getMonth()+1;
pMois = pMois > 9?pMois:\"0\" + pMois;
var pAnnee = pMaintenant.getFullYear();
var pHeure = pMaintenant.getHours();
pHeure = pHeure > 9?pHeure:\"0\" + pHeure;
var pMinute = pMaintenant.getMinutes();
pMinute = pMinute > 9?pMinute:\"0\" + pMinute;
var resultat =\"\";
// Puis on formate la date
resultat = \"\\\"\"+ pJour+\" /\"+pMois+\" /\"+pAnnee+\" ".
" \"+pHeure+\":\"+pMinute+\"\\\"\";
return resultat;
}\n-->";
echo "</script>\n";
echo "</head>\n";
echo "<body background=\"".$racine."/Imgs/fond.gif\" ";
/* bgproperties=\"fixed\"\n";*/
if ( $nAudebut == 1)
echo " onLoad=window.setTimeout(\"supp_bandeau()\",4000) \n>";
else
echo ">\n";
$this->Affichebandeau();
include ($topdir."$this->FichierHaut");
}
// =============================================================
// Cette fonction génère et affiche le bandeau gris en haut du site
function Affichebandeau()
{
global $numVersion;
echo "<center>
<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"
border=\"0\">
<tbody>
<tr>
<td bgcolor=\"#e7e7e7\"><img height=\"1\" alt=\"\"
src=\"".$racine."Imgs/un_pixel_blanc.gif\"
width=\"1\"/></td></tr>
</tbody></table>
<table cellspacing=\"0\" cellpadding=\"1\" width=\"100%\"
border=\"0\">
<tbody>
<tr>
<td valign=\"middle\" align=\"left\" width=\"55%\"
bgcolor=\"#c0c0c0\">
<font face=\"helvetica,verdana\" color=\"#505050\"
size=\"-2\">\n";
echo "LibOhmj v$numVersion - $this->szDateduJour - Déjà
$this->pCompteur visiteurs. </font></td>
<td valign=\"middle\" align=\"center\" bgcolor=\"#c0c0c0\">
<font face=\"helvetica,verdana\" color=\"#505050\" size=\"-2\">
<script language=\"Javascript\" type=\"text/javascript\">
<!--
nav = navigator.appName.substring(0,3);
ver = navigator.appVersion.substring(0,1)
function addFav()
{
if (nav == \"Mic\" && ver >= 4) {
url_site=\"http://www.ohmj.fr.st\";
titre_site = \"Site de l'Harmonie de Montpellier-Jacou\";
document.write('<a href=\"#\" onClick=\"window.external.".
"AddFavorite(url_site, titre_site);return(false);\">".
"Cliquez ici pour mettre ce site dans vos favoris</a>')
}
else {
document.write('Faites CTRL+D pour ajouter ce site".
" &agrave; vos favoris!')
}
}
addFav();
-->
</script></font></td> \n";
echo "</tr></tbody></table>
<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"
border=\"0\">
<tbody>
<tr>
<td valign=\"middle\" bgcolor=\"#6f6f6f\">
<img height=\"1\" alt=\"\" src=\"".
$racine."Imgs/un_pixel_blanc.gif\"
width=\"1\"/></td></tr>
<tr>
<td bgcolor=\"#e7e7e7\">
<img height=\"1\" alt=\"\" src=\"".
$racine."Imgs/un_pixel_blanc.gif\"
width=\"1\"/></td></tr></tbody>
</table>\n";
}
// =============================================================
// Cette fonction affiche la partie basse du document Html
// c'est a dire les bas de page et les fins de Headers
function AffichePartieBas()
{
global $startTime;
global $VuePage;
$currentTime = microtime();
$VuePage = TRUE;
echo "</td></tr>
<tr>
<td valign=\"middle\" align=\"center\" bgcolor=\"#f2ae26\">
&nbsp;
</td>
<td valign=\"top\" align=\"center\" width=\"18\"
style=\"background : url(/ohmj/Imgs/ombre_centre.gif)\"
height=\"25\">&nbsp;</td>
<td valign=\"middle\" align=\"center\" bgcolor=\"#ffffff\">&nbsp;
<br />
Cette page a été générée en ".($currentTime - $startTime)."s
et est peut-être conforme
<a href=\"http://validator.w3.org/check/referer\">xhtml 1.0</a>.
<br/>
</td></tr>
</tbody></table></td></tr></tbody></table></center>
</center>
</body>
</html>\n";
}
} // fin de la classe
?>

23
Scripts/Cookie.php Normal file
View File

@@ -0,0 +1,23 @@
<?php
/*
*********************************************************************
File : $RCSfile: Cookie.php,v $
Version : $Revision: 1.2 $
Modified by : $Author: jb $ ($Date: 2002/12/14 19:59:27 $)
*********************************************************************
*/
if ( $page == "Pose") {
$maintenant=getdate(time());
$jour = $maintenant["mday"];
$mois = $maintenant["mon"];
$annee = $maintenant["year"]+10;
$dateUnix = mktime (0,0,0,$mois, $jour, $annee);
}
else {
$dateUnix = time() - 3600;
}
//echo "<html> <br> $jour / $mois / $annee <br> $dateUnix";
setcookie("adminCOO", "oui", $dateUnix);
header("Location:homeAdmin.php?id=$id");
?>

91
Scripts/ErreurConnect.php Normal file
View File

@@ -0,0 +1,91 @@
<?php
/***************************************************************************
ErreurConnect.php - Error connection management
-------------------
begin : November 19 UTC 2001
copyright : (C) 2002 by NADAL Jean-Baptiste
email : jbnadal@ifrance.com
***************************************************************************
*
*
*
***************************************************************************
* *
* 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. *
* *
***************************************************************************
* $Id: ErreurConnect.php,v 1.2 2002/07/24 23:34:59 jb Exp $
***************************************************************************/
/***************************************************************************
*
* Cette fonction permet de se connecter à la base de donnée du site.
* Elle retourne l'identifiant de connection pour que le programmeur puisse
* ensuite effectuer des requètes sur le site.
* Son avantage permet d'abstraire le type serveur sql present en arrirère
* plan.
* Elle permet égalment d'afficher un cadre avvec un message d'excuse en cas
* de non disponiblité du serveur sql.
*
***************************************************************************/
function jb_sql_connect ($bunderCadre)
{
global $sql_serveur;
global $sql_user;
global $sql_passwd;
$connect_db = @mysql_connect ($sql_serveur, $sql_user, $sql_passwd)
or die(AfficheErreur ($bunderCadre));
return $connect_db;
}
/***************************************************************************
*
*
***************************************************************************/
function AfficheErreur ($bunderCadre)
{
global $racine;
$szData="";
/* On définit le texte d'excuse */
$szTexte = "<br><br><center>
<table width=\"95%\" ><tr>
<td>
<img src=$racine/Imgs/panneau.gif alt=panneau >
</td>
<td >
<p class=\"cadre\">
<b>Impossible de se connecter sur le serveur sql du site.<br> </b>
Les administrateurs travaillent surement sur celui-ci.<br>
Vous ne pourrez pas visiter le site correctement, nous vous
conseillons de revenir dans un moment. <br>
Désolé pour le désagrément causé par cette intéruption de service.
<br><br>
<b> l'équipe web du site de l'Harmonie de Montplellier-Jacou</b></p>
</td>
</tr></table></center><br><br>";
if ($bunderCadre) {
/* Si c'est true ? */
if ($bunderCadre == 1) {
$pMonCadre = new Cadre ("Erreur", $szTexte, date ("d/m/Y H:h:i"));
$szData = $pMonCadre->affiche_CadreHaut (false);
$szData .= $szTexte;
$szData .= $pMonCadre->affiche_CadreBas(false);
}
/* Si c'est les stats ? */
else if ($bunderCadre == "3")
$szData = "";
}
else
$szData = $szTexte;
return $szData;
}
?>

104
Scripts/Haut.html Normal file
View File

@@ -0,0 +1,104 @@
<!--
*********************************************************************
File : $RCSfile: Haut.html,v $
Version : $Revision: 1.8 $
Modified by : $Author: jb $ ($Date: 2002/12/14 19:59:27 $)
*********************************************************************
-->
<center>
<table cellspacing="0" cellpadding="3" width="85%" border="0">
<tbody>
<tr>
<td valign="middle" align="center" bgcolor="#4a5d9c">
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td valign="top" align="left" width="1%" bgcolor="#f7ad21">
<img width="110" height="83" src="/ohmj/Imgs/logoOHMJ.png"
border="0" alt="O.H.M.J."/>
</td>
<td valign="top" align="center" width="1%" height="80">
<img src="/ohmj/Imgs/top.gif" border="0" alt=""/></td>
<td valign="middle" align="right" width="98%"
bgcolor="#f2ae26">
<table cellspacing="0"cellpadding="0"
width="100%" border="0">
<tbody>
<tr>
<td valign="middle" align="center" bgcolor="#f2ae26">
<a href="http://www.ville-jacou.fr">
<img border="0"
src="/ohmj/Imgs/logoJacou.png"
alt="Jacou" height="65" width="99"/> </a>
</td>
<td valign="middle" align="center" bgcolor="#f2ae26">
<img width="326" height="84"
src="/ohmj/Imgs/titre.gif" border="0"
alt="Harmonie de Montpellier-Jacou"/>
</td>
<td valign="middle" align="center" bgcolor="#f2ae26">
<a href="http://www.montpellier-agglo.com">
<img border="0"
src="/ohmj/Imgs/logoMontpellier.jpg"
alt="Montpellier" height="39" width="41"
align="right"/></a>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td valign="top" align="center" bgcolor="#f2ae26">&nbsp;</td>
<td valign="top" align="left">
<img src="/ohmj/Imgs/center.gif" border="0" alt=""/></td>
<td valign="top" align="center"
style=" background :
url(/ohmj/Imgs/ombre_haut_bas_main.gif)" >
&nbsp;</td></tr>
<tr>
<td valign="top" align="center" bgcolor="#f2ae26">
<table cellspacing="0" cellpadding="1" width="140"
border="0">
<tbody>
<tr>
<td valign="middle" align="right"
bgcolor="#f2ae26" colspan="2">
<table cellspacing="0" cellpadding="0" width="100%"
border="0">
<tbody>
<tr>
<td valign="middle" align="left">
<font face="helvetica,verdana"
color="#000000" size="-1">
<b>Menu</b></font>
</td>
</tr></tbody></table>
<hr />
</td></tr>
<?
printGeneralMenu ();
?>
</tbody></table>
<br /><br />
<table cellspacing="0" cellpadding="1" width="95%"
border="0">
<tbody>
</tbody></table>
<br /><br />
<?
printAuthentification ();
?>
<br /><br />
<?
printAdministrationMenu ();
?>
</td>
<td valign="top" align="center" width="18"
style="background : url(/ohmj/Imgs/ombre_centre.gif)"
height="600">&nbsp;</td>
<td valign="top" align="center" bgcolor="#ffffff" >
<br /><br />
<br />

299
Scripts/HautAdmin.html Executable file
View File

@@ -0,0 +1,299 @@
<!-- *********************************************************************
File : $RCSfile: HautAdmin.html,v $
Version : $Revision: 1.2 $
Modified by : $Author: jb $ ($Date: 2002/07/24 23:34:59 $)
*********************************************************************
-->
<table cellSpacing=0 cellPadding=3 width="85%" border=0>
<tbody>
<tr>
<td vAlign=center align=middle bgColor="#4a5d9c">
<table cellSpacing="0" cellPadding="0" width="100%" border="0">
<tbody>
<tr>
<td vAlign=top align=left width="1%" bgColor="#f2ae26">
<img width=110 height=83
src="/ohmj/Imgs/logoOHMJ.gif"
border=0 alt="O.H.M.J.">
</td>
<td vAlign=top align=middle width="1%" height=80>
<img src="/ohmj/Imgs/top.gif" border=0 alt=""></td>
<td vAlign=center align=right width="98%" bgColor="#f2ae26">
<table cellSpacing=0 cellPadding=0 width="100%" border=0>
<tbody>
<tr>
<td vAlign=center align=middle bgColor="#f2ae26">
<a href="http://www.ville-jacou.fr">
<img border=0
src="/ohmj/Imgs/logoJacou.gif"
Alt="Jacou" height=65 width=99> </a>
</td>
<td vAlign=center align=middle bgColor="#f2ae26">
<img width=326 height=84
src="/ohmj/Imgs/titre.gif"
border=0 alt="Harmonie de Montpellier-Jacou">
</td>
<td vAlign=center align=middle bgColor="#f2ae26">
<a href="http://www.ville-montpellier.fr">
<img border=0
src="/ohmj/Imgs/logoMontpellier.jpg"
Alt="Montpellier" height=38 width=39
align=right></a>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td vAlign=top align=middle bgColor="#f2ae26">&nbsp;</td>
<td vAlign=top align=left>
<img src="/ohmj/Imgs/center.gif" border=0>
</td>
<td vAlign=top align=middle
background="/ohmj/Imgs/ombre_haut_bas_main.gif">&nbsp;
</td></tr>
<tr>
<td vAlign=top align=middle bgColor="#f2ae26">
<table cellSpacing=0 cellPadding=1 width="95%" border=0>
<tbody>
<tr>
<td vAlign=center align=bottom bgColor="#f2ae26"
colSpan=2>
<table cellSpacing=0 cellPadding=0 width="100%"
border=0>
<tbody>
<tr>
<td vAlign=center align=align=left>
<font face="helvetica,verdana"
color="#000000"
size=-1><b>Menu</b>
</font>
</td>
</tr></tbody></table>
<hr>
</td></tr>
<tr>
<td vAlign=center align=middle width="20%" >
<img src="/ohmj/Imgs/icon_puce_over.gif"
border=0 alt="*"></td>
<td vAlign=center noWrap align=left width="80%" >
<? global $id;
echo "<a href=homeAdmin.php?page=M_edito&id=$id >
<font face=\"\" color=\"#ffffff\" size=-1>
Modifier l'éditorial </font></a> </td> </tr>\n";
?>
<tr>
<td vAlign=center align=middle width="20%" >
<img src="/ohmj/Imgs/icon_puce_over.gif"
border=0 alt="*"></td>
<td vAlign=center noWrap align=left width="80%" >
<? global $id;
echo "<a
href=homeAdmin.php?page=M_Hist&id=$id >
<font face=\"\" color=\"#ffffff\" size=-1>
Modifier l'Historique </font></a> </td> </tr>\n";
?>
<tr>
<td vAlign=center align=middle width="20%" >
<img src="/ohmj/Imgs/icon_puce_over.gif"
border=0 alt="*"></td>
<td vAlign=center noWrap align=left width="80%" >
<? global $id;
echo "<a
href=homeAdmin.php?page=M_InfoC&id=$id >
<font face=\"\" color=\"#ffffff\" size=-1>
Modifier l'Agenda </font></a> </td> </tr>\n";
?>
<tr>
<td vAlign=center align=middle width="20%" >
<img src="/ohmj/Imgs/icon_puce_over.gif"
border=0 alt="*"></td>
<td vAlign=center noWrap align=left width="80%" >
<? global $id;
echo "<a
href=homeAdmin.php?page=M_revue&id=$id >
<font face=\"\" color=\"#ffffff\" size=-1>
Modifier la Revue </font></a> </td> </tr>\n";
?>
<tr>
<td vAlign=center align=middle width="20%" >
<img src="/ohmj/Imgs/icon_puce_over.gif"
border=0 alt="*"></td>
<td vAlign=center noWrap align=left width="80%" >
<? global $id;
echo "<a
href=homeAdmin.php?page=M_Rep&id=$id >
<font face=\"\" color=\"#ffffff\" size=-1>
Modifier le r&eacute;pertoire </font></a>
</td> </tr>\n";
?>
<tr>
<td vAlign=center align=middle width="20%" >
<img src="/ohmj/Imgs/icon_puce_over.gif"
border=0 alt="*"></td>
<td vAlign=center noWrap align=left width="80%" >
<? global $id;
echo "<a
href=homeAdmin.php?page=M_Fonctionnement&id=$id >
<font face=\"\" color=\"#ffffff\" size=-1>
Modifier le Fonctionnement </font></a>
</td>
</tr>\n";
?>
<tr>
<td vAlign=center align=middle width="20%" >
<img src="/ohmj/Imgs/icon_puce_over.gif"
border=0 alt="*"></td>
<td vAlign=center noWrap align=left width="80%" >
<? global $id;
echo "<a
href=homeAdmin.php?page=M_Contacts&id=$id>
<font face=\"\" color=\"#ffffff\" size=-1>
Modifier les Contacts </font></a> </td> </tr>\n";
?>
<tr>
<td vAlign=center align=middle width="20%" >
<img src="/ohmj/Imgs/icon_puce_over.gif"
border=0 alt="*"></td>
<td vAlign=center noWrap align=left width="80%" >
<? global $id;
echo "<a
href=homeAdmin.php?page=M_Recrutement&id=$id>
<font face=\"\" color=\"#ffffff\" size=-1>
Modifier le recrutement </font></a> </td> </tr>\n";
?>
<tr>
<td vAlign=center align=middle width="20%" >
<img src="/ohmj/Imgs/icon_puce_over.gif"
border=0 alt="*"></td>
<td vAlign=center noWrap align=left width="80%" >
<? global $id;
echo "<a
href=homeAdmin.php?page=AdmLivOR&id=$id >
<font face=\"\" color=\"#ffffff\" size=-1>
Administrer le livre d'or </font></a>
</td> </tr>\n";
?>
<tr>
<td vAlign=center align=middle width="20%" >
<img src="/ohmj/Imgs/icon_puce_over.gif"
border=0 alt="*"></td>
<td vAlign=center noWrap align=left width="80%" >
<? global $id;
echo "<a
href=homeAdmin.php?page=StatSite&id=$id >
<font face=\"\" color=\"#ffffff\" size=-1>
Statistiques du site </font></a> </td> </tr>\n";
?>
<tr>
<td vAlign=center align=middle width="20%" >
<img src="/ohmj/Imgs/icon_puce_over.gif"
border=0 alt="*"></td>
<td vAlign=center noWrap align=left width="80%" >
<? global $id;
global $sql_serveur;
global $sql_bdd;
global $sql_user;
global $sql_passwd;
global $table_users;
$connexion = mysql_connect($sql_serveur,$sql_user,
$sql_passwd);
$resultat = mysql_db_query($sql_bdd,
"select * from $table_users where ".
"id=\"$id\"",$connexion);
$pseudo = mysql_result($resultat,0,"pseudo");
if ( $pseudo == "jb" ) {
echo "<a
href=homeAdmin.php?page=Journal&id=$id >
<font face=\"\" color=\"#ffffff\" size=-1>
Journal des modifications </font></a>
</td>
</tr>\n";
echo "<tr>
<td vAlign=center align=middle width=\"20%\" >
<img src=\"/ohmj/Imgs/icon_puce_over.gif\"
border=0 alt=\"*\"></td>
<td vAlign=center noWrap align=left width=\"80%\" >";
echo "<a
href=homeAdmin.php?page=AdmDownload&id=$id>
<font face=\"\" color=\"#ffffff\" size=-1>
Administrer les download </font></a>
</td>
</tr>\n";
echo "<tr>
<td vAlign=center align=middle width=\"20%\" >
<img src=\"/ohmj/Imgs/icon_puce_over.gif\"
border=0 alt=\"*\"></td>
<td vAlign=center noWrap align=left width=\"80%\" >";
echo "<a
href=homeAdmin.php?page=AdmNews&id=$id >
<font face=\"\" color=\"#ffffff\" size=-1>
Ajouter une News </font></a> </td> </tr>\n";
}
?>
<tr>
<td vAlign=center align=middle width="20%" >
<img src="/ohmj/Imgs/icon_puce_over.gif"
border=0 alt="*"></td>
<td vAlign=center noWrap align=left width="80%" >
<? global $id;
echo "<a
href=homeAdmin.php?page=AdmLinks&id=$id >
<font face=\"\" color=\"#ffffff\" size=-1>
Administrer les Liens</font></a> </td> </tr>\n";
?>
<tr>
<td vAlign=center align=middle width="20%" >
<img src="/ohmj/Imgs/icon_puce_over.gif"
border=0 alt="*"></td>
<td vAlign=center noWrap align=left width="80%" >
<? global $id;
echo "<a
href=homeAdmin.php?page=AdmUsers&id=$id>
<font face=\"\" color=\"#ffffff\" size=-1>
Administrer les Utilisateurs</font></a>
</td> </tr>\n";
?>
<tr>
<td vAlign=center align=middle width="20%" >
<img src="/ohmj/Imgs/icon_puce_over.gif"
border=0 alt="*"></td>
<td vAlign=center noWrap align=left width="80%" >
<? global $id;
echo "<a href=Cookie.php?page=Pose&id=$id >
<font face=\"\" color=\"#ffffff\" size=-1>
Ajouter un cookie </font></a> </td> </tr>\n";
?>
<tr>
<td vAlign=center align=middle width="20%" >
<img src="/ohmj/Imgs/icon_puce_over.gif"
border=0 alt="*"></td>
<td vAlign=center noWrap align=left width="80%" >
<? global $id;
echo "<a href=Cookie.php?page=Supp&id=$id >
<font face=\"\" color=\"#ffffff\" size=-1>
Supprimer un cookie </font></a> </td> </tr>\n";
?>
<tr>
<td vAlign=center align=middle width="20%" >
<img src="/ohmj/Imgs/icon_puce_over.gif"
border=0 alt="*"></td>
<td vAlign=center noWrap align=left width="80%" >
<? global $id;
echo "<a href=logout.php?id=$id >
<font face=\"\" color=\"#ffffff\" size=-1>
Quitter l'Administration </font></a> </td>
</tr>\n";
?>
<table cellSpacing=0 cellPadding=1 width=140 border=0>
<tbody>
</tbody></table></td>
<td vAlign=top align=middle width=18
background="/ohmj/Imgs/ombre_centre.gif"
height=600>&nbsp;</td>
<td vAlign=top align=middle bgColor="#ffffff" >
<br><br>
<br>

511
Scripts/Livredor.php Normal file
View File

@@ -0,0 +1,511 @@
<?
/***************************************************************************
Livredor.php - Classe Livredor
-------------------
begin : Septembre UTC 2002
copyright : (C) 2002 by NADAL Jean-Baptiste
email : jbnadal@ifrance.com
***************************************************************************
*
* Cette classe permet de gerer un livre d'or pour le site de l'Harmonie
* de Montpellier-Jacou.
*
***************************************************************************
* *
* 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. *
* *
***************************************************************************
* $Id: Livredor.php,v 1.4 2002/12/15 20:22:29 jb Exp $
***************************************************************************/
if (file_exists ("conf.php"))
require ("conf.php");
else
require ("./Scripts/conf.php");
class Livredor {
// =============================================================
// Les Variables
var $szTabTexte; // Contient le contenu de la page du livre d'or courant
var $nLongTexte; // Taille du tableau du contenu de la requete
var $nNbMsg; // Nombre de message que contient le livre d'or
var $Font_Def; // Font utilisé pour l'affichage du livre d'or
var $msgPARpages; // Nombre de messages affichable par page
var $nbrePages; // Nombre de page que contient le livre d'or
var $CouleurFond; // Couleur de fond des lignes du resultat de la requete
// =============================================================
// Les Fonctions
function Livredor ()
{
$fontFace = "verdana,arial,hevetica";// Police par défaut
$fontSize = "2"; // Taille de la police par défaut
$this->Font_Def = "<font face=$fontFace size=$fontSize>";
$this->msgPARpages = 10;
$this->CouleurFond = "#CCCCCC";
}
function AfficheTexte ()
{
echo "$this->szTabTexte";
}
/* =================================================
* Cette fonction se connecte a la base du livre d'or et affiche simplement
* Un texte : celui dont le numero
* est passé en paramètre.
*/
function GetText($num_elem)
{
global $sql_bdd;
// On se connecte sur la base du livre d'Or
$connect_db = jb_sql_connect (false);
$resultat = mysql_db_query ($sql_bdd,"select * from livredor where".
" id=$num_elem",$connect_db);
$t_pseudo = mysql_result ($resultat, $cpt, "pseudo");
$t_email = mysql_result ($resultat, $cpt, "email");
$t_pays = mysql_result ($resultat, $cpt, "pays");
$t_message = mysql_result ($resultat, $cpt, "message");
$t_date = mysql_result ($resultat, $cpt, "date");
$t_id = mysql_result ($resultat, $cpt, "id");
echo "<br><br><table width=90% border=0 cellpadding=0 cellspacing=0>\n".
"<re><td>$this->Font_Def";
echo "$t_date</font></td></tr><tr><td bgcolor=$this->CouleurFond> ";
/* Si la personne qui a signe le livre d'or a donné son email, on la lie
* sinon, on n'affiche que le pseudo
*/
if ($t_email)
echo "<a href = mailto:$t_email>$this->Font_Def".
" $t_pseudo</font></a> , $t_pays";
else
echo "<b>$this->Font_Def $t_pseudo</font></b> , $t_pays";
// Puis On affiche le message a proprement parlé
echo "</td></tr><tr><td> $this->Font_Def $t_message </font> </td>
</tr>\n</table>\n<br>\n";
// puis on ferme la connexion avec le serveur de base de donnees
MYSQL_CLOSE;
}
/* =================================================
* Cette fonction supprime le texte de la base Livre d'or dont
* on passe l'indice en paramèrtre
*/
function SupprimeText ($num_elem)
{
global $sql_bdd;
/* On se connecte sur la base du livre d'Or. */
$connect_db = jb_sql_connect (false);
$resultat = mysql_db_query ($sql_bdd, "delete from livredor where".
" id=$num_elem", $connect_db);
if ($resultat == 1)
echo "<br><br><center><font size=4 color=red><b>Le message".
" $num_elem a été effacé</b></font></center><br><br>\n";
else
echo "<br><br><center><font size=6 color=red><b>BUG !!! suppression".
" Impossible</b></font></center><br><br>\n";
MYSQL_CLOSE;
}
function RecuperePage ($page, $modeAdmin)
{
global $racine, $page_index, $sql_bdd, $id;
// On se connecte sur la base du livre d'Or
$connect_db = jb_sql_connect (true);
$resultat = mysql_db_query ($sql_bdd, "select * from livredor order by".
" id desc", $connect_db);
$nbTotalLignes = mysql_numrows ($resultat);
$this->nNbMsg = $nbTotalLignes;
// On regarde qu'il y ait au moins une ligne de résultat
if ($nbTotalLignes != 0) {
// On calcul les bornes des messages que l'on va récupéré ensuite
$this->nbrePages = ceil ($nbTotalLignes / $this->msgPARpages);
/* Si le paramètre passé a la méthode est vide, on lui affecte
* la page 0. */
if ($page == "")
$page = "0";
// Puis les deux bornes
$premierMsg = ($page * $this->msgPARpages);
$dernierMsg = ($premierMsg + $this->msgPARpages);
$cpt = $premierMsg;
// Puis on boucle pour afficher tout les messages
while ($cpt < $dernierMsg) {
$t_pseudo = mysql_result ($resultat, $cpt, "pseudo");
$t_email = mysql_result ($resultat, $cpt, "email");
$t_pays = mysql_result ($resultat, $cpt, "pays");
$t_message = mysql_result ($resultat, $cpt, "message");
$t_date = mysql_result ($resultat, $cpt, "date");
$t_id = mysql_result ($resultat, $cpt, "id");
$this->szTabTexte .="<table width=90% border=0 cellpadding=0".
" cellspacing=0>\n<tr><td>$this->Font_Def";
if ($modeAdmin)
$this->szTabTexte .= "<b>Message $t_id</b> en date du $t_date".
"</font></td></tr><tr><td bgcolor=$this->CouleurFond> ";
else
$this->szTabTexte .= "$t_date</font></td></tr><tr><td ".
"bgcolor=$this->CouleurFond> ";
/* Si la personne qui a signe le livre d'or a donné son email,
* on la lie sinon, on n'affiche que le pseudo
*/
if ($t_email)
$this->szTabTexte .="<a href = mailto:$t_email>$this->Font_Def".
" $t_pseudo</font></a> , $t_pays";
else
$this->szTabTexte .="<b>$this->Font_Def $t_pseudo</font>".
"</b> $t_pays";
/* Puis On affiche le message a proprement parlé. */
$this->szTabTexte .= "</td></tr><tr><td> $this->Font_Def ".
"$t_message </font> </td> </tr>\n</table>\n<br>\n";
if ($modeAdmin) {
$this->szTabTexte .= "<center>\n <form action=".
"'$racine/$page_index?".
"page=SuppElemLVOR&id=$id&action=quest ' method='post'>\n";
$this->szTabTexte .= "<input type=hidden name=num_id ".
"value=$t_id />\n";
$this->szTabTexte .= "<input type=submit name=destroy value=".
"\"Effacer le message $t_id\" /></form><br><hr><br>\n";
}
$cpt++;
if ($cpt == $nbTotalLignes)
$cpt = $dernierMsg;
}
MYSQL_CLOSE;
}
else
$this->szTabTexte .= "<center>$this->Font_Def".
"<b>Aucun message pour l'instant.</b></font></center>";
}
function GenereEntete ($page, $modeAdmin)
{
global $racine, $page_index, $id,$page_index;
// On affiche les index sur les différentes pages
$x = "1";
$code .= "| ";
while ($x <= $this->nbrePages) {
if ($page != $x) {
if ($modeAdmin)
$code.= "<a href=\"$racine/$page_index?page=AdmLivOR&id=$id";
else
$code.= "<a href=\"$page_index?page=livre_or";
$code.= "&livorPage=".($x-1)."\"><b>$x</b></a> | ";
}
else
$code.= " $x | ";
$x++;
}
/* On affcihe le nombre de message du livre d'or. */
echo "$this->Font_Def <center>$code<br>
<hr size=1 width=\"75%\" noshade>
$this->nNbMsg messages";
if (!$modeAdmin)
echo "[ <a href=#signer> Signer le livre d'or </a> ] </font><br>\n
<br>\n
<br><center>Pour tout renseignement, voir notre rubrique
<a href=\"$page_index?page=contacts\">contact</a></center>";
}
function ValideInscriptionLivre($pseudo, $email, $pays, $message, $date)
{
global $sql_bdd;
if (strlen ($date) < 3)
$Datelo = date('d m Y, H:i');
else
$Datelo=$date;
$connect_db = jb_sql_connect (false);
$query = "insert into livredor (pseudo,email,pays,message,date) values";
$query .= "('$pseudo', '$email', '$pays', '$message', '$date')";
$resultat = mysql_db_query ($sql_bdd, $query, $connect_db);
MYSQL_CLOSE;
}
function GenereFormulaireInscription()
{
echo "
<a name=signer></a>
Pour signer le livre d'or, remplissez le formulaire ci-dessous et
validez.<br/>
(seules les cases \"<u>Pseudo</u>\" et \"<u>Message</u>\"
sont obligatoires).<br/><br/>
<hr size=1 noshade>
<form action=index.php?&page=SigneLOr method=post>
<center>
<table border=0 cellspacing=4 cellpadding=0 width=90%>
<tr>
<td width=25%> <p>$this->Font_Def<b> Pseudo : </b></font> </p>
</td>
<td width=25%> <p><input type=text name=pseudo size=18></p>
</td>
<td width=25%> <p>$this->Font_Def Email : </font></p>
</td>
<td width=25%> <p><input type=text name=email size=18> </p>
</td>
</tr>
<tr>
<td width=25%> <p>$this->Font_Def Pays : </p> </td>
<td width=25%>
<select name=pays>
<option value = France selected> France
<option value = Afghanistan> Afghanistan
<option value = Albanie> Albanie
<option value = Algerie> Algerie
<option value = Andorre> Andorre
<option value = Angola> Angola
<option value = Anguilla> Anguilla
<option value = Antarctique> Antarctique
<option value = Argentine> Argentine
<option value = Armenie> Armenie
<option value = Aruba> Aruba
<option value = Australie> Australie
<option value = Autriche> Autriche
<option value = Azerbaijan> Azerbaijan
<option value = Bahamas> Bahamas
<option value = Bahrain> Bahrain
<option value = Bengladesh> Bengladesh
<option value = Barbade> Barbade
<option value = Bielarussie> Bielarussie
<option value = Belgique> Belgique
<option value = Belize> Belize
<option value = Benin> Benin
<option value = Bermudes> Bermudes
<option value = Bhutan> Bhutan
<option value = Bolivie> Bolivie
<option value = Botswhana> Botswhana
<option value = \"Bouvet_island\"> Bouvet_island
<option value = Bresil> Bresil
<option value = Bulgarie> Bulgarie
<option value = \"Burkina_faso\"> Burkina_faso
<option value = Burundi> Burundi
<option value = Cambodge> Cambodge
<option value = Cameroun> Cameroun
<option value = Canada> Canada
<option value = \"Cape_verde\"> Cape_verde
<option value = \"Cayman_islands\"> Cayman_islands
<option value = Chad> Chad
<option value = Chile> Chile
<option value = China> China
<option value = \"Christmas_island\"> Christmas_island
<option value = \"Cocos_(keeling)_islands\">
Cocos_(keeling)_islands
<option value = Colombia> Colombia
<option value = Comoros> Comoros
<option value = Congo> Congo
<option value = \"Cook_islands\"> Cook_islands
<option value = \"Costa_rica\"> Costa_rica
<option value = \"Cote_d\'ivoire\">Cote_d\'ivoire
<option value = Croatia> Croatia
<option value = Cuba> Cuba
<option value = Cyprus> Cyprus
<option value = \"Czech_republic\"> Czech_republic
<option value = Denmark> Denmark
<option value = Djibouti> Djibouti
<option value = Dominica> Dominica
<option value = \"Dominican_republic\"> Dominican_republic
<option value = \"East_timor\"> East_timor
<option value = Ecuador> Ecuador
<option value = Egypt> Egypt
<option value = \"El_salvador\"> El_salvador
<option value = \"Equatorial_guinea\"> Equatorial_guinea
<option value = Eritrea> Eritrea
<option value = Estonia> Estonia
<option value = Ethiopia> Ethiopia
<option value = \"Faroe_islands\"> Faroe_islands
<option value = Fiji> Fiji
<option value = Finland> Finland
<option value = France> France
<option value = \"French_guiana\"> French_guiana
<option value = \"French_polynesia\"> French_polynesia
<option value = \"French_southern\"> French_southern
<option value = Gabon> Gabon
<option value = Gambia> Gambia
<option value = Georgia> Georgia
<option value = Germany> Germany
<option value = Ghana> Ghana
<option value = Gibraltar> Gibraltar
<option value = Greece> Greece
<option value = Greenland> Greenland
<option value = Grenada> Grenada
<option value = Guadeloupe> Guadeloupe
<option value = Guam> Guam
<option value = Guatemala> Guatemala
<option value = Guinea> Guinea
<option value = \"Guinea-bissau\"> Guinea-bissau
<option value = Guyana> Guyana
<option value = Haiti> Haiti
<option value = Honduras> Honduras
<option value = \"Hong_kong\"> Hong_kong
<option value = Hungary> Hungary
<option value = Iceland> Iceland
<option value = India> India
<option value = Indonesia> Indonesia
<option value = Iraq> Iraq
<option value = Ireland> Ireland
<option value = Israel> Israel
<option value = Italy> Italy
<option value = Jamaica> Jamaica
<option value = Japan> Japan
<option value = Jordan> Jordan
<option value = Kazakhstan> Kazakhstan
<option value = Kenya> Kenya
<option value = Kiribati> Kiribati
<option value = \"Korea,_republic_of\"> Korea,_republic_of
<option value = Kuwait> Kuwait
<option value = Kyrgyzstan> Kyrgyzstan
<option value = Latvia> Latvia
<option value = Lebanon> Lebanon
<option value = Lesotho> Lesotho
<option value = Liberia> Liberia
<option value = Liechtenstein> Liechtenstein
<option value = Lithuania> Lithuania
<option value = Luxembourg> Luxembourg
<option value = Macau> Macau
<option value = Madagascar> Madagascar
<option value = Malawi> Malawi
<option value = Malaysia> Malaysia
<option value = Maldives> Maldives
<option value = Mali> Mali
<option value = Malta> Malta
<option value = \"Marshall_islands\"> Marshall_islands
<option value = Martinique> Martinique
<option value = Mauritania> Mauritania
<option value = Mauritius> Mauritius
<option value = Mayotte> Mayotte
<option value = Mexico> Mexico
<option value = Monaco> Monaco
<option value = Mongolia> Mongolia
<option value = Montserrat> Montserrat
<option value = Morocco> Morocco
<option value = Mozambique> Mozambique
<option value = Myanmar> Myanmar
<option value = Namibia> Namibia
<option value = Nauru> Nauru
<option value = Nepal> Nepal
<option value = Netherlands> Netherlands
<option value = \"New_caledonia\"> New_caledonia
<option value = \"New_zealand\"> New_zealand
<option value = Nicaragua> Nicaragua
<option value = Niger> Niger
<option value = Nigeria> Nigeria
<option value = Niue> Niue
<option value = \"Norfolk_island\"> Norfolk_island
<option value = Norway> Norway
<option value = Oman> Oman
<option value = Pakistan> Pakistan
<option value = Palau> Palau
<option value = Panama> Panama
<option value = \"Papua_new_guinea\"> Papua_new_guinea
<option value = Paraguay> Paraguay
<option value = Peru> Peru
<option value = Philippines> Philippines
<option value = Pitcairn> Pitcairn
<option value = Poland> Poland
<option value = Portugal> Portugal
<option value = \"Puerto_rico\"> Puerto_rico
<option value = Qatar> Qatar
<option value = Reunion> Reunion
<option value = Romania> Romania
<option value = \"Russian_federation\"> Russian_federation
<option value = Rwanda> Rwanda
<option value = \"Saint_lucia\"> Saint_lucia
<option value = Samoa> Samoa
<option value = \"San_marino\"> San_marino
<option value = \"Saudi_arabia\"> Saudi_arabia
<option value = Senegal> Senegal
<option value = Seychelles> Seychelles
<option value = \"Sierra_leone\"> Sierra_leone
<option value = Singapore> Singapore
<option value = Slovakia> Slovakia
<option value = Slovenia> Slovenia
<option value = \"Solomon_islands\"> Solomon_islands
<option value = Somalia> Somalia
<option value = \"South_africa\"> South_africa
<option value = Spain> Spain
<option value = \"Sri_lanka\"> Sri_lanka
<option value = \"St._helena\"> St._helena
<option value = Sudan> Sudan
<option value = Suriname> Suriname
<option value = Swaziland> Swaziland
<option value = Sweden> Sweden
<option value = Switzerland> Switzerland
<option value = \"Syrian_arab_republic\"> Syrian_arab_republic
<option value = Taiwan> Taiwan
<option value = Tajikistan> Tajikistan
<option value = Tanzania> Tanzania
<option value = Thailand> Thailand
<option value = Togo> Togo
<option value = Tokelau> Tokelau
<option value = Tonga> Tonga
<option value = Tunisia> Tunisia
<option value = Turkey> Turkey
<option value = Turkmenistan> Turkmenistan
<option value = Tuvalu> Tuvalu
<option value = Uganda> Uganda
<option value = Ukraine> Ukraine
<option value = \"United_arab_emirates\"> United_arab_emirates
<option value = \"United_kingdom\"> United_kingdom
<option value = \"United_states\"> United_states
<option value = Uruguay> Uruguay
<option value = Uzbekistan> Uzbekistan
<option value = Vanuatu> Vanuatu
<option value = Venezuela> Venezuela
<option value = \"Viet_nam\"> Viet_nam
<option value = \"Western_sahara\"> Western_sahara
<option value = Yemen> Yemen
<option value = Yugoslavia> Yugoslavia
<option value = Zambia> Zambia
<option value = Zimbabwe> Zimbabwe
</select>
</td>
<td width=25%> <p>&nbsp;</p>
</td>
<td width=25%> &nbsp;</p>
</td>
</tr>
<tr>
<td width> <p>$this->Font_Def <b>Message : </b></font> </p>
</td>
</tr>
</table>
<textarea name=message rows=5 cols=52 wrap=virtual></textarea>
<hr size=1 noshade>
<script language=\"javascript\">
var datelo =DonneDate();
document.write(\"<input type=hidden name=datecourante value=".
"\"+datelo+\">\");
</script>
<input type=submit name=envoi value=\"Signer le livre d'or\"><br><br>
</form>
";
}
}
?>

34
Scripts/NousSommesLe.php Normal file
View File

@@ -0,0 +1,34 @@
<?
/*
*********************************************************************
* File : $RCSfile: NousSommesLe.php,v $
* Version : $Revision: 1.1.1.1 $
* Modified by : $Author: jb $ ($Date: 2002/03/10 17:13:32 $)
*********************************************************************
*/
// =============================================================
// Cette fonction permet d'afficher la date du jour en français
function afficheDateduJour()
{
$monthsArray = array("janvier","février","mars","avril","mai","juin", "juillet","août","septembre","octobre","novembre","décembre");
$daysArray=array("Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi");
echo $daysArray[date("w")] ." ";
echo date("j").(date("j") == 1 ? "<sup>er</sup> " : " ");
echo $monthsArray[date("n")-1]." ".date("Y");
}
// =============================================================
// Cette fonction permet de retourner la date du jour en français sous la forme d'une chaine
function retourneDateduJour()
{
$monthsArray = array("janvier","février","mars","avril","mai","juin", "juillet","août","septembre","octobre","novembre","décembre");
$daysArray=array("Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi");
$szDate = $daysArray[date("w")] ." ";
$szDate .= date("j").(date("j") == 1 ? "<sup>er</sup> " : " ");
$szDate .= $monthsArray[date("n")-1]." ".date("Y");
return $szDate;
}
?>

28
Scripts/PenseeDuChef.php Normal file
View File

@@ -0,0 +1,28 @@
<?
/*
*********************************************************************
* File : $RCSfile: PenseeDuChef.php,v $
* Version : $Revision: 1.1.1.1 $
* Modified by : $Author: jb $ ($Date: 2002/03/10 17:13:32 $)
*********************************************************************
*/
function PenseeDuChef ()
{
// On ouvre le fichier contenant les différentes pensées du chefs
$fichier = "./Textes/PenseesDuChef.neodoc";
// on crée un tableau à partir des lignes du fichier
if ($tableau = file($fichier))
{
srand((double)microtime()*10000);
// on tire au hasard un élément du tableau
$nElem = rand(0,sizeof($tableau)-1);
// Puis on affiche la pensée du chef titée au hazard
//echo "<b>Les pensées du Chef (et des autres !) :</b><br>\n";
echo "<i>\"";
echo $tableau[$nElem];
echo "</i>\"<br><br>";
} // fin if ($tableau = file($fichier))
}
?>

122
Scripts/Stats.php Normal file
View File

@@ -0,0 +1,122 @@
<?php
/*
*********************************************************************
* File : $RCSfile: Stats.php,v $
* Version : $Revision: 1.2 $
* Modified by : $Author: jb $ ($Date: 2002/07/24 23:34:59 $)
*********************************************************************
Classe Stats
v 0.20 28-11-2001 : refonte complete
v 0.10 : 15 05 2001
V 0.01 : NADAL Jean-Baptiste : 17 04 2001
Description : Cette classe permet de gérer les statistiques du site
elle permet d'enregistrer les entrée des visiteur avec filtrage, un meme utilisateur n'est pris en compte
pour la meme que s'il la revisite 10 minutes apres.
*/
if ( file_exists("conf.php") )
require("conf.php");
else
require("./Scripts/conf.php");
class Stats
{
// ===============================
var $szReferenceur;
var $szRemote_Addr;
var $szUser_Http_Agent;
var $szCookie;
// ===============================
// Constructeur de la classe de statistique
function Stats($ref,$remote_addr,$user_http_Agent, $cook)
{
$this->szReferenceur=$ref;
$this->szRemote_Addr=$remote_addr;
$this->szUser_Http_Agent=$user_http_Agent;
$this->szCookie=$cook;
}
// ===============================
// Cette fonction Incremente la page visitée dans la base de statistique
function IncStatPage($szNomPage)
{
global $sql_bdd;
// On se connecte a la base de donnée du site
$connect_db = jb_sql_connect(3);
if ( $connect_db != "" )
{
// On recupere la date courante;
$date = time();
if ($this->szCookie != "oui" )
{
if (! $this->Estdejavenu($connect_db,$szNomPage, $date) )
{
// On incremente le compteur général
$num_date = $this->incCompteurGeneral($connect_db,$szNomPage, $date );
// Puis on increment le compteur en texte.
// echo "cook : $this->szCookie, $nTypeStat";
// echo "on increment le compteur !!!";
$cpt = new Compteur(1);
} // fin if (! Estdejavenu($connect_db,$nTypeStat,$heure) )
} // fin if ($this->szCookie != "oui" )
// On ferme la connexion avec la base de donnee
$result = mysql_close($connect_db);
} // Fin if ( $connect_db != "" )
} // fin de function IncStatPage($nTypeStat)
// ====================================================
// Cette fonction détermine si l'utilisateur courant est deja venu sur la page $page depuis les
// dix dernières minutes.
// Return true si l'utilisateur est deja venu faux sinon
function Estdejavenu($connection,$Page,$heure)
{
global $table_visiteur;
global $sql_bdd;
$bRetour = false;
// On regarde si l'utlisateur est venu sur le site ( si son @ IP est deja enregistrée
$resultat = mysql_db_query($sql_bdd,"select date_php from $table_visiteur where address='$this->szRemote_Addr' order by date_php desc ",$connection);
// s'il y a une réponse, c'est que le visiteur est deja venu
if (mysql_num_rows($resultat) > 0)
$heureVisite = mysql_result($resultat, 0, 'date_php');
else
$heureVisite = mktime(0, 0, 0, date("m")-1, date("d"), date("Y"));
//echo " date_php : $heureVisite <br> heure local : $heure<br>\n";
// puis on regarde si le visiteur est venu depuis lz dernière heure !!
if (( $heure - $heureVisite) > 6000)
$bRetour =false;
else
$bRetour =true;
return $bRetour;
}
// ====================================================
function incCompteurGeneral($connection, $szNomPage, $servertime )
{
global $table_compteur;
global $table_visiteur;
global $sql_bdd;
$second = date("s", ($servertime));
$minute = date("i", ($servertime));
$hour = date("G", ($servertime));
$day = date("j", ($servertime));
$month = date("n", ($servertime));
$year = date("y", ($servertime))+2000;
$logdate = $year.'-'.$month.'-'.$day.' '.$hour.':'.$minute.':'.$second ;
$remote_host = @getHostByAddr($this->szRemote_Addr);
$res = mysql_query("INSERT INTO $table_visiteur (id, request, host, address, agent, date, date_php, referer, country, provider, os, wb) VALUES ('', '$szNomPage', '$remote_host', '$this->szRemote_Addr', '$this->szUser_Http_Agent', '$logdate', '$servertime','$this->szUser_Http_Agent', '', '', '', '')");
return $id_date;
} // fin de la fonction incCompteurGeneral()
} // Fin de la class
?>

113
Scripts/Video.php Normal file
View File

@@ -0,0 +1,113 @@
<?php
/***************************************************************************
Video.php - Class to play flv video.
-------------------
begin : 12 Mai UTC 2008
copyright : (C) 2008 by NADAL Jean-Baptiste
email : jbnadal@ifrance.com
***************************************************************************
*
* Cette classe permet de visualiser les videos presentent dans le
* repertoire 'video' du site grave au player flash.
*
***************************************************************************
* *
* 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. *
* *
***************************************************************************/
if (file_exists("conf.php")) {
require("conf.php");
}
else {
require("./Scripts/conf.php");
}
class VideoEntries
{
/* Member variables. */
var $root;
var $videoDir;
var $width;
var $height;
/* ============================================================= */
/* Constructeur */
function VideoEntries ($aRoot, $aVideoDir)
{
$this->root = $aRoot;
$this->videoDir = $aVideoDir;
$this->width = 320;
$this->height = 240;
}
/* This function display All the video present on the video directory. */
function Affiche ()
{
$rootDir = $this->root . $this->videoDir;
$id = 0;
$col = 1;
if ($dh = opendir ($rootDir)) {
print "<center><table border=\"0\" cellspacing=\"8\"><tr>\n";
while (($file = readdir($dh)) !== false) {
$videoFile = strstr ($file, "flv");
$videoFileLen = strlen ($videoFile);
if ($videoFileLen != 0) {
echo "<td valign=\"top\"><center>";
$this->DisplayVideo ($id, "../".$file,
$this->width, $this->height);
echo "</center><br/>\n";
$FileName = explode( ".", $file);
$docFileName = $rootDir . $FileName[0] . ".html";
$pFichier = @fopen ($docFileName,"r");
if ($pFichier == false) {
echo "</br></br>";
}
else {
while ( feof($pFichier) != 1 ) {
$szLigne = fgets($pFichier);
echo "<center>".$szLigne."</center></br>";
}
}
echo "</td>";
$id += 1;
$col = $col + 1;
if ($col == 3) {
print "</tr><tr>\n";
$col = 1;
}
}
}
if (col == 1) {
print "/<tr>";
}
print "</table></center>\n";
}
closedir($dh);
}
/* This function display the video with the flash video player. */
function DisplayVideo ($id, $aFileName, $width, $height)
{
echo "<div id=\"container".$id."\">
<a href=\"http://www.macromedia.com/go/getflashplayer\">Get the Flash Player</a> to see this player.
</div>\n";
echo "<script type=\"text/javascript\" src=\"./videos/bin/swfobject.js\"></script>\n";
echo "<script type=\"text/javascript\">\n
var s1 = new SWFObject(\"./videos/bin/mediaplayer.swf\",
\"mediaplayer\",\"".$width."\",\"".
$height."\",\"8\");\n
s1.addParam(\"allowfullscreen\",\"true\");\n
s1.addVariable(\"width\",\"".$width."\");\n
s1.addVariable(\"height\",\"".$height."\");\n
s1.addVariable(\"file\",\"".$aFileName."\");\n
s1.write(\"container".$id."\");\n
</script>\n";
}
}
?>

223
Scripts/album.php Normal file
View File

@@ -0,0 +1,223 @@
<?php
/*
*********************************************************************
* File : $RCSfile: album.php,v $
* Version : $Revision: 1.3 $
* Modified by : $Author: jb $ ($Date: 2003/06/28 22:20:19 $)
*********************************************************************
Classe Cadre
V 0.01 : NADAL Jean-Baptiste : 02 03 2001
V 0.22 Rejout des touches de navigations entre les images
Description : Cette classe permet de gérer l'album photo de l'Harmonie
*/
class Album {
// =====================================================
// Les Variables
var $szCheminAlbum; // chemin de l'album
var $szDateAlbum; // Date de l'album
var $szTitreAlbum; // Titre de l'album
var $nbImgCol;
// =============================================================
// Constructeur de la classe
function Album($chemin)
{
$this->szCheminAlbum = $chemin;
$this->nbImgCol = 2;
} // fin du constructeur
// =============================================================
function getDate() { return $this->szDateAlbum; }
function getTitre() { return $this->szTitreAlbum; }
function AffichePresentation()
{
global $page_index, $racine;
echo "
<br>
<center>
<table border=0>
<tr>
<td>
<a href=\"$page_index?page=album_photo&palb=racine\">
<img src=\"$racine/Imgs/album_photo.jpg\" alt=\"Entrer dans l'album photo\" border=0>
</a>
</td>
</tr>
</table>
<br><b>Clicker sur l'image pour entrer dans l'album</b>
</center>";
}
function ScanAllAbum($Rep)
{
$indice=0;
$fichier ="$this->szCheminAlbum/$Rep/index.neodoc";
$pFichier = fopen($fichier,"r");
if ($pFichier == false)
return 1;
while ( feof($pFichier) != 1 )
{
$szLigne = fgets($pFichier,120);
if ($indice ==0)
$this->szTitreAlbum = $szLigne;
else if ( $indice ==1)
$this->szDateAlbum = $szLigne;
$indice++;
}
fclose ($pFichier);
}
function AfficheAbum ($Rep)
{
global $page_index, $racine;
$indice = 0;
$array = array();
$i = 0;
if ($Rep == "racine")
$monRepertoire = opendir($this->szCheminAlbum);
else {
$chemin = "$this->szCheminAlbum/$Rep/normal";
$monRepertoire = opendir($chemin);
}
echo "<br><center><table border=2 width=\"95%\"><tr>\n";
while ($entryName = readdir ($monRepertoire)) {
if (($entryName != ".") && ($entryName != ".."))
$array[$i++] = $entryName;
}
closedir($monRepertoire);
/* Sort the file in lexicographic mode. */
natcasesort ($array);
$array = array_values($array);
$total = sizeof($array);
for ($i = 0; $i < $total; $i++) {
echo " <td width=\"50%\" valign=center>";
if ($Rep == "racine")
$fichier ="\"$this->szCheminAlbum/$array[$i]/mini/01.jpg\"";
else
$fichier ="\"$this->szCheminAlbum/$Rep/mini/$array[$i]\"";
echo "<center>\n";
if ($Rep == "racine")
echo "<a href=\"$page_index?page=album_photo&palb=$array[$i]\" >\n";
else
echo "<a href=\"$page_index?page=album_photo&palb=$Rep&img=$array[$i]\" >\n";
echo "<img src=$fichier alt=$array[$i] border=0></a><br>\n";
if ($Rep == "racine")
$this->AfficheCommentaire ($array[$i]);
echo "<br></td>\n";
if ( $indice % $this->nbImgCol )
echo "</tr><tr>\n";
$indice++;
}
echo "</tr></table><br><b>Clicker sur l'image pour voir la collection</b><br><br>\n";
if ($Rep != "racine")
{
$monRepertoire = opendir($this->szCheminAlbum);
$precedent ="";
$suivant = "";
$bTrouve =false;
while($entryName = readdir($monRepertoire))
{
if ( ($entryName !=".") && ($entryName !="..") )
{
if ( $bTrouve == true) {
$suivant = $entryName;
break; }
if ( $entryName == $Rep )
$bTrouve = true;
if ( $bTrouve == false)
$precedent =$entryName;
} // fin if
} // fin while
echo "<table border=1><tr>\n";
if ( $precedent =="")
echo "<td><a href=$page_index?page=album_photo&palb=racine >\n";
else
echo "<td><a href=$page_index?page=album_photo&palb=$precedent>\n";
echo "<img src=$racine/Imgs/back.gif alt=back border=0></a></td>\n";
echo "<td><a href=$page_index?page=album_photo&palb=racine >\n";
echo "<img src=$racine/Imgs/home.gif alt=home border=0></a></td>\n";
if ( $suivant =="")
echo "<td><a href=$page_index?page=album_photo&palb=racine >\n";
else
echo "<td><a href=$page_index?page=album_photo&palb=$suivant>\n";
echo "<img src=$racine/Imgs/forward.gif alt=suivant border=0></a></td>\n";
echo "</tr></table>\n";
} //fin if ($Rep != "racine")
echo "</center> \n";
} // fin ScanAllAbum()
function AfficheImage($Rep,$NumImg)
{
global $page_index, $racine;
$fichier ="\"$this->szCheminAlbum/$Rep/normal/$NumImg\"";
echo "<img src=$fichier alt=$NumImg>\n";
$chemin = "$this->szCheminAlbum/$Rep/normal";
$monRepertoire = opendir( $chemin );
$precedent ="";
$suivant = "";
$bTrouve =false;
while($entryName = readdir($monRepertoire))
{
if ( ($entryName !=".") && ($entryName !="..") )
{
if ( $bTrouve == true) {
$suivant = $entryName;
break; }
if ( $entryName == $NumImg )
$bTrouve = true;
if ( $bTrouve == false)
$precedent =$entryName;
} // fin if
} // fin while
echo "<br><br><center><table border=1><tr>\n";
if ( $precedent =="")
echo "<td><a href=$page_index?page=album_photo&palb=$Rep>\n";
else
echo "<td><a href=$page_index?page=album_photo&palb=$Rep&img=$precedent >\n";
echo "<img src=$racine/Imgs/back.gif alt=back border=0></a></td>\n";
echo "<td><a href=$page_index?page=album_photo&palb=$Rep>\n";
echo "<img src=$racine/Imgs/home.gif alt=home border=0></a></td>\n";
if ( $suivant=="")
echo "<td><a href=$page_index?page=album_photo&palb=$Rep>\n";
else
echo "<td><a href=$page_index?page=album_photo&palb=$Rep&img=$suivant >\n";
echo "<img src=$racine/Imgs/forward.gif alt=suivant border=0></a></td>\n";
echo "</tr></table></center>\n";
}
function AfficheCommentaire($nomRep)
{
global $racine;
$commentaire="";
$fichier ="$this->szCheminAlbum/$nomRep/index.neodoc";
$pFichier = fopen($fichier,"r");
if ($pFichier == false)
return 1;
while ( feof($pFichier) != 1 )
{
$szLigne = fgets($pFichier,120);
$commentaire.=$szLigne;
}
fclose ($pFichier);
echo "<br><table width=192 height=61><tr><td background=\"$racine/Imgs/raye10.gif\" bgcolor=\"#5b8cc1\" valign=center>\n";
echo "<br><font color=white><center>$commentaire</center></font></td></tr></table></center>\n";
}
}
?>

66
Scripts/browser_list.txt Executable file
View File

@@ -0,0 +1,66 @@
MSIE 1.2|MSIE 1.2
MSIE 3.01|MSIE 3.x
MSIE 3.02|MSIE 3.x
MSIE 4.0|MSIE 4.x
MSIE 4.01|MSIE 4.x
MSIE 4.5|MSIE 4.5
MSIE 5.0b1|MSIE 5.0x
MSIE 5.0b2|MSIE 5.0x
MSIE 5.0|MSIE 5.0x
MSIE 5.01|MSIE 5.0x
MSIE 5.1|MSIE 5.1
MSIE 5.1b1|MSIE 5.1
MSIE 5.5|MSIE 5.5
MSIE 5.5b1|MSIE 5.5
MSIE 5.5b2|MSIE 5.5
MSIE 6.0|MSIE 6
MSIE 6.0b|MSIE 6
MSIE 6.5a|MSIE 6.5
Lynx/2.8.0|Lynx 2
Lynx/2.8.1|Lynx 2
Lynx/2.8.2|Lynx 2
Lynx/2.8.3|Lynx 2
Lynx/2.8.4|Lynx 2
Lynx/2.8.5|Lynx 2
HTTrack 3.0x|HTTrack
OmniWeb/4.0.1|OmniWeb
Opera 3.60|Opera 3.60
Opera 4.0|Opera 4
Opera 4.01|Opera 4
Opera 4.02|Opera 4
Opera 5|Opera 5
Opera/3.60|Opera 3.60
Opera/4.0|Opera 4
Opera/4.01|Opera 4
Opera/4.02|Opera 4
Opera/5|Opera 5
Netscape6/6.0|NS 6.0
Netscape6/6.01|NS 6.01
Mozilla/4.03|NS 4.03
Mozilla/4.04|NS 4.04
Mozilla/4.05|NS 4.05
Mozilla/4.06|NS 4.06
Mozilla/4.07|NS 4.07
Mozilla/4.08|NS 4.08
Mozilla/4.09|NS 4.09
Mozilla/4.5|NS 4.5
Mozilla/4.51|NS 4.51
Mozilla/4.6|NS 4.6
Mozilla/4.61|NS 4.61
Mozilla/4.7|NS 4.7
Mozilla/4.71|NS 4.71
Mozilla/4.72|NS 4.72
Mozilla/4.73|NS 4.73
Mozilla/4.74|NS 4.74
Mozilla/4.75|NS 4.75
Mozilla/4.76|NS 4.76
Mozilla/4.77|NS 4.77
Konqueror/2.0|Konqueror 2
Konqueror/2.0.1|Konqueror 2
Konqueror/2.1|Konqueror 2
Konqueror/2.1.1|Konqueror 2
Konqueror/2.1.2|Konqueror 2
Konqueror/2.2|Konqueror 2
Teleport Pro|Teleport Pro
WebStripper|WebStripper
WebZIP|WebZIP

359
Scripts/cadre.php Normal file
View File

@@ -0,0 +1,359 @@
<?
/***************************************************************************
cadre.php - Classe Cadre
-------------------
begin : Septembre UTC 2000
copyright : (C) 2002 by NADAL Jean-Baptiste
email : jbnadal@ifrance.com
***************************************************************************
*
* Cette hierarchie de classe permet d'afficher des textes
* soit présent sur une base de donnée soit présent dans un fichier.
*
***************************************************************************
* *
* 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. *
* *
***************************************************************************
* $Id: cadre.php,v 1.4 2002/11/27 23:56:02 jb Exp $
***************************************************************************/
/* ============================================================= */
/* Classe de base non instanciable pour afficher des cadres.*/
class Cadre {
// =====================================================
// Les Variables
var $szTitreCadre; // titre du cadre
var $szTabTexte; // Tableau contenant le texte du cadre
var $szDateTexte; // date de derniere modification du texte
var $nLongTexte; // longueur du texte
// ========================================
// Constructeur de la classe
function Cadre($titre,$texte, $date)
{
$this->szTitreCadre = $titre;
$this->szTabTexte = $texte;
$this->szDateTexte = $date;
$this->szBgColor = "#eeea9c";
}
// ========================================
function setTitre($titre)
{
$this->szTitreCadre =$titre;
}
// ========================================
function setDate($date)
{
$this->szDateTexte = $date;
}
function SetBgColor($color)
{
$this->szBgColor=$color;
}
// =============================================================
// Fonction permettant d'afficher le cadre
function Affiche($fin=0)
{
// On affiche le bandeau du haut avec le titre et la date
$this->affiche_CadreHaut(true);
// Puis on affiche le texte du cadre
//echo "<div align=\"justify\">\n";
$tablo = explode( "\n", $this->szTabTexte );
foreach ( $tablo as $elem ) {
if ( $this->ChercheChapitre( $elem, false) == false )
echo "$elem\n";
}
// Puis on fini par afficher le bandeau du bas du cadre
if ( $fin == 0)
$this->affiche_CadreBas(true);
}
function ChercheChapitre($szChaine,$admin)
{
// On creer un tablo qui contiendra la chaine coupée
$tablo = array();
$tablo = explode("=", $szChaine );
// puis on enleve les espaces inutile
$PartieGauche = trim ($tablo[0]);
// Puis on regarde si la partie gauche correspond au mot titre
if (strcmp("CHAPITRE",$PartieGauche) == 0) {
// On a trouvé un titre ! on rajoute donc les embelissement
//$this->szTabTexte[$compteur] = $this->CreerChapitre($tablo[1] );
if ( $admin )
$this->szTabTexte .= $this->CreerChapitre($tablo[1] );
else {
$chapitre = $this->CreerChapitre($tablo[1] );
echo "$chapitre\n";
}
return true;
}// fin if
else
return false;
} // fin fonction ChercheChapitre
function CreerChapitre($szTitreChapitre)
{
return "
<table width=\"50%\" bgcolor=\"#5a69a4\" cellpadding=\"0\" cellspacing=\"0\"
border=\"0\"><tr><td>
<table width=\"100%\" cellpadding=\"3\" cellspacing=\"2\" border=\"0\" >
<tr>
<td bgcolor=\"#5b8cc1\" align=\"left\"><font color=\"white\" size=\"2\">
<b> $szTitreChapitre </b></font><br /></td>
</tr></table></td></tr></table><br />
";
}
// =============================================================
// Cette fonction affiche les balises du haut pour afficher le cadre
function affiche_CadreHaut($bAffiche)
{
$szTexte =
"<table cellspacing=\"0\" cellpadding=\"1\" width=\"95%\"
border=\"0\">
<tbody>
<tr>
<td valign=\"middle\" align=\"center\" bgcolor=\"#ffcc99\">
<table cellspacing=\"0\" cellpadding=\"1\" width=\"99%\"
border=\"0\">
<tr valign=\"top\" bgcolor=\"#ffcc99\">
<td align=\"left\" valign=\"middle\"
style=\"background : url(/ohmj/Imgs/raye10.gif)\" >
<font face=\"helvetica,verdana\" color=\"#ffffff\"
size=\"-1\">&nbsp; <b>
$this->szTitreCadre </b> </font>
</td>
<td align=\"right\"
style=\"background : url(/ohmj/Imgs/raye10.gif)\" >
&nbsp;&nbsp;&nbsp;&nbsp;<b>
<font face=\"helvetica,verdana\" color=\"#f4d4b2\"
size=\"-1\" >
[ $this->szDateTexte ]&nbsp;</font> </b> </td>
</tr></table>
</td></tr>
<tr>
<td valign=\"middle\" align=\"center\" bgcolor=\"#f7ad21\">
<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"
border=\"0\">
<tbody>
<tr>
<td valign=\"top\" align=\"left\" width=\"100%\"
style=\"background : url(/ohmj/Imgs/fond.png)\" >
<br /><br /><div id=\"cadre\">
";
if ( $bAffiche)
echo $szTexte;
else
return $szTexte;
} // fin de la fonction affiche_CadreHaut()
// =============================================================
// Cette fonction affiche le cadre du bas ( en dessous du texte du cadre
function affiche_CadreBas($bAffiche)
{
$szTexte = "</div>
</td></tr></tbody></table></td></tr></tbody></table><br />\n";
if ( $bAffiche)
echo $szTexte;
else
return $szTexte;
} // fin de la fonction affiche_CadreBas()
} // fin de la classe cadre
// =============================================================
// Cette cadre permet d'afficher les textes présents dans une base
// de données.
class CadreBD extends Cadre {
// =====================================================
// Les Variables
var $szTable; // table dont sont tirés les différents paramètres
var $numPage; // numero de la page que l'on veut accéder
// =============================================================
// Constructeur de la classe
function CadreBD($tab,$numP="1")
{
$this->szTable = $tab;
$this->numPage = $numP;
$this->szBgColor = "#eeea9c";
// Puis on se connecte pour récupérer tous les champs qui nous interresse
if ( $tab != "news")
$this->ConnectDB();
}
// =============================================================
// =============================================================
// Cette méthode permet de se connecter sur la base de donnée
// et de recuperer les donnees qui nous interresse
function ConnectDB()
{
global $sql_bdd;
// On se connecte a la base de donnée du site
$connect_db = jb_sql_connect(true);
if ($connect_db != "") {
// On recupere les différents champs qui nous interresse
// Sur la table passé en paramètre du constructeur
$resultat = mysql_db_query($sql_bdd,"select * from $this->szTable where id=$this->numPage",$connect_db);
// On stock le résultat dans les variables de la classe
$this->szTitreCadre = mysql_result($resultat,0,"titre");
$this->szTabTexte = mysql_result($resultat,0,"texte");
$this->szDateTexte = mysql_result($resultat,0,"date");
$result = mysql_close($connect_db);
} // Fin if
return $connect_db;
}
// =============================================================
// Cette méthode permet de retourner un tableau contenant tous les
//
function GetDataDB()
{
// Les variables locales
global $sql_serveur;
global $sql_bdd;
global $sql_user;
global $sql_passwd;
// Fin des variables locales
// On se connecte sur la base du livre d'Or
$connect_db = jb_sql_connect(false);
$resultat = mysql_db_query($sql_bdd,"select * from news",$connect_db);
return $resultat;
}
} // Fin de la classe Cadre BD
// =============================================================
// Cette classe permet d'afficher un article dans un cadre
class CadrePresse extends Cadre {
// =============================================================
// Constructeur de la classe
function CadrePresse($NomDossier,$titre, $date)
{
// on enregistre les paramètres
$this->szFichier = "./presse/$NomDossier/index.html";
$this->szTitreCadre = $titre;
$this->szDateTexte = $date;
$this->szBgColor = "#eeea9c";
} // fin du constructeur
// =============================================================
// Fonction permettant d'afficher le cadre
function Affiche()
{
// On affiche le bandeau du haut avec le titre et la date
$this->affiche_CadreHaut(true);
// Puis on affiche le texte du cadre
require ($this->szFichier );
// Puis on fini par afficher le bandeau du bas du cadre
$this->affiche_CadreBas(true);
} // fin de la fonction Affiche()
} // fin de la classe CadreFichierPresse
// =============================================================
// Cette classe permet d'afficher les textes présents dans un fichier
// Présent sur le serveur
class CadreFichier extends Cadre {
// =====================================================
// Les Variables
var $szNomDossier; // contient le chemin ou est stocké le fichier
// =============================================================
// Constructeur de la classe
function CadreFichier($szNomFichier,$def=1)
{
$this->szBgColor = "#eeea9c";
// On initialise le nom du dossier ou sont sauvé les testes
if ( $def >= 1 )
$this->szNomDossier = "./Textes/";
else
$this->szNomDossier = "./";
//$this->szTabTexte = array();
// On ouvre dans un premier temps le fichier et on extrait les données
$bResultat= $this->OuvreFichier($szNomFichier, $def);
} // Fin du constructeur
// =============================================================
// Cette fonction ouvre le fichier passé en paramètre
// Retourne 1 s'il c'est bien ouvert
// faut sinon
function OuvreFichier($szNomFichier, $action)
{
$bTrouveTitre=0;
$i=0;
// On creer le chemin complet du fichier
$szChemin = "$this->szNomDossier$szNomFichier";
// On récupere la date de dernière modification du fichier
$this->szDateTexte = date( "d/m/Y H:h:i", filemtime( $szChemin) );
// Puis on ouvre
$pFichier = fopen($szChemin,"r");
if ($pFichier == false) {
echo "le fichier n'existe pas et voila";
return 1;
}
while ( feof($pFichier) != 1 ) {
$szLigne = fgets($pFichier,120);
if ($action == 1) {
if ( $bTrouveTitre == 0 ) {
$bresul = $this->ChercheTitre($szLigne);
if ($bresul == 1)
$bTrouveTitre = 1;
} // fin if
else {
if ( $this->ChercheChapitre($szLigne, true) == false )
$this->szTabTexte.= $szLigne;
//$this->szTabTexte[$i] = $szLigne;
$i++;
} // fin else
}
else
$this->szTabTexte.= $szLigne;
} // fin while
$this->nLongTexte = $i;
// Puis on ferme le fichier
fclose ($pFichier);
return 1;
} // fin de la fonction OuvreFichier($szNomFichier)
// =============================================================
// Cette fonction recherche le titre du document. Si elle le trouve
// elle le sauvegarde dans sa variable et retourn 1 . 0 sinon
function ChercheTitre($szChaine )
{
// On creer un tablo qui contiendra la chaine coupée
$tablo = array();
$tablo = explode("=", $szChaine );
// puis on enleve les espaces inutile
$PartieGauche = trim ($tablo[0]);
// Puis on regarde si la partie gauche correspond au mot titre
if (strcmp("TITRE",$PartieGauche) == 0) {
// Si on a trouvé le titre a lors on le sauvegarde
$this->szTitreCadre = $tablo[1];
// puis on retourne 1
return true;
} // fin if
else
// sinon on retourne 0
return false;
}
}
?>

179
Scripts/calendar.php3 Executable file
View File

@@ -0,0 +1,179 @@
<?require "msg_french.inc.php3";?>
<HTML>
<HEAD>
<TITLE> Calendrier - <? echo $msgCalendar ?></TITLE>
<style type="text/css">
<!--
body { font-family: Arial, Helvetica, sans-serif; font-size: 9pt}
input { font-family: Arial, Helvetica, sans-serif; font-size: 8pt; background-color: #CCCCCC}
select { font-family: Arial, Helvetica, sans-serif; font-size: 8pt; background-color: #CCCCCC}
a { font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #666666; text-decoration: none}
-->
</style>
</HEAD>
<BODY>
<?
// get all the info
if (!$HTTP_POST_VARS) {
$theDate = getdate();
$mon = $theDate["mon"]; // numeric month (1-12)
$month = $theDate["month"]; // display month january, feb..
$year = $theDate["year"]; // 4 digit year (y2k compliant)
}
if ($action = "findDate") {
$theDate = getdate(mktime(0,0,0,$mon,1,$year));
$month = $theDate["month"];
}
// get what weekday the first is on
$tempDate = getdate(mktime(0,0,0,$mon,1,$year));
$firstwday= $tempDate["wday"];
// get the last day of the month
$cont = true;
$tday = 27;
while (($tday <= 32) && ($cont)) {
$tdate = getdate(mktime(0,0,0,$mon,$tday,$year));
if ($tdate["mon"] != $mon) {
$lastday = $tday - 1;
$cont = false;
}
$tday++;
}
?>
<table border="0" cellspacing=0 cellpadding=2 width="250" align="center">
<tr>
<td colspan="7">
<table border="0" align="center">
<tr valign="middle">
<td align="center" >
<FORM METHOD="POST" ACTION="<? echo basename($PHP_SELF)."?table=$table&period=$period"; ?>">
<INPUT TYPE="HIDDEN" NAME="action" VALUE="findDate">
<INPUT TYPE="HIDDEN" NAME="mon" VALUE="<?
if (($mon-1)<1) { echo "12"; }
else { echo $mon-1; } ?>">
<INPUT TYPE="HIDDEN" NAME="year" VALUE="<?
if (($mon-1)<1) { echo $year-1; }
else { echo $year; } ?>">
<input type="image" border="0" name="imageField2" src="./image/left_btn.gif" width="32" height="22" align="middle">
</FORM>
</TD>
<TD ALIGN="CENTER" valign="top"><? echo $msgMonthsArray[$mon-1]." ".$year ?></TD>
<TD align="center" height="19">
<FORM METHOD="POST" ACTION="<? echo basename($PHP_SELF)."?table=$table&period=$period"; ?>">
<INPUT TYPE="HIDDEN" NAME="action" VALUE="findDate">
<INPUT TYPE="HIDDEN" NAME="mon" VALUE="<?
if (($mon+1)>12) { echo "1"; }
else { echo $mon+1; } ?>">
<INPUT TYPE="HIDDEN" NAME="year" VALUE="<?
if (($mon+1)>12) { echo $year+1; }
else { echo $year; } ?>">
<input type="image" border="0" name="imageField" src="./image/right_btn.gif" width="32" height="22" align="middle">
</FORM></td></tr></table>
</td></tr>
<tr bgcolor="#CCCCCC">
<th><? echo $msgDaysShortArray[0] ?></th>
<th><? echo $msgDaysShortArray[1] ?></th>
<th><? echo $msgDaysShortArray[2] ?></th>
<th><? echo $msgDaysShortArray[3] ?></th>
<th><? echo $msgDaysShortArray[4] ?></th>
<th><? echo $msgDaysShortArray[5] ?></th>
<th><? echo $msgDaysShortArray[6] ?></th>
</tr>
<? $d = 1;
$thisDay = date('d');
$thisMon = date('n');
$thisMon = date('n');
# $thisMonth = date('F');
$thisYear = date('Y');
$wday = $firstwday;
$firstweek = true;
// loop through all the days of the month
while ( $d <= $lastday) {
// set up blank days for first week
if ($firstweek) {
echo "<TR>";
for ($i=1; $i<=$firstwday; $i++) {
echo "<TD> </td>";
}
$firstweek = false;
}
if ($wday==0) {
// Sunday start week with <tr>
echo "<tr>";
}
// print cell
//
// $lnk_f = "index2.php3?table=".$table."&reqdate=".strtotime("$year-$mon-$d")."&reset=0&period=$period";
$lnk_f = "index2.php3?table=".$table."&reqdate=".mktime(0,0,0,$mon,$d,$year)."&reset=0&period=$period";
$lnk = "<a href=\"#\" onClick=\"window.open('$lnk_f','original','')\">".$d."</a>";
echo "<td";
if (($d == $thisDay) && ($mon == $thisMon)) { echo " BGCOLOR=\"#FFFFCC\""; }
#echo "> $d </td>";
echo " ><div align=\"center\"> $lnk </div></td>";
if ($wday==6) {
// Saturday end week with </tr>
echo "</tr>\n";
}
$wday++;
$wday = $wday % 7;
$d++;
}
?>
<TR bgcolor="#CECFCE">
<TD COLSPAN="7" ALIGN="CENTER"><? echo $msgToday ?> :<b>
<?
echo $msgDaysArray[date("w")] ." ";
echo date("j").(date("j") == 1 ? "er " : " ");
echo $msgMonthsArray[date("n")-1]." ".date("Y");
?></b>
</TD>
</TR>
<TR>
<TD COLSPAN="7" ALIGN="CENTER"><FORM METHOD="POST" ACTION="<? echo basename($PHP_SELF)."?table=$table&period=$period"; ?>">
<INPUT TYPE="HIDDEN" NAME="action" VALUE="findDate">
<br>
<SELECT NAME="mon">
<OPTION VALUE="<? echo $thisMon; ?>"><? echo $msgMonthsArray[$thisMon-1]; ?></OPTION>
<OPTION VALUE="<? echo $thisMon; ?>">--------------</OPTION>
<OPTION VALUE="1"><? echo $msgMonthsArray[0] ?></OPTION>
<OPTION VALUE="2"><? echo $msgMonthsArray[1] ?></OPTION>
<OPTION VALUE="3"><? echo $msgMonthsArray[2] ?></OPTION>
<OPTION VALUE="4"><? echo $msgMonthsArray[3] ?></OPTION>
<OPTION VALUE="5"><? echo $msgMonthsArray[4] ?></OPTION>
<OPTION VALUE="6"><? echo $msgMonthsArray[5] ?></OPTION>
<OPTION VALUE="7"><? echo $msgMonthsArray[6] ?></OPTION>
<OPTION VALUE="8"><? echo $msgMonthsArray[7] ?></OPTION>
<OPTION VALUE="9"><? echo $msgMonthsArray[8] ?></OPTION>
<OPTION VALUE="10"><? echo $msgMonthsArray[9] ?></OPTION>
<OPTION VALUE="11"><? echo $msgMonthsArray[10] ?></OPTION>
<OPTION VALUE="12"><? echo $msgMonthsArray[11] ?></OPTION>
</SELECT>
<SELECT NAME="year">
<OPTION VALUE="<? echo $thisYear; ?>"><? echo $thisYear; ?></OPTION>
<OPTION VALUE="<? echo $thisYear; ?>">--------</OPTION>
<OPTION VALUE="2000">2000</OPTION>
<OPTION VALUE="2001">2001</OPTION>
<OPTION VALUE="2002">2002</OPTION>
<OPTION VALUE="2003">2003</OPTION>
<OPTION VALUE="2004">2004</OPTION>
<OPTION VALUE="2005">2005</OPTION>
<OPTION VALUE="2006">2005</OPTION>
<OPTION VALUE="2007">2005</OPTION>
<OPTION VALUE="2008">2005</OPTION>
</SELECT>
<input type="image" border="0" name="imageField3" src="./image/ok_btn.gif" width="59" height="18">
</FORM></TD></TR>
</table>
</body>
</html>

123
Scripts/compteur.php Normal file
View File

@@ -0,0 +1,123 @@
<?
/*
*********************************************************************
* File : $RCSfile: compteur.php,v $
* Version : $Revision: 1.2 $
* Modified by : $Author: jb $ ($Date: 2002/07/24 23:34:59 $)
*********************************************************************
Classe Compteur
v 0.2 : NADAL Jean-Baptiste : 06 03 2001
V 0.01 : NADAL Jean-Baptiste : 02 10 2000
Description : Cette classe permet d'afficher le nombre de visiteurs de
la page index du site de l'Harmonie
*/
class Compteur {
// =============================================================
// Les Variables
var $nNbVisiteurs,$topdir; /* Nombre de visiteurs sur le site. */
// =============================================================
// Les Fonctions
// =============================================================
// Constructeur de la classe
function Compteur ($nTypeAffichage)
{
//echo $pwd;
//$pwd = dirname(__FILE__);
//echo $pwd;
//$this->topdir = "$pwd/../..";
//$this->topdir = "$pwd/..";
// On met à jour la variable du compteurr
if ( $nTypeAffichage==1)
$this->Update ($nTypeAffichage);
else
{
$cheminCompteur = "./compteur/compteur.txt";
$fp = file($cheminCompteur);
$this->nNbVisiteurs = $fp[0];
}
// On affiche le compteur
// $this->Affiche();
}
// =============================================================
// Retourne la valeur du compteur sous la forme du chaine de caractère
function GetCompteur()
{
return $this->nNbVisiteurs;
}
// =============================================================
// Méthode permettant de charger la valeur du compteur
function Update ($nTypeA)
{
//ouverture du fichier stockant le nombre de visiteur
$cheminCompteur = "./compteur/compteur.txt";
// Sinon c'est que l'on est sur n'importe quel page du site
if ( $nTypeA == 1 )
{
$fp=fopen($cheminCompteur,"r+");
$nblocal =fgets($fp,10);
// On place ensuite le pointeur sur le debut du fichier
fseek($fp,0);
// On incremente le nombre de visiteur de 1
$nblocal+=1 ;
fputs($fp,$nblocal);
fclose($fp);
$this->nNbVisiteurs = $nblocal;
// echo "<h1>on enregistre : <$nblocal> \n</h1>";
} // fin if ( $nTypeAffichage == 1 )
//$this->nNbVisiteurs = $nblocal;
//echo "<h1>nb : <$this->nNbVisiteurs> \n</h1>";
}
// =============================================================
// Cette fonction affiche le compteur sous la forme du'une image
function Affiche()
{
// On va travailler sur une copie du nombre de visiteurs
$nNbVis_copy = $this->nNbVisiteurs;
// On transforme la variable en chaine de caractère pour le traitement
settype($nNbVis_copy, "string");
//Il faut aussi introduire un séparateur (ici le ;) entre chaque chiffre, afin de
//pouvoir les dissocier
$data=ereg_replace("0", ";0", $nNbVis_copy);
$data=ereg_replace("1", ";1", $data);
$data=ereg_replace("2", ";2", $data);
$data=ereg_replace("3", ";3", $data);
$data=ereg_replace("4", ";4", $data);
$data=ereg_replace("5", ";5", $data);
$data=ereg_replace("6", ";6", $data);
$data=ereg_replace("7", ";7", $data);
$data=ereg_replace("8", ";8", $data);
$data=ereg_replace("9", ";9", $data);
//On eclate le nombre en tableau selon le séparateur que l'on a introduit.
$tableau=explode(";",$data);
// Puis on prépare l'affichage de l'image ddu compteur
echo"<center><table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"> <tr><td><img src=\"$topdir/compteur/deb.gif\" alt=\"\"></td>";
// Puis pour chaque élément du tableau qui vient d'être créé
while(list($element,$valeur)=each($tableau))
{
//Comme le tableau débute par ; on réfute le premier élément du tableau soit tableau[0]
if($element != 0)
{
//on affiche l'image correspondant au chiffre
echo"<td><img src=\"$topdir/compteur/$valeur.gif\" alt=\"$valeur\"></td>";
} // fin if($element != 0)
} // fin while(list($element,$valeur)=each($tableau))
// Puis pour terminer, on affiche une image pour terminer le cadre et
// Afficher ème visiteur
echo"<td><img src=\"$topdir/compteur/visites.gif\" alt=\"visites\"></td></tr></table></center>";
}
} // fin de la classe compteur

92
Scripts/conf.php Executable file
View File

@@ -0,0 +1,92 @@
<?
/***************************************************************************
conf.php - Configration file
-------------------
begin : Fri Feb 02 18:16:30 UTC 2001
copyright : (C) 2002 by NADAL Jean-Baptiste
email : jbnadal@ifrance.com
***************************************************************************
*
* This file contain all the necessary variables used by the connexion.
*
***************************************************************************
* *
* 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. *
* *
***************************************************************************
* $Id: conf.php,v 1.15 2005/04/17 15:55:57 jb Exp $
***************************************************************************/
/* Num<75>ro de version du site. */
$numVersion = "1.4.21";
/* Nom du serveur sur lequel est situ<74> MySql. */
$sql_serveur = "localhost";
/* Nom de la base de donn<6E>es. */
$sql_bdd = "ohmj2";
/* Nom de l'utilisateur autoris<69> a travaill<6C> sur la base ohmj. */
$sql_user = "ohmj2";
$racine = "/ohmj";
$page_index = "index.php";
$url_erreur="$racine/$page_index?page=erreur";
/* Mot de passe pour se connect<63> sur le serveur SQL. */
$sql_passwd = "2j9eywip";
/* The name of the differents tables. */
$table_forum = "forum";
$table_users = "users";
$table_repertoire = "repertoire";
/* Special states for users. */
$USER_ADMIN = 1;
$MODERATOR = 2;
/* Special states for */
$MENU_GENERAL = 1;
$MENU_MEMBRE = 2;
$MENU_ADMIN = 4;
$MENU_MOD = 8;
// Nom des tables pour les statistiques
// Table comptenant les compteurs journali<6C>s
$table_compteur = "stat_compteur";
// Table contenant les site qui reference lz site de l'ajem
$table_referenceur = "stat_referenceur";
// Table contenant les infomration sur les visiteurs
$table_visiteur = "logezboo";
//Table contenant les news du site
$table_news = "news";
/* Table de l'album photo. */
$table_APhotos = "album_photos";
/* Name of the directories where is store the photo Album. */
$AlbumRoot = "albums";
$table_agenda="agenda";
$table_liens="liens";
// Tables des stats
$table = "logezboo";
// Nom du domaine du site utile pour le r<>f<EFBFBD>rencement
$domaine = "www.ohmj.fr.st";
$KeyAdmAlbm = "AdmAlbums";
/* ---Global forum-informations --- */
$carac = "50"; // nombre de caract<63>res dans le titre
$limit = "50"; // nombre de message <20> afficher dans la page Index
$webmail = "jbnadal@ifrance.com"; // l'email du webmaster
?>

33
Scripts/download.php Normal file
View File

@@ -0,0 +1,33 @@
<?php
/*
*********************************************************************
* File : $RCSfile: download.php,v $
* Version : $Revision: 1.1.1.1 $
* Modified by : $Author: jb $ ($Date: 2002/03/10 17:13:32 $)
*********************************************************************
*/
require "conf.php";
require "ErreurConnect.php";
jb_sql_connect(true);
//mysql_connect($sql_serveur, $sql_user, $sql_passwd) or die("Impossible de se connecter");
mysql_select_db($sql_bdd);
if ($mode=="normal")
{
if ( $adminCOO != "oui" )
mysql_query("UPDATE download SET nbhits=nbhits+1 where id='$id'");
$query=mysql_query("SELECT url FROM download WHERE id='$id'");
$szurl=mysql_fetch_row($query);
}
else
{
if ( $adminCOO != "oui" )
mysql_query("UPDATE download SET nbhits_mini=nbhits+1 where id='$id'");
$query=mysql_query("SELECT url_mini FROM download WHERE id='$id'");
$szurl=mysql_fetch_row($query);
}
//echo " <html> URL : $szurl[0]<br> id = $id<br>";
header("location:$szurl[0]");
?>

230
Scripts/homeAdmin.php Normal file
View File

@@ -0,0 +1,230 @@
<?
/***************************************************************************
homeAdmin.php - Configration file
-------------------
begin : Mars UTC 2001
copyright : (C) 2002 by NADAL Jean-Baptiste
email : jbnadal@ifrance.com
***************************************************************************
*
* Page Principale pour l'administration du site de l'Harmonie de
* Montpellier-Jacou
*
***************************************************************************
* *
* 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. *
* *
***************************************************************************
* $Id: homeAdmin.php,v 1.6 2002/07/24 23:34:59 jb Exp $
***************************************************************************/
require "conf.php";
require "Archi.php";
include "cadre.php";
include "lib_print_admin.php";
require "ErreurConnect.php";
/* On vérifie avant d'afficher quoi que ce soit que la requete est valide
* Connexion au serveur de BDD */
$connexion = jb_sql_connect(true);
/* On verifie que la page appellée contient bien le meme identifiant que la
* page enregistrée sur la base*/
$requete=mysql_db_query($sql_bdd, "select pseudo from $table_users ".
"where id=\"$id\"", $connexion);
/* Si l'Id est différent -> Alors on affiche la page d'erreur */
$resultat = mysql_num_rows($requete);
/* On a terminé avec la connexion avec la base -> On ferme la connexion */
mysql_close($connexion);
if($resultat == 0) {
/* Redirection vers la page d'erreur */
header("Location:$url_erreur");
}
else {
/* Sinon On Affiche l'ossature du site */
$pOssature = new Archi ("HautAdmin.html", "", "");
$pOssature->AffichePartieHaut(0, 0);
echo "<center><b><font face=\"Verdana, Arial, Helvetica, sans-serif\" ".
"size=\"7\" color =red>\n";
echo "ADMINISTRATION DU SITE </font></b><br><br>\n";
/* Puis on affiche le cadre qu'il faut celon la page qui a été demandée */
switch ($page) {
case "M_edito" :
if ($action == "valider") {
MiseAjourTable($id, $titre, $texte, $datecourante, "cadre_edito",
"Editorial");
include ("news.php");
$mesNews = new News($id);
$mesNews->Ajoute(1, $datecourante, "");
}
else
AfficheModeficationCadreDB($action, $id, "cadre_edito", "M_edito");
break;
case "M_Hist" :
if ($action == "valider") {
MiseAjourTable($id, $titre, $texte, $datecourante,
"cadre_Historique", "Historique");
include ("news.php");
$mesNews = new News($id);
$mesNews->Ajoute(2, $datecourante, "");
}
else
AfficheModeficationCadreDB($action, $id, "cadre_Historique",
"M_Hist");
break;
case "M_revue" :
if ($action == "valider") {
MiseAjourTable($id, $titre, $texte, $datecourante,
"cadre_la_Revue", "La Revue");
include ("news.php");
$mesNews = new News($id);
$mesNews->Ajoute(11, $datecourante, "");
}
else
AfficheModeficationCadreDB($action, $id, "cadre_la_Revue",
"M_revue");
break;
case "M_Fonctionnement" :
if ($action =="valider") {
MiseAjourTable($id, $titre, $texte, $datecourante,
"cadre_Fonctionnement", "Fonctionnement");
include ("news.php");
$mesNews = new News($id);
$mesNews->Ajoute(5, $datecourante, "");
}
else
AfficheModeficationCadreDB($action, $id, "cadre_Fonctionnement",
"M_Fonctionnement");
break;
case "M_Contacts" :
if ($action == "valider") {
MiseAjourTable($id, $titre, $texte, $datecourante,
"cadre_Contacts", "Contacts");
include ("news.php");
$mesNews = new News($id);
$mesNews->Ajoute(6, $datecourante, "");
}
else
AfficheModeficationCadreDB($action, $id, "cadre_Contacts",
"M_Contacts");
break;
case "ModRepIndex" :
if ($action == "valider")
MiseAjourTable($id, $titre, $texte, $datecourante,
"cadre_Repertoire", "Repertoire");
else {
AfficheModeficationCadreDB($action, $id, "cadre_Repertoire",
"ModRepIndex");
}
break;
case "M_Recrutement" :
if ($action == "valider") {
include ("news.php");
MiseAjourTable($id, $titre, $texte, $datecourante,
"cadre_Recrutement", "Recrutement", $nligneTable);
$mesNews = new News($id);
$mesNews->Ajoute(7, $datecourante, "");
}
else {
if ($nligneTable == "")
print_AdminRecrutement($nligneTable, $id);
else
AfficheModeficationCadreDB($action, $id, "cadre_Recrutement",
"M_Recrutement", $nligneTable);
}
break;
case "AdmLivOR" :
print_AdminLivre_OR($livorPage);
break;
case "AdmDownload" :
include "Annuaire.php";
print_Admindownload($id, $action, $elem, $nom, $url, $description,
$urlmini, $sizeurl, $sizeurlmini);
break;
case "AdmUsers":
include "AnnuUsers.php";
print_AdmUsers($id,$action, $elem, $pseudo, $password, $email,
$state);
break;
case "AdmLinks" :
include "Annuaire.php";
print_AdminLinks($id, $action, $elem, $nom, $url, $description,
$type);
break;
case "M_Rep" :
include "AnnuRepertoire.php";
print_AdminRepertoire($id, $action, $elem, $num, $nom, $compositeur,
$style);
break;
case "M_InfoC" :
include "AnnuAgenda.php";
/* On va formater les différents paramètres afin de pouvoir remplir
* les champs. On commence par la liste des morceaux
*/
if (($nAction == "ValideAjouter") || ($nAction == "ValideModifier"))
{
$deb=0;
for ($i=1; $i <= $nbmorceaux; $i++) {
if ($deb == 0)
$listemorceaux = ${"morceau_".$i};
else
$listemorceaux = $listemorceaux.";".${"morceau_".$i};
$deb++;
}
/* Puis la date que l'on passe au format php. */
$datephp = mktime($heure, $Mins, 0, $month, $day, $year);
if ($day <= 9)
$day = "0$day";
if ($month <= 9)
$month = "0$month";
$dateTexte = "$day / $month / $year";
$heuredeb = "$heure h $Mins";
/* echo "nb morceaux $nbmorceaux <br>
heure : $heure <br>
Mins : $Mins<br>
vile : $ville <br>
lieu : $lieu <br>
Jour : $day <br>
Mois : $month<br>
Année : $year<br>
elem : $elem<br>
commentaire : $commentaire <br>
nbmorceaux : $nbmorceaux <br>
morceaux : $listemorceaux <br>\n";*/
} // fin if
print_AdminAgenda($id, $nAction, $elem, $dateTexte, $datephp,
$heuredeb, $ville, $lieu, $listemorceaux,
$commentaire, $Forcenb);
break;
case "SuppElemLVOR" :
print_Supp_Element_Liv_OR($id, $num_id, $action);
break;
case "StatSite" :
//print_Statistique($id,$mois,$moistexte,$annee,$mod);
print_Statistique($id);
/*AfficheErreur(
"Désolé, cette fonction n'est pas encore implémentée",
date("d/m/Y H:i") );
*/
break;
case "Journal" :
print_Journal_Modification();
break;
case "AdmNews":
print_News($id, $numNews, $datecourante, $newsTxt);
break;
default:
break;
}
$pOssature->AffichePartieBas();
}
?>

47
Scripts/img2.php3 Executable file
View File

@@ -0,0 +1,47 @@
<?php
// Header("Content-type: image/gif");
Header("Content-type: image/jpeg"); //if your php support JPEG
$img_width=350;
$img_height=200;
$title_font=5;
$im = imagecreate($img_width,$img_height);
$fond_img = imageColorAllocate($im, 204, 204, 204);
$noir=imageColorAllocate($im, 0, 0, 0);
$fond=imageColorAllocate($im,255,255,204);
$couleur_barre=imageColorAllocate($im,204,204,255);
ImageString($im,$title_font,($img_width-ImageFontWidth($title_font)*strlen($title))/2,0,$title,$noir);
#Draw rectangle which contain bars
imagefilledrectangle($im,25,20,$img_width-10,$img_height-10,$fond);
# Manage data
$valeurs = explode(";",$sval);
$img_width_barre=(int)(($img_width-22)/(1.5*sizeof($valeurs)+0.5));
# $max = max($valeurs);
# Max function does not work correctly in php < 4
for ($i=0;$i<sizeof($valeurs);$i++) {
if ($valeurs[$i]>$max) { $max = $valeurs[$i]; }
}
#Draw bars
for ($i=0;$i<sizeof($valeurs);$i++) {
$x=25+(int)($img_width_barre*(0.5+$i*1.5));
$img_height_barre=(int)(($valeurs[$i]*($img_height-40))/$max);
imagefilledrectangle($im,$x,$img_height-15-$img_height_barre,$x+$img_width_barre,$img_height-15,$couleur_barre);
if ($valeurs[$i] == $max) {
ImageString($im,2,4,($img_height-15-$img_height_barre)-(ImageFontHeight(2)/2),$valeurs[$i],$noir);
imageline($im,20,$img_height-15-$img_height_barre,$img_width-2,$img_height-15-$img_height_barre,$fond_img);
}
# write x axis every 2 hours
if (($i % 2)==0) ImageString($im,1,$x,$img_height-9,$i,$noir);
}
ImageString($im,2,0,0,"hits",$noir);
ImageString($im,1,($img_width-ImageFontWidth(1)*strlen("H")),$img_height-9,"heures",$noir);
// ImageGIF($im);
ImageJPEG($im);
ImageDestroy($im);
?>

5
Scripts/index.html Normal file
View File

@@ -0,0 +1,5 @@
<html>
<br><br><br><br>
<H1> <b>ERREUR JB 405</b> : Vous n'avez rien a voir dans ce répertoire !!!</h1>
<br><br> <center><h1>D&eacute;sol&eacute; :-) </h1> </center>
</html>tml>tml>

View File

@@ -0,0 +1,790 @@
<?php
/*
*********************************************************************
* File : $RCSfile: lib_print_ajem.php,v $
* Version : $Revision: 1.15 $
* Modified by : $Author: jb $ ($Date: 2005/04/17 16:44:32 $)
*********************************************************************
*/
// On a besoin du fichier de configuration général du site
require("./Scripts/conf.php");
function print_editorial()
{
global $racine;
/* On creer un objet Cadre pour l'édito */
$pMonCadre = new CadreBD("news");
$pMonCadre->setTitre("News");
$pMonCadre->affiche_CadreHaut(true);
$donneeCadre = $pMonCadre->GetDataDB();
echo "<table cellspacing=\"0\" cellpadding=\"0\"
border=\"0\" width=\"100%\">\n";
echo "<tr> <td width=\"110%\">" ;
echo "<table cellspacing=\"0\" cellpadding=\"1\" border=\"0\">\n";
for ($cpt = 0; $cpt < 3; $cpt++) {
/* On recupere les données */
$RESnouvelle = mysql_result($donneeCadre, $cpt, "nouvelle");
$RESdate = mysql_result($donneeCadre, $cpt, "date");
if ($RESnouvelle != "") {
echo "<tr>\n";
echo "<td valign=\"middle\" align=\"center\" width=\"10%\" >\n
<img src=\"$racine/Imgs/icon_puce_over.gif\" border=\"0\"
alt=\"*\" />
</td>\n
<td class=\"news\">\n";
echo "<b>$RESdate</b>: $RESnouvelle\n </td> </tr>";
}
}
echo "</table><br/>\n";
echo "</td><td>\n
<!-- Fil RSS UMH -->\n
<div align=\"center\">\n
<a href=\"http://um34.free.fr/\" target=\"_blank\">\n
<img src=\"http://feeds.feedburner.com/um34.5.gif\"\n
Alt=\"Union Musicale de l'Hérault\"\n
Title=\"Union Musicale de l'Hérault\"\n
style=\"border:0\">\n
</a>\n
</div>\n
<!-- /Fil RSS UMH -->\n
</td></tr></table>\n";
$pMonCadre->affiche_CadreBas(true);
/* On creer un objet Cadre pour l'édito */
$pMonCadre = new CadreBD("cadre_edito");
$pMonCadre->Affiche();
}
function print_histoire()
{
/* On creer un objet Cadre de type fichier */
$pMonCadre = new CadreBD("cadre_Historique") ;
$pMonCadre->Affiche();
}
function print_Recrutement($num)
{
$pMonCadre = new CadreBD("cadre_Recrutement", $num);
$pMonCadre->Affiche();
}
function print_Liens()
{
$pMonCadre = new Cadre("Liens", "", "");
$pMonCadre->affiche_CadreHaut(true);
print_typeLien(1, "Orchestres d'Harmonie");
print_typeLien(2, "Sites sur la musique");
print_typeLien(3, "Autour de Montpellier");
$pMonCadre->affiche_CadreBas(true);
}
function print_typeLien($idlien, $szNomLien)
{
// Les variables locales
global $sql_bdd;
global $table_liens;
global $racine;
// Fin des variables locales
/* On se connecte sur la base */
$connect_db = jb_sql_connect(false);
CreerTitre($szNomLien);
echo "<center><table width=\"95%\" border=0>";
$resultat = mysql_db_query($sql_bdd, "select * from $table_liens where".
" type='$idlien'", $connect_db);
while ($row = mysql_fetch_row($resultat)) {
echo"<tr bgcolor=\"#DDDDDD\">\n";
echo "<td width=80% align=center>
<a href=\"$racine/Scripts/redirect.php?id=$row[0]\" ".
"target='_blank' > <font size=-1>$row[1]</font></a> </td>\n";
echo "<td> ($row[3] hits) </td></tr>\n";
echo "<tr bgcolor=\"#CCCCCC\">\n";
echo "<td >$row[4] </td><td>&nbsp;</td></tr>\n";
}
echo "</table> </center><br><br>";
}
function print_Musique_enLigne()
{
global $racine;
include ("./Scripts/Annuaire.php");
$pMonCadre = new Cadre("Musique en Ligne", "", "");
$pMesDownload = new AnnuDownload("download","AdmDownload", "");
$pMonCadre->affiche_CadreHaut(true);
$intro = "<p class=\"cadre\">
pour écouter les morceaux aux formats <b>mp3</b>,
vous pouvez utiliser le logiciel suivant :
<center><a href=\"http://www.winamp.com\" target=outside>
<img src=\"$racine/Imgs/winampbutton.gif\" width=\"88\" ".
"height=\"31\" border=0></a>
</center></p><br>\n";
$pMesDownload->AfficheDownload($intro);
$pMonCadre->affiche_CadreBas(true);
}
function print_Video_enLigne ()
{
$SiteRoot = dirname ($GLOBALS['HTTP_SERVER_VARS']['SCRIPT_FILENAME']);
include ("./Scripts/Video.php");
$pMonCadre = new Cadre("Videos en Ligne", "", "");
$pMesVideos = New VideoEntries ($SiteRoot, "/videos/");
$pMonCadre->affiche_CadreHaut(true);
$pMesVideos->Affiche ();
$pMonCadre->affiche_CadreBas(true);
}
function print_info_concerts($opt, $id)
{
$date_maintenant = time() ;
$pMonCadre = new Cadre("Agenda de l'Orchestre", "", "");
$pMonCadre->affiche_CadreHaut(true);
if ($opt == "ancien")
print_concert("-", $date_maintenant, $id);
else
print_concert("+", $date_maintenant, $id);
$pMonCadre->affiche_CadreBas(true);
}
function print_concert($type, $date, $idconcert)
{
// Les variables locales
global $sql_bdd;
global $table_agenda;
// Fin des variables locales
$monthsArray = array("janvier", "février", "mars", "avril", "mai", "juin",
"juillet", "août", "septembre", "octobre", "novembre",
"décembre");
$daysArray=array("Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi",
"Vendredi", "Samedi");
if ($idconcert == "")
{
$connect_db = jb_sql_connect(false);
if ($type == "+") {
$resultat = mysql_db_query($sql_bdd, "select * from $table_agenda ".
"order by date_php", $connect_db);
echo "<center> [ <a href=$page_index?page=info_concerts&opt=ancien>".
" Voir les anciens concerts et leurs commentaires</a> ]
</center><br><br>";
}
else {
$resultat = mysql_db_query($sql_bdd,"select * from $table_agenda ".
"order by date_php desc",$connect_db);
echo "<center> [ <a href=$page_index?page=info_concerts>
Retour aux prochains concerts </a> ] </center><br><br>";
}
$btrouve = 0;
while ($row = mysql_fetch_row($resultat)) {
$datephp = $row[2];
/* On affiche les futurs concerts. */
if ((($type == "+") && ($datephp >= $date)) ||
(($type == "-") && ($datephp <= $date))) {
$id = $row[0];
$szheure = $row[3];
$szVille = $row[4];
$szLieu = $row[5];
$liste_morceaux = $row[6];
$commentaire = $row[7];
$dateConcert = getdate($datephp);
$jour = $daysArray[$dateConcert["wday"]];
$NumJour = $dateConcert["mday"];
$mois = $monthsArray[$dateConcert["mon"]-1];
$annee = $dateConcert["year"];
echo"<center>\n";
CreerPubConcert($jour, $NumJour, $mois, $annee, $szVille, $szLieu,
$szheure, $commentaire, $id, $liste_morceaux);
echo"</center><br><br>\n";
$btrouve = 1;
}
}
if ($btrouve == 0)
echo "<br><br><center> Il n'y a aucun Concert de planifié pour".
" le moment.
</center><br>";
}
else {
/* Si ON souhaite avoirt des infos sur un concert particulier */
$connect_db = jb_sql_connect(false);
$resultat = mysql_db_query($sql_bdd, "select * from $table_agenda where".
" id=$idconcert", $connect_db);
$szheure = mysql_result($resultat, 0, "heure_deb");
$szVille = mysql_result($resultat, 0, "ville");
$szLieu = mysql_result($resultat, 0, "lieu");
$liste_morceaux = mysql_result($resultat, 0, "liste_morceaux");
$commentaire = mysql_result($resultat, 0, "commentaire");
$datephp = mysql_result($resultat, 0, "date_php");
$dateConcert = getdate($datephp);
$jour = $daysArray[$dateConcert["wday"]];
$NumJour = $dateConcert["mday"];
$mois = $monthsArray[$dateConcert["mon"]-1];
$annee = $dateConcert["year"];
echo "<center>";
CreerTitre("$szVille - $szLieu");
echo "</center><br><br>";
echo "<center><table border=0 width=\"95%\">
<tr bgcolor=\"#DDDDDD\"><td align=center> Le $jour $NumJour".
" $mois $annee à $szheure </td>
</tr></table><br><br>";
echo "<center><table border=0 width=\"95%\">
<tr bgcolor=\"#CCCCCC\"><td > $commentaire </td>
</tr></table><br><br>";
CreerListeMorceau($liste_morceaux);
}
}
function print_repertoire($style)
{
if ($style == "") {
$pMonCadre = new CadreBD("cadre_Repertoire");
$pMonCadre->affiche_CadreHaut(true);
echo "$pMonCadre->szTabTexte";
echo "<ul>\n";
echo "<li><a href=$page_index?page=repertoire&opt=6 >
Musique originale pour Orchestre d'Harmonie </a></li>\n";
echo "<li><a href=$page_index?page=repertoire&opt=5 > Musique Classique".
" </a></li>\n";
echo "<li><a href=$page_index?page=repertoire&opt=4 > Musique de Film,".
"Comédie Musicale et Rock Opera </a></li>\n";
echo "<li><a href=$page_index?page=repertoire&opt=3 >".
" Danses et Musiques".
" Traditionnelles </a></li>\n";
echo "<li><a href=$page_index?page=repertoire&opt=2 >".
" Variétés Françaises".
" et Internationales </a></li>\n";
echo "<li><a href=$page_index?page=repertoire&opt=1 > ".
"Middle Jazz </a></li>\n";
echo "</ul><br><br>\n";
}
else {
$pMonCadre = new Cadre("Répertoire", "", "");
$pMonCadre->affiche_CadreHaut(true);
switch ($style) {
case "6" :
echo "<center>\n";
CreerTitre("Musique originale pour Orchestre d'Harmonie");
echo "</center><br><br>\n";
CreerCadreMorceau("Suites", 10);
CreerCadreMorceau("Marches et Polkas", 11);
CreerCadreMorceau("Pièces calmes", 12);
break;
case "3" :
echo "<center>\n";
CreerTitre("Danses et Musiques Traditionnelles");
echo "</center><br><br>\n";
CreerCadreMorceau("Pasos-dobles et Tangos", 20);
CreerCadreMorceau("Rythmes Latins", 21);
CreerCadreMorceau("Chansons du monde", 22);
break;
case "1" :
CreerCadreMorceau("Middle Jazz", $style);
break;
case "2" :
CreerCadreMorceau("Variétés Françaises et Internationales",
$style);
break;
case "4" :
CreerCadreMorceau("Musique de Film, Comédie Musicale et Rock".
" Opera", $style);
break;
case "5" :
CreerCadreMorceau("Musique Classique", $style);
break;
}
echo "<center><a href=$page_index?page=repertoire>< Retour >
</a></center><br><br> \n";
}
$pMonCadre->affiche_CadreBas(true);
}
function CreerListeMorceau($liste_morceaux)
{
// Les variables locales
global $sql_bdd;
global $table_repertoire;
// Fin des variables locales
$tablo = explode(";", $liste_morceaux);
$cpt = 0;
foreach ($tablo as $elem) {
$tab_list_select[$cpt] = $elem;
$cpt++;
}
/* On se connecte sur la base */
$connect_db = jb_sql_connect(false);
$resultat = mysql_db_query($sql_bdd, "select * from $table_repertoire ".
"order by id", $connect_db);
/* Puis on creer un tableau comtenant la totalité des morceaux */
$indTab = 1;
while($row = mysql_fetch_array($resultat))
{
$col_id = $row[0];
$col_nom = $row[2];
$col_compo = $row[3];
if ($indTab != $col_id) {
// print "<br>---- on augmente <br>";
for ($i = $indTab; $i < $col_id; $i++) {
// print "<br>---- on augmente <br>";
$tab_Morceau[] = array ($i, "0", "0");
}
$indTab = $col_id;
}
$tab_Morceau[] = array ($col_id, $col_nom, $col_compo);
$indTab++;
}
echo "<center><table border=0 width=\"95%\">
<tr>
<th bgcolor=\"#d5dee6\"> num </th>
<th bgcolor=\"#d5dee6\"> Nom </th>
<th bgcolor=\"#d5dee6\" >Compositeur</th>
</tr>\n";
for ($i = 0; $i < $cpt; $i++) {
$indice = $tab_list_select[$i];
$indice--;
list ($list_id, $list_nomMorceau, $list_compo) = $tab_Morceau[$indice];
if (($i % 2) == 0)
echo "<tr bgcolor=\"#DDDDDD\">\n";
else
echo "<tr bgcolor=\"#CCCCCC\">\n";
echo "<td>".($i + 1)."</td>\n";
echo "<td> $list_nomMorceau </td>\n";
echo "<td> $list_compo </td></tr>\n";
}
echo "</table> </center><br><br>";
}
function CreerCadreMorceau($titre, $style)
{
// Les variables locales
global $sql_bdd;
global $table_repertoire;
global $page_index;
// Fin des variables locales
CreerTitre($titre);
$connect_db = jb_sql_connect(false);
$resultat = mysql_db_query($sql_bdd, "select * from $table_repertoire".
" where style=$style order by numero",
$connect_db);
echo "<center><table border=0 width=\"95%\">
<tr>
<th bgcolor=\"#d5dee6\"> Nom </th>
<th bgcolor=\"#d5dee6\"> Compositeur </th>
</tr>\n";
while ($row = mysql_fetch_row($resultat)) {
if (($i % 2) == 0)
echo "<tr bgcolor=\"#DDDDDD\">\n";
else
echo "<tr bgcolor=\"#CCCCCC\">\n";
echo "<td>$row[2] </td>\n";
echo "<td>$row[3] </td> </tr>\n";
$i++;
}
MYSQL_CLOSE;
echo "</table></center><br><br><br>\n";
}
function CreerTitre($titre)
{
echo "<table width=\"50%\" bgcolor=\"#5a69a4\" cellpadding=\"0\" ".
" cellspacing=\"0\" border=\"0\"><tr><td>
<table width=\"100%\" cellpadding=\"3\" cellspacing=\"2\" border=\"0\" >
<tr>
<td bgcolor=\"#5b8cc1\" align=\"left\">
<font color=\"white\" size=\"2\">
<b> $titre </b></font><br></td>
</tr></table></td></tr></table><br>\n";
}
function CreerPubConcert($jour, $NumJour, $mois, $annee, $ville, $lieu,
$heure, $commentaire, $id, $liste_morceaux)
{
global $page_index;
echo "
<table border=1 width=\"65%\">\n<tr align=left>\n
<td align='left' valign='middle' bgcolor='#FFFF00'>
<table border='0'>\n<tr>\n
<td align='center' valign='middle' bgcolor='#000000'>
<font color='#F5E9CF'><b><font face='Arial, Helvetica,
sans-serif' color='#FFFF00'>$jour<br>
<font size='6'>$NumJour</font><br>$mois <br>$annee</font>
</b></font>\n </td>
<td align='center' valign='middle'>\n<p><b>
<font size='+1'>O.H.M.J.</font></b><br>
EN CONCERT<br> &agrave; <b><font size='+2'>$ville</font>
</b></p>\n<p>
$lieu - $heure \n</p> \n </td>\n </tr> \n
</table> \n</tr> \n";
if ($commentaire != "")
echo "<tr><td bgcolor=\"#DDDDDD\" ><font size=-1>$commentaire
</font></td></tr>\n";
if ($liste_morceaux != "")
echo "<tr><td align=center bgcolor=\"#CCCCCC\" >
<a href=$page_index?page=".
"info_concerts&id=$id> Voir la liste des morceaux joués </a>
</td></tr>\n";
echo "</table>\n";
}
function print_fonctionement()
{
$pMonCadre = new CadreBD("cadre_Fonctionnement");
$pMonCadre->Affiche();
echo "<br><br>\n";
// puis un deuxieme cadre pour les goupilleurs
$pMonCadre2 = new CadreFichier("realteam.neodoc");
$pMonCadre2->Affiche(1);
AfficheVersionDuSite();
$pMonCadre2->affiche_CadreBas(true);
}
function print_contacts()
{
/* On creer un objet Cadre */
$pMonCadre = new CadreBD("cadre_Contacts");
$pMonCadre->Affiche();
}
function print_repetition()
{
/* Cadre1: Ou se trouve Jacou par rapport a Montpellier. */
$pCadreJacou = new Cadre("<center>O&ugrave; se trouve Jacou par ".
"rapport &agrave; Montpellier</center>",
"" , date ("d/m/Y "));
$pCadreJacou->affiche_CadreHaut(true);
echo "<center><img src=\"http://ohmj2.free.fr/ohmj/Imgs/".
"JacouMontpellier.png ".
"\"alt=\"Jacou / Montpellier\"></center>\n";
$pCadreJacou->affiche_CadreBas(true);
/* Cadre2: Ou se trouve La salle de repetition. */
$pCadreSallePrevert = new Cadre("<center>O&ugrave; se trouve la salle de ".
"r&eacute;p&eacute;tition &agrave; Jacou</center>",
"" , date ("d/m/Y "));
$pCadreSallePrevert->affiche_CadreHaut(true);
echo "<center><img src=\"http://ohmj2.free.fr/ohmj/Imgs/".
"SalleRepetition.png ".
"\"alt=\"Salle de Repetition\"></center>\n";
$pCadreSallePrevert->affiche_CadreBas(true);
}
function print_presse($numArcticle)
{
/* On regarde sin on doit afficher un article en particulier */
if ($numArcticle == 1)
$pMonCadre = new CadrePresse("ML-01-12-1998", "MIDI LIBRE",
"01/12/1998");
else if ($numArcticle == 2)
$pMonCadre = new CadrePresse("Echo-Mayre-01-2000",
"L'Echo de la Mayre",
"Janvier, Février, mars 2000");
else if ($numArcticle == 3)
$pMonCadre = new CadrePresse("ML-13-04-2000", "MIDI LIBRE",
"13-04-2000");
else if ($numArcticle == 4)
$pMonCadre = new CadrePresse("ML-12-12-2000", "MIDI LIBRE",
"12-12-2000");
else if ($numArcticle == 5)
$pMonCadre = new CadrePresse("CMF-aout-2004", "cmf","aout 2004");
else if ($numArcticle == 6)
$pMonCadre = new CadrePresse("CMF-Juin-2004", "cmf","Juin 2004");
else if ($numArcticle == 7)
$pMonCadre = new CadrePresse("ML-mai-2004", "MIDI LIBRE",
"ML-mai-2004");
else if ($numArcticle == 8)
$pMonCadre = new CadrePresse("ML-10-12-2005", "MIDI LIBRE",
"ML-10-12-2005");
else if ($numArcticle == 9)
$pMonCadre = new CadrePresse("ML-19-06-2007", "MIDI LIBRE",
"19-06-2007");
else if ($numArcticle ==10)
$pMonCadre = new CadrePresse("ML-07-12-2007", "MIDI LIBRE",
"07-12-2007");
else if ($numArcticle ==11)
$pMonCadre = new CadrePresse("ML-19-01-2008", "MIDI LIBRE",
"19-01-2008");
/* Sinon on affiche tous les articles disponibles */
else
$pMonCadre = new CadreFichier("presse.neodoc");
/* Puis on affiche le cadre */
$pMonCadre->Affiche();
}
function print_La_Revue()
{
$pMonCadre = new CadreBD("cadre_la_Revue") ;
$pMonCadre->Affiche();
}
function print_albums_photos ($page, $pAlb, $NumImg)
{
global $KeyAdmAlbm, $AlbumRoot;
$SiteRoot = dirname ($GLOBALS['HTTP_SERVER_VARS']['SCRIPT_FILENAME']);
/* Create the object */
$pAlbum = new AlbumPhotos ($page, $SiteRoot, $AlbumRoot, $pAlb);
$pMonCadre = new Cadre("", "", $pAlbum->getDate());
if (($pAlb == "") || ($pAlb == "racine")) {
$pMonCadre->setTitre ("Album de l'Harmonie de Montpellier-Jacou");
$pMonCadre->setDate (date ("d/m/Y "));
}
else {
$pMonCadre->setTitre ($pAlbum->getTitre ());
$pMonCadre->setDate ($pAlbum->getDate ());
}
$pMonCadre->affiche_CadreHaut (true);
if ($pAlb == "")
$pAlb="racine";
if ($NumImg != "")
$pAlbum->AfficheImage ($pAlb, $NumImg);
else {
if (($pAlb == "") || ($pAlb == "racine"))
$pAlbum->AfficheAbumRacine ($pAlb);
else
$pAlbum->AfficheAbum ($pAlb);
}
// puis on ferme le cadre
$pMonCadre->affiche_CadreBas (true);
}
/* Obsolete function to print the albums photos . need to be removed
when the new one worls fine. */
function print_album_photo($pAlb, $NumImg)
{
include ("./Scripts/album.php");
$monAlbum = new Album ("./album");
$pMonCadre = new Cadre("", "", $monAlbum->getDate());
if (($pAlb == "") || ($pAlb == "racine")) {
$pMonCadre->setTitre("Album de l'Harmonie de Montpellier-Jacou");
$pMonCadre->setDate(date("d/m/Y "));
}
else {
$monAlbum->ScanAllAbum($pAlb);
$pMonCadre->setTitre( $monAlbum->getTitre());
$pMonCadre->setDate( $monAlbum->getDate());
}
$pMonCadre->affiche_CadreHaut(true);
if ($pAlb == "")
$pAlb="racine";
if ($NumImg != "")
$monAlbum->AfficheImage($pAlb, $NumImg);
else
$monAlbum->AfficheAbum($pAlb);
// puis on ferme le cadre
$pMonCadre->affiche_CadreBas(true);
} // fin function print_album_photo($pAlb)
function print_Livre_OR($page)
{
/*
* Le livre d'or est constitué de 3 cadres : un cadre contenant
* le nombre de message et un lien vers le formulaire pour remplir le
* livre d'or
* Un cadre contenant tous les messages du livre d'or
* et enfin un cadre contenant le formulaire pour rajouter un texte
* au livre d'or.
*/
$pMonLivredor = new Livredor();
$pMonLivredor->RecuperePage($page, false);
/* Puis on affiche le résultat dans un cadre */
if ($page == "")
$page = 0;
$page++;
$pCadreduHaut = new Cadre("<center>Livre d'or de l'Harmonie de ".
"montpellier-Jacou</center>", "" ,
date("d/m/Y "));
$pCadreduHaut->affiche_CadreHaut(true);
echo "<br><center>\n";
$pMonLivredor->GenereEntete($page, false);
echo "</center>\n";
$pCadreduHaut->affiche_CadreBas(true);
echo "<br><br>";
$pCadreTxtLivre = new Cadre("Livre d'or page : $page", "",
date("d/m/Y "));
$pCadreTxtLivre->affiche_CadreHaut(true);
echo "<center>\n";
$pMonLivredor->AfficheTexte();
echo "</center>\n";
$pCadreTxtLivre->affiche_CadreBas(true);
echo "<br><br>";
$pCadreInscription = new Cadre("Signer le Livre d'Or", "", date("d/m/Y "));
$pCadreInscription->affiche_CadreHaut(true);
echo "<center>\n";
$pMonLivredor->GenereFormulaireInscription();
echo "</center>\n";
$pCadreInscription->affiche_CadreBas(true);
}
function print_Valide_Livre_OR($pseudo, $email, $pays, $message, $date)
{
include ("./Scripts/Livredor.php");
global $racine, $page_index;
$pMonLivredor = new Livredor();
if (($pseudo == "") || ($message == "")) {
$donnee ="<br><br>
<table><tr>
<td>
<img src=$racine/Imgs/panneau.gif alt=panneau >
</td>
<td>
<b> Vous devez au moins indiquer un pseudo et taper un
message pour signer le livre d'or! </b>
<br><br>
<center>
<a href=\"$page_index?page=livre_or\">
Retour à la liste des messages</a></center>
</td>
</tr> </table>";
echo "<br><br>";
$pMonCadre = new Cadre("Erreur !", $donnee, date("d/m/Y H:h:i"));
$pMonCadre->Affiche();
echo "<br><br>";
$pCadreInscription = new Cadre("Signer le Livre d'Or", "",
date("d/m/Y "));
$pCadreInscription->affiche_CadreHaut(true);
echo "<center>\n";
$pMonLivredor->GenereFormulaireInscription();
echo "</center>\n";
$pCadreInscription->affiche_CadreBas(true);
}
else {
$pMonLivredor->ValideInscriptionLivre($pseudo, $email, $pays,
$message, $date);
print_Livre_OR($page);
}
}
function print_Membres($Page, $numPage)
{
global $racine;
if ($Page == "") {
if ($numPage == "") {
$donnee = "
<table width=\"50%\" bgcolor=\"#5a69a4\" cellpadding=\"0\"
cellspacing=\"0\" border=\"0\"><tr><td>
<table width=\"100%\" cellpadding=\"3\" cellspacing=\"2\"
border=\"0\" >
<tr>
<td bgcolor=\"#5b8cc1\" align=\"left\">
<font color=\"white\" size=\"2\">
<b> voyage &agrave; Taninges </b></font><br></td>
</tr></table></td></tr></table><br>
<ul>
<li> <a href=\"$page_index?page=membres&Pp=sam_tann&numP=1\">
Journée de Samedi</a>
<li> <a href=\"$page_index?page=membres&Pp=dim_tann&numP=1\">
Journée de Dimanche</a>
</ul>
<br><br>
<table width=\"50%\" bgcolor=\"#5a69a4\" cellpadding=\"0\"
cellspacing=\"0\" border=\"0\"><tr><td>
<table width=\"100%\" cellpadding=\"3\" cellspacing=\"2\"
border=\"0\" >
<tr>
<td bgcolor=\"#5b8cc1\" align=\"left\">
<font color=\"white\" size=\"2\">
<b> Documents (tests)</b></font><br></td>
</tr></table></td></tr></table><br>
<ul>
<!--<li><a href=\"$page_index?page=membres&Pp=Repertoire_pdf\"> -->
<li><a href=\"$racine/fpdf/repertoire.php\" target='_blank'>
Liste des mocreaux de l'Harmonie </a>
</ul>
<br><br>";
$pMonCadre = new Cadre("Espace Membre", $donnee, date("d/m/Y H:h:i"));
$pMonCadre->Affiche();
}
}
elseif (($Page == "sam_tann") || ($Page == "dim_tann")) {
$pMonCadre = new Cadre("Voyage &agrave; Taninges", $donnee,
date("d/m/Y H:h:i"));
$pMonCadre->SetBgColor("#ffffff");
$pMonCadre->affiche_CadreHaut(true);
if ($Page == "sam_tann")
$szChemin = "./membre/02-03-2002-TANNINGES/samedi_tann$numPage.html";
else if ($Page == "dim_tann")
$szChemin = "./membre/02-03-2002-TANNINGES/".
"dimanche_tann$numPage.html";
echo "<center>\n";
include ("$szChemin");
echo "</center>\n";
$pMonCadre->affiche_CadreBas(true);
}
elseif ($Page == "Repertoire_pdf") {
/*
include('fpdf.php');
$pdf=new FPDF();
$pdf->Open();
$pdf->AddPage();
$pdf->SetFont('Arial','B',16);
$pdf->Cell(40,10,'Hello World !');
$pdf->Output();
*/
}
}
?>

623
Scripts/lib_print_admin.php Normal file
View File

@@ -0,0 +1,623 @@
<?php
/***************************************************************************
lib_print_admin.php - library of admin functions
-------------------
begin : Mars UTC 2001
copyright : (C) 2002 by NADAL Jean-Baptiste
email : jbnadal@ifrance.com
***************************************************************************
*
* All the top level functions needed by the admin first page.
*
***************************************************************************
* *
* 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. *
* *
***************************************************************************
* $Id: lib_print_admin.php,v 1.15 2005/04/17 16:44:32 jb Exp $
***************************************************************************/
require "conf.php";
/***************************************************************************
*
*
***************************************************************************/
function MiseAjourTable ($titre, $texte, $Date, $table, $nomCadre,
$numIdent = 1)
{
global $sql_bdd;
$connexion = jb_sql_connect (false);
if ($Date == "")
$Date = date ("d/m/Y H:i");
$resultat = mysql_db_query ($sql_bdd, "update $table set titre=\"$titre\",".
"texte=\"$texte\",date=\"$Date\" where".
" id=$numIdent", $connexion);
if ($resultat == 1)
$Texte = "<b>$nomCadre modifié</b>";
else
$Texte = "<b> Erreur durant la modification de la table $nomCadre </b>";
/* On affcihe la boite permettant de signaler à l'administrateur si la mise
* à jour c'est bien réalisée.
*/
AfficheErreur ($Texte,$Date);
$result = mysql_close ($connexion);
}
/***************************************************************************
*
*
***************************************************************************/
function AfficheModeficationCadreDB ($action, $base, $nomPage, $numIdent = 1)
{
global $sql_bdd, $racine, $page_index;
/* On se connecte sur la base ajem */
$connexion = jb_sql_connect (false);
$resultat = mysql_db_query ($sql_bdd,
"select * from $base where id=$numIdent",
$connexion);
/* On stock le resultat de la requete dans des variables */
$titre = mysql_result ($resultat, 0, "titre");
$texte = mysql_result ($resultat, 0, "texte");
$date = mysql_result ($resultat, 0, "date");
/* Puis on cree un formulaire pour retourner la reponse de l'administrateur
* au serveur
*/
echo "<center><br /><br /><br />\n
<form method=post action=$racine/$page_index?page=$nomPage>
<script language=\"javascript\">
var datelo =DonneDate();
document.write(\"<input type=hidden name=datecourante".
"value=\"+datelo+\" />\")\n
</script>
<input type=hidden name=action value='valider' />
<input type=hidden name=nligneTable value='$numIdent' />";
$pCadre = new Cadre ("<font face=verdana size=2>Titre :</font>".
"<input type=text name=titre size=32".
" value=\"$titre\" /><br>", "", $date);
$pCadre->affiche_CadreHaut (true);
echo "<center>\n
<br><textarea name=texte wrap=virtual cols=80 rows=20>$texte\n
</textarea><br><br>\n
<input type=submit value=valider /><br></form>\n
</center>\n";
$pCadre->affiche_CadreBas (true);
/* On a fini donc on ferme la connexion. */
$result = mysql_close ($connexion);
}
/***************************************************************************
*
*
***************************************************************************/
function print_Admindownload ($action, $elem, $nom, $url,
$description, $urlmini, $sizeurl, $sizeurlmini)
{
global $racine, $page_index;
$pMesDownload = new AnnuDownload ("download", "AdmDownload");
$pCadreduHaut = new Cadre ("Gestion des Dowloads du Sites", "",
date ("d/m/Y "));
$pCadreduHaut->affiche_CadreHaut (true);
switch ($action) {
case "" :
echo "<center>\n
<a href=$racine/$page_index?page=AdmDownload&".
"action=ajouter>ajouter un dowload</a>\n
</center>\n<br><br>\n";
$pMesDownload->Lister ();
break;
case "ajouter" :
$pMesDownload->AjouterDownload ();
break;
case "ValideAjouter" :
$pMesDownload->InsertDownload ($nom, $url, $description, $urlmini,
$sizeurl, $sizeurlmini);
break;
case "modifier" :
$pMesDownload->ModifierDownload ($elem);
break;
case "ValideModifier" :
$pMesDownload->ValideModifierDownload ($nom, $url, $description,
$urlmini, $sizeurl,
$sizeurlmini, $elem);
break;
case "supprimer" :
$pMesDownload->Supprimer ($elem);
break;
}
$pCadreduHaut->affiche_CadreBas (true);
}
/***************************************************************************
*
*
***************************************************************************/
function print_AdminAgenda ($action, $elem, $dateTexte, $datephp,
$heuredeb, $ville, $lieu, $listeMorceaux,
$commentaire, $nbmorceaux)
{
global $racine, $page_index;
$pMonAgenda = new AnnuAgenda ("agenda", "M_InfoC");
$pCadreduHaut = new Cadre ("Gestion des Concert de l'OHMJ", "",
date("d/m/Y "));
$pCadreduHaut->affiche_CadreHaut (true);
switch ($action) {
case "" :
echo "<center>\n
<a href=$racine/$page_index?page=M_InfoC&".
"nAction=ajouter>\n
<b><u>Ajouter un Concert</u></b> </a><br><br>\n
</center>\n<br><br>\n";
$pMonAgenda->Lister ();
break;
case "ajouter" :
$pMonAgenda->AjouterConcert ($elem);
break;
case "ValideAjouter" :
$pMonAgenda->InsertConcert ($dateTexte, $datephp, $heuredeb, $ville,
$lieu, $listeMorceaux, $commentaire);
break;
case "modifier" :
$pMonAgenda->ModifierConcert ($elem, $nbmorceaux);
break;
case "ValideModifier" :
$pMonAgenda->ValideModifierConcert ($elem, $dateTexte, $datephp,
$heuredeb, $ville, $lieu,
$listeMorceaux, $commentaire);
break;
case "supprimer" :
$pMonAgenda->Supprimer ($elem);
break;
default :
print "<ERREUR>";
}
$pCadreduHaut->affiche_CadreBas (true);
}
/***************************************************************************
*
*
***************************************************************************/
function print_AdminLinks ($action, $elem, $nom, $url, $description, $type)
{
global $racine, $page_index;
$pMesLiens = new AnnuLinks ("liens", "AdmLinks");
$pCadreduHaut = new Cadre ("Gestion des Liens du Sites", "",
date ("d/m/Y "));
$pCadreduHaut->affiche_CadreHaut (true);
switch ($action) {
case "" :
echo "<center>\n
<a href=$racine/$page_index?page=AdmLinks&".
"action=ajouter>ajouter un nouveau liens</a>\n
</center>\n<br><br>\n";
$pMesLiens->Lister ();
break;
case "ajouter" :
$pMesLiens->AjouterLiens ();
break;
case "ValideAjouter" :
$pMesLiens->InsertLiens ($nom, $url, $description, $type);
break;
case "modifier" :
$pMesLiens->ModifierLiens ($elem);
break;
case "ValideModifier" :
$pMesLiens->ValideModifierLiens ($elem, $nom, $url, $description,
$type);
break;
case "supprimer" :
$pMesLiens->Supprimer ($elem);
break;
}
$pCadreduHaut->affiche_CadreBas (true);
}
/***************************************************************************
*
*
***************************************************************************/
function print_News ($numNews, $datelo, $newsTxt)
{
global $racine, $page_index;
include "Scripts/news.php";
$pCadreduHaut = new Cadre ("Gestion des News du Site", "", date ("d/m/Y "));
$pCadreduHaut->affiche_CadreHaut (true);
$mesNews = new News ();
if ($numNews == "")
$mesNews->afficheAjout ();
else {
$mesNews->Ajoute ($numNews, $datelo, $newsTxt);
echo "<br><br>\n
<center><a href=$racine/$page_index?page=AdmNews>".
"Retour à la page d'ajout des News</a></center> \n";
}
$pCadreduHaut->affiche_CadreBas (true);
}
/***************************************************************************
*
*
***************************************************************************/
function print_AdminAlbumPhotos ($page, $action, $name, $place, $dep, $ordre,
$jour, $mois, $annee, $elem)
{
global $AlbumRoot;
global $racine, $page_index;
global $KeyAdmAlbm, $AlbumRoot;
/* Create the object */
$SiteRoot = dirname ($GLOBALS['HTTP_SERVER_VARS']['SCRIPT_FILENAME']);
$pAlbum = new AlbumPhotos ($page, $SiteRoot, $AlbumRoot, "");
//print_r ($GLOBALS);
$pCadreduHaut = new Cadre ("Gestion de l'Album Photos.", "",
date ("d/m/Y "));
$pCadreduHaut->affiche_CadreHaut (true);
switch ($action) {
case "ajouter":
$pAlbum->AjouterAlbumPlusRecent ();
break;
case "ValideAjouter" :
$pAlbum->InsertNewAlbum ($name, $place, $dep, $ordre,
$jour, $mois, $annee);
break;
case "supprimer" :
$pAlbum->Supprimer ($elem);
break;
case "afficher" :
$pAlbum->Afficher ($elem);
break;
case "upload":
$file = $GLOBALS['_FILES']['imgfile']['tmp_name'];
$fileName = $GLOBALS['_FILES']['imgfile']['name'];
$pAlbum->upload ($elem, $file, $fileName);
break;
case "suppImage":
$file = $GLOBALS['_GET']['file'];
$pAlbum->SuppImage ($elem, $file);
break;
case "modifier" :
$pAlbum->Modifier ($elem);
break;
case "ValideModifier" :
$pAlbum->ValideModifierAlbum ($elem,
$name, $place, $dep, $ordre,
$jour, $mois, $annee);
break;
case "":
echo "<center>\n
<li><a href=$racine/$page_index?page=".$KeyAdmAlbm."&".
"action=ajouter>Ajouter un nouvel Album Photos</a> <br><br>\n
</center>\n<br><br>\n";
$pAlbum->ListerAlbumPlusRecent ();
break;
}
$pCadreduHaut->affiche_CadreBas (true);
}
/***************************************************************************
*
*
***************************************************************************/
function print_AdminRepertoire ($action, $elem, $num, $nom,
$compositeur, $style)
{
global $racine, $page_index;
$pMonRepertoire = new AnnuRepertoire ("repertoire", "M_Rep");
$pCadreduHaut = new Cadre ("Gestion des Morceaux de l'Orchestre", "",
date ("d/m/Y "));
$pCadreduHaut->affiche_CadreHaut (true);
switch ($action) {
case "":
echo "<center>\n
<a href=$racine/$page_index?page=M_Rep&".
"action=ajouter>ajouter un nouveau Morceau</a> <br><br>\n
<a href=$racine/$page_index?page=ModRepIndex >\n
Modifier l'index du répertoire </a> <br><br>\n
</center>\n<br><br>\n";
$pMonRepertoire->ListerMorceaux ();
break;
case "ajouter":
$pMonRepertoire->AjouterMorceau ();
break;
case "ValideAjouter":
$pMonRepertoire->InsertMorceau ($elem, $num, $nom, $compositeur,
$style);
break;
case "modifier":
$pMonRepertoire->ModifierRepertoire ($elem);
break;
case "ValideModifier":
$pMonRepertoire->ValideModifierMorceau ($elem, $num, $nom,
$compositeur, $style);
break;
case "supprimer":
$pMonRepertoire->Supprimer ($elem);
break;
}
$pCadreduHaut->affiche_CadreBas (true);
}
/***************************************************************************
*
*
***************************************************************************/
function print_AdmUsers ($action, $elem, $pseudo, $password, $email,
$state)
{
global $racine, $page_index;
$pMyAnnuUsers = new AnnuUsers ("users", "AdmUsers");
$pCadreduHaut = new Cadre ("Gestion des Utilisateurs de l'Orchestre", "",
date ("d/m/Y "));
$pCadreduHaut->affiche_CadreHaut (true);
switch ($action) {
case "" :
echo "<center>\n
<a href=$racine/$page_index?page=AdmUsers&".
"action=ajouter>\n
<b><u>Ajouter un Utilisateur</u></b> </a><br><br>\n
</center>\n<br><br>\n";
$pMyAnnuUsers->ListerUsers ();
break;
case "ajouter" :
$pMyAnnuUsers->AjouterUser ();
break;
case "ValideAjouter" :
$pMyAnnuUsers->InsertUser ($elem, $pseudo, $password, $email,
$state);
break;
case "modifier" :
$pMyAnnuUsers->ModifierUser ($elem);
break;
case "ValideModifier" :
$pMyAnnuUsers->ValideModifierUser ($elem, $pseudo, $password,
$email, $state);
break;
case "supprimer" :
$pMyAnnuUsers->Supprimer ($elem);
break;
}
$pCadreduHaut->affiche_CadreBas(true);
}
/***************************************************************************
*
*
***************************************************************************/
function print_AdminLivre_OR ($page)
{
global $racine;
include ("Scripts/Livredor.php");
$pMonLivredor = new Livredor ();
$pMonLivredor->RecuperePage ($page, true);
if ($page == "")
$page = 0;
$page++;
$pCadreduHaut = new Cadre ("<center>Livre d'or de l'Harmonie de".
" montpellier-Jacou</center>", "",
date ("d/m/Y "));
$pCadreduHaut->affiche_CadreHaut (true);
echo "<center>\n";
$pMonLivredor->GenereEntete ($page, true);
echo "</center>\n";
$pCadreduHaut->affiche_CadreBas (true);
echo "<br /><br />";
$pCadreduHaut = new Cadre (" Admin Livre d'or ", "", date ("d/m/Y "));
$pCadreduHaut->affiche_CadreHaut (true);
echo "<center>\n";
$pMonLivredor->AfficheTexte ();
echo "</center>\n";
$pCadreduHaut->affiche_CadreBas (true);
}
/***************************************************************************
*
*
***************************************************************************/
function print_Supp_Element_Liv_OR ($num_elem,$action)
{
global $racine, $page_index;
include ("Scripts/Livredor.php");
$pMonLivredor = new Livredor ();
/* On demande confirmation avant d'effacer définitivement l'entrée
* dans le livre d'Or
*/
if ($action == "quest")
{
$pCadreduHaut = new Cadre ("Attention !!", "", date ("d/m/Y "));
$pCadreduHaut->affiche_CadreHaut (true);
echo "<center>\n
<font size=4 color=red>Souhaitez-vous réellement effacer".
" définitivement ce message ?</font><br>\n";
$pMonLivredor->GetText ($num_elem);
echo "<br><br>\n
<center><a href=$racine/$page_index?page=AdmLivOR >\n
<font size=2 color=green><b>Retour aux messages</b></font></a>\n
<a href=$racine/$page_index?page=SuppElemLVOR&".
"num_id=$num_elem&action=efface>\n
<font size=2 color=red><b>Effacer ce message</b></font>
</a>\n
<br><br></center>\n";
$pCadreduHaut->affiche_CadreBas (true);
}
else if ($action == "efface")
{
$pCadreduHaut = new Cadre ("Suppression", "", date ("d/m/Y "));
$pCadreduHaut->affiche_CadreHaut (true);
echo "<center>\n";
$pMonLivredor->SupprimeText ($num_elem);
echo "<a href=$racine/$page_index?page=AdmLivOR >\n";
echo "<font size=2 color=green><b>Retour aux messages</b></font></a>\n";
echo "</center><br /><br />\n";
$pCadreduHaut->affiche_CadreBas (true);
}
}
/***************************************************************************
*
*
***************************************************************************/
function print_AdminRecrutement ($RecruPage)
{
echo "<br /><br /><br />\n";
/* Si $RecruPage vaut null on affiche la liste des cadres que l'on peut
modifier */
$pCadreduHaut = new Cadre ("Recrutement", "", date ("d/m/Y "));
$pCadreduHaut->affiche_CadreHaut (true);
echo "<br>\n<u><b>Cliquez sur le cadre que vous voulez editer :</b></u>";
AfficheListeTitre ("cadre_Recrutement");
echo "<br>\n";
$pCadreduHaut->affiche_CadreBas (true);
}
/***************************************************************************
*
*
***************************************************************************/
function AfficheListeTitre ($nomTable)
{
global $racine, $page_index, $sql_bdd;
/* On se connecte sur la base ajem */
$connexion = jb_sql_connect (false);
$resultat = mysql_db_query ($sql_bdd, "select * from $nomTable",
$connexion);
echo "<ul>\n";
$i = 1;
while ($ligne = mysql_fetch_array ($resultat)) {
echo "<li>\n<a href=$racine/$page_index?page=M_Recrutement&nligneTable=".
"$i>\n";
echo "$ligne[titre]</a></li>\n";
$i++;
}
echo "</ul>\n";
mysql_free_result ($resultat);
}
/***************************************************************************
*
* Cette fonction log dans le fichier log.txt dans le répertoire Textes
* toutes les action qui sont faite par les Administrateurs du site.
*
***************************************************************************/
function sys_log ($nomCadre, $date, $ident)
{
/* On créé la chaine qui va etre rajoutée dans le journal */
$ligne = $date." : ".$ident." a modifié le cadre ".$nomCadre."<br>\n";
$fp=fopen ("./log.txt","a+");
fputs ($fp,$ligne);
fclose ($fp);
}
/***************************************************************************
*
* Cette fonction permet d'afficher les statistique du site.
*
***************************************************************************/
function print_Statistique ()
{
global $racine;
$pCadreduHaut = new Cadre ("Statistiques de visites", "", date ("d/m/Y "));
$pCadreduHaut->affiche_CadreHaut (true);
echo"<table width=\"400\" border=\"0\" cellspacing=\"2\" cellpadding=\"4\"
align=\"center\" class=\"normal\">
<tr bgcolor=\"#CCCCCC\">
<td colspan=\"4\" align=center> Statistiques du site de l'Harmonie
</td>
</tr> <tr>
<td bgcolor=\"#CCCCCC\" width=\"68\">
<div align=\"center\"><b> jour </b></div>
</td>
<td bgcolor=\"#CCCCCC\" width=\"68\">
<div align=\"center\"><b> semaine </b></div>
</td>
<td bgcolor=\"#CCCCCC\" width=\"68\">
<div align=\"center\"><b> mois </b></div>
</td>
</tr>\n";
$color = "#CCCCFF" ;
echo"<tr bgcolor=$color>";
echo"<td width=\"282\">";
echo"<div align=\"center\"><a href=\"$racine/Scripts/AdminStats.php?table=$bar[0]".
"&reqdate=".time ()."&reset=0&period=jour\">stats</a></div>";
echo"</td>";
echo"<td width=\"282\">";
echo"<div align=\"center\"><a href=\"$racine/Scripts/AdminStats.php?table=$bar[0]".
"&reqdate=".time ()."&reset=0&period=semaine\">stats</a></div>";
echo"</td>";
echo"<td width=\"282\">";
echo"<div align=\"center\"><a href=\"$racine/Scripts/AdminStats.php?table=$bar[0]".
"&reqdate=".time ()."&reset=0&period=mois\">stats</a></div>";
echo"</td>";
echo"</tr>";
$sta = !$sta;
echo"</table><br /><br /><br />";
$pCadreduHaut->affiche_CadreBas (true);
}
/***************************************************************************
*
* Cette fonction affiche le journal des modifications
*
***************************************************************************/
function print_Journal_Modification ()
{
echo "<br /><br /><br />\n";
// On creer un objet Cadre de type fichier
$pMonCadre = new CadreFichier ("log.txt",0);
$pMonCadre->Affiche ();
}
?>

733
Scripts/lib_print_ajem.php Executable file
View File

@@ -0,0 +1,733 @@
<?php
/*
*********************************************************************
* File : $RCSfile: lib_print_ajem.php,v $
* Version : $Revision: 1.15 $
* Modified by : $Author: jb $ ($Date: 2005/04/17 16:44:32 $)
*********************************************************************
*/
// On a besoin du fichier de configuration général du site
require("./Scripts/conf.php");
function print_editorial()
{
global $racine;
/* On creer un objet Cadre pour l'édito */
$pMonCadre = new CadreBD("news");
$pMonCadre->setTitre("News");
$pMonCadre->affiche_CadreHaut(true);
$donneeCadre = $pMonCadre->GetDataDB();
echo "<table cellspacing=\"0\" cellpadding=\"0\"
border=\"0\" width=\"100%\">\n";
echo "<tr> <td width=\"110%\">" ;
echo "<table cellspacing=\"0\" cellpadding=\"1\" border=\"0\">\n";
for ($cpt = 0; $cpt < 3; $cpt++) {
/* On recupere les données */
$RESnouvelle = mysql_result($donneeCadre, $cpt, "nouvelle");
$RESdate = mysql_result($donneeCadre, $cpt, "date");
if ($RESnouvelle != "") {
echo "<tr>\n";
echo "<td valign=\"middle\" align=\"center\" width=\"10%\" >\n
<img src=\"$racine/Imgs/icon_puce_over.gif\" border=\"0\"
alt=\"*\" />
</td>\n
<td class=\"news\">\n";
echo "<b>$RESdate</b>: $RESnouvelle\n </td> </tr>";
}
}
echo "</table><br/>\n";
echo "</td><td>\n
<!-- Fil RSS UMH -->\n
<div align=\"center\">\n
<a href=\"http://um34.free.fr/\" target=\"_blank\">\n
<img src=\"http://feeds.feedburner.com/um34.5.gif\"\n
Alt=\"Union Musicale de l'Hérault\"\n
Title=\"Union Musicale de l'Hérault\"\n
style=\"border:0\">\n
</a>\n
</div>\n
<!-- /Fil RSS UMH -->\n
</td></tr></table>\n";
$pMonCadre->affiche_CadreBas(true);
/* On creer un objet Cadre pour l'édito */
$pMonCadre = new CadreBD("cadre_edito");
$pMonCadre->Affiche();
}
function print_histoire()
{
/* On creer un objet Cadre de type fichier */
$pMonCadre = new CadreBD("cadre_Historique") ;
$pMonCadre->Affiche();
}
function print_Recrutement($num)
{
$pMonCadre = new CadreBD("cadre_Recrutement", $num);
$pMonCadre->Affiche();
}
function print_Liens()
{
$pMonCadre = new Cadre("Liens", "", "");
$pMonCadre->affiche_CadreHaut(true);
print_typeLien(1, "Orchestres d'Harmonie");
print_typeLien(2, "Sites sur la musique");
print_typeLien(3, "Autour de Montpellier");
$pMonCadre->affiche_CadreBas(true);
}
function print_typeLien($idlien, $szNomLien)
{
// Les variables locales
global $sql_bdd;
global $table_liens;
global $racine;
// Fin des variables locales
/* On se connecte sur la base */
$connect_db = jb_sql_connect(false);
CreerTitre($szNomLien);
echo "<center><table width=\"95%\" border=0>";
$resultat = mysql_db_query($sql_bdd, "select * from $table_liens where".
" type='$idlien'", $connect_db);
while ($row = mysql_fetch_row($resultat)) {
echo"<tr bgcolor=\"#DDDDDD\">\n";
echo "<td width=80% align=center>
<a href=\"$racine/Scripts/redirect.php?id=$row[0]\" ".
"target='_blank' > <font size=-1>$row[1]</font></a> </td>\n";
echo "<td> ($row[3] hits) </td></tr>\n";
echo "<tr bgcolor=\"#CCCCCC\">\n";
echo "<td >$row[4] </td><td>&nbsp;</td></tr>\n";
}
echo "</table> </center><br><br>";
}
function print_Musique_enLigne()
{
global $racine;
include ("./Scripts/Annuaire.php");
$pMonCadre = new Cadre("Musique en Ligne", "", "");
$pMesDownload = new AnnuDownload("download","AdmDownload", "");
$pMonCadre->affiche_CadreHaut(true);
$intro = "<p class=\"cadre\">
pour écouter les morceaux aux formats <b>mp3</b>,
vous pouvez utiliser le logiciel suivant :
<center><a href=\"http://www.winamp.com\" target=outside>
<img src=\"$racine/Imgs/winampbutton.gif\" width=\"88\" ".
"height=\"31\" border=0></a>
</center></p><br>\n";
$pMesDownload->AfficheDownload($intro);
$pMonCadre->affiche_CadreBas(true);
}
function print_Video_enLigne ()
{
$SiteRoot = dirname ($GLOBALS['HTTP_SERVER_VARS']['SCRIPT_FILENAME']);
include ("./Scripts/Video.php");
$pMonCadre = new Cadre("Videos en Ligne", "", "");
$pMesVideos = New VideoEntries ($SiteRoot, "/videos/");
$pMonCadre->affiche_CadreHaut(true);
$pMesVideos->Affiche ();
$pMonCadre->affiche_CadreBas(true);
}
function print_info_concerts($opt, $id)
{
$date_maintenant = time() ;
$pMonCadre = new Cadre("Agenda de l'Orchestre", "", "");
$pMonCadre->affiche_CadreHaut(true);
if ($opt == "ancien")
print_concert("-", $date_maintenant, $id);
else
print_concert("+", $date_maintenant, $id);
$pMonCadre->affiche_CadreBas(true);
}
function print_concert($type, $date, $idconcert)
{
// Les variables locales
global $sql_bdd;
global $table_agenda;
// Fin des variables locales
$monthsArray = array("janvier", "février", "mars", "avril", "mai", "juin",
"juillet", "août", "septembre", "octobre", "novembre",
"décembre");
$daysArray=array("Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi",
"Vendredi", "Samedi");
if ($idconcert == "")
{
$connect_db = jb_sql_connect(false);
if ($type == "+") {
$resultat = mysql_db_query($sql_bdd, "select * from $table_agenda ".
"order by date_php", $connect_db);
echo "<center> [ <a href=$page_index?page=info_concerts&opt=ancien>".
" Voir les anciens concerts et leurs commentaires</a> ]
</center><br><br>";
}
else {
$resultat = mysql_db_query($sql_bdd,"select * from $table_agenda ".
"order by date_php desc",$connect_db);
echo "<center> [ <a href=$page_index?page=info_concerts>
Retour aux prochains concerts </a> ] </center><br><br>";
}
$btrouve = 0;
while ($row = mysql_fetch_row($resultat)) {
$datephp = $row[2];
/* On affiche les futurs concerts. */
if ((($type == "+") && ($datephp >= $date)) ||
(($type == "-") && ($datephp <= $date))) {
$id = $row[0];
$szheure = $row[3];
$szVille = $row[4];
$szLieu = $row[5];
$liste_morceaux = $row[6];
$commentaire = $row[7];
$dateConcert = getdate($datephp);
$jour = $daysArray[$dateConcert["wday"]];
$NumJour = $dateConcert["mday"];
$mois = $monthsArray[$dateConcert["mon"]-1];
$annee = $dateConcert["year"];
echo"<center>\n";
CreerPubConcert($jour, $NumJour, $mois, $annee, $szVille, $szLieu,
$szheure, $commentaire, $id, $liste_morceaux);
echo"</center><br><br>\n";
$btrouve = 1;
}
}
if ($btrouve == 0)
echo "<br><br><center> Il n'y a aucun Concert de planifié pour".
" le moment.
</center><br>";
}
else {
/* Si ON souhaite avoirt des infos sur un concert particulier */
$connect_db = jb_sql_connect(false);
$resultat = mysql_db_query($sql_bdd, "select * from $table_agenda where".
" id=$idconcert", $connect_db);
$szheure = mysql_result($resultat, 0, "heure_deb");
$szVille = mysql_result($resultat, 0, "ville");
$szLieu = mysql_result($resultat, 0, "lieu");
$liste_morceaux = mysql_result($resultat, 0, "liste_morceaux");
$commentaire = mysql_result($resultat, 0, "commentaire");
$datephp = mysql_result($resultat, 0, "date_php");
$dateConcert = getdate($datephp);
$jour = $daysArray[$dateConcert["wday"]];
$NumJour = $dateConcert["mday"];
$mois = $monthsArray[$dateConcert["mon"]-1];
$annee = $dateConcert["year"];
echo "<center>";
CreerTitre("$szVille - $szLieu");
echo "</center><br><br>";
echo "<center><table border=0 width=\"95%\">
<tr bgcolor=\"#DDDDDD\"><td align=center> Le $jour $NumJour".
" $mois $annee à $szheure </td>
</tr></table><br><br>";
echo "<center><table border=0 width=\"95%\">
<tr bgcolor=\"#CCCCCC\"><td > $commentaire </td>
</tr></table><br><br>";
CreerListeMorceau($liste_morceaux);
}
}
function print_repertoire($style)
{
if ($style == "") {
$pMonCadre = new CadreBD("cadre_Repertoire");
$pMonCadre->affiche_CadreHaut(true);
echo "$pMonCadre->szTabTexte";
echo "<ul>\n";
echo "<li><a href=$page_index?page=repertoire&opt=6 >
Musique originale pour Orchestre d'Harmonie </a></li>\n";
echo "<li><a href=$page_index?page=repertoire&opt=5 > Musique Classique".
" </a></li>\n";
echo "<li><a href=$page_index?page=repertoire&opt=4 > Musique de Film,".
"Comédie Musicale et Rock Opera </a></li>\n";
echo "<li><a href=$page_index?page=repertoire&opt=3 >".
" Danses et Musiques".
" Traditionnelles </a></li>\n";
echo "<li><a href=$page_index?page=repertoire&opt=2 >".
" Variétés Françaises".
" et Internationales </a></li>\n";
echo "<li><a href=$page_index?page=repertoire&opt=1 > ".
"Middle Jazz </a></li>\n";
echo "</ul><br><br>\n";
}
else {
$pMonCadre = new Cadre("Répertoire", "", "");
$pMonCadre->affiche_CadreHaut(true);
switch ($style) {
case "6" :
echo "<center>\n";
CreerTitre("Musique originale pour Orchestre d'Harmonie");
echo "</center><br><br>\n";
CreerCadreMorceau("Suites", 10);
CreerCadreMorceau("Marches et Polkas", 11);
CreerCadreMorceau("Pièces calmes", 12);
break;
case "3" :
echo "<center>\n";
CreerTitre("Danses et Musiques Traditionnelles");
echo "</center><br><br>\n";
CreerCadreMorceau("Pasos-dobles et Tangos", 20);
CreerCadreMorceau("Rythmes Latins", 21);
CreerCadreMorceau("Chansons du monde", 22);
break;
case "1" :
CreerCadreMorceau("Middle Jazz", $style);
break;
case "2" :
CreerCadreMorceau("Variétés Françaises et Internationales",
$style);
break;
case "4" :
CreerCadreMorceau("Musique de Film, Comédie Musicale et Rock".
" Opera", $style);
break;
case "5" :
CreerCadreMorceau("Musique Classique", $style);
break;
}
echo "<center><a href=$page_index?page=repertoire>< Retour >
</a></center><br><br> \n";
}
$pMonCadre->affiche_CadreBas(true);
}
function CreerListeMorceau($liste_morceaux)
{
// Les variables locales
global $sql_bdd;
global $table_repertoire;
// Fin des variables locales
$tablo = explode(";", $liste_morceaux);
$cpt = 0;
foreach ($tablo as $elem) {
$tab_list_select[$cpt] = $elem;
$cpt++;
}
/* On se connecte sur la base */
$connect_db = jb_sql_connect(false);
$resultat = mysql_db_query($sql_bdd, "select * from $table_repertoire ".
"order by id", $connect_db);
/* Puis on creer un tableau comtenant la totalité des morceaux */
$indTab = 1;
while($row = mysql_fetch_array($resultat))
{
$col_id = $row[0];
$col_nom = $row[2];
$col_compo = $row[3];
if ($indTab != $col_id) {
// print "<br>---- on augmente <br>";
for ($i = $indTab; $i < $col_id; $i++) {
// print "<br>---- on augmente <br>";
$tab_Morceau[] = array ($i, "0", "0");
}
$indTab = $col_id;
}
$tab_Morceau[] = array ($col_id, $col_nom, $col_compo);
$indTab++;
}
echo "<center><table border=0 width=\"95%\">
<tr>
<th bgcolor=\"#d5dee6\"> num </th>
<th bgcolor=\"#d5dee6\"> Nom </th>
<th bgcolor=\"#d5dee6\" >Compositeur</th>
</tr>\n";
for ($i = 0; $i < $cpt; $i++) {
$indice = $tab_list_select[$i];
$indice--;
list ($list_id, $list_nomMorceau, $list_compo) = $tab_Morceau[$indice];
if (($i % 2) == 0)
echo "<tr bgcolor=\"#DDDDDD\">\n";
else
echo "<tr bgcolor=\"#CCCCCC\">\n";
echo "<td>".($i + 1)."</td>\n";
echo "<td> $list_nomMorceau </td>\n";
echo "<td> $list_compo </td></tr>\n";
}
echo "</table> </center><br><br>";
}
function CreerCadreMorceau($titre, $style)
{
// Les variables locales
global $sql_bdd;
global $table_repertoire;
global $page_index;
// Fin des variables locales
CreerTitre($titre);
$connect_db = jb_sql_connect(false);
$resultat = mysql_db_query($sql_bdd, "select * from $table_repertoire".
" where style=$style order by numero",
$connect_db);
echo "<center><table border=0 width=\"95%\">
<tr>
<th bgcolor=\"#d5dee6\"> Nom </th>
<th bgcolor=\"#d5dee6\"> Compositeur </th>
</tr>\n";
while ($row = mysql_fetch_row($resultat)) {
if (($i % 2) == 0)
echo "<tr bgcolor=\"#DDDDDD\">\n";
else
echo "<tr bgcolor=\"#CCCCCC\">\n";
echo "<td>$row[2] </td>\n";
echo "<td>$row[3] </td> </tr>\n";
$i++;
}
MYSQL_CLOSE;
echo "</table></center><br><br><br>\n";
}
function CreerTitre($titre)
{
echo "<table width=\"50%\" bgcolor=\"#5a69a4\" cellpadding=\"0\" ".
" cellspacing=\"0\" border=\"0\"><tr><td>
<table width=\"100%\" cellpadding=\"3\" cellspacing=\"2\" border=\"0\" >
<tr>
<td bgcolor=\"#5b8cc1\" align=\"left\">
<font color=\"white\" size=\"2\">
<b> $titre </b></font><br></td>
</tr></table></td></tr></table><br>\n";
}
function CreerPubConcert($jour, $NumJour, $mois, $annee, $ville, $lieu,
$heure, $commentaire, $id, $liste_morceaux)
{
global $page_index;
echo "
<table border=1 width=\"65%\">\n<tr align=left>\n
<td align='left' valign='middle' bgcolor='#FFFF00'>
<table border='0'>\n<tr>\n
<td align='center' valign='middle' bgcolor='#000000'>
<font color='#F5E9CF'><b><font face='Arial, Helvetica,
sans-serif' color='#FFFF00'>$jour<br>
<font size='6'>$NumJour</font><br>$mois <br>$annee</font>
</b></font>\n </td>
<td align='center' valign='middle'>\n<p><b>
<font size='+1'>O.H.M.J.</font></b><br>
EN CONCERT<br> &agrave; <b><font size='+2'>$ville</font>
</b></p>\n<p>
$lieu - $heure \n</p> \n </td>\n </tr> \n
</table> \n</tr> \n";
if ($commentaire != "")
echo "<tr><td bgcolor=\"#DDDDDD\" ><font size=-1>$commentaire
</font></td></tr>\n";
if ($liste_morceaux != "")
echo "<tr><td align=center bgcolor=\"#CCCCCC\" >
<a href=$page_index?page=".
"info_concerts&id=$id> Voir la liste des morceaux joués </a>
</td></tr>\n";
echo "</table>\n";
}
function print_fonctionement()
{
$pMonCadre = new CadreBD("cadre_Fonctionnement");
$pMonCadre->Affiche();
echo "<br><br>\n";
// puis un deuxieme cadre pour les goupilleurs
$pMonCadre2 = new CadreFichier("realteam.neodoc");
$pMonCadre2->Affiche(1);
AfficheVersionDuSite();
$pMonCadre2->affiche_CadreBas(true);
}
function print_contacts()
{
/* On creer un objet Cadre */
$pMonCadre = new CadreBD("cadre_Contacts");
$pMonCadre->Affiche();
}
function print_repetition()
{
/* Cadre1: Ou se trouve Jacou par rapport a Montpellier. */
$pCadreJacou = new Cadre("<center>O&ugrave; se trouve Jacou par ".
"rapport &agrave; Montpellier</center>",
"" , date ("d/m/Y "));
$pCadreJacou->affiche_CadreHaut(true);
echo "<center><img src=\"http://ohmj2.free.fr/ohmj/Imgs/".
"JacouMontpellier.png ".
"\"alt=\"Jacou / Montpellier\"></center>\n";
$pCadreJacou->affiche_CadreBas(true);
/* Cadre2: Ou se trouve La salle de repetition. */
$pCadreSallePrevert = new Cadre("<center>O&ugrave; se trouve la salle de ".
"r&eacute;p&eacute;tition &agrave; Jacou</center>",
"" , date ("d/m/Y "));
$pCadreSallePrevert->affiche_CadreHaut(true);
echo "<center><img src=\"http://ohmj2.free.fr/ohmj/Imgs/".
"SalleRepetition.png ".
"\"alt=\"Salle de Repetition\"></center>\n";
$pCadreSallePrevert->affiche_CadreBas(true);
}
function print_presse($numArcticle)
{
/* On regarde sin on doit afficher un article en particulier */
if ($numArcticle == 1)
$pMonCadre = new CadrePresse("ML-01-12-1998", "MIDI LIBRE",
"01/12/1998");
else if ($numArcticle == 2)
$pMonCadre = new CadrePresse("Echo-Mayre-01-2000",
"L'Echo de la Mayre",
"Janvier, Février, mars 2000");
else if ($numArcticle == 3)
$pMonCadre = new CadrePresse("ML-13-04-2000", "MIDI LIBRE",
"13-04-2000");
else if ($numArcticle == 4)
$pMonCadre = new CadrePresse("ML-12-12-2000", "MIDI LIBRE",
"12-12-2000");
else if ($numArcticle == 5)
$pMonCadre = new CadrePresse("CMF-aout-2004", "cmf","aout 2004");
else if ($numArcticle == 6)
$pMonCadre = new CadrePresse("CMF-Juin-2004", "cmf","Juin 2004");
else if ($numArcticle == 7)
$pMonCadre = new CadrePresse("ML-mai-2004", "MIDI LIBRE",
"ML-mai-2004");
else if ($numArcticle == 8)
$pMonCadre = new CadrePresse("ML-10-12-2005", "MIDI LIBRE",
"ML-10-12-2005");
else if ($numArcticle == 9)
$pMonCadre = new CadrePresse("ML-19-06-2007", "MIDI LIBRE",
"19-06-2007");
else if ($numArcticle ==10)
$pMonCadre = new CadrePresse("ML-07-12-2007", "MIDI LIBRE",
"07-12-2007");
else if ($numArcticle ==11)
$pMonCadre = new CadrePresse("ML-19-01-2008", "MIDI LIBRE",
"19-01-2008");
else if ($numArcticle ==12)
$pMonCadre = new CadrePresse("ML-20-10-2008", "MIDI LIBRE",
"20-10-2008");
else if ($numArcticle ==13)
$pMonCadre = new CadrePresse("ML-31-10-2008", "MIDI LIBRE",
"31-10-2008");
else if ($numArcticle ==14)
$pMonCadre = new CadrePresse("ML-20-06-2009", "MIDI LIBRE",
"20-06-2009");
/* Sinon on affiche tous les articles disponibles */
else
$pMonCadre = new CadreFichier("presse.neodoc");
/* Puis on affiche le cadre */
$pMonCadre->Affiche();
}
function print_La_Revue()
{
$pMonCadre = new CadreBD("cadre_la_Revue") ;
$pMonCadre->Affiche();
}
function print_albums_photos ($page, $pAlb, $NumImg)
{
global $KeyAdmAlbm, $AlbumRoot;
$SiteRoot = dirname ($GLOBALS['HTTP_SERVER_VARS']['SCRIPT_FILENAME']);
/* Create the object */
$pAlbum = new AlbumPhotos ($page, $SiteRoot, $AlbumRoot, $pAlb);
$pMonCadre = new Cadre("", "", $pAlbum->getDate());
if (($pAlb == "") || ($pAlb == "racine")) {
$pMonCadre->setTitre ("Album de l'Harmonie de Montpellier-Jacou");
$pMonCadre->setDate (date ("d/m/Y "));
}
else {
$pMonCadre->setTitre ($pAlbum->getTitre ());
$pMonCadre->setDate ($pAlbum->getDate ());
}
$pMonCadre->affiche_CadreHaut (true);
if ($pAlb == "")
$pAlb="racine";
if ($NumImg != "")
$pAlbum->AfficheImage ($pAlb, $NumImg);
else {
if (($pAlb == "") || ($pAlb == "racine"))
$pAlbum->AfficheAbumRacine ($pAlb);
else
$pAlbum->AfficheAbum ($pAlb);
}
// puis on ferme le cadre
$pMonCadre->affiche_CadreBas (true);
}
/* Obsolete function to print the albums photos . need to be removed
when the new one worls fine. */
function print_album_photo($pAlb, $NumImg)
{
include ("./Scripts/album.php");
$monAlbum = new Album ("./album");
$pMonCadre = new Cadre("", "", $monAlbum->getDate());
if (($pAlb == "") || ($pAlb == "racine")) {
$pMonCadre->setTitre("Album de l'Harmonie de Montpellier-Jacou");
$pMonCadre->setDate(date("d/m/Y "));
}
else {
$monAlbum->ScanAllAbum($pAlb);
$pMonCadre->setTitre( $monAlbum->getTitre());
$pMonCadre->setDate( $monAlbum->getDate());
}
$pMonCadre->affiche_CadreHaut(true);
if ($pAlb == "")
$pAlb="racine";
if ($NumImg != "")
$monAlbum->AfficheImage($pAlb, $NumImg);
else
$monAlbum->AfficheAbum($pAlb);
// puis on ferme le cadre
$pMonCadre->affiche_CadreBas(true);
} // fin function print_album_photo($pAlb)
function print_Livre_OR($page)
{
/*
* Le livre d'or est constitué de 3 cadres : un cadre contenant
* le nombre de message et un lien vers le formulaire pour remplir le
* livre d'or
* Un cadre contenant tous les messages du livre d'or
* et enfin un cadre contenant le formulaire pour rajouter un texte
* au livre d'or.
*/
$pMonLivredor = new Livredor();
$pMonLivredor->RecuperePage($page, false);
/* Puis on affiche le résultat dans un cadre */
if ($page == "")
$page = 0;
$page++;
$pCadreduHaut = new Cadre("<center>Livre d'or de l'Harmonie de ".
"montpellier-Jacou</center>", "" ,
date("d/m/Y "));
$pCadreduHaut->affiche_CadreHaut(true);
echo "<br><center>\n";
$pMonLivredor->GenereEntete($page, false);
echo "</center>\n";
$pCadreduHaut->affiche_CadreBas(true);
echo "<br><br>";
$pCadreTxtLivre = new Cadre("Livre d'or page : $page", "",
date("d/m/Y "));
$pCadreTxtLivre->affiche_CadreHaut(true);
echo "<center>\n";
$pMonLivredor->AfficheTexte();
echo "</center>\n";
$pCadreTxtLivre->affiche_CadreBas(true);
echo "<br><br>";
$pCadreInscription = new Cadre("Signer le Livre d'Or", "", date("d/m/Y "));
$pCadreInscription->affiche_CadreHaut(true);
echo "<center>\n";
$pMonLivredor->GenereFormulaireInscription();
echo "</center>\n";
$pCadreInscription->affiche_CadreBas(true);
}
function print_Valide_Livre_OR($pseudo, $email, $pays, $message, $date)
{
include ("./Scripts/Livredor.php");
global $racine, $page_index;
$pMonLivredor = new Livredor();
if (($pseudo == "") || ($message == "")) {
$donnee ="<br><br>
<table><tr>
<td>
<img src=$racine/Imgs/panneau.gif alt=panneau >
</td>
<td>
<b> Vous devez au moins indiquer un pseudo et taper un
message pour signer le livre d'or! </b>
<br><br>
<center>
<a href=\"$page_index?page=livre_or\">
Retour à la liste des messages</a></center>
</td>
</tr> </table>";
echo "<br><br>";
$pMonCadre = new Cadre("Erreur !", $donnee, date("d/m/Y H:h:i"));
$pMonCadre->Affiche();
echo "<br><br>";
$pCadreInscription = new Cadre("Signer le Livre d'Or", "",
date("d/m/Y "));
$pCadreInscription->affiche_CadreHaut(true);
echo "<center>\n";
$pMonLivredor->GenereFormulaireInscription();
echo "</center>\n";
$pCadreInscription->affiche_CadreBas(true);
}
else {
$pMonLivredor->ValideInscriptionLivre($pseudo, $email, $pays,
$message, $date);
print_Livre_OR($page);
}
}
function print_Membres ()
{
/* On creer un objet Cadre de type fichier */
$pMonCadre = new CadreBD("cadre_membres") ;
$pMonCadre->Affiche();
}
?>

761
Scripts/lib_print_ajem1.php Normal file
View File

@@ -0,0 +1,761 @@
<?php
/*
*********************************************************************
* File : $RCSfile: lib_print_ajem.php,v $
* Version : $Revision: 1.15 $
* Modified by : $Author: jb $ ($Date: 2005/04/17 16:44:32 $)
*********************************************************************
*/
// On a besoin du fichier de configuration général du site
require("./Scripts/conf.php");
require ("./Scripts/PenseeDuChef.php");
function print_editorial()
{
global $racine;
/* On creer un objet Cadre pour l'édito */
$pMonCadre = new CadreBD("news");
$pMonCadre->setTitre("News");
$pMonCadre->affiche_CadreHaut(true);
$donneeCadre = $pMonCadre->GetDataDB();
echo "<table cellspacing=\"0\" cellpadding=\"1\" border=\"0\">\n";
for ($cpt = 0; $cpt < 3; $cpt++) {
/* On recupere les données */
$RESnouvelle = mysql_result($donneeCadre, $cpt, "nouvelle");
$RESdate = mysql_result($donneeCadre, $cpt, "date");
if ($RESnouvelle != "") {
echo "<tr>\n";
echo "<td valign=\"middle\" align=\"center\" width=\"10%\" >\n
<img src=\"$racine/Imgs/icon_puce_over.gif\" border=\"0\"
alt=\"*\" />
</td>\n
<td class=\"news\">\n";
echo "<b>$RESdate</b> : $RESnouvelle\n </td> </tr>";
}
}
echo "</table><br/>\n";
$pMonCadre->affiche_CadreBas(true);
/* On creer un objet Cadre pour l'édito */
$pMonCadre = new CadreBD("cadre_edito");
$pMonCadre->Affiche();
}
function print_histoire()
{
/* On creer un objet Cadre de type fichier */
$pMonCadre = new CadreBD("cadre_Historique") ;
$pMonCadre->Affiche();
}
function print_Recrutement($num)
{
$pMonCadre = new CadreBD("cadre_Recrutement", $num);
$pMonCadre->Affiche();
}
function print_Liens()
{
$pMonCadre = new Cadre("Liens", "", "");
$pMonCadre->affiche_CadreHaut(true);
print_typeLien(1, "Orchestres d'Harmonie");
print_typeLien(2, "Sites sur la musique");
print_typeLien(3, "Autour de Montpellier");
$pMonCadre->affiche_CadreBas(true);
}
function print_typeLien($idlien, $szNomLien)
{
// Les variables locales
global $sql_bdd;
global $table_liens;
global $racine;
// Fin des variables locales
/* On se connecte sur la base */
$connect_db = jb_sql_connect(false);
CreerTitre($szNomLien);
echo "<center><table width=\"95%\" border=0>";
$resultat = mysql_db_query($sql_bdd, "select * from $table_liens where".
" type='$idlien'", $connect_db);
while ($row = mysql_fetch_row($resultat)) {
echo"<tr bgcolor=\"#DDDDDD\">\n";
echo "<td width=80% align=center>
<a href=\"$racine/Scripts/redirect.php?id=$row[0]\" ".
"target='_blank' > <font size=-1>$row[1]</font></a> </td>\n";
echo "<td> ($row[3] hits) </td></tr>\n";
echo "<tr bgcolor=\"#CCCCCC\">\n";
echo "<td >$row[4] </td><td>&nbsp;</td></tr>\n";
}
echo "</table> </center><br><br>";
}
function print_Musique_enLigne()
{
global $racine;
include ("./Scripts/Annuaire.php");
$pMonCadre = new Cadre("Musique en Ligne", "", "");
$pMesDownload = new AnnuDownload("download","AdmDownload", "");
$pMonCadre->affiche_CadreHaut(true);
$intro = "<p class=\"cadre\">
pour écouter les morceaux aux formats <b>mp3</b>,
vous pouvez utiliser le logiciel suivant :
<center><a href=\"http://www.winamp.com\" target=outside>
<img src=\"$racine/Imgs/winampbutton.gif\" width=\"88\" ".
"height=\"31\" border=0></a>
</center></p><br>\n";
$pMesDownload->AfficheDownload($intro);
$pMonCadre->affiche_CadreBas(true);
}
function print_info_concerts($opt, $id)
{
$date_maintenant = time() ;
$pMonCadre = new Cadre("Agenda de l'Orchestre", "", "");
$pMonCadre->affiche_CadreHaut(true);
if ($opt == "ancien")
print_concert("-", $date_maintenant, $id);
else
print_concert("+", $date_maintenant, $id);
$pMonCadre->affiche_CadreBas(true);
}
function print_concert($type, $date, $idconcert)
{
// Les variables locales
global $sql_bdd;
global $table_agenda;
// Fin des variables locales
$monthsArray = array("janvier", "février", "mars", "avril", "mai", "juin",
"juillet", "août", "septembre", "octobre", "novembre",
"décembre");
$daysArray=array("Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi",
"Vendredi", "Samedi");
if ($idconcert == "")
{
$connect_db = jb_sql_connect(false);
if ($type == "+") {
$resultat = mysql_db_query($sql_bdd, "select * from $table_agenda ".
"order by date_php", $connect_db);
echo "<center> [ <a href=$page_index?page=info_concerts&opt=ancien>".
" Voir les anciens concerts et leurs commentaires</a> ]
</center><br><br>";
}
else {
$resultat = mysql_db_query($sql_bdd,"select * from $table_agenda ".
"order by date_php desc",$connect_db);
echo "<center> [ <a href=$page_index?page=info_concerts>
Retour aux prochains concerts </a> ] </center><br><br>";
}
$btrouve = 0;
while ($row = mysql_fetch_row($resultat)) {
$datephp = $row[2];
/* On affiche les futurs concerts. */
if ((($type == "+") && ($datephp >= $date)) ||
(($type == "-") && ($datephp <= $date))) {
$id = $row[0];
$szheure = $row[3];
$szVille = $row[4];
$szLieu = $row[5];
$liste_morceaux = $row[6];
$commentaire = $row[7];
$dateConcert = getdate($datephp);
$jour = $daysArray[$dateConcert["wday"]];
$NumJour = $dateConcert["mday"];
$mois = $monthsArray[$dateConcert["mon"]-1];
$annee = $dateConcert["year"];
echo"<center>\n";
CreerPubConcert($jour, $NumJour, $mois, $annee, $szVille, $szLieu,
$szheure, $commentaire, $id, $liste_morceaux);
echo"</center><br><br>\n";
$btrouve = 1;
}
}
if ($btrouve == 0)
echo "<br><br><center> Il n'y a aucun Concert de planifié pour".
" le moment.
</center><br>";
}
else {
/* Si ON souhaite avoirt des infos sur un concert particulier */
$connect_db = jb_sql_connect(false);
$resultat = mysql_db_query($sql_bdd, "select * from $table_agenda where".
" id=$idconcert", $connect_db);
$szheure = mysql_result($resultat, 0, "heure_deb");
$szVille = mysql_result($resultat, 0, "ville");
$szLieu = mysql_result($resultat, 0, "lieu");
$liste_morceaux = mysql_result($resultat, 0, "liste_morceaux");
$commentaire = mysql_result($resultat, 0, "commentaire");
$datephp = mysql_result($resultat, 0, "date_php");
$dateConcert = getdate($datephp);
$jour = $daysArray[$dateConcert["wday"]];
$NumJour = $dateConcert["mday"];
$mois = $monthsArray[$dateConcert["mon"]-1];
$annee = $dateConcert["year"];
echo "<center>";
CreerTitre("$szVille - $szLieu");
echo "</center><br><br>";
echo "<center><table border=0 width=\"95%\">
<tr bgcolor=\"#DDDDDD\"><td align=center> Le $jour $NumJour".
" $mois $annee à $szheure </td>
</tr></table><br><br>";
echo "<center><table border=0 width=\"95%\">
<tr bgcolor=\"#CCCCCC\"><td > $commentaire </td>
</tr></table><br><br>";
CreerListeMorceau($liste_morceaux);
}
}
function print_repertoire($style)
{
if ($style == "") {
$pMonCadre = new CadreBD("cadre_Repertoire");
$pMonCadre->affiche_CadreHaut(true);
echo "$pMonCadre->szTabTexte";
echo "<ul>\n";
echo "<li><a href=$page_index?page=repertoire&opt=6 >
Musique originale pour Orchestre d'Harmonie </a></li>\n";
echo "<li><a href=$page_index?page=repertoire&opt=5 > Musique Classique".
" </a></li>\n";
echo "<li><a href=$page_index?page=repertoire&opt=4 > Musique de Film,".
"Comédie Musicale et Rock Opera </a></li>\n";
echo "<li><a href=$page_index?page=repertoire&opt=3 >".
" Danses et Musiques".
" Traditionnelles </a></li>\n";
echo "<li><a href=$page_index?page=repertoire&opt=2 >".
" Variétés Françaises".
" et Internationales </a></li>\n";
echo "<li><a href=$page_index?page=repertoire&opt=1 > ".
"Middle Jazz </a></li>\n";
echo "</ul><br><br>\n";
}
else {
$pMonCadre = new Cadre("Répertoire", "", "");
$pMonCadre->affiche_CadreHaut(true);
switch ($style) {
case "6" :
echo "<center>\n";
CreerTitre("Musique originale pour Orchestre d'Harmonie");
echo "</center><br><br>\n";
CreerCadreMorceau("Suites", 10);
CreerCadreMorceau("Marches et Polkas", 11);
CreerCadreMorceau("Pièces calmes", 12);
break;
case "3" :
echo "<center>\n";
CreerTitre("Danses et Musiques Traditionnelles");
echo "</center><br><br>\n";
CreerCadreMorceau("Pasos-dobles et Tangos", 20);
CreerCadreMorceau("Rythmes Latins", 21);
CreerCadreMorceau("Chansons du monde", 22);
break;
case "1" :
CreerCadreMorceau("Middle Jazz", $style);
break;
case "2" :
CreerCadreMorceau("Variétés Françaises et Internationales",
$style);
break;
case "4" :
CreerCadreMorceau("Musique de Film, Comédie Musicale et Rock".
" Opera", $style);
break;
case "5" :
CreerCadreMorceau("Musique Classique", $style);
break;
}
echo "<center><a href=$page_index?page=repertoire>< Retour >
</a></center><br><br> \n";
}
$pMonCadre->affiche_CadreBas(true);
}
function CreerListeMorceau($liste_morceaux)
{
// Les variables locales
global $sql_bdd;
global $table_repertoire;
// Fin des variables locales
$tablo = explode(";", $liste_morceaux);
$cpt = 0;
foreach ($tablo as $elem) {
$tab_list_select[$cpt] = $elem;
$cpt++;
}
/* On se connecte sur la base */
$connect_db = jb_sql_connect(false);
$resultat = mysql_db_query($sql_bdd, "select * from $table_repertoire ".
"order by id", $connect_db);
/* Puis on creer un tableau comtenant la totalité des morceaux */
$indTab = 1;
while($row = mysql_fetch_array($resultat))
{
$col_id = $row[0];
$col_nom = $row[2];
$col_compo = $row[3];
if ($indTab != $col_id) {
// print "<br>---- on augmente <br>";
for ($i = $indTab; $i < $col_id; $i++) {
// print "<br>---- on augmente <br>";
$tab_Morceau[] = array ($i, "0", "0");
}
$indTab = $col_id;
}
$tab_Morceau[] = array ($col_id, $col_nom, $col_compo);
$indTab++;
}
echo "<center><table border=0 width=\"95%\">
<tr>
<th bgcolor=\"#d5dee6\"> num </th>
<th bgcolor=\"#d5dee6\"> Nom </th>
<th bgcolor=\"#d5dee6\" >Compositeur</th>
</tr>\n";
for ($i = 0; $i < $cpt; $i++) {
$indice = $tab_list_select[$i];
$indice--;
list ($list_id, $list_nomMorceau, $list_compo) = $tab_Morceau[$indice];
if (($i % 2) == 0)
echo "<tr bgcolor=\"#DDDDDD\">\n";
else
echo "<tr bgcolor=\"#CCCCCC\">\n";
echo "<td>".($i + 1)."</td>\n";
echo "<td> $list_nomMorceau </td>\n";
echo "<td> $list_compo </td></tr>\n";
}
echo "</table> </center><br><br>";
}
function CreerCadreMorceau($titre, $style)
{
// Les variables locales
global $sql_bdd;
global $table_repertoire;
global $page_index;
// Fin des variables locales
CreerTitre($titre);
$connect_db = jb_sql_connect(false);
$resultat = mysql_db_query($sql_bdd, "select * from $table_repertoire".
" where style=$style order by numero",
$connect_db);
echo "<center><table border=0 width=\"95%\">
<tr>
<th bgcolor=\"#d5dee6\"> Nom </th>
<th bgcolor=\"#d5dee6\"> Compositeur </th>
</tr>\n";
while ($row = mysql_fetch_row($resultat)) {
if (($i % 2) == 0)
echo "<tr bgcolor=\"#DDDDDD\">\n";
else
echo "<tr bgcolor=\"#CCCCCC\">\n";
echo "<td>$row[2] </td>\n";
echo "<td>$row[3] </td> </tr>\n";
$i++;
}
MYSQL_CLOSE;
echo "</table></center><br><br><br>\n";
}
function CreerTitre($titre)
{
echo "<table width=\"50%\" bgcolor=\"#5a69a4\" cellpadding=\"0\" ".
" cellspacing=\"0\" border=\"0\"><tr><td>
<table width=\"100%\" cellpadding=\"3\" cellspacing=\"2\" border=\"0\" >
<tr>
<td bgcolor=\"#5b8cc1\" align=\"left\">
<font color=\"white\" size=\"2\">
<b> $titre </b></font><br></td>
</tr></table></td></tr></table><br>\n";
}
function CreerPubConcert($jour, $NumJour, $mois, $annee, $ville, $lieu,
$heure, $commentaire, $id, $liste_morceaux)
{
global $page_index;
echo "
<table border=1 width=\"65%\">\n<tr align=left>\n
<td align='left' valign='middle' bgcolor='#FFFF00'>
<table border='0'>\n<tr>\n
<td align='center' valign='middle' bgcolor='#000000'>
<font color='#F5E9CF'><b><font face='Arial, Helvetica,
sans-serif' color='#FFFF00'>$jour<br>
<font size='6'>$NumJour</font><br>$mois <br>$annee</font>
</b></font>\n </td>
<td align='center' valign='middle'>\n<p><b>
<font size='+1'>O.H.M.J.</font></b><br>
EN CONCERT<br> &agrave; <b><font size='+2'>$ville</font>
</b></p>\n<p>
$lieu - $heure \n</p> \n </td>\n </tr> \n
</table> \n</tr> \n";
if ($commentaire != "")
echo "<tr><td bgcolor=\"#DDDDDD\" ><font size=-1>$commentaire
</font></td></tr>\n";
if ($liste_morceaux != "")
echo "<tr><td align=center bgcolor=\"#CCCCCC\" >
<a href=$page_index?page=".
"info_concerts&id=$id> Voir la liste des morceaux joués </a>
</td></tr>\n";
echo "</table>\n";
}
function print_fonctionement()
{
$pMonCadre = new CadreBD("cadre_Fonctionnement");
$pMonCadre->Affiche();
echo "<br><br>\n";
// puis un deuxieme cadre pour les goupilleurs
$pMonCadre2 = new CadreFichier("realteam.neodoc");
$pMonCadre2->Affiche(1);
AfficheVersionDuSite();
$pMonCadre2->affiche_CadreBas(true);
}
function print_contacts()
{
/* On creer un objet Cadre */
$pMonCadre = new CadreBD("cadre_Contacts");
$pMonCadre->Affiche();
}
function print_repetition()
{
/* Cadre1: Ou se trouve Jacou par rapport a Montpellier. */
$pCadreJacou = new Cadre("<center>O&ugrave; se trouve Jacou par ".
"rapport &agrave; Montpellier</center>",
"" , date ("d/m/Y "));
$pCadreJacou->affiche_CadreHaut(true);
echo "<center><img src=\"http://ohmj2.free.fr/ohmj/Imgs/".
"JacouMontpellier.png ".
"\"alt=\"Jacou / Montpellier\"></center>\n";
$pCadreJacou->affiche_CadreBas(true);
/* Cadre2: Ou se trouve La salle de repetition. */
$pCadreSallePrevert = new Cadre("<center>O&ugrave; se trouve la salle de ".
"r&eacute;p&eacute;tition &agrave; Jacou</center>",
"" , date ("d/m/Y "));
$pCadreSallePrevert->affiche_CadreHaut(true);
echo "<center><img src=\"http://ohmj2.free.fr/ohmj/Imgs/".
"SalleRepetition.png ".
"\"alt=\"Salle de Repetition\"></center>\n";
$pCadreSallePrevert->affiche_CadreBas(true);
}
function print_presse($numArcticle)
{
/* On regarde sin on doit afficher un article en particulier */
if ($numArcticle == 1)
$pMonCadre = new CadrePresse("ML-01-12-1998", "MIDI LIBRE",
"01/12/1998");
else if ($numArcticle == 2)
$pMonCadre = new CadrePresse("Echo-Mayre-01-2000",
"L'Echo de la Mayre",
"Janvier, Février, mars 2000");
else if ($numArcticle == 3)
$pMonCadre = new CadrePresse("ML-13-04-2000", "MIDI LIBRE",
"13-04-2000");
else if ($numArcticle == 4)
$pMonCadre = new CadrePresse("ML-12-12-2000", "MIDI LIBRE",
"12-12-2000");
else if ($numArcticle == 5)
$pMonCadre = new CadrePresse("CMF-aout-2004", "cmf","aout 2004");
else if ($numArcticle == 6)
$pMonCadre = new CadrePresse("CMF-Juin-2004", "cmf","Juin 2004");
else if ($numArcticle == 7)
$pMonCadre = new CadrePresse("ML-mai-2004", "MIDI LIBRE",
"ML-mai-2004");
else if ($numArcticle == 8)
$pMonCadre = new CadrePresse("ML-10-12-2005", "MIDI LIBRE",
"ML-10-12-2005");
else if ($numArcticle == 9)
$pMonCadre = new CadrePresse("ML-19-06-2007", "MIDI LIBRE",
"19-06-2007");
else if ($numArcticle ==10)
$pMonCadre = new CadrePresse("ML-07-12-2007", "MIDI LIBRE",
"07-12-2007");
/* Sinon on affiche tous les articles disponibles */
else
$pMonCadre = new CadreFichier("presse.neodoc");
/* Puis on affiche le cadre */
$pMonCadre->Affiche();
}
function print_La_Revue()
{
$pMonCadre = new CadreBD("cadre_la_Revue") ;
$pMonCadre->Affiche();
}
function print_albums_photos ($page, $pAlb, $NumImg)
{
global $KeyAdmAlbm, $AlbumRoot;
$SiteRoot = dirname ($GLOBALS['HTTP_SERVER_VARS']['SCRIPT_FILENAME']);
/* Create the object */
$pAlbum = new AlbumPhotos ($page, $SiteRoot, $AlbumRoot, $pAlb);
$pMonCadre = new Cadre("", "", $pAlbum->getDate());
if (($pAlb == "") || ($pAlb == "racine")) {
$pMonCadre->setTitre ("Album de l'Harmonie de Montpellier-Jacou");
$pMonCadre->setDate (date ("d/m/Y "));
}
else {
$pMonCadre->setTitre ($pAlbum->getTitre ());
$pMonCadre->setDate ($pAlbum->getDate ());
}
$pMonCadre->affiche_CadreHaut (true);
if ($pAlb == "")
$pAlb="racine";
if ($NumImg != "")
$pAlbum->AfficheImage ($pAlb, $NumImg);
else {
if (($pAlb == "") || ($pAlb == "racine"))
$pAlbum->AfficheAbumRacine ($pAlb);
else
$pAlbum->AfficheAbum ($pAlb);
}
// puis on ferme le cadre
$pMonCadre->affiche_CadreBas (true);
}
/* Obsolete function to print the albums photos . need to be removed
when the new one worls fine. */
function print_album_photo($pAlb, $NumImg)
{
include ("./Scripts/album.php");
$monAlbum = new Album ("./album");
$pMonCadre = new Cadre("", "", $monAlbum->getDate());
if (($pAlb == "") || ($pAlb == "racine")) {
$pMonCadre->setTitre("Album de l'Harmonie de Montpellier-Jacou");
$pMonCadre->setDate(date("d/m/Y "));
}
else {
$monAlbum->ScanAllAbum($pAlb);
$pMonCadre->setTitre( $monAlbum->getTitre());
$pMonCadre->setDate( $monAlbum->getDate());
}
$pMonCadre->affiche_CadreHaut(true);
if ($pAlb == "")
$pAlb="racine";
if ($NumImg != "")
$monAlbum->AfficheImage($pAlb, $NumImg);
else
$monAlbum->AfficheAbum($pAlb);
// puis on ferme le cadre
$pMonCadre->affiche_CadreBas(true);
} // fin function print_album_photo($pAlb)
function print_Livre_OR($page)
{
/*
* Le livre d'or est constitué de 3 cadres : un cadre contenant
* le nombre de message et un lien vers le formulaire pour remplir le
* livre d'or
* Un cadre contenant tous les messages du livre d'or
* et enfin un cadre contenant le formulaire pour rajouter un texte
* au livre d'or.
*/
$pMonLivredor = new Livredor();
$pMonLivredor->RecuperePage($page, false);
/* Puis on affiche le résultat dans un cadre */
if ($page == "")
$page = 0;
$page++;
$pCadreduHaut = new Cadre("<center>Livre d'or de l'Harmonie de ".
"montpellier-Jacou</center>", "" ,
date("d/m/Y "));
$pCadreduHaut->affiche_CadreHaut(true);
echo "<br><center>\n";
$pMonLivredor->GenereEntete($page, false);
echo "</center>\n";
$pCadreduHaut->affiche_CadreBas(true);
echo "<br><br>";
$pCadreTxtLivre = new Cadre("Livre d'or page : $page", "",
date("d/m/Y "));
$pCadreTxtLivre->affiche_CadreHaut(true);
echo "<center>\n";
$pMonLivredor->AfficheTexte();
echo "</center>\n";
$pCadreTxtLivre->affiche_CadreBas(true);
echo "<br><br>";
$pCadreInscription = new Cadre("Signer le Livre d'Or", "", date("d/m/Y "));
$pCadreInscription->affiche_CadreHaut(true);
echo "<center>\n";
$pMonLivredor->GenereFormulaireInscription();
echo "</center>\n";
$pCadreInscription->affiche_CadreBas(true);
}
function print_Valide_Livre_OR($pseudo, $email, $pays, $message, $date)
{
include ("./Scripts/Livredor.php");
global $racine, $page_index;
$pMonLivredor = new Livredor();
if (($pseudo == "") || ($message == "")) {
$donnee ="<br><br>
<table><tr>
<td>
<img src=$racine/Imgs/panneau.gif alt=panneau >
</td>
<td>
<b> Vous devez au moins indiquer un pseudo et taper un
message pour signer le livre d'or! </b>
<br><br>
<center>
<a href=\"$page_index?page=livre_or\">
Retour à la liste des messages</a></center>
</td>
</tr> </table>";
echo "<br><br>";
$pMonCadre = new Cadre("Erreur !", $donnee, date("d/m/Y H:h:i"));
$pMonCadre->Affiche();
echo "<br><br>";
$pCadreInscription = new Cadre("Signer le Livre d'Or", "",
date("d/m/Y "));
$pCadreInscription->affiche_CadreHaut(true);
echo "<center>\n";
$pMonLivredor->GenereFormulaireInscription();
echo "</center>\n";
$pCadreInscription->affiche_CadreBas(true);
}
else {
$pMonLivredor->ValideInscriptionLivre($pseudo, $email, $pays,
$message, $date);
print_Livre_OR($page);
}
}
function print_Membres($Page, $numPage)
{
global $racine;
if ($Page == "") {
if ($numPage == "") {
$donnee = "
<table width=\"50%\" bgcolor=\"#5a69a4\" cellpadding=\"0\"
cellspacing=\"0\" border=\"0\"><tr><td>
<table width=\"100%\" cellpadding=\"3\" cellspacing=\"2\"
border=\"0\" >
<tr>
<td bgcolor=\"#5b8cc1\" align=\"left\">
<font color=\"white\" size=\"2\">
<b> voyage &agrave; Taninges </b></font><br></td>
</tr></table></td></tr></table><br>
<ul>
<li> <a href=\"$page_index?page=membres&Pp=sam_tann&numP=1\">
Journée de Samedi</a>
<li> <a href=\"$page_index?page=membres&Pp=dim_tann&numP=1\">
Journée de Dimanche</a>
</ul>
<br><br>
<table width=\"50%\" bgcolor=\"#5a69a4\" cellpadding=\"0\"
cellspacing=\"0\" border=\"0\"><tr><td>
<table width=\"100%\" cellpadding=\"3\" cellspacing=\"2\"
border=\"0\" >
<tr>
<td bgcolor=\"#5b8cc1\" align=\"left\">
<font color=\"white\" size=\"2\">
<b> Documents (tests)</b></font><br></td>
</tr></table></td></tr></table><br>
<ul>
<!--<li><a href=\"$page_index?page=membres&Pp=Repertoire_pdf\"> -->
<li><a href=\"$racine/fpdf/repertoire.php\" target='_blank'>
Liste des mocreaux de l'Harmonie </a>
</ul>
<br><br>";
$pMonCadre = new Cadre("Espace Membre", $donnee, date("d/m/Y H:h:i"));
$pMonCadre->Affiche();
}
}
elseif (($Page == "sam_tann") || ($Page == "dim_tann")) {
$pMonCadre = new Cadre("Voyage &agrave; Taninges", $donnee,
date("d/m/Y H:h:i"));
$pMonCadre->SetBgColor("#ffffff");
$pMonCadre->affiche_CadreHaut(true);
if ($Page == "sam_tann")
$szChemin = "./membre/02-03-2002-TANNINGES/samedi_tann$numPage.html";
else if ($Page == "dim_tann")
$szChemin = "./membre/02-03-2002-TANNINGES/".
"dimanche_tann$numPage.html";
echo "<center>\n";
include ("$szChemin");
echo "</center>\n";
$pMonCadre->affiche_CadreBas(true);
}
elseif ($Page == "Repertoire_pdf") {
/*
include('fpdf.php');
$pdf=new FPDF();
$pdf->Open();
$pdf->AddPage();
$pdf->SetFont('Arial','B',16);
$pdf->Cell(40,10,'Hello World !');
$pdf->Output();
*/
}
}
?>

33
Scripts/log.txt Executable file
View File

@@ -0,0 +1,33 @@
TITRE = Journal des modifications
12 /08 /2001 17:13 : jb a modifié le cadre Recrutement<br>
12 /08 /2001 17:14 : jb a modifié le cadre Contacts<br>
21 /09 /2001 17:18 : jb a modifié le cadre Editorial<br>
21 /09 /2001 17:25 : jb a modifié le cadre Recrutement<br>
21 /09 /2001 17:26 : jb a modifié le cadre Recrutement<br>
19 /10 /2001 01:39 : jb a modifié le cadre Editorial<br>
19 /10 /2001 01:40 : jb a modifié le cadre Historique<br>
19 /10 /2001 01:40 : jb a modifié le cadre Fonctionnement<br>
19 /10 /2001 01:41 : jb a modifié le cadre Contacts<br>
19 /10 /2001 01:43 : jb a modifié le cadre Recrutement<br>
19 /10 /2001 01:44 : jb a modifié le cadre Recrutement<br>
23 /10 /2001 21:31 : jb a modifié le cadre Repertoire<br>
23 /10 /2001 21:32 : jb a modifié le cadre Repertoire<br>
26 /10 /2001 15:12 : jb a modifié le cadre Recrutement<br>
26 /10 /2001 15:20 : jb a modifié le cadre Editorial<br>
12 /11 /2001 17:52 : jb a modifié le cadre Recrutement<br>
12 /11 /2001 18:02 : jb a modifié le cadre Contacts<br>
13 /11 /2001 10:37 : sylvain a modifié le cadre Editorial<br>
13 /11 /2001 10:44 : sylvain a modifié le cadre Repertoire<br>
13 /11 /2001 10:51 : sylvain a modifié le cadre Recrutement<br>
13 /11 /2001 10:54 : sylvain a modifié le cadre Recrutement<br>
13 /11 /2001 10:59 : sylvain a modifié le cadre Recrutement<br>
13 /11 /2001 11:01 : sylvain a modifié le cadre Recrutement<br>
13 /11 /2001 11:03 : sylvain a modifié le cadre Contacts<br>
13 /11 /2001 11:04 : sylvain a modifié le cadre Fonctionnement<br>
13 /11 /2001 11:10 : sylvain a modifié le cadre Editorial<br>
13 /11 /2001 11:22 : sylvain a modifié le cadre Editorial<br>
13 /11 /2001 13:30 : sylvain a modifié le cadre Historique<br>
15 /11 /2001 14:31 : jb a modifié le cadre Historique<br>
27 /01 /2002 16:06 : jb a modifié le cadre La Revue<br>
27 /01 /2002 16:22 : jb a modifié le cadre La Revue<br>
27 /01 /2002 16:24 : jb a modifié le cadre La Revue<br>

524
Scripts/log_func.php3 Executable file
View File

@@ -0,0 +1,524 @@
<?php
/*
*********************************************************************
* File : $RCSfile: log_func.php3,v $
* Version : $Revision: 1.1.1.1 $
* Modified by : $Author: jb $ ($Date: 2002/03/10 17:13:32 $)
*********************************************************************
*/
# log_func.php3 for ezBOO WebStats 2.0
# 5 june 2001
# 10 September 2001:
# ExtractAgentFunction has been improved
$sites = array( "logezboo"=>"www.ohmj.fr.st");
##################################################################################
# Archive fucntion is used to clean logtable from old data
# The log table (logezboo) should only contain current month data
# Archive fucntion will bet older (than current) months and create an history table
# with "_h" at the end to store total hist for all previous months
function Archive($table_log) {
require "conf.php";
require "msg_french.inc.php3";
$c = jb_sql_connect(true);
$db = mysql_select_db($sql_bdd) or die($msgBaseConnectImpossible);
// Get Oldest month in the table
$result = mysql_query ("SELECT month(min(date)) FROM $table_log");
$row = mysql_fetch_array ($result);
$today_month = date("n");
// Start archive if months are different
if ($row[0]!=$today_month and $row[0]!= NULL) {
# Oldest month in the table
$result = mysql_query ("SELECT month(min(date)) FROM $table_log");
$row = mysql_fetch_array ($result);
$oldest_month = $row[0];
# Oldest year in the table
$result = mysql_query ("SELECT year(min(date)) FROM $table_log");
$row = mysql_fetch_array ($result);
$oldest_year = $row[0];
$today_year = date("Y");
while ( ($oldest_month.$oldest_year != $today_month.$today_year) ) {
# Count hits for the oldest month
$result = mysql_query ("SELECT COUNT(*) FROM $table_log WHERE MONTH(date)=$oldest_month and YEAR(date)=$oldest_year");
$row = mysql_fetch_array ($result);
echo $oldest_month." - ".$oldest_year." = ".$row[0]."<br><br>";
$hits = $row[0];
# Write in history table
$table_log_h = $table_log."_h";
$wdate = $oldest_year."-".$oldest_month."-01";
$result = mysql_query("INSERT INTO $table_log_h (id, date, hits) VALUES ('', '$wdate', '$hits')")
or die($msgCanotWriteArchive);
#Clear log table
$result = mysql_query("DELETE FROM $table_log WHERE month(date)=$oldest_month AND year(date)=$oldest_year");
$oldest_month = $oldest_month + 1;
if ($oldest_month == 13) {
$oldest_month = 1;
$oldest_year = $oldest_year + 1;
}
} # end while loop
echo $msgArchiveCreated."\n";
} //end if
// mysql_free_result ($result);
mysql_close ($c); // close sql connection
} # End of function Archive
##################################################################################
# This function will output in html format a table
# with a title ($title) and a list of Items with corresponding
# bar graph representing percentage
# $val must be an array such as:
# [Total] => 20
# [Win95] => 12
# [Win98] => 7
# [WinNT] => 1
##################################################################################
function ProcessBarGraph($title, $val) {
require "msg_french.inc.php3";
global $period;
global $table;
global $reqdate;
global $id;
global $racine;
echo "<table width=\"300\" border=\"0\" cellspacing=\"0\" cellpadding=\"3\" class=\"normal\">";
echo "<tr bgcolor=\"#CCCCCC\">";
echo "<td colspan=\"2\"><b>".$title."</b></td>";
echo "<td width=\"0\">"."<div align=\"center\">"."Hits"."</div></td>";
echo "<td>"."<div align=\"center\">"."%"."</div></td>";
echo "</tr>";
echo "<tr>";
$sta = true;
# Find max of percentage
$temparray = $val;
$temparray[Total] = 0;
if ($val["Total"]>0) $maxpcbar = 100 * max($temparray) / $val["Total"];
while (($bar=each($val)) && ($val[Total]<> 0)) {
if ($bar[0]<>"Total") {
if ($sta) { $color = "#CCCCFF" ; } else { $color = "#FFFFCC" ;}
$pcbar = round(100 * $bar[1] / $val["Total"]);
$barwidth = round(100 * $pcbar / $maxpcbar);
echo "<tr>";
# title
if (substr($bar[0],0,4)=="http") {
echo "<td width=\"180\" bgcolor=\"$color\">"."<a href=\"".$bar[0]."\" target=\"_blank\">".substr($bar[0],7,20)."</a>"."</td>";
} else
// Special link for country
if ($title==$msgCountrySort ) {
echo "<td width=\"180\" bgcolor=\"$color\">"."<a href=\"read.php3?id=$id&table=".$table."&period=".$period."&reqdate=".$reqdate."&stp=country&stp2=".$bar[0]."\">".$bar[0]."</a>"."</td>";
} else
// Special link for browser
if ($title==$msgBrowserSort ) {
echo "<td width=\"180\" bgcolor=\"$color\">"."<a href=\"read.php3?id=$id&table=".$table."&period=".$period."&reqdate=".$reqdate."&stp=wb&stp2=".$bar[0]."\">".$bar[0]."</a>"."</td>";
} else
// Special link for OS
if ($title==$msgOsSort ) {
echo "<td width=\"180\" bgcolor=\"$color\">"."<a href=\"read.php3?id=$id&table=".$table."&period=".$period."&reqdate=".$reqdate."&stp=os&stp2=".$bar[0]."\">".$bar[0]."</a>"."</td>";
} else
//Regular display: no link
echo "<td width=\"180\" bgcolor=\"$color\">".$bar[0]."</td>";
# List of stuff
echo "<td width=\"170\" bgcolor=\"$color\">";
# Start of bar graph
print("<img src=\"$racine/Imgs/bar_1.gif\" width=\"1\" height=\"12\" alt=\"$bar[1] hits - $pcbar %\">");
# Bar graph itself
print("<img src=\"$racine/Imgs/bar_1u.gif\" width=\"$barwidth\" height=\"12\" alt=\"$bar[1] hits - $pcbar %\">");
# End of bar graph
print("<img src=\"$racine/Imgs/bar_1.gif\" width=\"1\" height=\"12\" alt=\"$bar[1] hits - $pcbar %\">");
echo "</td>";
echo "<td bgcolor=\"$color\">"."<div align=\"center\">".$bar[1]."</div></td>";
echo "<td bgcolor=\"$color\">"."<div align=\"center\">".$pcbar."%</div></td>";
echo "</tr>";
$sta = !$sta;
}
}
# print total
echo "<tr bgcolor=\"#CCCCCC\">";
echo "<td colspan=\"4\"><div align=\"right\">Total: ".$val[Total]."</div></td>";
echo "<tr>";
echo "</table>";
} # end of fucntion ProcessBarGraph
##################################################################################
function MonthSort($table_log, $reqdate) {
require "conf.php";
require "msg_french.inc.php3";
$today_array = getdate($reqdate);
$c = jb_sql_connect(true);
$db = mysql_select_db($sql_bdd) or die($msgBaseConnectImpossible);
// Query in history table
$table_log_h = $table_log."_h";
$val_array = array("Total"=>0);
$result = mysql_query ("SELECT UNIX_TIMESTAMP(date),hits FROM $table_log_h order by date ASC");
if ($result !="") $row = mysql_fetch_array ($result);
if ($row[0]!= NULL) {
while ($row = mysql_fetch_array ($result)) {
$date_array = getdate($row[0]);
$val_array = $val_array + array($msgMonthsArray[$date_array["mon"]-1]." ".$date_array["year"]=>$row[hits]);
$val_array["Total"] = $val_array["Total"] + $row[hits];
} # end while
}
// Query in regular table
// Regular table contains only data of current month
// All older data have been passed to the "_h" table via the Archive fucntion
$result = mysql_query ("SELECT count(*) FROM $table_log order by date ASC");
$row = mysql_fetch_array ($result);
$val_array = $val_array + array($msgMonthsArray[date(m)-1]." ".date(Y)=>$row[0]);
$val_array["Total"] = $val_array["Total"] + $row[0];
mysql_free_result ($result);
mysql_close ($c);
return $val_array;
}
##################################################################################
function DaySort($table_log, $reqdate, $period) {
require "conf.php";
$c = jb_sql_connect(true);
$db = mysql_select_db($sql_bdd) or die($msgBaseConnectImpossible);
# select what to search for depending on selected period
switch ($period) {
case "semaine":
$q_string = "SELECT UNIX_TIMESTAMP(date) FROM $table_log WHERE WEEK(date)=WEEK(FROM_UNIXTIME('$reqdate')) order by date ASC";
$result = mysql_query ($q_string);
break;
case "mois":
$q_string = "SELECT UNIX_TIMESTAMP(date) FROM $table_log WHERE MONTH(date)=MONTH(FROM_UNIXTIME('$reqdate')) order by date ASC";
$result = mysql_query ($q_string);
break;
}
$val_array = array("Total"=>0);
$last_date_array = array(0,0,0,0,0,0,0,0,0,0);
$nb_lastval = 1;
$today_array = getdate($reqdate);
$i = 0;
while ($row = mysql_fetch_array ($result)) {
$date_array = getdate($row[0]);
if ($date_array["year"] == $today_array["year"]) {
if ($date_array["mon"] == $today_array["mon"]) {
if ( ($last_date_array["mday"] == $date_array["mday"]) ) {
$nb_lastval += 1;
} else {
if ($i<>0) {
$val_array = $val_array + array($last_date_array["mday"]."/".$last_date_array["mon"]."/".$last_date_array["year"]=>$nb_lastval);
$nb_lastval=1;
}
}
$last_date_array = $date_array;
$i += 1;
} # end if mon
} # end if year
} # end while
$val_array = $val_array + array($last_date_array["mday"]."/".$last_date_array["mon"]."/".$last_date_array["year"]=>$nb_lastval);
$val_array["Total"] = $i;
mysql_free_result ($result);
mysql_close ($c);
return $val_array;
}
##################################################################################
function HourSort($table_log, $reqdate) {
require "conf.php";
$c = jb_sql_connect(true);
$db = mysql_select_db($sql_bdd) or die($msgBaseConnectImpossible);
$result = mysql_query ("SELECT UNIX_TIMESTAMP(date) FROM $table_log WHERE DAYOFYEAR(date)=DAYOFYEAR(FROM_UNIXTIME($reqdate)) order by date ASC");
$val_array = array("Total"=>0);
$last_date_array = array(0,0,0,0,0,0,0,0,0,0);
$nb_lastval = 1;
$today_array = getdate($reqdate);
$i = 0;
while ($row = mysql_fetch_array ($result)) {
$date_array = getdate($row[0]);
if ($date_array["year"] == $today_array["year"]) {
if ($date_array["mon"] == $today_array["mon"]) {
if ($date_array["mday"] == $today_array["mday"]) {
if ( ($last_date_array["hours"] == $date_array["hours"]) ) {
$nb_lastval += 1;
} else {
if ($i<>0) {
$val_array = $val_array + array($last_date_array["hours"]." h"=>$nb_lastval);
$nb_lastval=1;
}
}
$last_date_array = $date_array;
$i += 1;
} # end if mday
} # end if mon
} # end if year
} # end while
$val_array = $val_array + array($last_date_array["hours"]." h"=>$nb_lastval);
$val_array["Total"] = $i;
mysql_free_result ($result);
mysql_close ($c);
return $val_array;
}
##################################################################################
# This function will class a given collumn $field
# $field must be equal to a column field (i.e.: provider)
# function output a array like for os:
# [Total] => 20
# [Win95] => 12
# [Win98] => 7
# [WinNT] => 1
##################################################################################
function ClassAndCountField($table_log, $field,$reqdate,$period) {
require "conf.php";
require "msg_french.inc.php3";
$c = jb_sql_connect(true);
$db = mysql_select_db($sql_bdd) or die($msgBaseConnectImpossible);
# select what to search for depending on selected period
switch ($period) {
case "jour":
$q_string = "SELECT $field FROM $table_log WHERE DAYOFYEAR(date)=DAYOFYEAR(FROM_UNIXTIME('$reqdate')) order by $field ASC";
$result = mysql_query ($q_string);
break;
case "semaine":
$q_string = "SELECT $field FROM $table_log WHERE WEEK(date)=WEEK(FROM_UNIXTIME('$reqdate')) order by $field ASC";
$result = mysql_query ($q_string);
break;
case "mois":
$q_string = "SELECT $field FROM $table_log WHERE MONTH(date)=MONTH(FROM_UNIXTIME('$reqdate')) order by $field ASC";
$result = mysql_query ($q_string);
break;
}
$val_array = array("Total"=>0);
$lastval = "xxx";
$i = 0;
$nb_lastval = 1;
$sites="www.ohmj.fr.st";
if ($field !="referer") {
while ($row = mysql_fetch_array ($result)) {
if ($lastval == $row[$field]) {
$nb_lastval += 1;
} else {
if ($i<>0) {
$val_array = $val_array + array("$lastval"=>$nb_lastval);
$nb_lastval=1;
}
}
$lastval = $row[$field];
$i += 1;
}
$val_array = $val_array + array("$lastval"=>$nb_lastval);
$val_array["Total"] = $i;
} else {
while ($row = mysql_fetch_array ($result))
{
// if ( $row[0]!='' and !eregi($sites[$table_log],$row[0])) {
if ( $row[0]!='' and !eregi($sites,$row[0])) {
if ($lastval == $row[$field]) {
$nb_lastval += 1;
} else {
if ($i<>0) {
$val_array = $val_array + array("$lastval"=>$nb_lastval);
$nb_lastval=1;
}
}
$lastval = $row[$field];
$i += 1;
}
}
//echo " tab log vaut : $table_log<br>";
//echo " et site : $sites[$table_log]<br>";
//if (!eregi($sites[$table_log],$lastval) and $lastval!="" ) {
if (!eregi( $sites ,$lastval) and $lastval!="" ) {
$val_array = $val_array + array("$lastval"=>$nb_lastval);
$val_array["Total"] = $i;
}
}
arsort($val_array);
mysql_free_result ($result);
mysql_close ($c);
return $val_array;
}
##################################################################################
# This function will attempt to fill empty field in table_log such as
# country, provider, os, wb
##################################################################################
function ProcessEmptyEntry($table_log) {
require "conf.php";
$c = jb_sql_connect(true);
$db = mysql_select_db($sql_bdd) or die($msgBaseConnectImpossible);
# Fill country column
$result = mysql_query ("SELECT * from $table_log WHERE country='' ");
while ($row = mysql_fetch_array ($result)) {
$newval=ExtractCountry($row[host]);
$req = mysql_query("UPDATE $table_log SET country='$newval' where id='$row[id]' ");
}
# Fill provider column
$result = mysql_query ("SELECT * from $table_log WHERE provider='' ");
while ($row = mysql_fetch_array ($result)) {
$newval=ExtractProvider($row[host],$row[address]);
$req = mysql_query("UPDATE $table_log SET provider='$newval' where id='$row[id]' ");
}
# Fill os column
$result = mysql_query ("SELECT * from $table_log WHERE os='' ");
while ($row = mysql_fetch_array ($result)) {
list($wb,$newval)=split(";",ExtractAgent($row[agent]));
$req = mysql_query("UPDATE $table_log SET os='$newval' where id='$row[id]' ");
}
# Fill wb column
$result = mysql_query ("SELECT * from $table_log WHERE wb='' ");
while ($row = mysql_fetch_array ($result)) {
list($newval,$os)=split(";",ExtractAgent($row[agent]));
$req = mysql_query("UPDATE $table_log SET wb='$newval' where id='$row[id]' ");
}
mysql_free_result ($result);
# mysql_free_result ($req);
mysql_close ($c);
return True;
} # end of function ProcessEmptyEntry
##################################################################################
# This function will clear : country, provider, os, wb
##################################################################################
function ClearAll($table_log) {
require "conf.php";
$c = jb_sql_connect(true);
$db = mysql_select_db($sql_bdd) or die($msgBaseConnectImpossible);
$req = mysql_query("UPDATE $table_log SET country=''");
$req = mysql_query("UPDATE $table_log SET provider=''");
$req = mysql_query("UPDATE $table_log SET os=''");
$req = mysql_query("UPDATE $table_log SET wb=''");
return True;
} # end of ClearAll
##################################################################################
# Use this function to extract domain name from a Host name
# $hst should be equal to @getHostByAddr($REMOTE_ADDR)
# for exemple www.ezboo.fr will return ezboo.fr
# but www.ezboo.co.jp will return ezboo.co.jp
##################################################################################
function ExtractProvider($hst, $addressip) {
require "msg_french.inc.php3";
$hst_array = split("[.]",$hst);
$prov = $hst_array[sizeof($hst_array)-2].'.'.$hst_array[sizeof($hst_array)-1];
if ($hst != $addressip) {
if ($prov == "co.jp" or $prov == "co.uk" ) return $hst_array[sizeof($hst_array)-3].".".$prov;
else return $prov ;
} else return $msgOther;
} #end of ExtractProvider
##################################################################################
# Use this function to extract country name from a Host name
# $hst should be equal to @getHostByAddr($REMOTE_ADDR)
# for exemple www.ezboo.fr will return France
##################################################################################
function ExtractCountry($hst) {
require "conf.php";
require "msg_french.inc.php3";
$hst_array = split("[.]",$hst);
$lastval = $hst_array[sizeof($hst_array)-1]; # last value in host name
$table_dom = "liste_domaines";
$c2 = jb_sql_connect(true);
$db2 = mysql_select_db($sql_bdd) or die($msgBaseConnectImpossible);
$req2 = mysql_query("select description from $table_dom where domaine='$lastval' ") or die ("Requete impossible");
# Check that extension exist and return country name
# Otherwise return Unknown
if (mysql_numrows($req2) > 0)
return mysql_result($req2,0);
else return $msgUnknown;
mysql_close ($c2);
} # end of ExtractCountry
##################################################################################
### Fonction de correction2 du nom de l'agent (navigateur et OS)
### Output syntax is a string like WebBrowser;OS
### You can extract OS and WebBrowser using:
### list($wb,$os)=split(";",ExtractAgent($HTTP_USER_AGENT));
### echo $wb."<br>";
### echo $os."<br>";
##################################################################################
function ExtractAgent($agt) {
if (count($browser_id)==0) { //to avoid reading several times same files
// Read the browser_list_file and assign 2 arrays (label and id)
$i=0;
$browser_list_file = fopen ("browser_list.txt", "r");
while (!feof($browser_list_file)) {
$buffer = fgets($browser_list_file, 4096);
if ($buffer<>"") {
list ($browser_id[$i], $browser_label[$i]) = split ('[|]', $buffer);
$i+=1;
}
}
fclose ($browser_list_file);
}
if (count($os_id)==0) {
// Read the os_list_file and assign 2 arrays (label and id)
$i=0;
$os_list_file = fopen ("os_list.txt", "r");
while (!feof($os_list_file)) {
$buffer = fgets($os_list_file, 4096);
if ($buffer<>"") {
list ($os_id[$i], $os_label[$i]) = split ('[|]', $buffer);
$i+=1;
}
}
fclose ($os_list_file);
}
// Init default values
$new_agt_browser="???"; // Do not change these ??? . It is used ion other scripts
$new_agt_os="???"; // Do not change these ??? . It is used ion other scripts
// Check for browser
for ($cpt = 0; $cpt < count($browser_id) ; $cpt++) {
if (ereg($browser_id[$cpt],$agt)) $new_agt_browser=$browser_label[$cpt];
}
// Check for OS
for ($cpt = 0; $cpt < count($os_id) ; $cpt++) {
if (ereg($os_id[$cpt],$agt)) $new_agt_os=$os_label[$cpt];
}
return($new_agt_browser.";".$new_agt_os); # Systax is= WebBrowser;OS
} # End of function ExtraireAgent
##################################################################################
?>

73
Scripts/login.php Normal file
View File

@@ -0,0 +1,73 @@
<?php
/***************************************************************************
login.php - Login Script
-------------------
begin : Mars UTC 2001
copyright : (C) 2002 by NADAL Jean-Baptiste
email : jbnadal@ifrance.com
***************************************************************************
*
*
*
***************************************************************************
* *
* 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. *
* *
***************************************************************************
* $Id: login.php,v 1.7 2005/01/30 18:38:08 jb Exp $
***************************************************************************/
require "conf.php";
require "cadre.php";
require "ErreurConnect.php";
/* Get parameters. */
$pseudo = $_POST['pseudo'];
$password = $_POST['password'];
/* Connect the database. */
$db_link = jb_sql_connect (true);
/* Select the record which contain the login and the password. */
$requete = mysql_db_query ($sql_bdd,
"select * from $table_users ".
"where ".
"pseudo=\"$pseudo\" and password=\"$password\"",
$db_link);
/* Si aucun enregistrement ne correspond. */
if (mysql_num_rows ($requete) == 0) {
/* Redirection vers lapage d'erreur. */
header ("Location:$url_erreur");
}
else {
$row = mysql_fetch_row($requete);
$state = $row[5];
$email = $row[4];
$id_user = $row[0];
/* Démarre la session. Spécifie une id de session. */
session_start ();
/* On enregistre $login dans la session. */
session_register ("pseudo");
/* On enregistre the user ID dans la session. */
session_register ("id_user");
/* On enregistre le type de l'utilisateur.*/
session_register ("state");
/* Mise a jour de l'identifiant dans la table. */
/*
$requete=mysql_db_query ($sql_bdd,"update $table_users set id=\"".
session_id()."where pseudo=\"$pseudo\" and ".
"password=\"$password\"", $db_link);*/
header ("Location:$racine/index.php");
exit ();
}
?>

71
Scripts/login.php.orig Executable file
View File

@@ -0,0 +1,71 @@
<?php
/***************************************************************************
login.php - Login Script
-------------------
begin : Mars UTC 2001
copyright : (C) 2002 by NADAL Jean-Baptiste
email : jbnadal@ifrance.com
***************************************************************************
*
*
*
***************************************************************************
* *
* 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. *
* *
***************************************************************************
* $Id: login.php,v 1.6 2002/12/15 20:51:27 jb Exp $
***************************************************************************/
require "conf.php";
require "cadre.php";
require "ErreurConnect.php";
/* Connect the database. */
$db_link = jb_sql_connect (true);
/* Select the record which contain the login and the password. */
$requete = mysql_db_query ($sql_bdd,
"select * from $table_users ".
"where ".
"pseudo=\"$pseudo\" and password=\"$password\"",
$db_link);
/* Si aucun enregistrement ne correspond. */
if (mysql_num_rows ($requete) == 0) {
/* Redirection vers lapage d'erreur. */
header ("Location:$url_erreur");
}
else {
$row = mysql_fetch_row($requete);
$state = $row[5];
$email = $row[4];
$id_user = $row[0];
/* Démarre la session. Spécifie une id de session. */
session_start ();
/* On enregistre $login dans la session. */
session_register ("pseudo");
/* On enregistre the user ID dans la session. */
session_register ("id_user");
/* On enregistre le type de l'utilisateur.*/
session_register ("state");
/* Mise a jour de l'identifiant dans la table. */
/*
$requete=mysql_db_query ($sql_bdd,"update $table_users set id=\"".
session_id()."where pseudo=\"$pseudo\" and ".
"password=\"$password\"", $db_link);*/
header ("Location:$racine/index.php");
exit ();
}
?>

22
Scripts/logout.php Normal file
View File

@@ -0,0 +1,22 @@
<?
/*
*********************************************************************
* File : $RCSfile: logout.php,v $
* Version : $Revision: 1.4 $
* Modified by : $Author: jb $ ($Date: 2002/12/14 19:59:27 $)
*********************************************************************
*/
require "conf.php";
require "ErreurConnect.php";
session_start ();
global $pseudo;
session_destroy (); /*We close the curent session*/
header("Location:$racine/index.php");
exit();
?>

212
Scripts/menu.php Normal file
View File

@@ -0,0 +1,212 @@
<?php
/***************************************************************************
menu.php - Manage the differents menu entries.
-------------------
begin : Dec UTC 2002
copyright : (C) 2002-2005 by NADAL Jean-Baptiste
email : jbnadal@ifrance.com
***************************************************************************
*
*
*
***************************************************************************
* *
* 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. *
* *
***************************************************************************
* $Id: menu.php,v 1.5 2005/01/30 22:20:22 jb Exp $
***************************************************************************/
function printMenuEntry ($name, $href)
{
echo "
<tr> <td valign=\"middle\" align=\"center\"
width=\"20%\">
<img src=\"/ohmj/Imgs/icon_puce_over.gif\"
border=\"0\" alt=\"*\"/></td>
<td valign=\"middle\" nowrap=\"nowrap\"
align=\"left\" width=\"80%\" >
<a href=\"".$href."\" >
<font face=\"\" color=\"#ffffff\" size=\"-1\">
$name </font></a> </td> </tr>
";
}
function printGeneralMenu ()
{
global $menu;
global $MENU_GENERAL;
$i = 0;
while ($menu[$i] [0] != "NULL") {
if ($menu[$i] [2] == $MENU_GENERAL)
printMenuEntry ($menu[$i][0], $menu[$i][1]);
$i++;
}
}
function printAuthentification ()
{
$pseudo = $_SESSION['pseudo'];
if ($pseudo == "")
printConnectBox();
else {
printDeconnectBox();
/* Print the member section.*/
printMemberSection ();
}
}
function printConnectBox()
{
echo "
<table cellspacing=\"0\" cellpadding=\"1\"
width=\"95%\" border=\"0\">
<tbody>
<tr>
<td valign=\"middle\" align=\"left\" >
<font face=\"helvetica,verdana\" size=\"-1\">
<b>Authentification</b></font>
<hr />
</td></tr>
<tr>
<td align=\"center\" bgcolor=\"#f6ae20\" >
<form action=\"/ohmj/Scripts/login.php?op=verifid\"
method=\"post\">
<font size=\"1\">Pseudonyme</font> <br />
<input name=\"pseudo\" type=\"text\"
size=\"12\" maxlength=\"11\" /><br />
<font size=\"1\">Mot de passe</font><br />
<input name =\"password\" type=\"password\"
size=\"12\" maxlength=\"11\" />
<br /><br />
<input name=\"OK\" type=\"submit\"
value=\"LOGIN\" />
</form>
</td></tr></tbody>
</table>";
}
function printDeconnectBox ()
{
$pseudo = $_SESSION['pseudo'];
echo "
<table cellspacing=\"0\" cellpadding=\"1\"
width=\"95%\" border=\"0\">
<tbody>
<tr>
<td valign=\"middle\" align=\"left\" colspan=\"2\">
<font face=\"helvetica,verdana\" size=\"-1\">
<b>Authentification</b></font>
<hr />
</td></tr>
<tr>
<td valign=\"middle\" align=\"center\"
width=\"20%\">
<img src=\"/ohmj/Imgs/icon_puce_over.gif\"
border=\"0\" alt=\"*\"/></td>
<td align=\"center\" bgcolor=\"#f6ae20\" >
<a href=/ohmj/Scripts/logout.php >
<font face=\"\" color=\"#ffffff\" size=\"-1\">
Quitter la session de $pseudo </font></a> </td> </tr>
</font></a>
</td></tr></tbody>
</table>";
}
function printAdministrationMenu ()
{
global $MENU_ADMIN, $USER_ADMIN;
global $menu;
$pseudo = $_SESSION['pseudo'];
$state = $_SESSION['state'];
if (($pseudo != "") && ($state & $USER_ADMIN)) {
echo "
<table cellspacing=\"0\" cellpadding=\"1\" width=\"95%\"
border=\"0\">
<tbody>
<tr>
<td valign=\"middle\" align=\"right\"
bgcolor=\"#f2ae26\" colspan=\"2\">
<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"
border=\"0\">
<tbody>
<tr>
<td valign=\"middle\" align=\"left\">
<font face=\"helvetica,verdana\"
color=\"#000000\" size=\"-1\">
<b>Administration</b></font>
</td>
</tr></tbody></table>
<hr />
</td></tr>
";
$i = 0;
while ($menu[$i] [0] != "NULL") {
if ($menu[$i] [2] == $MENU_ADMIN)
printMenuEntry ($menu[$i][0], $menu[$i][1]);
$i++;
}
echo "
</tbody></table>";
}
}
function printMemberSection ()
{
global $MENU_MEMBRE, $MODERATOR, $MENU_MOD;
global $menu, $pseudo, $state;
if ($pseudo != "") {
echo "
<table cellspacing=\"0\" cellpadding=\"1\" width=\"95%\"
border=\"0\">
<tbody>
<tr>
<td valign=\"middle\" align=\"right\"
bgcolor=\"#f2ae26\" colspan=\"2\">
<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"
border=\"0\">
<tbody>
<tr>
<td valign=\"middle\" align=\"left\">
<font face=\"helvetica,verdana\"
color=\"#000000\" size=\"-1\">
<b>Section membre</b></font>
</td>
</tr></tbody></table>
<hr />
</td></tr>
";
$i = 0;
while ($menu[$i] [0] != "NULL") {
if ($menu[$i] [2] == $MENU_MEMBRE)
printMenuEntry ($menu[$i][0], $menu[$i][1]);
if (($menu[$i] [2] == $MENU_MOD) && ($state & $MODERATOR))
printMenuEntry ($menu[$i][0], $menu[$i][1]);
$i++;
}
echo "
</tbody></table>";
}
}
?>

164
Scripts/menuEntries.php Executable file
View File

@@ -0,0 +1,164 @@
<?php
/***************************************************************************
menuentries.php - list of the available menus.
-------------------
begin : Dec UTC 2002
copyright : (C) 2002 by NADAL Jean-Baptiste
email : jbnadal@ifrance.com
***************************************************************************
*
*
*
***************************************************************************
* *
* 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. *
* *
***************************************************************************
* $Id: menuEntries.php,v 1.6 2005/03/10 18:08:46 jb Exp $
***************************************************************************/
/* General menu entries. */
$menu[0][0] = "Editorial";
$menu[0][1] = "$racine/$page_index?page=editorial" ;
$menu[0][2] = $MENU_GENERAL;
$menu[1][0] = "Historique";
$menu[1][1] = "$racine/$page_index?page=histoire";
$menu[1][2] = $MENU_GENERAL;
$menu[2][0] = "Infos Concerts";
$menu[2][1] = "$racine/$page_index?page=info_concerts";
$menu[2][2] = $MENU_GENERAL;
$menu[3][0] = "R&eacute;pertoire";
$menu[3][1] = "$racine/$page_index?page=repertoire";
$menu[3][2] = $MENU_GENERAL;
$menu[4][0] = "Musique en Ligne";
$menu[4][1] = "$racine/$page_index?page=Mus_Ligne";
$menu[4][2] = $MENU_GENERAL;
$menu[5][0] = "Video en Ligne";
$menu[5][1] = "$racine/$page_index?page=Video";
$menu[5][2] = $MENU_GENERAL;
$menu[6][0] = "Presse";
$menu[6][1] = "$racine/$page_index?page=presse";
$menu[6][2] = $MENU_GENERAL;
$menu[7][0] = "Album Photos";
$menu[7][1] = "$racine/$page_index?page=albums_photos";
$menu[7][2] = $MENU_GENERAL;
$menu[8][0] = "Fonctionnement";
$menu[8][1] = "$racine/$page_index?page=fonctionnement";
$menu[8][2] = $MENU_GENERAL;
$menu[9][0] = "Recrutement";
$menu[9][1] = "$racine/$page_index?page=recrutement";
$menu[9][2] = $MENU_GENERAL;
$menu[10][0] = "Contacts";
$menu[10][1] = "$racine/$page_index?page=contacts";
$menu[10][2] = $MENU_GENERAL;
$menu[11][0] = "Lieu de r&eacute;p&eacute;tition";
$menu[11][1] = "$racine/$page_index?page=repetition";
$menu[11][2] = $MENU_GENERAL;
$menu[12][0] = "Livre d'OR";
$menu[12][1] = "$racine/$page_index?page=livre_or";
$menu[12][2] = $MENU_GENERAL;
$menu[13][0] = "Liens";
$menu[13][1] = "$racine/$page_index?page=liens";
$menu[13][2] = $MENU_GENERAL;
/* Menbres menu entries. */
$menu[14][0] = "Section Musiciens";
$menu[14][1] = "$racine/$page_index?page=membres";
$menu[14][2] = $MENU_MEMBRE;
$menu[15][0] = "Ajouter un cookie";
$menu[15][1] = "Cookie.php?page=Pose";
$menu[15][2] = $MENU_MEMBRE;
$menu[16][0] = "Supp. un cookie";
$menu[16][1] = "Cookie.php?page=Supp";
$menu[16][2] = $MENU_MEMBRE;
$menu[29][0] = "Adm. Utilisateurs";
$menu[29][1] = "$racine/$page_index?page=AdmUsers";
$menu[29][2] = $MENU_MOD;
/* Admin menu entries. */
$menu[17][0] = "&eacute;ditorial";
$menu[17][1] = "$racine/$page_index?page=M_edito";
$menu[17][2] = $MENU_ADMIN;
$menu[18][0] = "Historique";
$menu[18][1] = "$racine/$page_index?page=M_Hist";
$menu[18][2] = $MENU_ADMIN;
$menu[19][0] = "Agenda";
$menu[19][1] = "$racine/$page_index?page=M_InfoC";
$menu[19][2] = $MENU_ADMIN;
$menu[20][0] = "Ajouter une News";
$menu[20][1] = "$racine/$page_index?page=AdmNews";
$menu[20][2] = $MENU_ADMIN;
$menu[21][0] = "R&eacute;pertoire";
$menu[21][1] = "$racine/$page_index?page=M_Rep";
$menu[21][2] = $MENU_ADMIN;
$menu[22][0] = "Fonctionnement";
$menu[22][1] = "$racine/$page_index?page=M_Fonctionnement";
$menu[22][2] = $MENU_ADMIN;
$menu[23][0] = "Contacts";
$menu[23][1] = "$racine/$page_index?page=M_Contacts";
$menu[23][2] = $MENU_ADMIN;
$menu[24][0] = "Recrutement";
$menu[24][1] = "$racine/$page_index?page=M_Recrutement";
$menu[24][2] = $MENU_ADMIN;
$menu[25][0] = "Livre d'or";
$menu[25][1] = "$racine/$page_index?page=AdmLivOR";
$menu[25][2] = $MENU_ADMIN;
$menu[26][0] = "Statistiques";
$menu[26][1] = "$racine/$page_index?page=StatSite";
$menu[26][2] = $MENU_ADMIN;
$menu[27][0] = "Download";
$menu[27][1] = "$racine/$page_index?page=AdmDownload";
$menu[27][2] = $MENU_ADMIN;
$menu[28][0] = "Liens";
$menu[28][1] = "$racine/$page_index?page=AdmLinks";
$menu[28][2] = $MENU_ADMIN;
$menu[29][0] = "Albums Photos";
$menu[29][1] = "$racine/$page_index?page=AdmAlbums";
$menu[29][2] = $MENU_ADMIN;
$menu[30][0] = "Section Musiciens";
$menu[30][1] = "$racine/$page_index?page=AdmMembres";
$menu[30][2] = $MENU_ADMIN;
/* End of menu entries. */
$menu[31][0] = "NULL";
$menu[31][1] = "NULL";
$menu[31][2] = "NULL";
$racine.$page_index
?>

74
Scripts/msg_french.inc.php3 Executable file
View File

@@ -0,0 +1,74 @@
<?
$msgRefererSort = "Classement par referer";
$msgRequestPage = "Pages demandées";
$msgShowMeTag = "Rappel des Tag";
$msgNotRecognizedWb = "navigateurs non reconnus";
$msgNotRecognizedOs = "OS non reconnus";
$msgCanotWriteArchive = "Ecriture dans la table d'archive impossible";
$msgArchiveCreated = "Archive créée";
$msgAdminPanel = "Console d'administration";
$msgStats = "Statistiques";
$msgStatsBy = "Statistiques par";
$msgHours = "heures";
$msgDay = "jour";
$msgWeek = "semaine";
$msgMonth = "mois";
$msgYear = "année";
$msgFrom = "du ";
$msgTo = "au ";
$msgPreviousDay = "jour précédent";
$msgNextDay = "jour suivant";
$msgPreviousWeek = "semaine précédent";
$msgNextWeek = "semaine suivant";
$msgCalendar = "calendrier";
$msgShowRowLogs = "voir les logs bruts";
$msgRowLogs = "logs bruts";
$msgRecords = "enregistrements";
$msgDaySort = "Classement journalier";
$msgMonthSort = "Classement mensuel";
$msgCountrySort = "Classement par pays";
$msgOsSort = "Classement par OS";
$msgBrowserSort = "Classement par navigateur";
$msgProviderSort = "Classement par provider";
$msgTotal = "Total";
$msgBaseConnectImpossible = "Impossible de se selectionner la base SQL";
$msgSqlConnectImpossible = "Impossible de se connecter au server SQL";
$msgSqlQuerryError = "Requète SQL impossible";
$msgBaseCreateError = "Erreur lors de la création de la base";
$msgMonthsArray = array("janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre");
$msgDaysArray=array("Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi");
$msgDaysShortArray=array("D","L","M","M","J","V","S");
$msgToday = "Aujourd'hui";
$msgOther = "Autre";
$msgUnknown = "Inconnu";
$msgServerInfo = "php Server info";
$msgStatBy = "Statistics by";
$msgVersion = "Webstats 2.1";
$msgCreateCook = "<b>Adiministrateur:</b> Un cookie a été stocké sur votre ordinateur,<BR>
Vous ne serez plus comptabilisé dans les logs.<BR><BR><BR><BR>";
$msgCreateCookError = "<b>Administrateur:</b> le cookie n'a pas pus être stocké sur votre ordinateur.<br>
Vérifier que votre navigateur les accepte, et rafraichissez la page.<br><br><br><br>";
$msgInstalComments = "<p>La procedure d'installation automatique va tenter de:</p>
<ul>
<li>créer une table nommée <b>liste_domaines</b> dans votre base SQL<br>
</b>Cette table sera automatiquement rempli avec le nom des pays et le code InterNIC associé
</li>
<li>créer une table nommée <b>logezboo</b><br>
Cette table contiendra vos logs</li>
</ul>
<font color=\"#FF3333\">Vous devez préalablement avoir modifié manuellement:<ul><li>le fichier <b>config_sql.php3</b> avec votre <b>login</b>, <b>mot de passe</b> et <b>nom de base</b> pour la connection au serveur SQL.</li><br><li>Le fichier <b>config.inc.php3</b> doit être modifié pour selectionner la langue appropriée.</font></li></ul><br>Pour ce faire, vous pouvez utiliser un éditeur texte comme Notepad.";
$msgInstallAbort = "INSTALLATION INTERROMPUE";
$msgInstall1 = "S'il n' apparait pas d'erreur au dessus, l'installation s'est correctement déroulée.";
$msgInstall2 = "3 tables ont été créées dans votre base SQL";
$msgInstall3 = "Vous pouvez maintenant ouvrir l'interface principale";
$msgInstall4 = "Afin de remplir la table de logs, vous devez mettre un tab dans vos pages à surveiller.";
$msgUpgradeComments ="La nouvelle version de ezBOO WebStats utilise la m&ecirc;me table <b>logezboo</b>
que les versions pr&eacute;c&eacute;dentes.<br>
Si les pays n'apparaissent pas en fran&ccedil;ais, vous devez supprimer la table
<b>liste_domaines</b> et relancer l'installation.<br>
Cela n'aura aucun effet sur la table <b>logezboo</b> .<br>
Le message d'erreur est normal :-)";
?>

207
Scripts/news.php Executable file
View File

@@ -0,0 +1,207 @@
<?php
/***************************************************************************
news.php - management news library
-------------------
begin : Septembre UTC 2001
copyright : (C) 2002 by NADAL Jean-Baptiste
email : jbnadal@ifrance.com
***************************************************************************
*
* Management of the news box in the first page.
*
***************************************************************************
* *
* 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. *
* *
***************************************************************************
* $Id: news.php,v 1.4 2002/12/15 20:23:15 jb Exp $
***************************************************************************/
if (file_exists ("conf.php"))
require ("conf.php");
else
require ("./Scripts/conf.php");
class News
{
// ===============================
// Constructeur de la classe de statistique
function News ()
{
}
function afficheAjout ()
{
global $racine, $page_index;
echo "<center> Selectionner la nouvelle :<br>
<form action=$racine/$page_index?page=AdmNews
method=post>
<script language=\"javascript\">
var datelo =DonneDate();
document.write(\"<input type=hidden name=".
"datecourante value=\"+datelo+\" />\");
</script>
<select name=numNews>
<option value = 1 selected> MaJ de l'éditorial
<option value = 2 > MaJ de l'Historique
<option value = 3 > MaJ de l'Agenda
<option value = 4 > MaJ du Répertoire
<option value = 5 > MaJ du Fonctionnement
<option value = 6 > MaJ des Contacts
<option value = 7 > MaJ du Recrutement
<option value = 8 > MaJ du livre d'Or
<option value = 9 > MaJ de l'Album Photo
<option value = 10 > MaJ des morceaux en ligne
<option value = 11 > MaJ de la Section Membre
</select><br><br>
ou entrez directement le texte : <br>
<input type=text name=newsTxt size=32 value=\"\" /><br /> <br/>
<input type=submit name=envoi value=\"Ajouter une news\" />
</form></center><br><br>\n";
}
function GetTxtNews ($elem)
{
switch ($elem) {
case 1:
$szNiews = "Mise à jour de l'éditorial";
break;
case 2:
$szNiews = "Mise à jour de l'Historique";
break;
case 3:
$szNiews = "Mise à jour de l'Agenda";
break;
case 4:
$szNiews = "Mise à jour du Répertoire";
break;
case 5:
$szNiews = "Mise à jour du Fonctionnement";
break;
case 6:
$szNiews = "Mise à jour des Contacts";
break;
case 7:
$szNiews = "Mise à jour du Recrutement";
break;
case 8:
$szNiews = "Mise à jour du livre d'Or";
break;
case 9:
$szNiews = "Mise à jour de l'Album Photo";
break;
case 10:
$szNiews = "Mise à jour des morceaux en ligne";
break;
case 11:
$szNiews = "Mise à jour de Section Membre";
break;
default:
$szNiews = "BUG";
}
return $szNiews;
}
function Ajoute ($numNews, $datelo, $newsTxt)
{
global $sql_bdd, $table_news;
if ($datelo == "")
$datelo = date ("d /m /Y H:i");
/*echo "numNews : $numNews,datelo : $datelo ,newsTxt : $newsTxt <br>";*/
if ($numNews == "") {
echo "<br><br><center><font size=6 color=red><b>BUG !!! ".
"Ajout impossible la news est vide</b></font></center><br><br>\n";
return -1;
}
else {
// On se connecte sur la base
$connect_db = jb_sql_connect (false);
$resultat = mysql_db_query ($sql_bdd, "select * from $table_news",
$connect_db);
$i = 0;
$nDejaVu = 0;
$nNumDejaVu = 0;
while ($row = mysql_fetch_row ($resultat)) {
$T_resul [$i]["nouvelle"] = $row[1];
$T_resul [$i]["date"] = $row[2];
$T_resul [$i]["type"] = $row[3];
/* On vérifie si un enregistrement à le meme type que la nouvelle
news.*/
if (($row[3] == $numNews) && ($row[3] != 0) &&
($nDejaVu != 1) && ($newsTxt == "")){
$nDejaVu = 1;
$nNumDejaVu = $i;
}
$i++;
}
// On en a plus besoin, donc on libère la mémoire
mysql_free_result ($resultat);
if ($nDejaVu == 1) {
if ($nNumDejaVu == 2) {
$T_resul [2]["nouvelle"] = $T_resul [1]["nouvelle"];
$T_resul [2]["date"] = $T_resul [1]["date"];
$T_resul [2]["type"] = $T_resul [1]["type"];
$T_resul [1]["nouvelle"] = $T_resul [0]["nouvelle"];
$T_resul [1]["date"] = $T_resul [0]["date"];
$T_resul [1]["type"] = $T_resul [0]["type"];
}
else if ($nNumDejaVu == 1) {
$T_resul [1]["nouvelle"] = $T_resul [0]["nouvelle"];
$T_resul [1]["date"] = $T_resul [0]["date"];
$T_resul [1]["type"] = $T_resul [0]["type"];
}
}
else {
$T_resul [2]["nouvelle"] = $T_resul [1]["nouvelle"];
$T_resul [2]["date"] = $T_resul [1]["date"];
$T_resul [2]["type"] = $T_resul [1]["type"];
$T_resul [1]["nouvelle"] = $T_resul [0]["nouvelle"];
$T_resul [1]["date"] = $T_resul [0]["date"];
$T_resul [1]["type"] = $T_resul [0]["type"];
}
$T_resul [0]["date"] = $datelo;
if ($newsTxt == "") {
$T_resul [0]["nouvelle"] = $this->GetTxtNews ($numNews);
$T_resul [0]["type"] = $numNews;
}
else {
$T_resul [0]["nouvelle"] = $newsTxt;
$T_resul [0]["type"] = 0;
}
}
/* Une fois la rotation du tableau effectué, il ne reste plus qu'a
mettre a jour la base. */
for ($i = 0; $i < 3; $i++) {
/*$i=2;*/
$query = "update $table_news set nouvelle=\"".
$T_resul [$i]["nouvelle"]."\", date=\"".$T_resul [$i]["date"].
"\", type=\"".$T_resul [$i]["type"]."\" where id=".($i+1);
/*echo "$query <br>";*/
$resultat = mysql_db_query ($sql_bdd, $query, $connect_db);
/*echo "nouvelle=".$T_resul [$i]["nouvelle"]."' ,date='".
$T_resul [$i]["date"]."',type='".$T_resul [$i]["type"]."<br>";*/
}
MYSQL_CLOSE;
}
} // fin de la classe News
?>

24
Scripts/os_list.txt Executable file
View File

@@ -0,0 +1,24 @@
Windows 95|Win 95
Windows_95|Win 95
Windows 98|Win 98
Windows NT|Win NT
Windows NT 5.0|Win NT5
Windows 2000|Win 2000
Win95|Win 95
Win98|Win 98
WinNT|Win NT
linux-2.2|Linux
Linux 2.0|Linux
Linux 2.1|Linux
Linux 2.2|Linux
Linux 2.3|Linux
Linux 2.4|Linux
Linux 2.5|Linux
Linux 2.6|Linux
Macintosh|Mac
Mac_PPC|Mac
Mac_PowerPC|Mac
SunOS 5|SunOS 5
SunOS 6|SunOS 6
FreeBSD|FreeBSD
beOS|beOS

167
Scripts/read.php3 Executable file
View File

@@ -0,0 +1,167 @@
<?
/*
*********************************************************************
* File : $RCSfile: read.php3,v $
* Version : $Revision: 1.1.1.1 $
* Modified by : $Author: jb $ ($Date: 2002/03/10 17:13:32 $)
*********************************************************************
Page Principale pour l'administration des statistiques
V.1.00 : 23-12-2001 : Mise en forme générale
*/
require "conf.php";
require "Archi.php";
include "cadre.php";
require "ErreurConnect.php";
require "msg_french.inc.php3";
// On vérifie avant d'afficher quoi que ce soit que la requete est valide
// Connexion au serveur de BDD
$connexion = jb_sql_connect(true);
// On verifie que la page appellée contient bien le meme identifiant que la page enregistrée sur la base
$requete=mysql_db_query($sql_bdd,"select pseudo from membre where id=\"$id\"",$connexion);
// Si l'Id est différent -> Alors on affiche la page d'erreur
$resultat = mysql_num_rows($requete);
// On a terminé avec la connexion avec la base -> On ferme la connexion
mysql_close($connexion);
if($resultat ==0)
{
// Redirection vers la page d'erreur
header("Location:$url_erreur");
} // fin if(mysql_num_rows($requete)==0)
else
{
// Sinon On Affiche l'ossature du site
$pOssature = new Archi ("HautAdmin.html","","");
$pOssature->AffichePartieHaut(0,0);
}?>
<link rel="stylesheet" href="style1.css">
<body bgcolor="#FFFFFF">
<table width="545" border="1" cellspacing="0" cellpadding="2" bordercolor="#636563" class="normal">
<tr bordercolor="#666666">
<td colspan="2" bgcolor="#666666" class="titre" height="60">
<div align="center" class="titre"><font color="#FFFFFF">&gt;&gt; <? echo $msgAdminPanel ?>
&lt;&lt; </font></div>
</td>
</tr>
<tr bordercolor="#FFFFFF">
<td colspan="3" bordercolor="#666666" height="200">
<p align="right"><?
function AL_Date( ) {
require "msg_french.inc.php3";
echo $msgDaysArray[date("w")] ." ";
echo date("j")." ";
echo $msgMonthsArray[date("n")-1]." ".date("Y");
}
AL_Date( );
?> </p>
<p align="left"> <span class="normal"><?
$today = date("Y-m-d" , $reqdate);
switch ($period) {
case "jour":
echo date("d " , $reqdate).$msgMonthsArray[date("n", $reqdate)-1].date(" Y" , $reqdate);
break;
case "semaine":
$weeklowreqdate = ($reqdate-(86400*date("w" , $reqdate)));
$weekhighreqdate = ($reqdate+(86400*(6-date("w" , $reqdate)) ));
echo "<b>".$msgFrom."</b>".date("d " , $weeklowreqdate).$msgMonthsArray[date("n", $weeklowreqdate)-1].date(" Y" , $weeklowreqdate);
echo " <b>".$msgTo."</b>".date("d " , $weekhighreqdate ).$msgMonthsArray[date("n", $weekhighreqdate)-1].date(" Y" , $weekhighreqdate);
break;
case "mois":
echo $msgMonthsArray[date("n", $reqdate)-1].date(" Y", $reqdate);
break;
}
?></span><br>
<?
# Read logs
require "conf.php";
$c = jb_sql_connect(true);
$db = mysql_select_db($sql_bdd) or die($msgBaseConnectImpossible);
$today = date("Y-m-d" , $reqdate);
switch ($period) {
case "jour":
if ($stp!="") {
$q_string = "SELECT * FROM $table WHERE DAYOFYEAR(date)=DAYOFYEAR(FROM_UNIXTIME($reqdate)) and $stp='$stp2' order by date DESC";
} else
$q_string = "SELECT * FROM $table WHERE DAYOFYEAR(date)=DAYOFYEAR(FROM_UNIXTIME($reqdate)) order by date DESC";
$req = mysql_query ($q_string) or die ($msgSqlQuerryError);
break;
case "semaine":
if ($stp!="") {
$q_string = "SELECT * FROM $table WHERE WEEK(date)=WEEK(FROM_UNIXTIME('$reqdate')) AND $stp='$stp2' order by date DESC";
} else
$q_string = "SELECT * FROM $table WHERE WEEK(date)=WEEK(FROM_UNIXTIME('$reqdate')) order by date DESC";
$req = mysql_query ($q_string) or die ($msgSqlQuerryError);
break;
case "mois":
if ($stp!="") {
$q_string = "SELECT * FROM $table WHERE MONTH(date)=MONTH(FROM_UNIXTIME('$reqdate')) AND $stp='$stp2' order by date DESC";
} else
$q_string = "SELECT * FROM $table WHERE MONTH(date)=MONTH(FROM_UNIXTIME('$reqdate')) order by date DESC";
$req = mysql_query ($q_string) or die ($msgSqlQuerryError);
break;
}
$nb_champs=mysql_num_fields($req);
$nb_line=mysql_num_rows($req);
printf ("$nb_line $msgRecords");
if ($stp=="os" and $stp2=='???') echo " :$msgNotRecognizedOs";
if ($stp=="wb" and $stp2=='???') echo " :$msgNotRecognizedWb";
printf ("<br>");
$i=0;
echo "<table align=\"center\" width=\"650\" border=\"0\" cellspacing=\"1\" cellpadding=\"2\">";
echo "<tr>";
while($i<$nb_champs)
{
$nom_champs=mysql_field_name($req,$i);
echo "<td bgcolor=\"#CCCCCC\"><div align=\"center\"><b>$nom_champs</b></div></td>";
$i++;
}
echo "</tr>";
$i=0;
$j=0;
$sta = true;
while($j<$nb_line)
{
echo "<tr>";
while($i<$nb_champs)
{
if ($sta) { $color = "#CCCCFF" ; } else { $color = "#FFFFCC" ;}
$nom_champs=mysql_field_name($req,$i);
$$nom_champs=mysql_result($req,$j,$nom_champs);
if ( $nom_champs =="referer" ){
echo "<td bgcolor=\"$color\"><div align=\"left\">"."<a href=\"".$$nom_champs."\" target=\"_blank\">".$$nom_champs."</a>"."</div></td>";
} else {
echo "<td bgcolor=\"$color\"><div align=\"left\">".$$nom_champs."</div></td>";
}
$i++;
}
echo "</tr>";
$i=0;
$j++;
$sta = !$sta;
}
echo "</table>";
mysql_close ($c);
?></p>
<p align="center" class="verysmall">
<? echo $msgStatBy ?> <a href="http://www.ezboo.com" target="_blank">ezBOO</a>
<? echo $msgVersion ?> </p>
</td>
</tr>
</table>
</body>
</html>

24
Scripts/redirect.php Normal file
View File

@@ -0,0 +1,24 @@
<?php
/*
*********************************************************************
* File : $RCSfile: redirect.php,v $
* Version : $Revision: 1.1.1.1 $
* Modified by : $Author: jb $ ($Date: 2002/03/10 17:13:32 $)
*********************************************************************
*/
require "conf.php";
require "ErreurConnect.php";
jb_sql_connect(true);
//mysql_connect($sql_serveur, $sql_user, $sql_passwd) or die("Impossible de se connecter");
mysql_select_db($sql_bdd);
if ( $adminCOO != "oui" )
mysql_query("UPDATE liens SET nbhits=nbhits+1 where id='$id'");
$query=mysql_query("SELECT url FROM liens WHERE id='$id'");
$szurl=mysql_fetch_row($query);
//echo " <html> URL : $szurl[0]<br> id = $id<br>";
header("location:$szurl[0]");
?>

194
Scripts/showhtml.php Normal file
View File

@@ -0,0 +1,194 @@
<?php
/*
*
*
* Avertissement : Cette librairie de fonctions PHP est distribuee avec
* l'espoir qu'elle sera utile, mais elle l'est SANS AUCUNE GARANTIE;
* sans meme la garantie de COMMERCIALISATION ou d'UTILITE POUR UN BUT
* QUELCONQUE.
* Elle est librement redistribuable tant que la presente licence, ainsi
* que les credits des auteurs respectifs de chaque fonctions sont laisses
* ensembles.
* En aucun cas, Nexen.net ne pourra etre tenu responsable de quelques
* consequences que ce soit de l'utilisation ou la mesutilisation de ces
* fonctions PHP.
*/
/****
* Titre : Désembrouille HTML
* Auteur : Damien seguy
* Email : damidamien.seguy@nexen.net
* Url : www.nexen.net/
* Description : Quand on programme un script en PHP, on se soucie peu de la
* lisibilité du code HTML.
* Or, c'est bien pratique de pouvoir le parcourir rapidement.
* Ce script affiche le code HTML indenté, et liste les balises qui n'ont pas
* été fermées.
****/
$pFichier = fopen("test.html", "r");
if ($pFichier == false) {
echo "le fichier n'existe pas et voila";
return 1;
}
while ( feof($pFichier) != 1 ) {
$szLigne = fgets($pFichier,120);
$text .= "$szLigne\n";
}
$botext = show_html($text);
echo $botext;
function show_html($chaine){
// le deuxieme argument sert a indiquer l'indentation
// la valeur par defaut est recommandee
if (func_num_args() == 2) { $ident = func_get_arg(1);}
else { $indent = " ";}
// ce tableau sert au comptage des balises ouvrante/fermante
$suivi = array();
// ce tableau contient les balises ouvrante/fermante
$tags = array( 'html','head','script', 'noscript','div',
'center','table','td','tr','select','map',
'iframe','body', 'title', 'font', 'form', 'left',
'abbrev','acronym','textarea','author',
'blockquote','code','dl','dd','dt','option',
'em','h1','h2','h3','h4','h5','h6','li','noframes',
'note','ul','ol','pre','tt','layer' );
/* ce tableau contient les balises qui seront laissées dans le corps
* du texte */
$tagsi = array('a','b','address','i','u','blink','applet',
'embed','sub','sup');
// toutes les autres balises sont ramenees en debut de ligne.
// traitement des javascript.
// on les ignore, pour ne pas les chambouler
preg_match_all("/(<script.*?>.*?<\/script>)/is", $chaine, $js);
$chaine = preg_replace("/(<script.*?>.*?<\/script>)/is",
"<ici_un_script js>", $chaine, $js);
preg_match_all("/(<noscript.*?>.*?<\/noscript>)/is", $chaine, $njs);
$chaine = preg_replace("/(<noscript.*?>.*?<\/noscript>)/is",
"<ici_un_script njs>", $chaine, $njs);
$njs = $njs[0];
$js = $js[0];
// preparation des lignes
$chaine = preg_replace("/\n/", "", $chaine);
$chaine = preg_replace("/\n\s*/", "\n", $chaine);
$chaine = preg_replace("/(<.*?>)/", "\n\\1\n", $chaine);
$chaine = preg_replace("/\n\n/", "\n", $chaine);
$chaine = preg_replace("/\n\s*/", "\n", $chaine);
$lignes = explode("\n", $chaine);
$retour = "";
$i = 0;
foreach ($lignes as $l){
$r = "";
// si c'est une balise
if (ereg("^<.*>$", $l)){
// obtention du tag
if (ereg(' ', $l)){
$tag = substr($l, 1, strpos($l, ' ')-1);
$reste = htmlspecialchars(strstr(substr($l, 0, -1), ' '));
} else {
$tag = substr($l, 1,-1);
$reste = "";
}
$tag = strtolower($tag);
// etude des ouvrant/fermants
if (ereg('^/', $tag)){
// cas d'une balise fermante
if (in_array( substr($tag, 1), $tagsi)){
// cas d'une balise fermante a ignorer
if ((substr($retour, -1) == "\n") && ($i > 0)){
$r .= str_repeat("$indent", $i);}
$r .= "&lt;<b><font color=blue>$tag</font></b>$reste&gt;";
} else if (in_array(substr($tag, 1), $tags)){
// cas d'une balise fermante reconnue
$i--;
@$suivi[substr($tag, 1)]--;
$r .= "\n";
if ($i>0) { $r .= str_repeat("$indent", $i);}
$r .= "&lt;<b><font color=blue>$tag</font></b>$reste&gt;\n";
} else {
// une balise inconnue
if ((substr($retour, -1) == "\n") && ($i > 0)){
$r .= str_repeat("$indent", $i);}
$r .= "&lt;<b><font color=blue>$tag</font></b>$reste&gt;";
}
} else {
// cas des balises ouvrantes
if (in_array($tag, $tags)){
// cas d'une balise ouvrante reconnue
$r .= "\n";
if ($i>0) { $r .= str_repeat("$indent", $i);}
$r .= "&lt;<b><font color=blue>$tag</font></b>$reste&gt;\n";
$i++;
@$suivi[$tag]++;
} else if (in_array($tag, $tagsi)){
if ((substr($retour, -1) == "\n") && ($i > 0)){
$r .= str_repeat("$indent", $i);}
$r .= "&lt;<b><font color=blue>$tag</font></b>$reste&gt;";
} else if ($tag == "ici_un_script") {
// cas d'une balise ouvrante a ignorer
$reste = substr($reste, 1);
$script = htmlspecialchars(array_shift($$reste));
$r .= str_repeat("$indent", $i).preg_replace("/\n\s*/", "\n".str_repeat("$indent", $i+1), $script)."\n";
$r = preg_replace("/\n$indent(.*?)\n$/", "\n\\1\n", $r);
} else {
// cas d'une balise inconnue
$r .= "\n";
if ($i>0) { $r .= str_repeat("$indent", $i);}
$r .= "&lt;<b><font color=blue>$tag</font></b>$reste&gt;\n";
}
}
} else {
// si c'est du texte brut
if ((substr($retour, -1) == "\n") && ($i > 0)){
$r .= str_repeat("$indent", $i);}
$r .= htmlspecialchars($l);
}
$retour .= $r;
}
// toilettage final
$retour = preg_replace("/\n(&nbsp;)+\n/", "\n", $retour);
$retour = preg_replace("/\n+/", "\n", $retour);
$retour = preg_replace("/\n+/", "\n", $retour);
$retour = preg_replace("/&lt;<b><font color=blue>!--<\/font><\/b>(.*?)--&gt;/i", "<font color=\"green\"><b>&lt;--\\1--&gt;</b></font>", $retour);
$retour = preg_replace("/&gt;(&nbsp;)+/", "&gt;", $retour);
// cas des commentaires
$retour = preg_replace("/&quot;(.*?)&quot;/is", "&quot;<font color=red>\\1</font>&quot;" , $retour);
// la page elle meme
$out = "<html><body><pre>";
$out .= $retour;
$out .= "</pre><hr>";
// bilan des balises qui ne sont pas suffisamment utilisees
while(list($cle, $val) = each($suivi)){
if ($val > 0) {
$out .= "&lt;<b>$cle</b>&gt; manque $val fois<br>\n";
} else if ($val < 0) {
$out .= "&lt;<b>$cle</b>&gt; est ".abs($val)." fois en trop<br>\n";
}
}
// on retourne le tout pour affichage
return $out."</body></html>\n";
}
?>

9
Scripts/style1.css Executable file
View File

@@ -0,0 +1,9 @@
.titre { font-family: Arial, Helvetica, sans-serif; font-size: 22pt}
.titre2 { font-family: Arial, Helvetica, sans-serif; font-size: 18pt }
a:hover { color: #FF3333; font-family: Arial, Helvetica, sans-serif; text-decoration: none}
normal { font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: #000000}
.normal { font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #000000}
a { color: #333333; text-decoration: none; font-family: Arial, Helvetica, sans-serif}
input { font-family: Arial, Helvetica, sans-serif; font-size: 9pt; background-color: #CCCCCC}
body { font-family: Arial, Helvetica, sans-serif; font-size: 10pt}
.verysmall { font-family: Arial, Helvetica, sans-serif; font-size: 7pt}

436
Scripts/test.html Executable file
View File

@@ -0,0 +1,436 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Language" content="fr-FR">
<meta name="robots" content="index, nofollow">
<meta name="rating" content="General">
<meta name="distribution" content="Global">
<meta name="revisit-after" content="1 month">
<meta name="Date-Revision-yyyymmdd" CONTENT="20020723">
<meta name="owner" content="ohmj@fr.st">
<meta name="copyright" content="2002">
<meta name="description" content="Site de l'Harmonie de Montpellier-Jacou dans l'hérault (FRANCE)">
<meta name="keywords" content="musique, harmonie, ajem, jacou, montpellier, hautbois, basson, instrument">
<link rel="shortcut icon" href="http://php.kilio.com/ohmj/ohmj.gif">
<style type="text/css" media=screen>
H1 { FONT-SIZE: 160%; COLOR: #800080; FONT-FAMILY: helvetica,verdana; TEXT-DECORATION: none }
H2 { FONT-SIZE: 140%; COLOR: #800080; FONT-FAMILY: helvetica,verdana; TEXT-DECORATION: none }
H3 { FONT-SIZE: 100%; COLOR: #800080; FONT-FAMILY: helvetica,verdana; TEXT-DECORATION: none }
A:link { COLOR: #800080; FONT-FAMILY: helvetica,verdana; TEXT-DECORATION: none }
A:visited { COLOR: #800080; FONT-FAMILY: helvetica,verdana; TEXT-DECORATION: none }
A:hover { COLOR: #da70d6; FONT-FAMILY: helvetica,verdana; TEXT-DECORATION: none }
.cadre{ MARGIN-LEFT: 0.3cm;MARGIN-RIGHT: 0.2cm }
BODY {
margin-top: 0;
margin-left: 0;
margin-right: 0;
margin-bottom: 0;
scrollbar-face-color: #f2ae26;
scrollbar-shadow-color: #000000;
scrollbar-highlight-color: #FFFFFF;
scrollbar-3dlight-color: #000000;
scrollbar-darkshadow-color: #000000;
scrollbar-track-color: #ffe600;
scrollbar-arrow-color: #4a5d9c
}
</style>
<title>Site de l'Harmonie de Montpellier-Jacou</title>
<script language="Javascript" type="text/javascript">
function DonneDate()
{
// On recupere les donnees sur la date courante qui nous interresse
var pMaintenant = new Date();
var pJour = pMaintenant.getDate();
pJour = pJour > 9?pJour:"0" + pJour;
var pMois = pMaintenant.getMonth()+1;
pMois = pMois > 9?pMois:"0" + pMois;
var pAnnee = pMaintenant.getFullYear();
var pHeure = pMaintenant.getHours();
pHeure = pHeure > 9?pHeure:"0" + pHeure;
var pMinute = pMaintenant.getMinutes();
pMinute = pMinute > 9?pMinute:"0" + pMinute;
var resultat ="";
// Puis on formate la date
resultat = "\""+ pJour+" /"+pMois+" /"+pAnnee+" "+pHeure+":"+pMinute+"\"";
return resultat;
}
</script>
</head>
<body background="/ohmj/Imgs/fond.gif" >
<center>
<table cellSpacing=0 cellPadding=0 width="100%" border=0>
<tbody>
<tr>
<td bgColor="#e7e7e7"><img height=1 alt="" src="Imgs/un_pixel_blanc.gif" width=1></td></tr>
</tbody></table>
<table cellSpacing=0 cellPadding=1 width="100%" border=0>
<tbody>
<tr>
<td vAlign=middle align=left width="55%" bgColor="#c0c0c0">
<font face="helvetica,verdana" color="#505050" size=-2>
LibOhmj v1.46 - Mardi 23 juillet 2002 - Déjà 1896
visiteurs. </font></td>
<td vAlign=middle align=center bgColor="#c0c0c0">
<font face="helvetica,verdana" color="#505050" size=-2>
<script language="Javascript" type="text/javascript">
nav = navigator.appName.substring(0,3);
ver = navigator.appVersion.substring(0,1)
function addFav()
{
if (nav == "Mic" && ver >= 4) {
url_site="http://www.ohmj.fr.st";
titre_site = "Site de l'Harmonie de Montpellier-Jacou";
document.write('<a href="#" onClick="window.external.AddFavorite(url_site, titre_site);return(false);">Cliquez ici pour mettre ce site dans vos favoris</a>')
}
else {
document.write('Faites CTRL+D pour ajouter ce site &agrave;vos favoris!')
}
}
addFav();
</script></font></td>
</tr></tbody></table>
<table cellSpacing=0 cellPadding=0 width="100%" border=0>
<tbody>
<tr>
<td vAlign=middle bgColor="#6f6f6f"><img height=1 alt="" src="Imgs/un_pixel_blanc.gif" width=1></td></tr>
<tr>
<td bgColor="#e7e7e7"><img height=1 alt="" src="Imgs/un_pixel_blanc.gif" width=1></td></tr></tbody>
</table>
<!--
*********************************************************************
File : $RCSfile: Haut.html,v $
Version : $Revision: 1.4 $
Modified by : $Author: jb $ ($Date: 2002/05/22 23:03:50 $)
*********************************************************************
-->
<center>
<table cellSpacing=0 cellPadding=3 width="85%" border=0>
<tbody>
<tr>
<td vAlign=middle align=center bgColor="#4a5d9c">
<table cellSpacing="0" cellPadding="0" width="100%" border="0">
<tbody>
<tr>
<td vAlign=top align=left width="1%" bgColor="#f2ae26">
<img width=110 height=83
src="/ohmj/Imgs/logoOHMJ.gif"
border=0 alt="O.H.M.J.">
</td>
<td vAlign=top align=center width="1%" height=80>
<img src="/ohmj/Imgs/top.gif" border=0 alt=""></td>
<td vAlign=middle align=right width="98%"
bgColor="#f2ae26">
<table cellSpacing=0 cellPadding=0 width="100%" border=0>
<tbody>
<tr>
<td vAlign=middle align=center bgColor="#f2ae26">
<a href="http://www.ville-jacou.fr">
<img border=0
src="/ohmj/Imgs/logoJacou.gif"
Alt="Jacou" height=65 width=99> </a>
</td>
<td vAlign=middle align=center bgColor="#f2ae26">
<img width=326 height=84
src="/ohmj/Imgs/titre.gif" border=0
alt="Harmonie de Montpellier-Jacou">
</td>
<td vAlign=middle align=center bgColor="#f2ae26">
<a href="http://www.ville-montpellier.fr">
<img border=0
src="/ohmj/Imgs/logoMontpellier.jpg"
Alt="Montpellier" height=39 width=41
align=right></a>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td vAlign=top align=center bgColor="#f2ae26">&nbsp;</td>
<td vAlign=top align=left>
<img src="/ohmj/Imgs/center.gif" border=0 alt=""></td>
<td vAlign=top align=center
style=" background : url(/ohmj/Imgs/ombre_haut_bas_main.gif)" >&nbsp;</td></tr>
<tr>
<td vAlign=top align=center bgColor="#f2ae26">
<table cellSpacing=0 cellPadding=1 width="95%" border=0>
<tbody>
<tr>
<td vAlign=middle align=right
bgColor="#f2ae26" colSpan=2>
<table cellSpacing=0 cellPadding=0 width="100%"
border=0>
<tbody>
<tr>
<td vAlign=middle align=left>
<font face="helvetica,verdana" color="#000000"
size=-1><b>Menu</b></font>
</td>
</tr></tbody></table>
<hr>
</td></tr>
<tr>
<td vAlign=middle align=center width="20%" >
<img src="/ohmj/Imgs/icon_puce_over.gif"
border=0 alt="*"></td>
<td vAlign=middle noWrap align=left width="80%" >
<a href="/ohmj/index.php?page=editorial">
<font face="" color="#ffffff" size=-1>
Editorial </font></a> </td> </tr>
<tr> <td vAlign=middle align=center width="20%">
<img src="/ohmj/Imgs/icon_puce_over.gif"
border=0 alt="*"></td>
<td vAlign=middle noWrap align=left width="80%" >
<a href="/ohmj/index.php?page=histoire">
<font face="" color="#ffffff" size=-1>
Historique </font></a> </td> </tr>
<tr> <td vAlign=middle align=center width="20%">
<img src="/ohmj/Imgs/icon_puce_over.gif"
border=0 alt="*"></td>
<td vAlign=middle noWrap align=left width="80%" >
<a href="/ohmj/index.php?page=info_concerts">
<font face="" color="#ffffff" size=-1>
Infos Concerts </font></a> </td> </tr>
<tr> <td vAlign=middle align=center width="20%">
<img src="/ohmj/Imgs/icon_puce_over.gif"
border=0 alt="*"></td>
<td vAlign=middle noWrap align=left width="80%" >
<a href="/ohmj/index.php?page=repertoire">
<font face="" color="#ffffff" size=-1>
R&eacute;pertoire </font></a> </td> </tr>
<tr> <td vAlign=middle align=center width="20%">
<img src="/ohmj/Imgs/icon_puce_over.gif"
border=0 alt="*"></td>
<td vAlign=middle noWrap align=left width="80%" >
<a href="/ohmj/index.php?page=Mus_Ligne">
<font face="" color="#ffffff" size=-1>
Musique en Ligne </font></a> </td> </tr>
<tr> <td vAlign=middle align=center width="20%">
<img src="/ohmj/Imgs/icon_puce_over.gif"
border=0 alt="*"></td>
<td vAlign=middle noWrap align=left width="80%" >
<a href="/ohmj/index.php?page=presse">
<font face="" color="#ffffff" size=-1>
Presse </font></a> </td> </tr>
<tr> <td vAlign=middle align=center width="20%">
<img src="/ohmj/Imgs/icon_puce_over.gif"
border=0 alt="*"></td>
<td vAlign=middle noWrap align=left width="80%" >
<a href="/ohmj/index.php?page=revue">
<font face="" color="#ffffff" size=-1>
"La Revue" </font></a> </td> </tr>
<tr> <td vAlign=middle align=center width="20%">
<img src="/ohmj/Imgs/icon_puce_over.gif"
border=0 alt="*"></td>
<td vAlign=middle noWrap align=left width="80%" >
<a href="/ohmj/index.php?page=album_photo">
<font face="" color="#ffffff" size=-1>
Album Photos</font></a> </td> </tr>
<tr> <td vAlign=middle align=center width="20%">
<img src="/ohmj/Imgs/icon_puce_over.gif"
border=0 alt="*"></td>
<td vAlign=middle noWrap align=left width="80%" >
<a href="/ohmj/index.php?page=fonctionnement">
<font face="" color="#ffffff" size=-1>
Fonctionnement </font></a> </td> </tr>
<tr> <td vAlign=middle align=center width="20%">
<img src="/ohmj/Imgs/icon_puce_over.gif"
border=0 alt="*"></td>
<td vAlign=middle noWrap align=left width="80%" >
<a href="/ohmj/index.php?page=recrutement">
<font face="" color="#ffffff" size=-1>
Recrutement </font></a> </td> </tr>
<tr> <td vAlign=middle align=center width="20%">
<img src="/ohmj/Imgs/icon_puce_over.gif"
border=0 alt="*"></td>
<td vAlign=middle noWrap align=left width="80%" >
<a href="/ohmj/index.php?page=contacts">
<font face="" color="#ffffff" size=-1>
Contacts </font></a> </td> </tr>
<tr> <td vAlign=middle align=center width="20%">
<img src="/ohmj/Imgs/icon_puce_over.gif"
border=0 alt="*"></td>
<td vAlign=middle noWrap align=left width="80%" >
<a href="/ohmj/index.php?page=livre_or">
<font face="" color="#ffffff" size=-1>
Livre d'OR </font></a> </td> </tr>
<tr> <td vAlign=middle align=center width="20%">
<img src="/ohmj/Imgs/icon_puce_over.gif"
border=0 alt="*"></td>
<td vAlign=middle noWrap align=left width="80%" >
<a href="/ohmj/index.php?page=forum">
<font face="" color="#ffffff" size=-1>
Forum </font></a> </td> </tr>
<tr> <td vAlign=middle align=center width="20%">
<img src="/ohmj/Imgs/icon_puce_over.gif"
border=0 alt="*"></td>
<td vAlign=middle noWrap align=left width="80%" >
<a href="/ohmj/index.php?page=liens">
<font face="" color="#ffffff" size=-1>
Liens </font></a> </td> </tr>
</tbody></table><br><br>
<table cellSpacing=0 cellPadding=1 width=140 border=0>
<tbody>
<tr>
<td vAlign=middle align=left >
<font face="helvetica,verdana" size=-1><b>
Les pensées du Chef <br>(et des autres !) </b>:
</font>
<hr>
</td></tr>
<tr>
<td vAlign=top align=left >
<font face="helvetica,verdana" color="#ffffff"
size=-1>
<i>""Sans la musique, la vie serait une erreur" (Nietzche)
</i>"<br><br> </font></td></tr></tbody></table><br><br>
<table cellSpacing=0 cellPadding=1 width=140 border=0>
<tbody>
<tr>
<td vAlign=middle align=left >
<font face="helvetica,verdana" size=-1>
<b>Authentification</b></font>
<hr>
</td></tr>
<tr>
<td align=center bgColor="#f6ae20" >
<form action="/ohmj/Scripts/login.php?op=verifid" method="post">
<font size="1">Pseudonyme</font> <br>
<input name="pseudo" type=Text
size="12" maxlength="11"><br>
<font size="1">Mot de passe</font><br>
<input name ="password" type=Password
size="12" maxlength="11">
<br><br>
<input name="OK" type=Submit
value="LOGIN">
</form>
</td></tr></tbody></table></td>
<td vAlign=top align=center width=18
style="background : url(/ohmj/Imgs/ombre_centre.gif)"
height=600>&nbsp;</td>
<td vAlign=top align=center bgColor="#ffffff" >
<br><br>
<br>
<table cellSpacing=0 cellPadding=1 width="95%" border=0>
<tbody>
<tr>
<td vAlign=middle align=left bgColor="#5b8cc1">
<table cellSpacing=0 cellPadding=1 width="100%" border=0>
<tr vAlign=top bgColor="#4a5d9c">
<td align=left vAlign=middle style="background : url(/ohmj/Imgs/raye10.gif)" >
<font face="helvetica,verdana" color="#ffffff" size=-1> <b>
Forum </b> </font>
</td>
<td align=right style="background : url(/ohmj/Imgs/raye10.gif)" >
&nbsp;&nbsp;&nbsp;&nbsp;<b>
<font face="helvetica,verdana" color="#f4d4b2" size=-1 >
[ ]</font> </b> </td>
</tr></table>
</td></tr>
<tr>
<td vAlign=middle align=center bgColor="#5a69a4">
<table cellSpacing=0 cellPadding=0 width="100%" border=0>
<tbody>
<tr>
<td vAlign=top align=right
style="background : url(/ohmj/Imgs/ombre_haut_bas.gif)"
height=12>
<img height=1 src="/ohmj/Imgs/one_pixel_trans.gif" width=1 border=0
alt=""></td></tr>
<tr>
<td vAlign=top Align=left width="100%" bgColor="#eeea9c">
<font face="helvetica,verdana" size=-1>
<img height=3 src="" width=1 border=0 alt=""><br><br>
<div align="center"><center><table border="0" cellpadding="2" cellspacing="0" width="100%">
<table border="0" cellpadding="0" cellspacing="0" width="95%" bgcolor="white">
<tr><td>
<table border="0" cellpadding="1" cellspacing="0" width="100%" bgcolor="#000000">
<tr><td width="100%">
<table border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="white">
<tr><td width="100%"><div align="center">
<table border="0" cellpadding="4" cellspacing="0" width="100%">
<tr><td bgcolor="#5fa1e2">
<font face="arial" size="2" color="#E2E3B1">&nbsp;Messages </font> <font face="verdana" color="#E2E3B1" size="1">(réponses)</font></td>
<td bgcolor="#5fa1e2"><font face="arial" size="2" color="#E2E3B1">
&nbsp;Auteur :</font></a></td>
<td bgcolor="#5fa1e2" width="140"><font face="arial" size="2" color="#E2E3B1">Posté le :</font></td></tr>
<tr><td bgcolor="#E5E1D1">
<font face="arial" size="2"><a href="index.php?page=forum&option=Lecture_message&id=61" title="Voir le message de BoBy!!!! et la réponse apportée">!!!!!</a></font><font color="#B75309" face="verdana" size=1> (1)</font></td>
<td bgcolor="#E5E1D1" height="24" width="180" class=m9><a href="mailto:lebeaulieurois@aol.com?subject=Ton message sur le Forum de ">
<font face="arial" size="2"><img src="/ohmj/Imgs/forum_email.gif" border=0 alt="Envoyer un email à BoBy!!!!">BoBy!!!!</a></font></td>
<td bgcolor="#E5E1D1" width="110"><font face="arial" size="2" color="">22-06-02 à 20:04</td></tr>
<tr><td bgcolor="#C0C0C0">
<font face="arial" size="2"><a href="index.php?page=forum&option=Lecture_message&id=59" title="Voir le message de déesse de la mour et les réponses apportées">Le beau goss</a></font><font color="#B75309" face="verdana" size=1> (2)</font></td>
<td bgcolor="#C0C0C0" height="24" width="180" class=m9><a href="mailto:sateregardepas@caramail.com?subject=Ton message sur le Forum de ">
<font face="arial" size="2"><img src="/ohmj/Imgs/forum_email.gif" border=0 alt="Envoyer un email à déesse de la mour">déesse de la mour</a></font></td>
<td bgcolor="#C0C0C0" width="110"><font face="arial" size="2" color="">22-06-02 à 18:01</td></tr>
<tr><td bgcolor="#E5E1D1">
<font face="arial" size="2"><a href="index.php?page=forum&option=Lecture_message&id=37" title="Voir le message de percuboum et les réponses apportées">Avis à la population</a></font><font color="#B75309" face="verdana" size=1> (12)</font></td>
<td bgcolor="#E5E1D1" height="24" width="180" class=m9><a href="mailto:mamathieu@yahoo.com?subject=Ton message sur le Forum de ">
<font face="arial" size="2"><img src="/ohmj/Imgs/forum_email.gif" border=0 alt="Envoyer un email à percuboum">percuboum</a></font></td>
<td bgcolor="#E5E1D1" width="110"><font face="arial" size="2" color="">03-06-02 à 12:12</td></tr>
<tr><td bgcolor="#C0C0C0">
<font face="arial" size="2"><a href="index.php?page=forum&option=Lecture_message&id=32" title="Voir le message de Marie (de Taninges ) et les réponses apportées">Le retour !</a></font><font color="#B75309" face="verdana" size=1> (8)</font></td>
<td bgcolor="#C0C0C0" height="24" width="180" class=m9><a href="mailto:zazouzen@aol.com?subject=Ton message sur le Forum de ">
<font face="arial" size="2"><img src="/ohmj/Imgs/forum_email.gif" border=0 alt="Envoyer un email à Marie (de Taninges )">Marie (de Taninges )</a></font></td>
<td bgcolor="#C0C0C0" width="110"><font face="arial" size="2" color="">01-06-02 à 13:15</td></tr>
<tr><td bgcolor="#E5E1D1">
<font face="arial" size="2"><a href="index.php?page=forum&option=Lecture_message&id=31" title="Voir le message de cascadeur fou et les réponses apportées">Fiat 127 Vs 4*4 (le choc des titans)</a></font><font color="#B75309" face="verdana" size=1> (4)</font></td>
<td bgcolor="#E5E1D1" height="24" width="180" class=m9><a href="mailto:cabosse@g-léboules.fiat?subject=Ton message sur le Forum de ">
<font face="arial" size="2"><img src="/ohmj/Imgs/forum_email.gif" border=0 alt="Envoyer un email à cascadeur fou">cascadeur fou</a></font></td>
<td bgcolor="#E5E1D1" width="110"><font face="arial" size="2" color="">31-05-02 à 14:18</td></tr>
<tr><td bgcolor="#C0C0C0">
<font face="arial" size="2"><a href="index.php?page=forum&option=Lecture_message&id=28" title="Voir le message de Flo et les réponses apportées">Un peu d'activité...</a></font><font color="#B75309" face="verdana" size=1> (2)</font></td>
<td bgcolor="#C0C0C0" height="24" width="180" class=m9><a href="mailto:padden@caramail.com?subject=Ton message sur le Forum de ">
<font face="arial" size="2"><img src="/ohmj/Imgs/forum_email.gif" border=0 alt="Envoyer un email à Flo">Flo</a></font></td>
<td bgcolor="#C0C0C0" width="110"><font face="arial" size="2" color="">28-05-02 à 10:25</td></tr>
<tr><td bgcolor="#E5E1D1">
<font face="arial" size="2"><a href="index.php?page=forum&option=Lecture_message&id=22" title="Voir le message de jb et les réponses apportées">Un sujet plus intéressant...</a></font><font color="#B75309" face="verdana" size=1> (2)</font></td>
<td bgcolor="#E5E1D1" height="24" width="180" class=m9><a href="mailto:jbnadal@ifrance.com?subject=Ton message sur le Forum de ">
<font face="arial" size="2"><img src="/ohmj/Imgs/forum_email.gif" border=0 alt="Envoyer un email à jb">jb</a></font></td>
<td bgcolor="#E5E1D1" width="110"><font face="arial" size="2" color="">24-05-02 à 15:45</td></tr>
<tr><td bgcolor="#C0C0C0">
<font face="arial" size="2"><a href="index.php?page=forum&option=Lecture_message&id=15" title="Voir le message de chtite bassoniste">Débat</a></font><font color="#B75309" face="verdana" size=1> (0)</font></td>
<td bgcolor="#C0C0C0" height="24" width="180" class=m9><a href="mailto:quine@netcourrier.com?subject=Ton message sur le Forum de ">
<font face="arial" size="2"><img src="/ohmj/Imgs/forum_email.gif" border=0 alt="Envoyer un email à chtite bassoniste">chtite bassoniste</a></font></td>
<td bgcolor="#C0C0C0" width="110"><font face="arial" size="2" color="">18-05-02 à 19:55</td></tr>
<tr><td bgcolor="#E5E1D1">
<font face="arial" size="2"><a href="index.php?page=forum&option=Lecture_message&id=16" title="Voir le message de chtite bassoniste et les réponses apportées">Débat</a></font><font color="#B75309" face="verdana" size=1> (7)</font></td>
<td bgcolor="#E5E1D1" height="24" width="180" class=m9><a href="mailto:quine@netcourrier.com?subject=Ton message sur le Forum de ">
<font face="arial" size="2"><img src="/ohmj/Imgs/forum_email.gif" border=0 alt="Envoyer un email à chtite bassoniste">chtite bassoniste</a></font></td>
<td bgcolor="#E5E1D1" width="110"><font face="arial" size="2" color="">18-05-02 à 19:55</td></tr>
<tr><td bgcolor="#C0C0C0">
<font face="arial" size="2"><a href="index.php?page=forum&option=Lecture_message&id=6" title="Voir le message de Mariama et les réponses apportées">Ouais!!!!!</a></font><font color="#B75309" face="verdana" size=1> (8)</font></td>
<td bgcolor="#C0C0C0" height="24" width="180" class=m9><a href="mailto:mamathieu@yahoo.com?subject=Ton message sur le Forum de ">
<font face="arial" size="2"><img src="/ohmj/Imgs/forum_email.gif" border=0 alt="Envoyer un email à Mariama">Mariama</a></font></td>
<td bgcolor="#C0C0C0" width="110"><font face="arial" size="2" color="">13-05-02 à 15:46</td></tr>
<tr><td bgcolor="#E5E1D1">
<font face="arial" size="2"><a href="index.php?page=forum&option=Lecture_message&id=3" title="Voir le message de Flo et la réponse apportée">Teste</a></font><font color="#B75309" face="verdana" size=1> (1)</font></td>
<td bgcolor="#E5E1D1" height="24" width="180" class=m9><a href="mailto:padden@caramail.com?subject=Ton message sur le Forum de ">
<font face="arial" size="2"><img src="/ohmj/Imgs/forum_email.gif" border=0 alt="Envoyer un email à Flo">Flo</a></font></td>
<td bgcolor="#E5E1D1" width="110"><font face="arial" size="2" color="">13-05-02 à 13:48</td></tr>
<tr><td bgcolor="#C0C0C0">
<font face="arial" size="2"><a href="index.php?page=forum&option=Lecture_message&id=1" title="Voir le message de jb et les réponses apportées">Ouverture du forum</a></font><font color="#B75309" face="verdana" size=1> (3)</font></td>
<td bgcolor="#C0C0C0" height="24" width="180" class=m9><a href="mailto:jbnadal@ifrance.com?subject=Ton message sur le Forum de ">
<font face="arial" size="2"><img src="/ohmj/Imgs/forum_email.gif" border=0 alt="Envoyer un email à jb">jb</a></font></td>
<td bgcolor="#C0C0C0" width="110"><font face="arial" size="2" color="">12-05-02 à 23:17</td></tr>
<center></center></div></td></tr></table></td></tr></table></td></tr></table>
</table></center></div><div align="center"><center><table border="0" cellpadding="0" cellspacing="2" width="100%">
<tr><td><br><font face="arial" size="2"><a href="index.php?page=forum&option=Ajout_message"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ajouter un message</b></a></td><td>&nbsp</td></tr></table></center></div></form>
<br><br></font>
</td></tr></tbody></table></td></tr></tbody></table><br>
</td></tr>
<tr>
<td vAlign=middle align=center bgColor="#f2ae26">
&nbsp;
</td>
<td vAlign=top align=center width=18 style="background : url(/ohmj/Imgs/ombre_centre.gif)" height=25>&nbsp;</td>
<td vAlign=middle align=right bgColor="#ffffff">&nbsp;</td></tr>
</tbody></table></td></tr></tbody></table></center></body></html>