| Voir le sujet précédent :: Voir le sujet suivant |
| Auteur |
Message |
Alexis Site Admin
Inscrit le: 08 Avr 2004 Messages: 1112 Localisation: Aix-En-Provence et Firminy (42)
|
Posté le: Jeu 01 Déc 2005, 20:38 Sujet du message: V 0.81 : Mise à jour pour les pronostics sous firefox |
|
|
Voici (enfin) comment faire marcher les grilles des pronostics sous Firefox avec la version 0.81 (le problème a été corrigé dans la 0.82 mais je n'avais pas proposé de mise à jour).
dans pronos.htm
Rechercher :
| Code: | | <tr><td width="100%" colspan="2" bgcolor="#3b487f"> |
après, ajouter :
| Code: | | <FORM id="matchid" name="matchid" action="index.php?page=pronos&gr_champ=<?php print $gr_champ;?>" method="post"> |
dans prono1.php
Rechercher (ligne 19) :
avant, ajouter :
| Code: | ?>
<SCRIPT type="text/JavaScript">
<!--
var PL = new InitTab(64);
var ChN="N";
var Ch1="1";
var Ch2="2";
ImgN=new Image(10,14); ImgN.src="N.gif";
Img1=new Image(10,14); Img1.src="1.gif";
Img2=new Image(10,14); Img2.src="2.gif";
ImgNR=new Image(10,14); ImgNR.src="barre.gif";
Img1R=new Image(10,14); Img1R.src="barre.gif";
Img2R=new Image(10,14); Img2R.src="barre.gif";
function Change(match, res) {
if (res==1) {
eval("document.matchid.m"+match+"_0.src = ImgN.src");
eval("document.matchid.m"+match+"_1.src = Img1R.src");
eval("document.matchid.m"+match+"_2.src = Img2.src");
eval("PL["+match+"]=Ch1;");
} else if (res==2) {
eval("document.matchid.m"+match+"_0.src = ImgN.src");
eval("document.matchid.m"+match+"_1.src = Img1.src");
eval("document.matchid.m"+match+"_2.src = Img2R.src");
eval("PL["+match+"]=Ch2;");
} else {
eval("document.matchid.m"+match+"_0.src = ImgNR.src");
eval("document.matchid.m"+match+"_1.src = Img1.src");
eval("document.matchid.m"+match+"_2.src = Img2.src");
eval("PL["+match+"]=ChN;");
}
}
function InitTab(length) {
this.length = length;
for(i=1; i<=length; i++) this[i] = "";
return this;
}
function ValideGrille(tot) {
for (i=1; i<=tot; i++) {
if (PL[i]!="") { if (PL[i]!="undefined"){
eval("document.matchid.r_"+i+".value=PL["+i+"];");
} else {eval("document.matchid.r_"+i+".value=undefined;");}}
else {eval("document.matchid.r_"+i+".value=undefined;");}
}
document.matchid.submit();
return;
}
// -->
</SCRIPT>
<?php |
Rechercher (ligne 127) :
| Code: | for($i=0;$i<$nb_matchs;$i++)
{
$nom_f_prono = "f_prono_$i";
$nom_id_match = "id_match_$i";
if ($$nom_f_prono) {$f_prono[$i]=$$nom_f_prono;}
if ($$nom_id_match) $id_match[$i]=$$nom_id_match; |
Remplacer par :
| Code: | for($i=1;$i<=$_REQUEST['nb_fiche'];$i++)
{
$nom_f_prono = "r_$i";
$nom_id_match = "id_match_$i";
if ($_REQUEST[$nom_f_prono]) {$f_prono[$i]=$_REQUEST[$nom_f_prono];}
if ($_REQUEST[$nom_id_match]) {$id_match[$i]=$_REQUEST[$nom_id_match];}
|
Ligne 202, supprimer :
| Code: | echo "<SCRIPT language=JavaScript src=\"prono.js\"></SCRIPT><SCRIPT language=JavaScript>\n";
echo "function ValidForm() {";
echo " this.document.all.prono_Form.submit();";
echo "};";
echo "</SCRIPT>";
echo "<FORM name=prono_Form action=index.php?page=pronos&gr_champ=$gr_champ method=\"post\">"; |
Rechercher (ligne 229) :
après ajouter :
Rechercher :
| Code: |
if ($ecart_heures>="0")
{
echo"<SCRIPT language=JavaScript>\n";
echo "var Images_$i =[\"\",[\"u_1.gif\",\"u_0.gif\"]];\n";
echo "var Donnee_$i =";
echo "[";
echo "[";
echo "\"RADIO\", \"prono_Form\", \"f_prono_$i\", \"d_prono_$i\", \"bbb\",";
echo "[";
if ($prono=="0")
{
echo "[\"\", \"1\", \"\"],";
echo "[\"\", \"N\", \"\"],";
echo "[\"\", \"2\", \"\"]";
}
if ($prono=="1")
{
echo "[\"\", \"1\", \"selected\"],";
echo "[\"\", \"N\", \"\"],";
echo "[\"\", \"2\", \"\"]";
}
if ($prono=="N")
{
echo "[\"\", \"1\", \"\"],";
echo "[\"\", \"N\", \"selected\"],";
echo "[\"\", \"2\", \"\"]";
}
if ($prono=="2")
{
echo "[\"\", \"1\", \"\"],";
echo "[\"\", \"N\", \"\"],";
echo "[\"\", \"2\", \"selected\"]";
}
echo "]";
echo "],";
echo "[";
echo "\"BUTTON\", \"s_submit_$i\", \"d_submit_$i\", \"ValidForm();\"";
echo " ] ";
echo "];\n";
echo "</SCRIPT>";
echo "<input type=\"hidden\" name=\"id_match_$i\" value=\"$row[2]\">";
echo "<td><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\">";
echo "<tr>";
echo "<td width=\"45\" background=\"fond.gif\" height=\"10\" valign=\"middle\" align=\"center\">";
echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\" width=\"45\"><tr><div id=\"d_prono_$i\"></div></tr></table>";
echo "<script language=\"JavaScript\"> var RC = new Radio_CheckBox( Images_$i, Donnee_$i);</script>";
echo "</td></tr></table></td>";
}
else
{
echo "<td><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\" bgColor=\"#365470\">";
echo "<tr>";
echo "<td width=\"45\" background=\"fond.gif\" height=\"10\" valign=\"middle\" align=\"center\">";
echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\" width=\"45\"><tr>";
if ($prono=="1")
{
echo "<td><img src=\"u_0.gif\"></img></td>";
echo "<td><img src=\"u_1.gif\"></img></td>";
echo "<td><img src=\"u_1.gif\"></img></td>";
}
if ($prono=="N")
{
echo "<td><img src=\"u_1.gif\"></img></td>";
echo "<td><img src=\"u_0.gif\"></img></td>";
echo "<td><img src=\"u_1.gif\"></img></td>";
}
if ($prono=="2")
{
echo "<td><img src=\"u_1.gif\"></img></td>";
echo "<td><img src=\"u_1.gif\"></img></td>";
echo "<td><img src=\"u_0.gif\"></td>";
}
if ($prono=="0")
{
echo "<td><img src=\"u_1.gif\"></img></td>";
echo "<td><img src=\"u_1.gif\"></img></td>";
echo "<td><img src=\"u_1.gif\"></img></td>";
}
echo "</tr></table>";
echo "</td></tr></table></td>";
} |
Remplacer par :
| Code: | if ($ecart_heures>="0")
{ $x++;
echo"<td>";
echo "<input type=\"hidden\" name=\"id_match_$x\" value=\"$row[2]\">";
?><INPUT type="hidden" value="1" name="r_<?php print $x;?>">
<table border="0" cellpadding="0" cellspacing="0" align="center" width="50">
<tr>
<td>
<?php
if ($prono=="0")
{
?>
<a href="javascript:Change(<?php print $x; ?>,1);"><img src="1.gif" border="no" name="m<?php print $x; ?>_1" alt=""></a>
<a href="javascript:Change(<?php print $x; ?>,0);"><img src="N.gif" border="no" name="m<?php print $x; ?>_0" alt=""></a>
<a href="javascript:Change(<?php print $x; ?>,2);"><img src="2.gif" border="no" name="m<?php print $x;?>_2" alt=""></a>
<?
}
if ($prono=="1")
{
?>
<a href="javascript:Change(<?php print $x; ?>,1);"><img src="barre.gif" border="no" name="m<?php print $x; ?>_1" alt=""></a>
<a href="javascript:Change(<?php print $x; ?>,0);"><img src="N.gif" border="no" name="m<?php print $x; ?>_0" alt=""></a>
<a href="javascript:Change(<?php print $x; ?>,2);"><img src="2.gif" border="no" name="m<?php print $x;?>_2" alt=""></a>
<?
}
if ($prono=="N")
{
?>
<a href="javascript:Change(<?php print $x; ?>,1);"><img src="1.gif" border="no" name="m<?php print $x; ?>_1" alt=""></a>
<a href="javascript:Change(<?php print $x; ?>,0);"><img src="barre.gif" border="no" name="m<?php print $x; ?>_0" alt=""></a>
<a href="javascript:Change(<?php print $x; ?>,2);"><img src="2.gif" border="no" name="m<?php print $x;?>_2" alt=""></a>
<?
}
if ($prono=="2")
{
?>
<a href="javascript:Change(<?php print $x; ?>,1);"><img src="1.gif" border="no" name="m<?php print $x; ?>_1" alt=""></a>
<a href="javascript:Change(<?php print $x; ?>,0);"><img src="N.gif" border="no" name="m<?php print $x; ?>_0" alt=""></a>
<a href="javascript:Change(<?php print $x; ?>,2);"><img src="barre.gif" border="no" name="m<?php print $x;?>_2" alt=""></a>
<?
}
echo "</td></tr></table></td>";
}
else
{
echo "<td><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\">\n";
echo "<tr>\n";
echo "<td width=\"45\" height=\"10\" valign=\"middle\" align=\"center\">\n";
echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\" width=\"50\">\n<tr>\n<td>\n";
if ($prono=="1")
{
?>
<img src="barre.gif" border="no" alt=""> <img src="N.gif" border="no" alt=""> <img src="2.gif" border="no" alt="">
<?php
}
if ($prono=="N")
{
?>
<img src="1.gif" border="no" alt=""> <img src="barre.gif" border="no" alt=""> <img src="2.gif" border="no" alt="">
<?php
}
if ($prono=="2")
{
?>
<img src="1.gif" border="no" alt=""> <img src="N.gif" border="no" alt=""> <img src="barre.gif" border="no" alt="">
<?php
}
if ($prono=="0")
{
?>
<img src="1.gif" border="no" alt=""> <img src="N.gif" border="no" alt=""> <img src="2.gif" border="no" alt="">
<?php
}
echo "</td></tr></table>";
echo "</td></tr></table></td>";
} |
Rechercher :
| Code: | | <input type="hidden" name="action" value="valid_pronos"> |
après, ajouter :
| Code: | | <input type="hidden" name="nb_fiche" value="<?php print $x; ?>"> |
Rechercher :
Remplacer par :
| Code: | | ValideGrille(<?php print $x; ?>) |
Rajouter les images comprises dans le répertoire pronos de la version 0.82 |
|
| Revenir en haut |
|
 |
|
|