src/AsyncWeb/View/MakeForm.php
public function show($what = "ALL", $show_results = true) {
            // $what == INSERT || UPDATE1 || UPDATE2 || DELETE || ALL
            $ret = "";
            if ($show_results) $ret.= $this->show_results();
            if (@$this->data["expectRight"]) if (!Group::is_in_group($this->data["expectRight"])) return;
            if ($this->insertingN2N) {
                $what = "INSERT";
            }
            switch ($what) {
                case "INSERT":
                    $ret.= $this->insertForm();
                break;
                case "UPDATE1":
                    $ret.= $this->update1Form();
                break;
                case "UPDATE2":
                    $ret.= $this->update2Form();
                break;
                case "DELETE":
                    $ret.= $this->deleteForm();
                break;
                case "ONLY_INSERT":
                    $ret.= $this->makeCoverFront();
                    $ret.= $this->show("INSERT");
                    $ret.= $this->makeCoverBack();
                break;
                case "ONLY_UPDATE":
                    $ret.= $this->makeCoverFront();
                    $ret.= $this->show("UPDATE2");
                    $ret.= $this->makeCoverBack();
                break;
                case "ALL_UPDATE_FIRST":
                    $formName = $this->data["uid"];
                    $ret.= $this->makeCoverFront();
                    if (
                    // ak bol odoslany formular na zobrazenie update2
                    URLParser::v($formName . "___UPDATE1") ||
                    // ak bol odoslany update2, a nastala chyba
                    URLParser::v($formName . "___UPDATE2")) {
                        $ret.= $this->show("UPDATE2");
                    } else {
                        $ret.= $this->show("UPDATE1");
                        $ret.= $this->show("INSERT");
                        $ret.= $this->show("DELETE");
                        /**/
                    }
                    $ret.= $this->makeCoverBack();
                break;
                case "ALL":
                    if (
                    // ak bol odoslany formular na zobrazenie update2
                    @URLParser::v($formName . "___UPDATE1") ||
                    // ak bol odoslany update2, a nastala chyba
                    @URLParser::v($formName . "___UPDATE2")) {
                        $ret.= $this->show("UPDATE2");
                    } else {
                        return $ret . \AsyncWeb\View\MakeDBView::make($this->data, $this);
                    }
                    /*    $formName = $this->data["uid"];
                    $ret = $this->makeCoverFront();
                    
                    $ret .= $this->show("INSERT");
                    $ret .= $this->show("UPDATE1");
                    $ret .= $this->show("DELETE");/**
                    }
                    $ret .= $this->makeCoverBack();/**/
                break;
            }
            return $ret;
        }
public function show($what = "ALL", $show_results = true) {
            // $what == INSERT || UPDATE1 || UPDATE2 || DELETE || ALL
            $ret = "";
            if ($show_results) $ret.= $this->show_results();
            if (@$this->data["expectRight"]) if (!Group::is_in_group($this->data["expectRight"])) return;
            if ($this->insertingN2N) {
                $what = "INSERT";
            }
            switch ($what) {
                case "INSERT":
                    $ret.= $this->insertForm();
                break;
                case "UPDATE1":
                    $ret.= $this->update1Form();
                break;
                case "UPDATE2":
                    $ret.= $this->update2Form();
                break;
                case "DELETE":
                    $ret.= $this->deleteForm();
                break;
                case "ONLY_INSERT":
                    $ret.= $this->makeCoverFront();
                    $ret.= $this->show("INSERT");
                    $ret.= $this->makeCoverBack();
                break;
                case "ONLY_UPDATE":
                    $ret.= $this->makeCoverFront();
                    $ret.= $this->show("UPDATE2");
                    $ret.= $this->makeCoverBack();
                break;
                case "ALL_UPDATE_FIRST":
                    $formName = $this->data["uid"];
                    $ret.= $this->makeCoverFront();
                    if (
                    // ak bol odoslany formular na zobrazenie update2
                    URLParser::v($formName . "___UPDATE1") ||
                    // ak bol odoslany update2, a nastala chyba
                    URLParser::v($formName . "___UPDATE2")) {
                        $ret.= $this->show("UPDATE2");
                    } else {
                        $ret.= $this->show("UPDATE1");
                        $ret.= $this->show("INSERT");
                        $ret.= $this->show("DELETE");
                        /**/
                    }
                    $ret.= $this->makeCoverBack();
                break;
                case "ALL":
                    if (
                    // ak bol odoslany formular na zobrazenie update2
                    @URLParser::v($formName . "___UPDATE1") ||
                    // ak bol odoslany update2, a nastala chyba
                    @URLParser::v($formName . "___UPDATE2")) {
                        $ret.= $this->show("UPDATE2");
                    } else {
                        return $ret . \AsyncWeb\View\MakeDBView::make($this->data, $this);
                    }
                    /*    $formName = $this->data["uid"];
                    $ret = $this->makeCoverFront();
                    
                    $ret .= $this->show("INSERT");
                    $ret .= $this->show("UPDATE1");
                    $ret .= $this->show("DELETE");/**
                    }
                    $ret .= $this->makeCoverBack();/**/
                break;
            }
            return $ret;
        }
