Forum tres simple a installer

Soyez le premier à donner votre avis sur cette source.

Vue 7 654 fois - Téléchargée 2 138 fois

Description

forum tres simple a installer et tres bien. et aussi avec connexion et inscription
exemple sur gentelet.kegtux.org

Codes Sources

A voir également

Ajouter un commentaire

Commentaires

bonjour et bravo pour ce travail conséquent. Seulement voilà, ça ne fonctionne pas !
1 er essais avec MAMP sur mac intel et lorsque je retourne scruter mes dossier,
le dossier "forum facile à installer n'est meme plus affiché !
2eme essais sur un site (puisque c'est un peu le but) : je vide tout
et forwarde l'archive. Ça se découpresse bien , je file sur l'adresse www.zelione.fr
la page s'affiche en me demamandant de m'inscrire et puis validation et ça reste sur cette page.
Pour info, je suis chez OVH

Alors que faire ?

PS: je suis très mauvais en PHP qui me sert uniquement pour piloter des include et des boucles de base.
Merci de votre aide

PS j'attends un peu avant de noter ce script
Messages postés
24
Date d'inscription
lundi 9 juillet 2012
Statut
Membre
Dernière intervention
20 août 2014

je ne pense pas que cel va marcher
J'utilise le wamp server et la version de son Apache est 2.2.21
Messages postés
24
Date d'inscription
lundi 9 juillet 2012
Statut
Membre
Dernière intervention
20 août 2014

Je pense que tu devrais enlever l'incription et apres en chercher une autre parce quue je ne pense pas que cela marche avec le tien. cela depends sur quelle serveur vous etes vous etes sur lequel?
bonjour le problème persiste toujours et je me demandai si c'est pas un module que je pas puis activer...bref voici ce que ça me donne:

name,"w")) { fputs($fp, serialize($this)); fclose($fp); } } } // Membres / Stats class Forum extends SaveObj { var $name= "membres/members.dat"; var $topics=array(); var $members=array(); function forum() { // Construteur de la classe $this->saveObj(); } function addMember($name,$password,$mail,$quote="",$url="",$phone="",$pic="",$mod=0) { if(!count($this->members)) $mod=2; $this->members[$name]=array(md5($password),time(),$mail,$quote,$url,$phone,$pic,$mod,0); ksort($this->members); $this->saveObj(); } function removeMember($name) { unset($this->members[$name]); ksort($this->members); $this->saveObj(); } function getMember($name) { return $this->members[$name]; } function isMember($name) { return isset($this->members[$name]); } function setMember($name,$mail,$quote="",$url="",$phone="",$pic="") { if($pic=="") $pic=$this->members[$name][6]; $this->members[$name]=array($this->members[$name][0],$this->members[$name][1],$mail,$quote,$url,$phone,$pic,$this->members[$name][7],$this->members[$name][8]); $this->saveObj(); } function setPost($name) { $this->members[$name][8]++; $this->saveObj(); } function setMod($name) { $this->members[$name][7]=$this->members[$name][7]?0:1; $this->saveObj(); } function listMember() { $tmp=array(); foreach($this->members as $k=>$v) $tmp[]=$k; return $tmp; } function checkMember($name,$pass) { $login=(isset($this->members[$name])); if($login) { $pass=($this->members[$name][0]!=$pass)?false:true; $mod=$this->members[$name][7]; return array($login,$pass,$mod); } return array(0,0,0); } function addTopic($title,$auth,$time,$attach,$type=false) { $this->topics[$time]=array($title,$auth,1,$auth,$time,$attach,$type); $this->lastSort(); if(isset($this->members[$auth])) $this->members[$auth][8]++; $this->saveObj(); } function updateTopic($time,$title,$auth,$post,$last,$ltime,$attach,$type) { $this->topics[$time]=array($title,$auth,$post,$last,$ltime,$attach,$type); $this->lastSort(); $this->saveObj(); } function delTopic($id) { unset($this->topics[$id]); $this->saveObj(); } function setType($topic,$type) { $this->topics[$topic][6]=$type; $t = $this->openTopic($topic); $t->setType($type); unset($t); $this->lastSort(); $this->saveObj(); } function setTitle($topic,$title) { $this->topics[$topic][0]=$title; $t = $this->openTopic($topic); $t->setTitle($title); unset($t); $this->lastSort(); $this->saveObj(); } function getallTopic($nbr=false,$limit=false) { $tmp=array(); $cnt=0; foreach($this->topics as $k=>$v) { if(!$limit || $cnt==$limit) { if(count($v)<7) $v[]=0; $v[]=$k; $tmp[]=$v; if($nbr && (count($tmp)==$nbr)) break; } else if($limit) $cnt++; } return $tmp; } function getStat() { $tmp=0; $arr=array(0,""); foreach($this->getallTopic() as $v) $tmp+=$v[2]; foreach($this->members as $k=>$v) $arr=($v[1]>$arr[0])?array($v[1],$k):$arr; return array(count($this->members),$arr[1],count($this->topics),$tmp); } function openTopic($topic) { if($s = @file_get_contents("messages/".$topic.".dat")) return unserialize($s); else return false; } function lastSort() { $arr = array(); $arrp = array(); foreach($this->topics as $k=>$v) { $l=end($v); if($l>2) $v[]=0; $v[]=$k; if($l && $l<2) $arrp[$v[4]]=$v; else $arr[$v[4]]=$v; } unset($this->topics); if(count($arrp)>0) { ksort($arrp); foreach($arrp as $v) { $t=array_pop($v); $this->topics[$t]=$v; } } if(count($arr)>0) { krsort($arr); foreach($arr as $v) { $t=array_pop($v); $this->topics[$t]=$v; } } } } // Gestion des topics class Topic extends SaveObj { var $title; var $time; var $name; var $type=false; var $reply=array(); var $pos=0; function Topic($auth,$title,$content,$attach="",$type=false) { // Construteur de la classe $this->addReply($auth,$content,$attach); $this->title=$title; $this->time=time(); $this->type=$type; $this->name="messages/".time().".dat"; $this->saveObj(); } function removeTopic() { unlink($this->name); } function addReply($auth,$content,$attach="") { $this->reply[]= array($auth,time(),$content,$attach); $this->saveObj(); return $this->getlastReply(); } function removeReply($id) { $tmp=array(); foreach($this->reply as $r) if($r[1]!=$id) $tmp[]=$r; $this->reply=$tmp; $this->saveObj(); } function getlastReply() { return end($this->reply); } function setReply($id,$title,$content,$attach="") { if($title!="") $this->title=$title; foreach($this->reply as $k=>$r) { if($r[1]==$id) $this->reply[$k][2]=$content;} $this->saveObj(); } function getReply($id) { foreach($this->reply as $v) { if($v[1]==$id) return $v; } } function nextReply() { if($this->posreply))return $this->reply[$this->pos++]; else {$this->pos=0; return false;} } function setType($type) { $this->type=$type; $this->saveObj(); } function setTitle($title) { $this->title=$title; $this->saveObj(); } function getInfo($type) { $auths=array(); $posts=0; $attach=0; $last=$this->getlastReply(); foreach($this->reply as $v) { if(!in_array($v[0],$auths)) $auths[]=$v[0]; if($v[3]!="") $attach=1; $posts++; } if($type) return array(count($auths),$auths); else return array($this->time,$this->title,$auths[0],$posts,$last[0],$last[1],$attach,$this->type); } } class Visit extends saveObj { var $name="membres/connected.dat"; var $conn=array(); function visit($id="") { $this->conn[$_SERVER['REMOTE_ADDR']]=array($id,time()); $this->saveObj(); } function updateVisit($id="") { $r=$_SERVER['REMOTE_ADDR']; $cnt=0; $arr=""; $this->conn[$r]=array($id,time()); foreach($this->conn as $k=>$v) { if(((time()-$v[1])>120) && $k!=$r) unset($this->conn[$k]); else { if($this->conn[$k][0]!="") $arr.=($r==$k)?$id." ":"".$this->conn[$k][0]." "; else $cnt++; } } $this->saveObj(); return array($arr,$cnt); } } class Messages extends saveObj { var $mess=array(); var $name; function messages($name) { $this->name="membres/".$name."/".$name.".mp"; } function addMessage($from,$content) { $this->mess[]=array(time(),$from,$content); $this->saveObj(); } function getMessage() { return $this->mess; } } // initialisation et/ou creation function init_forum() { global $error,$version, $forum, $conn; if(@file_get_contents("version")!=$version) { $d = (strlen(dirname($_SERVER['SCRIPT_NAME']))>1)?dirname($_SERVER['SCRIPT_NAME'])."/":""; $d = "http://".$_SERVER['HTTP_HOST'].$d; if($h=@fopen("version","w")) { fputs($h,$version); fclose($h); } if(!mkressources($d)) { @include("config.php"); $config=""; if($h=@fopen("config.php","w")) {fputs($h,utf8_encode($config));fclose($h);} } mkhtaccess(); if(@copy("index.php","index2.php")) { unlink("index.php"); rename("index2.php","index.php"); header("location: index.php?rc=".base64_encode($error)); exit(); } } else { $s = @file_get_contents("membres/members.dat"); $forum = unserialize($s); $s = @file_get_contents("membres/connected.dat"); $conn = unserialize($s); } } function mkressources($d) { global $error,$forum,$conn; if (!file_exists("membres/") || !file_exists("membres/members.dat")) { $config=""; if($h=@fopen("config.php","w")) {fputs($h,utf8_encode($config));fclose($h);} $error=(@mkdir("membres/"))?"Création du répertoire membre.
":"Echec à la création du répertoire membre !
"; $error.=(@mkdir("messages/"))?"Création du répertoire messages.
":"Echec à la création du répertoire messages !
"; $error.=(mkgifs())?"Installation des gifs réussie.
":"Echec à l'installation des gifs !"; mkcss(); $forum new Forum(); $conn new Visit(); return true; } return false; } function mkcss() { global $cNames,$cVals; $css="aHRtbCAsIGJvZHkgew0KCW1hcmdpbjogMDsNCglwYWRkaW5nOiAxMHB4Ow0KCWJhY2tncm91bm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aWduOiBsZWZ0Ow0KCWRpc3BsYXk6IG5vbmU7DQoJYmFja2dyb3VuZC1jb2xvcjogI2ZmZjsNCglwYWRkaW5nOiA2cHg7DQoJY29sb3I6ICM2NjY7DQoJZm9udC1zaXplOiAxMXB4Ow0KCW9wYWNpdHk6IC45Ow0KCXotaW5kZXg6IDk5OTsNCgl3aWR0aDogNDAwcHg7IH0NCg0KLnN0eWxlQnQgew0KCXRleHQtYWxpZ246IGNlbnRlcjsNCglmb250LXNpemU6IDEwcHg7DQoJcGFkZGluZzogM3B4IDZweCAzcHggNnB4Ow0KCW1hcmdpbi1yaWdodDogMnB4OyB9DQoNCmEuc3R5bGVCdDpsaW5rLCBhLnN0eWxlQnQ6dmlzaXRlZCB7DQoJdGV4dC1kZWNvcmF0aW9uOiBub25lOw0KCWNvbG9yOiAjNjY2Ow0KCWJhY2tncm91bmQ6W2x0XTsgfQ0KDQphLnN0eWxlQnQ6aG92ZXIgew0KCXRleHQtZGVjb3JhdGlvbjogbm9uZTsNCgljb2xvcjogI2ZmZjsNCgliYWNrZ3JvdW5kOltka107IH0NCg0KLnNpdGUgew0KCXdpZHRoOiA3MDBweDsNCgl0ZXh0LWFsaWduOiBjZW50ZXI7DQoJbWFyZ2luLWxlZnQ6IGF1dG87DQoJbWFyZ2luLXJpZ2h0OiBhdXRvOyB9DQoNCg=="; $css = base64_decode($css); foreach($cVals as $k=>$v) { $css_copy=$css; for($i=0;$i\n"; #$mainHt .= "ForceType application/x-httpd-php\n"; #$mainHt .= "\n"; $mainHt = "ErrorDocument 401 $s\n"; $mainHt .= "ErrorDocument 403 $s\n"; $mainHt .= "ErrorDocument 404 $s\n"; if(!file_exists(".htaccess")) { if($h=@fopen(".htaccess","w")) { fputs($h,$mainHt);fclose($h); } } } // create gifs function mkgifs() { global $img_names; $ret=true; if(!file_exists("pictures/") || !file_exists("pictures/".$img_names[0].".gif")) { $image_array = array('R0lGODlhDQALALMPAPf07Kl5De7NG8ebDdS9krmXUfneH6uBLfL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hDgAMAKIAAP39/bKztMXGx9bW1mRlaIWGiebm5p+foSH5BAAAAAAALAAAAAAOAAwAAANECLorV4apo9w4RIZgbCTDEgjXGAADqIzpSJBvuA2FKwQxYBTXIbw4koI2+AFzil3IMAiGGAUI4CeUADAE3tOqGwwi1gQAOw==', 'R0lGODlhUABQAKIAAOHh4fLy8vz8/M7Ozre3t////wAAAAAAACH5BAAAAAAALAAAAABQAFAAAAP/SLrc/jDKSVe5OOvNu/9gqIRkaZ7diK5si6luLH/wbN/1rbv57p+9nxAUHBo3xaOykFwam04hNBYADAaLKyBwnK4CWMqA+/OawBXG2GcmAdIPwK79EYThjoEAR5jZ8RF6NnQdd4APA4N9MW+HEnIyhBoBjhRkPIstlRWRmSuNm48xkhcCoRV7mp4noKcRkCykBYauiJiqtRK3X7kTlyikrb0OsMCrJcLDDMVAx27KEMwmwdBxqizJ1dIl1NUN2ySklN4Mv8245M7c6iG00InX2OkE4OHsIKbpqbH3INm59eyN8raPHyNtnWT82xRw3Qx3m+AllPHHlaAZsjRUjFhwo6COhRQaGtuBBs+aOf1YlJxwkk1KF1WuZBmwpcvLKDoy4lyhc+c5n0umWIE4Lw9NEfdWFoXTkkMSkEsn1CsCNarUFM6qWr2K5Fi+raE6MjmmFawoDT2Imk0j8cWxtae6doVbSS5aunXvzsULyG4Gvo78ugWMR/AFwn313kWcxvBYxpwU/4UcefJeyhEcY6agebMuyYM9P+gsejTow6VNT05dKQEAOw=='); @mkdir("pictures"); for($i=0;$i';} // function callback($buffer) { return htmlentities($buffer,ENT_NOQUOTES,"UTF-8"); } function loginForm() { global $maxAvatarSize,$forum,$forumMode; $form =""; $r = $forum->getStat(); if($r[0]) { $form .= "\n\n"; if(!$forumMode) { $form .= "
"; $form .= "S'identifier\n"; $form .= "
\n"; } else { $form .= "
S'identifier
\n"; $form .= "
"; } $form .= "
"; $form .= ""; $form .= "\n"; $form .= "\n"; $form .= "\n"; $form .= "\n"; $form .= "
Identifiant
Mot de passe

