HTML interesse |
|
layout
K pak ff een stukje van shoutbox.php:
else
{
$totaal = mysql_result(mysql_query("SELECT count(id) FROM ".$cnfg['prefix']."berichten"),0);
$paginas = ceil($totaal / $cnfg['perpagina']);
if(isset($_GET['p']))
{
$start = $_GET['p'] * $cnfg['perpagina'];
}
else
{ $start = 0; }
$maxsize = $cnfg['maxbreedte'] - 16;
$i = 0;
echo '<table cellspacing="0" cellpadding="0" width="'.$maxsize.'">';
$sql = mysql_query("SELECT *, DATE_FORMAT(datum,'%d/%m %H:%i:%s') AS tijd FROM ".$cnfg['prefix']."berichten ORDER BY id DESC LIMIT ".$start.", ".$cnfg['perpagina']);
while($s = mysql_fetch_assoc($sql))
{
if($s['website'] == 'http://' || $s['website'] == '' || !eregi('http://',$s['website']))
{ $site = ''; }
else
{ $site = ' <a href="'.$s['website'].'" target="_blank">[URL]</a>'; }
$bericht = $s['bericht'];
$bericht = wordwrap($bericht, $cnfg['woordbreedte'], "\n", 1);
$bericht = stripslashes($bericht);
$sql_filter = mysql_query("SELECT * FROM ".$cnfg['prefix']."filter ORDER BY id DESC");
while($filter = mysql_fetch_assoc($sql_filter))
{ $bericht = eregi_replace($filter['woord'],$cnfg['filter_woord'],$bericht); }
$sql_smilies = mysql_query("SELECT * FROM ".$cnfg['prefix']."smilies ORDER BY id DESC");
while($smilie = mysql_fetch_assoc($sql_smilies))
{ $bericht = str_replace($smilie['code'],'<img src="'.$smilie['url'].'" border="0">',$bericht); }
$i++;
$kleur = ($i % 2) ? $cnfg['kleur1'] : $cnfg['kleur2'];
echo '<tr bgcolor="'.$kleur.'"><td colspan="2"><i><a href="mailto:'.$s['email'].'">'.$s['naam'].'</a> '.$site.'</i></td></tr><tr bgcolor="'.$kleur.'"><td colspan="2">'.$bericht.'</td></tr><tr bgcolor="'.$kleur.'"><td align="right" colspan="2">'.$s['tijd'].'</td></tr>';
}
$paginas2 = $paginas - 1;
if(isset($_GET['p']))
{
$next = $_GET['p'] + 1;
$previous = $_GET['p'] - 1;
if($_GET['p'] == 0)
{
$volgende = '<a href="?p=1" class="nav">></a>';
$vorige = '';
$eerste = '';
$laatste = '<a href="?p='.$paginas2.'" class="nav">>></a>';
}
else
{
$eerste = '<a href="?p=0" class="nav"><<</a>';
$vorige = '<a href="?p='.$previous.'" class="nav"><</a>';
if($paginas <= $_GET['p'])
{ $volgende = ''; $laatste = ''; }
elseif($_GET['p'] == $paginas2)
{ $volgende = ''; $laatste = ''; }
else
{ $volgende = '<a href="?p='.$next.'" class="nav">></a>'; $laatste = '<a href="?p='.$paginas2.'" class="nav">>></a>'; }
}
}
else
{
$vorige = '';
$eerste = '';
if($paginas > 1)
{ $volgende = '<a href="?p=1" class="nav">></a>'; $laatste = '<a href="?p='.$paginas2.'" class="nav">>></a>'; }
else
{ $volgende = ''; $laatste = ''; }
}
echo '<tr><td width="50%" align="right">'.$eerste.' '.$vorige.' </td><td width="50%" align="left"> '.$volgende.' '.$laatste.'</td></tr>';
echo '</table>';
echo '<br>';
form('Naam','Email','Website','Bericht','?page=post',1);
echo '<a href="admin.php"><center>Admin Panel</center></a>';
}
include 'footer.inc.php';
?>
else { $paginas = ceil($totaal / $cnfg['perpagina']); { $start = $_GET['p'] * $cnfg['perpagina']; } else { $start = 0; } $maxsize = $cnfg['maxbreedte'] - 16; $i = 0; echo '<table cellspacing="0" cellpadding="0" width="'.$maxsize.'">'; $sql = mysql_query("SELECT *, DATE_FORMAT(datum,'%d/%m %H:%i:%s') AS tijd FROM ".$cnfg['prefix']."berichten ORDER BY id DESC LIMIT ".$start.", ".$cnfg['perpagina']); { if($s['website'] == 'http://' || $s['website'] == '' || !eregi('http://',$s['website'])) { $site = ''; } else { $site = ' <a href="'.$s['website'].'" target="_blank">[URL]</a>'; } $bericht = $s['bericht']; $bericht = wordwrap($bericht, $cnfg['woordbreedte'], "\n", 1); $sql_filter = mysql_query("SELECT * FROM ".$cnfg['prefix']."filter ORDER BY id DESC"); { $bericht = eregi_replace($filter['woord'],$cnfg['filter_woord'],$bericht); } $sql_smilies = mysql_query("SELECT * FROM ".$cnfg['prefix']."smilies ORDER BY id DESC"); { $bericht = str_replace($smilie['code'],'<img src="'.$smilie['url'].'" border="0">',$bericht); } $i++; $kleur = ($i % 2) ? $cnfg['kleur1'] : $cnfg['kleur2']; echo '<tr bgcolor="'.$kleur.'"><td colspan="2"><i><a href="mailto:'.$s['email'].'">'.$s['naam'].'</a> '.$site.'</i></td></tr><tr bgcolor="'.$kleur.'"><td colspan="2">'.$bericht.'</td></tr><tr bgcolor="'.$kleur.'"><td align="right" colspan="2">'.$s['tijd'].'</td></tr>'; } $paginas2 = $paginas - 1; { $next = $_GET['p'] + 1; $previous = $_GET['p'] - 1; if($_GET['p'] == 0) { $volgende = '<a href="?p=1" class="nav">></a>'; $vorige = ''; $eerste = ''; $laatste = '<a href="?p='.$paginas2.'" class="nav">>></a>'; } else { $eerste = '<a href="?p=0" class="nav"><<</a>'; $vorige = '<a href="?p='.$previous.'" class="nav"><</a>'; if($paginas <= $_GET['p']) { $volgende = ''; $laatste = ''; } elseif($_GET['p'] == $paginas2) { $volgende = ''; $laatste = ''; } else { $volgende = '<a href="?p='.$next.'" class="nav">></a>'; $laatste = '<a href="?p='.$paginas2.'" class="nav">>></a>'; } } } else { $vorige = ''; $eerste = ''; if($paginas > 1) { $volgende = '<a href="?p=1" class="nav">></a>'; $laatste = '<a href="?p='.$paginas2.'" class="nav">>></a>'; } else { $volgende = ''; $laatste = ''; } } echo '<tr><td width="50%" align="right">'.$eerste.' '.$vorige.' </td><td width="50%" align="left"> '.$volgende.' '.$laatste.'</td></tr>'; form('Naam','Email','Website','Bericht','?page=post',1); echo '<a href="admin.php"><center>Admin Panel</center></a>'; } include 'footer.inc.php'; ?>
|