Ejemplo n.º 1
0
 protected function change_topic_form()
 {
     $form_id = $this->getFormID("change_topic");
     $form = new FormMaker();
     $form->setID($form_id);
     $form->addLabel("Zadajte rubriku");
     $form->addSelect("topic");
     $form->addOption("topic", "topic_0", "--Zadaj rubriku--", "");
     $topic_data = new DBQuery(CDatabaza::getInstance());
     $topic_data->setTable("Rubrika");
     $topics = $topic_data->queryDB("select");
     while ($topic = $topics->fetch_array()) {
         $form->addOption("topic", "topic_" . $topic['rubrika_id'], $topic['nazov_rubriky'], $topic['rubrika_id']);
     }
     $form->addInputField("hidden", "article_id");
     $form->setValue("article_id", $this->article['id']);
     $form->registerForm();
     $form->showForm();
 }
Ejemplo n.º 2
0
 protected function set_user_rights_form()
 {
     $form_id = $this->getFormID("set_rights");
     $form = new FormMaker();
     $form->setID($form_id);
     $form->addLabel("Vyber užívateľa");
     $form->addInputField("text", "user_id", "required cislo");
     $form->addLabel("Zadaj prihlasovacie meno");
     $form->addInputField("text", "login", "required login");
     $form->addLabel("Práva");
     $form->addInputField("checkbox", "rights");
     $form->addOption("rights", "right01", "Spravovanie užívateľov", "EDIT_USERS");
     $form->addOption("rights", "right02", "Úprava článkov", "EDIT_ALL");
     $form->addOption("rights", "right03", "Pridanie článkov", "ADD");
     $form->addOption("rights", "right04", "Odstránenie článkov", "REMOVE");
     $form->addOption("rights", "right05", "Zverenenie článku", "RELEASE");
     $form->addOption("rights", "right06", "Stiahnutie článku", "DROP");
     $form->addOption("rights", "right07", "Priradenie užívateľa", "ASSIGN");
     $form->addOption("rights", "right08", "Úprava zoznamov", "EDIT_ENUMS");
     //,,'','','','','EDIT_ENUMS'
     $form->registerForm();
     $form->showForm();
 }
Ejemplo n.º 3
0
 protected function add_post_form()
 {
     $this->readPosts();
     $form_id = $this->getFormID("add_post");
     $form = new FormMaker();
     $form->setID($form_id);
     $form->addLabel("Zadaj kategoriu");
     $form->addSelect("cat_id");
     $form->addOption("cat_id", "cat_id_0", "--Vyber kategoriu--", "");
     foreach ($this->categories as $cat) {
         $form->addOption("cat_id", "cat_id_" . $cat['id'], $cat['name'], $cat['id']);
     }
     $form->addLabel("Zadaj názov príspevku");
     $form->addInputField("text", "name", "required nazov");
     $form->addLabel("Zadaj príspevok");
     $form->addTextArea("post");
     $form->registerForm();
     $form->showForm();
 }
Ejemplo n.º 4
0
 protected function add_img_form()
 {
     $form_id = $this->getFormID("add_img");
     $form = new FormMaker();
     $form->setID($form_id);
     $form->addLabel("Zadaj popis");
     $form->addTextArea("desc");
     $form->addLabel("Zadaj URL obrázka");
     $form->addInputField("text", "img_url");
     $form->registerForm();
     $form->showForm();
     echo "<div id='browse_button'><button onclick=\"window.open('redakcia/utilities/browser/browser.php?article_id=" . $this->article['id'] . "&target=img_url','image_browser','width=1000,height=500,scrollbars=yes')\">Prehľadávaj...</button></div>";
 }
Ejemplo n.º 5
0
 protected function edit_theme_form()
 {
     $form_id = $this->getFormID("edit_theme");
     $form = new FormMaker();
     $form->setID($form_id);
     $form->setClass("formular");
     $form->addLabel("Vyber tému");
     $form->addSelect('tema');
     $form->addOption('tema', 'nazov', '---Vyber tému---', '');
     foreach ($this->themes as $theme) {
         $form->addOption('tema', 'tema_' . $theme['id'], $theme['name'], $theme['id']);
     }
     $form->addLabel("Názov témy");
     $form->addInputField("text", "nazov", "required nazov");
     $form->registerForm();
     $form->showForm();
 }
Ejemplo n.º 6
0
 protected function change_password_form()
 {
     $form_id = $this->getFormID("change_pswd");
     $form = new FormMaker();
     $form->setID($form_id);
     $form->addInputField("hidden", "user_id");
     $form->setValue("user_id", "'" . $_SESSION['user'] . "'");
     $form->addLabel("Zadaj staré heslo");
     $form->addInputField("password", "old_psswd", "required");
     $form->addLabel("Zadaj nové heslo");
     $form->addInputField("password", "new_psswd", "required psswd");
     $form->addLabel("Potvrď heslo");
     $form->addInputField("password", "confirm_psswd", "required psswd equals{new_psswd}");
     $form->registerForm();
     $form->showForm();
 }
Ejemplo n.º 7
0
 protected function add_article_form()
 {
     $form_id = $this->getFormID("add");
     $form = new FormMaker();
     $form->setID($form_id);
     $form->addLabel("Názov článku");
     $form->addInputField("text", "name", "required nazov");
     $form->addLabel("Zadaj typ článku");
     $data = new DBQuery(CDatabaza::getInstance());
     $data->setTable("Typ_clanku");
     $types = $data->queryDB("select");
     $form->addSelect("type");
     $form->addOption("type", "", "--Zadaj typ článku--", "");
     while ($type = $types->fetch_array()) {
         $form->addOption("type", "type_" . $type['typ_clanku_id'], $type['nazov'], $type['typ_clanku_id']);
     }
     $form->addLabel("Zadaj rubriku");
     $data->setTable("Rubrika");
     $topics = $data->queryDB("select");
     $form->addSelect("topic");
     $form->addOption("topic", "", "--Zadaj rubriku--", "");
     while ($topic = $topics->fetch_array()) {
         $form->addOption("topic", "topic_" . $topic['rubrika_id'], $topic['nazov_rubriky'], $topic['rubrika_id']);
     }
     $form->showForm();
 }