Oué, j´veux bien ![]()
ben dici 3-4 jours ce sera bon
la je cree 6 dsigns possibles ( !) pour mon site grace au PHP/cookies. le temps de mettre a jour le nom de mes fichiers de tout faire... ce sera bon mercredi normalement
sinon tu preferes quel arriere plan rouge?
http://puissance2jeux.free.fr/red_background.gif
http://puissance2jeux.free.fr/red.jpg
et ca te dérange si je te mets dans les gars ayant particié a la creation de mon site notamment au PHP? bon aprem et @+++
Je préfère le deuxième, mais après ca dépend ce qu´il va y avoir par dessus ![]()
Sinon, j´ai pas participé à la création de ton site lol, je t´ai juste dis de remplacer un ´ par celui de ton clavier
![]()
arrête sans toi j´ aurais laisé tomber cette idée ce qui m´ aurait faire des mises à kjour cent fois plus chiantes et longues
ne sois pas modeste freedix
sinon je suis content en ayant passé 5h dessus j´ ai hyper progressé aujourd´ hui
me reste quasimment plu qu´ a savoir c comment les differentes zones de style dans un texte?
et même si j´ ai galéré j´ aurais mon design perso à moi ca ca n´ a pas de prix t´ en penses quoi??? c vraiment mieux qu´ un kit graphique
une merde se finit une autre arrive
pour mon design je veux que l´ utilisateur choisisse son design et qu´ il y en ait un par défaut. je pensais dans mon index faire
include(design.php)
liens vers design rouge, vert...
dans design.php
affecter des valeurs genre if ( $design==´bleu´)
$background=´blue_background´
elseif...
seulement par défaut le pc ne comprend pas les variables
et du coup comme la fiche design n´ est pas prise en compte le pc ne sait pas que $background=blue_background et donc ya pas d´ arriere plan, . ..
coment fair? j´ avais pensé a faire le $GET mais apparemment ca marche pas...
bon voici 2 fichiers design dis moi si tu ve le pb de ceux ci
< ?
if($DESIGN ==´standart´)
{
$bord_tableau_haut = ´#000000´;
$tableaux_externes = ´#000099´;
$background = ´blue_background.jpg´;
$fleche_liens = ´fleche_standart.gif´;
$fond_menus_cellules = ´BGC_bleu.jpg´;
$fond_cellules_centrales = ´fondcc_standart.jpg´;
$coinhg = ´coinhgstandart.gif´;
$coinhd = ´coinhdstandart.gif´;
$coinbd = ´coinbdstandart.gif´;
$coinbg = ´coinbgstandart.gif´;
$fleche = ´fleche.gif´;
$banniere= ´banniere.gif´;
}
elseif($DESIGN==´bleu´)
{
$bord_tableau_haut = ´#000099´;
$tableaux_externes = ´#000099´;
$background = ´blue_background.jpg´;
$fleche_liens = ´fleche_bleu.gif´;
$fond_menus_cellules = ´BGC_bleu.jpg´;
$fond_cellules_centrales = ´fondcc_bleu.jpg´;
$coinhg = ´coinhgbleu.gif´;
$coinhd = ´coinhdbleu.gif´;
$coinbd = ´coinbdbleu.gif´;
$coinbg = ´coinbgbleu.gif´;
$fleche = ´fleche.gif´;
$banniere= ´banniere.gif´;
}
elseif($DESIGN==´rouge´)
{
$bord_tableau_haut = ´#CC0000´;
$tableaux_externes = ´#CC0000´;
$background = ´red_background.jpg´;
$fleche_liens = ´fleche_rouge.gif´;
$fond_menus_cellules = ´BGC_rouge.jpg´;
$fond_cellules_centrales = ´fondcc_rouge.jpg´;
$coinhg = ´coinhgrouge.gif´;
$coinhd = ´coinhdrouge.gif´;
$coinbd = ´coinbdrouge.gif´;
$coinbg = ´coinbgrouge.gif´;
$fleche = ´fleche.gif´;
$banniere= ´banniere.gif´;
}
elseif($DESIGN==´vert´)
{
$bord_tableau_haut = ´#00CC00´;
$tableaux_externes = ´#00CC00´;
$background = ´green_background.jpg´;
$fleche_liens = ´fleche_vert.gif´;
$fond_menus_cellules = ´BGC_vert.jpg´;
$fond_cellules_centrales = ´fondcc_vert.jpg´;
$coinhg = ´coinhgvert.gif´;
$coinhd = ´coinhdvert.gif´;
$coinbd = ´coinbdvert.gif´;
$coinbg = ´coinbgvert.gif´;
$fleche = ´fleche.gif´;
$banniere= ´banniere.gif´;
}
elseif($DESIGN==´mauve´)
{
$bord_tableau_haut = ´#FFCCFF´;
$tableaux_externes = ´#FF99FF´;
$background = ´purple_background.jpg´;
$fleche_liens = ´fleche_mauve.gif´;
$fond_menus_cellules = ´BGC_mauve.jpg´;
$fond_cellules_centrales = ´fondcc_mauve.jpg´;
$coinhg = ´coinhgmauve.gif´;
$coinhd = ´coinhdmauve.gif´;
$coinbd = ´coinbdmauve.gif´;
$coinbg = ´coinbgmauve.gif´;
$fleche = ´fleche.gif´;
$banniere= ´banniere.gif´;
}
elseif($DESIGN==´gris´)
{
$bord_tableau_haut = ´#CCCCCC´;
$tableaux_externes = ´#CCCCCC´;
$background = ´gray_background.jpg´;
$fleche_liens = ´fleche_gris.gif´;
$fond_menus_cellules = ´BGC_gris.jpg´;
$fond_cellules_centrales = ´fondcc_gris.jpg´;
$coinhg = ´coinhggris.gif´;
$coinhd = ´coinhdgris.gif´;
$coinbd = ´coinbdgris.gif´;
$coinbg = ´coinbggris.gif´;
$fleche = ´fleche.gif´;
$banniere= ´banniere.gif´;
}
else
{
$bord_tableau_haut = ´#000000´;
$tableaux_externes = ´#000099´;
$background = ´blue_background.jpg´;
$fleche_liens = ´fleche_standart.gif´;
$fond_menus_cellules = ´BGC_bleu.jpg´;
$fond_cellules_centrales = ´fondcc_standart.jpg´;
$coinhg = ´coinhgstandart.gif´;
$coinhd = ´coinhdstandart.gif´;
$coinbd = ´coinbdstandart.gif´;
$coinbg = ´coinbgstandart.gif´;
$fleche = ´fleche.gif´;
$banniere= ´banniere.gif´;
}
/ /détermination de la feuille de style et du logo
if($DESIGN!=´´)
{
$css = ´css_´.$DESIGN;
$logo = ´logo_´.$DESIGN.´.gif´;
}
else
{
/ / la feuille de style et le logo par défaut
$css = ´css_default´;
$logo = ´logo_default.gif´;
}
? >
ET
< ?
$design = $_GET[´design´];
if ( file_exists($fichier))
{
if($DESIGN ==´standart´)
{
$bord_tableau_haut = ´#000000´;
$tableaux_externes = ´#000099´;
$background = ´blue_background.jpg´;
$fleche_liens = ´fleche_standart.gif´;
$fond_menus_cellules = ´BGC_bleu.jpg´;
$fond_cellules_centrales = ´fondcc_standart.jpg´;
$coinhg = ´coinhgstandart.gif´;
$coinhd = ´coinhdstandart.gif´;
$coinbd = ´coinbdstandart.gif´;
$coinbg = ´coinbgstandart.gif´;
$fleche = ´fleche.gif´;
$banniere= ´banniere.gif´;
}
elseif($DESIGN==´bleu´)
{
$bord_tableau_haut = ´#000099´;
$tableaux_externes = ´#000099´;
$background = ´blue_background.jpg´;
$fleche_liens = ´fleche_bleu.gif´;
$fond_menus_cellules = ´BGC_bleu.jpg´;
$fond_cellules_centrales = ´fondcc_bleu.jpg´;
$coinhg = ´coinhgbleu.gif´;
$coinhd = ´coinhdbleu.gif´;
$coinbd = ´coinbdbleu.gif´;
$coinbg = ´coinbgbleu.gif´;
$fleche = ´fleche.gif´;
$banniere= ´banniere.gif´;
}
elseif($DESIGN==´rouge´)
{
$bord_tableau_haut = ´#CC0000´;
$tableaux_externes = ´#CC0000´;
$background = ´red_background.jpg´;
$fleche_liens = ´fleche_rouge.gif´;
$fond_menus_cellules = ´BGC_rouge.jpg´;
$fond_cellules_centrales = ´fondcc_rouge.jpg´;
$coinhg = ´coinhgrouge.gif´;
$coinhd = ´coinhdrouge.gif´;
$coinbd = ´coinbdrouge.gif´;
$coinbg = ´coinbgrouge.gif´;
$fleche = ´fleche.gif´;
$banniere= ´banniere.gif´;
}
elseif($DESIGN==´vert´)
{
$bord_tableau_haut = ´#00CC00´;
$tableaux_externes = ´#00CC00´;
$background = ´green_background.jpg´;
$fleche_liens = ´fleche_vert.gif´;
$fond_menus_cellules = ´BGC_vert.jpg´;
$fond_cellules_centrales = ´fondcc_vert.jpg´;
$coinhg = ´coinhgvert.gif´;
$coinhd = ´coinhdvert.gif´;
$coinbd = ´coinbdvert.gif´;
$coinbg = ´coinbgvert.gif´;
$fleche = ´fleche.gif´;
$banniere= ´banniere.gif´;
}
elseif($DESIGN==´mauve´)
{
$bord_tableau_haut = ´#FFCCFF´;
$tableaux_externes = ´#FF99FF´;
$background = ´purple_background.jpg´;
$fleche_liens = ´fleche_mauve.gif´;
$fond_menus_cellules = ´BGC_mauve.jpg´;
$fond_cellules_centrales = ´fondcc_mauve.jpg´;
$coinhg = ´coinhgmauve.gif´;
$coinhd = ´coinhdmauve.gif´;
$coinbd = ´coinbdmauve.gif´;
$coinbg = ´coinbgmauve.gif´;
$fleche = ´fleche.gif´;
$banniere= ´banniere.gif´;
}
elseif($DESIGN==´gris´)
{
$bord_tableau_haut = ´#CCCCCC´;
$tableaux_externes = ´#CCCCCC´;
$background = ´gray_background.jpg´;
$fleche_liens = ´fleche_gris.gif´;
$fond_menus_cellules = ´BGC_gris.jpg´;
$fond_cellules_centrales = ´fondcc_gris.jpg´;
$coinhg = ´coinhggris.gif´;
$coinhd = ´coinhdgris.gif´;
$coinbd = ´coinbdgris.gif´;
$coinbg = ´coinbggris.gif´;
$fleche = ´fleche.gif´;
$banniere= ´banniere.gif´;
}
}
else
{
$bord_tableau_haut = ´#000000´;
$tableaux_externes = ´#000099´;
$background = ´blue_background.jpg´;
$fleche_liens = ´fleche_standart.gif´;
$fond_menus_cellules = ´BGC_bleu.jpg´;
$fond_cellules_centrales = ´fondcc_standart.jpg´;
$coinhg = ´coinhgstandart.gif´;
$coinhd = ´coinhdstandart.gif´;
$coinbd = ´coinbdstandart.gif´;
$coinbg = ´coinbgstandart.gif´;
$fleche = ´fleche.gif´;
$banniere= ´banniere.gif´;
}
/ /détermination de la feuille de style et du logo
if($DESIGN!=´´)
{
$css = ´css_´.$DESIGN;
$logo = ´logo_´.$DESIGN.´.gif´;
}
else
{
/ / la feuille de style et le logo par défaut
$css = ´css_default´;
$logo = ´logo_default.gif´;
}
? >
NOTA:
Je me suis inspiré enfin j´ ai adapté les codes de
http://www.phpdebutant.org/article48.php
je vais quand même essayer de me démerder mais bon
si tu comprend pas dis le moi le code de l´ index st sur le minisite
![]()
Bin, tu testes premièrement si la variable $design existe, avec la fonction isset()
Si elle n´existe pas, alors tu choisis le design par défaut, si elle existe, tu vérifies qu´elle a une des valeurs possible, puis ensuite, tu choisis le nouveau design.
Sinon, ça serait plus simple à gérer avec des fichier css, comme : vert.css, jaune.css, bleu.css, plutot que de définir des variables un peu incompréhensibles : )
Donc avec les fichiers css, si la variable n´existe pas, tu vas par exemple chercher le fichier bleu.css, sinon tu vérifies que la couleur est possible et tu vas chercher le fichier ayant comme nom la valeur de la variable $design.
OK mais comment faire avec le CSS pour que les colonnes d´ un tableau soient de couleur bleue si le design est bleu, rouge si le design est rouge, ou encore choisir la fleche coloree dans les liens adaptée au design? Enfin je vais essayer. a+++
Pour les tableau, tu parles de la bordure ? Si oui, c´est :
border-color: #xxxxxx
Si tu veux commencer avec le CSS, je te conseilles ces deux exellents sites : )
- http://www.openweb.eu.org
- http://www.selfhtml.com.fr
OK merci
Sinon j´ ai fait un essai en attendant ta réponse:
en quoi ce code est-il faux?
< ?
$lien = $_GET[´design´];
if ( !isset($design))
{
$bord_tableau_haut = ´#000000´;
$tableaux_externes = ´#000099´;
$background = ´blue_background.jpg´;
$fleche_liens = ´fleche_standart.gif´;
$fond_menus_cellules = ´BGC_bleu.jpg´;
$fond_cellules_centrales = ´fondcc_standart.jpg´;
$coinhg = ´coinhgstandart.gif´;
$coinhd = ´coinhdstandart.gif´;
$coinbd = ´coinbdstandart.gif´;
$coinbg = ´coinbgstandart.gif´;
$fleche = ´fleche.gif´;
$banniere= ´banniere.gif´;
}
if ( empty($design))
{
$design2=$design
switch ( $design2)
{
case " standart":
$bord_tableau_haut = ´#000000´;
$tableaux_externes = ´#000099´;
$background = ´blue_background.jpg´;
$fleche_liens = ´fleche_standart.gif´;
$fond_menus_cellules = ´BGC_bleu.jpg´;
$fond_cellules_centrales = ´fondcc_standart.jpg´;
$coinhg = ´coinhgstandart.gif´;
$coinhd = ´coinhdstandart.gif´;
$coinbd = ´coinbdstandart.gif´;
$coinbg = ´coinbgstandart.gif´;
$fleche = ´fleche.gif´;
$banniere= ´banniere.gif´;
break;
case " bleu":
$bord_tableau_haut = ´#000099´;
$tableaux_externes = ´#000099´;
$background = ´blue_background.jpg´;
$fleche_liens = ´fleche_bleu.gif´;
$fond_menus_cellules = ´BGC_bleu.jpg´;
$fond_cellules_centrales = ´fondcc_bleu.jpg´;
$coinhg = ´coinhgbleu.gif´;
$coinhd = ´coinhdbleu.gif´;
$coinbd = ´coinbdbleu.gif´;
$coinbg = ´coinbgbleu.gif´;
$fleche = ´fleche.gif´;
$banniere= ´banniere.gif´;
break;
case " rouge":
$bord_tableau_haut = ´#CC0000´;
$tableaux_externes = ´#CC0000´;
$background = ´red_background.jpg´;
$fleche_liens = ´fleche_rouge.gif´;
$fond_menus_cellules = ´BGC_rouge.jpg´;
$fond_cellules_centrales = ´fondcc_rouge.jpg´;
$coinhg = ´coinhgrouge.gif´;
$coinhd = ´coinhdrouge.gif´;
$coinbd = ´coinbdrouge.gif´;
$coinbg = ´coinbgrouge.gif´;
$fleche = ´fleche.gif´;
$banniere= ´banniere.gif´;
break;
case " vert":
$bord_tableau_haut = ´#00CC00´;
$tableaux_externes = ´#00CC00´;
$background = ´green_background.jpg´;
$fleche_liens = ´fleche_vert.gif´;
$fond_menus_cellules = ´BGC_vert.jpg´;
$fond_cellules_centrales = ´fondcc_vert.jpg´;
$coinhg = ´coinhgvert.gif´;
$coinhd = ´coinhdvert.gif´;
$coinbd = ´coinbdvert.gif´;
$coinbg = ´coinbgvert.gif´;
$fleche = ´fleche.gif´;
$banniere= ´banniere.gif´;
break;
case " mauve":
$bord_tableau_haut = ´#FFCCFF´;
$tableaux_externes = ´#FF99FF´;
$background = ´purple_background.jpg´;
$fleche_liens = ´fleche_mauve.gif´;
$fond_menus_cellules = ´BGC_mauve.jpg´;
$fond_cellules_centrales = ´fondcc_mauve.jpg´;
$coinhg = ´coinhgmauve.gif´;
$coinhd = ´coinhdmauve.gif´;
$coinbd = ´coinbdmauve.gif´;
$coinbg = ´coinbgmauve.gif´;
$fleche = ´fleche.gif´;
$banniere= ´banniere.gif´;
break;
case " gris":
$bord_tableau_haut = ´#CCCCCC´;
$tableaux_externes = ´#CCCCCC´;
$background = ´gray_background.jpg´;
$fleche_liens = ´fleche_gris.gif´;
$fond_menus_cellules = ´BGC_gris.jpg´;
$fond_cellules_centrales = ´fondcc_gris.jpg´;
$coinhg = ´coinhggris.gif´;
$coinhd = ´coinhdgris.gif´;
$coinbd = ´coinbdgris.gif´;
$coinbg = ´coinbggris.gif´;
$fleche = ´fleche.gif´;
$banniere= ´banniere.gif´;
break;
echo " case $design2";
}
? >
$lien = $_GET[´design´];
if ( ! isset($design))
Faudrait savoir, soit t´appelles ta variable lien auquel cas, tu utilises toujours $lien dans tes teste ou tu utilises $design comme variable ![]()
oui mais je vois pas le problème? AH si j´ ai mal note scuse. Sinon je reexplique bien le pb
SI le webnaute vient pour la premiere fois sur mon site:
$design=´´ donc if(´iesset($design)) agira créant
$background=backgroundstandart.jpg
et dans la page index $background sera remplacé par backgroundstandart.jpg
si le design chjoisi est rouge, $background=backgroundrouge.jpg, . .. . .. . ..
up
Si la variable $design n´est pas déclarée {
Attribution à la variable $background la valeur backgroundstandart;
}
Sinon {
Attribution à la variable $background la valeur de la variable $design;
}
Un truc de ce genre ![]()
Mais en fait, dans ton post, tu donnes pas vraiment de question, donc je sais pas quoi répondre ![]()
En gros
INDEX.PHP
< HTML>
< HEAD>
< ?
include ( "design.php")
? >
< /HEAD>
< BODY>
TEXTE
< A HREF="index.php?design=rouge>DESIGN ROUGE</A>
dans design.php
< ?
$design = $_GET[´design´];
if ( !isset($design))
{
$bord_tableau_haut = ´#000000´;
$tableaux_externes = ´#000099´;
$background = ´blue_background.jpg´;
$fleche_liens = ´fleche_standart.gif´;
$fond_menus_cellules = ´BGC_bleu.jpg´;
$fond_cellules_centrales = ´fondcc_standart.jpg´;
$coinhg = ´coinhgstandart.gif´;
$coinhd = ´coinhdstandart.gif´;
$coinbd = ´coinbdstandart.gif´;
$coinbg = ´coinbgstandart.gif´;
$fleche = ´fleche.gif´;
$banniere= ´banniere.gif´;
}
if ( empty($design))
{
$design2=$design
switch ( $design2)
{
case " standart":
$bord_tableau_haut = ´#000000´;
$tableaux_externes = ´#000099´;
$background = ´blue_background.jpg´;
$fleche_liens = ´fleche_standart.gif´;
$fond_menus_cellules = ´BGC_bleu.jpg´;
$fond_cellules_centrales = ´fondcc_standart.jpg´;
$coinhg = ´coinhgstandart.gif´;
$coinhd = ´coinhdstandart.gif´;
$coinbd = ´coinbdstandart.gif´;
$coinbg = ´coinbgstandart.gif´;
$fleche = ´fleche.gif´;
$banniere= ´banniere.gif´;
break;
case " bleu":
$bord_tableau_haut = ´#000099´;
$tableaux_externes = ´#000099´;
$background = ´blue_background.jpg´;
$fleche_liens = ´fleche_bleu.gif´;
$fond_menus_cellules = ´BGC_bleu.jpg´;
$fond_cellules_centrales = ´fondcc_bleu.jpg´;
$coinhg = ´coinhgbleu.gif´;
$coinhd = ´coinhdbleu.gif´;
$coinbd = ´coinbdbleu.gif´;
$coinbg = ´coinbgbleu.gif´;
$fleche = ´fleche.gif´;
$banniere= ´banniere.gif´;
break;
case " rouge":
$bord_tableau_haut = ´#CC0000´;
$tableaux_externes = ´#CC0000´;
$background = ´red_background.jpg´;
$fleche_liens = ´fleche_rouge.gif´;
$fond_menus_cellules = ´BGC_rouge.jpg´;
$fond_cellules_centrales = ´fondcc_rouge.jpg´;
$coinhg = ´coinhgrouge.gif´;
$coinhd = ´coinhdrouge.gif´;
$coinbd = ´coinbdrouge.gif´;
$coinbg = ´coinbgrouge.gif´;
$fleche = ´fleche.gif´;
$banniere= ´banniere.gif´;
break;
case " vert":
$bord_tableau_haut = ´#00CC00´;
$tableaux_externes = ´#00CC00´;
$background = ´green_background.jpg´;
$fleche_liens = ´fleche_vert.gif´;
$fond_menus_cellules = ´BGC_vert.jpg´;
$fond_cellules_centrales = ´fondcc_vert.jpg´;
$coinhg = ´coinhgvert.gif´;
$coinhd = ´coinhdvert.gif´;
$coinbd = ´coinbdvert.gif´;
$coinbg = ´coinbgvert.gif´;
$fleche = ´fleche.gif´;
$banniere= ´banniere.gif´;
break;
case " mauve":
$bord_tableau_haut = ´#FFCCFF´;
$tableaux_externes = ´#FF99FF´;
$background = ´purple_background.jpg´;
$fleche_liens = ´fleche_mauve.gif´;
$fond_menus_cellules = ´BGC_mauve.jpg´;
$fond_cellules_centrales = ´fondcc_mauve.jpg´;
$coinhg = ´coinhgmauve.gif´;
$coinhd = ´coinhdmauve.gif´;
$coinbd = ´coinbdmauve.gif´;
$coinbg = ´coinbgmauve.gif´;
$fleche = ´fleche.gif´;
$banniere= ´banniere.gif´;
break;
case " gris":
$bord_tableau_haut = ´#CCCCCC´;
$tableaux_externes = ´#CCCCCC´;
$background = ´gray_background.jpg´;
$fleche_liens = ´fleche_gris.gif´;
$fond_menus_cellules = ´BGC_gris.jpg´;
$fond_cellules_centrales = ´fondcc_gris.jpg´;
$coinhg = ´coinhggris.gif´;
$coinhd = ´coinhdgris.gif´;
$coinbd = ´coinbdgris.gif´;
$coinbg = ´coinbggris.gif´;
$fleche = ´fleche.gif´;
$banniere= ´banniere.gif´;
break;
echo " case $design2";
}
/ /détermination de la feuille de style et du logo
if($DESIGN!=´´)
{
$css = ´css_´.$DESIGN;
$logo = ´logo_´.$DESIGN.´.gif´;
}
else
{
/ / la feuille de style et le logo par défaut
$css = ´css_default´;
$logo = ´logo_default.gif´;
}
? >
mais g mlieux: comment recuperer une variables d´ un cookie?
$HTTP_COOKIE_VARS[´cookie´]
Ou :
$_COOKIE[´cookie´]
Bien sur tu remplaces " cookie " par le nom du cookie que tu veux récupérer ![]()
euh et sans te saouler avec mes questions mais en quoi ce genre de code est mauvais?
if(isset($variable))
switch ( $variable)
{case 01:
$blabla=´blabla1´;
break;
. ..
case 10:
$blabla=´blabla10´;
break;
}
echo " $blabla
? >
moi il me dit qu´ il manque la valeur $end
$HTTP_COOKIE_VARS[´cookie´]
Ou :
$_COOKIE[´cookie´]
OK merci et mlettons je fais
$HTTP_COOKIE_VARS[´design´]???
ou si mon cookie s´ apelle jeuxfun fo faire ça?
$HTTP_DESIGN_VARS[´design´]