\n"; $form .= "
"; $form .= "
\n"; if(!$forumMode) $form .= "
\n"; $form .= "
\n"; $form .= "S'enregister\n"; $form .= "
\n"; } else { $form .= "
S'enregister
\n"; $form .= "
\n"; } $form .= "
\n"; $form .= "\n"; $form .= "\n"; $form .= "\n"; $form .= "\n"; $form .= "\n"; $form .= "\n"; $form .= "\n"; $form .= "\n"; $form .= "\n"; $form .= "\n"; $form .= "\n"; $form .= "\n"; $form .= "
Identifiant*
Mot de passe*
Téléphone
E-mail*
Site Web
Signature
Avatar (<".($maxAvatarSize/1024)."ko)

Les champs marqués de * sont obligatoires. Si l'identifiant comporte / \ & " ' . ou des espaces, ils seront retirés.
\n"; $form .= "
\n"; $form .= "
\n"; if($r[0]) $form .= "
\n"; return $form; } function welcomeText() { global $wt,$ismember; $buf="\n"; $buf.="
Informations
\n"; $buf.="
"; if(!$wtp=@file_get_contents("welcome.txt")) $wtp=base64_decode($wt); $buf.=decode($wtp)."
\n"; return $buf; } function editProfilForm() { global $cLogin,$maxAvatarSize,$forum; list($pwd,$time,$email,$signature,$site,$telephone,$pic,$mod,$post)=$forum->getMember($cLogin); $avatar=($pic!="")?"":img(12); $form = "\n\n"; $form .= "
\n"; $form .= "
Editer son profil ~ ".$cLogin."
\n"; $form .= "
\n"; $form .= "
\n"; $form .= "\n"; $form .= "\n"; $form .= "\n"; $form .= "\n"; $form .= "\n"; $form .= "\n"; $form .= "\n"; $form .= "\n"; $form .= "\n"; $form .= "\n"; $form .= "
".$avatar." ".listFiles()."
Téléphone
eMail
Site web
Signature
Avatar

