Example #1
0
 public function fields()
 {
     echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="POST">';
     $form = new Form();
     echo "<h4>Titel</h4>" . $form->field("text", "title", $this->entryPlace->getResultRow("title"), 60, 60, "fieldClass") . "<br />";
     echo "<h4>Beskrivning</h4>" . $form->textArea("description", $this->entryPlace->getResultRow("description"), 60, 20, "fieldClass") . "<br />";
     echo "<h4>Bild</h4><br />";
     echo "<h3>N&ouml;dv&auml;ndiga f&auml;lt</h3>";
     echo $form->checkBox("requiredTitle", $this->entryPlace->getResultRow("requiredTitle"), "fieldClass") . "Titel<br />\n";
     echo $form->checkBox("requiredDescription", $this->entryPlace->getResultRow("requiredDescription"), "fieldClass") . "Beskriving<br />\n";
     echo $form->checkBox("requiredText", $this->entryPlace->getResultRow("requiredText"), "fieldClass") . "Text<br />\n";
     echo $form->checkBox("requiredImage", $this->entryPlace->getResultRow("requiredImage"), "fieldClass") . "Bild<br />\n";
     echo $form->checkBox("requiredComments", $this->entryPlace->getResultRow("requiredComments"), "fieldClass") . "Kommentarer<br />\n";
     echo $form->checkBox("requiredRate", $this->entryPlace->getResultRow("requiredRate"), "fieldClass") . "Betyg<br />\n";
     echo $form->hiddenField("entryPlaceTitle", $this->entryPlaceTitle);
     if ($this->entryPlace->getNumRows() < 1) {
         echo $form->submitButton("fieldClass", "Skapa");
     } else {
         echo $form->submitButton("fieldClass", "Uppdatera");
     }
     echo '<hr size="1"/></form>';
 }
 /**
  * Shows all the input fields
  */
 public function showFields($showStyle, $level, $parent, $lang, $ID)
 {
     $form = new Form();
     foreach ($showStyle->items[$level] as $item) {
         echo $item->field("class");
     }
     echo $form->hiddenField("showStyle", $showStyle->title);
     echo $form->hiddenField("level", $level);
     echo $form->hiddenField("parent", $parent);
     echo $form->hiddenField("lang", $lang);
     // ID will only be nescesary at action: update
     echo $form->hiddenField("ID", $ID);
 }
Example #3
0
 public function listEmails()
 {
     echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="POST">';
     $form = new Form();
     $q = new Query("emails");
     $q->makeQuery("*", "email", "DESC", 0);
     echo '<table><th align="left">E-mail</th><th>Ta bort</th>' . "\n";
     while ($row = mysql_fetch_object($q->getResult())) {
         echo '<tr><td align="left"><input name="emails[]" checked="checked" type="checkbox" value="' . $row->email . '"/>' . $row->email . '</td><td><a href="?entry=' . $this->entry_id . '&category=' . $this->category_id . '&action=delete&email=' . $row->email . '">Ta bort</a></td></tr>' . "\n";
     }
     echo '</table><br />';
     echo $form->hiddenField("category", $this->category_id);
     echo $form->hiddenField("entry", $this->entry_id);
     echo $form->submitButton("myClass", "Skicka");
     echo '</form>';
 }