Verfasst: 07.03.2005 15:41
haste mich vergessen ? [ externes Bild ]Rat hat geschrieben:sei nachsichtig aber das werd ich morgen zusammenfassen. jetzt gibt's ertmal ne gute nacht kippe und dann ab in die falle ...
phpBB.de - Die deutsche phpBB-Community
https://www.phpbb.de/community/
haste mich vergessen ? [ externes Bild ]Rat hat geschrieben:sei nachsichtig aber das werd ich morgen zusammenfassen. jetzt gibt's ertmal ne gute nacht kippe und dann ab in die falle ...
da kann ich mich nur selbst zitieren, wobei der erste Codeblock in irgendeine Datei eingefügt werden kann, der Zweite in der lexicon.php stehen sollte ...pi hat geschrieben:na dann, befolge ich mal mein eigenes Kochrezept:
- einfach ein inputfeld mit nem suchen-buttonsoweit easyCode: Alles auswählen
<form action="lexikon.php" method="post"> <input type="text" name="suchwort"></input> <input type="submit" name="suchen" value="suchen"></input> </form>
![]()
- und dann nur die präfix_lexique Tabelle mit einem SELECT WHERE Befehl durchsuchen (natürlich muß erst eine Verbindung zur Datenbank hergestellt werden, das hab ich aber nich extra dazu geschrieben, weil das in der Lexikon.php schon geschehen ist)so, ich habs noch nicht getestet, aber das müßte funktionieren, ...Code: Alles auswählen
// erst mal die Variablen "sichern" if ( isset($HTTP_GET_VARS['suchen']) || isset($HTTP_POST_VARS['suchen']) ) { $suchwort = ( isset($HTTP_POST_VARS['suchwort']) ) ? htmlspecialchars($HTTP_POST_VARS['suchwort']) : htmlspecialchars($HTTP_GET_VARS['suchwort']); } else { $suchwort = ''; } // jetzt die Tabelle nach dem Suchwort durchsuchen if(isset($suchwort)) { $SQL = "SELECT * FROM phpbb_lexique WHERE titre LIKE '%".$suchwort."%' OR explication LIKE '%".$suchwort."%' ORDER BY titre"; // Jetzt wollen wir das natürlich noch ausgeben (in der lexikon.php schon vorhanden): $res = mysql_query($SQL); // nicht zum zitat/ nachträglich eingefügt //wurde nichts gefunden wird dies gemeldet if(!mysql_num_rows($res)) { echo "<tr><td>"; echo "Der Begriff "<b>".$suchwort."</b>" konnte in der Datenbank nicht gefunden werden.<br>" . "</td></tr>"; } //wurde etwas gefunden, erfolgt die ausgabe else // nicht zum zitat/ nachträglich eingefügt - Ende while($val=mysql_fetch_array($res)) { echo "<b>".$val["titre"]."</b><br>" . "<div align=justify>".$val["explication"]."<br></div>"; } }
tja, und was lernen wir daraus? mein Kochrezept war Klartext, und mit den beiden angegebene Links hätte man auch selbst drauf kommen können und nicht so lange warten müssen
viel spaß damit
Code: Alles auswählen
<?php
/***************************************************************************
* debut : jeudi 22 juillet 2004
* copyright : http://www.experienz.net
* Auteur : eXperienZ.NET
* version : 1.0
* email : nellsy@experienz.net
* module : lexique
****************************************************************************
* description :
*
* Ajoute un lexique en MOD sur un forum de type PhpBB.
* La configuration du mod, ainsi que la modification de mot
* se fais via le panneau d'administration.
****************************************************************************
* MOD crée par l'équipe d'eXperienZ.NET
****************************************************************************/
define('IN_PHPBB', true);
$phpbb_root_path = './'; // <--
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
// Connection au fichier de la base de données
include("config.php");
// connection a la base de donnees
$connect = mysql_connect($dbhost,$dbuser,$dbpasswd);
// selection de la base
mysql_select_db($dbname, $connect);
// Définition des tables utilisés pour le lexique
$table = "phpbb_lexique_config"; // Par défaut phpbb_lexique_config
$table2 = "phpbb_lexique"; // Par défaut phpbb_lexique
$table_session = "phpbb_session"; // Par défaut phpbb_session
//Requête de selection des entrées
$affiche="SELECT * FROM $table ";
$result = mysql_query($affiche);
$val = mysql_fetch_array($result);
//Récupération des variables avant de les afficher
$nom_page=$val['nom_page'];
$explication_page=$val['explication_page'];
if (!$userdata['session_logged_in'] )
{
redirect(append_sid("login.$phpEx?redirect=glossar.$phpEx", true));
}
if ( isset($HTTP_GET_VARS['alle']) || isset($HTTP_POST_VARS['alle']) )
{
echo"<b>- <a class='lettre2' href='glossar.php?alle=1'>Alle</a></b>";
}
else
{
echo"<b>- <a class='lettre' href='glossar.php?alle=1'>Alle</a></b>";
}
?>
<HEAD>
<style type="text/css">
<!--
body, td, { font:normal 8pt Verdana; color:#000000 }
.lettre { font:bold 10pt Verdana; text-decoration:none }
.lettre:hover { text-decoration:underline; color:red }
.lettre2 { font:bold 13pt Verdana; color:red }
.lettre3 { font:bold 8pt Verdana; color:#646464 }
.siteTitle { font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif; font-size : 22px; font-weight : bold; text-decoration : none; line-height : 120%; color : #000000; }
.siteText { font-size : 12px; font-family: Verdana, Arial, Helvetica, sans-serif;}
td { font-family: Verdana, Arial, Helvetica, sans-serif }
.bodyline { background-color: #C0C0C0; border: 1px #000000 solid; }
.forumline { background-color: #C0C0C0; }
td.row1 { background-color: #EFEFEF; }
.postbody { font-size : 12px; line-height: 18px}
--></STYLE>
<table width="90%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left"><span class="nav"><a class="nav" href="index.php">Kaiserliche Marine Foren -Übersicht</a>
<a name="Übersicht"></a></span></td>
</tr>
</table>
<center>
<table class="forumline" width="90%" cellspacing="1" cellpadding="0" border="0" style="border-collapse: collapse" bordercolor="#000000">
<tr>
<th class="thHead" height="25" valign="middle"><span class="tableTitle">Glossar</font></span></th>
</tr>
<tr>
<td width="100%" align=left style="font-size: 12px; font-family: Verdana, Arial, Helvetica, sans-serif">
<center>
<table cellspacing=10>
<tr><td align=center>
<b><br />
<span class="siteTitle"><? echo $nom_page; ?></span></b><br />
<span class="mainmenu"><? echo $explication_page; ?></span><br />
</td>
</tr>
</table></center>
<center>
<table cellspacing=10>
<tr><td align=center>
<span class="mainmenu">
<a href="http://www.u-boot-net.de/phpBB/viewtopic.php?t=717">Vorschläge für neue Einträge oder Definitions-Verbesserungen bitte <u>hier</u> posten!</a></span><br />
</td>
</tr>
</table></center>
<center>
<table width="60%" cellspacing=10>
<tr><td align=center>
<?
// Recherche les lettres présentes dans le lexique
$res = mysql_query("SELECT DISTINCT ord(titre) FROM $table2");
$temp = " ";
while($val=mysql_fetch_array($res)) $temp.=strtoupper(chr($val[0]));
// Affichage de l'alphabet
for($i=65;$i<91;$i++) {
if($lettre==chr($i))
// Lettre sélectionnée
echo "<font class=lettre2>".chr($i)." </font>";
elseif(!strpos($temp,chr($i)))
// Lettre sans définition
echo "<font class=lettre3>".chr($i)." </font>";
else
// Lien
echo "<A class=lettre href='glossar.php?lettre=".chr($i)."'>".chr($i)."</A> ";
}
if ( isset($HTTP_GET_VARS['alle']) || isset($HTTP_POST_VARS['alle']) )
{
echo"<b>- <a class='lettre2' href='glossar.php?alle=1'>Alle</a></b>";
}
else
{
echo"<b>- <a class='lettre' href='glossar.php?alle=1'>Alle</a></b>";
} ?>
<br /><br />
</td></tr>
<?
if($lettre)
// Sélectionne les définitions correspondant à la lettre
$SQL = "SELECT * FROM $table2 WHERE titre LIKE '".$lettre."%' ORDER BY titre";
else
// ou fait un tirage aléatoire sur la page d'accueil
$SQL = "SELECT * FROM $table2 ORDER BY titre";
// Affiche les définitions entrées dans la table
$res = mysql_query($SQL);
while($val=mysql_fetch_array($res)) {
echo "<tr><td>";
echo "<b>".$val["titre"]."</b><br>"
. "<div align=justify>".$val["explication"]."<br></div>"
. "</td></tr>";
}
?>
</td>
</tr>
</table><br /><br />
</td></tr>
</table>
<p>
<?
// Déconnection de la base de données
mysql_close();
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>
Code: Alles auswählen
if ( isset($HTTP_GET_VARS['lettre']) || isset($HTTP_POST_VARS['lettre']) )
{
$lettre = ( isset($HTTP_POST_VARS['lettre']) ) ? htmlspecialchars($HTTP_POST_VARS['lettre']) : htmlspecialchars($HTTP_GET_VARS['lettre']);
}
else
{
$lettre = '';
}
Code: Alles auswählen
<?php
/***************************************************************************
* debut : jeudi 22 juillet 2004
* copyright : http://www.experienz.net
* Auteur : eXperienZ.NET
* version : 1.0
* email : nellsy@experienz.net
* module : lexique
****************************************************************************
* description :
*
* Ajoute un lexique en MOD sur un forum de type PhpBB.
* La configuration du mod, ainsi que la modification de mot
* se fais via le panneau d'administration.
****************************************************************************
* MOD crée par l'équipe d'eXperienZ.NET
****************************************************************************/
define('IN_PHPBB', true);
$phpbb_root_path = './'; // <--
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
// Connection au fichier de la base de données
include("config.php");
// connection a la base de donnees
$connect = mysql_connect($dbhost,$dbuser,$dbpasswd);
// selection de la base
mysql_select_db($dbname, $connect);
// Définition des tables utilisés pour le lexique
$table = "phpbb_lexique_config"; // Par défaut phpbb_lexique_config
$table2 = "phpbb_lexique"; // Par défaut phpbb_lexique
$table_session = "phpbb_session"; // Par défaut phpbb_session
//Requête de selection des entrées
$affiche="SELECT * FROM $table ";
$result = mysql_query($affiche);
$val = mysql_fetch_array($result);
//Récupération des variables avant de les afficher
$nom_page=$val['nom_page'];
$explication_page=$val['explication_page'];
if (!$userdata['session_logged_in'] )
{
redirect(append_sid("login.$phpEx?redirect=glossar.$phpEx", true));
}
if ( isset($HTTP_GET_VARS['alle']) || isset($HTTP_POST_VARS['alle']) )
{
echo"<b>- <a class='lettre2' href='glossar.php?alle=1'>Alle</a></b>";
}
else
{
echo"<b>- <a class='lettre' href='glossar.php?alle=1'>Alle</a></b>";
}
if ( isset($HTTP_GET_VARS['lettre']) || isset($HTTP_POST_VARS['lettre']) )
{
$lettre = ( isset($HTTP_POST_VARS['lettre']) ) ? htmlspecialchars($HTTP_POST_VARS['lettre']) : htmlspecialchars($HTTP_GET_VARS['lettre']);
}
else
{
$lettre = '';
}
// erst mal die Variablen "sichern"
if ( isset($HTTP_GET_VARS['suchen']) || isset($HTTP_POST_VARS['suchen']) )
{
$suchwort = ( isset($HTTP_POST_VARS['suchwort']) ) ? htmlspecialchars($HTTP_POST_VARS['suchwort']) : htmlspecialchars($HTTP_GET_VARS['suchwort']);
}
else
{
$suchwort = '';
}
// jetzt die Tabelle nach dem Suchwort durchsuchen
if(isset($suchwort))
{
$SQL = "SELECT * FROM phpbb_lexique WHERE titre LIKE '%".$suchwort."%' OR explication LIKE '%".$suchwort."%' ORDER BY titre";
// Jetzt wollen wir das natürlich noch ausgeben (in der glossar.php schon vorhanden):
$res = mysql_query($SQL);
// nicht zum zitat/ nachträglich eingefügt
//wurde nichts gefunden wird dies gemeldet
if(!mysql_num_rows($res))
{
echo "<tr><td>";
echo "Der Begriff \"<b>".$suchwort."</b>\" konnte in der Datenbank nicht gefunden werden.<br>"
. "</td></tr>";
}
//wurde etwas gefunden, erfolgt die ausgabe
else
// nicht zum zitat/ nachträglich eingefügt - Ende
while($val=mysql_fetch_array($res))
{
echo "<b>".$val["titre"]."</b><br>" . "<div align=justify>".$val["explication"]."<br></div>";
}
}
?>
<HEAD>
<style type="text/css">
<!--
body, td, { font:normal 8pt Verdana; color:#000000 }
.lettre { font:bold 10pt Verdana; text-decoration:none }
.lettre:hover { text-decoration:underline; color:red }
.lettre2 { font:bold 13pt Verdana; color:red }
.lettre3 { font:bold 8pt Verdana; color:#646464 }
.siteTitle { font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif; font-size : 22px; font-weight : bold; text-decoration : none; line-height : 120%; color : #000000; }
.siteText { font-size : 12px; font-family: Verdana, Arial, Helvetica, sans-serif;}
td { font-family: Verdana, Arial, Helvetica, sans-serif }
.bodyline { background-color: #C0C0C0; border: 1px #000000 solid; }
.forumline { background-color: #C0C0C0; }
td.row1 { background-color: #EFEFEF; }
.postbody { font-size : 12px; line-height: 18px}
--></STYLE>
<table width="90%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left"><span class="nav"><a class="nav" href="index.php">Kaiserliche Marine Foren -Übersicht</a>
<a name="Übersicht"></a></span></td>
</tr>
</table>
<center>
<table class="forumline" width="90%" cellspacing="1" cellpadding="0" border="0" style="border-collapse: collapse" bordercolor="#000000">
<tr>
<th class="thHead" height="25" valign="middle"><span class="tableTitle">Glossar</font></span></th>
</tr>
<tr>
<td width="100%" align=left style="font-size: 12px; font-family: Verdana, Arial, Helvetica, sans-serif">
<center>
<table cellspacing=10>
<tr><td align=center>
<b><br />
<span class="siteTitle"><? echo $nom_page; ?></span></b><br />
<span class="mainmenu"><? echo $explication_page; ?></span><br />
</td>
</tr>
</table></center>
<center>
<table cellspacing=10>
<tr><td align=center>
<span class="mainmenu">
<a href="http://www.u-boot-net.de/phpBB/viewtopic.php?t=717">Vorschläge für neue Einträge oder Definitions-Verbesserungen bitte <u>hier</u> posten!</a></span><br />
</td>
</tr>
<tr><td align=center>
<span class="mainmenu">
<form action="glossar.php" method="post">
<input type="text" name="suchwort"></input>
<input type="submit" name="suchen" value="suchen"></input>
</form>
</td>
</tr>
</table></center>
<center>
<table width="60%" cellspacing=10>
<tr><td align=center>
<?
// Recherche les lettres présentes dans le lexique
$res = mysql_query("SELECT DISTINCT ord(titre) FROM $table2");
$temp = " ";
while($val=mysql_fetch_array($res)) $temp.=strtoupper(chr($val[0]));
// Affichage de l'alphabet
for($i=65;$i<91;$i++) {
if($lettre==chr($i))
// Lettre sélectionnée
echo "<font class=lettre2>".chr($i)." </font>";
elseif(!strpos($temp,chr($i)))
// Lettre sans définition
echo "<font class=lettre3>".chr($i)." </font>";
else
// Lien
echo "<A class=lettre href='glossar.php?lettre=".chr($i)."'>".chr($i)."</A> ";
}
if ( isset($HTTP_GET_VARS['alle']) || isset($HTTP_POST_VARS['alle']) )
{
echo"<b>- <a class='lettre2' href='glossar.php?alle=1'>Alle</a></b>";
}
else
{
echo"<b>- <a class='lettre' href='glossar.php?alle=1'>Alle</a></b>";
} ?>
<br /><br />
</td></tr>
<?
if($lettre)
// Sélectionne les définitions correspondant à la lettre
$SQL = "SELECT * FROM $table2 WHERE titre LIKE '".$lettre."%' ORDER BY titre";
else
// ou fait un tirage aléatoire sur la page d'accueil
$SQL = "SELECT * FROM $table2 ORDER BY titre";
// Affiche les définitions entrées dans la table
$res = mysql_query($SQL);
while($val=mysql_fetch_array($res)) {
echo "<tr><td>";
echo "<b>".$val["titre"]."</b><br>"
. "<div align=justify>".$val["explication"]."<br></div>"
. "</td></tr>";
}
?>
</td>
</tr>
</table><br /><br />
</td></tr>
</table>
<p>
<?
// Déconnection de la base de données
mysql_close();
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>
Code: Alles auswählen
<?php
/***************************************************************************
* debut : jeudi 22 juillet 2004
* copyright : http://www.experienz.net
* Auteur : eXperienZ.NET
* version : 1.0
* email : nellsy@experienz.net
* module : lexique
****************************************************************************
* description :
*
* Ajoute un lexique en MOD sur un forum de type PhpBB.
* La configuration du mod, ainsi que la modification de mot
* se fais via le panneau d'administration.
****************************************************************************
* MOD crée par l'équipe d'eXperienZ.NET
****************************************************************************/
define('IN_PHPBB', true);
$phpbb_root_path = './'; // <--
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
// Connection au fichier de la base de données
include("config.php");
// connection a la base de donnees
$connect = mysql_connect($dbhost,$dbuser,$dbpasswd);
// selection de la base
mysql_select_db($dbname, $connect);
// Définition des tables utilisés pour le lexique
$table = "phpbb_lexique_config"; // Par défaut phpbb_lexique_config
$table2 = "phpbb_lexique"; // Par défaut phpbb_lexique
$table_session = "phpbb_session"; // Par défaut phpbb_session
//Requête de selection des entrées
$affiche="SELECT * FROM $table ";
$result = mysql_query($affiche);
$val = mysql_fetch_array($result);
//Récupération des variables avant de les afficher
$nom_page=$val['nom_page'];
$explication_page=$val['explication_page'];
if (!$userdata['session_logged_in'] )
{
redirect(append_sid("login.$phpEx?redirect=glossar.$phpEx", true));
}
if ( isset($HTTP_GET_VARS['alle']) || isset($HTTP_POST_VARS['alle']) )
{
echo"<b>- <a class='lettre2' href='glossar.php?alle=1'>Alle</a></b>";
}
else
{
echo"<b>- <a class='lettre' href='glossar.php?alle=1'>Alle</a></b>";
}
if ( isset($HTTP_GET_VARS['lettre']) || isset($HTTP_POST_VARS['lettre']) )
{
$lettre = ( isset($HTTP_POST_VARS['lettre']) ) ? htmlspecialchars($HTTP_POST_VARS['lettre']) : htmlspecialchars($HTTP_GET_VARS['lettre']);
}
else
{
$lettre = '';
}
// erst mal die Variablen "sichern"
if ( isset($HTTP_GET_VARS['suchen']) || isset($HTTP_POST_VARS['suchen']) )
{
$suchwort = ( isset($HTTP_POST_VARS['suchwort']) ) ? htmlspecialchars($HTTP_POST_VARS['suchwort']) : htmlspecialchars($HTTP_GET_VARS['suchwort']);
}
else
{
$suchwort = '';
}
?>
<HEAD>
<style type="text/css">
<!--
body, td, { font:normal 8pt Verdana; color:#000000 }
.lettre { font:bold 10pt Verdana; text-decoration:none }
.lettre:hover { text-decoration:underline; color:red }
.lettre2 { font:bold 13pt Verdana; color:red }
.lettre3 { font:bold 8pt Verdana; color:#646464 }
.siteTitle { font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif; font-size : 22px; font-weight : bold; text-decoration : none; line-height : 120%; color : #000000; }
.siteText { font-size : 12px; font-family: Verdana, Arial, Helvetica, sans-serif;}
td { font-family: Verdana, Arial, Helvetica, sans-serif }
.bodyline { background-color: #C0C0C0; border: 1px #000000 solid; }
.forumline { background-color: #C0C0C0; }
td.row1 { background-color: #EFEFEF; }
.postbody { font-size : 12px; line-height: 18px}
--></STYLE>
<table width="90%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left"><span class="nav"><a class="nav" href="index.php">Kaiserliche Marine Foren -Übersicht</a>
<a name="Übersicht"></a></span></td>
</tr>
</table>
<center>
<table class="forumline" width="90%" cellspacing="1" cellpadding="0" border="0" style="border-collapse: collapse" bordercolor="#000000">
<tr>
<th class="thHead" height="25" valign="middle"><span class="tableTitle">Glossar</font></span></th>
</tr>
<tr>
<td width="100%" align=left style="font-size: 12px; font-family: Verdana, Arial, Helvetica, sans-serif">
<center>
<table cellspacing=10>
<tr><td align=center>
<b><br />
<span class="siteTitle"><? echo $nom_page; ?></span></b><br />
<span class="mainmenu"><? echo $explication_page; ?></span><br />
</td>
</tr>
</table></center>
<center>
<table cellspacing=10>
<tr><td align=center>
<span class="mainmenu">
<a href="http://www.u-boot-net.de/phpBB/viewtopic.php?t=717">Vorschläge für neue Einträge oder Definitions-Verbesserungen bitte <u>hier</u> posten!</a></span><br />
</td>
</tr>
<tr><td align=center>
<span class="mainmenu">
<form action="glossar.php" method="post">
<input type="text" name="suchwort"></input>
<input type="submit" name="suchen" value="suchen"></input>
</form>
</td>
</tr>
</table></center>
<center>
<table width="60%" cellspacing=10>
<tr><td align=center>
<?
// Recherche les lettres présentes dans le lexique
$res = mysql_query("SELECT DISTINCT ord(titre) FROM $table2");
$temp = " ";
while($val=mysql_fetch_array($res)) $temp.=strtoupper(chr($val[0]));
// Affichage de l'alphabet
for($i=65;$i<91;$i++) {
if($lettre==chr($i))
// Lettre sélectionnée
echo "<font class=lettre2>".chr($i)." </font>";
elseif(!strpos($temp,chr($i)))
// Lettre sans définition
echo "<font class=lettre3>".chr($i)." </font>";
else
// Lien
echo "<A class=lettre href='glossar.php?lettre=".chr($i)."'>".chr($i)."</A> ";
}
if ( isset($HTTP_GET_VARS['alle']) || isset($HTTP_POST_VARS['alle']) )
{
echo"<b>- <a class='lettre2' href='glossar.php?alle=1'>Alle</a></b>";
}
else
{
echo"<b>- <a class='lettre' href='glossar.php?alle=1'>Alle</a></b>";
} ?>
<br /><br />
</td></tr>
<?
if($lettre)
{
// Sélectionne les définitions correspondant à la lettre
$SQL = "SELECT * FROM $table2 WHERE titre LIKE '".$lettre."%' ORDER BY titre";
}
// Wenn man über die Suchenfunktion auf diese Seite gelang wird nach diesem Wort gesucht
elseif(isset($suchwort))
{
$SQL = "SELECT * FROM phpbb_lexique WHERE titre LIKE '%".$suchwort."%' OR explication LIKE '%".$suchwort."%' ORDER BY titre";
}
else
{
// ou fait un tirage aléatoire sur la page d'accueil
$SQL = "SELECT * FROM $table2 ORDER BY titre";
}
// Affiche les définitions entrées dans la table
$res = mysql_query($SQL);
if(!mysql_num_rows($res))
{
echo "<tr><td>";
echo "Der Begriff \"<b>".$suchwort."</b>\" konnte in der Datenbank nicht gefunden werden.<br>"
. "</td></tr>";
}
else{
while($val=mysql_fetch_array($res)) {
echo "<tr><td>";
echo "<b>".$val["titre"]."</b><br>"
. "<div align=justify>".$val["explication"]."<br></div>"
. "</td></tr>";
}
}
?>
</td>
</tr>
</table><br /><br />
</td></tr>
</table>
<p>
<?
// Déconnection de la base de données
mysql_close();
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>