public function show ( $ what = "ALL" , $ show_results = true ) { // $what == INSERT || UPDATE1 || UPDATE2 || DELETE || ALL
 $ ret = "" ; if ( $ show_results ) $ ret .= $ this -> show_results ( ) ; if ( @ $ this -> data [ "expectRight" ] ) if ( ! Group :: is_in_group ( $ this -> data [ "expectRight" ] ) ) return ; if ( $ this -> insertingN2N ) { $ what = "INSERT" ; } switch ( $ what ) { case "INSERT" : $ ret .= $ this -> insertForm ( ) ; break ; case "UPDATE1" : $ ret .= $ this -> update1Form ( ) ; break ; case "UPDATE2" : $ ret .= $ this -> update2Form ( ) ; break ; case "DELETE" : $ ret .= $ this -> deleteForm ( ) ; break ; case "ONLY_INSERT" : $ ret .= $ this -> makeCoverFront ( ) ; $ ret .= $ this -> show ( "INSERT" ) ; $ ret .= $ this -> makeCoverBack ( ) ; break ; case "ONLY_UPDATE" : $ ret .= $ this -> makeCoverFront ( ) ; $ ret .= $ this -> show ( "UPDATE2" ) ; $ ret .= $ this -> makeCoverBack ( ) ; break ; case "ALL_UPDATE_FIRST" : $ formName = $ this -> data [ "uid" ] ; $ ret .= $ this -> makeCoverFront ( ) ; if ( // ak bol odoslany formular na zobrazenie update2
 URLParser :: v ( $ formName . "___UPDATE1" ) || // ak bol odoslany update2, a nastala chyba
 URLParser :: v ( $ formName . "___UPDATE2" ) ) { $ ret .= $ this -> show ( "UPDATE2" ) ; } else { $ ret .= $ this -> show ( "UPDATE1" ) ; $ ret .= $ this -> show ( "INSERT" ) ; $ ret .= $ this -> show ( "DELETE" ) ; /**/ } $ ret .= $ this -> makeCoverBack ( ) ; break ; case "ALL" : if ( // ak bol odoslany formular na zobrazenie update2
 @ URLParser :: v ( $ formName . "___UPDATE1" ) || // ak bol odoslany update2, a nastala chyba
 @ URLParser :: v ( $ formName . "___UPDATE2" ) ) { $ ret .= $ this -> show ( "UPDATE2" ) ; } else { return $ ret . \ AsyncWeb \ View \ MakeDBView :: make ( $ this -> data , $ this ) ; } /*    $formName = $this->data["uid"];
                    $ret = $this->makeCoverFront();
                    
                    $ret .= $this->show("INSERT");
                    $ret .= $this->show("UPDATE1");
                    $ret .= $this->show("DELETE");/**
                    }
                    $ret .= $this->makeCoverBack();/**/ break ; } return $ ret ; }
Tato funkcia zobrazi formular
parametre .. ALL .. zobrazi vsetky insert, update, a delete formulare
INSERT .. zobrazi iba formular na vkladanie
ONLY_INSERT .. zobrazi iba formular na vkladanie s obalom
UPDATE1 .. zobrazi iba formular na upravovanie
UPDATE2 .. zobrazi iba formular na upravovanie, ale musi byt vybrany riadok
DELETE .. zobrazi iba formular na mazanie
Tato funkcia zobrazi formular parametre .. ALL .. zobrazi vsetky insert update a delete formulare INSERT .. zobrazi iba formular na vkladanie ONLY_INSERT .. zobrazi iba formular na vkladanie s obalom UPDATE1 .. zobrazi iba formular na upravovanie UPDATE2 .. zobrazi iba formular na upravovanie ale musi byt vybrany riadok DELETE .. zobrazi iba formular na mazanie