Artikelen systeem
Auteur: Carpmadness - 11 september 2004 - 17:35 - Gekeurd door: Dennisvb - Hits: 10872 - Aantal punten: 3.60 (5 stemmen)
Vrij simpel, config even aanpassen en run install.php
|
Code: |
install.php
<?
require_once('config.php');
$tabel = 'CREATE TABLE '.$arr['tnam'].' (
`aid` INT(11) AUTO_INCREMENT PRIMARY KEY,
`aname` VARCHAR(100),
`aauthor` VARCHAR(100),
`aip` VARCHAR(100),
`adate` VARCHAR(100),
`acat` VARCHAR(100),
`acomment` TEXT,
`aartikel` LONGTEXT
)';
mysql_query($tabel) or die("Fout bij het installeren");
?>
<? require_once('config.php'); $tabel = 'CREATE TABLE '.$arr['tnam'].' ( `aid` INT(11) AUTO_INCREMENT PRIMARY KEY, `aname` VARCHAR(100), `aauthor` VARCHAR(100), `aip` VARCHAR(100), `adate` VARCHAR(100), `acat` VARCHAR(100), `acomment` TEXT, `aartikel` LONGTEXT )'; ?>
config.php
<?
$arr['host'] = 'localhost'; // Je host
$arr['user'] = ''; // Je database gebruikers gebruikersnaam
$arr['pass'] = ''; // Je database gebruikers wachtwoord
$arr['dbsl'] = ''; // Je database naam
$arr['tnam'] = 'artikelen'; // Naam van de tabel die je hiervoor gaat gebruiken
// Stel de categorien van de artikelen in doormiddel van een array
// Voeg er meer toe door , 'Categorie naam'
// laat de eerste leeg om te zorgen zodat de check of alles is ingevuldt goed functioneert
$arr['arra'] = array('Categorie1', 'Categorie2', 'Categorie3', 'Categorie4', 'Categorie5');
// Simpel connecten met de genoemde database
mysql_connect($arr['host'], $arr['user'], $arr['pass'], $arr['dbsl']) or die('Er is helaas iets misgegaan tijdens het connecten met de database '.$arr['dbsl'].' Dit komt door:<br>'.mysql_error());
mysql_select_db($arr['dbsl']);
function simpele_ubb($bericht){
$bericht = htmlspecialchars($bericht);
// en nog meer ubb
return $bericht;
}
?>
<? $arr['host'] = 'localhost'; // Je host $arr['user'] = ''; // Je database gebruikers gebruikersnaam $arr['pass'] = ''; // Je database gebruikers wachtwoord $arr['dbsl'] = ''; // Je database naam $arr['tnam'] = 'artikelen'; // Naam van de tabel die je hiervoor gaat gebruiken // Stel de categorien van de artikelen in doormiddel van een array // Voeg er meer toe door , 'Categorie naam' // laat de eerste leeg om te zorgen zodat de check of alles is ingevuldt goed functioneert $arr['arra'] = array('Categorie1', 'Categorie2', 'Categorie3', 'Categorie4', 'Categorie5'); // Simpel connecten met de genoemde database mysql_connect($arr['host'], $arr['user'], $arr['pass'], $arr['dbsl']) or die('Er is helaas iets misgegaan tijdens het connecten met de database '.$arr['dbsl'].' Dit komt door:<br>'.mysql_error()); function simpele_ubb($bericht){ // en nog meer ubb return $bericht; } ?>
admin.php
<?
ob_start();
?>
<link href="style.css" rel="stylesheet" type="text/css">
<?
require_once'config.php';
if (isset ($_GET['a'])){
if ($_GET['a'] == 'add'){
if (isset($_POST['opslaan'])){
if (!$_POST['aauthor'] || !$_POST['aname'] || !$_POST['acat'] || !$_POST['acomment'] || !$_POST['aartikel']){
echo'Je hebt niet alles ingevuldt..!<br><a href="javascript:history.go(-1)">Klik hier om terug te gaan en om het nog is te proberen';
}else {
$arr['input'] = 'INSERT INTO '.$arr['tnam'].' (aname, aauthor, aip, adate, acat, acomment, aartikel) VALUES ("'.$_POST['aname'].'", "'.$_POST['aauthor'].'", "'.$_SERVER['REMOTE_ADDR'].'", "'.date('d-m-Y | H:i:s').'", "'.$_POST['acat'].'", "'.$_POST['acomment'].'", "'.$_POST['aartikel'].'")';
$arr['putin'] = mysql_query($arr['input']);
if ($arr['putin'] === true){
header('location: admin.php');
}else {
echo'Het is helaas niet gelukt om het op te slaan in de database '.$arr['tnam'].'...<br><a href="javascript:history.go(-1)">Klik hier om terug te gaan en om het nog is te proberen</a>';
}
}
}else {
?>
<form action="admin.php?a=add" method="post">
<table width="600" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="20" colspan="2"><strong>Artikelen Admin Panel :: TOEVOEGEN</strong></td>
</tr>
<tr>
<td height="20" colspan="2"> </td>
</tr>
<tr>
<td height="20" colspan="2"><strong>Auteur: </strong></td>
</tr>
<tr>
<td height="20" colspan="2"><strong>
<input name="aauthor" type="text" id="aauthor" size="30">
</strong></td>
</tr>
<tr>
<td height="20" colspan="2"><strong>Artikel naam:</strong></td>
</tr>
<tr>
<td height="20" colspan="2"><strong>
<input name="aname" type="text" id="aname" size="93">
</strong></td>
</tr>
<tr>
<td height="20" colspan="2"><strong>Artikel categorie:</strong></td>
</tr>
<tr>
<td height="20" colspan="2"><strong>
<select name="acat" id="acat">
<?
foreach ($arr['arra'] as $val) {
echo'<option value="'.$val.'">'.$val.'</option>';
}
?>
</select>
</strong></td>
</tr>
<tr>
<td height="20" colspan="2"><strong>Artikel commentaar:</strong></td>
</tr>
<tr>
<td height="20" colspan="2"><textarea name="acomment" cols="92" rows="5" wrap="VIRTUAL" id="textarea5"></textarea></td>
</tr>
<tr>
<td height="20" colspan="2"><strong>Artikel:</strong> (het hele artikel)</td>
</tr>
<tr>
<td height="20" colspan="2"><textarea name="aartikel" cols="117" rows="30" wrap="VIRTUAL" id="textarea6"></textarea></td>
</tr>
<tr>
<td height="20" colspan="2"> </td>
</tr>
<tr>
<td width="300" height="20" valign="middle">
<input name="refresh" type="reset" id="refresh" value="[ Refrehs ]">
</td>
<td width="300" align="center" valign="middle">
<input name="opslaan" type="submit" id="opslaan" value="[ Opslaan ]"></td>
</tr>
<tr>
<td height="20" colspan="2"> </td>
</tr>
</table>
</form>
<? }
}else if ($_GET['a'] == 'delete'){
if (isset($_GET['id'])){
if ($_GET['id'] !== ''){
$arr['delete'] = 'DELETE FROM '.$arr['tnam'].' WHERE aid="'.$_GET['id'].'"';
$arr['eteled'] = mysql_query($arr['delete']);
if ($arr['eteled'] === true){
header('location: admin.php');
}else {
echo'Het is helaas niet gelukt om het gewenste artikel te verwijderen uit de tabel '.$arr['tnam'].'...<br><a href="javascript:history.go(-1)">Klik hier om terug te gaan en om het nog is te proberen</a>';
}
}else {
echo'Je moet wel een artikel id kiezen om te verwijderen...<br><a href="javascript:history.go(-1)">Klik hier om terug te gaan en om het nog is te proberen</a>';
}
}
}else if ($_GET['a'] == 'edit'){
if (isset($_GET['id'])){
if ($_GET['id'] !== ''){
if (isset($_POST['edit'])){
$arr['update'] = 'UPDATE '.$arr['tnam'].' SET aname="'.$_POST['aname'].'", aip="'.$_SERVER['REMOTE_ADDR'].'", adate="'.date('d-m-Y | H:i:s').'", acat="'.$_POST['acat'].'", acomment="'.$_POST['acomment'].'", aartikel="'.$_POST['aartikel'].'" WHERE aid="'.$_GET['id'].'"';
$arr['dateup'] = mysql_query($arr['update']);
if ($arr['dateup'] === true){
header('location: admin.php');
}else {
echo'Het is helaas niet gelukt om het gewenste artikel te verwijderen uit de tabel '.$arr['tnam'].'...<br><a href="javascript:history.go(-1)">Klik hier om terug te gaan en om het nog is te proberen</a>';
}
}else {
$arr['select'] = 'SELECT * FROM '.$arr['tnam'].' WHERE aid="'.$_GET['id'].'"';
$arr['getsel'] = mysql_query($arr['select']);
$arr['info'] = mysql_fetch_object($arr['getsel']);
?>
<form action="admin.php?a=edit&id=<? echo $_GET['id']; ?>" method="post">
<table width="600" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="20" colspan="2"><strong>Artikelen Admin Panel :: TOEVOEGEN</strong></td>
</tr>
<tr>
<td height="20" colspan="2"> </td>
</tr>
<tr>
<td height="20" colspan="2"><strong>Artikel naam:</strong></td>
</tr>
<tr>
<td height="20" colspan="2"><strong>
<input name="aname" type="text" id="aname" size="93" value="<? echo $arr['info']->aname; ?>">
</strong></td>
</tr>
<tr>
<td height="20" colspan="2"><strong>Artikel categorie:</strong></td>
</tr>
<tr>
<td height="20" colspan="2"><strong>
<select name="acat" id="acat">
<option value="<? echo $arr['info']->acat; ?>"><? echo $arr['info']->acat; ?></option>
<?
foreach ($arr['arra'] as $val) {
echo'<option value="'.$val.'">'.$val.'</option>';
}
?>
</select>
</strong></td>
</tr>
<tr>
<td height="20" colspan="2"><strong>Artikel commentaar:</strong></td>
</tr>
<tr>
<td height="20" colspan="2"><textarea name="acomment" cols="92" rows="5" wrap="VIRTUAL" id="textarea5"><? echo $arr['info']->acomment; ?></textarea></td>
</tr>
<tr>
<td height="20" colspan="2"><strong>Artikel:</strong> (het hele artikel)</td>
</tr>
<tr>
<td height="20" colspan="2"><textarea name="aartikel" cols="117" rows="30" wrap="VIRTUAL" id="textarea6"><? echo $arr['info']->aartikel; ?></textarea></td>
</tr>
<tr>
<td height="20" colspan="2"> </td>
</tr>
<tr>
<td width="300" height="20" valign="middle"> <input name="refresh" type="reset" id="refresh" value="[ Refrehs ]">
</td>
<td width="300" align="center" valign="middle"> <input name="edit" type="submit" id="edit" value="[ Bewerk ]"></td>
</tr>
<tr>
<td height="20" colspan="2"> </td>
</tr>
</table>
</form>
<?
}
}else {
echo'Je moet wel een artikel id kiezen om te bewerken...<br><a href="javascript:history.go(-1)">Klik hier om terug te gaan en om het nog is te proberen</a>';
}
}
}else {
header('location: index.php');
}
}else {
?>
<table width="600" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="20"><strong>Artikelen Admin Panel :: KIES ACTIE</strong></td>
</tr>
<tr>
<td height="20" align="center" valign="middle"><a href="admin.php?a=add"><strong>Nieuw
artikel toevoegen?</strong></a></td>
</tr>
<tr>
<td height="20"> </td>
</tr>
<?
$arr['select'] = 'SELECT * FROM '.$arr['tnam'];
$arr['getsel'] = mysql_query($arr['select']);
while ($arr['info'] = mysql_fetch_object($arr['getsel'])){
?>
<tr>
<td height="20"><strong>#
<?
echo $arr['info']->aid;
?>
:
<?
echo $arr['info']->aname;
?>
</strong><br>
[ <a href="admin.php?a=delete&id=<? echo $arr['info']->aid; ?>">Verwijderen</a>
| <a href="admin.php?a=edit&id=<? echo $arr['info']->aid; ?>">Bewerken</a>
]</td>
</tr>
<?
}
?>
<tr>
<td height="20"> </td>
</tr>
</table>
<?
}
?>
<? ?> <link href="style.css" rel="stylesheet" type="text/css"> <? require_once'config.php'; if ($_GET['a'] == 'add'){ if (isset($_POST['opslaan'])){ if (!$_POST['aauthor'] || !$_POST['aname'] || !$_POST['acat'] || !$_POST['acomment'] || !$_POST['aartikel']){ echo'Je hebt niet alles ingevuldt..!<br><a href="javascript:history.go(-1)">Klik hier om terug te gaan en om het nog is te proberen'; }else { $arr['input'] = 'INSERT INTO '.$arr['tnam'].' (aname, aauthor, aip, adate, acat, acomment, aartikel) VALUES ("'.$_POST['aname'].'", "'.$_POST['aauthor'].'", "'.$_SERVER['REMOTE_ADDR'].'", "'.date('d-m-Y | H:i:s').'", "'.$_POST['acat'].'", "'.$_POST['acomment'].'", "'.$_POST['aartikel'].'")'; if ($arr['putin'] === true){ header('location: admin.php'); }else { echo'Het is helaas niet gelukt om het op te slaan in de database '.$arr['tnam'].'...<br><a href="javascript:history.go(-1)">Klik hier om terug te gaan en om het nog is te proberen</a>'; } } }else { ?> <form action="admin.php?a=add" method="post"> <table width="600" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="20" colspan="2"><strong>Artikelen Admin Panel :: TOEVOEGEN</strong></td> </tr> <tr> <td height="20" colspan="2"> </td> </tr> <tr> <td height="20" colspan="2"><strong>Auteur: </strong></td> </tr> <tr> <td height="20" colspan="2"><strong> <input name="aauthor" type="text" id="aauthor" size="30"> </strong></td> </tr> <tr> <td height="20" colspan="2"><strong>Artikel naam:</strong></td> </tr> <tr> <td height="20" colspan="2"><strong> <input name="aname" type="text" id="aname" size="93"> </strong></td> </tr> <tr> <td height="20" colspan="2"><strong>Artikel categorie:</strong></td> </tr> <tr> <td height="20" colspan="2"><strong> <select name="acat" id="acat"> <? foreach ($arr['arra'] as $val) { echo'<option value="'.$val.'">'.$val.'</option>'; } ?> </select> </strong></td> </tr> <tr> <td height="20" colspan="2"><strong>Artikel commentaar:</strong></td> </tr> <tr> <td height="20" colspan="2"><textarea name="acomment" cols="92" rows="5" wrap="VIRTUAL" id="textarea5"></textarea></td> </tr> <tr> <td height="20" colspan="2"><strong>Artikel:</strong> (het hele artikel)</td> </tr> <tr> <td height="20" colspan="2"><textarea name="aartikel" cols="117" rows="30" wrap="VIRTUAL" id="textarea6"></textarea></td> </tr> <tr> <td height="20" colspan="2"> </td> </tr> <tr> <td width="300" height="20" valign="middle"> <input name="refresh" type="reset" id="refresh" value="[ Refrehs ]"> </td> <td width="300" align="center" valign="middle"> <input name="opslaan" type="submit" id="opslaan" value="[ Opslaan ]"></td> </tr> <tr> <td height="20" colspan="2"> </td> </tr> </table> </form> <? } }else if ($_GET['a'] == 'delete'){ if ($_GET['id'] !== ''){ $arr['delete'] = 'DELETE FROM '.$arr['tnam'].' WHERE aid="'.$_GET['id'].'"'; if ($arr['eteled'] === true){ header('location: admin.php'); }else { echo'Het is helaas niet gelukt om het gewenste artikel te verwijderen uit de tabel '.$arr['tnam'].'...<br><a href="javascript:history.go(-1)">Klik hier om terug te gaan en om het nog is te proberen</a>'; } }else { echo'Je moet wel een artikel id kiezen om te verwijderen...<br><a href="javascript:history.go(-1)">Klik hier om terug te gaan en om het nog is te proberen</a>'; } } }else if ($_GET['a'] == 'edit'){ if ($_GET['id'] !== ''){ if (isset($_POST['edit'])){ $arr['update'] = 'UPDATE '.$arr['tnam'].' SET aname="'.$_POST['aname'].'", aip="'.$_SERVER['REMOTE_ADDR'].'", adate="'.date('d-m-Y | H:i:s').'", acat="'.$_POST['acat'].'", acomment="'.$_POST['acomment'].'", aartikel="'.$_POST['aartikel'].'" WHERE aid="'.$_GET['id'].'"'; if ($arr['dateup'] === true){ header('location: admin.php'); }else { echo'Het is helaas niet gelukt om het gewenste artikel te verwijderen uit de tabel '.$arr['tnam'].'...<br><a href="javascript:history.go(-1)">Klik hier om terug te gaan en om het nog is te proberen</a>'; } }else { $arr['select'] = 'SELECT * FROM '.$arr['tnam'].' WHERE aid="'.$_GET['id'].'"'; ?> <form action="admin.php?a=edit&id= <? echo $_GET['id']; ?>" method="post"> <table width="600" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="20" colspan="2"><strong>Artikelen Admin Panel :: TOEVOEGEN</strong></td> </tr> <tr> <td height="20" colspan="2"> </td> </tr> <tr> <td height="20" colspan="2"><strong>Artikel naam:</strong></td> </tr> <tr> <td height="20" colspan="2"><strong> <input name="aname" type="text" id="aname" size="93" value=" <? echo $arr['info']->aname; ?>"> </strong></td> </tr> <tr> <td height="20" colspan="2"><strong>Artikel categorie:</strong></td> </tr> <tr> <td height="20" colspan="2"><strong> <select name="acat" id="acat"> <option value=" <? echo $arr['info']->acat; ?>"> <? echo $arr['info']->acat; ?></option> <? foreach ($arr['arra'] as $val) { echo'<option value="'.$val.'">'.$val.'</option>'; } ?> </select> </strong></td> </tr> <tr> <td height="20" colspan="2"><strong>Artikel commentaar:</strong></td> </tr> <tr> <td height="20" colspan="2"><textarea name="acomment" cols="92" rows="5" wrap="VIRTUAL" id="textarea5"> <? echo $arr['info']->acomment; ?></textarea></td> </tr> <tr> <td height="20" colspan="2"><strong>Artikel:</strong> (het hele artikel)</td> </tr> <tr> <td height="20" colspan="2"><textarea name="aartikel" cols="117" rows="30" wrap="VIRTUAL" id="textarea6"> <? echo $arr['info']->aartikel; ?></textarea></td> </tr> <tr> <td height="20" colspan="2"> </td> </tr> <tr> <td width="300" height="20" valign="middle"> <input name="refresh" type="reset" id="refresh" value="[ Refrehs ]"> </td> <td width="300" align="center" valign="middle"> <input name="edit" type="submit" id="edit" value="[ Bewerk ]"></td> </tr> <tr> <td height="20" colspan="2"> </td> </tr> </table> </form> <? } }else { echo'Je moet wel een artikel id kiezen om te bewerken...<br><a href="javascript:history.go(-1)">Klik hier om terug te gaan en om het nog is te proberen</a>'; } } }else { header('location: index.php'); } }else { ?> <table width="600" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="20"><strong>Artikelen Admin Panel :: KIES ACTIE</strong></td> </tr> <tr> <td height="20" align="center" valign="middle"><a href="admin.php?a=add"><strong>Nieuw artikel toevoegen?</strong></a></td> </tr> <tr> <td height="20"> </td> </tr> <? $arr['select'] = 'SELECT * FROM '.$arr['tnam']; ?> <tr> <td height="20"><strong># <? ?> : <? echo $arr['info']->aname; ?> </strong><br> [ <a href="admin.php?a=delete&id= <? echo $arr['info']->aid; ?>">Verwijderen</a> | <a href="admin.php?a=edit&id= <? echo $arr['info']->aid; ?>">Bewerken</a> ]</td> </tr> <? } ?> <tr> <td height="20"> </td> </tr> </table> <? } ?>
index.php
<?
ob_start();
require_once('config.php');
if (isset ($_GET['cat'])){
if (isset ($_GET['id'])){
if (empty($_GET['id']))
header('location: index.php');
else {
$arr['select'] = 'SELECT * FROM '.$arr['tnam'].' WHERE acat="'.$_GET['cat'].'" AND aid="'.$_GET['id'].'"';
$arr['getsel'] = mysql_query($arr['select']);
$arr['info'] = mysql_fetch_object($arr['getsel']);
echo'<table width="600" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="20" colspan="2"> </td>
</tr>
<tr>
<td height="20" colspan="2"><strong>Auteur: </strong></td>
</tr>
<tr>
<td height="20" colspan="2">'.$arr['info']->aauthor.'</td>
</tr>
<tr>
<td height="20" colspan="2"><strong>Artikel naam:</strong></td>
</tr>
<tr>
<td height="20" colspan="2">'.$arr['info']->aname.'</td>
</tr>
<tr>
<td height="20" colspan="2"><strong>Artikel categorie:</strong></td>
</tr>
<tr>
<td height="20" colspan="2">'.$arr['info']->acat.'</td>
</tr>
<tr>
<td height="20" colspan="2"><strong>Artikel commentaar:</strong></td>
</tr>
<tr>
<td height="20" colspan="2">'.$arr['info']->acomment.'</td>
</tr>
<tr>
<td height="20" colspan="2"><strong>Artikel:</strong> (het hele artikel)</td>
</tr>
<tr>
<td height="20" colspan="2">'.simpele_ubb($arr['info']->aartikel).'</td>
</tr>
<tr>
<td height="20" colspan="2"> </td>
</tr>
<tr>
<td height="20" colspan="2"> </td>
</tr>
</table>';
}
}else {
if (empty($_GET['cat']))
header('location: index.php');
$arr['select'] = 'SELECT * FROM '.$arr['tnam'].' WHERE acat="'.$_GET['cat'].'"';
$arr['getsel'] = mysql_query($arr['select']);
while ($arr['info'] = mysql_fetch_object($arr['getsel'])){
?>
<table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><strong>Categorie:</strong></td>
<td><strong>Auteur:</strong></td>
<tr>
<td><a href="index.php?cat=<? echo $arr['info']->acat; ?>&id=<? echo $arr['info']->aid; ?>"><? echo $arr['info']->aname; ?></a></td>
<td><? echo $arr['info']->aauthor; ?></td>
<tr>
<td colspan="4"> </td>
</tr>
</table>
<?
}
}
}else{
$arr['select'] = 'SELECT * FROM '.$arr['tnam'];
$arr['getsel'] = mysql_query($arr['select']);
$arr['info'] = mysql_fetch_object($arr['getsel'])
?>
<table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><strong>Categorie:</strong></td>
<td><strong>Aantal:</strong></td>
</tr>
<?
foreach ($arr['arra'] as $val) {
?>
<tr>
<td width="79%"><a href="index.php?cat=<? echo $val; ?>"><? echo $val; ?></a></td>
<td width="21%">
<?
$query = mysql_query('SELECT * FROM '.$arr['tnam'].' WHERE acat="'.$val.'"');
$arr['count'] = mysql_num_rows($array);
echo $arr['count'];
?>
</td>
</tr>
<?
}
?>
<tr>
<td colspan="4"> </td>
</tr>
</table>
<?
}
?>
<? require_once('config.php'); if (isset ($_GET['cat'])){ if (isset ($_GET['id'])){ header('location: index.php'); else { $arr['select'] = 'SELECT * FROM '.$arr['tnam'].' WHERE acat="'.$_GET['cat'].'" AND aid="'.$_GET['id'].'"'; echo'<table width="600" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="20" colspan="2"> </td> </tr> <tr> <td height="20" colspan="2"><strong>Auteur: </strong></td> </tr> <tr> <td height="20" colspan="2">'.$arr['info']->aauthor.'</td> </tr> <tr> <td height="20" colspan="2"><strong>Artikel naam:</strong></td> </tr> <tr> <td height="20" colspan="2">'.$arr['info']->aname.'</td> </tr> <tr> <td height="20" colspan="2"><strong>Artikel categorie:</strong></td> </tr> <tr> <td height="20" colspan="2">'.$arr['info']->acat.'</td> </tr> <tr> <td height="20" colspan="2"><strong>Artikel commentaar:</strong></td> </tr> <tr> <td height="20" colspan="2">'.$arr['info']->acomment.'</td> </tr> <tr> <td height="20" colspan="2"><strong>Artikel:</strong> (het hele artikel)</td> </tr> <tr> <td height="20" colspan="2">'.simpele_ubb($arr['info']->aartikel).'</td> </tr> <tr> <td height="20" colspan="2"> </td> </tr> <tr> <td height="20" colspan="2"> </td> </tr> </table>'; } }else { header('location: index.php'); $arr['select'] = 'SELECT * FROM '.$arr['tnam'].' WHERE acat="'.$_GET['cat'].'"'; ?> <table width="600" border="0" cellspacing="0" cellpadding="0"> <tr> <td><strong>Categorie:</strong></td> <td><strong>Auteur:</strong></td> <tr> <td><a href="index.php?cat= <? echo $arr['info']->acat; ?>&id= <? echo $arr['info']->aid; ?>"> <? echo $arr['info']->aname; ?></a></td> <td> <? echo $arr['info']->aauthor; ?></td> <tr> <td colspan="4"> </td> </tr> </table> <? } } }else{ $arr['select'] = 'SELECT * FROM '.$arr['tnam']; ?> <table width="600" border="0" cellspacing="0" cellpadding="0"> <tr> <td><strong>Categorie:</strong></td> <td><strong>Aantal:</strong></td> </tr> <? foreach ($arr['arra'] as $val) { ?> <tr> <td width="79%"><a href="index.php?cat= <? echo $val; ?>"> <? echo $val; ?></a></td> <td width="21%"> <? $query = mysql_query('SELECT * FROM '.$arr['tnam'].' WHERE acat="'.$val.'"'); ?> </td> </tr> <? } ?> <tr> <td colspan="4"> </td> </tr> </table> <? } ?>
Enjoy Download code (.txt)
|
|
Stemmen |
Niet ingelogd. |
|