From: gburri Date: Sun, 28 Sep 2008 21:11:14 +0000 (+0000) Subject: MOD déplacement des fichiers php dans le dossier PHP (sauf index.php) X-Git-Tag: cl7~20 X-Git-Url: http://git.euphorik.ch/?p=cl7.git;a=commitdiff_plain;h=27f3004da65f2b5803709b3fa76a791c9b38a0c9 MOD déplacement des fichiers php dans le dossier PHP (sauf index.php) git-svn-id: svn://localhost/cl7/trunk@3 4c3d3983-c6fa-4c6c-9935-18c3bbef1bf0 --- diff --git a/class_galerie_photos.php b/class_galerie_photos.php deleted file mode 100644 index 64c3df4..0000000 --- a/class_galerie_photos.php +++ /dev/null @@ -1,205 +0,0 @@ -repertoire_galerie.'/'.$this->section_courante.'/'; } - - #constructeur - function Galerie($rep='.') - { - $this->repertoire_galerie = $rep; - - #ouvre le repertoire de la galerie - $rep_galerie = dir($this->repertoire_galerie); - #pour chaque repertoire (section) - while ($section = $rep_galerie->read()) - { - if ($section != '..' and $section != '.') - { - if (is_null($this->section_courante)) $this->section_courante = $section; - - #ouvre le repertoire des images de la section en cours - $rep_section = dir($this->repertoire_galerie.'/'.$section); - - #essais d'inclure le fichier d'info - if (!@include($this->repertoire_galerie.'/'.$section.'/'.NOM_FICHIER_INFO)) - {$auteur = 'auteur inconnu'; $date = 'date inconnue';} - - #enregistre les infos - $this->sections[$section]['infos']['auteur'] = $auteur; - $this->sections[$section]['infos']['date'] = $date; - - #pour chaque images - while ($photo = $rep_section->read()) - { - if (ereg('('.SUFFIXE_VIGNETTE.'|'.SUFFIXE_PHOTO_REDUITE.').*', $photo)) continue; - if (ereg('.*\.[jJ][pP][gG]', $photo)) #si l'extension est .jpg alors mémorise l'image - $this->sections[$section]['images'][] = $photo; - } - $rep_section->close(); - } - } - $rep_galerie->close(); - - foreach($this->sections as $nom_section => $null) - sort($this->sections[$nom_section]['images']); - } - - #affiche la liste des pages - function liste_pages() - { - for($i=1; $i<=ceil(count($this->sections[$this->section_courante]['images'])/NOMBRE_VIGNETTE_PAR_PAGE); $i++) - echo ($i==1?'':' | ') ,($i==$_GET['__page_section']?'':''),'',$i,'',($i==$_GET['__page_section']?'':''); - } - - #affiche les vignettes de la section courante - function afficher_vignettes($page) - { - $num_image = 0; - - echo ''; - echo ''; - echo ''; - echo '
',$this->section_courante,'
Pages : ',$this->liste_pages(),'
Auteur : ', $this->get_auteur(), ' - Date : ', $this->get_date(), '
'; - - #pour chaque image de la section courante - echo '
'; - foreach ($this->sections[$this->section_courante]['images'] as $image) - { - $num_image++; - - if ($num_image <= $page*NOMBRE_VIGNETTE_PAR_PAGE-NOMBRE_VIGNETTE_PAR_PAGE or $num_image > $page*NOMBRE_VIGNETTE_PAR_PAGE) - continue; - - $vignette = $this->repertoire_courant().SUFFIXE_VIGNETTE.$image; - image_redim ($this->repertoire_courant().$image, TAILLE_VIGNETTE, $vignette, 60, 1); - - if (($num_image - $page*NOMBRE_VIGNETTE_PAR_PAGE-1) % NOMBRE_COLONNE == 0) echo ''; - echo ''; - } - echo '
- - ', $vignette ,' -
'; - } - - #pour afficher une seule photo - function afficher_photo($photo) - { - $photo_reduite = $this->repertoire_courant().SUFFIXE_PHOTO_REDUITE.$photo; - $pas_redim = false; - if (!image_redim ($this->repertoire_courant().$photo, TAILLE_PHOTO_REDUITE, $photo_reduite, 70, 1)) - $pas_redim = true; - - $lien_retour = NOM_FICHIER.'?'.arguments_page().'__section='.$this->section_courante.'&__page_section='.$this->num_page_photo($photo).'&__page_galerie=section'; - - if ($photo_suivant = $this->photo_suivante($photo)) - $lien_suivant = NOM_FICHIER.'?'.arguments_page().'__section='.$this->section_courante.'&__photo='.$photo_suivant.'&__page_galerie=photo'; - - if ($photo_precedante = $this->photo_precedante($photo)) - $lien_precedant = NOM_FICHIER.'?'.arguments_page().'__section='.$this->section_courante.'&__photo='.$photo_precedante.'&__page_galerie=photo'; - - - echo ''; - - #la barre de navigation : suivant / précédant - $nav = ''. - ''. - ''; - - echo $nav; - echo ''; - echo ''; - echo $nav; - echo '
'.(isset($lien_precedant)?'Photo précédente':'').'Retour'.(isset($lien_suivant)?'Photo suivante':'').'
'.($pas_redim ? '' : '0').''. ($pas_redim ? $photo : $photo_reduite) .''.($pas_redim ?'':'').'
',$photo,'
'; - } - - #renvois le numéros de la page ou se trouve une photo - function num_page_photo($photo) - { - $num_image = 0; - foreach($this->sections[$this->section_courante]['images'] as $nom_image) - { - $num_image++; - if ($photo == $nom_image) return ceil($num_image/NOMBRE_VIGNETTE_PAR_PAGE); - } - return 1; - } - - #renvois la photo suivant, si elle n'existe pas alors renvois 0 - function photo_suivante($photo) - { - $num_photo = array_search($photo, $this->sections[$this->section_courante]['images']); - if (isset($this->sections[$this->section_courante]['images'][$num_photo+1])) - return $this->sections[$this->section_courante]['images'][$num_photo+1]; - else - return 0; - } - - #renvois la photo precedante, si elle n'existe pas alors renvois 0 - function photo_precedante($photo) - { - $num_photo = array_search($photo, $this->sections[$this->section_courante]['images']); - if (isset($this->sections[$this->section_courante]['images'][$num_photo-1])) - return $this->sections[$this->section_courante]['images'][$num_photo-1]; - else - return 0; - } - - #renvois un tableau des sections - function sections() - { - $sections = array(); - foreach ($this->sections as $nom_section => $section) - array_push($sections, $nom_section); - - return $sections; - } - - function set_section_courante($section) - { - $this->section_courante = $section; - } - - #renvois l'auteur d'une section - function get_auteur($section=null) - { - if (is_null($section)) $section = $this->section_courante; - return $this->sections[$section]['infos']['auteur']; - } - - #renvois la date de la section - function get_date($section=null) - { - if (is_null($section)) $section = $this->section_courante; - return $this->sections[$section]['infos']['date']; - } -} -?> \ No newline at end of file diff --git a/class_participant.php b/class_participant.php deleted file mode 100644 index d5f9c71..0000000 --- a/class_participant.php +++ /dev/null @@ -1,80 +0,0 @@ - ce n'est pas un participant valide - if ($v1 == NULL && $v2 == NULL) - { - $this->valide = 0; - return; - } - - if (is_string($v1) && is_string($v2)) # Aucun des arguments n'est vide alors c'est le pseudo et le password qui ont été transmis - $res = mysql_query("SELECT * FROM participants WHERE pseudo = '" . addslashes($v1) . "' AND password = '" . addslashes($v2) . "'"); - else # Sinon c'est l'id - $res = mysql_query("SELECT * FROM participants WHERE id = " . addslashes($v1)); - - if (mysql_num_rows($res) == 0) - { - $this->valide = FALSE; - } - else - { - $this->info = mysql_fetch_object($res); - $this->valide = TRUE; - } - } - - /** - * Renvoie le nombre de votes restant pour le participant. - */ - function nb_vote_restant() - { - $nombre_de_vote = mysql_fetch_array(mysql_query(" - SELECT COUNT(*) FROM participants RIGHT JOIN jeux_choisis ON participants.id = jeux_choisis.participant_id - WHERE participants.id = " . $this->info->id . " - GROUP BY participants.id - ")); - - return Participant::$NB_VOTES_PAR_PARTICIPANT - $nombre_de_vote[0]; - } - - /** - * Renvois TRUE si le nombre de participant max est atteint. - */ - static function nombre_participant_max_atteint() - { - global $NB_MAX_PARTICIPANT; - $res_SQL = mysql_query("SELECT COUNT(*) FROM participants"); - $nb_participant = mysql_fetch_row($res_SQL); - - return $nb_participant[0] >= $NB_MAX_PARTICIPANT; - } - - /** - * Renvois le nombre de places restantes. - */ - static function nombre_place_restante() - { - global $NB_MAX_PARTICIPANT; - $res_SQL = mysql_query("SELECT COUNT(*) FROM participants"); - $nb_participant = mysql_fetch_row($res_SQL); - - return $NB_MAX_PARTICIPANT - $nb_participant[0]; - } -} - -?> \ No newline at end of file diff --git a/config.php b/config.php deleted file mode 100644 index ffc342a..0000000 --- a/config.php +++ /dev/null @@ -1,26 +0,0 @@ - diff --git a/connexion.php b/connexion.php deleted file mode 100644 index 6b5e26c..0000000 --- a/connexion.php +++ /dev/null @@ -1,39 +0,0 @@ -valide) - { - setcookie ("COOKIE_INFO_PATICIPANT", $le_participant->info->id, time() + 31104000); - } -} -else if (isset($HTTP_COOKIE_VARS["COOKIE_INFO_PATICIPANT"])) # le cookie existe deja chez le participant -{ - $le_participant = new Participant($HTTP_COOKIE_VARS["COOKIE_INFO_PATICIPANT"]); -} -else -{ - $le_participant = new Participant(); -} - -?> \ No newline at end of file diff --git a/controller.php b/controller.php deleted file mode 100644 index ff47132..0000000 --- a/controller.php +++ /dev/null @@ -1,101 +0,0 @@ -= 3 && - $_POST['nom'] != "" && - $_POST['prenom'] != "" && - $_POST['e_mail'] != ""; -} - -# insciption d'un nouveau participant -if (isset($_POST['inscription']) && !Participant::nombre_participant_max_atteint()) -{ - # vérification des données - if ( - donnees_inscription_valides() && - $_POST['accord'] == "on" - ) - { - mysql_query("BEGIN TRANSACTION"); - mysql_query(" - INSERT INTO participants - (pseudo, password, clan_nom, clan_tag, nom, prenom, age, e_mail, remarques) - VALUES ( - '".addslashes($_POST['pseudo'])."', - '".addslashes($_POST['pass1'])."', - '".addslashes($_POST['clan_nom'])."', - '".addslashes($_POST['clan_tag'])."', - '".addslashes($_POST['nom'])."', - '".addslashes($_POST['prenom'])."', - '".addslashes($_POST['age'])."', - '".addslashes($_POST['e_mail'])."', - '".addslashes($_POST['remarques'])."' - )" - ); - mysql_query("COMMIT"); - } - - $le_participant = new participant($_POST['pseudo'], $_POST['pass1']); - setcookie("COOKIE_INFO_PATICIPANT", $le_participant->info->id, time() + 31104000); -} -# un participant modifie ses infos -else if(isset($_POST['modification_participant']) && $le_participant->valide) -{ - if (donnees_inscription_valides()) - { - mysql_query("BEGIN TRANSACTION"); - mysql_query("UPDATE participants SET pseudo = '".addslashes($_POST['pseudo'])."' WHERE id = " . $le_participant->info->id); - mysql_query("UPDATE participants SET password = '".addslashes($_POST['pass1'])."' WHERE id = " . $le_participant->info->id); - mysql_query("UPDATE participants SET clan_nom = '".addslashes($_POST['clan_nom'])."' WHERE id = " . $le_participant->info->id); - mysql_query("UPDATE participants SET clan_tag = '".addslashes($_POST['clan_tag'])."' WHERE id = " . $le_participant->info->id); - mysql_query("UPDATE participants SET nom = '".addslashes($_POST['nom'])."' WHERE id = " . $le_participant->info->id); - mysql_query("UPDATE participants SET prenom = '".addslashes($_POST['prenom'])."' WHERE id = " . $le_participant->info->id); - mysql_query("UPDATE participants SET age = '".addslashes($_POST['age'])."' WHERE id = " . $le_participant->info->id); - mysql_query("UPDATE participants SET e_mail = '".addslashes($_POST['e_mail'])."' WHERE id = " . $le_participant->info->id); - mysql_query("UPDATE participants SET remarques = '".addslashes($_POST['remarques'])."' WHERE id = " . $le_participant->info->id); - mysql_query("COMMIT"); - } -} -# vote pour des jeux -else if (isset($_POST['set_jeux_joues']) && $le_participant->valide) -{ - $votes = $_POST['votes']; - if (!$votes) - $votes = array(); - - mysql_query("BEGIN TRANSACTION"); - - # l'utilisateur peut proposer le nom d'un jeu qui ne se trouve pas dans la liste - $jeu = trim($_POST['jeu']); - if ($jeu !== '') - { - mysql_query("INSERT INTO jeux (nom) VALUES ('".addslashes($jeu)."')"); - $id = mysql_insert_id(); - if ($id != 0) # si le jeu se trouve déjà dans la liste alors $id == 0 - array_unshift($votes, $id); - } - - # suppression des anciens votes (remplacement par les nouveaux) - mysql_query("DELETE FROM jeux_choisis WHERE participant_id = " . $le_participant->info->id); - - # traite les trois premiers votes - for ($i = 0; $i < count($votes) && $i < $NB_VOTES_JEUX ; $i++) - { - mysql_query("INSERT INTO jeux_choisis (participant_id, jeu_id) VALUES (".$le_participant->info->id.", ".(int)$votes[$i].")"); - } - - mysql_query("COMMIT"); -} -?> diff --git a/fonc_images.php b/fonc_images.php deleted file mode 100644 index f001223..0000000 --- a/fonc_images.php +++ /dev/null @@ -1,169 +0,0 @@ - -* 0 : si l'image de sortie existe deja alors ne fait rien (renvois 1) -* 1 : si l'image de sortie existe deha et qu'elle a la meme taille alors ne fait rien -* 2 : crée de toutes manières l'image de sortie ----------------------------------------------------*/ -function image_redim ($image_chemin, $dim, $nouveau_chemin, $qualite = 60, $force_rewrite_redim=0) -{ - $image = ImageCreateFromJpeg($image_chemin); - - $hauteur = imageSY($image); - $largeur = imageSX($image); - - if ($hauteur >= $largeur && $hauteur > $dim) - $rapport = $dim/$hauteur; - else if($largeur > $hauteur && $largeur > $dim) - $rapport = $dim/$largeur; - else return 0; - - $new_hauteur = round($hauteur * $rapport); - $new_largeur = round($largeur * $rapport); - - #si le fichier ne doit pas etre recree si il existe deja - if ($force_rewrite_redim==0) - { - #si le fichier existe deja alors ne fait rien - if (file_exists($nouveau_chemin)) return 1; - } - else if ($force_rewrite_redim==1) - { - if (file_exists($nouveau_chemin)) - { - $image_existe = ImageCreateFromJpeg($nouveau_chemin); - if (imageSY($image_existe) == $new_hauteur && imageSX($image_existe) == $new_largeur) return 1; - } - } - - - - ##gd 2.0 : - $image_redim = imagecreatetruecolor($new_largeur, $new_hauteur); #l'apercu de l'image (plus petite) - imagecopyresampled($image_redim, $image, 0, 0, 0, 0, $new_largeur, $new_hauteur, $largeur, $hauteur); - ## - - - imagejpeg($image_redim, $nouveau_chemin, $qualite); #ecrit l'apercu sur le disque - - return 1; - -} - -/*-------------------------------------------------- -auteur : pifou -date : 25.01.2003 - -Renvois le lien html vers l'image redimensionnée ou l'image -'no_image.jpg' ----------------------------------------------------*/ -function image_lien_html($card) -{ - global $glob; - $settings = $glob->get('settings'); - $link = $glob->get('link'); - - #si le fichier image n'existe pas - if (!file_exists($link->path().'DivXDB/images/image_tmp/'.$card->id.'.jpg')) - { - $fichier_image = fopen($link->path().'DivXDB/images/image_tmp/'.$card->id.'.jpg', 'wb'); - if ($card->image!='') fwrite($fichier_image, $card->image); - fclose($fichier_image); - } - else #sinon essais de le lire - { - #test la validité de l'image (il faudrait trouver une autre manière plus élégante) - if(!@getimagesize($link->path().'DivXDB/images/image_tmp/'.$card->id.'.jpg')) - { - #si l'image n'est pas valide (en tant que jpeg) alors l'efface de la BD - mysql_query("update movie set image = '' where id = ".$card->id, $glob->get('_the_db_')); - unlink($link->path().'DivXDB/images/image_tmp/'.$card->id.'.jpg'); - } - } - - $skin_no_image = false; - $current_skin_path = $link->path().DIR_SKINS.'/'.$settings->get('current_skin'); - #si le film n'a pas d'image' - if ($card->image=='') - { - #si le skin à une image 'no_image.jpg' - if (file_exists($current_skin_path .'/no_image.jpg')) - { - $image_path = $current_skin_path .'/no_image.jpg'; - $skin_no_image = true; - } - else - $image_path = $link->path().'DivXDB/images/no_image.jpg'; - } - else #le film a une image - $image_path = $link->path().'DivXDB/images/image_tmp/'.$card->id.'.jpg'; - - #si la library GD n'est pas installée - if ($settings->get('gd_library')=='0') - { - - $size = getimagesize($image_path); - $largeur = $size[0]; - $hauteur = $size[1]; - - if ($hauteur >= $largeur && $hauteur > $settings->get('size_image')) - $rapport = $settings->get('size_image')/$hauteur; - else if($largeur > $hauteur && $largeur > $settings->get('size_image')) - $rapport = $settings->get('size_image')/$largeur; - else $rapport = 1; - - $new_hauteur = round($hauteur * $rapport); - $new_largeur = round($largeur * $rapport); - - #si le film n'a pas d'image - if ($card->image=='') - { - #$no_image = $settings - $image = ''.$card->title.''; - } - else $image = ''.$card->title.''; - } - else - { - if ($skin_no_image) #si le film n'a pas d'image et que le skin a une 'no_image.jpg' - { - if (image_redim__($image_path, $settings->get('size_image'), $current_skin_path .'/'.SMALL_IMAGE_SUFIX.'no_image.jpg', 60, 1)==0) - $image = ''.$card->title.''; - else - $image = ''.$card->title.''; - } - elseif($card->image=='') - { - if (image_redim__($image_path, $settings->get('size_image'), $link->path().'DivXDB/images/image_tmp/'.SMALL_IMAGE_SUFIX.'no_image.jpg', 60, 1)==0) - $image = ''.$card->title.''; - else - $image = ''.$card->title.''; - } - else - { - if(image_redim__($link->path().'DivXDB/images/image_tmp/'.$card->id.'.jpg', $settings->get('size_image'), $link->path().'DivXDB/images/image_tmp/'.SMALL_IMAGE_SUFIX.$card->id.'.jpg', 60, 1)==0) - $image = ''.$card->title.''; - else - $image = ''.$card->title.''; - - } - } - return $image; -} -?> diff --git a/index.php b/index.php index 9e1c878..6d614a3 100644 --- a/index.php +++ b/index.php @@ -9,10 +9,10 @@ $MASK_RESEAU = '255.255.255.0'; if($titre[1] && (ip2long($REMOTE_ADDR) & ip2long($MASK_RESEAU)) != (ip2long($IP_SERVEUR) & ip2long($MASK_RESEAU))) */ -include_once("config.php"); -include_once("class_participant.php"); -include_once("connexion.php"); -include_once("controller.php"); +include_once("php/config.php"); +include_once("php/class_participant.php"); +include_once("php/connexion.php"); +include_once("php/controller.php"); $MENU = array( 'acceuil' => 'Accueil', @@ -73,42 +73,42 @@ echo ''; ?>
-
+
valide) echo 'Nous sommes désolés, il n\'y a plus de places libres'; else - include("tx_inscription.php"); + include("php/tx_inscription.php"); break; case 'inscrits' : - include("tx_inscrits.php"); + include("php/tx_inscrits.php"); break; case 'tournoi' : - include("tx_tournoi.php"); + include("php/tx_tournoi.php"); break; case 'intranet' : - include("tx_intranet.php"); + include("php/tx_intranet.php"); break; case 'bienvenue' : - include("tx_bienvenue.php"); + include("php/tx_bienvenue.php"); break; case 'contacts' : - include("tx_contacts.php"); + include("php/tx_contacts.php"); break; case 'photos' : - include("tx_photos.php"); + include("php/tx_photos.php"); break; case 'pizzas': - include("pizzas.php"); + include("php/pizzas.php"); break; default : echo 'erreur, page introuvable'; diff --git a/menu_droit.php b/menu_droit.php deleted file mode 100644 index 32800c9..0000000 --- a/menu_droit.php +++ /dev/null @@ -1,58 +0,0 @@ -', mysql_num_rows($res_SQL), ' inscrit', (mysql_num_rows($res_SQL) > 1 ? 's' : ''), '
'; - -# affichage des participants -if (mysql_num_rows($res_SQL) > 0) - echo ''; -?> - - -valide) -{ - echo' -
-

