tag) : // ( remove the space between ? and >) // Then, put the following PHP tags where you want data to be displayed // site name ( remove the space between ? and >) // forum name ( remove the space between ? and >) // date ( remove the space between ? and >) // time ( remove the space between ? and >) // navigation ( remove the space between ? and >) // search form ( remove the space between ? and >) // main display ( remove the space between ? and >) // language version ( remove the space between ? and >) // copyright info ( remove the space between ? and >) // language config if ($lang == \"fr\") { // french version setup $helptopic = \"Aide en ligne\"; $helptext = \"En cours de conception\"; $ismod = \"Bonjour Moderateur\"; $ismodtxt = \"vous ne pouvez lire que les articles mod&ecute;r&ecute;s\"; $modlolabel = \"D&ecute;connexion\"; $syslang = \"version française\"; $replylabel = \"Répondre à ce message\"; $dblabel = \"Bases de données\"; $oslabel = \"Systèmes d\'exploitation\"; $netlabel = \"Réseaux\"; $sforumlabel = \"Rechercher :\"; $sb_label = \"Rechercher: \"; // nom du champ de recherche / search box label $cre_label = \"Creer un forum\"; $t_label = \"Titre :\"; $p_label = \"Auteur :\"; $c_label = \"Date :\"; $k_label = \"Clé d\'encryption :\"; $sr_label = \"Résultat de la recherche pour :\"; $post_label = \"poster\"; $m_label = \"Article :\"; $toc_label = \"Choisir ce forum\"; $newmsg_label = \">> Ecrire un article\"; $home_label = \"Accueil\"; $help_label = \"Aide\"; } else { // english version setup $helptopic = \"online help\"; $helptext = \"Under construction\"; $ismod = \"Welcome Moderator\"; $ismodtxt = \"you can only browse moderated articles\"; $modlolabel = \"logout\"; $lang = \"en\"; $syslang = \"Engish version\"; $replylabel = \"Reply to this message\"; $dblabel = \"Databases\"; $oslabel = \"Operating systems\"; $netlabel = \"Networks\"; $sforumlabel = \"choose a forum\"; $sb_label = \"Search: \"; // nom du champ de recherche / search box label $t_label = \"Title :\"; $p_label = \"Author :\"; $c_label = \"Date :\"; $k_label = \"Encryption key:\"; $sr_label = \"Search result for :\"; $post_label = \"post\"; $m_label = \"Article :\"; $toc_label = \"Choose\"; $newmsg_label = \">> Post new article\"; $home_label = \"Home\"; $help_label = \"Help\"; $cre_label = \"create new forum\"; } $style = \"\"; $copyr = \"FrancoForum © Jean-Marc Lelièvre 2001\"; // // this where configuration stops, you can change som stuff below but that\'s // at your own risks... $ver = date(\"d/m/Y - H:i\", filemtime($PATH_TRANSLATED)); $rel = \"1.0b\"; $sitename = \" $sitename $rel\"; if ($modlogout) { setcookie(\"FFmod\"); setcookie(\"user\"); setcookie(\"email\"); $user = \"\"; $email = \"\"; header (\"Location: $page\"); } if ($modadm) { $ttl = time()+1800; $FFmod = $ttl; setcookie(\"FFmod\", \"$FFmod\", time()+18000, \"/\"); setcookie(\"user\", \"$user\", time()+18000, \"/\"); setcookie(\"email\", \"$email\", time()+18000, \"/\"); } if ($install) { if ($dbpass) { $sid = mysql_connect($dbhost, $dbuser,$dbpass); } else { $sid = mysql_connect($dbhost, $dbuser); } mysql_create_db($db, $sid); if ($dbpass) { $sid = mysql_connect($dbhost, $dbuser,$dbpass); } else { $sid = mysql_connect($dbhost, $dbuser); } mysql_select_db($db, $sid); // database tables $messages_table = \" CREATE TABLE $tbl ( id int(11) NOT NULL auto_increment, title varchar(64), poster varchar(64), created datetime, parent int(11), body blob, fname varchar(40), ckey varchar(100), PRIMARY KEY (id) ) \"; mysql_query($messages_table, $sid); $forum_list_table = \" CREATE TABLE forlist ( forname varchar(50) NOT NULL, forgroup varchar(50) NOT NULL, moder tinyint(2) DEFAULT \'0\' NOT NULL, crypto tinyint(2) DEFAULT \'0\' NOT NULL, defckey varchar(100) NOT NULL, id int(5) unsigned NOT NULL auto_increment, UNIQUE id (id), KEY forname (forname) ) \"; mysql_query($forum_list_table, $sid); $group_list_table = \" CREATE TABLE grouplist ( gname varchar(50) NOT NULL, owner varchar(50) DEFAULT \'wizekat\' NOT NULL, email varchar(100) DEFAULT \'wizekat@mac.com\' NOT NULL, UNIQUE gname (gname), KEY owner (owner) ) \"; mysql_query($group_list_table, $sid); header (\"Location: $page\"); exit; } $date = date(\"Y-m-d\"); // expiration of old articles // when running a busy forum you can cut and paste // in a separate file and run it from a daily cron job // with a command like : php my-expire-script.php // this will speedup overall performance if you want to keep // articles for a long time (over 30 days) $exval = time()-($expire*24*60*60); $eqr = \"DELETE from $tbl \"; $eqr.= \"WHERE UNIX_TIMESTAMP(created) < $exval \"; if ($dbpass) { $sid = mysql_connect($dbhost, $dbuser,$dbpass); } else { $sid = mysql_connect($dbhost, $dbuser); } mysql_select_db($db, $sid); mysql_query($eqr, $sid); // end of expiration routine if ($newp) { $postit = \"new\"; } if ($ckey != \"\") { $cyph = 1; } $screen = \"\"; function x_E($string, $key) { for($i=0; $i $home_label $cre_label $help_label&nbs p;English  Français\"; $sform = \"
$sb_label
 
