Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(!include(dirname($_SERVER['DOCUMENT_ROOT']) . "/conf/config.inc"))
- {
- echo "<b>Error:</b> can't see configuration files. Stopped.<br />";
- echo "Please, contact your system administrator.";
- exit();
- }
- $sql = "SELECT COUNT(*) AS `all`, SUM(ktnSex = 1) AS male, SUM(ktnSex = 2) AS female FROM kittens";
- $smarty->assign('kittens', $DB->selectRow($sql));
- $sql = "SELECT COUNT(*) AS `all`, SUM(sex = 1) AS male, SUM(sex = 2) AS female FROM parents WHERE archive != 1";
- $smarty->assign("parents", $DB->selectRow($sql));
- $smarty->assign("sirdam", $DB->selectCell("SELECT COUNT(*) FROM parents"));
- $parentPhotos = $DB->selectCell("SELECT COUNT(*) FROM parentsPhotos");
- $photos = $DB->selectCell("SELECT COUNT(*) FROM photos");
- $smarty->assign('parentPhotos', $parentPhotos);
- $smarty->assign('photos', $photos);
- $smarty->assign('photosSum', $parentPhotos + $photos);
- $litters = $DB->selectRow("SELECT COUNT(*) AS allLitters, (SELECT COUNT(*) FROM litters WHERE hidden = 1) AS hiddenLitters FROM litters");
- $smarty->assign('litters', $litters);
- $smarty->assign('carousel', $DB->selectCell("SELECT COUNT(*) FROM photos WHERE photos.photoC = 1"));
- $sql = "SELECT COUNT(*) AS newsAll FROM news";
- $smarty->assign('news', $DB->selectCell($sql));
- $smarty->assign('pages', $DB->selectCell("SELECT COUNT(*) FROM staticPages"));
- $smarty->display('header.tpl');
- $smarty->display('index.tpl');
- $smarty->display('footer.tpl');
- ?>
Add Comment
Please, Sign In to add comment