-

-
'; -} -else -{ - if (isset($log)) echo '[erreur de loggation]'; - - echo' -
-

login / pass

-

-

-

-

-
- '; -} -?> diff --git a/participants.php b/participants.php deleted file mode 100644 index 995752b..0000000 --- a/participants.php +++ /dev/null @@ -1,56 +0,0 @@ - - -Toutes les infos des participants de la corcelles-lan - - -

Toutes les infos des participants de la corcelles-lan

- -Pseudo -Clan -Prénom + nom -age -E-mail -N°ICQ -Souhaite participer au tournoi War3 ? -Souhaite participer au tournoi Ra3 ? -Remarque -A payé ? - -'; - -while($participant = mysql_fetch_object($requ)) -{ - echo '', - '',$participant->pseudo,'', - '',($participant->clan_nom==''?'':'('.$participant->clan_tag.')'.$participant->clan_nom),'', - '',$participant->prenom, ' ', $participant->nom,'', - '',$participant->age,'', - '',$participant->e_mail,'', - '',$participant->icq,'', - '',ON($participant->tournoi_war3_1),'', - '',ON($participant->tournoi_ra3_1),'', - '',$participant->remarque,'', - '',ON($participant->a_paye),'', - ''; -} -echo ''; - -?> - - diff --git a/php/class_galerie_photos.php b/php/class_galerie_photos.php new file mode 100644 index 0000000..64c3df4 --- /dev/null +++ b/php/class_galerie_photos.php @@ -0,0 +1,205 @@ +repertoire_galerie.'/'.$this->section_courante.'/'; } + + #constructeur + function Galerie($rep='.') + { + $this->repertoire_galerie = $rep; + + #ouvre le repertoire de la galerie + $rep_galerie = dir($this->repertoire_galerie); + #pour chaque repertoire (section) + while ($section = $rep_galerie->read()) + { + if ($section != '..' and $section != '.') + { + if (is_null($this->section_courante)) $this->section_courante = $section; + + #ouvre le repertoire des images de la section en cours + $rep_section = dir($this->repertoire_galerie.'/'.$section); + + #essais d'inclure le fichier d'info + if (!@include($this->repertoire_galerie.'/'.$section.'/'.NOM_FICHIER_INFO)) + {$auteur = 'auteur inconnu'; $date = 'date inconnue';} + + #enregistre les infos + $this->sections[$section]['infos']['auteur'] = $auteur; + $this->sections[$section]['infos']['date'] = $date; + + #pour chaque images + while ($photo = $rep_section->read()) + { + if (ereg('('.SUFFIXE_VIGNETTE.'|'.SUFFIXE_PHOTO_REDUITE.').*', $photo)) continue; + if (ereg('.*\.[jJ][pP][gG]', $photo)) #si l'extension est .jpg alors mémorise l'image + $this->sections[$section]['images'][] = $photo; + } + $rep_section->close(); + } + } + $rep_galerie->close(); + + foreach($this->sections as $nom_section => $null) + sort($this->sections[$nom_section]['images']); + } + + #affiche la liste des pages + function liste_pages() + { + for($i=1; $i<=ceil(count($this->sections[$this->section_courante]['images'])/NOMBRE_VIGNETTE_PAR_PAGE); $i++) + echo ($i==1?'':' | ') ,($i==$_GET['__page_section']?'':''),'',$i,'',($i==$_GET['__page_section']?'':''); + } + + #affiche les vignettes de la section courante + function afficher_vignettes($page) + { + $num_image = 0; + + echo ''; + echo ''; + echo ''; + echo '
',$this->section_courante,'
Pages : ',$this->liste_pages(),'
Auteur : ', $this->get_auteur(), ' - Date : ', $this->get_date(), '
'; + + #pour chaque image de la section courante + echo '
'; + foreach ($this->sections[$this->section_courante]['images'] as $image) + { + $num_image++; + + if ($num_image <= $page*NOMBRE_VIGNETTE_PAR_PAGE-NOMBRE_VIGNETTE_PAR_PAGE or $num_image > $page*NOMBRE_VIGNETTE_PAR_PAGE) + continue; + + $vignette = $this->repertoire_courant().SUFFIXE_VIGNETTE.$image; + image_redim ($this->repertoire_courant().$image, TAILLE_VIGNETTE, $vignette, 60, 1); + + if (($num_image - $page*NOMBRE_VIGNETTE_PAR_PAGE-1) % NOMBRE_COLONNE == 0) echo ''; + echo ''; + } + echo '
+ + ', $vignette ,' +
'; + } + + #pour afficher une seule photo + function afficher_photo($photo) + { + $photo_reduite = $this->repertoire_courant().SUFFIXE_PHOTO_REDUITE.$photo; + $pas_redim = false; + if (!image_redim ($this->repertoire_courant().$photo, TAILLE_PHOTO_REDUITE, $photo_reduite, 70, 1)) + $pas_redim = true; + + $lien_retour = NOM_FICHIER.'?'.arguments_page().'__section='.$this->section_courante.'&__page_section='.$this->num_page_photo($photo).'&__page_galerie=section'; + + if ($photo_suivant = $this->photo_suivante($photo)) + $lien_suivant = NOM_FICHIER.'?'.arguments_page().'__section='.$this->section_courante.'&__photo='.$photo_suivant.'&__page_galerie=photo'; + + if ($photo_precedante = $this->photo_precedante($photo)) + $lien_precedant = NOM_FICHIER.'?'.arguments_page().'__section='.$this->section_courante.'&__photo='.$photo_precedante.'&__page_galerie=photo'; + + + echo ''; + + #la barre de navigation : suivant / précédant + $nav = ''. + ''. + ''; + + echo $nav; + echo ''; + echo ''; + echo $nav; + echo '
'.(isset($lien_precedant)?'Photo précédente':'').'Retour'.(isset($lien_suivant)?'Photo suivante':'').'
'.($pas_redim ? '' : '0').''. ($pas_redim ? $photo : $photo_reduite) .''.($pas_redim ?'':'').'
',$photo,'
'; + } + + #renvois le numéros de la page ou se trouve une photo + function num_page_photo($photo) + { + $num_image = 0; + foreach($this->sections[$this->section_courante]['images'] as $nom_image) + { + $num_image++; + if ($photo == $nom_image) return ceil($num_image/NOMBRE_VIGNETTE_PAR_PAGE); + } + return 1; + } + + #renvois la photo suivant, si elle n'existe pas alors renvois 0 + function photo_suivante($photo) + { + $num_photo = array_search($photo, $this->sections[$this->section_courante]['images']); + if (isset($this->sections[$this->section_courante]['images'][$num_photo+1])) + return $this->sections[$this->section_courante]['images'][$num_photo+1]; + else + return 0; + } + + #renvois la photo precedante, si elle n'existe pas alors renvois 0 + function photo_precedante($photo) + { + $num_photo = array_search($photo, $this->sections[$this->section_courante]['images']); + if (isset($this->sections[$this->section_courante]['images'][$num_photo-1])) + return $this->sections[$this->section_courante]['images'][$num_photo-1]; + else + return 0; + } + + #renvois un tableau des sections + function sections() + { + $sections = array(); + foreach ($this->sections as $nom_section => $section) + array_push($sections, $nom_section); + + return $sections; + } + + function set_section_courante($section) + { + $this->section_courante = $section; + } + + #renvois l'auteur d'une section + function get_auteur($section=null) + { + if (is_null($section)) $section = $this->section_courante; + return $this->sections[$section]['infos']['auteur']; + } + + #renvois la date de la section + function get_date($section=null) + { + if (is_null($section)) $section = $this->section_courante; + return $this->sections[$section]['infos']['date']; + } +} +?> \ No newline at end of file diff --git a/php/class_participant.php b/php/class_participant.php new file mode 100644 index 0000000..d5f9c71 --- /dev/null +++ b/php/class_participant.php @@ -0,0 +1,80 @@ + ce n'est pas un participant valide + if ($v1 == NULL && $v2 == NULL) + { + $this->valide = 0; + return; + } + + if (is_string($v1) && is_string($v2)) # Aucun des arguments n'est vide alors c'est le pseudo et le password qui ont été transmis + $res = mysql_query("SELECT * FROM participants WHERE pseudo = '" . addslashes($v1) . "' AND password = '" . addslashes($v2) . "'"); + else # Sinon c'est l'id + $res = mysql_query("SELECT * FROM participants WHERE id = " . addslashes($v1)); + + if (mysql_num_rows($res) == 0) + { + $this->valide = FALSE; + } + else + { + $this->info = mysql_fetch_object($res); + $this->valide = TRUE; + } + } + + /** + * Renvoie le nombre de votes restant pour le participant. + */ + function nb_vote_restant() + { + $nombre_de_vote = mysql_fetch_array(mysql_query(" + SELECT COUNT(*) FROM participants RIGHT JOIN jeux_choisis ON participants.id = jeux_choisis.participant_id + WHERE participants.id = " . $this->info->id . " + GROUP BY participants.id + ")); + + return Participant::$NB_VOTES_PAR_PARTICIPANT - $nombre_de_vote[0]; + } + + /** + * Renvois TRUE si le nombre de participant max est atteint. + */ + static function nombre_participant_max_atteint() + { + global $NB_MAX_PARTICIPANT; + $res_SQL = mysql_query("SELECT COUNT(*) FROM participants"); + $nb_participant = mysql_fetch_row($res_SQL); + + return $nb_participant[0] >= $NB_MAX_PARTICIPANT; + } + + /** + * Renvois le nombre de places restantes. + */ + static function nombre_place_restante() + { + global $NB_MAX_PARTICIPANT; + $res_SQL = mysql_query("SELECT COUNT(*) FROM participants"); + $nb_participant = mysql_fetch_row($res_SQL); + + return $NB_MAX_PARTICIPANT - $nb_participant[0]; + } +} + +?> \ No newline at end of file diff --git a/php/config.php b/php/config.php new file mode 100644 index 0000000..ffc342a --- /dev/null +++ b/php/config.php @@ -0,0 +1,26 @@ + diff --git a/php/connexion.php b/php/connexion.php new file mode 100644 index 0000000..6b5e26c --- /dev/null +++ b/php/connexion.php @@ -0,0 +1,39 @@ +valide) + { + setcookie ("COOKIE_INFO_PATICIPANT", $le_participant->info->id, time() + 31104000); + } +} +else if (isset($HTTP_COOKIE_VARS["COOKIE_INFO_PATICIPANT"])) # le cookie existe deja chez le participant +{ + $le_participant = new Participant($HTTP_COOKIE_VARS["COOKIE_INFO_PATICIPANT"]); +} +else +{ + $le_participant = new Participant(); +} + +?> \ No newline at end of file diff --git a/php/controller.php b/php/controller.php new file mode 100644 index 0000000..ff47132 --- /dev/null +++ b/php/controller.php @@ -0,0 +1,101 @@ += 3 && + $_POST['nom'] != "" && + $_POST['prenom'] != "" && + $_POST['e_mail'] != ""; +} + +# insciption d'un nouveau participant +if (isset($_POST['inscription']) && !Participant::nombre_participant_max_atteint()) +{ + # vérification des données + if ( + donnees_inscription_valides() && + $_POST['accord'] == "on" + ) + { + mysql_query("BEGIN TRANSACTION"); + mysql_query(" + INSERT INTO participants + (pseudo, password, clan_nom, clan_tag, nom, prenom, age, e_mail, remarques) + VALUES ( + '".addslashes($_POST['pseudo'])."', + '".addslashes($_POST['pass1'])."', + '".addslashes($_POST['clan_nom'])."', + '".addslashes($_POST['clan_tag'])."', + '".addslashes($_POST['nom'])."', + '".addslashes($_POST['prenom'])."', + '".addslashes($_POST['age'])."', + '".addslashes($_POST['e_mail'])."', + '".addslashes($_POST['remarques'])."' + )" + ); + mysql_query("COMMIT"); + } + + $le_participant = new participant($_POST['pseudo'], $_POST['pass1']); + setcookie("COOKIE_INFO_PATICIPANT", $le_participant->info->id, time() + 31104000); +} +# un participant modifie ses infos +else if(isset($_POST['modification_participant']) && $le_participant->valide) +{ + if (donnees_inscription_valides()) + { + mysql_query("BEGIN TRANSACTION"); + mysql_query("UPDATE participants SET pseudo = '".addslashes($_POST['pseudo'])."' WHERE id = " . $le_participant->info->id); + mysql_query("UPDATE participants SET password = '".addslashes($_POST['pass1'])."' WHERE id = " . $le_participant->info->id); + mysql_query("UPDATE participants SET clan_nom = '".addslashes($_POST['clan_nom'])."' WHERE id = " . $le_participant->info->id); + mysql_query("UPDATE participants SET clan_tag = '".addslashes($_POST['clan_tag'])."' WHERE id = " . $le_participant->info->id); + mysql_query("UPDATE participants SET nom = '".addslashes($_POST['nom'])."' WHERE id = " . $le_participant->info->id); + mysql_query("UPDATE participants SET prenom = '".addslashes($_POST['prenom'])."' WHERE id = " . $le_participant->info->id); + mysql_query("UPDATE participants SET age = '".addslashes($_POST['age'])."' WHERE id = " . $le_participant->info->id); + mysql_query("UPDATE participants SET e_mail = '".addslashes($_POST['e_mail'])."' WHERE id = " . $le_participant->info->id); + mysql_query("UPDATE participants SET remarques = '".addslashes($_POST['remarques'])."' WHERE id = " . $le_participant->info->id); + mysql_query("COMMIT"); + } +} +# vote pour des jeux +else if (isset($_POST['set_jeux_joues']) && $le_participant->valide) +{ + $votes = $_POST['votes']; + if (!$votes) + $votes = array(); + + mysql_query("BEGIN TRANSACTION"); + + # l'utilisateur peut proposer le nom d'un jeu qui ne se trouve pas dans la liste + $jeu = trim($_POST['jeu']); + if ($jeu !== '') + { + mysql_query("INSERT INTO jeux (nom) VALUES ('".addslashes($jeu)."')"); + $id = mysql_insert_id(); + if ($id != 0) # si le jeu se trouve déjà dans la liste alors $id == 0 + array_unshift($votes, $id); + } + + # suppression des anciens votes (remplacement par les nouveaux) + mysql_query("DELETE FROM jeux_choisis WHERE participant_id = " . $le_participant->info->id); + + # traite les trois premiers votes + for ($i = 0; $i < count($votes) && $i < $NB_VOTES_JEUX ; $i++) + { + mysql_query("INSERT INTO jeux_choisis (participant_id, jeu_id) VALUES (".$le_participant->info->id.", ".(int)$votes[$i].")"); + } + + mysql_query("COMMIT"); +} +?> diff --git a/php/fonc_images.php b/php/fonc_images.php new file mode 100644 index 0000000..f001223 --- /dev/null +++ b/php/fonc_images.php @@ -0,0 +1,169 @@ + +* 0 : si l'image de sortie existe deja alors ne fait rien (renvois 1) +* 1 : si l'image de sortie existe deha et qu'elle a la meme taille alors ne fait rien +* 2 : crée de toutes manières l'image de sortie +---------------------------------------------------*/ +function image_redim ($image_chemin, $dim, $nouveau_chemin, $qualite = 60, $force_rewrite_redim=0) +{ + $image = ImageCreateFromJpeg($image_chemin); + + $hauteur = imageSY($image); + $largeur = imageSX($image); + + if ($hauteur >= $largeur && $hauteur > $dim) + $rapport = $dim/$hauteur; + else if($largeur > $hauteur && $largeur > $dim) + $rapport = $dim/$largeur; + else return 0; + + $new_hauteur = round($hauteur * $rapport); + $new_largeur = round($largeur * $rapport); + + #si le fichier ne doit pas etre recree si il existe deja + if ($force_rewrite_redim==0) + { + #si le fichier existe deja alors ne fait rien + if (file_exists($nouveau_chemin)) return 1; + } + else if ($force_rewrite_redim==1) + { + if (file_exists($nouveau_chemin)) + { + $image_existe = ImageCreateFromJpeg($nouveau_chemin); + if (imageSY($image_existe) == $new_hauteur && imageSX($image_existe) == $new_largeur) return 1; + } + } + + + + ##gd 2.0 : + $image_redim = imagecreatetruecolor($new_largeur, $new_hauteur); #l'apercu de l'image (plus petite) + imagecopyresampled($image_redim, $image, 0, 0, 0, 0, $new_largeur, $new_hauteur, $largeur, $hauteur); + ## + + + imagejpeg($image_redim, $nouveau_chemin, $qualite); #ecrit l'apercu sur le disque + + return 1; + +} + +/*-------------------------------------------------- +auteur : pifou +date : 25.01.2003 + +Renvois le lien html vers l'image redimensionnée ou l'image +'no_image.jpg' +---------------------------------------------------*/ +function image_lien_html($card) +{ + global $glob; + $settings = $glob->get('settings'); + $link = $glob->get('link'); + + #si le fichier image n'existe pas + if (!file_exists($link->path().'DivXDB/images/image_tmp/'.$card->id.'.jpg')) + { + $fichier_image = fopen($link->path().'DivXDB/images/image_tmp/'.$card->id.'.jpg', 'wb'); + if ($card->image!='') fwrite($fichier_image, $card->image); + fclose($fichier_image); + } + else #sinon essais de le lire + { + #test la validité de l'image (il faudrait trouver une autre manière plus élégante) + if(!@getimagesize($link->path().'DivXDB/images/image_tmp/'.$card->id.'.jpg')) + { + #si l'image n'est pas valide (en tant que jpeg) alors l'efface de la BD + mysql_query("update movie set image = '' where id = ".$card->id, $glob->get('_the_db_')); + unlink($link->path().'DivXDB/images/image_tmp/'.$card->id.'.jpg'); + } + } + + $skin_no_image = false; + $current_skin_path = $link->path().DIR_SKINS.'/'.$settings->get('current_skin'); + #si le film n'a pas d'image' + if ($card->image=='') + { + #si le skin à une image 'no_image.jpg' + if (file_exists($current_skin_path .'/no_image.jpg')) + { + $image_path = $current_skin_path .'/no_image.jpg'; + $skin_no_image = true; + } + else + $image_path = $link->path().'DivXDB/images/no_image.jpg'; + } + else #le film a une image + $image_path = $link->path().'DivXDB/images/image_tmp/'.$card->id.'.jpg'; + + #si la library GD n'est pas installée + if ($settings->get('gd_library')=='0') + { + + $size = getimagesize($image_path); + $largeur = $size[0]; + $hauteur = $size[1]; + + if ($hauteur >= $largeur && $hauteur > $settings->get('size_image')) + $rapport = $settings->get('size_image')/$hauteur; + else if($largeur > $hauteur && $largeur > $settings->get('size_image')) + $rapport = $settings->get('size_image')/$largeur; + else $rapport = 1; + + $new_hauteur = round($hauteur * $rapport); + $new_largeur = round($largeur * $rapport); + + #si le film n'a pas d'image + if ($card->image=='') + { + #$no_image = $settings + $image = ''.$card->title.''; + } + else $image = ''.$card->title.''; + } + else + { + if ($skin_no_image) #si le film n'a pas d'image et que le skin a une 'no_image.jpg' + { + if (image_redim__($image_path, $settings->get('size_image'), $current_skin_path .'/'.SMALL_IMAGE_SUFIX.'no_image.jpg', 60, 1)==0) + $image = ''.$card->title.''; + else + $image = ''.$card->title.''; + } + elseif($card->image=='') + { + if (image_redim__($image_path, $settings->get('size_image'), $link->path().'DivXDB/images/image_tmp/'.SMALL_IMAGE_SUFIX.'no_image.jpg', 60, 1)==0) + $image = ''.$card->title.''; + else + $image = ''.$card->title.''; + } + else + { + if(image_redim__($link->path().'DivXDB/images/image_tmp/'.$card->id.'.jpg', $settings->get('size_image'), $link->path().'DivXDB/images/image_tmp/'.SMALL_IMAGE_SUFIX.$card->id.'.jpg', 60, 1)==0) + $image = ''.$card->title.''; + else + $image = ''.$card->title.''; + + } + } + return $image; +} +?> diff --git a/php/menu_droit.php b/php/menu_droit.php new file mode 100644 index 0000000..32800c9 --- /dev/null +++ b/php/menu_droit.php @@ -0,0 +1,58 @@ +', mysql_num_rows($res_SQL), ' inscrit', (mysql_num_rows($res_SQL) > 1 ? 's' : ''), ''; + +# affichage des participants +if (mysql_num_rows($res_SQL) > 0) + echo ''; +?> + + +valide) +{ + echo' +
+

