예제 #1
0
                 }
             }
             Html::back();
         } else {
             if (isset($_POST["add_color_vlan"]) && isset($_POST['vlans_id'])) {
                 if ($PluginArchiresVlanColor->canCreate()) {
                     $PluginArchiresVlanColor->addVlanColor($_POST['vlans_id'], $_POST['color']);
                 }
                 Html::back();
             } else {
                 if (isset($_POST["delete_color_vlan"])) {
                     Session::checkRight("config", "w");
                     $PluginArchiresVlanColor->getFromDB($_POST["id"], -1);
                     foreach ($_POST["item_color"] as $key => $val) {
                         if ($val == 1) {
                             $PluginArchiresVlanColor->delete(array('id' => $key));
                         }
                     }
                     Html::back();
                 } else {
                     Html::header(PluginArchiresArchires::getTypeName(), '', "plugins", "archires", "summary");
                     $PluginArchiresImageItem->showConfigForm();
                     $PluginArchiresNetworkInterfaceColor->showConfigForm(true);
                     $PluginArchiresVlanColor->showConfigForm(true);
                     $PluginArchiresStateColor->showConfigForm(true);
                     Html::footer();
                 }
             }
         }
     }
 }