\n"); //Create the initial table
/* this query will get a particular testimonial, depending on the ID passed in the URL*/
$query = ("SELECT id,active,author,authorweb,authorwebname,title,testtext," .
"DATE_FORMAT(postdate, '%M %D, %Y') as date " .
"FROM ".$prefix."testimonials WHERE id=$id");
$result = mysql_query ($query) or die('MySQL error: ' . mysql_error() . ' ' . $query);
$result_rows = mysql_num_rows($result);
/*Shut them down if the record does not exist.*/
if($result_rows==0){
echo ("
De opgevraagde quote bestaat niet.
|
");
}else{
/*Let them know that the testimonial is suspended, then call the cops because
they should not be trying to view it, and are probably part of the Taliban.*/
for($i=0; $i<$result_rows; $i++){
$row = mysql_fetch_array($result);
$active = $row['active'];
if($active != 1){
echo("
De opgevraagde quote is niet actief.
|
");
}else{
/*Finally, we get to view a freaking testimonial!*/
$date = $row['date'];
$author = $row['author'];
$authorweb = $row['authorweb'];
$authorwebname = $row['authorwebname'];
$title = $row['title'];
$testtext = $row['testtext'];
/* display the data */
echo("
| ");
if($main_showtitle == 1) {
echo(" $title");
}
echo(" |
| ");
if($main_showauth == 1) {
echo("Geplaatst door: $author ");
}
if($authorweb != "") {
if($main_showauthweb == 1) {
echo("- Website: $authorwebname");
}
}
echo("
|
|
$testtext
|
");
}
}
}
echo (" |