+

+
'; +} +else +{ + if (isset($log)) echo '[erreur de loggation]'; + + echo' +
+

login / pass

+

+

+

+

+
+ '; +} +?> diff --git a/php/participants.php b/php/participants.php new file mode 100644 index 0000000..995752b --- /dev/null +++ b/php/participants.php @@ -0,0 +1,56 @@ + + +Toutes les infos des participants de la corcelles-lan + + +

Toutes les infos des participants de la corcelles-lan

+ +Pseudo +Clan +Prénom + nom +age +E-mail +N°ICQ +Souhaite participer au tournoi War3 ? +Souhaite participer au tournoi Ra3 ? +Remarque +A payé ? + +'; + +while($participant = mysql_fetch_object($requ)) +{ + echo '', + '',$participant->pseudo,'', + '',($participant->clan_nom==''?'':'('.$participant->clan_tag.')'.$participant->clan_nom),'', + '',$participant->prenom, ' ', $participant->nom,'', + '',$participant->age,'', + '',$participant->e_mail,'', + '',$participant->icq,'', + '',ON($participant->tournoi_war3_1),'', + '',ON($participant->tournoi_ra3_1),'', + '',$participant->remarque,'', + '',ON($participant->a_paye),'', + ''; +} +echo ''; + +?> + + diff --git a/php/pizzas.php b/php/pizzas.php new file mode 100644 index 0000000..31aad2d --- /dev/null +++ b/php/pizzas.php @@ -0,0 +1,181 @@ +commande de pizza'; + + if ($PIZZA_PEUT_COMMANDER) + { + if ($le_participant->info->pizza != null) + echo '
Vous avez deja commandé une pizza ! mais vous pouvez encore changez votre choix:'; + + echo '
'; + echo ''; + echo ''; + echo ''; + while($pizza = mysql_fetch_object($requ)) + echo ''; + echo '
NomCompositionPrix
info->pizza==null?'checked':''), '>', ($le_participant->info->pizza==null?'':''), 'Aucune', ($le_participant->info->pizza==null?'':''), '
info->pizza==$pizza->id?'class="pizzaChoisie"':''),'>info->pizza==$pizza->id?'checked':''), '>