\"; $ugr = \"
create group/forum
User:
email:
group:
forum:
Moderated
Encryption:
Default key:
\"; if (!$FFmod) { $moderator = \"
Moderator logon
User: email:
\"; } else { $moderator = \"$ismod:$user  $modlolabel
$ismodtxt\"; // $modadm = 1; } if ($usergroup) { if ($dbpass) { $sid = mysql_connect($dbhost, $dbuser,$dbpass); } else { $sid = mysql_connect($dbhost, $dbuser); } mysql_select_db($db, $sid); $query = \"INSERT into grouplist VALUES ( \"; $query.= \"\\\"$usergroup\\\", \\\"$user\\\", \\\"$email\\\") \"; mysql_query($query,$sid); $query = \"INSERT into forlist VALUES ( \"; $query.= \"\\\"$userfor\\\", \\\"$usergroup\\\", $moder, $crypto, \\\"$defckey\\\", 0) \"; mysql_query($query,$sid); $fname = $userfor; } elseif ($action != \"\") { if (($action == \"post\") && ($fname != \"\")) { $inputtitle = ereg_replace(\"\'\",\"\'\'\",$inputtitle); $inputbody = ereg_replace(\"\'\",\"\'\'\",$inputbody); if (($cyph) && ($ckey)) { $inputbody = x_E($inputbody,$ckey); } if ($dbpass) { $sid = mysql_connect($dbhost, $dbuser,$dbpass); } else { $sid = mysql_connect($dbhost, $dbuser); } mysql_select_db($db, $sid); $query = \"insert into $tbl \"; $query.= \"values( 0, \\\"$inputtitle\\\", \\\"$inputposter\\\", now(), $inputparent, \\\"$inputbody\\\", \\\"$fname\\\", \\\"$ckey\\\" )\"; mysql_query($query,$sid); if (substr($fname,0,1) == \"_\") { $flen = strlen($fname) - 1; // $forumname = \"

\"; $fname = substr($fname,1,$flen); // $forumname.= \"

\"; } } } if ($fname) { $forhead = \"$fname\"; $forhead.= \"
\"; $forumname = \"

$fname

\"; if (substr($fname,0,1) != \"_\") { $flen = strlen($fname) - 1; $forumname = \"

\"; $forumname.= substr($fname,1,$flen); $forumname.= \"

\"; } } $screen = \"
\"; if ($sa) { $screen.= \"$forhead\"; } $screen.= \"\"; $screen.= \"\\n\"; $screen.= \"\\n\"; if ($crypto == 1) { $screen.= \"\\n\"; } $screen.= \"\\n\"; $screen.= \"\\n\"; $screen.= \"\\n
$moderator$sitename
updated: $ver
$date $heure:$minute:$seconde   $syslang$sform
$nav
\"; if ($cre) { $screen.= \"

