Пример #1
0
function setClassName()
{
    $className = "Intro";
    if (isset($_GET['id'])) {
        $className = ProgramManager::getProgramName($_GET['id']);
    }
    if (!$className) {
        $className = "Intro";
    }
    ProgramManager::includeProgram($className);
    return $className;
}
Пример #2
0
<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 * Description of Article_anekdote
 *
 * @author mato
 */
ProgramManager::includeProgram("Article");
class Article_post extends Article
{
    /*
     * Parametre funkcie
     */
    private $posts;
    private $categories;
    private $post_info;
    /*
     * Konstruktor
     */
    public function __construct()
    {
        parent::__construct();
        $this->setFunction("add_cat", "add_cathegory");
        $this->setForm("add_cat", "", "add_cat", "add_cathegory_form");
        $this->setFunction("edit_cat", "edit_cathegory");
        $this->setForm("edit_cat", "", "edit_cat", "edit_cathegory_form");
        $this->setFunction("rem_cat", "remove_cathegory");