'; + } + else + if ($le_participant->info->pizza != null) + echo '

votre pizza ', pizza($le_participant->info->pizza), ' va bientot arriver'; + else + echo "

la commande de pizza est terminée, veuillez attendre la prochaine vague

"; +} + +// Affiche les statistique sur les pizza +function stats() +{ + $requ_pizza = mysql_query("select * from pizzas order by nom"); + $requ_participant = mysql_query("select * from participants"); + $nb = array(); + $nb_tot = 0; + $total = 0; + $nb_pizza = mysql_fetch_row(mysql_query("select count(*) from pizzas")); + + // Initialise le tableau de comptage + for ($i=0; $i < ($nb_pizza[0] + 3); $i++) // on fait un '+3' parce que on ne sais jamais trop ce qui pourrait se passer ;-)) + $nb[$i] = 0; + + // Rempli le tableau de nombre de pizzas + while ($participant = mysql_fetch_object($requ_participant)) + if ($participant->pizza != null) + $nb[$participant->pizza]++; + + echo '

total des commandes

'; + echo ''; + echo ''; + + while($pizza = mysql_fetch_object($requ_pizza)) + { + if ($nb[$pizza->id] == 0) + continue; + + echo ''; + $total += $nb[$pizza->id] * $pizza->prix; + $nb_tot += $nb[$pizza->id]; + } + echo '
NomNombrePrix unitairePrix total
' . $pizza->nom . '' . $nb[$pizza->id] . '' . $pizza->prix . '.-' . $nb[$pizza->id] * $pizza->prix . '.-
TOTAL', $nb_tot, '', $total, '.-
'; +} + +// Retourne le nom de la pizza en fonction de son ID +function pizza ($id) +{ + $requ = mysql_query("select * from pizzas where id = " . $id); + if ($pizza = mysql_fetch_object($requ)) + return $pizza->nom; + else + return 'Pizza inexistante !'; +} + + +// Affiche qui prends koi +function kiakoi() +{ + global $le_participant; + $requ = mysql_query("select * from participants order by nom"); + + + echo '

