/* Connexion a la BD */
require_once("connexion.php");
$connection = mysql_connect($host, $user, $password) or die ("Could'nt connect to server");
mysql_query("SET character_set_results = 'latin1'", $connection);
mysql_query("SET character_set_results = 'utf8', character_set_client = 'utf8', character_set_connection = 'utf8', character_set_database = 'utf8', character_set_server = 'utf8'", $connection);
$db = mysql_select_db($name, $connection);
//On r�cup�re le nombre de jour dans chaque mois et la duree du mois dans le calendrier par d�faut du monde.
$querycal = "SELECT * FROM jdrq_calendriers WHERE NoMonde = $NoID AND ParDefaut='1'";
$resultcal = mysql_query($querycal) or die ("Impossible d'executer la requ�te: $querycal ");
if(mysql_num_rows($resultcal) > 0){
$rowcal = mysql_fetch_array($resultcal);
extract($rowcal);
//On r�cup�re le nom de chaque mois du calendrier
$A=1;
$querymois = "SELECT * FROM jdrq_calendriers_mois WHERE NoCalendrier = $NoCalendrier";
$resultmois = mysql_query($querymois) or die ("Impossible d'executer la requ�te: $querymois ");
while ($rowmois = mysql_fetch_array($resultmois)) {
extract($rowmois);
$NomMois[$A]=$Mois;
$A++;
}
}
$datedebut=date('o/m/d',mktime(0 , 0 , 0, date('m'), date('d')-14, date('o')));
$A=0;
If ($Num != 0 ) {
$query = "SELECT * FROM sysfitzz_jdrq_sorts WHERE NoSort=$Num";
$result = mysql_query($query) or die ("Impossible d'executer la requ�te: $query ");
$row = mysql_fetch_array($result);
extract($row);
echo "
$Nom
";
echo "
";
echo "
";
echo "Type / Co�t: | $Type $Cout |
";
echo "Temps d'invocation: | $Invocation |
";
echo "Distance: | $Distance |
";
echo "Cible: | $Cible |
";
echo "Dur�e: | $Duree |
";
echo "D�fense: | $Defense |
";
echo "Description: | $DescLongue |
";
echo "Dommage: | $Dommage |
";
} else {
$Sorte = array ('pouvoirs','sortil�ges','pouvoirs','oraisons','techniques');
$Discipline = array ('magie, psychisme, spiritualit� et s�duction','Magie','Psychisme','Spiritualit�','S�duction');
If ($Typ == 0 ) {
$query = "SELECT * FROM sysfitzz_jdrq_sorts ORDER BY Type,Cout,Nom";
} else {
$query = "SELECT * FROM sysfitzz_jdrq_sorts WHERE Type='$Discipline[$Typ]' ORDER BY Type,Cout,Nom";
}
echo "Liste des $Sorte[$Typ] de $Discipline[$Typ]
";
echo "
";
echo "";
echo " | Type | Co�t | Nom | Description |
";
$result = mysql_query($query) or die ("Impossible d'executer la requ�te: $query ");
while ($row = mysql_fetch_array($result)) {
extract($row);
$MAJNOUV="";
$DateModif=str_replace("-","/",$DateModif);
$DateAjout=str_replace("-","/",$DateAjout);
If ($DateAjout > $datedebut ) {
$MAJNOUV="$DateAjout - Nouveau";
$COULEUR="#00FF00";
}
If ($DateModif > $datedebut ) {
$MAJNOUV="$DateModif - Modifier";
$COULEUR="#FFFF00";
}
if ( $A % 2 == 0 ) {
echo "";
} else {
echo "
";
}
echo "$MAJNOUV | $Type | $Cout | $Nom | $DescCourte |
";
$A++;
}
echo "
";
}
?>
//Le footer
if ($NoID <= 9) {
require_once("jdrq_0" . $NoID . "_footer.php");
} else {
require_once("jdrq_" . $NoID . "_footer.php");
}
mysql_close($connection);
?>