Pb agenda!!

grominet5969 Messages postés 3 Date d'inscription mercredi 8 février 2006 Statut Membre Dernière intervention 5 février 2007 - 3 févr. 2007 à 14:08
Bling 182 Messages postés 510 Date d'inscription lundi 27 novembre 2006 Statut Membre Dernière intervention 5 juillet 2009 - 6 févr. 2007 à 12:05
Salut,

Sur ce site j'ai trouvé un agenda d'événements que j'ai installé sur mon site web. Il fonctionnait trés bien sous phpMyAdmin 2.6.2-Debian-3sarge1 mais depuis que mon hebergeur est passé sous phpMyAdmin 2.6.2-Debian-3sarge3, mon agenda ne fonctionne plus correctement.

En effet, je ne peux plus changer de mois ni d'année. De plus, je n'arrive plus à afficher les événements  en cliquant sur les jours qui correspondent à un événement.
Pour voir le pb: http://uschartronshockey.nix3.fr/agenda_hockey.php/

Voici le code de la page:
----------------------------------------------------------
<style type="text/css">
<!--
body {
    background-image: url();
    background-repeat: no-repeat;
    margin-top: 0%;
    margin-left: 0px;
    margin-right: 0px;
    background-color: #000000;
}
.Style1 {
    color: #FFFFFF;
    font-weight: bold;
}
.Style3 {color: #FFFFFF}
-->
</style>

  ----

          <table width="275" height="208" border="0" align="left">
        ----

         ,

          </td>
          &nbsp;,
       
        ----

                   ,
          <table width="225" border="0" bgcolor="#FF00CC">
            ----

             ,

                <style type=text/css>
      .popperlink {
    Z-INDEX: 2; VISIBILITY: hidden; WIDTH: 200px; POSITION: absolute
}
                </style>
                <?

  $db_host = \"localhost\";      // Nom du serveur sql
  $db_login = \"Monlogin\";          // Login de connexion a la base
  $db_pass = \"MonMotDePasse\";              // Pass de connexion a la base
  $bdd = \"MaBDD\";              // Nom de la base sql
  $daybgcolor=\"FFFFFF\" ;      // Couleur des jours de la semaine
  $dombgcolor=\"228B22\" ;      // Couleur du jour sélectionné
  $dayholcolor=\"FF00CC\" ;     // Couleur des WE

  // Mois
  $month[0] = \"Janvier\" ;
  $month[1] = \"Février\" ;
  $month[2] = \"Mars\" ;
  $month[3] = \"Avril\" ;
  $month[4] = \"Mai\" ;
  $month[5] = \"Juin\" ;
  $month[6] = \"Juillet\" ;
  $month[7] = \"Août\" ;
  $month[8] = \"Septembre\" ;
  $month[9] = \"Octobre\" ;
  $month[10] = \"Novembre\" ;
  $month[11] = \"Décembre\" ;

  // Première lettre des jours de la semaine
  $day[0] = \"D\" ;
  $day[1] = \"L\" ;
  $day[2] = \"M\" ;
  $day[3] = \"M\" ;
  $day[4] = \"J\" ;
  $day[5] = \"V\" ;
  $day[6] = \"S\" ;

  $error01 = \"Erreur : date invalide\"

?>
                <script language=javascript>
function plus_atq(){
     if (eval(document.maj_combat.def.value)>1){
      document.maj_combat.def.value--;
      document.maj_combat.atq.value++;
    }
}
function plus_def(){
  if (eval(document.maj_combat.atq.value)>1){
        document.maj_combat.def.value++;
      document.maj_combat.atq.value--;
    }
}

skn = document.getElementById(\"topdecklink\").style;

if(navigator.appName.substring(0,3) == \"Net\")
document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = get_mouse;

function pop_info(mat)
{
poplink('<table width=250 bgcolor=white border=5 bordercolor=\"'+info_pj[mat][1]+'\" cellpadding=3 align=center>----
Infos (mat :'+ mat +'), ----
Nom, '+info_pj[mat][0]+', ----
Race, '+info_pj[mat][2]+', ----
Blason, '+info_pj[mat][3]+', ----
Message, ----
'+info_pj[mat][4]+'
');   
}

function poplink(msg)

{

var content = msg;
document.getElementById("topdecklink").innerHTML = content;
skn.visibility = "visible";
}

function get_mouse(e)

{
var x (navigator.appName.substring(0,3) "Net") ? e.pageX : event.x+document.body.scrollLeft;var y (navigator.appName.substring(0,3) "Net") ? e.pageY : event.y+document.body.scrollTop;
skn.left = x+20;
skn.top = y-50;
}

function killlink()

{

poplink('');

skn.visibility = "hidden";

}

                </script>
                <script language='JavaScript'>

 function modifier (jour)
 {
  window.location.href = "agenda_hockey1.php?form=<?echo $form;?>&elem=<?echo $elem;?>&mois=" + document.forms["Agenda"].elements['month'].options[document.forms["Agenda"].elements['month'].selectedIndex].value + "&jour=" + jour +"&annee=" + document.forms["Agenda"].elements['year'].options[document.forms["Agenda"].elements['year'].selectedIndex].value
 }
<?
  if (!isset($jour))
       $jour = date("j") ;

  if (!isset($mois))
       $mois = date("m") ;

  if (!isset($annee))
       $annee = date("Y") ;
      

  $nbjmonth[0] = 31 ;
  $nbjmonth[1] = ($annee%4==0?($annee%100==0?($annee%400?29:28):29):28) ;
  $nbjmonth[2] = 31 ;
  $nbjmonth[3] = 30 ;
  $nbjmonth[4] = 31 ;
  $nbjmonth[5] = 30 ;
  $nbjmonth[6] = 31;
  $nbjmonth[7] = 31 ;
  $nbjmonth[8] = 30 ;
  $nbjmonth[9] = 31 ;
  $nbjmonth[10] = 30 ;
  $nbjmonth[11] = 31 ;

  if(!checkdate($mois,$jour,$annee))
  {
   echo "alert('$error01')\n" ;
   $jour = date("j") ;
   $mois = date("m") ;
   $annee = date("Y") ;
  }
 
$connexion = mysql_connect("$db_host","$db_login","$db_pass");
$db = mysql_select_db("$bdd", $connexion);

 $query = "select * from tge_agenda where jour=$jour and mois=$mois and annee=$annee";
        $result = mysql_db_query("$bdd", $query);
        while ($r = mysql_fetch_array($result))
    {
    $description = $r["description"];
}
  // Calcul du jour julien et du numéro du jour
  $HR = 0;
  $GGG = 1;
  if( $annee < 1582 ) $GGG = 0;  if( $annee <1582 && $mois < 10 ) $GGG 0;  if( $annee <1582 && $mois 10 && 1 < 5 ) $GGG = 0;
  $JD = -1 * floor(7 * (floor(($mois + 9) / 12) + $annee) / 4);
  $S = 1;
  if (($mois - 9)<0) $S=-1;
  $A = abs($mois - 9);
  $J1 = floor($mois + $S * floor($A / 7));
  $J1 = -1 * floor((floor($J1 / 100) + 1) * 3 / 4);
  $JD = $JD + floor(275 * $mois / 9) + 1 + ($GGG * $J1);
  $JD = $JD + 1721027 + 2 * $GGG + 367 * $annee - 0.5;

  /*$tmp = ((int)(($mois>2?$annee:$annee-1)/100)) ;
  $jj = (int)((((int)(365.25*($mois>2?$annee:$annee-1))) + ((int)(30.6001*($mois>2?$mois+1:$mois+13))) + $jour + 1720994.5 + ($annee > 1582 && $mois > 10 && $jour > 15?2-$tmp+((int)($tmp/4)):0))) ;
  $jj = (int)(($jj) % 7)*/
  $jj = (($JD+.5)%7) ;
?>
                </script>
                <script language=javascript> var info_pj=new Array();info_pj["47909"]=new Array("Yoann","red","Démon","","je rejoins le red squadron  pro-humain je connais amok  47788 en defense negative  ");info_pj["50332"]=new Array("Dark Vador","red","Démon","","Anges, ne m\'attaquez point je suis avec PinChU");info_pj["49704"]=new Array("Darksid_1","red","Démon","","Un bon bon est un bon mort! Amen");info_pj["39161"]=new Array("Devender","red","Démon","MAFIA","[Chef Infanterie Scout]abusé en un tour!!fait chier!");info_pj["27902"]=new Array("Manouche","red","Démon","","Je reviens de vacances !!");info_pj["43857"]=new Array("Elric De Melniboné","red","Démon","","[Hell\'s Angel](*)[Born to Pete Your Tronche!]Vous n\'auriez pas vu StormBringer par hazard??? VRRRRRRRRRRRR VRRRRRRRRRRRR *fait rugir sa Harley-Davidson*");info_pj["47061"]=new Array("Darkangelus","red","Démon","","Salut les gars, je suis nouveau !");info_pj["48657"]=new Array("FurFurr","red","Démon","","Hardcore Attitude !");info_pj["24328"]=new Array("DKTan","red","Démon","","");info_pj["36437"]=new Array("Shadow","red","Démon","","[Scout Demoniaque]");</script>
                <?
  echo "\n" ;
?>
               

                                      ----

                      &nbsp;,
                      Agenda des matchs et des &eacute;v&eacute;nements du club de Nationnal 3,
                      &nbsp;,
                   
                 

                  <?

  echo "<center><form name='Agenda'>\n" ;
  echo "\n\" ;

  // Affichage de la sélection du mois et de l'année
  echo \"<select name='month' onChange=\"modifier($jour)\">\n" ;

  for ($i=0;$i<12;$i++)
  {
   echo "<option value='".($i+1)."'".($mois==($i+1)?" selected":"").">".$month[$i]."</option>\n" ;
  }

  echo "</select>, \n\" ;

  echo \"<select name='year' onChange=\"modifier($jour)\">\n" ;

  $y = date("Y") ;
  for ($i=$y-10;$i<$y+10;$i++)
  {
   echo "<option value='$i'".($annee==($i)?" selected":"").">$i</option>\n" ;
  }

  echo "</select>, ----
&nbsp;, \n\" ;

  echo \"----
<table width='100%' cellspacing='0' cellspading='0' border='0'>\n" ;
  echo "</form>\n" ;
  
   // D L M M J V S
  
    for($i=0;$i<7;$i++)
  {
   echo ", \".$day[$i].\"</td>\" ;
  }
  echo \"\n----
, \n----
\n\" ;
  $j = $jj ;//date (\"w\", mktime (0,0,0,$mois,1,$annee)) ;
  $dom = 1 ;
  for ($i=0;$i<7;$i++)
  {
   if ($j<=$i)
   {
        echo \"";
       
        $connexion = mysql_connect("$db_host","$db_login","$db_pass");
$db = mysql_select_db("$bdd", $connexion);
                 $query = "select * from tge_agenda where jour=$dom and mois=$mois and annee=$annee";
        $result = mysql_db_query("$bdd", $query);
            if (!$result) {
        $nom  = "";
        }
        else {
        while ($r = mysql_fetch_array($result))
    {
    $nom  = $r["nom"];
    $jourt  = $r["jour"];

        ?>
               

                )' onmouseover="poplink(' <? echo $nom ?>');" onmouseout=killlink()>
                <?
            }
}
    echo "".$dom++.", \n\" ;
   }
   else
       echo \"&nbsp;, \n\" ;
  }
  echo \"\n\" ;
  // Le reste
  for ($i=0;$i<5;$i++)
  {
   echo \"----
\n\" ;
   for ($j=0;$j<7;$j++)  
   {   
    $j_inac = ($j==0 || $j==6) ;
    if($dom < $nbjmonth[($mois-1)]) {
   
         echo \"";
         $query = "select * from tge_agenda where jour=$dom and mois=$mois and annee=$annee";
        $result = mysql_db_query("$bdd", $query);
            if (!$result) {
        $nom  = "";
        }
        else {
        while ($r = mysql_fetch_array($result))
    {
    $nom  = $r["nom"];
    $jourt  = $r["jour"];

        ?>
                )' onmouseover="poplink(' <? echo $nom ?>');" onmouseout=killlink()>
                <?
            }
}
    echo "".$dom++.", \n\" ; }
    else if (checkdate($mois,$dom,$annee)) {
             echo \"";
                      $query = "select * from tge_agenda where jour=$dom and mois=$mois and annee=$annee";
        $result = mysql_db_query("$bdd", $query);
            if (!$result) {
        $nom  = "";
        }
        else {
        while ($r = mysql_fetch_array($result))
    {
    $nom  = $r["nom"];
    $jourt  = $r["jour"];

        ?>
                )' onmouseover="poplink(' <? echo $nom ?>');" onmouseout=killlink()>
                <?
            }
}
    echo "".$dom++.", \n\" ; }
    else
         echo \"&nbsp;, \n\" ;

   }
   echo \"\n\" ;
  }

  echo "\n
\n" ;
  echo "</td></tr></table>" ;
  echo "</form>$description</center>" ;

  echo "\n" ;

?>
               

                <script language=javascript>
                </script>
                </td>
            </tr>
          </table></td>
        </tr>
      </table>
    </td>
  </tr>
</table>

<SCRIPT language=javascript>function plus_atq(){
     if (eval(document.maj_combat.def.value)>1){
      document.maj_combat.def.value--;
      document.maj_combat.atq.value++;
    }
}
function plus_def(){
  if (eval(document.maj_combat.atq.value)>1){
        document.maj_combat.def.value++;
      document.maj_combat.atq.value--;
    }
}

skn = document.getElementById("topdecklink").style;
if(navigator.appName.substring(0,3) == "Net")
document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = get_mouse;
function pop_info(mat)
{
poplink('Infos (mat :'+ mat +'), ----
Nom, '+info_pj[mat][0]+', ----
Race, '+info_pj[mat][2]+', ----
Blason, '+info_pj[mat][3]+', ----
Message, ----
'+info_pj[mat][4]+'
');   
}
function poplink(msg)
{
var content = msg;
document.getElementById("topdecklink").innerHTML = content;
skn.visibility = "visible";
}
function get_mouse(e)
{var x (navigator.appName.substring(0,3) "Net") ? e.pageX : event.x+document.body.scrollLeft;var y (navigator.appName.substring(0,3) "Net") ? e.pageY : event.y+document.body.scrollTop;
skn.left = x+0;
skn.top = y-10;
}
function killlink()
{
poplink('');
skn.visibility = "hidden";
}
</SCRIPT>
---------------------------------------------------------

Merci de m'avoir lu jusqu'ici.

Si quelqu'un pouvait m'aider ca m'enléverai une grosse épine du pied!!

Merci.

Grominet

5 réponses

Bling 182 Messages postés 510 Date d'inscription lundi 27 novembre 2006 Statut Membre Dernière intervention 5 juillet 2009 3
4 févr. 2007 à 16:00
Lut :)

un sed -i s/hockey1\.php/hockey\.php/g agenda_hockey.php devrait à mon avis résoudre le problème. :D

(Note : fais une sauvegarde quand meme de la page agenda_hotkey.php *avant*, on sait jamais)
0
grominet5969 Messages postés 3 Date d'inscription mercredi 8 février 2006 Statut Membre Dernière intervention 5 février 2007
5 févr. 2007 à 15:42
Slt bling 182,

Merci pour ta reponse.

Je ne comprend pas ou je dois mettre cela : " sed -i s/hockey1\.php/hockey\.php/g agenda_hockey.php "??
0
Bling 182 Messages postés 510 Date d'inscription lundi 27 novembre 2006 Statut Membre Dernière intervention 5 juillet 2009 3
5 févr. 2007 à 18:37
Euh... :) c'est une commande, il faut donc l'executer dans une console.

Sinon, tu ouvres ton fichier avec un editeur graphique, et tu fais chercher/remplacer.
Et tu remplaces hockey1.php par hockey.php

Voila :)
0
grominet5969 Messages postés 3 Date d'inscription mercredi 8 février 2006 Statut Membre Dernière intervention 5 février 2007
5 févr. 2007 à 20:24
Ha ok!!

Je n'avais pas compris. J'ai donc essayer ce que tu m'as dis mais ca ne fonctionne tjrs pas....sniff

Si jamais tu as une autre idée, je suis preneur.

Merci bling.
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
Bling 182 Messages postés 510 Date d'inscription lundi 27 novembre 2006 Statut Membre Dernière intervention 5 juillet 2009 3
6 févr. 2007 à 12:05
C'est normal que a aucun moment tu récupères les informations passées dans l'URL ?
0
Rejoignez-nous