qui prend quoi

'; + echo ''; + echo ''; + + while ($participant = mysql_fetch_object($requ)) + { + if ($participant->pizza != null) + { + $pizza = mysql_fetch_object(mysql_query("select * from pizzas where id = " . $participant->pizza)); + echo ''; + } + else + echo ''; + } + echo '
PseudoNomPrixPaiement
', $participant->pseudo ,'', $pizza->nom, '', $pizza->prix, '.-', ($le_participant->info->admin?'':''), ($participant->pizza_paye?'payé':'non payé !'), ($le_participant->info->admin?'':'') ,'
', $participant->pseudo ,'--', '-
'; + +} + +function liens() +{ + global $le_participant; + + $res = ''; + if (!isset($_GET['stats'])) + $res .= '
voir les stats globaux'; + + // if ($le_participant->info->admin && !isset($kiakoi)) + // $res .= '
qui prend quoi'; + + if ($le_participant->info->admin) + $res .= '

remise a zero de toutes les commandes'; + + return $res; +} + + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + +echo '
'; +if ($le_participant->valide) // le participant est loggé +{ + // Si demande d'effacer les commande et que le gars est admin, le fait + if(isset($_GET['reset']) && $le_participant->info->admin) + { + mysql_query("update participants set pizza = null, pizza_paye = 0"); + $le_participant->info->pizza = -1; //mettre a jour le participants courant pour la beaute de l'affichage + } + + if(isset($_GET['paye']) && $le_participant->info->admin) + { + /////// methode d'inversion + // $gars = mysql_fetch_object(mysql_query("select * from participants where id = " . $paye)); + // mysql_query("update participants set pizza_paye = " . (1 - $gars->pizza_paye) . " where id = " . $paye); + /////// + + /////// methode d'un unique changement : non-paye -> paye + mysql_query("update participants set pizza_paye = 1 where id = " . $_GET['paye']); + /////// + } + + + if (!isset($_GET['stats']) && !isset($_GET['kiakoi'])) + { + if (isset($_POST['piz_choisie'])) // la pizza a ete choisie + { + if ($piz_choisie != -1) // La pizza est validei + { + echo 'une '. pizza($_POST['piz_choisie']) . ' commandée !
'; + $pizza_id = $_POST['piz_choisie']; + } + else + { + echo 'Aucune pizza commandée !'; // la pizza est '-1' donc pas de pizza commandée + $pizza_id = "NULL"; + } + mysql_query("update participants set pizza = " . $pizza_id . " where id = " . $le_participant->info->id); + } + else + selection_pizzas(); + } + + if (isset($_GET['stats'])) + { + kiakoi(); + echo '
'; + stats(); + } + + echo liens(); +} +else // le participant n'est pas loggé +{ + echo 'Vous devez vous loggé pour commander une pizza'; +} +echo '
'; +?> diff --git a/php/smiles.php b/php/smiles.php new file mode 100644 index 0000000..bd95a36 --- /dev/null +++ b/php/smiles.php @@ -0,0 +1,113 @@ +-(("] = "argn.gif"; +$smiles[">(("] = "argn.gif"; + +$smiles[">-("] = "pascontent.gif"; +$smiles[">("] = "pascontent.gif"; + +$smiles[":-(("] = "triste.gif"; +$smiles[":(("] = "triste.gif"; + +$smiles[":-("] = "sniff.gif"; +$smiles[":("] = "sniff.gif"; + +$smiles["8-)"] = "cool.gif"; +$smiles["8)"] = "cool.gif"; + +$smiles[":chat:"] = "chat.gif"; + +/*-------------------------------------------------- +auteur : pifou +date : 21.02.2002 + +affichage de tous les smiles dans un tableau +---------------------------------------------------*/ +function afficher_smiles ($smiles, $ajout=0) +{ + $nb_colonne = 3; #nombre de colonne que l'on souuhaite au tableau + + $fichier_avant = ""; #pour connaitre quel était le fichier precedement rencontré + + $nb_cellule = 0; #le nombre de cellule + $cellule_tmp =""; #pour la construction d'une cellule + + #parcours tous les smiles + foreach ($smiles as $smile => $fichier) + { + #si le fichier n'est pas le même qu'avant (passage à une autre figure) + if ($fichier != $fichier_avant) + { + $nb_cellule++; + if ($nb_cellule != 1) #si ce n'est pas la première iteration + { + $cellules[] = $cellule_tmp; #ajoute la celulle au tableau de cellules + $cellule_tmp=""; #remet à zero la celulle temporaire + } + if ($ajout) $cellule_tmp .= ''; + + $cellule_tmp .= ''; + + if ($ajout) $cellule_tmp .= ''; + } + + $cellule_tmp .= ' '. $smile; + $fichier_avant = $fichier; + } + $cellules[] = $cellule_tmp; + + #affiche le tableau + echo ''; + #pour chaque cellule + foreach($cellules as $num => $cellule) + { + if ($num % $nb_colonne == 0) echo ""; + echo ''; + if ($num % $nb_colonne == $nb_colonne-1) echo ""; + } + echo '
'; + echo $cellule; + echo '
'; + +} + +?> \ No newline at end of file diff --git a/php/traitement_pre_affichage.php b/php/traitement_pre_affichage.php new file mode 100644 index 0000000..85c56d4 --- /dev/null +++ b/php/traitement_pre_affichage.php @@ -0,0 +1,122 @@ + +---------------------------------------------------*/ +function traitement_pre_affichage($texte, $nb_max_long = 20) +{ + $texte = htmlentities($texte, ENT_QUOTES, "UTF-8"); + + #insère un espace au milieu d'un mot de longueur $nb_max_long + $texte = ereg_replace("([[:graph:]]{".$nb_max_long."})([[:graph:]]{".$nb_max_long."})", "\\1
\\2", $texte); + + #ajoute les smiles et les
, enlève les balises + $texte = couleur(smile(nl2br($texte))); + + + #souligné + $texte = str_replace("[u]", "", $texte); + $texte = str_replace("[/u]", "", $texte); + + #gras + $texte = str_replace("[b]", "", $texte); + $texte = str_replace("[/b]", "", $texte); + + #italique + $texte = str_replace("[i]", "", $texte); + $texte = str_replace("[/i]", "", $texte); + + #####plus valable##### + #gras + $texte = str_replace("[g]", "", $texte); + $texte = str_replace("[/g]", "", $texte); + ###################### + + if ($texte == "") + return " - "; + return $texte; +} + +/*-------------------------------------------------- +auteur : pifou +date : 19.02.2002 + +remplace les :), :-) etc... par des images de smiles +---------------------------------------------------*/ +function smile($texte) +{ + global $smiles; + + foreach ($smiles as $smile => $fichier) + $texte = str_replace($smile, '', $texte); + + return $texte; + +} + +/*-------------------------------------------------- +auteur : pifou +date : 2.04.2002 + +remplace les balise {1} {/1} par des balise html +font et met l'attribut couleur en fonction du numeros +--------------------------------------------------*/ +function couleur($texte) +{ + $les_couleurs[0] = 'black'; + $les_couleurs[1] = 'red'; + $les_couleurs[2] = 'green'; + $les_couleurs[3] = 'yellow'; + $les_couleurs[4] = 'blue'; + $les_couleurs[5] = 'aqua'; + $les_couleurs[6] = 'fuchsia'; + $les_couleurs[7] = 'white'; + #$les_couleurs[8] = 'black'; + #$les_couleurs[9] = 'black'; + + foreach ($les_couleurs as $num => $couleur) + { + #$texte = ereg_replace("\{" . $num . "\}([[:print:]]+)\{/" . $num . "\}", "\\1", $texte); + $texte = str_replace("{" . $num . "}", "", $texte); + $texte = str_replace("{/" . $num . "}", "", $texte); + } + + return $texte; +} + +?> diff --git a/php/tx_bienvenue.php b/php/tx_bienvenue.php new file mode 100644 index 0000000..53f8929 --- /dev/null +++ b/php/tx_bienvenue.php @@ -0,0 +1 @@ +Toute l'équipe de la Corcelles-LAN vous souhaite la bienvenue !! diff --git a/php/tx_contacts.php b/php/tx_contacts.php new file mode 100644 index 0000000..3727607 --- /dev/null +++ b/php/tx_contacts.php @@ -0,0 +1,12 @@ + + +

Organisateur

+ +

Hébergeur et Webmaster

+ \ No newline at end of file diff --git a/php/tx_informations.php b/php/tx_informations.php new file mode 100644 index 0000000..f850a42 --- /dev/null +++ b/php/tx_informations.php @@ -0,0 +1,57 @@ + + +

Une puissante LAN aura lieu du vendredi 21 Novembre au Lundi 24 Novembre à Corcelles [NE]

+ +

Heures

+ + +

Points forts

+ + +

Matos

+ + +

Prix

+ + +

Lieu

+ + +

Bouffe, boissons & drogues

+ + +

Intranet

+ + +

Divers

+ diff --git a/php/tx_inscription.php b/php/tx_inscription.php new file mode 100644 index 0000000..742e153 --- /dev/null +++ b/php/tx_inscription.php @@ -0,0 +1,137 @@ +valide) + echo '

Modification de mes infos

'; +else + echo'

Les personnes inscrites s\'engagent à être présentes à la LAN et à payer la somme convenue.

+

Elles peuvent se désinscrirent en cas d\'empèchements majeurs.

'; +?> + +
+valide) + echo '

