public function get_form($form_link = "") { global $cms_collection_form; global $msg, $charset; if (!$form_link) { $form_link = "./cms.php?categ=collection&sub=collection&action=save"; } //lien pour la soumission du formulaire $form = str_replace("!!action!!", $form_link, $cms_collection_form); //id $form = str_replace("!!id!!", htmlentities($this->id, ENT_QUOTES, $charset), $form); //titre $form = str_replace("!!label!!", htmlentities($this->title, ENT_QUOTES, $charset), $form); //description $form = str_replace("!!comment!!", htmlentities($this->description, ENT_QUOTES, $charset), $form); //bouton supprimer if ($this->id) { $form = str_replace("!!form_title!!", $msg['cms_collection_edit'], $form); $form = str_replace("!!bouton_supprimer!!", "<input type='button' class='bouton' value=' " . $msg[63] . " ' onclick='confirmation_delete(\"&action=delete&id=" . $this->id . "\",\"" . htmlentities($this->title, ENT_QUOTES, $charset) . "\")' />", $form); $form .= confirmation_delete($form_link); } else { $form = str_replace("!!form_title!!", $msg['cms_collection_add'], $form); $form = str_replace("!!bouton_supprimer!!", "", $form); } $storages = new storages(); $form = str_replace("!!storage_form!!", $storages->get_item_form($this->num_storage), $form); return $form; }