Beispiel #1
0
function XMLparseFinElement($parser, $name)
{
    global $Xstring, $Xpath, $Xoptions, $Xtheme, $Xlasthandler, $defaultVars, $Xlasttag, $XlastName, $Xcliststring, $Xtemp, $Xn;
    if ($name == 'SCRIPT') {
        $Xstring .= $Xlasthandler . '</script>';
    }
    if ($name == 'TBOX') {
        $Xstring .= '</table>';
    }
    if ($name == 'TR') {
        $Xstring .= '</tr>';
    }
    if ($name == 'TD') {
        $Xstring .= '</td>';
    }
    if ($name == 'LAYER') {
        $Xstring .= '</div>';
    }
    if ($name == 'FRAME') {
        $Xstring .= '</td></tr></table></td><td class="framebd"></td></tr><tr><td class="framec"></td><td class="framecd"></td><td class="framed"></td></tr></table>';
    }
    if ($name == 'NOTEBOOK') {
        $Xstring .= '</td><td class="pagebd"></td></tr><tr><td class="pagec"></td><td class="pagecd"></td><td class="paged"></td></tr></table>';
    }
    if ($name == 'PAGE') {
        $Xstring .= '</td></tr></table></div>';
    }
    if ($name == 'LABEL') {
        $Xstring .= XmindLabel($Xlasthandler, $Xoptions[NAME], $Xoptions[STYLE]);
    }
    if ($name == 'ENTRY') {
        $Xoptions[ONCHANGE] = str_replace("'", "\\'", $Xoptions[ONCHANGE]);
        $Xoptions[ONCHANGE] = str_replace("'", "\\'", $Xoptions[ONBLUR]);
        $Xstring .= XmindEntry($Xtheme, $Xoptions[NAME], $Xoptions[TYPE], $Xoptions[WIDTH], $Xlasthandler, $Xoptions[ACTIVE], $Xoptions[ONCHANGE], $Xoptions[ONBLUR]);
    }
    if ($name == 'TEXT') {
        $Xoptions[ONCHANGE] = str_replace("'", "\\'", $Xoptions[ONCHANGE]);
        $Xoptions[ONCHANGE] = str_replace("'", "\\'", $Xoptions[ONBLUR]);
        $Xstring .= XmindText($Xtheme, $Xoptions[NAME], $Xoptions[WIDTH], $Xoptions[HEIGHT], $Xlasthandler, $Xoptions[ACTIVE], $Xoptions[ONCHANGE], $Xoptions[ONBLUR]);
    }
    if ($name == 'HIDDEN') {
        $Xstring .= XmindHidden($Xoptions[NAME], $Xlasthandler);
    }
    if ($name == 'SPIN') {
        $Xoptions[ONCHANGE] = str_replace("'", "\\'", $Xoptions[ONCHANGE]);
        $Xoptions[ONCHANGE] = str_replace("'", "\\'", $Xoptions[ONBLUR]);
        $Xstring .= XmindSpin($Xtheme, $Xoptions[NAME], $Xoptions[WIDTH], $Xlasthandler, $Xoptions['MIN'], $Xoptions['MAX'], $Xoptions[STEP], $Xoptions[ONCHANGE], $Xoptions[ONBLUR], $Xoptions[ACTIVE]);
    }
    if ($name == 'BUTTON') {
        $Xoptions[ONCLICK] = str_replace("'", "\\'", $Xoptions[ONCLICK]);
        $Xstring .= XmindButton($Xtheme, $Xoptions[NAME], $Xlasthandler, $Xoptions[IMAGE], $Xoptions[ONCLICK], $Xoptions[VALUE], $Xoptions[ACTIVE], $Xoptions[WIDTH]);
    }
    if ($name == 'TOGGLE') {
        $Xoptions[ONCLICK] = str_replace("'", "\\'", $Xoptions[ONCLICK]);
        $Xstring .= XmindToggle($Xtheme, $Xoptions[NAME], $Xlasthandler, $Xoptions[VALUE], $Xoptions[ONCLICK], $Xoptions[ACTIVE]);
    }
    if ($name == 'CHECKBOX') {
        $Xoptions[ONCLICK] = str_replace("'", "\\'", $Xoptions[ONCLICK]);
        $Xstring .= XmindCheckBox($Xtheme, $Xoptions[NAME], $Xoptions[VALUE], $Xoptions[ONCLICK], $Xoptions[ACTIVE]);
    }
    if ($name == 'RADIO') {
        $Xoptions[ONCLICK] = str_replace("'", "\\'", $Xoptions[ONCLICK]);
        $Xstring .= XmindRadio($Xtheme, $Xoptions[NAME], $Xlasthandler, $Xoptions[VALUE], $Xoptions[ONCLICK], $Xoptions[ACTIVE]);
    }
    if ($name == 'PROGRESSBAR') {
        $Xstring .= XmindProgressBar($Xtheme, $Xoptions[NAME], $Xoptions[WIDTH], $Xoptions[VALUE]);
    }
    if ($name == 'IMAGE') {
        $Xstring .= XmindImage($Xoptions[NAME], $Xoptions[SRC], $Xoptions[WIDTH], $Xoptions[HEIGHT]);
    }
    if ($name == 'DRAWINGAREA') {
        $Xstring .= XmindDrawingArea($Xtheme, $Xoptions[NAME], $Xoptions[WIDTH], $Xoptions[HEIGHT], $Xoptions[SRC]);
    }
    if ($name == 'CLIST') {
        $Xlasttag = '';
        $Xcliststring .= '</tbody></table>\';';
    }
    if ($name == 'OPTION') {
        if ($Xlasttag = 'CLIST') {
            $Xcliststring .= '<tr onclick="parent.ClistOnClick(this, \\\'' . $XlastName . '\\\', \\\'' . trim($Xlasthandler) . '\\\')">';
            $t = explode(',', trim($Xlasthandler));
            $i = 0;
            foreach ($t as $t2) {
                $n = round($Xtemp[1][$i] / 8 - 2);
                if (strlen($t2) > $n) {
                    $t2[$n] = ',';
                    list($t2, ) = explode(',', $t2);
                }
                $Xcliststring .= '<td></td><td  align="' . trim($Xtemp[0][$i]) . '">&nbsp;' . trim($t2) . '</td><td></td>';
                $i++;
            }
            $Xcliststring .= '</tr>';
        }
    }
    if ($name == 'XMIND') {
        $Xstring .= '</form><script language="Javascript">function goDefault(action) {' . $Xcliststring . $defaultVars . ' if(action) activeScript(action); }</script><div style="position: absolute; visibility: hidden; display:none;"><table><tr>';
        $tab = array('togglea', 'toggleb', 'toggleab', 'togglea_on', 'toggleb_on', 'toggleab_on', 'buttona_on', 'buttonb_on', 'buttonc_on', 'buttond_on', 'buttonab_on', 'buttonac_on', 'buttonbd_on', 'buttoncd_on', 'buttonabcd_on', 'spinbutton1_on', 'spinbutton2_on');
        foreach ($tab as $t) {
            $Xstring .= '<td class="' . $t . '">  </td>';
        }
        $Xstring .= '</tr></table></div></body></html>';
    }
}
Beispiel #2
0
function XMLparseFinElement($parser, $name)
{
    global $Xstring, $Xstring2, $Xpath, $Xoptions, $Xtheme, $Xlasthandler, $defaultVars, $Xlasttag, $XlastName, $Xtemp, $Xn, $Yn, $Xbox, $Xintegration, $Xcode;
    if ($name == 'SCRIPT') {
        $Xstring .= $Xlasthandler . '</script>';
    }
    if ($name == 'CODE') {
        if ($Xtemp[CODE]) {
            session_start();
            session_register('Xcode');
            $Xcode[$Xtemp[CODE]] = $Xlasthandler;
        }
    }
    if ($name == 'HBOX' || $name == 'VBOX') {
        $Xtemp[BOX][$Xbox--] = '';
        $Xstring .= '</td></tr></table>' . XmindBetweenBox($Xtemp, $Xbox);
    }
    if ($name == 'TBOX') {
        $Xstring .= '</table>' . XmindBetweenBox($Xtemp, $Xbox);
    }
    if ($name == 'TR') {
        $Xstring .= '</tr>';
    }
    if ($name == 'TD') {
        $Xstring .= '</td>';
    }
    if ($name == 'LAYER') {
        $Xstring .= '</div>';
    }
    if ($name == 'FRAME') {
        $Xstring .= '</td></tr></table></td><td class="framebd"></td></tr><tr><td class="framec"></td><td class="framecd"></td><td class="framed"></td></tr></table>' . XmindBetweenBox($Xtemp, $Xbox);
    }
    if ($name == 'NOTEBOOK') {
        $Xstring .= '</td><td class="pagebd"></td></tr><tr><td class="pagec"></td><td class="pagecd"></td><td class="paged"></td></tr></table>' . XmindBetweenBox($Xtemp, $Xbox);
    }
    if ($name == 'PAGE') {
        $Xstring .= '</td></tr></table></div>';
    }
    if ($name == 'LABEL') {
        $Xstring .= XmindLabel($Xlasthandler, $Xoptions[NAME], $Xoptions[STYLE]) . XmindBetweenBox($Xtemp, $Xbox);
    }
    if ($name == 'ENTRY') {
        $Xoptions[ONCHANGE] = str_replace("'", "\\'", $Xoptions[ONCHANGE]);
        $Xoptions[ONCHANGE] = str_replace("'", "\\'", $Xoptions[ONBLUR]);
        $Xstring .= XmindEntry($Xtheme, $Xoptions[NAME], $Xoptions[TYPE], $Xoptions[WIDTH], $Xlasthandler, $Xoptions[ACTIVE], $Xoptions[ONCHANGE], $Xoptions[ONBLUR]) . XmindBetweenBox($Xtemp, $Xbox);
    }
    if ($name == 'TEXT') {
        $Xoptions[ONCHANGE] = str_replace("'", "\\'", $Xoptions[ONCHANGE]);
        $Xoptions[ONCHANGE] = str_replace("'", "\\'", $Xoptions[ONBLUR]);
        $Xstring .= XmindText($Xtheme, $Xoptions[NAME], $Xoptions[WIDTH], $Xoptions[HEIGHT], $Xlasthandler, $Xoptions[ACTIVE], $Xoptions[ONCHANGE], $Xoptions[ONBLUR]) . XmindBetweenBox($Xtemp, $Xbox);
    }
    if ($name == 'HIDDEN') {
        $Xstring .= XmindHidden($Xoptions[NAME], $Xlasthandler);
    }
    if ($name == 'SPIN') {
        $Xoptions[ONCHANGE] = str_replace("'", "\\'", $Xoptions[ONCHANGE]);
        $Xoptions[ONCHANGE] = str_replace("'", "\\'", $Xoptions[ONBLUR]);
        $Xstring .= XmindSpin($Xtheme, $Xoptions[NAME], $Xoptions[WIDTH], $Xlasthandler, $Xoptions['MIN'], $Xoptions['MAX'], $Xoptions[STEP], $Xoptions[ONCHANGE], $Xoptions[ONBLUR], $Xoptions[ACTIVE]) . XmindBetweenBox($Xtemp, $Xbox);
    }
    if ($name == 'BUTTON') {
        $Xoptions[ONCLICK] = str_replace("'", "\\'", $Xoptions[ONCLICK]);
        $Xstring .= XmindButton($Xtheme, $Xoptions[NAME], $Xlasthandler, $Xoptions[IMAGE], $Xoptions[ONCLICK], $Xoptions[VALUE], $Xoptions[ACTIVE], $Xoptions[WIDTH]) . XmindBetweenBox($Xtemp, $Xbox);
    }
    if ($name == 'TOGGLE') {
        $Xoptions[ONCLICK] = str_replace("'", "\\'", $Xoptions[ONCLICK]);
        $Xstring .= XmindToggle($Xtheme, $Xoptions[NAME], $Xlasthandler, $Xoptions[VALUE], $Xoptions[ONCLICK], $Xoptions[ACTIVE]) . XmindBetweenBox($Xtemp, $Xbox);
    }
    if ($name == 'CHECKBOX') {
        $Xoptions[ONCLICK] = str_replace("'", "\\'", $Xoptions[ONCLICK]);
        $Xstring .= XmindCheckBox($Xtheme, $Xoptions[NAME], $Xoptions[VALUE], $Xoptions[ONCLICK], $Xoptions[ACTIVE]) . XmindBetweenBox($Xtemp, $Xbox);
    }
    if ($name == 'RADIO') {
        $Xoptions[ONCLICK] = str_replace("'", "\\'", $Xoptions[ONCLICK]);
        $Xstring .= XmindRadio($Xtheme, $Xoptions[NAME], $Xlasthandler, $Xoptions[VALUE], $Xoptions[ONCLICK], $Xoptions[ACTIVE]) . XmindBetweenBox($Xtemp, $Xbox);
    }
    if ($name == 'PROGRESSBAR') {
        $Xstring .= XmindProgressBar($Xtheme, $Xoptions[NAME], $Xoptions[WIDTH], $Xoptions[VALUE]) . XmindBetweenBox($Xtemp, $Xbox);
    }
    if ($name == 'IMAGE') {
        $Xstring .= XmindImage($Xoptions[NAME], $Xoptions[SRC], $Xoptions[WIDTH], $Xoptions[HEIGHT]) . XmindBetweenBox($Xtemp, $Xbox);
    }
    if ($name == 'DRAWINGAREA') {
        $Xstring .= XmindDrawingArea($Xtheme, $Xoptions[NAME], $Xoptions[WIDTH], $Xoptions[HEIGHT], $Xoptions[SRC]) . XmindBetweenBox($Xtemp, $Xbox);
    }
    if ($name == 'CLIST') {
        $Xlasttag = '';
        $Xstring .= '</tbody></table>\'; }</script>';
        $Xstring .= XmindBetweenBox($Xtemp, $Xbox);
    }
    if ($name == 'OPTION') {
        if ($Xlasttag = 'CLIST') {
            $Xstring .= '<tr onclick="parent.ClistOnClick(this, \\\'' . $XlastName . '\\\', \\\'' . trim($Xlasthandler) . '\\\')">';
            $t = explode(',', trim($Xlasthandler));
            $i = 0;
            foreach ($t as $t2) {
                $n = round($Xtemp[1][$i] / 8 - 2);
                if (strlen($t2) > $n) {
                    $t2[$n] = ',';
                    list($t2, ) = explode(',', $t2);
                }
                $Xstring .= '<td></td><td  align="' . trim($Xtemp[0][$i]) . '">&nbsp;' . trim($t2) . '</td><td></td>';
                $i++;
            }
            $Xstring .= '</tr>';
        }
    }
    if ($name == 'MENUBAR') {
        $Xtemp[menubar] = '';
    }
    if ($name == 'MENU') {
        $Xstring2 .= '</table></div>';
    }
    if ($name == 'ITEM') {
        $Xn[ITEM]++;
        if (!$Xoptions[NAME]) {
            $Xoptions[NAME] = 'item' . $Xn[ITEM];
        }
        if ($Xoptions[CHILD]) {
            $img = '<img src="' . $Xpath . 'Xmind/themes/' . $Xtheme . '/arrowmenu.png">';
        }
        if ($a = trim($Xlasthandler)) {
            $Xstring2 .= '<tr><td valign="middle" class="item" onmouseover="traceItem(this)" onmouseout="untraceItem(this)" onclick="' . $Xoptions[ONCLICK] . '" child="' . $Xoptions[CHILD] . '"><table width="100%" cellpadding="1" cellspacing="1"><tr><td>&nbsp;' . $a . '&nbsp;&nbsp;</td><td width="5" valign="middle">' . $img . '</td></tr></table></td></tr>';
        } else {
            $Xstring2 .= '<tr><td height="1" class="itemBetween"></td></tr>';
        }
    }
    if ($name == 'XMIND') {
        $Xstring .= $Xstring2;
        if ($Xn[XMIND] == 1) {
            $Xstring .= '</form><div style="position: absolute; visibility: hidden; display:none;"><table><tr>';
            $tab = array('togglea', 'toggleb', 'toggleab', 'toggleaOn', 'togglebOn', 'toggleabOn', 'buttonaOn', 'buttonbOn', 'buttoncOn', 'buttondOn', 'buttonabOn', 'buttonacOn', 'buttonbdOn', 'buttoncdOn', 'buttonabcdOn', 'spinbutton1On', 'spinbutton2On');
            foreach ($tab as $t) {
                $Xstring .= '<td class="' . $t . '">  </td>';
            }
            $Xstring .= '</tr></table></div><script language="Javascript">window.onload=new Function("SetDefaultValues()"); document.onclick=DocumentClick;</script>';
        }
        if ($Xintegration != 'plain') {
            $Xstring .= '</body></html>';
        }
    }
    $Yn[$name]--;
}