'; + else + echo '

'; +?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + valide) + echo' + + + + '; + ?> +
+ pseudo (login) + + valide?('value="'.$le_participant->info->pseudo.'"'):''); ?> /> +
+ password (pour pouvoir par la suite modifier mes infos) + + valide?('value="'.$le_participant->info->password.'"'):''); ?> /> + re: valide?('value="'.$le_participant->info->password.'"'):''); ?> /> +
+ clan name + + valide?('value="'.$le_participant->info->clan_nom.'"'):''); ?> /> + +
+ clan tag + + valide?('value="'.$le_participant->info->clan_tag.'"'):''); ?> /> +
+ nom + + valide?('value="'.$le_participant->info->nom.'"'):''); ?> /> +
+ prénom + + valide?('value="'.$le_participant->info->prenom.'"'):''); ?> /> +
+ age + + valide?('value="'.$le_participant->info->age.'"'):''); ?> /> +
+ email (non-public) + + valide?('value="'.$le_participant->info->e_mail.'"'):''); ?> /> +
+ présence + + valide ? $le_participant->info->id : "0")." + "); + while($periode = mysql_fetch_object($res)) + { + echo '

valide || $periode->participant_id ? 'checked="checked"' : '').' id="periode'.$periode->id.'" type="checkbox" />

'; + } + ?> +
+ remarques + + +
+ j\'ai bien lu et suis d\'accord avec le préambule + + +
+

+
diff --git a/php/tx_inscrits.php b/php/tx_inscrits.php new file mode 100644 index 0000000..89ff6a0 --- /dev/null +++ b/php/tx_inscrits.php @@ -0,0 +1,36 @@ + + + pseudo + nom + prénom + age + remarques + '; + +$clan_courant = null; + +while($participant = mysql_fetch_object($res)) +{ + if ($clan_courant !== $participant->clan_nom) + { + echo ($participant->clan_nom != '' ? '

'.traitement_pre_affichage($participant->clan_nom).'

