Пример #1
0
 /**
  * Create PDF header and initialize presentation
  */
 function Init()
 {
     global $LANG, $CFG_GLPI;
     $title = $LANG['plugin_mreporting']['notification_subject'];
     $creator = $LANG['plugin_mreporting']['notification_creator'];
     $version = plugin_version_mreporting();
     $author = $CFG_GLPI["version"] . ' - ' . $version['name'] . ' v' . $version['version'];
     $this->SetCreator($creator);
     $this->SetAuthor($author);
     $this->SetTitle($title);
     $this->SetFontSize(10);
     $this->SetMargins(20, 25);
     $this->SetAutoPageBreak(true);
     $this->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
     $this->SetHeaderMargin(PDF_MARGIN_HEADER);
     $this->AddPage();
 }
Пример #2
0
 function showForm($ID)
 {
     global $LANG, $CFG_GLPI;
     $version = plugin_version_mreporting();
     $this->getFromDB($ID);
     echo "<form method='post' action='" . Toolbox::getItemTypeFormURL(__CLASS__) . "'><div align='center'>";
     echo "<table class='tab_cadre_fixe' cellpadding='5'>";
     echo "<tr><th colspan='2'>" . $version['name'] . " - " . $version['version'] . "</th></tr>";
     echo "<tr class='tab_bg_2'><td align='center'>" . $LANG['plugin_mreporting']['parser'][1] . "</td>";
     echo "<td align='center'>";
     self::dropdownFileTemplates($this->fields["template"]);
     echo "</td></tr>";
     echo "<tr class='tab_bg_2'><td align='center' colspan='2'>";
     echo "<input type='hidden' name='id' value='" . $ID . "'>";
     echo "<input type='hidden' name='users_id' value='" . $this->fields['users_id'] . "'>";
     echo "<input type='submit' name='update' value='" . _sx('button', 'Post') . "' class='submit' ></td>";
     echo "</tr>";
     echo "</table>";
     echo "</div>";
     Html::closeForm();
 }