Ik ben beginneling qua php dus als het kan simpel
Links zie je de auteur en tijd.
Nu staat de tijd en datum aan elkaar. Hoe is dit te veranderen?
Hier het stukje php van de tijd en datum
echo '<BR>Gepost: '.$datum.'<BR>';
if($location == '')Is hier iets fouts aan. of is t iets anders?
de gehele code is hier te zien:
<?php
$aantal_per_pagina = 10;
$aantal_paginas_weergave = 5;
$start_on_last_page = false;
$this_page = $_SERVER['SCRIPT_NAME'];
$result = mysql_query("SELECT COUNT(*) FROM mgbb");
$totaal_paginas = ceil(mysql_result($result, 0) / $aantal_per_pagina);
if(isset($_GET['pagina']) && is_numeric($_GET['pagina']))
$huidige_pagina = $_GET['pagina'];
else {
if($start_on_last_page)
$huidige_pagina = $totaal_paginas;
else
$huidige_pagina = 1;
}
$aantalgebruikers = $totaal_paginas - $aantal_paginas_weergave;
$puntjes = $aantal_paginas_weergave + 1;
$vanaf_pagina = ($huidige_pagina - 1) * $aantal_per_pagina;
$pagination = "";
$prev_page = true;
$next_page = true;
for($i = 1; $i <= $totaal_paginas; $i++)
{
if($i > 1)
if($i <= $aantal_paginas_weergave)
{
$pagination .= " - ";
}
else if($i > $aantalgebruikers + 1)
{
$pagination .= " - ";
}
else if($i == $puntjes && $totaal_paginas != $aantal_paginas_weergave * 2)
{
$pagination .= " .... ";
}
else if($i == $puntjes && $totaal_paginas == $aantal_paginas_weergave * 2)
{
$pagination .= " - ";
}
if($i == $huidige_pagina)
{
if($i - 1 > 0)
$prev_page = $i - 1;
if($i < $totaal_paginas)
$next_page = $i + 1;
if($i <= $aantal_paginas_weergave)
{
$pagination .= "<B>$i</B>";
}
else if($i > $aantalgebruikers)
{
$pagination .= "<B>$i</B>";
}
}
else
if($i <= $aantal_paginas_weergave)
{
$pagination .= '<a href="'.$this_page.'?pagina='.$i.'">'.$i.'</a>';
}
else if($i > $aantalgebruikers)
{
$pagination .= '<a href="'.$this_page.'?pagina='.$i.'">'.$i.'</a>';
}
}
$pagination = '<a href="'.$this_page.'?pagina='.$prev_page.'">«</a> '.$pagination.' <A HREF="'.$this_page.'?pagina='.$next_page.'">»</A>';
?>
<TABLE STYLE="font-family: verdana; font-size: 8pt; color: #000000; border: 0px solid black ; " border="0" cellpadding="2" cellspacing="1" width='98%'>
<TR>
<TD>
[ <?php echo $pagination; ?> ]
</TD>
<TD ALIGN=RIGHT>
<a href="reply.php">Nieuw Bericht Toevoegen</a>
</TD>
</TR>
</TABLE>
<TABLE STYLE="font-family: verdana; font-size: 8pt; color: #000000; border: 0px solid black ; background: #000000" border="0" cellpadding="2" cellspacing="1" width='98%'>
<TR STYLE="color: #FFFFFF;">
<TD BGCOLOR="#000000" width='175' HEIGHT='20'>
<B>Auteur</B>
</TD>
<TD BGCOLOR="#000000" width='80%' HEIGHT='20'>
<B>Bericht</B>
</TD>
</TR>
<?php
error_reporting(E_ALL);
?>
$sql = "SELECT * FROM mgbb ORDER BY ID DESC LIMIT $vanaf_pagina, $aantal_per_pagina";
$resultaat = mysql_query($sql)or die(mysql_error());
$aantal = mysql_num_rows($resultaat);
while($record = mysql_fetch_object($resultaat))
{
$id = "$record->id";
$name = "$record->name";
$subject = "$record->subject";
$website = "$record->website";
$ip = "$record->ip";
$email = "$record->email";
$text = "$record->tekst";
$datum = "$record->datum";
$location = "$record->location";
include 'coding.php';
echo '<TR><TD BGCOLOR="#FFFFFF" HEIGHT="40" valign=top>';
echo '<B><font size=2>'.$name.'</font></B><BR>';
if ($email == '')
{
echo "";
}
else
{
echo "<a href=mailto:".$email." target=_blank><img src=images/email2.gif border=0 alt='Stuur een email naar ".$name."'></a>";
}
if ( ($website == 'http://') || ($website == ''))
{
echo "";
}
else
{
echo "<a href=".$website." target=_blank><img src=images/url2.gif border=0 alt='Bezoek de website van ".$name."'></a>";
}
echo '<BR>Gepost: '.$datum.'<BR>';
if($location == '')
{
echo "";
}
else
{
echo 'Lokatie: '.$location.'<BR>';
}
echo '<B>[ <a href="reply.php?id='.$id.'">Reageer</A> ] [ <a href="edit.php?id='.$id.'">Bewerk</a> ]</B><BR>';
echo '</TD><TD BGCOLOR="#FFFFFF" HEIGHT="0" valign=top>';
echo '<font size=1><img src="images/post.gif" alt='.$ip.'> <I>'.$subject.'</I><br></font>'.$tekst.'</TD></TR>';
}
?>
</TABLE>
<TABLE STYLE="font-family: verdana; font-size: 8pt; color: #000000; border: 0px solid black ; " border="0" cellpadding="2" cellspacing="1" width='98%'>
<TR>
<TD>
[ <?php echo $pagination; ?> ]
</TD>
<TD ALIGN=RIGHT>
<a href="reply.php">Nieuw Bericht Toevoegen</a>
</TD>
</TR>
</TABLE>