function render()
 {
     // init form
     require_once ROOT . '/class/html_form.class.php';
     $form = new html_form();
     // add content
     $form->add('<h1>');
     $form->add($this->title);
     $form->add('</h1>');
     // if sent :
     // check spam
     // add item to node
     // publish if needed
 }
Пример #2
0
     } else {
         echo '<div class="info">Problème technique, votre commentaire n\'a pas été ajouté</div>';
     }
     //	}
     //else
     //	{
     //			echo '<div class="info">Vous n\'avez pas tapé le bon code. Veuillez réessayer afin que votre message soit posté.</div>';
     //	}
 }
 if ($form->isCancel()) {
     echo '<div class="info">Commentaire annulé</div>';
 }
 $form->setConfirmLabel('Envoyer');
 foreach ($discussion->field as $field) {
     if ($field->getType() != 'id' && $field->isUsedIn('public')) {
         $form->add('<div>');
         $form->add($field->getTitle() . ' :');
         $form->add('<br/>');
         $form->add($field->renderUi());
         $form->add('<br/>');
         $form->add('<br/>');
         $form->add('</div>');
     }
 }
 $form->add('<div>');
 $form->add('Entrez le code ci-dessous (pour éviter les spams) :');
 $form->add('<br/>');
 $form->add('<input type="text" name="code" />');
 $form->add('<br/>');
 $form->add('<img src="' . ROOT_URL . '/lib/securimage/securimage_show.php">');
 $form->add('<br/>');