' : ''), $debut_table; + $clan_courant = $participant->clan_nom; + } + + echo ''; + echo '', htmlentities($participant->clan_tag, ENT_QUOTES, "UTF-8"), traitement_pre_affichage($participant->pseudo), ''; + echo '', traitement_pre_affichage($participant->nom), ''; + echo '', traitement_pre_affichage($participant->prenom), ''; + echo '', traitement_pre_affichage($participant->age), ''; + echo '', traitement_pre_affichage($participant->remarques), ''; + echo ''; +} +echo ''; +?> diff --git a/php/tx_intranet.php b/php/tx_intranet.php new file mode 100644 index 0000000..8746475 --- /dev/null +++ b/php/tx_intranet.php @@ -0,0 +1,21 @@ + +
>>Le serveur ftp !!DivX - Mp3 - Progz!! <<
+
>>Le serveur de Faty !!Mp3 - Videos!! <<
+
>>Kiki ftp !!Manga - Roms Nes/Snes!! <<
+
>>Le0 ftp !!Tout!! <<
+
  • CLIENT FTP BIEN
  • + +
    >> Stats CS <<
    + +
    PATCHS
    + +
    MODS
    + + diff --git a/php/tx_jeux_joues.php b/php/tx_jeux_joues.php new file mode 100644 index 0000000..304c34b --- /dev/null +++ b/php/tx_jeux_joues.php @@ -0,0 +1,57 @@ +valide) +{ + echo '

    Remarque : Il faut être inscrit pour pouvoir voter.

    '; +} + + +echo ' +
    +

    + + ', ($le_participant->valide ? '' : ''), ''; + +$jeux_query = mysql_query(" + SELECT jeux.id, jeux.nom, jeux_choisis.participant_id, COUNT(*) + IF(participant_id is not null, 1, 0) - 1 AS nb_vote + FROM jeux LEFT JOIN jeux_choisis ON jeux.id = jeux_choisis.jeu_id + GROUP BY jeux.id + ORDER BY nb_vote DESC, nom +"); + +while ($jeu = mysql_fetch_object($jeux_query)) +{ + # est-ce que le participant courant à voté pour ce jeu ? + if ($le_participant->valide) + { + $a_vote = mysql_fetch_row(mysql_query(" + SELECT COUNT(*) FROM jeux_choisis + WHERE participant_id = ".$le_participant->info->id." AND jeu_id = ".$jeu->id + )); $a_vote = $a_vote[0]; + } + else + $a_vote = FALSE; + + echo '', + $le_participant->valide ? '' : '', + '', + ''; +} + +echo ' +
    VotesJeux
    ' . $jeu->nb_vote . '' . traitement_pre_affichage($jeu->nom) . '
    '; + +if ($le_participant->valide) + echo ' +

    Autre :

    +

    '; + +echo '
    '; + +# affichage du nombre de vote restant +if ($le_participant->valide) + echo '

    Nombre de votes restant : ' . $le_participant->nb_vote_restant() . '

    '; + +?> \ No newline at end of file diff --git a/php/tx_photos.php b/php/tx_photos.php new file mode 100644 index 0000000..939e7ad --- /dev/null +++ b/php/tx_photos.php @@ -0,0 +1,41 @@ +sections() as $section) + echo '
    ', $section,'
    Auteur : ',$ma_galerie->get_auteur($section),'
    Date : ',$ma_galerie->get_date($section),'

    '; + break; + + case 'section' : + $ma_galerie->set_section_courante($_GET['__section']); + $ma_galerie->afficher_vignettes($_GET['__page_section']); + break; + + case 'photo' : + $ma_galerie->set_section_courante($_GET['__section']); + $ma_galerie->afficher_photo($_GET['__photo']); + break; +} + +?> \ No newline at end of file diff --git a/php/update_db.php b/php/update_db.php new file mode 100644 index 0000000..5ff5904 --- /dev/null +++ b/php/update_db.php @@ -0,0 +1,117 @@ + 2 + if ($version == 1) + { + mysql_query("BEGIN TRANSACTION"); + mysql_query(" + CREATE TABLE IF NOT EXISTS periodes ( + id mediumint(3) unsigned NOT NULL auto_increment, + nom varchar(200) NOT NULL, + PRIMARY KEY (id) + ) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED; + "); + mysql_query("INSERT INTO periodes (nom) VALUES ('Vendredi soir à samedi')"); + mysql_query("INSERT INTO periodes (nom) VALUES ('Samedi à dimanche')"); + mysql_query("INSERT INTO periodes (nom) VALUES ('Dimanche à lundi')"); + mysql_query(" + CREATE TABLE IF NOT EXISTS participations ( + participant_id mediumint(3) unsigned NOT NULL, + periode_id mediumint(3) unsigned NOT NULL, + PRIMARY KEY USING BTREE (participant_id, periode_id), + KEY FK_periode (periode_id), + CONSTRAINT FK_participant_participations FOREIGN KEY (participant_id) REFERENCES participants (id) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT FK_periode_participations FOREIGN KEY (periode_id) REFERENCES periodes (id) ON DELETE CASCADE ON UPDATE CASCADE + ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC; + "); + mysql_query("UPDATE config SET valeur = '2' WHERE nom = 'version')"); + mysql_query("COMMIT"); + } +} + +update_db(); + +?> diff --git a/pizzas.php b/pizzas.php deleted file mode 100644 index 31aad2d..0000000 --- a/pizzas.php +++ /dev/null @@ -1,181 +0,0 @@ -commande de pizza'; - - if ($PIZZA_PEUT_COMMANDER) - { - if ($le_participant->info->pizza != null) - echo '
    Vous avez deja commandé une pizza ! mais vous pouvez encore changez votre choix:'; - - echo '
    '; - echo ''; - echo ''; - echo ''; - while($pizza = mysql_fetch_object($requ)) - echo ''; - echo '
    NomCompositionPrix
    info->pizza==null?'checked':''), '>', ($le_participant->info->pizza==null?'':''), 'Aucune', ($le_participant->info->pizza==null?'':''), '
    info->pizza==$pizza->id?'class="pizzaChoisie"':''),'>info->pizza==$pizza->id?'checked':''), '>

    '; - } - else - if ($le_participant->info->pizza != null) - echo '

    votre pizza ', pizza($le_participant->info->pizza), ' va bientot arriver'; - else - echo "

    la commande de pizza est terminée, veuillez attendre la prochaine vague

    "; -} - -// Affiche les statistique sur les pizza -function stats() -{ - $requ_pizza = mysql_query("select * from pizzas order by nom"); - $requ_participant = mysql_query("select * from participants"); - $nb = array(); - $nb_tot = 0; - $total = 0; - $nb_pizza = mysql_fetch_row(mysql_query("select count(*) from pizzas")); - - // Initialise le tableau de comptage - for ($i=0; $i < ($nb_pizza[0] + 3); $i++) // on fait un '+3' parce que on ne sais jamais trop ce qui pourrait se passer ;-)) - $nb[$i] = 0; - - // Rempli le tableau de nombre de pizzas - while ($participant = mysql_fetch_object($requ_participant)) - if ($participant->pizza != null) - $nb[$participant->pizza]++; - - echo '

    total des commandes

    '; - echo ''; - echo ''; - - while($pizza = mysql_fetch_object($requ_pizza)) - { - if ($nb[$pizza->id] == 0) - continue; - - echo ''; - $total += $nb[$pizza->id] * $pizza->prix; - $nb_tot += $nb[$pizza->id]; - } - echo '
    NomNombrePrix unitairePrix total
    ' . $pizza->nom . '' . $nb[$pizza->id] . '' . $pizza->prix . '.-' . $nb[$pizza->id] * $pizza->prix . '.-
    TOTAL', $nb_tot, '', $total, '.-
    '; -} - -// Retourne le nom de la pizza en fonction de son ID -function pizza ($id) -{ - $requ = mysql_query("select * from pizzas where id = " . $id); - if ($pizza = mysql_fetch_object($requ)) - return $pizza->nom; - else - return 'Pizza inexistante !'; -} - - -// Affiche qui prends koi -function kiakoi() -{ - global $le_participant; - $requ = mysql_query("select * from participants order by nom"); - - - echo '

    qui prend quoi

    '; - echo ''; - echo ''; - - while ($participant = mysql_fetch_object($requ)) - { - if ($participant->pizza != null) - { - $pizza = mysql_fetch_object(mysql_query("select * from pizzas where id = " . $participant->pizza)); - echo ''; - } - else - echo ''; - } - echo '
    PseudoNomPrixPaiement
    ', $participant->pseudo ,'', $pizza->nom, '', $pizza->prix, '.-', ($le_participant->info->admin?'':''), ($participant->pizza_paye?'payé':'non payé !'), ($le_participant->info->admin?'':'') ,'
    ', $participant->pseudo ,'--', '-
    '; - -} - -function liens() -{ - global $le_participant; - - $res = ''; - if (!isset($_GET['stats'])) - $res .= '
    voir les stats globaux'; - - // if ($le_participant->info->admin && !isset($kiakoi)) - // $res .= '
    qui prend quoi'; - - if ($le_participant->info->admin) - $res .= '

    remise a zero de toutes les commandes'; - - return $res; -} - - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - - -echo '
    '; -if ($le_participant->valide) // le participant est loggé -{ - // Si demande d'effacer les commande et que le gars est admin, le fait - if(isset($_GET['reset']) && $le_participant->info->admin) - { - mysql_query("update participants set pizza = null, pizza_paye = 0"); - $le_participant->info->pizza = -1; //mettre a jour le participants courant pour la beaute de l'affichage - } - - if(isset($_GET['paye']) && $le_participant->info->admin) - { - /////// methode d'inversion - // $gars = mysql_fetch_object(mysql_query("select * from participants where id = " . $paye)); - // mysql_query("update participants set pizza_paye = " . (1 - $gars->pizza_paye) . " where id = " . $paye); - /////// - - /////// methode d'un unique changement : non-paye -> paye - mysql_query("update participants set pizza_paye = 1 where id = " . $_GET['paye']); - /////// - } - - - if (!isset($_GET['stats']) && !isset($_GET['kiakoi'])) - { - if (isset($_POST['piz_choisie'])) // la pizza a ete choisie - { - if ($piz_choisie != -1) // La pizza est validei - { - echo 'une '. pizza($_POST['piz_choisie']) . ' commandée !
    '; - $pizza_id = $_POST['piz_choisie']; - } - else - { - echo 'Aucune pizza commandée !'; // la pizza est '-1' donc pas de pizza commandée - $pizza_id = "NULL"; - } - mysql_query("update participants set pizza = " . $pizza_id . " where id = " . $le_participant->info->id); - } - else - selection_pizzas(); - } - - if (isset($_GET['stats'])) - { - kiakoi(); - echo '
    '; - stats(); - } - - echo liens(); -} -else // le participant n'est pas loggé -{ - echo 'Vous devez vous loggé pour commander une pizza'; -} -echo '
    '; -?> diff --git a/smiles.php b/smiles.php deleted file mode 100644 index bd95a36..0000000 --- a/smiles.php +++ /dev/null @@ -1,113 +0,0 @@ --(("] = "argn.gif"; -$smiles[">(("] = "argn.gif"; - -$smiles[">-("] = "pascontent.gif"; -$smiles[">("] = "pascontent.gif"; - -$smiles[":-(("] = "triste.gif"; -$smiles[":(("] = "triste.gif"; - -$smiles[":-("] = "sniff.gif"; -$smiles[":("] = "sniff.gif"; - -$smiles["8-)"] = "cool.gif"; -$smiles["8)"] = "cool.gif"; - -$smiles[":chat:"] = "chat.gif"; - -/*-------------------------------------------------- -auteur : pifou -date : 21.02.2002 - -affichage de tous les smiles dans un tableau ----------------------------------------------------*/ -function afficher_smiles ($smiles, $ajout=0) -{ - $nb_colonne = 3; #nombre de colonne que l'on souuhaite au tableau - - $fichier_avant = ""; #pour connaitre quel était le fichier precedement rencontré - - $nb_cellule = 0; #le nombre de cellule - $cellule_tmp =""; #pour la construction d'une cellule - - #parcours tous les smiles - foreach ($smiles as $smile => $fichier) - { - #si le fichier n'est pas le même qu'avant (passage à une autre figure) - if ($fichier != $fichier_avant) - { - $nb_cellule++; - if ($nb_cellule != 1) #si ce n'est pas la première iteration - { - $cellules[] = $cellule_tmp; #ajoute la celulle au tableau de cellules - $cellule_tmp=""; #remet à zero la celulle temporaire - } - if ($ajout) $cellule_tmp .= ''; - - $cellule_tmp .= ''; - - if ($ajout) $cellule_tmp .= ''; - } - - $cellule_tmp .= ' '. $smile; - $fichier_avant = $fichier; - } - $cellules[] = $cellule_tmp; - - #affiche le tableau - echo ''; - #pour chaque cellule - foreach($cellules as $num => $cellule) - { - if ($num % $nb_colonne == 0) echo ""; - echo ''; - if ($num % $nb_colonne == $nb_colonne-1) echo ""; - } - echo '
    '; - echo $cellule; - echo '
    '; - -} - -?> \ No newline at end of file diff --git a/traitement_pre_affichage.php b/traitement_pre_affichage.php deleted file mode 100644 index 85c56d4..0000000 --- a/traitement_pre_affichage.php +++ /dev/null @@ -1,122 +0,0 @@ - ----------------------------------------------------*/ -function traitement_pre_affichage($texte, $nb_max_long = 20) -{ - $texte = htmlentities($texte, ENT_QUOTES, "UTF-8"); - - #insère un espace au milieu d'un mot de longueur $nb_max_long - $texte = ereg_replace("([[:graph:]]{".$nb_max_long."})([[:graph:]]{".$nb_max_long."})", "\\1
    \\2", $texte); - - #ajoute les smiles et les
    , enlève les balises - $texte = couleur(smile(nl2br($texte))); - - - #souligné - $texte = str_replace("[u]", "", $texte); - $texte = str_replace("[/u]", "", $texte); - - #gras - $texte = str_replace("[b]", "", $texte); - $texte = str_replace("[/b]", "", $texte); - - #italique - $texte = str_replace("[i]", "", $texte); - $texte = str_replace("[/i]", "", $texte); - - #####plus valable##### - #gras - $texte = str_replace("[g]", "", $texte); - $texte = str_replace("[/g]", "", $texte); - ###################### - - if ($texte == "") - return " - "; - return $texte; -} - -/*-------------------------------------------------- -auteur : pifou -date : 19.02.2002 - -remplace les :), :-) etc... par des images de smiles ----------------------------------------------------*/ -function smile($texte) -{ - global $smiles; - - foreach ($smiles as $smile => $fichier) - $texte = str_replace($smile, '', $texte); - - return $texte; - -} - -/*-------------------------------------------------- -auteur : pifou -date : 2.04.2002 - -remplace les balise {1} {/1} par des balise html -font et met l'attribut couleur en fonction du numeros ---------------------------------------------------*/ -function couleur($texte) -{ - $les_couleurs[0] = 'black'; - $les_couleurs[1] = 'red'; - $les_couleurs[2] = 'green'; - $les_couleurs[3] = 'yellow'; - $les_couleurs[4] = 'blue'; - $les_couleurs[5] = 'aqua'; - $les_couleurs[6] = 'fuchsia'; - $les_couleurs[7] = 'white'; - #$les_couleurs[8] = 'black'; - #$les_couleurs[9] = 'black'; - - foreach ($les_couleurs as $num => $couleur) - { - #$texte = ereg_replace("\{" . $num . "\}([[:print:]]+)\{/" . $num . "\}", "\\1", $texte); - $texte = str_replace("{" . $num . "}", "", $texte); - $texte = str_replace("{/" . $num . "}", "", $texte); - } - - return $texte; -} - -?> diff --git a/tx_bienvenue.php b/tx_bienvenue.php deleted file mode 100644 index 53f8929..0000000 --- a/tx_bienvenue.php +++ /dev/null @@ -1 +0,0 @@ -Toute l'équipe de la Corcelles-LAN vous souhaite la bienvenue !! diff --git a/tx_contacts.php b/tx_contacts.php deleted file mode 100644 index 3727607..0000000 --- a/tx_contacts.php +++ /dev/null @@ -1,12 +0,0 @@ - - -

    Organisateur

    - -

    Hébergeur et Webmaster

    - \ No newline at end of file diff --git a/tx_informations.php b/tx_informations.php deleted file mode 100644 index 6f91a4f..0000000 --- a/tx_informations.php +++ /dev/null @@ -1,57 +0,0 @@ - - -

    Une puissante LAN aura lieu du vendredi 21 Novembre au Lundi 24 Novembre à Corcelles [NE]

    - -

    Heures

    - - -

    Points forts

    - - -

    Matos

    - - -

    Prix

    - - -

    Lieu

    - - -

    Bouffe, boissons & drogues

    - - -

    Intranet

    - - -

    Divers

    - diff --git a/tx_inscription.php b/tx_inscription.php deleted file mode 100644 index 742e153..0000000 --- a/tx_inscription.php +++ /dev/null @@ -1,137 +0,0 @@ -valide) - echo '

    Modification de mes infos

    '; -else - echo'

    Les personnes inscrites s\'engagent à être présentes à la LAN et à payer la somme convenue.

    -

    Elles peuvent se désinscrirent en cas d\'empèchements majeurs.

    '; -?> - -
    -valide) - echo '

    '; - else - echo '

    '; -?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - valide) - echo' - - - - '; - ?> -
    - pseudo (login) - - valide?('value="'.$le_participant->info->pseudo.'"'):''); ?> /> -
    - password (pour pouvoir par la suite modifier mes infos) - - valide?('value="'.$le_participant->info->password.'"'):''); ?> /> - re: valide?('value="'.$le_participant->info->password.'"'):''); ?> /> -
    - clan name - - valide?('value="'.$le_participant->info->clan_nom.'"'):''); ?> /> - -
    - clan tag - - valide?('value="'.$le_participant->info->clan_tag.'"'):''); ?> /> -
    - nom - - valide?('value="'.$le_participant->info->nom.'"'):''); ?> /> -
    - prénom - - valide?('value="'.$le_participant->info->prenom.'"'):''); ?> /> -
    - age - - valide?('value="'.$le_participant->info->age.'"'):''); ?> /> -
    - email (non-public) - - valide?('value="'.$le_participant->info->e_mail.'"'):''); ?> /> -
    - présence - - valide ? $le_participant->info->id : "0")." - "); - while($periode = mysql_fetch_object($res)) - { - echo '

    valide || $periode->participant_id ? 'checked="checked"' : '').' id="periode'.$periode->id.'" type="checkbox" />

    '; - } - ?> -
    - remarques - - -
    - j\'ai bien lu et suis d\'accord avec le préambule - - -
    -

    -
    diff --git a/tx_inscrits.php b/tx_inscrits.php deleted file mode 100644 index 89ff6a0..0000000 --- a/tx_inscrits.php +++ /dev/null @@ -1,36 +0,0 @@ - - - pseudo - nom - prénom - age - remarques - '; - -$clan_courant = null; - -while($participant = mysql_fetch_object($res)) -{ - if ($clan_courant !== $participant->clan_nom) - { - echo ($participant->clan_nom != '' ? '

    '.traitement_pre_affichage($participant->clan_nom).'

    ' : ''), $debut_table; - $clan_courant = $participant->clan_nom; - } - - echo ''; - echo '', htmlentities($participant->clan_tag, ENT_QUOTES, "UTF-8"), traitement_pre_affichage($participant->pseudo), ''; - echo '', traitement_pre_affichage($participant->nom), ''; - echo '', traitement_pre_affichage($participant->prenom), ''; - echo '', traitement_pre_affichage($participant->age), ''; - echo '', traitement_pre_affichage($participant->remarques), ''; - echo ''; -} -echo ''; -?> diff --git a/tx_intranet.php b/tx_intranet.php deleted file mode 100644 index 8746475..0000000 --- a/tx_intranet.php +++ /dev/null @@ -1,21 +0,0 @@ - -
    >>Le serveur ftp !!DivX - Mp3 - Progz!! <<
    -
    >>Le serveur de Faty !!Mp3 - Videos!! <<
    -
    >>Kiki ftp !!Manga - Roms Nes/Snes!! <<
    -
    >>Le0 ftp !!Tout!! <<
    -
  • CLIENT FTP BIEN
  • - -
    >> Stats CS <<
    - -
    PATCHS
    - -
    MODS
    - - diff --git a/tx_jeux_joues.php b/tx_jeux_joues.php deleted file mode 100644 index 304c34b..0000000 --- a/tx_jeux_joues.php +++ /dev/null @@ -1,57 +0,0 @@ -valide) -{ - echo '

    Remarque : Il faut être inscrit pour pouvoir voter.

    '; -} - - -echo ' -
    -

    - - ', ($le_participant->valide ? '' : ''), ''; - -$jeux_query = mysql_query(" - SELECT jeux.id, jeux.nom, jeux_choisis.participant_id, COUNT(*) + IF(participant_id is not null, 1, 0) - 1 AS nb_vote - FROM jeux LEFT JOIN jeux_choisis ON jeux.id = jeux_choisis.jeu_id - GROUP BY jeux.id - ORDER BY nb_vote DESC, nom -"); - -while ($jeu = mysql_fetch_object($jeux_query)) -{ - # est-ce que le participant courant à voté pour ce jeu ? - if ($le_participant->valide) - { - $a_vote = mysql_fetch_row(mysql_query(" - SELECT COUNT(*) FROM jeux_choisis - WHERE participant_id = ".$le_participant->info->id." AND jeu_id = ".$jeu->id - )); $a_vote = $a_vote[0]; - } - else - $a_vote = FALSE; - - echo '', - $le_participant->valide ? '' : '', - '', - ''; -} - -echo ' -
    VotesJeux
    ' . $jeu->nb_vote . '' . traitement_pre_affichage($jeu->nom) . '
    '; - -if ($le_participant->valide) - echo ' -

    Autre :

    -

    '; - -echo '
    '; - -# affichage du nombre de vote restant -if ($le_participant->valide) - echo '

    Nombre de votes restant : ' . $le_participant->nb_vote_restant() . '

    '; - -?> \ No newline at end of file diff --git a/tx_photos.php b/tx_photos.php deleted file mode 100644 index 939e7ad..0000000 --- a/tx_photos.php +++ /dev/null @@ -1,41 +0,0 @@ -sections() as $section) - echo '
    ', $section,'
    Auteur : ',$ma_galerie->get_auteur($section),'
    Date : ',$ma_galerie->get_date($section),'

    '; - break; - - case 'section' : - $ma_galerie->set_section_courante($_GET['__section']); - $ma_galerie->afficher_vignettes($_GET['__page_section']); - break; - - case 'photo' : - $ma_galerie->set_section_courante($_GET['__section']); - $ma_galerie->afficher_photo($_GET['__photo']); - break; -} - -?> \ No newline at end of file diff --git a/update_db.php b/update_db.php deleted file mode 100644 index 5ff5904..0000000 --- a/update_db.php +++ /dev/null @@ -1,117 +0,0 @@ - 2 - if ($version == 1) - { - mysql_query("BEGIN TRANSACTION"); - mysql_query(" - CREATE TABLE IF NOT EXISTS periodes ( - id mediumint(3) unsigned NOT NULL auto_increment, - nom varchar(200) NOT NULL, - PRIMARY KEY (id) - ) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED; - "); - mysql_query("INSERT INTO periodes (nom) VALUES ('Vendredi soir à samedi')"); - mysql_query("INSERT INTO periodes (nom) VALUES ('Samedi à dimanche')"); - mysql_query("INSERT INTO periodes (nom) VALUES ('Dimanche à lundi')"); - mysql_query(" - CREATE TABLE IF NOT EXISTS participations ( - participant_id mediumint(3) unsigned NOT NULL, - periode_id mediumint(3) unsigned NOT NULL, - PRIMARY KEY USING BTREE (participant_id, periode_id), - KEY FK_periode (periode_id), - CONSTRAINT FK_participant_participations FOREIGN KEY (participant_id) REFERENCES participants (id) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT FK_periode_participations FOREIGN KEY (periode_id) REFERENCES periodes (id) ON DELETE CASCADE ON UPDATE CASCADE - ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC; - "); - mysql_query("UPDATE config SET valeur = '2' WHERE nom = 'version')"); - mysql_query("COMMIT"); - } -} - -update_db(); - -?>