Ejemplo n.º 1
0
Additionalalerts is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

Additionalalerts is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with additionalalerts. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
include '../../../inc/includes.php';
$type = new PluginAdditionalalertsNotificationType();
$infocom = new PluginAdditionalalertsInfocomAlert();
if (isset($_POST["add"])) {
    if ($infocom->canCreate()) {
        $newID = $infocom->add($_POST);
    }
    Html::back();
} else {
    if (isset($_POST["update"])) {
        if ($infocom->canCreate()) {
            $infocom->update($_POST);
        }
        Html::back();
    } else {
        if (isset($_POST["add_type"])) {
            if ($infocom->canCreate()) {
Ejemplo n.º 2
0
 static function configCron($target, $ID)
 {
     echo "<div align='center'>";
     echo "<form method='post' action=\"{$target}\">";
     echo "<table class='tab_cadre_fixe' cellpadding='5'>";
     $colspan = 2;
     echo "<tr class='tab_bg_1'>";
     echo "<td>" . __('Parameter', 'additionalalerts') . "</td>";
     echo "<td>" . __('Type not used for check of buy date', 'additionalalerts');
     Dropdown::show('ComputerType', array('name' => "types_id"));
     echo "&nbsp;<input type='submit' name='add_type' value=\"" . _sx('button', 'Add') . "\" class='submit' ></div></td>";
     echo "</tr>";
     echo "</table>";
     Html::closeForm();
     echo "</div>";
     $type = new PluginAdditionalalertsNotificationType();
     $type->showForm($target);
 }