コード例 #1
0
ファイル: config.form.php プロジェクト: geldarr/hack-space
     foreach ($_POST["item_color"] as $key => $val) {
         if ($val == 1) {
             $PluginArchiresStateColor->delete(array('id' => $key));
         }
     }
     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();
         }
     }