GooseCS
All query("SELECT * FROM categories"); $cats = $a->fetchAll(PDO::FETCH_ASSOC); foreach($cats as $cat) { echo "".$cat['name'].""; } ?>
query("SELECT * FROM imagebanner LIMIT 1"); if($a->rowCount()) { $banner = $a->fetch(PDO::FETCH_ASSOC); if($banner['enabled']) echo "
"; } $a = $db->query("SELECT * FROM banner LIMIT 1"); if($a->rowCount()) { $banner = $a->fetch(PDO::FETCH_ASSOC); if($banner['enabled'] && (!$banner['mainpageonly'] || ($banner['mainpageonly'] && (!isset($_GET['c']) || $_GET['c'] == 0)))) { ?>
prepare("SELECT * FROM categories WHERE ID = ?"); $a->execute(array($_GET['c'])); if($a->rowCount()) { $category = $a->fetch(PDO::FETCH_ASSOC); echo "
".$category['name']."
"; $a = $db->prepare("SELECT * FROM sites WHERE category LIKE ? ORDER BY ID DESC"); $a->execute(array('%'.$_GET['c'].'%')); if(!$a->rowCount()) echo "
No sites in this category!
"; else { $sites = $a->fetchAll(PDO::FETCH_ASSOC); foreach($sites as $site) { ?>
All sites
"; $a = $db->query("SELECT * FROM sites ORDER BY ID DESC"); $a->execute(); if(!$a->rowCount()) echo "
There are no sites added yet!
"; else { $sites = $a->fetchAll(PDO::FETCH_ASSOC); foreach($sites as $site) { ?>