ACC SHELL

Path : /www/hosting/oltv.cz/_/admin/core/
File Upload :
Current File : /www/hosting/oltv.cz/_/admin/core/admin_nastaveni.php

<?php
/**
 * @author Filip Štencl
 * @since 16.02.2014
 *
 */

require("../../include/config.php");
const TABULKA = "admin_kategorie";
//----------------------------------------------------------------------------------------------------------
$admin = new admin("home");
if (!$admin->uzivatel->getSuperadmin()) { redirect("./"); } // musí být superadmin

$admin->setNadpis("<span style=\"color: red; font-weight: bold;\">Nastavení systému</span>");
$admin->head();
$admin->button_insert();
//$admin->button_back("memcache.php","Memcache","Zobrazit statistiku použití memcache");
$admin
	->button("smazat chyby z logs")
	->button_set_class("gray")
	->button_set_url("./admin_nastaveni_edit.php?action=dellogs")
	->button_set_title("Smazat všechny chyby ze složky /logs")
	->button_write();

$admin->button_razeni();
$admin->slideHead("Kategorie redakčního systému");
	$sql = "
		SELECT A.*, ifnull(B.pocet,0) AS pocet FROM [".TABULKA."] A
		LEFT OUTER JOIN ( SELECT COUNT(id) as pocet, idadmin_kategorie FROM[admin_stranky] GROUP BY idadmin_kategorie) B ON A.id = B.idadmin_kategorie";
	$table = new table($sql);
	$table
		->setId(TABULKA)
		->sortable($admin->editUrl())
		->setOrder("A.poradi ASC")
		->addMainColumn("Název")
		->addMainColumn("Podkategorie")
		->addMainColumn()
		->addMainColumn()
		->addMainColumn()
		->tableHead();
	foreach ($table->getResult() as $row) {
		$table
			->addRow($row->id)
			->addColumn("<td width=\"200\"><strong>".$row->nazev."</strong></td>")
			->addColumn("<td><a href=\"admin_stranky.php?pagecode=".$admin->getPageCode()."&amp;kategorie=".$row->id."\">upravit podkategorie: ".$row->pocet."</a></td>")
			->addStaticColumn_presun()
			->addStaticColumn_edit()
			->addStaticColumn_delete();
	}
	$table->writeTable();
$admin->slideFooter();
$admin->slideHead("Poslední chybová hláška");

echo "<iframe src=\"./last_error.php\" width=\"100%\" height=\"450\" frameborder=\"0\"></iframe>";

$admin->slideFooter();
$admin->footer();

ACC SHELL 2018