Create user forum


$ugr
\"; } if ($dbpass) { $sid = mysql_connect($dbhost, $dbuser,$dbpass); } else { $sid = mysql_connect($dbhost, $dbuser); } mysql_select_db($db, $sid); // list messages function msglist($fn) { global $sid; global $tbl; global $FFmod; global $cry; global $mod; global $screen; global $lang; $query = \"select fname \"; $query.= \"from $tbl \"; $query.= \"where fname=\\\"$fn\\\" \"; $query.= \"order by created DESC\"; $reponse = mysql_query($query, $sid); $nm = mysql_num_rows($reponse); $screen.= \"
  • \"; $screen.= \"$fn : $nm\"; if ($cry == 1) { $screen.= \" [C]\"; } if ($mod == 1) { $screen.= \" [M]\"; } $screen.= \"
  • \\n\"; } function showMessages($parentid, $fname) { global $fname; global $sid; global $tbl; global $screen; global $lang; global $crypto; global $mod; global $FFmod; $datetouse = Date(\"U\"); $screen.= \"
      \\n\"; $query = \"select id, title,created,parent \"; $query.= \"from $tbl \"; $query.= \"where fname=\\\"$fname\\\" \"; if (!$FFmod) { $query.= \"AND parent=$parentid \"; } $query.= \"order by created DESC \"; $reponse = mysql_query($query, $sid); while ($row = mysql_fetch_row($reponse)) { $messageid = $row[0]; $messagetitle = $row[1]; $messagecreated = $row[2]; $messageparent = $row[3]; // $fname = $row[6]; $screen.= \"
    • $messagetitle ($messagecreated) \"; if ($FFmod) { $screen.= \" [VALID]\"; $screen.= \" [REJECT]\"; } if (!$FFmod) { showMessages($messageid,$fname); } $rowcount++; } $screen.= \"
    \\n\"; // echo $screen; } function postform($parentid,$usetitle,$fname) { global $fname; global $t_label; global $p_label; global $k_label; global $post_label; global $crypto; global $ckey; global $screen; global $lang; global $mod; $screen.= \"
    \"; $screen.= \"\"; $screen.= \"\"; if ($mod == 1) { $fmod = \"_\"; } $screen.= \"\"; $screen.= \"\\n\"; $screen.= \"\\n\"; $screen.= \"\\n\"; if ($crypto == 1) { $screen.= \"\\n\"; } $screen.= \"\\n\"; $screen.= \"\\n\"; $screen.= \"\\n
    $t_label
    $p_label
    $k_label
    \"; // echo $screen; } if ($messageid > 0) { if ($FFmod) { $flen = strlen($fname) - 1; $fname = substr($fname,1,$flen); if ($valid == 1) { $query = \"UPDATE $tbl SET fname = \\\"$fname\\\" WHERE id=$messageid \"; mysql_query($query,$sid); $screen.= \"$fnane art: $messageid APPROVED
    \"; } elseif ($valid == 0) { $query = \"DELETE from $tbl WHERE id=$messageid \"; mysql_query($query,$sid); $screen.= \"$fnane art: $messageid DELETED
    \"; } $messageid = 0; $fname = \"_\".$fname; } else { $query = \"select * from $tbl WHERE id=$messageid \"; // $query = $query . \"where id=$messageid \"; $reponse = mysql_query($query,$sid); if ($row = mysql_fetch_row($reponse)) { $messagetitle = $row[1]; $messageposter = $row[2]; $messagecreated = $row[3]; $messageparent = $row[4]; $messagebody = $row[5]; if (($cyph) && ($key)) { $messagebody = x_D($messagebody,$key); } $screen.= \"\\n\"; if ($rep) { $screen.= \"\\n\"; $screen.= \"\\n
    Date: $messagecreated, [$messageposter] :
    $messagebody
    \"; postform($messageid, \"Re: $messagetitle\", $fname); } else { $screen.= \"\\n
    $t_label$messagetitle
    $p_label$messageposter
    $c_label$messagecreated
    $k_label  

    $m_label
    $messagebody
    \"; $screen.= \"

    $replylabel

    \\n\"; } } } } if ($messageid < 1 || !$messageid) { // else { if ($postit) { postform(0, \"\", $fname); } else { $screen.= \"\\n
    \\n\"; if ($fname) { showMessages(0,$fname); } elseif ($help) { $screen.= \"

    Mode d\'emploi / how to use $sitename

    \\n\"; $screen.= \"
    1. $helptopic

      $helptext

    2. \"; if ($crypo == 1) { $screen.= \"
    3. $helpcrypto

      $helpcryptotext

    4. \"; } $screen.= \"
    \\n\"; } else { // list groups, forums and count articles if ($FFmod) { $rows = 3; $lines = 0; $qry = \"SELECT gname FROM grouplist WHERE owner = \\\"$user\\\" AND email =\\\"$email\\\" ORDER BY gname \"; $reponse = mysql_query($qry, $sid); $screen.= \"
      \"; while ($row = mysql_fetch_row($reponse)) { $mfor = $row[0]; $screen.= \"
    1. $user // $mfor

      \"; $qr = \"SELECT forname, forgroup, crypto, moder FROM forlist \"; $qr.= \"WHERE forgroup = \\\"$mfor\\\" \"; $qr.= \"AND moder = 1 \"; $qr.= \"ORDER BY forname \"; $llist = mysql_query($qr, $sid); $screen.= \"
        \"; while ($rw = mysql_fetch_row($llist)) { if ($rw[0] != \"$fn\") { $lines++; $fn = \"_\"; $fn.= $rw[0]; $cry = $rw[2]; $mod = $rw[3]; msglist($fn); } if ($lines > $rows) { $screen.= \"
      \"; $lines = 0; } } $screen.= \"
    \"; } $screen.= \"\"; } elseif ($fgr) { $rows = 3; $lines = 0; $qr = \"SELECT forname, forgroup, crypto, moder FROM forlist \"; $qr.= \"WHERE forgroup = \\\"$fgr\\\" ORDER BY forname \"; $llist = mysql_query($qr, $sid); $screen.= \"

    Group: $fgr

      \"; while ($rw = mysql_fetch_row($llist)) { $lines++; $fn = $rw[0]; $cry = $rw[2]; $mod = $rw[3]; msglist($fn); if ($lines > $rows) { $screen.= \"

    Group: $fgr

      \"; $lines = 0; } } } else { $rows = 3; $lines = 0; $qry = \"SELECT gname FROM grouplist ORDER BY gname \"; $reponse = mysql_query($qry, $sid); $screen.= \"

      Group list

        \"; while ($row = mysql_fetch_row($reponse)) { $lines++; $screen.= \"
      1. $row[0]
      2. \\n\"; if ($lines > $rows) { $screen.= \"

    Group list

      \"; $lines = 0; } } } if ($item != \"\") { if ($dbpass) { $sid = mysql_connect($dbhost, $dbuser,$dbpass); } else { $sid = mysql_connect($dbhost, $dbuser); } mysql_select_db($db, $sid); $query = \"select * from $tbl \"; $query.= \"where title like \\\"%$item%\\\" \"; $query.= \"OR poster like \\\"%$item%\\\" \"; $query.= \"OR body like \\\"%$item%\\\" \"; $query.= \"OR created like \\\"%$item%\\\" \"; $query.= \"ORDER by created DESC \"; $reponse = mysql_query($query, $sid); $screen.= \"$sr_label $item
        \"; $count = mysql_num_rows($reponse); if ($deb == \"\") { $deb = 10; } if ($start == \"\") { $start = 0; } $show = 0; while (($row = mysql_fetch_row($reponse)) && ($show < $deb)) { $show++; if ($show > $start) { $screen.= \"
      1. $row[1] ($row[3])
        Forum: $row[6] $p_label: $row[2]
      2. \\n\"; } } $screen.= \"

      Resultat(s) 1 ‡ $show sur $count - \"; $start = $show; $deb = ($deb + 10); $screen.= \"Suivant( s).
    \"; $screen.= \"
    \\n\"; // exit; } $screen.= \"\\n\"; $screen.= \"\\n\"; } $screen.= \"\"; } } $screen.= \"$copyr \\n\"; if ($sa) { echo \"$sitename : $forumname$style\"; echo \"$screen\"; } ?>