\n"; $form .= "
\n"; $form .= "
\n"; $form .= "
\n"; return $form; } function formattingHelp() { $buff = "Smileys\n"; // smileys $s=array(":)",";)",":D",":|",":(","|(",":p",":$","->"); for($i=0;$i".img($i).""; } $buff .= "\n"; $buff .= "Formattage"; // formatage $buff .= "Gras"; $buff .= "Italique"; $buff .= "Souligné"; $buff .= "Code"; $buff .= "\n"; return $buff; } function menu() { global $cLogin,$isadmin,$isowner,$havemp,$cStyle,$cVals,$forum,$nbrMsgIndex,$ismember,$siteUrl,$siteName; $mn=""; $p = " | Options administrateur \n"; $mn .= $p."?conf=1' title=''>Configuration\n"; $mn .= $p."?backup=1' title=''>Sauvegarde\n"; $mn .= $p."?restore=1' title=''>Restauration\n"; $mn .= "
\n"; } $tLogin=$ismember?$cLogin:"Anonyme"; $mn .= "
\n"; $mn .= "Bienvenue ".$tLogin; $mn .= ($isadmin)?"*":""; $mn .= "\n"; if($siteUrl!='') $mn .= $p."$siteUrl' title='site'>".stripslashes($siteName)."\n"; $mn .= $p."index.php' title=''>Accueil\n"; if($ismember) { $mn .= $p."?logout=1' title='logout'>Déconnecter\n"; $mn .= $p."?editprofil=1' title=''>Profil\n"; } $stats=$forum->getStat(); if($nbrMsgIndex<$stats[2]) $mn .= $p."?showall=1' title=''>Archives\n"; if($ismember) $mn .= $p."?annuaire=1' title=''>Annuaire\n"; $mn .= " | Styles : "; foreach($cVals as $k=>$v) $mn .= " "; $mn .= $p.$_SERVER['REQUEST_URI']."#bottom' title=''>Bas\n"; if($havemp) $mn .= $p.$_SERVER['REQUEST_URI']."#private' id='mpmess' onclick="clearTimeout(tm);this.style.visibility='hidden';javascript:switchLayer('privatebox');" title='voir messages'>Messages privés"; $mn .= "
\n"; return $mn; } function showTopics() { global $isadmin,$nbrMsgIndex,$forum,$showall; $buffer = "\n"; $buffer .= "
\n"; $buffer .= ""; $buffer .= "\n"; $buffer .= "\n"; $buffer .= "\n"; $buffer .= "\n"; $buffer .= "\n"; $buffer .= "\n"; if($isadmin) $buffer .= "\n"; $buffer .= "\n"; $topicList=($showall)?$forum->getallTopic(0,$nbrMsgIndex):$forum->getallTopic($nbrMsgIndex); foreach($topicList as $t) { list($titre,$auteur,$nombrePosts,$dernierPar,$dernierLe,$attachment,$postType,$topicID)=$t; $dernierLe = date("d/m/y - H:i",$dernierLe); $started = date("d/m/y", $topicID); $attachment=($attachment!='')?img(11):''; $postType=$postType?img(10).' ':''; $classLink = (isset($_COOKIE["uFread$topicID"]))?'Lien':'LienNonLu'; $buffer .= "\n"; $buffer .= "\n"; $buffer .= "\n":$auteur."\n"; $buffer .= "\n"; $buffer .= "\n":$dernierPar."\n"; $buffer .= "\n"; $buffer .= "\n"; if($isadmin) $buffer .= "\n"; $buffer .= "\n"; } $buffer .= "
Titre du sujet Auteur Msg Dernier par Débuté le Dernier le Admin
".$postType.$attachment." ".stripslashes($titre)." "; $buffer .= $forum->isMember($auteur)?"".$auteur." ".$nombrePosts." "; $buffer .= $forum->isMember($dernierPar)?"".$dernierPar." ".$started." ".$dernierLe." Del
\n"; $buffer .= "\n"; $buffer .= replyForm("newtopic",count($topicList)); return $buffer; } function showPosts() { global $topic,$forum,$isadmin,$quoteMode; $buffer=""; $avatars=array(); $quotes=array(); $modo=array(); if($s = implode("", file("messages/".$topic.".dat"))) { $topicObj = unserialize($s); list($time,$titre,$auteur,$posts,$last,$lasttime,$attach,$type)=$topicObj->getInfo(0); $buffer .= "
"; if($isadmin) { $buffer .= "
"; $buffer .= img(10)." ":"/>"; $buffer .= "
"; } else $buffer .= stripslashes($titre); $buffer .= "
"; // tooltips list($num,$auths)=$topicObj->getInfo(1); foreach($auths as $m) { if($forum->isMember($m)) { list($password,$time,$mail,$quote,$url,$phone,$pic,$mod,$max)=$forum->getMember($m); $buffer .= "
\n"; $buffer .= "\n"; $buffer .= "\n"; $buffer.= "\n"; if(!empty($url)) $buffer .= "\n"; if(!empty($phone)) $buffer .= "\n"; if(!empty($quote)) { $buffer .= "\n"; if($quoteMode) $quotes[$m]=$quote; } $buffer .= "
".$m." ".$max." messages depuis le ".date("d/m/y",$time)."
eMail ".$mail."
Site Web ".$url."
Téléphone ".$phone."
Signature ".$quote."
\n"; if($mod) $modo[$m]=($mod>1)?"Fondateur":"Modérateur"; else $modo[$m]="Membre"; } else $pic=""; // Avatar $avatars[$m]=($pic!="")?"":img(12); } $cnt=0; while(list($auth,$time,$content,$attach)=$topicObj->nextReply()) { $buffer .= "
\n"; $buffer .= "\n"; if($forum->isMember($auth)) { $buffer .= "\n"; $buffer .= "\n"; if(isset($quotes[$auth])) $buffer .= "\n"; $buffer .= ""; if(!empty($attach)){ $attachment = explode("/", $attach); $buffer .= "\n"; $buffer .= "
".$avatars[$auth].""; $buffer .= "
".$auth."
\n"; $buffer .= "
[".$modo[$auth]."]
\n"; } else { $buffer .= " ".$avatars[$auth]; $buffer .= "
".$auth."
\n"; } if($isadmin) { $delmsg = $cnt?"Réponse de $auth":"Tout le sujet"; $buffer .= "
[E] [S]
\n"; } $buffer .= "
".date("d/m/Y H:i", $time)."
".decode($content)."
~
".$quotes[$auth]."
[ CITER ] ".$attachment[2]." ".img(11).""; } else $buffer .= " "; $buffer .= "
\n"; $buffer .= "
"; $cnt++; } $buffer .= replyForm("newpost"); } else { $buffer .= "
Topic inexistant
"; } return $buffer; } function splitLongString($string, $max) { /*$whiteSpace = explode(" ", $string); for($i=0; $i $max){ if (!preg_match("(href=')", $whiteSpace[$i])) { $whiteSpace[$i] = substr($whiteSpace[$i], 0, $max) . " " . substr($whiteSpace[$i], $max); $whiteSpace[$i] = splitLongString($whiteSpace[$i], $max); } } } $string = implode(" ", $whiteSpace); return $string; */ return wordwrap($string, 75,"
",1); } function colorSyntax($txt) { // Utilisation de la fonction PHP dedie if(eregi("(<\?[php]?)",$txt)) { $txt = html_entity_decode($txt); $txt = ereg_replace("(\r|\n)","\n",$txt); ob_start(); @highlight_string($txt); $code = ob_get_contents(); ob_end_clean(); $code = ereg_replace("(|)","",$code); $txt = "
".trim($code)."

"; } else { // Sinon, traitement classique $txt = "
" . $txt;
$txt = ereg_replace("([a-zA-Z0-9\-\_]+)(\(+)([^\n\t]*)(\)+)", "\\0", $txt);
$txt = ereg_replace("((\n|\t)//)([^\n\r]+)", "\\0", $txt);
$txt = ereg_replace("\\$([a-zA-Z0-9]*)", "\\0", $txt);
$txt = ereg_replace(""([^\n\r]+)"", "\\0", $txt);
$txt .= "
"; return nl2br(trim($txt)); } return $txt; } function bbCode($txt) { // BBCodes $bbcodes array(" ", " ", " ", " ", " ", " ", "[e]", "/e", "/q", "[hr]"); $bbtags array("", "", "", "", "", "", "Editer par ","","",""); $inarray('`((?:https?|ftp)://\S+)(\s|\z)`','`((?$1 ','$1 '); $txt preg_replace($in,$out,$txt); $txt = preg_replace("/\[q=(.+)\]/Ui","Citation de \\1",$txt); $txt str_replace($bbcodes, $bbtags, $txt); $txt preg_replace("/\[sm=(.+)\]/Ui","",$txt); // on raccourci les longues chaines //$txt = splitLongString($txt, 45); // Emoticons $smileCode = array(":)", ";)", ":D", ":|", ":(", "|(", ":p", ":$", "->"); $smileRefCode = array(); for($x=0; $x\n"; $annu .= "\n"; $annu .= "\n"; $annu .= "\n"; $annu .= "\n"; $annu .= "\n"; if($isadmin) $annu .= "\n"; $annu .= "\n"; $mb=$forum->listMember(); foreach($mb as $m) { list($pass,$time,$mail,$quote,$url,$phone,$pic,$mod,$post)=$forum->getMember($m); $mail="".img(9).""; $signature=($quote!="")?splitLongString($quote, 30):" "; if($url!="") { if (!preg_match("|http://|",$url)) $url="http://".$url; $url="".img(10).""; } if($phone!="") { $telephone = str_replace(" ", "", $phone); $telephone = ereg_replace("([0-9]{2})+([0-9]{2})+([0-9]{2})+([0-9]{2})+([0-9]{2})+(.*)", "\\1 \\2 \\3 \\4 \\5", $telephone); } else $telephone = " "; $avatar=($pic != "")?"":img(12); $toolTip .= "
".$avatar."
\n"; $annu .= "\n"; $annu .= "\n"; $annu .= "\n"; $annu .= "\n"; $annu .= "\n"; if($isadmin) { if($mod) { if($m==$cLogin || $mod==2) { $str=($mod>1)?"Admin":"Modo"; $annu .= "\n"; $annu .= "\n"; } else { $annu .= "\n"; $annu .= "\n"; } } else { $annu .= "\n"; $annu .= "\n"; } } $annu .= "\n"; } $annu .= "
Membre Signature Téléphone eMail Admin
".$m." ".$signature." ".$telephone." ".$mail." ".$url."
$str!
del?
Modo?
del?
Modo?
\n"; $annu .= "
\n"; $annu .= $toolTip; return $annu; } function checkUpload($dir,$type=false) { global $maxAvatarSize,$error,$extensionsAutorises,$forum,$cLogin; if($type) { $match="/.gif$|.jpg$|.png$/i"; $name="avatar"; $size=$maxAvatarSize; } else { $match=$extensionsAutorises; $name="attachment"; $size=1024*200; } $avatar=""; if(is_uploaded_file($_FILES[$name]['tmp_name'])) { if(preg_match($match,$_FILES[$name]['name'])) { if(($_FILES[$name]['size']<$size) || !$type){ if (move_uploaded_file($_FILES[$name]['tmp_name'],$dir.'/'.str_replace(" ","",$_FILES[$name]['name']))) { $avatar=$dir.'/'.str_replace("+","",urlencode($_FILES[$name]['name'])); if($type) { $old=$forum->getMember($cLogin); if($old[6]!='') unlink($old[6]); } } else $error=$type?"Erreur d'écriture de l'avatar !":"La pièce jointe n'a pas pu être enregistrée !"; } else $error="Avatar trop gros"; } else $error="Type de fichier interdit !"; } else return false; return $avatar; } function replyForm($type,$mpTo="") { global $topic,$editpost,$topicObj,$cLogin,$isadmin; $edit=0; $join=0; $show=0; if($type=="newtopic") { $name="Nouveau sujet"; $join=1; $show=$mpTo?0:1; } else if($type=="newpost") { $name="Répondre"; $join=1; } else if($type=="editpost") { if($s = implode("", file("messages/".$topic.".dat"))) $topicObj = unserialize($s); else return false; list($auth,$time,$content,$attach)=$topicObj->getReply($editpost); $content = ereg_replace("\[e\](.*)\/e\\r\n","",$content); $name="Edition"; $edit=1; } else { $name="Envoyer un message privé à ".$mpTo; $show=1; } $buffer = "\n\n"; if($edit || $show) { $buffer .= "
$name
\n"; $buffer .= "
\n"; } else { $buffer .= "
\n"; $buffer .= "$name\n"; $buffer .= "
\n"; } $buffer .= "
\n"; $buffer .= "\n"; if($type=="newpost" || $edit) $buffer .= "\n"; if($mpTo) $buffer .= "\n"; if($edit) $buffer .= "\n"; $buffer .= "\n"; if($type=="newtopic") { $buffer .= "\n"; if($isadmin) $buffer .= "\n"; } if(!$cLogin) $buffer .= "\n"; $buffer .= formattingHelp(); if($join) $buffer .= "\n"; $buffer .= "\n"; $buffer .= "\n"; $buffer .= "
Titre du sujet
Post it
Pseudo (obligatoire)
Joindre un fichier


\n"; $buffer .= "
\n"; $buffer .= "
\n"; return $buffer; } function listFiles() { global $cLogin,$forum; $dir="membres/".$cLogin."/"; $a=$forum->getMember($cLogin); $list="
"; $list.="Fichiers personnels
\n"; $h=dir($dir); $id=0; while ($f=$h->read()) { if (($f!=".") && ($f!="..") && ($f!="$cLogin.mp")) { $cl=($a[6]!=($dir.urlencode($f)))?"Lien":"poster"; $list.=$id. " | ".$f."
\n"; $id++; } } $list .= "
\n"; return $list; } function showPrivateMsg() { global $cLogin,$forum; $s=implode("", file("membres/$cLogin/$cLogin.mp")); $mp = unserialize($s); $mess=$mp->getMessage(); $pvtBox = "\n
\n"; $pvtBox .= "Messages privés\n"; $pvtBox .= "
\n"; foreach($mess as $m) { if($forum->isMember($m[1])) $pvtBox .= "".$m[1]." le ".date("d/m/Y @ H:i",$m[0])."
"; else { // eregi("([0-9]{1,3}\.[0-9]{1,3})",$m[1],$reg); $m[1]=ereg_replace("(([0-9]{1,3}\.[0-9]{1,3})\.([0-9]{1,3}\.[0-9]{1,3}))","\\2.x.x",$m[1]); $pvtBox .= $m[1]." le ".date("d/m/Y @ H:i",$m[0])."
"; } $pvtBox .= stripslashes(decode($m[2]))."
"; } $pvtBox .= "Vider votre boite\n"; $pvtBox .= "
\n"; $pvtBox .= "
\n"; return $pvtBox; } function backup_dirs($dir) { $match="/.mp$|.dat$/i"; $buf=""; $h=opendir($dir); while ($item=readdir($h)) { if($item != "." && $item != "..") { if(is_dir("$dir/$item")) { $buf .= "[folder]$dir/$item"; $buf .= backup_dirs("$dir/$item"); } else if (preg_match($match,$item)) { $buf .= "[file]$dir/$item"; $buf .= "[content]".file_get_contents("$dir/$item"); } } } closedir($h); return $buf; } function do_backup($folders,$archive=NULL) { @mkdir("backup"); if($folders) { $buf = ""; foreach($folders as $fld) $buf .= backup_dirs($fld); if(!$archive) $archive="backup/forumbkp.gz"; if(function_exists("gzopen")) { $h=gzopen($archive, "w"); gzputs($h,$buf); gzclose($h); } else { $h=fopen($archive, "w"); fputs($h,$buf); fclose($h); } header("Content-Description: File Transfer"); header("Content-Type: application/force-download"); header("Content-Disposition: attachment; filename=".basename($archive)); @readfile($archive); return true; } return false; } function restore_forum($archive="",$folder="") { $rstFolds=0; $rstFiles=0; $buffer=""; if ($folder) { @mkdir($folder); $folder.="/"; } @mkdir($folder."messages"); @mkdir($folder."membres"); if(!$archive) $archive = "backup/forumbkp.gz"; if(function_exists("gzopen")) { if ($zp=gzopen($archive, "r")) { while (!gzeof($zp)) { $buffer .= gzgets ($zp, 4096) ; } } gzclose($zp) ; } else { if ($zp=fopen($archive, "r")) { while (!feof($zp)) { $buffer .= fgets ($zp, 4096) ; } } fclose($zp) ; } $dirArray = explode("[folder]",$buffer); foreach($dirArray as $key) { if(!empty($key)) { $fileArray = explode("[file]",$key); if (@mkdir($folder.$fileArray[0])) $rstFolds++; for ($i=1;$i \n"; $form .= "Nom & Url du site\n"; $form .= "Max. messages à l'acceuil\n"; $form .= "Poid max. d'un avatar (ko)\n"; $form .= "Extensions autorisées\n"; $form .= "Forum mode privé\n"; $form .= "Signature en fin de message\n"; $form .= "Message d'acceuil \n"; $form .= "\n"; $form .= " \n"; $form .= "\n"; $form .= "\n"; $form .= "
\n"; $form .= "
\n"; return $form; } ///////////// INITIALISATION $error=''; init_forum(); $siteUrl=''; // pour une upgrade, enlever dans les futurs versions require("config.php"); $extStr=$extensionsAutorises; $extensionsAutorises= "/.".str_replace(",","$|.",$extensionsAutorises)."$/i"; //////////////// GET ET POST $gets=array("topic","action","logout","annuaire","login","password","editprofil","email","telephone","site","signature","titre","message","topicID","postID","deluser","switchuser","delpost","editpost","style","private","delprivate","mpTo","backup","restore","read","conf","uftitle","nbmess","maxav","exts","fmode","anonymous","qmode","postit","ufsite","ufsitename","rc","ntitle","pid"); foreach($gets as $o) { $$o=(isset($_GET[$o]))?$_GET[$o]:''; if(!$$o) $$o=(isset($_POST[$o]))?$_POST[$o]:''; } if($pid) { $pid = base64_decode($pid); if(count($pid_name=explode("/",$pid))>2) { header("Content-Description: File Transfer"); header("Content-Type: application/force-download"); header("Content-Length: " . filesize($pid)); header("Content-Disposition: attachment; filename=".basename($pid)); @readfile($pid); } else $error .= "Ce fichier n'existe pas."; } if($rc) $error=base64_decode($rc); if($topic && !$editpost) setCookie("uFread$topic",1,time()+2592000); $cPass=(isset($_COOKIE["CookiePassword"]))?$_COOKIE["CookiePassword"]:""; $cLogin=(isset($_COOKIE["CookieLogin"]))?base64_decode($_COOKIE["CookieLogin"]):""; $cStyle=(isset($_COOKIE["CookieStyle"]))?$_COOKIE["CookieStyle"]:"blue"; // Test du mot de passe if (!empty($cLogin) && !empty($cPass)) { list($ismember,$goodpass,$isadmin)=$forum->checkMember($cLogin,$cPass); $havemp=@file_exists("membres/$cLogin/$cLogin.mp"); if(!$ismember || !$goodpass) { if(!$goodpass) $error .= "Mauvais mot de passe pour ".$cLogin." !
"; if(!$ismember) $error .= "Attention : l'identifiant ".$cLogin." est sensible à la casse !
"; $ismember=0; $isadmin=0; setCookie("CookiePassword", "", time()); setCookie("CookieLogin", "", time()); } else if($isadmin==2){$isadmin=1;$isowner=1;} } else { $ismember=0;$isadmin=0;$isowner=0;} // Deconnection if ($ismember && $logout) { setCookie("CookiePassword", "", time()); setCookie("CookieLogin", "", time()); header("Location: index.php"); exit(); } if($style) { setCookie("CookieStyle",$style,time()+(3600*24*30)); $cStyle=$style; } if($delprivate) { unlink("membres/$cLogin/$cLogin.mp"); $havemp=0;} switch ($action) { case 'enter': setCookie("CookiePassword",md5($password),time()+(3600*24*30)); setCookie("CookieLogin",base64_encode($login),time()+(3600*24*30)); header("Location: index.php"); exit(); break; case 'newuser': // on nettoie le login $login = str_replace(array(" ", '"', "'", "/", "&", "."), array("", '', "", "", "", ""), $login); $login = stripslashes($login); $avatar=""; if(in_array($login,$forum->listMember())) $error .= "Ce membre existe déja !"; else if($login != '' && $password != '' && $email != ''){ if((preg_match("/(^[0-9a-zA-Z_\.-]{1,}@[0-9a-zA-Z_\-]{1,}\.[0-9a-zA-Z_\-]{2,}$)/", $email)) && (strlen($login)<13)) { $memberDir = "membres/".$login; @mkdir($memberDir); $avatar=checkUpload($memberDir,1); $forum->addMember($login,$password,$email,$signature,$site,$telephone,$avatar); setCookie("CookiePassword", md5($password), time() + (3600 * 24 * 30)); setCookie("CookieLogin", base64_encode($login), time() + (3600 * 24 * 30)); header("Location: index.php"); exit(); } else { $error .= "Vous avez fourni un eMail non valide !"; } } else { $error .= "Remplissez au moins Identifiant, Mot de passe et eMail !"; } break; case 'editprofil': $memberDir = "membres/".$cLogin; if( preg_match("/(^[0-9a-zA-Z_\.-]{1,}@[0-9a-zA-Z_\-]{1,}\.[0-9a-zA-Z_\-]{2,}$)/", $email)) { $avatar=checkUpload($memberDir,1); if($avatar && $error!="") { header("Location: index.php?editprofil=1"); exit(); } else if(!$avatar) $avatar = ""; $signature=stripslashes($signature); $forum->setMember($cLogin,$email,$signature,$site,$telephone,$avatar); } else { header("Location: index.php?editprofil=1"); exit(); } break; case 'newpost': if ($message !='' && $topicID != '' && ($ismember || !$forumMode)) { $anonymous=$anonymous?str_replace(array(" ", """, "'", "/", "&", "."), array("", "", "", "", "", ""), $anonymous):0; if(!$ismember && (!$anonymous || $anonymous=="")) { $error .= "Vous n'avez pas indiqué de pseudonyme valide."; } else if ($forum->isMember($anonymous)) { $error .= "Un membre est déjà inscrit sous ce pseudonyme."; } else { if($s = implode("", file("messages/".$topicID.".dat"))) { $tLogin=$cLogin?$cLogin:$anonymous; $topicObj = unserialize($s); $message = htmlspecialchars($message, ENT_NOQUOTES); $topicObj->addReply($tLogin,$message,checkUpload("membres/".$tLogin,0)); list($time,$title,$auth,$post,$last,$tlast,$attach,$postType)=$topicObj->getInfo(0); $forum->updateTopic($time,$title,$auth,$post,$last,$tlast,$attach,$postType); if($ismember) $forum->setPost($cLogin); header("Location: index.php?topic=".$topicID); exit(); } else $error .= "Ce sujet n'existe pas."; } } break; case 'newtopic': if($titre!='' && $message!='' && ($ismember || !$forumMode)){ if(!$ismember && !$anonymous) { $error .= "Vous n'avez pas indiqué de pseudonyme."; } else if ($forum->isMember($anonymous)) { $error .= "Un membre est déjà inscrit sous ce pseudonyme."; } else { $tLogin=$cLogin?$cLogin:$anonymous; $postType=$postit?1:0; $message = htmlspecialchars($message, ENT_NOQUOTES); $topicObj = new Topic($tLogin,$titre,$message,checkUpload("membres/".$tLogin,0),$postType); list($time,$title,$auth,$post,$last,$tlast,$attach,$postit)=$topicObj->getInfo(0); $forum->addTopic($title,$auth,$time,$attach,$postit); $topic=$time; setCookie("uFread$topic",1,time()+2592000); } } break; case 'mp': if(file_exists("membres/$mpTo/$mpTo.mp")) { $s=implode("", file("membres/$mpTo/$mpTo.mp")); $mpObj=unserialize($s); } else $mpObj= new Messages($mpTo); if($anonymous) $mpObj->addMessage($anonymous." (".$_SERVER['REMOTE_ADDR'].")",$message); else if(!$ismember) $error.="Vous n'avez pas indiqué de pseudonyme !"; else $mpObj->addMessage($cLogin,$message); break; case 'editoption': $tmp=checkUpload("pictures",0); if(($uftitle!=$uforum) || ($tmp)) { if(file_exists($uforum)) unlink($uforum); $uforum=$tmp?$tmp:$uftitle; } $nbrMsgIndex=$nbmess?$nbmess:$nbrMsgIndex; $extStr=$exts?$exts:$extStr; $maxAvatarSize=$maxav?($maxav*1024):$maxAvatarSize; $forumMode=$fmode?1:0; $quoteMode=$qmode?1:0; $siteUrl=$ufsite?$ufsite:''; $siteName=$ufsitename?$ufsitename:'Retour'; $config =""; if($h=@fopen("config.php","w")) {fputs($h,$config);fclose($h);} if(empty($message) && file_exists("welcome.txt")) @unlink("welcome.txt"); else { if($h=@fopen("welcome.txt","w")) {fputs($h,stripslashes($message));fclose($h);} } } // Admin if($isadmin) { if($deluser) { $forum->removeMember($deluser); } else if($switchuser) { $forum->setMod($switchuser); } else if($topic && $postit && !$action) { $type=$postit=="on"?1:0; $forum->setType($topic,$type); } else if($topic && $ntitle) { $forum->setTitle($topic,$ntitle); } else if($topicID && $action=="editpost" && $postID && $message!="") { if($s = implode("", file("messages/".$topicID.".dat"))) { $message = htmlspecialchars($message, ENT_NOQUOTES); $message = "[e]$cLogin le ".date("d/m/y \- H:i",time())."/e\r\n\r\n".$message; $topicObj = unserialize($s); $topicObj->setReply($postID,"",$message); $topic=$topicID; } } else if($topic && $delpost) { if($topic==$delpost) { if(@unlink("messages/".$topic.".dat")) { $forum->delTopic($topic); header("Location: index.php"); exit(); } } else { if($s=implode("", file("messages/".$topic.".dat"))) { $topicObj = unserialize($s); $r=$topicObj->getReply($delpost); @unlink($r[3]); $topicObj->removeReply($delpost); list($time,$title,$auth,$post,$last,$tlast,$attach,$postType)=$topicObj->getInfo(0); $forum->updateTopic($time,$title,$auth,$post,$last,$tlast,$attach,$postType); } } } else if($backup) {$r=do_backup(array("membres","messages"));} else if($restore && $action=="restore") { if(@is_uploaded_file($_FILES['backup']['tmp_name']) && preg_match("/.gz$/i",$_FILES['backup']['name'])) { $r=restore_forum($_FILES['backup']['tmp_name']); } else if(file_exists("backup/forumbkp.gz")) $r=restore_forum("backup/forumbkp.gz"); $error .="Restauration réussie de ".$r[1]." fichiers.
"; $restore=0; $r=init_forum(); } } header('Content-Type: text/html; charset=utf-8'); ?> "; echo ""; ?> "; echo ""; } else { $tmp=decode($uforum); $bbcodes= array(" "," "," "," "," "," ","[e]","/e","[hr]"); echo ""; } echo "\n"; echo "\n
\n"; echo "
\n"; echo "
$tmp
"; // message d erreur ( en cas de mauvais password, user deja existant etc...) if($error ! = "") { echo "
".$error."
"; } if($ismember || !$forumMode){ echo menu(); if($editpost) echo replyForm("editpost"); else if($conf) echo editConf(); else if($topic) echo showPosts(); else if($annuaire) echo showAnnuaire(); else if($editprofil) echo editProfilForm(); else if($private) echo replyForm("mp",$private); else if($restore) echo frestore(); else { echo showTopics(); $st=1; } if(!$forumMode && !$ismember) { echo loginForm(); if(isset($st)) echo welcomeText();} if($havemp) echo showPrivateMsg(); } else { echo loginForm(); echo welcomeText(); } $arr_cnct=$conn->updateVisit($cLogin); $stats=$forum->getStat(); echo "
"; if($stats[0]>1) {$a[0]="s";$a[1]="ont";} else {$a[0]="";$a[1]="a";} $m=($stats[3]>1)?"s":""; $s=($stats[2]>1)?"s":""; $arr_cnct[0]=($arr_cnct[0])?$arr_cnct[0]:"aucun"; echo $stats[3]." message".$m." dans ".$stats[2]." sujet".$s.".
"; echo $stats[0]." membre".$a[0].". Membre le plus récent : ".$stats[1]."\n"; echo "
Membres connectés : ".$arr_cnct[0]." ~ Visiteurs : ".$arr_cnct[1]."\n"; echo "
µforum v$version | XHTML 1.0 Strict | CSS 2.0 | Haut"; echo "
\n"; echo "\n
\n
\n\n"; ?>
Afficher les 11 commentaires

Vous n'êtes pas encore membre ?

inscrivez-vous, c'est gratuit et ça prend moins d'une minute !

Les membres obtiennent plus de réponses que les utilisateurs anonymes.

Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.

Le fait d'être membre vous permet d'avoir des options supplémentaires.